commit:     f7040945e140b89d3f65b3b6ac6224506d6abe4a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  7 22:48:54 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec  7 22:48:54 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f7040945

sys-apps/sed: sync with ::gentoo (bump to 4.8)

Package-Manager: Portage-3.0.12-prefix, Repoman-3.0.2
RepoMan-Options: --force
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/sed/Manifest       |  1 +
 sys-apps/sed/sed-4.8.ebuild | 82 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+)

diff --git a/sys-apps/sed/Manifest b/sys-apps/sed/Manifest
index ec23d184ad..d3aa8dd8fe 100644
--- a/sys-apps/sed/Manifest
+++ b/sys-apps/sed/Manifest
@@ -1,2 +1,3 @@
 DIST sed-4.2.2.tar.bz2 1059414 BLAKE2B 
aebe0bf90e9f9c7907e0baa8a4d1a16e59a5893198382fb9fe08ed66cab670921c0db1e07f668bf3db8dfe9bb4f0e68b9c34fd7228c70df24be043d3e7ea8d92
 SHA512 
dbbb0bb348fac54612d29182c09c88bda7096dea03bd94f03c580c24146e65a06db12808c6a1a9adc94548fa3843511e3e80b251cb07142110cf149eab23f573
 DIST sed-4.5.tar.xz 1274252 BLAKE2B 
08525659e0e01ec50e736c1665634f3816f57c48aeefa7f6bc7a152cd6c171bb4e96e5c215429fc5edbe6e1de6cc3efe4f2f3bf6865933a30dd1700e921d5b3f
 SHA512 
f95fb27e03b2301dae63878413b4c48e40341cc676945a612e1d0bd911da3192858ae142791292a99fbdaacbc7dab2d6fccb50787c06846f99b0b3740b40c196
+DIST sed-4.8.tar.xz 1348048 BLAKE2B 
62f6b6500cc9a20a35cafc2b09b12bb7da67fa0afb0b1b26153babc0023424b3126f44d29eba14c25fc4490996c90738b191c9440c66da6c120bbb9bc6f6df65
 SHA512 
7de25d9bc2981c63321c2223f3fbcab61d7b0df4fcf7d4394b72400b91993e1288d8bf53948ed5fffcf5a98c75265726a68ad4fb98e1d571bf768603a108c1c8

diff --git a/sys-apps/sed/sed-4.8.ebuild b/sys-apps/sed/sed-4.8.ebuild
new file mode 100644
index 0000000000..d889186d10
--- /dev/null
+++ b/sys-apps/sed/sed-4.8.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Super-useful stream editor"
+HOMEPAGE="http://sed.sourceforge.net/";
+SRC_URI="mirror://gnu/sed/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl forced-sandbox nls selinux static"
+
+RDEPEND="
+       !static? (
+               acl? ( virtual/acl )
+               nls? ( virtual/libintl )
+               selinux? ( sys-libs/libselinux )
+       )
+"
+DEPEND="${RDEPEND}
+       static? (
+               acl? ( virtual/acl[static-libs(+)] )
+               nls? ( virtual/libintl[static-libs(+)] )
+               selinux? ( sys-libs/libselinux[static-libs(+)] )
+       )
+"
+BDEPEND="nls? ( sys-devel/gettext )"
+
+
+src_bootstrap_sed() {
+       # make sure system-sed works #40786 #650052
+       if ! type -p sed > /dev/null || has_version 
'sys-apps/sed[forced-sandbox]' ; then
+               mkdir -p "${T}/bootstrap"
+               printf '#!/bin/sh\nexec busybox sed "$@"\n' > 
"${T}/bootstrap/sed" || die
+               chmod a+rx "${T}/bootstrap/sed"
+               PATH="${T}/bootstrap:${PATH}"
+       fi
+}
+
+src_prepare() {
+       # Don't use sed before bootstrap if we have to recover a broken host 
sed.
+       src_bootstrap_sed
+
+       default
+
+       if use forced-sandbox ; then
+               # Upstream doesn't want to add a configure flag for this.
+               # 
https://lists.gnu.org/archive/html/bug-sed/2018-03/msg00001.html
+               sed -i \
+                       -e '/^bool sandbox = false;/s:false:true:' \
+                       sed/sed.c || die
+               # Make sure the sed took.
+               grep -q '^bool sandbox = true;' sed/sed.c || die "forcing 
sandbox failed"
+       fi
+}
+
+src_configure() {
+       local myconf=()
+       if use userland_GNU; then
+               myconf+=( --exec-prefix="${EPREFIX}" )
+       else
+               myconf+=( --program-prefix=g )
+       fi
+
+       use static && append-ldflags -static
+       myconf+=(
+               $(use_enable acl)
+               $(use_enable nls)
+               $(use_with selinux)
+       )
+       econf "${myconf[@]}"
+}
+
+src_install() {
+       default
+       # don't want charset.alias, installed by libiconv
+       rm -f "${ED}"/lib/charset.alias
+}

Reply via email to