1 |
commit: 5f0b322850dba9944fdb0f15b9e3e1587d38f929 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 28 08:07:17 2016 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 28 08:40:08 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f0b3228 |
7 |
|
8 |
app-shells/dash: Bump to version 0.5.9.1 |
9 |
|
10 |
Package-Manager: portage-2.3.1 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
app-shells/dash/Manifest | 1 + |
14 |
app-shells/dash/dash-0.5.9.1.ebuild | 72 +++++++++++++++++ |
15 |
app-shells/dash/files/dash-0.5.9.1-dumb-echo.patch | 92 ++++++++++++++++++++++ |
16 |
3 files changed, 165 insertions(+) |
17 |
|
18 |
diff --git a/app-shells/dash/Manifest b/app-shells/dash/Manifest |
19 |
index e43d900..b3907bf 100644 |
20 |
--- a/app-shells/dash/Manifest |
21 |
+++ b/app-shells/dash/Manifest |
22 |
@@ -1,3 +1,4 @@ |
23 |
DIST dash-0.5.8.tar.gz 223028 SHA256 c6db3a237747b02d20382a761397563d813b306c020ae28ce25a1c3915fac60f SHA512 3dc42d3503b33c50b62c0f9104c0e41c4e8fa7490ba72bc09213fcc894d6fd92b9688c58389acf8b538b08f8e9cc179f0bf5572e22175d1960f04554594237b8 WHIRLPOOL df79b1cf81cdbba0d7556175510d1f4d7294185c91a10cc0a8d4a9f940e2c26c681e377103b5f4e5291211b4555340433eae10144cb778d2d4e65e6ab54c98a3 |
24 |
+DIST dash-0.5.9.1.tar.gz 225217 SHA256 5ecd5bea72a93ed10eb15a1be9951dd51b52e5da1d4a7ae020efd9826b49e659 SHA512 d56a043b8fab4693d3f70cceb531c37174e7ded4acd5549e53048d7ce29125ff21d7e758f51a4a73e06250d051e246467039989275838c19a2579edea3f72b7d WHIRLPOOL 233ced314d1091a7a27fc9a0f86a3d87f9a08d067a8b171ead7294a12b573071e9d63a5607424eb6d4f7a0c193f374a461cd94b205412928b93341d4b75a9095 |
25 |
DIST dash-0.5.9.tar.gz 224831 SHA256 92793b14c017d79297001556389442aeb9e3c1cc559fd178c979169b1a47629c SHA512 91d4cc69dae8bc73f8da4f771d993f91b041f19637a6dfec9b9acfd8c97d2d819fb445f9ba608f0e7e5df431a934be3b29a93dde7cc3d6400d06e7d7b40dc15f WHIRLPOOL aafe991df7b966bfa16e229c5e9c1891a37f8bb25603b8a87060a0f3b657525026d33250249e159f5a173898ca471f894dd268fed9b458fd1ddf5b989d143da4 |
26 |
DIST dash_0.5.8-2.diff.gz 41715 SHA256 00168a934864c26cae9a51367fe7ea013ece2d4844ff8bd6893fc00a8fa7b38c SHA512 f067ca162cc463a60b5bcd7926bd6ab1f6cb1757e9cd7894cbf7ba5849b6d9af5381b8ec7264c503db544242690db067b6c034041e262ff93d237f1c06e50e56 WHIRLPOOL 1c904df104c6026d3ec53843fb67563d88dd8a4babb779b369ccd037e1774d722a85ad92c184d713cd7a440be4885c7e739da17f038fcf88545afc527ddabb3f |
27 |
|
28 |
diff --git a/app-shells/dash/dash-0.5.9.1.ebuild b/app-shells/dash/dash-0.5.9.1.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000..39d1f83 |
31 |
--- /dev/null |
32 |
+++ b/app-shells/dash/dash-0.5.9.1.ebuild |
33 |
@@ -0,0 +1,72 @@ |
34 |
+# Copyright 1999-2016 Gentoo Foundation |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+# $Id$ |
37 |
+ |
38 |
+EAPI=5 |
39 |
+ |
40 |
+inherit eutils flag-o-matic toolchain-funcs versionator |
41 |
+ |
42 |
+#MY_PV="$(get_version_component_range 1-3)" |
43 |
+DEB_PATCH="" #$(get_version_component_range 4) |
44 |
+#MY_P="${PN}-${MY_PV}" |
45 |
+ |
46 |
+DESCRIPTION="DASH is a direct descendant of the NetBSD version of ash (the Almquist SHell) and is POSIX compliant" |
47 |
+HOMEPAGE="http://gondor.apana.org.au/~herbert/dash/" |
48 |
+SRC_URI="http://gondor.apana.org.au/~herbert/dash/files/${P}.tar.gz" |
49 |
+if [[ -n "${DEB_PATCH}" ]] ; then |
50 |
+ DEB_PF="${PN}_${MY_PV}-${DEB_PATCH}" |
51 |
+ SRC_URI+=" mirror://debian/pool/main/d/dash/${DEB_PF}.diff.gz" |
52 |
+fi |
53 |
+ |
54 |
+LICENSE="BSD" |
55 |
+SLOT="0" |
56 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
57 |
+IUSE="libedit static" |
58 |
+ |
59 |
+RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )" |
60 |
+DEPEND="${RDEPEND} |
61 |
+ virtual/pkgconfig |
62 |
+ libedit? ( static? ( dev-libs/libedit[static-libs] ) )" |
63 |
+ |
64 |
+#S=${WORKDIR}/${MY_P} |
65 |
+ |
66 |
+PATCHES=( |
67 |
+ "${FILESDIR}"/${PN}-0.5.9.1-dumb-echo.patch #337329 #527848 |
68 |
+ "${FILESDIR}"/${PN}-0.5.8.1-eval-warnx.patch |
69 |
+) |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ if [[ -n "${DEB_PATCH}" ]] ; then |
73 |
+ epatch "${WORKDIR}"/${DEB_PF}.diff |
74 |
+ epatch */debian/diff/* |
75 |
+ fi |
76 |
+ epatch "${PATCHES[@]}" |
77 |
+ |
78 |
+ # Fix the invalid sort |
79 |
+ sed -i -e 's/LC_COLLATE=C/LC_ALL=C/g' src/mkbuiltins |
80 |
+ |
81 |
+ # Use pkg-config for libedit linkage |
82 |
+ sed -i \ |
83 |
+ -e "/LIBS/s:-ledit:\`$(tc-getPKG_CONFIG) --libs libedit $(usex static --static '')\`:" \ |
84 |
+ configure || die |
85 |
+} |
86 |
+ |
87 |
+src_configure() { |
88 |
+ append-cppflags -DJOBS=$(usex libedit 1 0) |
89 |
+ use static && append-ldflags -static |
90 |
+ # Do not pass --enable-glob due to #443552. |
91 |
+ # Autotools use $LINENO as a proxy for extended debug support |
92 |
+ # (i.e. they're running bash), so disable that. #527644 |
93 |
+ econf \ |
94 |
+ --bindir="${EPREFIX}"/bin \ |
95 |
+ --enable-fnmatch \ |
96 |
+ --disable-lineno \ |
97 |
+ $(use_with libedit) |
98 |
+} |
99 |
+ |
100 |
+src_install() { |
101 |
+ default |
102 |
+ if [[ -n "${DEB_PATCH}" ]] ; then |
103 |
+ dodoc */debian/changelog |
104 |
+ fi |
105 |
+} |
106 |
|
107 |
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 |
108 |
new file mode 100644 |
109 |
index 00000000..cbf5feb |
110 |
--- /dev/null |
111 |
+++ b/app-shells/dash/files/dash-0.5.9.1-dumb-echo.patch |
112 |
@@ -0,0 +1,92 @@ |
113 |
+http://bugs.gentoo.org/337329 |
114 |
+http://bugs.gentoo.org/527848 |
115 |
+ |
116 |
+there's no requirement for `echo` to support escape sequences. bash, by default, |
117 |
+does not, while dash always does. POSIX permits either behavior: |
118 |
+http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html |
119 |
+ |
120 |
+however, since the behavior is not portable, no one should be relying on echo |
121 |
+having any specific behavior. they should use `printf` when they want an escape |
122 |
+sequence. it also makes dash smaller & faster to disable this logic entirely. |
123 |
+ |
124 |
+--- dash-0.5.9.1/src/bltin/printf.c |
125 |
++++ dash-0.5.9.1/src/bltin/printf.c |
126 |
+@@ -449,21 +449,12 @@ |
127 |
+ int |
128 |
+ echocmd(int argc, char **argv) |
129 |
+ { |
130 |
+- int nonl; |
131 |
+- |
132 |
+- nonl = *++argv ? equal(*argv, "-n") : 0; |
133 |
+- argv += nonl; |
134 |
+- |
135 |
+- do { |
136 |
+- int c; |
137 |
+- |
138 |
+- if (likely(*argv)) |
139 |
+- nonl += print_escape_str("%s", NULL, NULL, *argv++); |
140 |
+- if (likely((nonl + !*argv) > 1)) |
141 |
+- break; |
142 |
+- |
143 |
+- c = *argv ? ' ' : '\n'; |
144 |
+- out1c(c); |
145 |
+- } while (*argv); |
146 |
++ int i; |
147 |
++ for (i = 1; i < argc; ++i) { |
148 |
++ outstr(argv[i], out1); |
149 |
++ if (i < argc - 1) |
150 |
++ outc(' ', out1); |
151 |
++ } |
152 |
++ outc('\n', out1); |
153 |
+ return 0; |
154 |
+ } |
155 |
+--- dash-0.5.9.1/src/dash.1 |
156 |
++++ dash-0.5.9.1/src/dash.1 |
157 |
+@@ -1182,43 +1182,15 @@ |
158 |
+ option turns off the effect of any preceding |
159 |
+ .Fl P |
160 |
+ options. |
161 |
+-.It Xo echo Op Fl n |
162 |
++.It Xo echo |
163 |
+ .Ar args... |
164 |
+ .Xc |
165 |
+ Print the arguments on the standard output, separated by spaces. |
166 |
+-Unless the |
167 |
+-.Fl n |
168 |
+-option is present, a newline is output following the arguments. |
169 |
+ .Pp |
170 |
+-If any of the following sequences of characters is encountered during |
171 |
+-output, the sequence is not output. Instead, the specified action is |
172 |
+-performed: |
173 |
+-.Bl -tag -width indent |
174 |
+-.It Li \eb |
175 |
+-A backspace character is output. |
176 |
+-.It Li \ec |
177 |
+-Subsequent output is suppressed. This is normally used at the end of the |
178 |
+-last argument to suppress the trailing newline that |
179 |
+-.Ic echo |
180 |
+-would otherwise output. |
181 |
+-.It Li \ef |
182 |
+-Output a form feed. |
183 |
+-.It Li \en |
184 |
+-Output a newline character. |
185 |
+-.It Li \er |
186 |
+-Output a carriage return. |
187 |
+-.It Li \et |
188 |
+-Output a (horizontal) tab character. |
189 |
+-.It Li \ev |
190 |
+-Output a vertical tab. |
191 |
+-.It Li \e0 Ns Ar digits |
192 |
+-Output the character whose value is given by zero to three octal digits. |
193 |
+-If there are zero digits, a nul character is output. |
194 |
+-.It Li \e\e |
195 |
+-Output a backslash. |
196 |
+-.El |
197 |
++No arguments or backslash sequences are supported as they are not portable. |
198 |
++They will be printed out exactly as passed in. |
199 |
+ .Pp |
200 |
+-All other backslash sequences elicit undefined behaviour. |
201 |
++You can replace `echo -n ...` with the portable `printf %s ...` construct. |
202 |
+ .It eval Ar string ... |
203 |
+ Concatenate all the arguments with spaces. |
204 |
+ Then re-parse and execute the command. |