sys-freebsd/freebsd-lib: move GNU install/sed fixes before USE=build check so that...
authorAlexis Ballier <aballier@gentoo.org>
Tue, 1 Mar 2016 09:28:00 +0000 (10:28 +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 49e8c0bf8a9e1ddd00278b133c2721c63f8001fa..d50c0d407df768fa68a243b41e31e42f123fc37e 100644 (file)
@@ -186,6 +186,19 @@ src_prepare() {
        sed -e 's/LDFLAGS/RAW_LDFLAGS/g' \
                -i "${S}/csu/i386-elf/Makefile" \
                -i "${S}/csu/ia64/Makefile" || die
+
+       if install --version 2> /dev/null | grep -q GNU; then
+               sed -i.bak -e 's:${INSTALL} -C:${INSTALL}:' "${WORKDIR}/include/Makefile"
+       fi
+
+       # Try to fix sed calls for GNU sed. Do it only with GNU userland and force
+       # BSD's sed on BSD.
+       cd "${S}"
+       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
+
        if use build; then
                cd "${WORKDIR}"
                # This patch has to be applied on ${WORKDIR}/sys, so we do it here since it
@@ -204,18 +217,6 @@ src_prepare() {
                        "${S}/libc/rpc/Makefile.inc" \
                        "${S}/libc/yp/Makefile.inc"
        fi
-
-       if install --version 2> /dev/null | grep -q GNU; then
-               sed -i.bak -e 's:${INSTALL} -C:${INSTALL}:' "${WORKDIR}/include/Makefile"
-       fi
-
-       # Try to fix sed calls for GNU sed. Do it only with GNU userland and force
-       # BSD's sed on BSD.
-       cd "${S}"
-       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
 }
 
 bootstrap_lib() {