summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-10-08 20:53:28 +0000
committerRoy Marples <uberlord@gentoo.org>2007-10-08 20:53:28 +0000
commit177efdd0cc124fdee5b9852c3f7ed1287f9b2ec9 (patch)
treee782d1fe0e4cc76230bccc4e53e6e6d4394eb854 /app-shells/dash
parentInitial import of ebuild, written by hd_brummy. (diff)
downloadgentoo-2-177efdd0cc124fdee5b9852c3f7ed1287f9b2ec9.tar.gz
gentoo-2-177efdd0cc124fdee5b9852c3f7ed1287f9b2ec9.tar.bz2
gentoo-2-177efdd0cc124fdee5b9852c3f7ed1287f9b2ec9.zip
Fix the arith patch for incorrect octal handling
(Portage version: 2.1.3.12)
Diffstat (limited to 'app-shells/dash')
-rw-r--r--app-shells/dash/ChangeLog8
-rw-r--r--app-shells/dash/dash-0.5.4.1-r2.ebuild70
-rw-r--r--app-shells/dash/files/dash-0.5.4-posix-arith.patch2
-rw-r--r--app-shells/dash/files/digest-dash-0.5.4.1-r26
4 files changed, 84 insertions, 2 deletions
diff --git a/app-shells/dash/ChangeLog b/app-shells/dash/ChangeLog
index 36686fe5682f..9ee0ca69287e 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.46 2007/10/08 10:25:03 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/dash/ChangeLog,v 1.47 2007/10/08 20:53:28 uberlord Exp $
+
+*dash-0.5.4.1-r2 (08 Oct 2007)
+
+ 08 Oct 2007; Roy Marples <uberlord@gentoo.org>
+ files/dash-0.5.4-posix-arith.patch, +dash-0.5.4.1-r2.ebuild:
+ Fix the arith patch for incorrect octal handling
*dash-0.5.4.1-r1 (08 Oct 2007)
diff --git a/app-shells/dash/dash-0.5.4.1-r2.ebuild b/app-shells/dash/dash-0.5.4.1-r2.ebuild
new file mode 100644
index 000000000000..f0fba792c862
--- /dev/null
+++ b/app-shells/dash/dash-0.5.4.1-r2.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-r2.ebuild,v 1.1 2007/10/08 20:53:28 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
index 9665c4ac19d4..894008670ce1 100644
--- a/app-shells/dash/files/dash-0.5.4-posix-arith.patch
+++ b/app-shells/dash/files/dash-0.5.4-posix-arith.patch
@@ -205,7 +205,7 @@ diff -ur a/src/arith_yylex.c b/src/arith_yylex.c
+ if (*++buf == 'x')
+ yylval.l_value = strtoll(buf+1, (char **)&arith_buf, 16);
+ else
-+ yylval.l_value = strtoll(buf+1, (char **)&arith_buf, 8);
++ yylval.l_value = strtoll(buf, (char **)&arith_buf, 8);
+ if (isalnum(*arith_buf) || *arith_buf == '_')
+ sh_error("arith: value does not fit base: \"%s\"", arith_buf);
+ return ARITH_NUM;
diff --git a/app-shells/dash/files/digest-dash-0.5.4.1-r2 b/app-shells/dash/files/digest-dash-0.5.4.1-r2
new file mode 100644
index 000000000000..66aa426f23b4
--- /dev/null
+++ b/app-shells/dash/files/digest-dash-0.5.4.1-r2
@@ -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