1 |
commit: 6ec85a4304ce9b45eecdd1410efff909ea1044fa |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 24 07:58:24 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 24 08:01:48 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ec85a43 |
7 |
|
8 |
dev-libs/libbytesize: fix Bashism in configure |
9 |
|
10 |
Reported upstream: |
11 |
``` |
12 |
checking for python3... /var/tmp/portage/dev-libs/libbytesize-2.6/temp/python3.10/bin/python3 |
13 |
/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 |
14 |
checking that generated files are newer than configure... done |
15 |
configure: creating ./config.status |
16 |
config.status: creating Makefile |
17 |
``` |
18 |
|
19 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
20 |
|
21 |
.../files/libbytesize-2.6-configure-bashism.patch | 31 ++++++++++++++++++++++ |
22 |
dev-libs/libbytesize/libbytesize-2.5.ebuild | 2 +- |
23 |
dev-libs/libbytesize/libbytesize-2.6.ebuild | 1 + |
24 |
3 files changed, 33 insertions(+), 1 deletion(-) |
25 |
|
26 |
diff --git a/dev-libs/libbytesize/files/libbytesize-2.6-configure-bashism.patch b/dev-libs/libbytesize/files/libbytesize-2.6-configure-bashism.patch |
27 |
new file mode 100644 |
28 |
index 000000000000..5fe0f095eaca |
29 |
--- /dev/null |
30 |
+++ b/dev-libs/libbytesize/files/libbytesize-2.6-configure-bashism.patch |
31 |
@@ -0,0 +1,31 @@ |
32 |
+https://github.com/storaged-project/libbytesize/pull/102 |
33 |
+ |
34 |
+From: Sam James <sam@g.o> |
35 |
+Date: Fri, 24 Dec 2021 07:58:47 +0000 |
36 |
+Subject: [PATCH] build: avoid bashisms in configure |
37 |
+ |
38 |
+configure needs to be executable by a POSIX-compliant shell (/bin/sh) |
39 |
+and while this is often Bash, which tolerates non-POSIX statements, it |
40 |
+might sometimes be e.g. dash which doesn't. |
41 |
+ |
42 |
+Signed-off-by: Sam James <sam@g.o> |
43 |
+--- a/configure.ac |
44 |
++++ b/configure.ac |
45 |
+@@ -59,7 +59,7 @@ AC_ARG_WITH([python3], |
46 |
+ AC_SUBST(WITH_PYTHON3, 0) |
47 |
+ if test "x$with_python3" != "xno"; then |
48 |
+ AC_PATH_PROG([python3], [python3], [no]) |
49 |
+- AS_IF([test "x$python3" == "xno"], |
50 |
++ AS_IF([test "x$python3" = "xno"], |
51 |
+ [if test "x$with_python3" = "xyes"; then |
52 |
+ LIBBYTESIZE_SOFT_FAILURE([Python3 support requested, but python3 is not available]) |
53 |
+ fi], |
54 |
+@@ -77,7 +77,7 @@ AC_ARG_WITH([gtk-doc], |
55 |
+ AC_SUBST(WITH_GTK_DOC, 0) |
56 |
+ if test "x$with_gtk_doc" != "xno"; then |
57 |
+ AC_PATH_PROG([gtkdoc_scan], [gtkdoc-scan], [no]) |
58 |
+- AS_IF([test "x$gtkdoc_scan" == "xno"], |
59 |
++ AS_IF([test "x$gtkdoc_scan" = "xno"], |
60 |
+ [if test "x$with_gtk_doc" = "xyes"; then |
61 |
+ LIBBYTESIZE_SOFT_FAILURE([Building documentation with gtk-doc requested, but not available]) |
62 |
+ fi], |
63 |
|
64 |
diff --git a/dev-libs/libbytesize/libbytesize-2.5.ebuild b/dev-libs/libbytesize/libbytesize-2.5.ebuild |
65 |
index 4450525879d7..9afd519fb6c1 100644 |
66 |
--- a/dev-libs/libbytesize/libbytesize-2.5.ebuild |
67 |
+++ b/dev-libs/libbytesize/libbytesize-2.5.ebuild |
68 |
@@ -66,7 +66,7 @@ src_configure() { |
69 |
$(use_with tools) |
70 |
) |
71 |
local ECONF_SOURCE="${S}" |
72 |
- python_do econf "${myeconfargs[@]}" |
73 |
+ CONFIG_SHELL="${BROOT}/bin/bash" python_do econf "${myeconfargs[@]}" |
74 |
} |
75 |
|
76 |
src_compile() { |
77 |
|
78 |
diff --git a/dev-libs/libbytesize/libbytesize-2.6.ebuild b/dev-libs/libbytesize/libbytesize-2.6.ebuild |
79 |
index 98b3c0db2b73..84be8f1ddd9e 100644 |
80 |
--- a/dev-libs/libbytesize/libbytesize-2.6.ebuild |
81 |
+++ b/dev-libs/libbytesize/libbytesize-2.6.ebuild |
82 |
@@ -44,6 +44,7 @@ RESTRICT="test" |
83 |
|
84 |
PATCHES=( |
85 |
"${FILESDIR}/${PN}-2.4-no_Werror.patch" |
86 |
+ "${FILESDIR}/${PN}-2.6-configure-bashism.patch" |
87 |
) |
88 |
|
89 |
python_do() { |