sys-apps/sed: update bootstrap logic #650052
authorMike Frysinger <vapier@gentoo.org>
Sun, 11 Mar 2018 22:24:58 +0000 (18:24 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 11 Mar 2018 22:36:27 +0000 (18:36 -0400)
The bootstrap.sh logic was deleted upstream a while back.  Switch to
using busybox's sed as a fallback as needed.  This should be good
enough for most cases, and we can figure out something more if the
need comes up.

Bug: https://bugs.gentoo.org/650052

sys-apps/sed/sed-4.2.2.ebuild
sys-apps/sed/sed-4.3-r1.ebuild
sys-apps/sed/sed-4.4-r1.ebuild
sys-apps/sed/sed-4.4.ebuild

index ad3f071a2b1b5904eea42f03239e742be48604fd..b6da5a256ce2319dcd6104a9728d548b03b930be 100644 (file)
@@ -22,13 +22,11 @@ DEPEND="${RDEPEND}
 
 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"
+               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
 }
 
index b0be9297fb0135b091b068229adf7005113418eb..e70a451879222d2748285e799d3da7b176d3d6f9 100644 (file)
@@ -26,13 +26,11 @@ PATCHES=(
 
 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"
+               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
 }
 
index 26c3858da53b9d5687fa03d8976e57fc90afac4b..194b1b19369292ab7c3d0e805ae07eb72fd20930 100644 (file)
@@ -22,13 +22,11 @@ DEPEND="${RDEPEND}
 
 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}"
-               emake clean
+               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
 }
 
index aa52e2921cdcc35ed62346cef3091109aefd1c40..3bdb8e28ac2003c57007a6ea0c91eedb916a6769 100644 (file)
@@ -25,13 +25,11 @@ DEPEND="${RDEPEND}
 
 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"
+               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
 }