summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-11-01 19:18:17 +0000
committerMike Frysinger <vapier@gentoo.org>2014-11-01 19:18:17 +0000
commit65b7b83d6e13fdafc3a032d9df5e44c2cc3be9a6 (patch)
tree30dd027c329cb7ac0654629eb7626f1093227d26 /app-shells/dash
parentInitial version copied from java-overlay. Ebuild provided by Andrew John Hugh... (diff)
downloadgentoo-2-65b7b83d6e13fdafc3a032d9df5e44c2cc3be9a6.tar.gz
gentoo-2-65b7b83d6e13fdafc3a032d9df5e44c2cc3be9a6.tar.bz2
gentoo-2-65b7b83d6e13fdafc3a032d9df5e44c2cc3be9a6.zip
Replace the octal patch with a dumb echo patch to fix printf %b behavior and speed up & shrink down dash #527848 by John Keeping. Put jobs support behind USE=libedit since that controls interactive behavior. Drop autotool regeneration since Debian patches no longer need it.
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'app-shells/dash')
-rw-r--r--app-shells/dash/ChangeLog11
-rw-r--r--app-shells/dash/dash-0.5.8.1-r2.ebuild62
-rw-r--r--app-shells/dash/files/dash-0.5.8.1-dumb-echo.patch54
3 files changed, 126 insertions, 1 deletions
diff --git a/app-shells/dash/ChangeLog b/app-shells/dash/ChangeLog
index 37031c5c7bd6..0ad241f58030 100644
--- a/app-shells/dash/ChangeLog
+++ b/app-shells/dash/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-shells/dash
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/dash/ChangeLog,v 1.126 2014/11/01 18:08:16 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/dash/ChangeLog,v 1.127 2014/11/01 19:18:17 vapier Exp $
+
+*dash-0.5.8.1-r2 (01 Nov 2014)
+
+ 01 Nov 2014; Mike Frysinger <vapier@gentoo.org> +dash-0.5.8.1-r2.ebuild,
+ +files/dash-0.5.8.1-dumb-echo.patch:
+ Replace the octal patch with a dumb echo patch to fix printf %b behavior and
+ speed up & shrink down dash #527848 by John Keeping. Put jobs support behind
+ USE=libedit since that controls interactive behavior. Drop autotool
+ regeneration since Debian patches no longer need it.
01 Nov 2014; Mike Frysinger <vapier@gentoo.org> dash-0.5.7.4.ebuild:
Mark alpha/arm64/s390/sh stable #524262.
diff --git a/app-shells/dash/dash-0.5.8.1-r2.ebuild b/app-shells/dash/dash-0.5.8.1-r2.ebuild
new file mode 100644
index 000000000000..b015465c6583
--- /dev/null
+++ b/app-shells/dash/dash-0.5.8.1-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-shells/dash/dash-0.5.8.1-r2.ebuild,v 1.1 2014/11/01 19:18:17 vapier Exp $
+
+EAPI="4"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DEB_PV=${PV%.*}
+DEB_PATCH=${PV##*.}
+DEB_PF="${PN}_${DEB_PV}-${DEB_PATCH}"
+MY_P="${PN}-${DEB_PV}"
+
+DESCRIPTION="DASH is a direct descendant of the NetBSD version of ash (the Almquist SHell) and is POSIX compliant"
+HOMEPAGE="http://gondor.apana.org.au/~herbert/dash/"
+SRC_URI="http://gondor.apana.org.au/~herbert/dash/files/${PN}-${DEB_PV}.tar.gz
+ mirror://debian/pool/main/d/dash/${DEB_PF}.diff.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"
+IUSE="libedit static"
+
+RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ libedit? ( static? ( dev-libs/libedit[static-libs] ) )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${WORKDIR}"/${DEB_PF}.diff
+ epatch */debian/diff/*
+ epatch "${FILESDIR}"/${PN}-0.5.8.1-dumb-echo.patch #337329 #527848
+ epatch "${FILESDIR}"/${PN}-0.5.8.1-eval-warnx.patch
+
+ # 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() {
+ append-cppflags -DJOBS=$(usex libedit 1 0)
+ use static && append-ldflags -static
+ # Do not pass --enable-glob due to #443552.
+ # Autotools use $LINENO as a proxy for extended debug support
+ # (i.e. they're running bash), so disable that. #527644
+ econf \
+ --bindir="${EPREFIX}"/bin \
+ --enable-fnmatch \
+ --disable-lineno \
+ $(use_with libedit)
+}
+
+src_install() {
+ default
+ dodoc */debian/changelog
+}
diff --git a/app-shells/dash/files/dash-0.5.8.1-dumb-echo.patch b/app-shells/dash/files/dash-0.5.8.1-dumb-echo.patch
new file mode 100644
index 000000000000..e8a37d667b9a
--- /dev/null
+++ b/app-shells/dash/files/dash-0.5.8.1-dumb-echo.patch
@@ -0,0 +1,54 @@
+http://bugs.gentoo.org/337329
+http://bugs.gentoo.org/527848
+
+there's no requirement for `echo` to support escape sequences. bash, by default,
+does not, while dash always does. POSIX permits either behavior:
+http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html
+
+however, since the behavior is not portable, no one should be relying on echo
+having any specific behavior. they should use `printf` when they want an escape
+sequence. it also makes dash smaller & faster to disable this logic entirely.
+
+--- a/src/bltin/printf.c
++++ b/src/bltin/printf.c
+@@ -439,34 +444,12 @@
+ int
+ echocmd(int argc, char **argv)
+ {
+- int nonl = 0;
+- struct output *outs = out1;
+-
+- if (!*++argv)
+- goto end;
+- if (equal(*argv, "-n")) {
+- nonl = ~nonl;
+- if (!*++argv)
+- goto end;
++ int i;
++ for (i = 1; i < argc; ++i) {
++ outstr(argv[i], out1);
++ if (i < argc - 1)
++ outc(' ', out1);
+ }
+-
+- do {
+- int c;
+-
+- nonl += conv_escape_str(*argv);
+- outstr(stackblock(), outs);
+- if (nonl > 0)
+- break;
+-
+- c = ' ';
+- if (!*++argv) {
+-end:
+- if (nonl) {
+- break;
+- }
+- c = '\n';
+- }
+- outc(c, outs);
+- } while (*argv);
++ outc('\n', out1);
+ return 0;
+ }