app-arch/atool: fix bashism in configure script

Closes: https://bugs.gentoo.org/775158
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2021-03-20 06:21:38 +00:00
parent 821b0750af
commit 7894b5c71e
2 changed files with 26 additions and 1 deletions

View File

@@ -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
}

View File

@@ -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)