summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2011-11-07 16:46:26 +0000
committerAlexis Ballier <aballier@gentoo.org>2011-11-07 16:46:26 +0000
commit346a85ad9cb27eb72c7ed4c179236f663a89bdcf (patch)
treed600b347053cb57ae0b882bfd9a8a52892653da3
parentPrepare for icedtea-bin version and VMHANDLE migration. (diff)
downloadgentoo-2-346a85ad9cb27eb72c7ed4c179236f663a89bdcf.tar.gz
gentoo-2-346a85ad9cb27eb72c7ed4c179236f663a89bdcf.tar.bz2
gentoo-2-346a85ad9cb27eb72c7ed4c179236f663a89bdcf.zip
fix sed calls with gnu sed when bsd sed is not available
(Portage version: 2.2.0_alpha72/cvs/Linux x86_64)
-rw-r--r--sys-freebsd/freebsd-lib/ChangeLog5
-rw-r--r--sys-freebsd/freebsd-lib/freebsd-lib-9.0_rc1.ebuild17
2 files changed, 17 insertions, 5 deletions
diff --git a/sys-freebsd/freebsd-lib/ChangeLog b/sys-freebsd/freebsd-lib/ChangeLog
index 46cec29329ff..e3cbef553461 100644
--- a/sys-freebsd/freebsd-lib/ChangeLog
+++ b/sys-freebsd/freebsd-lib/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-freebsd/freebsd-lib
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.101 2011/11/07 16:06:15 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.102 2011/11/07 16:46:26 aballier Exp $
+
+ 07 Nov 2011; Alexis Ballier <aballier@gentoo.org> freebsd-lib-9.0_rc1.ebuild:
+ fix sed calls with gnu sed when bsd sed is not available
07 Nov 2011; Alexis Ballier <aballier@gentoo.org> freebsd-lib-9.0_rc1.ebuild:
remove useless patch
diff --git a/sys-freebsd/freebsd-lib/freebsd-lib-9.0_rc1.ebuild b/sys-freebsd/freebsd-lib/freebsd-lib-9.0_rc1.ebuild
index 5ec6526c52ca..0b0bb5ace436 100644
--- a/sys-freebsd/freebsd-lib/freebsd-lib-9.0_rc1.ebuild
+++ b/sys-freebsd/freebsd-lib/freebsd-lib-9.0_rc1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-9.0_rc1.ebuild,v 1.2 2011/11/07 16:06:15 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-9.0_rc1.ebuild,v 1.3 2011/11/07 16:46:26 aballier Exp $
EAPI=2
@@ -53,7 +53,8 @@ if [ "${CTARGET}" = "${CHOST}" -a "${CATEGORY#*cross-}" != "${CATEGORY}" ]; then
fi
IUSE="atm bluetooth ssl hesiod ipv6 kerberos usb netware
- build bootstrap crosscompile_opts_headers-only zfs"
+ build bootstrap crosscompile_opts_headers-only zfs
+ userland_GNU userland_BSD"
pkg_setup() {
[ -c /dev/zero ] || \
@@ -187,12 +188,20 @@ src_prepare() {
sed -e 's/LDFLAGS/RAW_LDFLAGS/g' \
-i "${S}/csu/i386-elf/Makefile" \
-i "${S}/csu/ia64/Makefile" || die
+ # Try to fix sed calls for GNU sed. Do it only with GNU userland and force
+ # BSD's sed on BSD.
+ if use userland_GNU; then
+ find . -name Makefile -exec sed -ibak 's/sed -i /sed -i/' {} \;
+ fi
}
src_compile() {
# Does not work with GNU sed
- export ESED=/usr/bin/sed
- unalias sed
+ # Force BSD's sed on BSD.
+ if use userland_BSD ; then
+ export ESED=/usr/bin/sed
+ unalias sed
+ fi
cd "${WORKDIR}/include"
$(freebsd_get_bmake) CC="$(tc-getCC)" || die "make include failed"