sys-freebsd/freebsd-lib: discriminate GNU userland based on CBUILD:-CHOST which helps...
authorAlexis Ballier <aballier@gentoo.org>
Tue, 1 Mar 2016 09:11:17 +0000 (10:11 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Tue, 1 Mar 2016 10:06:53 +0000 (11:06 +0100)
Package-Manager: portage-2.2.27
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild

index 0ce19a22cc0ee32d51221854b57a002b2e4bb6b3..23f5e859fbe8a288995c407a13bcc61d225d776b 100644 (file)
@@ -212,7 +212,7 @@ src_prepare() {
        # Try to fix sed calls for GNU sed. Do it only with GNU userland and force
        # BSD's sed on BSD.
        cd "${S}"
-       if use userland_GNU; then
+       if [[ ${CBUILD:-${CHOST}} != *bsd* ]]; then
                find . -name Makefile -exec sed -ibak 's/sed -i /sed -i/' {} \;
                sed -i -e 's/-i ""/-i""/' "${S}/csu/Makefile.inc" || die
        fi
@@ -359,7 +359,7 @@ do_compile() {
 src_compile() {
        # Does not work with GNU sed
        # Force BSD's sed on BSD.
-       if use userland_BSD ; then
+       if [[ ${CBUILD:-${CHOST}} == *bsd* ]]; then
                export ESED=/usr/bin/sed
                unalias sed
        fi