summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2016-08-16 09:15:16 +0200
committerLars Wendler <polynomial-c@gentoo.org>2016-08-16 09:18:56 +0200
commitcd93cde6dacdd5df92ee894defcfda9922260438 (patch)
tree7186edc0f060bb14bdde500886ca88a39af848c9
parentdev-ruby/slop: add 4.4.0 (diff)
downloadgentoo-cd93cde6dacdd5df92ee894defcfda9922260438.tar.gz
gentoo-cd93cde6dacdd5df92ee894defcfda9922260438.tar.bz2
gentoo-cd93cde6dacdd5df92ee894defcfda9922260438.zip
app-shells/dash: Bump to version 0.5.9 (bug #590694).
Package-Manager: portage-2.3.0 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
-rw-r--r--app-shells/dash/Manifest1
-rw-r--r--app-shells/dash/dash-0.5.9.ebuild72
-rw-r--r--app-shells/dash/files/dash-0.5.9-dumb-echo.patch93
3 files changed, 166 insertions, 0 deletions
diff --git a/app-shells/dash/Manifest b/app-shells/dash/Manifest
index 9dc89c12d65d..1a5635047b08 100644
--- a/app-shells/dash/Manifest
+++ b/app-shells/dash/Manifest
@@ -1,5 +1,6 @@
DIST dash-0.5.7.tar.gz 223794 SHA256 ae89fa9f1145b7748cf0740e1df04cd52fdf8a285da4911dd0f04983efba4e39 SHA512 77ad016fa5fb3fcb0d940b29d3fa914f546d79cdf2221ed47e4dec6d3a005b25d2d32ee1fdd4f662a7a84274572b72235b82e4c39995c7ca0bb049a7d88595b5 WHIRLPOOL cc11d46a76aa201cb02c4f58e6b1b77fe859d34d7f8b6e6320263a2446dc4d229549823e6628875e0caa21a90fe3743026ba5809ba1a78788d8dd9c94207aa48
DIST dash-0.5.8.tar.gz 223028 SHA256 c6db3a237747b02d20382a761397563d813b306c020ae28ce25a1c3915fac60f SHA512 3dc42d3503b33c50b62c0f9104c0e41c4e8fa7490ba72bc09213fcc894d6fd92b9688c58389acf8b538b08f8e9cc179f0bf5572e22175d1960f04554594237b8 WHIRLPOOL df79b1cf81cdbba0d7556175510d1f4d7294185c91a10cc0a8d4a9f940e2c26c681e377103b5f4e5291211b4555340433eae10144cb778d2d4e65e6ab54c98a3
+DIST dash-0.5.9.tar.gz 224831 SHA256 92793b14c017d79297001556389442aeb9e3c1cc559fd178c979169b1a47629c SHA512 91d4cc69dae8bc73f8da4f771d993f91b041f19637a6dfec9b9acfd8c97d2d819fb445f9ba608f0e7e5df431a934be3b29a93dde7cc3d6400d06e7d7b40dc15f WHIRLPOOL aafe991df7b966bfa16e229c5e9c1891a37f8bb25603b8a87060a0f3b657525026d33250249e159f5a173898ca471f894dd268fed9b458fd1ddf5b989d143da4
DIST dash_0.5.7-4.diff.gz 42834 SHA256 649d97aa0c48dc0db73c08d7e89a004b9d413279a823388161940342016284f0 SHA512 6b53684deebb9ac8ac0f42fa25ff5cad7f717b01473bdb29e968ea2cf3753f83013d70dcea4d4d3e7906b09760f086b10acaff0ebb3445bd392d8276fb865224 WHIRLPOOL efa53e58c6223ef8d9b84780ef873d2a268fc1f40f879f5c731cf37717050b2333a01eb01a44d55e58c14e1c78c6e6d41b4652278311d72657089632358a9aab
DIST dash_0.5.8-1.diff.gz 41661 SHA256 d751769cc1ef8b825a177e782f1cd3e35bde7c268107fa4febf8d235e12c64d9 SHA512 38e5c4d5b5525b6d1749f6fe6a810fde3233d3412b8cf3bb1f07db162c0d0a8bcbb39c79df846e4b2c43dbea00820fd935a4af707a6ac161b1daa710ae2417b4 WHIRLPOOL a4612fca6f29f17e80ea531699f5fab22837b9ee20b8a73776258e9bf087821d0d9e494c12fd76b657ad112478912074666e61d008664c2daab0cf7b3a25cb95
DIST dash_0.5.8-2.diff.gz 41715 SHA256 00168a934864c26cae9a51367fe7ea013ece2d4844ff8bd6893fc00a8fa7b38c SHA512 f067ca162cc463a60b5bcd7926bd6ab1f6cb1757e9cd7894cbf7ba5849b6d9af5381b8ec7264c503db544242690db067b6c034041e262ff93d237f1c06e50e56 WHIRLPOOL 1c904df104c6026d3ec53843fb67563d88dd8a4babb779b369ccd037e1774d722a85ad92c184d713cd7a440be4885c7e739da17f038fcf88545afc527ddabb3f
diff --git a/app-shells/dash/dash-0.5.9.ebuild b/app-shells/dash/dash-0.5.9.ebuild
new file mode 100644
index 000000000000..c602b3bd0201
--- /dev/null
+++ b/app-shells/dash/dash-0.5.9.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs versionator
+
+MY_PV="$(get_version_component_range 1-3)"
+DEB_PATCH="$(get_version_component_range 4)"
+MY_P="${PN}-${MY_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/${MY_P}.tar.gz"
+if [[ -n "${DEB_PATCH}" ]] ; then
+ DEB_PF="${PN}_${MY_PV}-${DEB_PATCH}"
+ SRC_URI+=" mirror://debian/pool/main/d/dash/${DEB_PF}.diff.gz"
+fi
+
+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}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.5.9-dumb-echo.patch #337329 #527848
+ "${FILESDIR}"/${PN}-0.5.8.1-eval-warnx.patch
+)
+
+src_prepare() {
+ if [[ -n "${DEB_PATCH}" ]] ; then
+ epatch "${WORKDIR}"/${DEB_PF}.diff
+ epatch */debian/diff/*
+ fi
+ epatch "${PATCHES[@]}"
+
+ # 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
+ if [[ -n "${DEB_PATCH}" ]] ; then
+ dodoc */debian/changelog
+ fi
+}
diff --git a/app-shells/dash/files/dash-0.5.9-dumb-echo.patch b/app-shells/dash/files/dash-0.5.9-dumb-echo.patch
new file mode 100644
index 000000000000..9bcf6e65a8a2
--- /dev/null
+++ b/app-shells/dash/files/dash-0.5.9-dumb-echo.patch
@@ -0,0 +1,93 @@
+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
+@@ -442,21 +442,12 @@
+ int
+ echocmd(int argc, char **argv)
+ {
+- int nonl;
+-
+- nonl = *++argv ? equal(*argv, "-n") : 0;
+- argv += nonl;
+-
+- do {
+- int c;
+-
+- if (likely(*argv))
+- nonl += print_escape_str("%s", NULL, NULL, *argv++);
+- if (nonl > 0)
+- break;
+-
+- c = *argv ? ' ' : '\n';
+- out1c(c);
+- } while (*argv);
++ int i;
++ for (i = 1; i < argc; ++i) {
++ outstr(argv[i], out1);
++ if (i < argc - 1)
++ outc(' ', out1);
++ }
++ outc('\n', out1);
+ return 0;
+ }
+--- a/src/dash.1
++++ b/src/dash.1
+@@ -1182,43 +1182,15 @@
+ option turns off the effect of any preceding
+ .Fl P
+ options.
+-.It Xo echo Op Fl n
++.It Xo echo
+ .Ar args...
+ .Xc
+ Print the arguments on the standard output, separated by spaces.
+-Unless the
+-.Fl n
+-option is present, a newline is output following the arguments.
+-.Pp
+-If any of the following sequences of characters is encountered during
+-output, the sequence is not output. Instead, the specified action is
+-performed:
+-.Bl -tag -width indent
+-.It Li \eb
+-A backspace character is output.
+-.It Li \ec
+-Subsequent output is suppressed. This is normally used at the end of the
+-last argument to suppress the trailing newline that
+-.Ic echo
+-would otherwise output.
+-.It Li \ef
+-Output a form feed.
+-.It Li \en
+-Output a newline character.
+-.It Li \er
+-Output a carriage return.
+-.It Li \et
+-Output a (horizontal) tab character.
+-.It Li \ev
+-Output a vertical tab.
+-.It Li \e0 Ns Ar digits
+-Output the character whose value is given by zero to three octal digits.
+-If there are zero digits, a nul character is output.
+-.It Li \e\e
+-Output a backslash.
+-.El
+ .Pp
+-All other backslash sequences elicit undefined behaviour.
++No arguments or backslash sequences are supported as they are not portable.
++They will be printed out exactly as passed in.
++.Pp
++You can replace `echo -n ...` with the portable `printf %s ...` construct.
+ .It eval Ar string ...
+ Concatenate all the arguments with spaces.
+ Then re-parse and execute the command.