summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-10-08 10:25:03 +0000
committerRoy Marples <uberlord@gentoo.org>2007-10-08 10:25:03 +0000
commite2635280fce367a8aefc00c1d2770f10810458d5 (patch)
tree24d78be4977f6a357ce3cf306010371735c16078 /app-shells
parentStable on ppc64 (diff)
downloadhistorical-e2635280fce367a8aefc00c1d2770f10810458d5.tar.gz
historical-e2635280fce367a8aefc00c1d2770f10810458d5.tar.bz2
historical-e2635280fce367a8aefc00c1d2770f10810458d5.zip
Fully support POSIX arithmetic
Package-Manager: portage-2.1.3.11
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/dash/ChangeLog8
-rw-r--r--app-shells/dash/Manifest19
-rw-r--r--app-shells/dash/dash-0.5.4.1-r1.ebuild70
-rw-r--r--app-shells/dash/files/dash-0.5.4-posix-arith.patch420
-rw-r--r--app-shells/dash/files/digest-dash-0.5.4.1-r16
5 files changed, 518 insertions, 5 deletions
diff --git a/app-shells/dash/ChangeLog b/app-shells/dash/ChangeLog
index 57d127b980db..36686fe5682f 100644
--- a/app-shells/dash/ChangeLog
+++ b/app-shells/dash/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-shells/dash
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/dash/ChangeLog,v 1.45 2007/08/13 12:32:26 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/dash/ChangeLog,v 1.46 2007/10/08 10:25:03 uberlord Exp $
+
+*dash-0.5.4.1-r1 (08 Oct 2007)
+
+ 08 Oct 2007; Roy Marples <uberlord@gentoo.org>
+ +files/dash-0.5.4-posix-arith.patch, +dash-0.5.4.1-r1.ebuild:
+ Fully support POSIX arithmetic
*dash-0.5.4.1 (13 Aug 2007)
diff --git a/app-shells/dash/Manifest b/app-shells/dash/Manifest
index cd1f88a45fa2..f2ba90bf5a5c 100644
--- a/app-shells/dash/Manifest
+++ b/app-shells/dash/Manifest
@@ -10,6 +10,10 @@ AUX dash-0.5.3.3-non-matching-charclass.patch 319 RMD160 69b2be07621d1afd6d1f4a4
MD5 cd2d7a116c5f98acc393655313913271 files/dash-0.5.3.3-non-matching-charclass.patch 319
RMD160 69b2be07621d1afd6d1f4a4aa3afa59dff6c3961 files/dash-0.5.3.3-non-matching-charclass.patch 319
SHA256 93e8d1bed9edfc6d990ff2883ff1099dcbe6fc5b18931f9a80035733709469df files/dash-0.5.3.3-non-matching-charclass.patch 319
+AUX dash-0.5.4-posix-arith.patch 9130 RMD160 b45ca258971656c5a26e8b78a17075cb58ac902a SHA1 d9a0ad0346c6c3c0fcbb4df1241562e873d2a991 SHA256 cb79b8ab370772bc1b30de6f93a87dfea9435a65cf0df2720e82f6a98153ef88
+MD5 c8ec162e591b7af310f82adbb95556cc files/dash-0.5.4-posix-arith.patch 9130
+RMD160 b45ca258971656c5a26e8b78a17075cb58ac902a files/dash-0.5.4-posix-arith.patch 9130
+SHA256 cb79b8ab370772bc1b30de6f93a87dfea9435a65cf0df2720e82f6a98153ef88 files/dash-0.5.4-posix-arith.patch 9130
DIST dash-0.5.3.tar.gz 207201 RMD160 fd445535708868fe206852320eece58c3c2bbbaf SHA1 4707b147d5d727712a87e754d1010e7ee25c514d SHA256 82aab2ff63e5fac4bff35c91222f735ec67551db86b5c3b3455ecc10e8889e53
DIST dash-0.5.4.tar.gz 212145 RMD160 322fc2fffc5fddf4223d39c57eaeb9b4222303fa SHA1 f6dc33364e42e73e39fb1193845c02e031b817bb SHA256 a9dc8f0237f632dd2c1bfeff80b1052e75fafaef0d767e3beab0bd8becced623
DIST dash_0.5.2-7.diff.gz 21640 RMD160 442496fe93010412812e5a55ffd09b7a4f06f0ef SHA1 beba7b2f2f94f570a1863c5e9ffca22c8f723d25 SHA256 2c1e29379c9c123ce18bd64132e78ec276cac4869b6030d101298e71605a7209
@@ -52,14 +56,18 @@ EBUILD dash-0.5.3.8.ebuild 1693 RMD160 838900954029fb8d9d21eb2896dd2054faa805e4
MD5 80765ee1d0fd9044baa51008804dd0b3 dash-0.5.3.8.ebuild 1693
RMD160 838900954029fb8d9d21eb2896dd2054faa805e4 dash-0.5.3.8.ebuild 1693
SHA256 2520901e3e4a12f0283847a42030393a4dbc731ca6bc555779eb03ce552cd7d3 dash-0.5.3.8.ebuild 1693
+EBUILD dash-0.5.4.1-r1.ebuild 1911 RMD160 26bed26fcf4e17717fcb568a937c37976bfa730a SHA1 84ca1ad1dc3be8d9bd5139b7869bd571cd8d6693 SHA256 4e04d686b425d2003bc047df0bc5457d300a8ccebfe5c203ac6f848323b4c5cd
+MD5 064eaf97997216a3f6e3b9bf20360925 dash-0.5.4.1-r1.ebuild 1911
+RMD160 26bed26fcf4e17717fcb568a937c37976bfa730a dash-0.5.4.1-r1.ebuild 1911
+SHA256 4e04d686b425d2003bc047df0bc5457d300a8ccebfe5c203ac6f848323b4c5cd dash-0.5.4.1-r1.ebuild 1911
EBUILD dash-0.5.4.1.ebuild 1817 RMD160 09c3736ac5980601346f56ed64cf3fc23ea4c206 SHA1 17d1d1d1f29c8bbe6afe18c002d067a9563a945c SHA256 5450d513441973af0185809020148fa54d10f39ab011d9c424d47ff2d50ba3ac
MD5 110c486aa314518e3ca82788d48ad65f dash-0.5.4.1.ebuild 1817
RMD160 09c3736ac5980601346f56ed64cf3fc23ea4c206 dash-0.5.4.1.ebuild 1817
SHA256 5450d513441973af0185809020148fa54d10f39ab011d9c424d47ff2d50ba3ac dash-0.5.4.1.ebuild 1817
-MISC ChangeLog 6594 RMD160 1b86ff846bfc54a62821b5f6edb89b8cae50b3b7 SHA1 06793e770223994d1b16f61b6e17f4109be4ceae SHA256 9151b26a0637975ce0c042b736c52cbdc57e7fd7944c83b86f05844066e6f4c0
-MD5 5c0c816888a879387fbb241697218cb0 ChangeLog 6594
-RMD160 1b86ff846bfc54a62821b5f6edb89b8cae50b3b7 ChangeLog 6594
-SHA256 9151b26a0637975ce0c042b736c52cbdc57e7fd7944c83b86f05844066e6f4c0 ChangeLog 6594
+MISC ChangeLog 6773 RMD160 460cfe2f22f3c6be1a1d00c4b455cf0ce07fc1ad SHA1 605bc0de27444c65079a3fb052f357d04ddf8e2f SHA256 36c1a8dc0335b86294b022e008b6d691187529bf5972c5223321691e8a92618e
+MD5 7d21942ab4e0f99603b76ccbc21585a9 ChangeLog 6773
+RMD160 460cfe2f22f3c6be1a1d00c4b455cf0ce07fc1ad ChangeLog 6773
+SHA256 36c1a8dc0335b86294b022e008b6d691187529bf5972c5223321691e8a92618e ChangeLog 6773
MISC metadata.xml 258 RMD160 e7b127d711ee0b16caa139b012afebf6f7de5678 SHA1 217134894bc43bed379c823c1abaa6d3f3d7adcc SHA256 ea9f5f0425c3cefc3f50cf2a2792634bf47b9a373948f04c524d0407f6e8d1d6
MD5 50ddf6de7cdf5ef045d0189c47e4e452 metadata.xml 258
RMD160 e7b127d711ee0b16caa139b012afebf6f7de5678 metadata.xml 258
@@ -91,3 +99,6 @@ SHA256 58a60dc19570313f9aa1af7bda80b177b0caf97ecf4a8fe3d3053d1413e3dce3 files/di
MD5 5c4d6e6415be734e6f9f0682f4d9de17 files/digest-dash-0.5.4.1 470
RMD160 b0ef32c8dff676e07df68e5325bb1baebcb6927e files/digest-dash-0.5.4.1 470
SHA256 bf509cd4bc36aadc510110dd0de43daa00365a6f287a178ea7db889ee5ce2130 files/digest-dash-0.5.4.1 470
+MD5 5c4d6e6415be734e6f9f0682f4d9de17 files/digest-dash-0.5.4.1-r1 470
+RMD160 b0ef32c8dff676e07df68e5325bb1baebcb6927e files/digest-dash-0.5.4.1-r1 470
+SHA256 bf509cd4bc36aadc510110dd0de43daa00365a6f287a178ea7db889ee5ce2130 files/digest-dash-0.5.4.1-r1 470
diff --git a/app-shells/dash/dash-0.5.4.1-r1.ebuild b/app-shells/dash/dash-0.5.4.1-r1.ebuild
new file mode 100644
index 000000000000..43c33229c1a0
--- /dev/null
+++ b/app-shells/dash/dash-0.5.4.1-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-shells/dash/dash-0.5.4.1-r1.ebuild,v 1.1 2007/10/08 10:25:03 uberlord Exp $
+
+inherit autotools 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 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~x86"
+IUSE="libedit static"
+
+DEPEND="libedit? ( dev-libs/libedit )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${WORKDIR}/${DEB_PF}".diff
+
+ cd "${S}"
+ epatch debian/diff/*
+
+ # Fix reading of long lines
+ epatch "${FILESDIR}/${PN}"-0.5.3-read-length.patch
+
+ # Support posix arithmetic expansion
+ epatch "${FILESDIR}/${PN}"-0.5.4-posix-arith.patch
+
+ # Fix the invalid sort
+ sed -i -e 's/LC_COLLATE=C/LC_ALL=C/g' src/mkbuiltins
+
+ # Always statically link libedit in to ensure we always boot if it changes
+ # which it has done in the past.
+ local s="s/-ledit/-Wl,-Bstatic -ledit -Wl,-Bdynamic -lcurses/g"
+ use static && s="s/-ledit/-ledit -lcurses/g"
+ sed -i -e "${s}" configure.ac || die "Failed to sed configure.ac"
+
+ # May as well, as the debian patches force this anyway
+ eautoreconf
+}
+
+src_compile() {
+ local myconf=
+
+ use static && append-ldflags -static
+ use libedit && myconf="${myconf} --with-libedit"
+ export CC="$(tc-getCC)"
+
+ econf ${myconf} || die "econf failed"
+ emake CFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ exeinto /bin
+ newexe src/dash dash
+ newman src/dash.1 dash.1
+ dodoc COPYING ChangeLog
+}
diff --git a/app-shells/dash/files/dash-0.5.4-posix-arith.patch b/app-shells/dash/files/dash-0.5.4-posix-arith.patch
new file mode 100644
index 000000000000..9665c4ac19d4
--- /dev/null
+++ b/app-shells/dash/files/dash-0.5.4-posix-arith.patch
@@ -0,0 +1,420 @@
+diff -ur a/src/arith.y b/src/arith.y
+--- a/src/arith.y 2007-07-13 09:26:42.000000000 +0100
++++ b/src/arith.y 2007-10-08 11:04:29.000000000 +0100
+@@ -34,14 +34,19 @@
+ */
+
+ #include <stdlib.h>
+-#include "expand.h"
++#include <stdio.h>
+ #include "shell.h"
++#include "arith.h"
++#include "expand.h"
+ #include "error.h"
+ #include "output.h"
+ #include "memalloc.h"
++#include "var.h"
+
+ const char *arith_buf, *arith_startbuf;
+
++static int arith_assign(char *, arith_t);
++
+ #ifndef YYBISON
+ int yyparse(void);
+ #endif
+@@ -52,8 +57,18 @@
+ #endif
+
+ %}
+-%token ARITH_NUM ARITH_LPAREN ARITH_RPAREN
+-
++%union {
++ arith_t l_value;
++ char* s_value;
++}
++%token <l_value> ARITH_NUM ARITH_LPAREN ARITH_RPAREN
++%token <s_value> ARITH_VAR
++%type <l_value> expr
++%right ARITH_ASSIGN
++%right ARITH_ADDASSIGN ARITH_SUBASSIGN
++%right ARITH_MULASSIGN ARITH_DIVASSIGN ARITH_REMASSIGN
++%right ARITH_RSHASSIGN ARITH_LSHASSIGN
++%right ARITH_BANDASSIGN ARITH_BXORASSIGN ARITH_BORASSIGN
+ %left ARITH_OR
+ %left ARITH_AND
+ %left ARITH_BOR
+@@ -105,8 +120,118 @@
+ | ARITH_SUB expr %prec ARITH_UNARYMINUS { $$ = -($2); }
+ | ARITH_ADD expr %prec ARITH_UNARYPLUS { $$ = $2; }
+ | ARITH_NUM
+- ;
++ | ARITH_VAR {
++ char *p;
++ arith_t arith_val;
++ char *str_val;
++ if (lookupvar($1) == NULL)
++ setvarsafe($1, "0", 0);
++ str_val = lookupvar($1);
++ arith_val = strtoarith_t(str_val, &p, 0);
++ /*
++ * Conversion is successful only in case
++ * we've converted _all_ characters.
++ */
++ if (*p != '\0')
++ yyerror("variable conversion error");
++ $$ = arith_val;
++ }
++ | ARITH_VAR ARITH_ASSIGN expr {
++ if (arith_assign($1, $3) != 0)
++ yyerror("variable assignment error");
++ $$ = $3;
++ }
++ | ARITH_VAR ARITH_ADDASSIGN expr {
++ arith_t value;
++ value = atoarith_t(lookupvar($1)) + $3;
++ if (arith_assign($1, value) != 0)
++ yyerror("variable assignment error");
++ $$ = value;
++ }
++ | ARITH_VAR ARITH_SUBASSIGN expr {
++ arith_t value;
++ value = atoarith_t(lookupvar($1)) - $3;
++ if (arith_assign($1, value) != 0)
++ yyerror("variable assignment error");
++ $$ = value;
++ }
++ | ARITH_VAR ARITH_MULASSIGN expr {
++ arith_t value;
++ value = atoarith_t(lookupvar($1)) * $3;
++ if (arith_assign($1, value) != 0)
++ yyerror("variable assignment error");
++ $$ = value;
++ }
++ | ARITH_VAR ARITH_DIVASSIGN expr {
++ arith_t value;
++ if ($3 == 0)
++ yyerror("division by zero");
++ value = atoarith_t(lookupvar($1)) / $3;
++ if (arith_assign($1, value) != 0)
++ yyerror("variable assignment error");
++ $$ = value;
++ }
++ | ARITH_VAR ARITH_REMASSIGN expr {
++ arith_t value;
++ if ($3 == 0)
++ yyerror("division by zero");
++ value = atoarith_t(lookupvar($1)) % $3;
++ if (arith_assign($1, value) != 0)
++ yyerror("variable assignment error");
++ $$ = value;
++ }
++ | ARITH_VAR ARITH_RSHASSIGN expr {
++ arith_t value;
++ value = atoarith_t(lookupvar($1)) >> $3;
++ if (arith_assign($1, value) != 0)
++ yyerror("variable assignment error");
++ $$ = value;
++ }
++ | ARITH_VAR ARITH_LSHASSIGN expr {
++ arith_t value;
++ value = atoarith_t(lookupvar($1)) << $3;
++ if (arith_assign($1, value) != 0)
++ yyerror("variable assignment error");
++ $$ = value;
++ }
++ | ARITH_VAR ARITH_BANDASSIGN expr {
++ arith_t value;
++ value = atoarith_t(lookupvar($1)) & $3;
++ if (arith_assign($1, value) != 0)
++ yyerror("variable assignment error");
++ $$ = value;
++ }
++ | ARITH_VAR ARITH_BXORASSIGN expr {
++ arith_t value;
++ value = atoarith_t(lookupvar($1)) ^ $3;
++ if (arith_assign($1, value) != 0)
++ yyerror("variable assignment error");
++ $$ = value;
++ }
++ | ARITH_VAR ARITH_BORASSIGN expr {
++ arith_t value;
++ value = atoarith_t(lookupvar($1)) | $3;
++ if (arith_assign($1, value) != 0)
++ yyerror("variable assignment error");
++ $$ = value;
++ }
++;
+ %%
++
++#define lstrlen(var) (3 + (2 + CHAR_BIT * sizeof((var))) / 3)
++
++static int
++arith_assign(char *name, arith_t value) {
++ char *str;
++ int ret;
++
++ str = (char *)ckmalloc(lstrlen(value));
++ sprintf(str, ARITH_FORMAT_STR, value);
++ ret = setvarsafe(name, str, 0);
++ free(str);
++ return ret;
++}
++
+ int
+ arith(s)
+ const char *s;
+diff -ur a/src/arith_yylex.c b/src/arith_yylex.c
+--- a/src/arith_yylex.c 2007-07-13 09:26:42.000000000 +0100
++++ b/src/arith_yylex.c 2007-10-08 11:10:44.000000000 +0100
+@@ -32,12 +32,16 @@
+ * SUCH DAMAGE.
+ */
+
++#include <ctype.h>
+ #include <stdlib.h>
++#include <string.h>
++#include "shell.h"
+ #include "arith.h"
+ #include "expand.h"
+ #include "error.h"
++#include "memalloc.h"
++#include "var.h"
+
+-extern int yylval;
+ extern const char *arith_buf, *arith_startbuf;
+
+ int
+@@ -45,6 +49,9 @@
+ {
+ int value;
+ const char *buf = arith_buf;
++ char *temp;
++ char *var;
++ char save;
+
+ for (;;) {
+ switch (*buf) {
+@@ -54,10 +61,16 @@
+ buf++;
+ continue;
+ default:
+-err:
+ sh_error("arith: syntax error: \"%s\"", arith_startbuf);
+ /* NOTREACHED */
+ case '0':
++ if (*++buf == 'x')
++ yylval.l_value = strtoll(buf+1, (char **)&arith_buf, 16);
++ else
++ yylval.l_value = strtoll(buf+1, (char **)&arith_buf, 8);
++ if (isalnum(*arith_buf) || *arith_buf == '_')
++ sh_error("arith: value does not fit base: \"%s\"", arith_buf);
++ return ARITH_NUM;
+ case '1':
+ case '2':
+ case '3':
+@@ -67,11 +80,79 @@
+ case '7':
+ case '8':
+ case '9':
+- yylval = strtoll(buf, (char **) &arith_buf, 0);
++ yylval.l_value = strtoll(buf, (char **)&arith_buf, 10);
++ if (isalnum(*arith_buf) || *arith_buf == '_')
++ sh_error("arith: value does not fit base: \"%s\"", arith_buf);
+ return ARITH_NUM;
++ case 'A':
++ case 'B':
++ case 'C':
++ case 'D':
++ case 'E':
++ case 'F':
++ case 'G':
++ case 'H':
++ case 'I':
++ case 'J':
++ case 'K':
++ case 'L':
++ case 'M':
++ case 'N':
++ case 'O':
++ case 'P':
++ case 'Q':
++ case 'R':
++ case 'S':
++ case 'T':
++ case 'U':
++ case 'V':
++ case 'W':
++ case 'X':
++ case 'Y':
++ case 'Z':
++ case 'a':
++ case 'b':
++ case 'c':
++ case 'd':
++ case 'e':
++ case 'f':
++ case 'g':
++ case 'h':
++ case 'i':
++ case 'j':
++ case 'k':
++ case 'l':
++ case 'm':
++ case 'n':
++ case 'o':
++ case 'p':
++ case 'q':
++ case 'r':
++ case 's':
++ case 't':
++ case 'u':
++ case 'v':
++ case 'w':
++ case 'x':
++ case 'y':
++ case 'z':
++ temp = (char *)buf;
++ while ((*temp &&
++ (isalnum(*temp) || *temp == '_')))
++ temp++;
++ save = *temp;
++ *temp = '\0';
++ if (lookupvar(buf) == NULL)
++ setvarsafe(buf, "0", 0);
++ var = (char *)ckmalloc(strlen(buf) + 1);
++ yylval.s_value = strcpy(var, buf);
++ *temp = save;
++ arith_buf = temp;
++ return ARITH_VAR;
+ case '=':
+ if (*++buf != '=') {
+- goto err;
++ value = ARITH_ASSIGN;
++ goto out;
+ }
+ value = ARITH_EQ;
+ break;
+@@ -94,7 +175,11 @@
+ value = ARITH_LE;
+ break;
+ case '<':
+- value = ARITH_LSHIFT;
++ if (*++buf != '=') {
++ value = ARITH_LSHIFT;
++ goto out;
++ }
++ value = ARITH_LSHASSIGN;
+ break;
+ default:
+ value = ARITH_LT;
+@@ -102,19 +187,29 @@
+ }
+ break;
+ case '|':
+- if (*++buf != '|') {
++ switch (*++buf) {
++ case '|':
+ value = ARITH_BOR;
++ break;
++ case '=':
++ value = ARITH_BORASSIGN;
++ break;
++ default:
++ value = ARITH_OR;
+ goto out;
+ }
+- value = ARITH_OR;
+- break;
+ case '&':
+- if (*++buf != '&') {
++ switch (*++buf) {
++ case '&':
++ value = ARITH_AND;
++ break;
++ case '=':
++ value = ARITH_BANDASSIGN;
++ break;
++ default:
+ value = ARITH_BAND;
+ goto out;
+ }
+- value = ARITH_AND;
+- break;
+ case '!':
+ if (*++buf != '=') {
+ value = ARITH_NOT;
+@@ -132,25 +227,49 @@
+ value = ARITH_RPAREN;
+ break;
+ case '*':
+- value = ARITH_MUL;
++ if (*++buf != '=') {
++ value = ARITH_MUL;
++ goto out;
++ }
++ value = ARITH_MULASSIGN;
+ break;
+ case '/':
+- value = ARITH_DIV;
++ if (*++buf != '=') {
++ value = ARITH_DIV;
++ goto out;
++ }
++ value = ARITH_DIVASSIGN;
+ break;
+ case '%':
+- value = ARITH_REM;
++ if (*++buf != '=') {
++ value = ARITH_REM;
++ goto out;
++ }
++ value = ARITH_REMASSIGN;
+ break;
+ case '+':
+- value = ARITH_ADD;
++ if (*++buf != '=') {
++ value = ARITH_ADD;
++ goto out;
++ }
++ value = ARITH_ADDASSIGN;
+ break;
+ case '-':
+- value = ARITH_SUB;
++ if (*++buf != '=') {
++ value = ARITH_SUB;
++ goto out;
++ }
++ value = ARITH_SUBASSIGN;
+ break;
+ case '~':
+ value = ARITH_BNOT;
+ break;
+ case '^':
+- value = ARITH_BXOR;
++ if (*++buf != '=') {
++ value = ARITH_BXOR;
++ goto out;
++ }
++ value = ARITH_BXORASSIGN;
+ break;
+ }
+ break;
+diff -ur a/src/shell.h b/src/shell.h
+--- a/src/shell.h 2007-07-13 09:26:43.000000000 +0100
++++ b/src/shell.h 2007-10-08 11:04:29.000000000 +0100
+@@ -58,6 +58,15 @@
+ #define BSD 1
+ #endif
+
++/*
++ * Type of used arithmetics. SUSv3 requires us to have at least signed long.
++ */
++typedef long arith_t;
++#define ARITH_FORMAT_STR "%ld"
++#define atoarith_t(arg) strtol(arg, NULL, 0)
++#define strtoarith_t(nptr, endptr, base) strtol(nptr, endptr, base)
++
++
+ #ifndef DO_SHAREDVFORK
+ #if __NetBSD_Version__ >= 104000000
+ #define DO_SHAREDVFORK
diff --git a/app-shells/dash/files/digest-dash-0.5.4.1-r1 b/app-shells/dash/files/digest-dash-0.5.4.1-r1
new file mode 100644
index 000000000000..66aa426f23b4
--- /dev/null
+++ b/app-shells/dash/files/digest-dash-0.5.4.1-r1
@@ -0,0 +1,6 @@
+MD5 bc457e490a589d2f87f2333616b67931 dash-0.5.4.tar.gz 212145
+RMD160 322fc2fffc5fddf4223d39c57eaeb9b4222303fa dash-0.5.4.tar.gz 212145
+SHA256 a9dc8f0237f632dd2c1bfeff80b1052e75fafaef0d767e3beab0bd8becced623 dash-0.5.4.tar.gz 212145
+MD5 304e8c13d012585314d73589e50dea38 dash_0.5.4-1.diff.gz 24636
+RMD160 5013da584493f1147a3be8a321985cf464da22af dash_0.5.4-1.diff.gz 24636
+SHA256 0214f40865c2b904710cadf84ece22c932bbeac85b0fa9e6c5e9abd46d36e453 dash_0.5.4-1.diff.gz 24636