commit:     7894b5c71eef0a171809ab4e8ea197397734a4c3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 20 06:21:38 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 20 06:21:38 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7894b5c7

app-arch/atool: fix bashism in configure script

Closes: https://bugs.gentoo.org/775158
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-arch/atool/atool-0.39.0-r1.ebuild                     | 15 ++++++++++++++-
 app-arch/atool/files/atool-0.39.0-configure-bashism.patch | 12 ++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/app-arch/atool/atool-0.39.0-r1.ebuild 
b/app-arch/atool/atool-0.39.0-r1.ebuild
index 4ab3fb6b4ae..b5a2d655b27 100644
--- a/app-arch/atool/atool-0.39.0-r1.ebuild
+++ b/app-arch/atool/atool-0.39.0-r1.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
+inherit autotools
+
 DESCRIPTION="Script for managing file archives of various types"
 HOMEPAGE="https://www.nongnu.org/atool/";
 SRC_URI="https://savannah.nongnu.org/download/${PN}/${P}.tar.gz";
@@ -14,3 +16,14 @@ KEYWORDS="amd64 ppc x86"
 DEPEND="dev-lang/perl"
 RDEPEND="${DEPEND}
        !app-text/adiff"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.39.0-configure-bashism.patch
+)
+
+src_prepare() {
+       default
+
+       # Needed for the bashism patch
+       eautoreconf
+}

diff --git a/app-arch/atool/files/atool-0.39.0-configure-bashism.patch 
b/app-arch/atool/files/atool-0.39.0-configure-bashism.patch
new file mode 100644
index 00000000000..512bdc02ee9
--- /dev/null
+++ b/app-arch/atool/files/atool-0.39.0-configure-bashism.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/775158
+--- a/configure.ac
++++ b/configure.ac
+@@ -11,7 +11,7 @@ AC_DEFINE_DIR(LOCALSTATEDIR, localstatedir)
+ dnl Perl stuff
+ AC_PATH_PROG([PERL], [perl])
+ eval `$PERL -V:startperl`
+-if test "${startperl:0:1}" = "#" ; then
++if test "$(printf %.1s "$startperl")" = "#" ; then
+   startperl="\\$startperl"
+ fi
+ AC_SUBST(PERL_SHEBANG, $startperl)

Reply via email to