summaryrefslogtreecommitdiff
path: root/app-shells/dash
diff options
context:
space:
mode:
Diffstat (limited to 'app-shells/dash')
-rw-r--r--app-shells/dash/Manifest15
-rw-r--r--app-shells/dash/dash-0.5.8.2.ebuild61
-rw-r--r--app-shells/dash/dash-0.5.9.1-r1.ebuild73
-rw-r--r--app-shells/dash/dash-0.5.9.1-r2.ebuild73
-rw-r--r--app-shells/dash/dash-0.5.9.1-r3.ebuild76
-rw-r--r--app-shells/dash/files/dash-0.5.8.1-dumb-echo.patch105
-rw-r--r--app-shells/dash/files/dash-0.5.8.1-eval-warnx.patch12
-rw-r--r--app-shells/dash/files/dash-0.5.9-dumb-echo.patch93
-rw-r--r--app-shells/dash/files/dash-0.5.9.1-dumb-echo.patch92
-rw-r--r--app-shells/dash/files/dash-0.5.9.1-format-security.patch13
-rw-r--r--app-shells/dash/metadata.xml18
11 files changed, 631 insertions, 0 deletions
diff --git a/app-shells/dash/Manifest b/app-shells/dash/Manifest
new file mode 100644
index 000000000000..f550a7d2e861
--- /dev/null
+++ b/app-shells/dash/Manifest
@@ -0,0 +1,15 @@
+AUX dash-0.5.8.1-dumb-echo.patch 2669 SHA256 7f024dac7ac6dedd54121308834f6ec2c83464abcc2ab553a2af217d2f8f3461 SHA512 5e849eae3022463832c247ac85f085893b068df1043d5a4df4c09c4f7eeb541c659f90b8f516eea09fc8a92828c723a156e08743b6405f0e21badc547823f3aa WHIRLPOOL f21fcd414b568e2dd17f3927844019be5342476beb69789197053cc29bc10c998cf96c0b2c02274a39f80b368b343aa160e5703c2b7d4d9253684711d891ebf7
+AUX dash-0.5.8.1-eval-warnx.patch 241 SHA256 13840812b0e03039c4061fac9bfd01106e53ce51e9bfb794c8c4015e6f3033e9 SHA512 fc44b181f236927e3e15f79c8304f212a55d332acfe981a526e957ff27b8ee56f128e1a5c805045218918f7f6d32945ea2d5b099e988f34cf2f56ad061d654ce WHIRLPOOL 6687f231588d3a47f236b1a4ccbba38f5fccf53e441789e789176c4f73dcabe11298c0ae3da6a09a8e51d23766607ee80a88c239223ba4d7372403a7b1159ad9
+AUX dash-0.5.9-dumb-echo.patch 2534 SHA256 8839fca662ec0456ab55f7f86db28de38f5576bb65bc18592ccf1eb85540be40 SHA512 984341da04a0c925ec976c0074e36d36cfdb83904f23dd4c3bb5efe577dacae12a36821daa184c6f2624a8b32f551a1cbb244ddca4e1846bb6aab2cc13ef145e WHIRLPOOL c71824f71a23e993da3b0da18b47873016e5c378e42a9dc8c12c6c330f5252865bab652deb16031d0b89a4cd1c652d7a313f4b2c37654ec376467c018e8201eb
+AUX dash-0.5.9.1-dumb-echo.patch 2592 SHA256 656875cf5906cc9bcb8e50aa3e374ed4b9b0fb85859367ec649775bc3390de5d SHA512 8dcbee6a53b46b78986c17860f84f47c94b3137b84cf46cd521ec9e4f0b5b4f5a2afbc9e7faa8130b591b3a0f9d2c9dc7853803c8b092c4ec1b5c5b7411fecbf WHIRLPOOL e375e380cae982bdbc928a63c3c44f2fde6a0bd758f76e832d92d70b93dea9c8003f3b7246dcf668ba3347fc04591348082b266bcdb3006331b22894a263e2db
+AUX dash-0.5.9.1-format-security.patch 374 SHA256 0ce7a1417b4e780f184588e761b4bea5d068c2312b23d954183076edf2f9432d SHA512 4726d96ad1a86e47374c129f1cbd13bf5f2b6c77faa4e3e85be65978222cc040175313218fe29da176af2bbc2546c432d84247ea342d261a284b64b42ce138c6 WHIRLPOOL 6584caf7d4cb57c0b7324bb8b54b72b110c57c211f6d8813507dee4b92c86fc0665edb11d83b637d19554bb61459f317f5daf24fc54a0a1be29416395ec26f00
+DIST dash-0.5.8.tar.gz 223028 SHA256 c6db3a237747b02d20382a761397563d813b306c020ae28ce25a1c3915fac60f SHA512 3dc42d3503b33c50b62c0f9104c0e41c4e8fa7490ba72bc09213fcc894d6fd92b9688c58389acf8b538b08f8e9cc179f0bf5572e22175d1960f04554594237b8 WHIRLPOOL df79b1cf81cdbba0d7556175510d1f4d7294185c91a10cc0a8d4a9f940e2c26c681e377103b5f4e5291211b4555340433eae10144cb778d2d4e65e6ab54c98a3
+DIST dash-0.5.9.1.tar.gz 225217 SHA256 5ecd5bea72a93ed10eb15a1be9951dd51b52e5da1d4a7ae020efd9826b49e659 SHA512 d56a043b8fab4693d3f70cceb531c37174e7ded4acd5549e53048d7ce29125ff21d7e758f51a4a73e06250d051e246467039989275838c19a2579edea3f72b7d WHIRLPOOL 233ced314d1091a7a27fc9a0f86a3d87f9a08d067a8b171ead7294a12b573071e9d63a5607424eb6d4f7a0c193f374a461cd94b205412928b93341d4b75a9095
+DIST dash_0.5.8-2.diff.gz 41715 SHA256 00168a934864c26cae9a51367fe7ea013ece2d4844ff8bd6893fc00a8fa7b38c SHA512 f067ca162cc463a60b5bcd7926bd6ab1f6cb1757e9cd7894cbf7ba5849b6d9af5381b8ec7264c503db544242690db067b6c034041e262ff93d237f1c06e50e56 WHIRLPOOL 1c904df104c6026d3ec53843fb67563d88dd8a4babb779b369ccd037e1774d722a85ad92c184d713cd7a440be4885c7e739da17f038fcf88545afc527ddabb3f
+EBUILD dash-0.5.8.2.ebuild 1696 SHA256 bfc5526949abc2a6321882fcae4805738c2334765885303eb7ef0b6e666784f2 SHA512 66d84df096ffdce607a3f4bc4e857d807955d945245f96db6e9a33640306ccd3418c79691f2f7e08efef7a877c3e79902c39340ec68d5bab9b0cc657554fbbd7 WHIRLPOOL b84b7e4d6e06a5cb670cbd4aa93f58e3837c188edf159689b4461e762f342cacf3ca224cf526e6f5204d66332c28295cd0c98f04e6d3a9024a22abde0510fdfd
+EBUILD dash-0.5.9.1-r1.ebuild 1949 SHA256 6f2d7aca634cd3cba114c8ecf261ff39a8991db1798890c0b6e5ac5ad8171bd1 SHA512 37324ad3e7fdb9f23924191ab0ae841e6f1948e7b9a9149af55314ee13b1577965c1f3fa5b464536928adb5045a2b5573eb8785316dd60f5008aeae8efe7e199 WHIRLPOOL a91fd8511f18111ae8a488f105b90b578588902dcd8485816936b57790d775a7cffd10b3569e5b2e4e8e2c52d5a4e29fad1dd2be9998c40c6472882ccd0b6f9e
+EBUILD dash-0.5.9.1-r2.ebuild 2048 SHA256 fa063b40842e91cde7d130daa0ac8c0c8d4c21189f873ec9580c9e5b6fd53420 SHA512 59341ffefbc51e667f45412a518ae5264b2192657d201a2852e446445e243e8da2f1ddc0ade395616ec5359037ee38bbaa6804b68e809e30f106796964b8bc5d WHIRLPOOL accc020b9532f4491340dacd4806471381692164107634f992afca399df40c77b0f4f5e917dde33721bb72c66a367c5db201230ae0e2d394685f1f2c8bc245d9
+EBUILD dash-0.5.9.1-r3.ebuild 2107 SHA256 ae6f34c4c586b160d58ea77faa674f1690061b0a6aedbff31005e7cf1af27602 SHA512 3b189415655b3ffcebedc77bdb241f4b26c993b5f28a3813dc9bfd1088159fc4b1301badb57d3eeb57de5b02ef17db2a09bf7238c1a99bd7adbfd3506cdd9927 WHIRLPOOL 1764f5b27ab5b4883d423de91d31ae0a774f6194c74e1eddcdc25334b3b7c6ac9760febe13886bc298f9c23e0733bd515b14e94736c8227fb54e268c8d27af12
+MISC ChangeLog 4024 SHA256 34814af15c0326e0550d05b318c80c92cb2d2c8cc1b73c351899496f6e93a9be SHA512 ec30c4d901539291f6283e2168bb568e5ffa2094a7d9b5943479e9fee4b25aff48249c9f89e2aa4c7c743ff30fe7be5b6c178a2296ec0ccfdc01b93b515dbaa3 WHIRLPOOL ff46e3a76f0ac408ae8f2d8dfb72a79933c17f8ddfc8c912f1539bd8bcfc5fd0ca0c2a2f070e2945e6b6be5bc075de736971ca2c61b63c18b4620624dcd0b503
+MISC ChangeLog-2015 18249 SHA256 8603fd4a2bb147a85bbc0d443ecb01237ca2607e5de8e3131f7677c5053dbf42 SHA512 2a33ff70bbb487004062b25f615229b2f36ccb8e906cac77cee864ac8b3d86451ad5f791019cdd1305256cff4e610497df25d9884e2b49ebe4484d5652073156 WHIRLPOOL 015ff7d5fb87a8cbbbb0917924801179c458aa83a77f8152ef3589a387b29a8e6cf9b447f3125384999df25880647d777862d114316495c15553c35b611a76da
+MISC metadata.xml 598 SHA256 424265a2612ef7988f5b18f295731dd2feb92837c2c7394017d888284fb4ea92 SHA512 a477ff729919625c910ef9a0b95ea85e683122383c4026c1c51f163d8faca06749ec05eef8b4f01ed9eede68b49e637f24f94202b8a00e67bb01bc21294610e6 WHIRLPOOL 57ae7f76ae9a062b54db43161bfbe74412ddcdda26fb6da0e82ebad02f593e4ec48e67608a80b45f9637692a5bfaeb8b63f2c6dba8d8cc418571c7a201ed2867
diff --git a/app-shells/dash/dash-0.5.8.2.ebuild b/app-shells/dash/dash-0.5.8.2.ebuild
new file mode 100644
index 000000000000..31bc5f3be813
--- /dev/null
+++ b/app-shells/dash/dash-0.5.8.2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="Debian Almquist Shell"
+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/dash-0.5.9.1-r1.ebuild b/app-shells/dash/dash-0.5.9.1-r1.ebuild
new file mode 100644
index 000000000000..d2edb4b7565e
--- /dev/null
+++ b/app-shells/dash/dash-0.5.9.1-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="Debian Almquist Shell"
+HOMEPAGE="http://gondor.apana.org.au/~herbert/dash/"
+SRC_URI="http://gondor.apana.org.au/~herbert/dash/files/${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 vanilla"
+
+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.8.1-eval-warnx.patch
+)
+
+src_prepare() {
+ if [[ -n "${DEB_PATCH}" ]] ; then
+ epatch "${WORKDIR}"/${DEB_PF}.diff
+ epatch */debian/diff/*
+ fi
+ epatch "${PATCHES[@]}"
+
+ #337329 #527848
+ use vanilla || epatch "${FILESDIR}"/${PN}-0.5.9.1-dumb-echo.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
+ if [[ -n "${DEB_PATCH}" ]] ; then
+ dodoc */debian/changelog
+ fi
+}
diff --git a/app-shells/dash/dash-0.5.9.1-r2.ebuild b/app-shells/dash/dash-0.5.9.1-r2.ebuild
new file mode 100644
index 000000000000..d775db54f946
--- /dev/null
+++ b/app-shells/dash/dash-0.5.9.1-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit 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="Debian Almquist Shell"
+HOMEPAGE="http://gondor.apana.org.au/~herbert/dash/"
+SRC_URI="http://gondor.apana.org.au/~herbert/dash/files/${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 ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="libedit static vanilla"
+
+RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ libedit? ( static? ( dev-libs/libedit[static-libs] ) )"
+
+src_prepare() {
+ if [[ -n "${DEB_PATCH}" ]] ; then
+ eapply "${WORKDIR}"/${DEB_PF}.diff
+ eapply */debian/diff/*
+ fi
+ default
+
+ #337329 #527848
+ use vanilla || eapply "${FILESDIR}"/${PN}-0.5.9.1-dumb-echo.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() {
+ # don't redefine stat on Solaris
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ export ac_cv_func_stat64=yes
+ fi
+ 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
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/bin
+ --enable-fnmatch
+ --disable-lineno
+ $(use_with libedit)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ if [[ -n "${DEB_PATCH}" ]] ; then
+ dodoc */debian/changelog
+ fi
+}
diff --git a/app-shells/dash/dash-0.5.9.1-r3.ebuild b/app-shells/dash/dash-0.5.9.1-r3.ebuild
new file mode 100644
index 000000000000..445e4265793b
--- /dev/null
+++ b/app-shells/dash/dash-0.5.9.1-r3.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit 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="Debian Almquist Shell"
+HOMEPAGE="http://gondor.apana.org.au/~herbert/dash/"
+SRC_URI="http://gondor.apana.org.au/~herbert/dash/files/${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 ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="libedit static vanilla"
+
+RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ libedit? ( static? ( dev-libs/libedit[static-libs] ) )"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.5.9.1-format-security.patch )
+
+src_prepare() {
+ if [[ -n "${DEB_PATCH}" ]] ; then
+ eapply "${WORKDIR}"/${DEB_PF}.diff
+ eapply */debian/diff/*
+ fi
+
+ #337329 #527848
+ use vanilla || eapply "${FILESDIR}"/${PN}-0.5.9.1-dumb-echo.patch
+
+ 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
+ fi
+ 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
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/bin
+ --enable-fnmatch
+ --disable-lineno
+ $(use_with libedit)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ if [[ -n "${DEB_PATCH}" ]] ; then
+ dodoc */debian/changelog
+ fi
+}
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..4059a80e3301
--- /dev/null
+++ b/app-shells/dash/files/dash-0.5.8.1-dumb-echo.patch
@@ -0,0 +1,105 @@
+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;
+ }
+--- a/src/dash.1
++++ b/src/dash.1
+@@ -1180,43 +1180,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.
diff --git a/app-shells/dash/files/dash-0.5.8.1-eval-warnx.patch b/app-shells/dash/files/dash-0.5.8.1-eval-warnx.patch
new file mode 100644
index 000000000000..51530bfdaf53
--- /dev/null
+++ b/app-shells/dash/files/dash-0.5.8.1-eval-warnx.patch
@@ -0,0 +1,12 @@
+fix one of the Debian patches -- it uses warnx but doesn't include err.h.
+
+--- a/src/eval.c
++++ b/src/eval.c
+@@ -36,6 +36,7 @@
+ #include <signal.h>
+ #include <unistd.h>
+ #include <sys/types.h>
++#include <err.h>
+
+ /*
+ * Evaluate a command.
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.
diff --git a/app-shells/dash/files/dash-0.5.9.1-dumb-echo.patch b/app-shells/dash/files/dash-0.5.9.1-dumb-echo.patch
new file mode 100644
index 000000000000..cbf5febafd19
--- /dev/null
+++ b/app-shells/dash/files/dash-0.5.9.1-dumb-echo.patch
@@ -0,0 +1,92 @@
+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.
+
+--- dash-0.5.9.1/src/bltin/printf.c
++++ dash-0.5.9.1/src/bltin/printf.c
+@@ -449,21 +449,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 (likely((nonl + !*argv) > 1))
+- 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;
+ }
+--- dash-0.5.9.1/src/dash.1
++++ dash-0.5.9.1/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
++No arguments or backslash sequences are supported as they are not portable.
++They will be printed out exactly as passed in.
+ .Pp
+-All other backslash sequences elicit undefined behaviour.
++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.
diff --git a/app-shells/dash/files/dash-0.5.9.1-format-security.patch b/app-shells/dash/files/dash-0.5.9.1-format-security.patch
new file mode 100644
index 000000000000..ea2114f392b3
--- /dev/null
+++ b/app-shells/dash/files/dash-0.5.9.1-format-security.patch
@@ -0,0 +1,13 @@
+Origin: https://bugzilla.redhat.com/show_bug.cgi?id=1037030#c2
+
+--- a/src/jobs.c
++++ a/src/jobs.c
+@@ -427,7 +427,7 @@ sprint_status(char *s, int status, int sigonly)
+ goto out;
+ #endif
+ }
+- col = fmtstr(s, 32, strsignal(st));
++ col = fmtstr(s, 32, "%s", strsignal(st));
+ #ifdef WCOREDUMP
+ if (WCOREDUMP(status)) {
+ col += fmtstr(s + col, 16, " (core dumped)");
diff --git a/app-shells/dash/metadata.xml b/app-shells/dash/metadata.xml
new file mode 100644
index 000000000000..0d01a34d50df
--- /dev/null
+++ b/app-shells/dash/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:dash:dash</remote-id>
+ </upstream>
+ <use>
+ <flag name="vanilla">Support echo -n, and enable echo -e all the time (unsupported)</flag>
+ </use>
+ <longdescription lang="en">
+ DASH is a direct descendant of the NetBSD version of ash (the Almquist SHell)
+ and is POSIX compliant.
+ </longdescription>
+</pkgmetadata>