Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libblockdev/files/, sys-libs/libblockdev/
Date: Tue, 12 May 2020 18:44:22
Message-Id: 1589309049.de893769146655fc76b842d21b3cba7cbf4059e3.polynomial-c@gentoo
1 commit: de893769146655fc76b842d21b3cba7cbf4059e3
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 12 18:39:26 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue May 12 18:44:09 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de893769
7
8 sys-libs/libblockdev: Don't use bashisms in configure script
9
10 Closes: https://bugs.gentoo.org/719442
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
13
14 .../files/libblockdev-2.23-avoid_bashisms.patch | 41 ++++++++++++++++++++++
15 sys-libs/libblockdev/libblockdev-2.23-r1.ebuild | 8 +++--
16 2 files changed, 46 insertions(+), 3 deletions(-)
17
18 diff --git a/sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch b/sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch
19 new file mode 100644
20 index 00000000000..9c4f94bd841
21 --- /dev/null
22 +++ b/sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch
23 @@ -0,0 +1,41 @@
24 +From e6ab6918ffac65da2d562cb286c6ab50eaf62ca2 Mon Sep 17 00:00:00 2001
25 +From: Lars Wendler <polynomial-c@g.o>
26 +Date: Mon, 11 May 2020 22:14:26 +0200
27 +Subject: [PATCH] configure.ac: Avoid bashisms
28 +
29 +or else we get unpredictable results with shells != /bin/bash like:
30 +
31 +checking for gobject-introspection... no (disabled, use --enable-introspection to enable)
32 +./configure: 13672: test: xno: unexpected operator
33 +checking for python3... /var/tmp/portage/sys-libs/libblockdev-2.23-r1/temp/python3.8/bin/python3
34 +./configure: 13838: test: x/var/tmp/portage/sys-libs/libblockdev-2.23-r1/temp/python3.8/bin/python3: unexpected operator
35 +
36 +Reported-by: Matt Whitlock <gentoo@××××××××××××.name>
37 +Gentoo-bug: https://bugs.gentoo.org/719442
38 +Signed-off-by: Lars Wendler <polynomial-c@g.o>
39 +---
40 + configure.ac | 4 ++--
41 + 1 file changed, 2 insertions(+), 2 deletions(-)
42 +
43 +diff --git a/configure.ac b/configure.ac
44 +index ded64259..bbdff5e7 100644
45 +--- a/configure.ac
46 ++++ b/configure.ac
47 +@@ -60,7 +60,7 @@ AC_ARG_WITH([python3],
48 + AC_SUBST(WITH_PYTHON3, 0)
49 + if test "x$with_python3" != "xno"; then
50 + AC_PATH_PROG([python3], [python3], [no])
51 +- AS_IF([test "x$python3" == "xno"],
52 ++ AS_IF([test "x$python3" = "xno"],
53 + [if test "x$with_python3" = "xyes"; then
54 + LIBBLOCKDEV_SOFT_FAILURE([Python3 support requested, but python3 is not available])
55 + fi],
56 +@@ -77,7 +77,7 @@ AC_ARG_WITH([gtk-doc],
57 + AC_SUBST(WITH_GTK_DOC, 0)
58 + if test "x$with_gtk_doc" != "xno"; then
59 + AC_PATH_PROG([gtkdoc_scan], [gtkdoc-scan], [no])
60 +- AS_IF([test "x$gtkdoc_scan" == "xno"],
61 ++ AS_IF([test "x$gtkdoc_scan" = "xno"],
62 + [if test "x$with_gtk_doc" = "xyes"; then
63 + LIBBLOCKDEV_SOFT_FAILURE([Building documentation with gtk-doc requested, but not available])
64 + fi],
65
66 diff --git a/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild b/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild
67 index c252b7d2104..105df4812ba 100644
68 --- a/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild
69 +++ b/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild
70 @@ -4,12 +4,12 @@
71 EAPI=7
72
73 PYTHON_COMPAT=( python3_{6,7,8} )
74 -inherit python-single-r1 xdg-utils
75 +inherit autotools python-single-r1 xdg-utils
76
77 DESCRIPTION="A library for manipulating block devices"
78 HOMEPAGE="https://github.com/storaged-project/libblockdev"
79 if [[ "${PV}" == *9999 ]] ; then
80 - inherit autotools git-r3
81 + inherit git-r3
82 EGIT_REPO_URI="https://github.com/storaged-project/libblockdev.git"
83 BDEPEND="
84 sys-devel/autoconf-archive
85 @@ -66,6 +66,8 @@ BDEPEND+="
86 REQUIRED_USE="${PYTHON_REQUIRED_USE}
87 escrow? ( cryptsetup )"
88
89 +PATCHES=( "${FILESDIR}/${P}-avoid_bashisms.patch" ) #719442
90 +
91 pkg_setup() {
92 python-single-r1_pkg_setup
93 }
94 @@ -73,7 +75,7 @@ pkg_setup() {
95 src_prepare() {
96 xdg_environment_reset #623992
97 default
98 - [[ "${PV}" == *9999 ]] && eautoreconf
99 + eautoreconf
100 }
101
102 src_configure() {