summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-01-30 00:26:46 +0000
committerMike Frysinger <vapier@gentoo.org>2008-01-30 00:26:46 +0000
commit253a29672ed8e753a412ade9fa73681f47eb06c9 (patch)
treed8e14c98f80aef0527305960e22438e0841fd131 /sys-apps
parentStable on x86 wrt bug #208039 (diff)
downloadgentoo-2-253a29672ed8e753a412ade9fa73681f47eb06c9.tar.gz
gentoo-2-253a29672ed8e753a412ade9fa73681f47eb06c9.tar.bz2
gentoo-2-253a29672ed8e753a412ade9fa73681f47eb06c9.zip
Default to using regex from the libc so as to get a smaller sed binary.
(Portage version: 2.1.4)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/sed/ChangeLog10
-rw-r--r--sys-apps/sed/files/digest-sed-4.1.5-r13
-rw-r--r--sys-apps/sed/files/sed-4.1.5-prototypes.patch10
-rw-r--r--sys-apps/sed/sed-4.1.5-r1.ebuild74
4 files changed, 95 insertions, 2 deletions
diff --git a/sys-apps/sed/ChangeLog b/sys-apps/sed/ChangeLog
index 44f27977b042..cc3d36d8f89a 100644
--- a/sys-apps/sed/ChangeLog
+++ b/sys-apps/sed/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/sed
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/sed/ChangeLog,v 1.84 2007/07/10 23:00:46 uberlord Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/sed/ChangeLog,v 1.85 2008/01/30 00:26:46 vapier Exp $
+
+*sed-4.1.5-r1 (30 Jan 2008)
+
+ 30 Jan 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/sed-4.1.5-prototypes.patch, +sed-4.1.5-r1.ebuild:
+ Default to using regex from the libc so as to get a smaller sed binary.
10 Jul 2007; Roy Marples <uberlord@gentoo.org> sed-4.1.5.ebuild:
Only install sed to /bin for GNU userland.
diff --git a/sys-apps/sed/files/digest-sed-4.1.5-r1 b/sys-apps/sed/files/digest-sed-4.1.5-r1
new file mode 100644
index 000000000000..4774a32a7cd8
--- /dev/null
+++ b/sys-apps/sed/files/digest-sed-4.1.5-r1
@@ -0,0 +1,3 @@
+MD5 7a1cbbbb3341287308e140bd4834c3ba sed-4.1.5.tar.gz 799584
+RMD160 49b12e99a55c6d2e78ad236f0205e63e46444173 sed-4.1.5.tar.gz 799584
+SHA256 be955bef7a81d69222e929689e0de0ecf64c13dc5b15b2ee5696d5ef66fdeec0 sed-4.1.5.tar.gz 799584
diff --git a/sys-apps/sed/files/sed-4.1.5-prototypes.patch b/sys-apps/sed/files/sed-4.1.5-prototypes.patch
new file mode 100644
index 000000000000..d82ee5f6c98b
--- /dev/null
+++ b/sys-apps/sed/files/sed-4.1.5-prototypes.patch
@@ -0,0 +1,10 @@
+--- lib/utils.c.orig 2008-01-29 19:23:27.000000000 -0500
++++ lib/utils.c 2008-01-29 19:23:37.000000000 -0500
+@@ -19,6 +19,7 @@
+ #include "config.h"
+
+ #include <stdio.h>
++#include <unistd.h>
+
+ #include <errno.h>
+ #ifndef errno
diff --git a/sys-apps/sed/sed-4.1.5-r1.ebuild b/sys-apps/sed/sed-4.1.5-r1.ebuild
new file mode 100644
index 000000000000..8918f7c82564
--- /dev/null
+++ b/sys-apps/sed/sed-4.1.5-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/sed/sed-4.1.5-r1.ebuild,v 1.1 2008/01/30 00:26:46 vapier Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Super-useful stream editor"
+HOMEPAGE="http://sed.sourceforge.net/"
+SRC_URI="mirror://gnu/sed/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="nls static"
+
+RDEPEND="nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_bootstrap_sed() {
+ # make sure system-sed works #40786
+ export NO_SYS_SED=""
+ if ! type -p sed > /dev/null ; then
+ NO_SYS_SED="!!!"
+ ./bootstrap.sh || die "couldnt bootstrap"
+ cp sed/sed "${T}"/ || die "couldnt copy"
+ export PATH="${PATH}:${T}"
+ make clean || die "couldnt clean"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-4.1.4-makeinfo-c-locale.patch
+ epatch "${FILESDIR}"/${P}-alloca.patch
+ epatch "${FILESDIR}"/${P}-prototypes.patch
+ # don't use sed here if we have to recover a broken host sed
+}
+
+src_compile() {
+ src_bootstrap_sed
+ # make sure all sed operations here are repeatable
+ sed -i \
+ -e '/docdir =/s:=.*/doc:= $(datadir)/doc/'${PF}'/html:' \
+ doc/Makefile.in || die "sed html doc"
+
+ local myconf= bindir=/bin
+ if ! use userland_GNU ; then
+ myconf="--program-prefix=g"
+ bindir=/usr/bin
+ fi
+
+ if echo "#include <regex.h>" | $(tc-getCPP) > /dev/null ; then
+ myconf="${myconf} --without-included-regex"
+ fi
+
+ use static && append-ldflags -static
+ econf \
+ --bindir=${bindir} \
+ $(use_enable nls) \
+ ${myconf} \
+ || die "Configure failed"
+ emake || die "build failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "Install failed"
+ dodoc NEWS README* THANKS AUTHORS BUGS ChangeLog
+ docinto examples
+ dodoc "${FILESDIR}"/{dos2unix,unix2dos}
+
+ rm -f "${D}"/usr/lib/charset.alias "${D}"/usr/share/locale/locale.alias
+}