Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 920346

Summary: net-print/cups-filters-2.0.0: configure error when /bin/sh != bash
Product: Gentoo Linux Reporter: Matt Whitlock <gentoo>
Component: Current packagesAssignee: Printing Team <printing>
Status: RESOLVED FIXED    
Severity: normal CC: eschwartz93
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/OpenPrinting/cups-filters/pull/567
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: cups-filters-configure-remove-bashism.patch

Description Matt Whitlock 2023-12-20 02:42:54 UTC
Created attachment 880021 [details, diff]
cups-filters-configure-remove-bashism.patch

cups-filters's configure.ac contains a Bashism (use of == operator with test built-in). Thus, configure emits errors when /bin/sh is not Bash. This doesn't cause the build to fail outright, but it may be causing misdetection of features.

./configure: 17209: test: x/usr/bin/gs: unexpected operator

This error is due to this Bashism in configure.ac:

AS_IF([test "x$CUPS_GHOSTSCRIPT" == "x" -a "x$CUPS_PDFTOPS" == "x"], [
    enable_universal_cups_filter=no
])

The attached patch corrects the Bashism and allows net-print/cups-filters-2.0.0 to configure without error.
Comment 1 Eli Schwartz 2023-12-20 03:17:16 UTC
Hmm, this makes me realize my test container doesn't have dash as /bin/sh! My main machine does...

I've submitted a PR with the obvious fix upstream (probably the same as your patch but I didn't check).
Comment 2 Larry the Git Cow gentoo-dev 2024-04-08 16:34:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ba8517af025fc9e8170ad5aeb1a196f11280a4f

commit 0ba8517af025fc9e8170ad5aeb1a196f11280a4f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-04-08 16:28:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-08 16:34:19 +0000

    net-print/cups-filters: add bash workaround for now
    
    Closes: https://bugs.gentoo.org/920346
    Signed-off-by: Sam James <sam@gentoo.org>

 .../cups-filters/cups-filters-2.0.0-r1.ebuild      | 55 ++++++++++++++++++++++
 1 file changed, 55 insertions(+)