summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-24 07:58:24 +0000
committerSam James <sam@gentoo.org>2021-12-24 08:01:48 +0000
commit6ec85a4304ce9b45eecdd1410efff909ea1044fa (patch)
tree3938c38ade59b5c79dfa8b505352a39045323034 /dev-libs/libbytesize
parentdev-libs/libbytesize: add python 3.10 (diff)
downloadgentoo-6ec85a4304ce9b45eecdd1410efff909ea1044fa.tar.gz
gentoo-6ec85a4304ce9b45eecdd1410efff909ea1044fa.tar.bz2
gentoo-6ec85a4304ce9b45eecdd1410efff909ea1044fa.zip
dev-libs/libbytesize: fix Bashism in configure
Reported upstream: ``` checking for python3... /var/tmp/portage/dev-libs/libbytesize-2.6/temp/python3.10/bin/python3 /var/tmp/portage/dev-libs/libbytesize-2.6/work/libbytesize-2.6/configure: 14435: test: x/var/tmp/portage/dev-libs/libbytesize-2.6/temp/python3.10/bin/python3: unexpected operator checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile ``` Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libbytesize')
-rw-r--r--dev-libs/libbytesize/files/libbytesize-2.6-configure-bashism.patch31
-rw-r--r--dev-libs/libbytesize/libbytesize-2.5.ebuild2
-rw-r--r--dev-libs/libbytesize/libbytesize-2.6.ebuild1
3 files changed, 33 insertions, 1 deletions
diff --git a/dev-libs/libbytesize/files/libbytesize-2.6-configure-bashism.patch b/dev-libs/libbytesize/files/libbytesize-2.6-configure-bashism.patch
new file mode 100644
index 000000000000..5fe0f095eaca
--- /dev/null
+++ b/dev-libs/libbytesize/files/libbytesize-2.6-configure-bashism.patch
@@ -0,0 +1,31 @@
+https://github.com/storaged-project/libbytesize/pull/102
+
+From: Sam James <sam@gentoo.org>
+Date: Fri, 24 Dec 2021 07:58:47 +0000
+Subject: [PATCH] build: avoid bashisms in configure
+
+configure needs to be executable by a POSIX-compliant shell (/bin/sh)
+and while this is often Bash, which tolerates non-POSIX statements, it
+might sometimes be e.g. dash which doesn't.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -59,7 +59,7 @@ AC_ARG_WITH([python3],
+ AC_SUBST(WITH_PYTHON3, 0)
+ if test "x$with_python3" != "xno"; then
+ AC_PATH_PROG([python3], [python3], [no])
+- AS_IF([test "x$python3" == "xno"],
++ AS_IF([test "x$python3" = "xno"],
+ [if test "x$with_python3" = "xyes"; then
+ LIBBYTESIZE_SOFT_FAILURE([Python3 support requested, but python3 is not available])
+ fi],
+@@ -77,7 +77,7 @@ AC_ARG_WITH([gtk-doc],
+ AC_SUBST(WITH_GTK_DOC, 0)
+ if test "x$with_gtk_doc" != "xno"; then
+ AC_PATH_PROG([gtkdoc_scan], [gtkdoc-scan], [no])
+- AS_IF([test "x$gtkdoc_scan" == "xno"],
++ AS_IF([test "x$gtkdoc_scan" = "xno"],
+ [if test "x$with_gtk_doc" = "xyes"; then
+ LIBBYTESIZE_SOFT_FAILURE([Building documentation with gtk-doc requested, but not available])
+ fi],
diff --git a/dev-libs/libbytesize/libbytesize-2.5.ebuild b/dev-libs/libbytesize/libbytesize-2.5.ebuild
index 4450525879d7..9afd519fb6c1 100644
--- a/dev-libs/libbytesize/libbytesize-2.5.ebuild
+++ b/dev-libs/libbytesize/libbytesize-2.5.ebuild
@@ -66,7 +66,7 @@ src_configure() {
$(use_with tools)
)
local ECONF_SOURCE="${S}"
- python_do econf "${myeconfargs[@]}"
+ CONFIG_SHELL="${BROOT}/bin/bash" python_do econf "${myeconfargs[@]}"
}
src_compile() {
diff --git a/dev-libs/libbytesize/libbytesize-2.6.ebuild b/dev-libs/libbytesize/libbytesize-2.6.ebuild
index 98b3c0db2b73..84be8f1ddd9e 100644
--- a/dev-libs/libbytesize/libbytesize-2.6.ebuild
+++ b/dev-libs/libbytesize/libbytesize-2.6.ebuild
@@ -44,6 +44,7 @@ RESTRICT="test"
PATCHES=(
"${FILESDIR}/${PN}-2.4-no_Werror.patch"
+ "${FILESDIR}/${PN}-2.6-configure-bashism.patch"
)
python_do() {