diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2018-05-08 13:32:35 +0200 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2018-05-08 13:32:35 +0200 |
commit | 1b59f6f5286ba1a1bf45b5d7bbafb16bb35ef2d9 (patch) | |
tree | 41f1281c9655f3c9717fc8b17d6c38474d28d8d2 /app-shells/dash | |
parent | app-text/dvipng: Use acinclude.m4 to save local macros. (diff) | |
download | gentoo-1b59f6f5286ba1a1bf45b5d7bbafb16bb35ef2d9.tar.gz gentoo-1b59f6f5286ba1a1bf45b5d7bbafb16bb35ef2d9.tar.bz2 gentoo-1b59f6f5286ba1a1bf45b5d7bbafb16bb35ef2d9.zip |
app-shells/dash: Bump to version 0.5.10
Package-Manager: Portage-2.3.36, Repoman-2.3.9
Diffstat (limited to 'app-shells/dash')
-rw-r--r-- | app-shells/dash/Manifest | 1 | ||||
-rw-r--r-- | app-shells/dash/dash-0.5.10.ebuild | 76 | ||||
-rw-r--r-- | app-shells/dash/files/dash-0.5.10-dumb-echo.patch | 92 |
3 files changed, 169 insertions, 0 deletions
diff --git a/app-shells/dash/Manifest b/app-shells/dash/Manifest index 2fe1a5ea3ef3..770bc40b76ef 100644 --- a/app-shells/dash/Manifest +++ b/app-shells/dash/Manifest @@ -1,3 +1,4 @@ +DIST dash-0.5.10.tar.gz 225242 BLAKE2B c21b04aea58599c4a487ec7325bc1ffac2fb4b9be911e07cb0da3fd62eb15b5eb8d30857fad6cbc01fa36a948ac5e5e226566b42d4f9507f709e4d6636cf84f6 SHA512 47383284faf2cbdf65471b72196bdcea46efb8b01041fdc7685a811ae125ba77e5af653939255bda20bd3d56a13f838d85e0003549dcede6b75a37625816cb30 DIST dash-0.5.8.tar.gz 223028 BLAKE2B f1db15fc23e089c2f2efe1c86e3f027c454b02d31528527040b51f28f22ba969ac35c2b88430e44c5f822c2607bdb5a35ec3d6b026dd32afcce2c0444eda31d2 SHA512 3dc42d3503b33c50b62c0f9104c0e41c4e8fa7490ba72bc09213fcc894d6fd92b9688c58389acf8b538b08f8e9cc179f0bf5572e22175d1960f04554594237b8 DIST dash-0.5.9.1.tar.gz 225217 BLAKE2B a80aa00ea5418d00b03c9ded21ef5c3a28d599059d1ac2f20082867b71ece6afac2f0bce9bc09946450c7618ad2c7f95df63b3d519a7f56552a291d09e44a71b SHA512 d56a043b8fab4693d3f70cceb531c37174e7ded4acd5549e53048d7ce29125ff21d7e758f51a4a73e06250d051e246467039989275838c19a2579edea3f72b7d DIST dash_0.5.8-2.diff.gz 41715 BLAKE2B d396eab85bd86b18cc532da192c8034da990e9e4a822840635042e2810e32164502ec44c9a1b4f52701e9bc2acd1859a446a36383805527121dd1ef2e14c8010 SHA512 f067ca162cc463a60b5bcd7926bd6ab1f6cb1757e9cd7894cbf7ba5849b6d9af5381b8ec7264c503db544242690db067b6c034041e262ff93d237f1c06e50e56 diff --git a/app-shells/dash/dash-0.5.10.ebuild b/app-shells/dash/dash-0.5.10.ebuild new file mode 100644 index 000000000000..72821681d9b7 --- /dev/null +++ b/app-shells/dash/dash-0.5.10.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2018 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.10-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.10-dumb-echo.patch b/app-shells/dash/files/dash-0.5.10-dumb-echo.patch new file mode 100644 index 000000000000..6b19b5b59f70 --- /dev/null +++ b/app-shells/dash/files/dash-0.5.10-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.10/src/bltin/printf.c ++++ dash-0.5.10/src/bltin/printf.c +@@ -457,22 +457,13 @@ + int + echocmd(int argc, char **argv) + { +- const char *lastfmt = snlfmt; +- int nonl; ++ int i; + +- if (*++argv && equal(*argv, "-n")) { +- argv++; +- lastfmt = "%s"; ++ for (i = 1; i < argc; ++i) { ++ outstr(argv[i], out1); ++ if (1 < argc - 1) ++ outc(' ', out1); + } +- +- do { +- const char *fmt = "%s "; +- char *s = *argv; +- +- if (!s || !*++argv) +- fmt = lastfmt; +- +- nonl = print_escape_str(fmt, NULL, NULL, s ?: nullstr); +- } while (!nonl && *argv); ++ outc('\n', out1); + return 0; + } +--- dash-0.5.10/src/dash.1 ++++ dash-0.5.10/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. |