diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2020-03-15 11:34:34 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2020-03-15 11:56:02 -0400 |
commit | 808dded4f103becf7929562b1ed58046aa63f3f6 (patch) | |
tree | 064217def806ec1590a27d7d72e8d9736b9168f1 /app-shells | |
parent | kde-frameworks/kdoctools: Fix patch name (diff) | |
download | gentoo-808dded4f103becf7929562b1ed58046aa63f3f6.tar.gz gentoo-808dded4f103becf7929562b1ed58046aa63f3f6.tar.bz2 gentoo-808dded4f103becf7929562b1ed58046aa63f3f6.zip |
app-shells/dash: new revision that more-closely matches upstream.
Our dash ebuilds differed from upstream in two ways in the past: we
disabled LINENO support with --disable-lineno, and we patched the
"echo" command to ignore certain arguments and escape sequences.
Disabling LINENO tricks configure scripts into re-executing themselves
with bash, which can hide errors for users (good?), but also hides
them from developers (bad). The LINENO variable is covered by POSIX,
and it's counterintuitive to silently force bash on users who have
explicitly set /bin/sh to dash. This new revision therefore re-enables
LINENO. This same change (in the context of Debian) was discussed on
the autoconf mailing list.
The "dumb echo" patch reflects a similar situation. Dash's upstream
"echo" implementation differs from the bash implementation, but is
correct according to POSIX. This can shed light upon some portability
bugs, particularly in autoconf scripts, and the "dumb echo" patch
hides some of those bugs from end users. But again, it hides them from
the authors as well and thereby perpetuates the portability issues.
Since this patch is Gentoo-specific, and hides problems that are
better addressed elsewhere, this new revision eliminates it.
Closes: https://bugs.gentoo.org/687002
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'app-shells')
-rw-r--r-- | app-shells/dash/dash-0.5.10.2-r1.ebuild | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/app-shells/dash/dash-0.5.10.2-r1.ebuild b/app-shells/dash/dash-0.5.10.2-r1.ebuild new file mode 100644 index 000000000000..877c0771557c --- /dev/null +++ b/app-shells/dash/dash-0.5.10.2-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Debian Almquist Shell" +HOMEPAGE="http://gondor.apana.org.au/~herbert/dash/" +SRC_URI="http://gondor.apana.org.au/~herbert/dash/files/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="libedit static" + +BDEPEND="virtual/pkgconfig" +RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )" +DEPEND="${RDEPEND} + libedit? ( static? ( dev-libs/libedit[static-libs] ) )" + +PATCHES=( "${FILESDIR}/${PN}-0.5.9.1-format-security.patch" ) + +src_prepare() { + default + + # Fix the invalid sort + sed -i -e 's/LC_COLLATE=C/LC_ALL=C/g' src/mkbuiltins + + # Use pkg-config for libedit linkage + sed -i \ + -e "/LIBS/s:-ledit:\`$(tc-getPKG_CONFIG) --libs libedit $(usex static --static '')\`:" \ + configure || die +} + +src_configure() { + # don't redefine stat on Solaris + if [[ ${CHOST} == *-solaris* ]] ; then + export ac_cv_func_stat64=yes + + # if your headers strictly adhere to POSIX, you'll need this too + [[ ${CHOST##*solaris2.} -le 10 ]] && append-cppflags -DNAME_MAX=255 + fi + append-cppflags -DJOBS=$(usex libedit 1 0) + use static && append-ldflags -static + # Do not pass --enable-glob due to #443552. + local myeconfargs=( + --bindir="${EPREFIX}"/bin + --enable-fnmatch + $(use_with libedit) + ) + econf "${myeconfargs[@]}" +} |