summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-01-17 23:08:04 +0000
committerMike Frysinger <vapier@gentoo.org>2005-01-17 23:08:04 +0000
commit68b88d9317facfee9ada870ee9db50db7bab78fd (patch)
tree93ec1e0d4895c2e263e0c3b543b9a8e282e8bc42 /sys-libs/uclibc
parentStable on alpha. (diff)
downloadgentoo-2-68b88d9317facfee9ada870ee9db50db7bab78fd.tar.gz
gentoo-2-68b88d9317facfee9ada870ee9db50db7bab78fd.tar.bz2
gentoo-2-68b88d9317facfee9ada870ee9db50db7bab78fd.zip
Make sure uclibc doesnt destroy glibc hosts (sorry solar!) and fix src_test() so it actually works.
(Portage version: 2.0.51-r13)
Diffstat (limited to 'sys-libs/uclibc')
-rw-r--r--sys-libs/uclibc/ChangeLog7
-rw-r--r--sys-libs/uclibc/uclibc-0.9.26-r8.ebuild38
-rw-r--r--sys-libs/uclibc/uclibc-0.9.27.ebuild36
3 files changed, 65 insertions, 16 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog
index 0adf845a65e7..fa5f46b81596 100644
--- a/sys-libs/uclibc/ChangeLog
+++ b/sys-libs/uclibc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-libs/uclibc
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.3 2005/01/15 04:13:15 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.4 2005/01/17 23:08:04 vapier Exp $
+
+ 17 Jan 2005; Mike Frysinger <vapier@gentoo.org> uclibc-0.9.26-r8.ebuild,
+ uclibc-0.9.27.ebuild:
+ Make sure uclibc doesnt destroy glibc hosts (sorry solar!) and fix
+ src_test() so it actually works.
*uclibc-0.9.27 (14 Jan 2005)
diff --git a/sys-libs/uclibc/uclibc-0.9.26-r8.ebuild b/sys-libs/uclibc/uclibc-0.9.26-r8.ebuild
index a2fb9d793e53..8b67d9ffcd9a 100644
--- a/sys-libs/uclibc/uclibc-0.9.26-r8.ebuild
+++ b/sys-libs/uclibc/uclibc-0.9.26-r8.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.26-r8.ebuild,v 1.4 2005/01/14 06:43:26 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.26-r8.ebuild,v 1.5 2005/01/17 23:08:04 vapier Exp $
inherit eutils flag-o-matic toolchain-funcs
@@ -10,6 +10,13 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
export CTARGET=${CATEGORY/cross-}
fi
fi
+# Handle the case where we want uclibc on glibc ...
+if [[ ${CTARGET} == ${CHOST} ]] && [[ ${CHOST} != *-uclibc ]] ; then
+ export UCLIBC_AND_GLIBC="sitting in a tree"
+ export CTARGET=${CHOST%%-*}-pc-linux-uclibc
+else
+ export UCLIBC_AND_GLIBC=""
+fi
# To make a new CVS_VER we do.
# wget -O - http://uclibc.org/downloads/snapshots/uClibc-`date +%Y%m%d`.tar.bz2 | tar jxf -
@@ -32,25 +39,31 @@ LICENSE="LGPL-2"
&& SLOT="${CTARGET}" \
|| SLOT="0"
KEYWORDS="~arm ~mips ~ppc ~sh ~sparc ~x86"
-IUSE="alsa build debug hardened ipv6 static xattr" # nls is not supported yet
+IUSE="alsa build debug hardened ipv6 static" # nls is not supported yet
RESTRICT="nostrip"
-# 2004/11/16 the only binutils w/ relro support for uclibc
DEPEND="sys-devel/gcc"
RDEPEND=""
-PROVIDE="virtual/glibc virtual/libc"
+PROVIDE="virtual/libc"
-S="${WORKDIR}/${MY_P}"
+S=${WORKDIR}/${MY_P}
+alt_kprefix() {
+ if [[ ${CTARGET} == ${CHOST} ]] || [[ -n ${UCLIBC_AND_GLIBC} ]] ; then
+ echo /usr
+ else
+ echo /usr/${CTARGET}
+ fi
+}
alt_prefix() {
- if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CTARGET} == ${CHOST} ]] ; then
echo /usr
else
echo /usr/${CTARGET}
fi
}
alt_rprefix() {
- if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CTARGET} == ${CHOST} ]] ; then
echo /
else
echo /usr/${CTARGET}
@@ -193,11 +206,11 @@ src_unpack() {
echo "UCLIBC_BUILD_NOEXECSTACK=n" >> .config
fi
- use xattr && echo "UCLIBC_XATTR=y" >> .config
+ echo "UCLIBC_XATTR=y" >> .config
# we are building against system installed kernel headers
sed -i \
- -e "s:KERNEL_SOURCE.*:KERNEL_SOURCE=\"$(alt_prefix)\":" \
+ -e "s:KERNEL_SOURCE.*:KERNEL_SOURCE=\"$(alt_kprefix)\":" \
-e "s:SHARED_LIB_LOADER_PREFIX=.*:SHARED_LIB_LOADER_PREFIX=\"$(alt_rprefix)/$(get_libdir)\":" \
-e "s:DEVEL_PREFIX=.*:DEVEL_PREFIX=\"$(alt_prefix)\":" \
-e "s:RUNTIME_PREFIX=.*:RUNTIME_PREFIX=\"$(alt_rprefix)\":" \
@@ -213,6 +226,7 @@ src_unpack() {
echo
einfo "Runtime Prefix: $(alt_rprefix)"
+ einfo "Kernel Prefix: $(alt_kprefix)"
einfo "Devel Prefix: $(alt_prefix)"
einfo "CBUILD: ${CBUILD:-${CHOST}}"
einfo "CHOST: ${CHOST}"
@@ -252,10 +266,14 @@ src_compile() {
}
src_test() {
+ # This is wrong, but uclibc's tests fail bad when screwing
+ # around with sandbox, so lets just punt it
+ unset LD_PRELOAD
+
# assert test fails on pax/grsec enabled kernels - normal
# vfork test fails in sandbox (both glibc/uclibc)
cd test
- make
+ make || die "test failed"
}
src_install() {
diff --git a/sys-libs/uclibc/uclibc-0.9.27.ebuild b/sys-libs/uclibc/uclibc-0.9.27.ebuild
index dabe565e5dfb..b596e53a6a07 100644
--- a/sys-libs/uclibc/uclibc-0.9.27.ebuild
+++ b/sys-libs/uclibc/uclibc-0.9.27.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.27.ebuild,v 1.1 2005/01/15 04:13:15 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.27.ebuild,v 1.2 2005/01/17 23:08:04 vapier Exp $
inherit eutils flag-o-matic toolchain-funcs
@@ -10,6 +10,13 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
export CTARGET=${CATEGORY/cross-}
fi
fi
+# Handle the case where we want uclibc on glibc ...
+if [[ ${CTARGET} == ${CHOST} ]] && [[ ${CHOST} != *-uclibc ]] ; then
+ export UCLIBC_AND_GLIBC="sitting in a tree"
+ export CTARGET=${CHOST%%-*}-pc-linux-uclibc
+else
+ export UCLIBC_AND_GLIBC=""
+fi
# To make a new CVS_VER we do.
# wget -O - http://uclibc.org/downloads/snapshots/uClibc-`date +%Y%m%d`.tar.bz2 | tar jxf -
@@ -41,15 +48,22 @@ PROVIDE="virtual/libc"
S=${WORKDIR}/${MY_P}
+alt_kprefix() {
+ if [[ ${CTARGET} == ${CHOST} ]] || [[ -n ${UCLIBC_AND_GLIBC} ]] ; then
+ echo /usr
+ else
+ echo /usr/${CTARGET}
+ fi
+}
alt_prefix() {
- if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CTARGET} == ${CHOST} ]] ; then
echo /usr
else
echo /usr/${CTARGET}
fi
}
alt_rprefix() {
- if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CTARGET} == ${CHOST} ]] ; then
echo /
else
echo /usr/${CTARGET}
@@ -192,7 +206,7 @@ src_unpack() {
# we are building against system installed kernel headers
sed -i \
- -e "s:KERNEL_SOURCE.*:KERNEL_SOURCE=\"$(alt_prefix)\":" \
+ -e "s:KERNEL_SOURCE.*:KERNEL_SOURCE=\"$(alt_kprefix)\":" \
-e "s:SHARED_LIB_LOADER_PREFIX=.*:SHARED_LIB_LOADER_PREFIX=\"$(alt_rprefix)/$(get_libdir)\":" \
-e "s:DEVEL_PREFIX=.*:DEVEL_PREFIX=\"$(alt_prefix)\":" \
-e "s:RUNTIME_PREFIX=.*:RUNTIME_PREFIX=\"$(alt_rprefix)\":" \
@@ -205,6 +219,14 @@ src_unpack() {
cp .config myconfig
emake clean >/dev/null || die "could not clean"
+
+ echo
+ einfo "Runtime Prefix: $(alt_rprefix)"
+ einfo "Kernel Prefix: $(alt_kprefix)"
+ einfo "Devel Prefix: $(alt_prefix)"
+ einfo "CBUILD: ${CBUILD:-${CHOST}}"
+ einfo "CHOST: ${CHOST}"
+ einfo "CTARGET: ${CTARGET}"
}
src_compile() {
@@ -240,10 +262,14 @@ src_compile() {
}
src_test() {
+ # This is wrong, but uclibc's tests fail bad when screwing
+ # around with sandbox, so lets just punt it
+ unset LD_PRELOAD
+
# assert test fails on pax/grsec enabled kernels - normal
# vfork test fails in sandbox (both glibc/uclibc)
cd test
- make
+ make || die "test failed"
}
src_install() {