summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/sed
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/sed')
-rw-r--r--sys-apps/sed/Manifest2
-rw-r--r--sys-apps/sed/files/sed-4.1.5-alloca.patch14
-rw-r--r--sys-apps/sed/files/sed-4.2.1-handle-incomplete-sequences-as-if-they-were-invalid.patch45
-rw-r--r--sys-apps/sed/metadata.xml5
-rw-r--r--sys-apps/sed/sed-4.2.1-r1.ebuild68
-rw-r--r--sys-apps/sed/sed-4.2.2.ebuild70
6 files changed, 204 insertions, 0 deletions
diff --git a/sys-apps/sed/Manifest b/sys-apps/sed/Manifest
new file mode 100644
index 000000000000..f48a47f136ec
--- /dev/null
+++ b/sys-apps/sed/Manifest
@@ -0,0 +1,2 @@
+DIST sed-4.2.1.tar.bz2 899091 SHA256 2ac3b36ca37bfeb43c4ef4025778cd66d89c77abb843d90552a515a7c9d2948f SHA512 273d4d0b3dd41a3966260fbe261a20110a2a4c0749e11a080f4fc8694e47b605cb977f2535b20b92d57b1b74129df092ba47f4184951dbc3f0f14fd9b91b7bfd WHIRLPOOL 426b244431cb00a8c8f7320f22cf0a5de3165a43d9d6fb8343163e1d4054d61b2737a697ebe54311cf5d2d2f696d2f07877a41b8710ad80d96a7d5138fff07e1
+DIST sed-4.2.2.tar.bz2 1059414 SHA256 f048d1838da284c8bc9753e4506b85a1e0cc1ea8999d36f6995bcb9460cddbd7 SHA512 dbbb0bb348fac54612d29182c09c88bda7096dea03bd94f03c580c24146e65a06db12808c6a1a9adc94548fa3843511e3e80b251cb07142110cf149eab23f573 WHIRLPOOL d816657c51a2718c2b309455facaff50c9da08b79d20985ab1d61faa5b42bffa0b33ea7d3368a8cdaa6079891cfc27cdab38788563c8323081580b4478c7e2b5
diff --git a/sys-apps/sed/files/sed-4.1.5-alloca.patch b/sys-apps/sed/files/sed-4.1.5-alloca.patch
new file mode 100644
index 000000000000..89679c5362e3
--- /dev/null
+++ b/sys-apps/sed/files/sed-4.1.5-alloca.patch
@@ -0,0 +1,14 @@
+fix building on BSD systems which often do not have alloca.h
+
+--- sed-4.1.5/lib/regex_internal.h
++++ sed-4.1.5/lib/regex_internal.h
+@@ -410,7 +410,9 @@ static unsigned int re_string_context_at
+ #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
+ #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
+
++#ifdef HAVE_ALLOCA_H
+ #include <alloca.h>
++#endif
+
+ #ifndef _LIBC
+ # if HAVE_ALLOCA
diff --git a/sys-apps/sed/files/sed-4.2.1-handle-incomplete-sequences-as-if-they-were-invalid.patch b/sys-apps/sed/files/sed-4.2.1-handle-incomplete-sequences-as-if-they-were-invalid.patch
new file mode 100644
index 000000000000..dfd9206d3bf4
--- /dev/null
+++ b/sys-apps/sed/files/sed-4.2.1-handle-incomplete-sequences-as-if-they-were-invalid.patch
@@ -0,0 +1,45 @@
+http://bugs.gentoo.org/284403
+
+From 20f68fb1abe862a98bc0378e5bb54d94bb98b8fe Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <bonzini@gnu.org>
+Date: Thu, 15 Oct 2009 19:56:12 +0200
+Subject: [PATCH] handle incomplete sequences as if they were invalid
+
+2009-10-15 Paolo Bonzini <bonzini@gnu.org>
+ WANG Yunfeng <uhuruh@gmail.com>
+
+ * sed/execute.c (str_append, str_append_modified): Handle incomplete
+ sequences as if they were invalid.
+---
+ ChangeLog | 6 ++++++
+ NEWS | 4 +++-
+ sed/execute.c | 6 +++---
+ 3 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/sed/execute.c b/sed/execute.c
+index 66cb809..d5903be 100644
+--- a/sed/execute.c
++++ b/sed/execute.c
+@@ -254,8 +254,8 @@ str_append(to, string, length)
+ {
+ size_t n = MBRLEN (string, length, &to->mbstate);
+
+- /* An invalid sequence is treated like a singlebyte character. */
+- if (n == (size_t) -1)
++ /* An invalid or imcomplete sequence is treated like a singlebyte character. */
++ if (n == (size_t) -1 || n == (size_t) -2)
+ {
+ memset (&to->mbstate, 0, sizeof (to->mbstate));
+ n = 1;
+@@ -341,7 +341,7 @@ str_append_modified(to, string, length, type)
+ /* Copy the new wide character to the end of the string. */
+ n = WCRTOMB (to->active + to->length, wc, &to->mbstate);
+ to->length += n;
+- if (n == -1)
++ if (n == -1 || n == -2)
+ {
+ fprintf (stderr, "Case conversion produced an invalid character!");
+ abort ();
+--
+1.7.3.1
+
diff --git a/sys-apps/sed/metadata.xml b/sys-apps/sed/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-apps/sed/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-apps/sed/sed-4.2.1-r1.ebuild b/sys-apps/sed/sed-4.2.1-r1.ebuild
new file mode 100644
index 000000000000..6c002dca6bf7
--- /dev/null
+++ b/sys-apps/sed/sed-4.2.1-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Super-useful stream editor"
+HOMEPAGE="http://sed.sourceforge.net/"
+SRC_URI="mirror://gnu/sed/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="acl nls selinux static"
+
+RDEPEND="acl? ( virtual/acl )
+ 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.5-alloca.patch
+ epatch "${FILESDIR}"/${P}-handle-incomplete-sequences-as-if-they-were-invalid.patch #284403
+ # don't use sed here if we have to recover a broken host sed
+}
+
+src_compile() {
+ src_bootstrap_sed
+ # this has to be after the bootstrap portion
+ 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
+
+ export ac_cv_search_setfilecon=$(usex selinux -lselinux)
+ export ac_cv_header_selinux_{context,selinux}_h=$(usex selinux)
+ use static && append-ldflags -static
+ econf \
+ --bindir=${bindir} \
+ $(use_enable acl) \
+ $(use_enable nls) \
+ ${myconf}
+ emake || die "build failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "Install failed"
+ dodoc NEWS README* THANKS AUTHORS BUGS ChangeLog
+}
diff --git a/sys-apps/sed/sed-4.2.2.ebuild b/sys-apps/sed/sed-4.2.2.ebuild
new file mode 100644
index 000000000000..f6a48783d4da
--- /dev/null
+++ b/sys-apps/sed/sed-4.2.2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Super-useful stream editor"
+HOMEPAGE="http://sed.sourceforge.net/"
+SRC_URI="mirror://gnu/sed/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="acl nls selinux static"
+
+RDEPEND="acl? ( virtual/acl )
+ nls? ( virtual/libintl )
+ selinux? ( sys-libs/libselinux )"
+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.5-alloca.patch
+ # don't use sed here if we have to recover a broken host sed
+}
+
+src_compile() {
+ src_bootstrap_sed
+ # this has to be after the bootstrap portion
+ 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
+
+ # Should be able to drop this hack in next release. #333887
+ tc-is-cross-compiler && export gl_cv_func_working_acl_get_file=yes
+ export ac_cv_search_setfilecon=$(usex selinux -lselinux)
+ export ac_cv_header_selinux_{context,selinux}_h=$(usex selinux)
+ use static && append-ldflags -static
+ econf \
+ --bindir=${bindir} \
+ $(use_enable acl) \
+ $(use_enable nls) \
+ ${myconf}
+ emake || die "build failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "Install failed"
+ dodoc NEWS README* THANKS AUTHORS BUGS ChangeLog
+}