diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-01-11 06:19:57 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-01-11 06:19:57 +0000 |
commit | 924e5fa5b7d0c1c5c297c558fb79030f331bc2fd (patch) | |
tree | dbb7a79ad7bb48621aa611b8ca491784854c654f /dev-libs | |
parent | Version bump to 2.18. Added ~ppc keyword. Fixes bug #77379. Thanks to Nata... (diff) | |
download | historical-924e5fa5b7d0c1c5c297c558fb79030f331bc2fd.tar.gz historical-924e5fa5b7d0c1c5c297c558fb79030f331bc2fd.tar.bz2 historical-924e5fa5b7d0c1c5c297c558fb79030f331bc2fd.zip |
Merge psm & my cross compile work together and BAM we have a sweet ebuild.
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/uclibc/ChangeLog | 7 | ||||
-rw-r--r-- | dev-libs/uclibc/Manifest | 52 | ||||
-rw-r--r-- | dev-libs/uclibc/uclibc-0.9.21.ebuild | 4 | ||||
-rw-r--r-- | dev-libs/uclibc/uclibc-0.9.26-r5.ebuild | 4 | ||||
-rw-r--r-- | dev-libs/uclibc/uclibc-0.9.26-r7.ebuild | 4 | ||||
-rw-r--r-- | dev-libs/uclibc/uclibc-0.9.26-r8.ebuild | 157 | ||||
-rw-r--r-- | dev-libs/uclibc/uclibc-9999.ebuild | 4 |
7 files changed, 128 insertions, 104 deletions
diff --git a/dev-libs/uclibc/ChangeLog b/dev-libs/uclibc/ChangeLog index 0473d8e286f1..6e29cc299f89 100644 --- a/dev-libs/uclibc/ChangeLog +++ b/dev-libs/uclibc/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for dev-libs/uclibc -# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/ChangeLog,v 1.43 2004/12/15 02:28:27 solar Exp $ +# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/ChangeLog,v 1.44 2005/01/11 06:19:57 vapier Exp $ + + 11 Jan 2005; Mike Frysinger <vapier@gentoo.org> uclibc-0.9.26-r8.ebuild: + Merge psm & my cross compile work together and BAM we have a sweet ebuild. 14 Dec 2004; <solar@gentoo.org> uclibc-0.9.26-r8.ebuild: - Improved hardened handling bug 73699. Initial support for xattr. diff --git a/dev-libs/uclibc/Manifest b/dev-libs/uclibc/Manifest index e0169588f16d..92f811f7ffd9 100644 --- a/dev-libs/uclibc/Manifest +++ b/dev-libs/uclibc/Manifest @@ -1,45 +1,43 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 d98118dbcb77466679b07fd6eb029f9f uclibc-9999.ebuild 5443 -MD5 8f504f01c1cb586217db109896a60ca0 uclibc-0.9.26-r8.ebuild 9084 -MD5 7ba6e2f7dbe4f241de617f5ebfa35fa0 uclibc-0.9.26-r5.ebuild 7658 -MD5 ddeed663eb1a390fa3aa5dd91076ba6b ChangeLog 8011 -MD5 7fde305dfd21aeac12e0eb721e0f6a17 uclibc-0.9.21.ebuild 1096 +MD5 1265061fc51e9b3db8020c13f2e25a76 ChangeLog 8165 MD5 e96b4dfc373a1cdf7735aeae52c4cf7e metadata.xml 999 -MD5 59d40f2d78a6bbdb5e3fc3f0efe960ef uclibc-0.9.26-r7.ebuild 7861 +MD5 965ff7a705ad0a3133b02c98f8100e92 uclibc-0.9.21.ebuild 1097 +MD5 17ba3d0e6436718dafb750dade5d0869 uclibc-0.9.26-r5.ebuild 7658 +MD5 64742403e39911df25935b6099d30043 uclibc-0.9.26-r7.ebuild 7862 +MD5 c2b3545d487eac266e731aee91620602 uclibc-0.9.26-r8.ebuild 9426 +MD5 14f021d1cfb0e76ce684b8eefba1adfc uclibc-9999.ebuild 5442 MD5 d16f404e56abc9f0ab5c372b88a6905d files/Makefile-cp-order-fix.patch 897 +MD5 799adc7fb6ec9ffd653831cea1d32dd5 files/digest-uclibc-0.9.21 67 MD5 0b733285f186f31c1be9ffcc42f1064e files/getent 973 -MD5 6d2b5c523d34c86df9bc37747d9261dc files/digest-uclibc-0.9.26-r5 231 -MD5 6d2b5c523d34c86df9bc37747d9261dc files/digest-uclibc-0.9.26-r7 231 MD5 e0556dd58957468793213ab327c590d3 files/digest-uclibc-0.9.26-r8 232 -MD5 799adc7fb6ec9ffd653831cea1d32dd5 files/digest-uclibc-0.9.21 67 +MD5 6d2b5c523d34c86df9bc37747d9261dc files/digest-uclibc-0.9.26-r5 231 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-uclibc-9999 0 -MD5 df59fcf3a02c17b7dac6999bd9262d05 files/cvs/22_all_uClibc-ld-now.patch 1072 -MD5 7eea15a7a3e8d8a2a222b815e57dc221 files/cvs/13_all_uClibc-enable-ssp.patch 331 -MD5 9cb04f6f038b903868f99d90f81e7e61 files/cvs/21_all_uClibc-ld-relro.patch 1040 -MD5 4216cdf86d54f45fa04cb44a5425b3ff files/0.9.23/uClibc-0.9.23-pax.patch 3607 +MD5 6d2b5c523d34c86df9bc37747d9261dc files/digest-uclibc-0.9.26-r7 231 MD5 17ecd222df47b5253f35787097440a5a files/0.9.23/uClibc-0.9.23-etdyn.patch 5832 MD5 298b7b42f80e1f8ae395df81c47eb213 files/0.9.23/uClibc-0.9.23-flipturn.patch 1821 -MD5 f7c264d37687f1a32f1c6e31239f2276 files/0.9.26/uclibc-0.9.26-noexecstack.patch 15273 -MD5 6835449424e7a8a38e9c85ecf1b73577 files/0.9.26/arm-ucontext.patch 303 +MD5 4216cdf86d54f45fa04cb44a5425b3ff files/0.9.23/uClibc-0.9.23-pax.patch 3607 +MD5 7eea15a7a3e8d8a2a222b815e57dc221 files/cvs/13_all_uClibc-enable-ssp.patch 331 +MD5 9cb04f6f038b903868f99d90f81e7e61 files/cvs/21_all_uClibc-ld-relro.patch 1040 +MD5 df59fcf3a02c17b7dac6999bd9262d05 files/cvs/22_all_uClibc-ld-now.patch 1072 MD5 46d965d8bdfe981f75fb8696799d9d2a files/0.9.26/ssp.c 3937 -MD5 7ff9f1e05cdfbbe0e156ea81bf8b55ee files/0.9.26/uClibc-20040921-ldso-unsecvars.patch 1024 -MD5 a503ef49001f5f67d61cd40b0809fb76 files/0.9.26/unsecvars.h 682 +MD5 2416f5e954ccb8b39b1c0d6a3cf5e827 files/0.9.26/uClibc-0.9.26-Makefile.patch 1478 +MD5 bdd1e91ee48fb8be0d28cabdfcfdf3ff files/0.9.26/uClibc-0.9.26-pie-option.patch 863 MD5 49671ccbdf2c8055efc6cde0003cb6c5 files/0.9.26/arm-fix-missing-syscalls.patch 2264 -MD5 efd96414f3be520f07eabd1c02be1ecb files/0.9.26/uclibc-0.9.26-resolve-segfault.patch 1227 MD5 874260fc77637deccf7588cfc1c76674 files/0.9.26/uClibc-20040613-do_rem.patch 391 +MD5 b9df87c681aa3a1ef3033cb195e516df files/0.9.26/uclibc-0.9.26-arm-dl-sysdep.patch 795 MD5 d35beaf332590fed8c619483d4598dc6 files/0.9.26/uclibc-0.9.26-ssp-gcc34-after-frandom.patch 542 -MD5 bdd1e91ee48fb8be0d28cabdfcfdf3ff files/0.9.26/uClibc-0.9.26-pie-option.patch 863 +MD5 f7c264d37687f1a32f1c6e31239f2276 files/0.9.26/uclibc-0.9.26-noexecstack.patch 15273 +MD5 6835449424e7a8a38e9c85ecf1b73577 files/0.9.26/arm-ucontext.patch 303 +MD5 efd96414f3be520f07eabd1c02be1ecb files/0.9.26/uclibc-0.9.26-resolve-segfault.patch 1227 MD5 7157f784ba7672c9904d289712131a52 files/0.9.26/uclibc-0.9.26-ldso-cache.patch 410 -MD5 2416f5e954ccb8b39b1c0d6a3cf5e827 files/0.9.26/uClibc-0.9.26-Makefile.patch 1478 -MD5 b9df87c681aa3a1ef3033cb195e516df files/0.9.26/uclibc-0.9.26-arm-dl-sysdep.patch 795 +MD5 7ff9f1e05cdfbbe0e156ea81bf8b55ee files/0.9.26/uClibc-20040921-ldso-unsecvars.patch 1024 +MD5 a503ef49001f5f67d61cd40b0809fb76 files/0.9.26/unsecvars.h 682 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.4 (GNU/Linux) +Version: GnuPG v1.9.14 (GNU/Linux) -iQCVAwUBQb+hIJ4WFLgrx1GWAQKMGAP+PIfl72Xd9BPFqzT6PE3065pOQC/EA3rC -WLaFbw3dq33shDUnTSEmoXQ6bzaKCDyOGZNIIxbrhAk68/L7bm5MA1blbGETHcsF -MJpQiTd9bQb7peP8Z/0nqry3ASfOoYfigQRZh5Tg8/07gQRN1+DrFTY7zJ2pwnW+ -ckijJTDUvx0= -=3lIc +iD8DBQFB43AqroRuSHgZdywRAkz9AJ97qifC1HRxNe2/sx7W47TTP1ViMwCfTmlR +PzPgsUYl+C5wwvRlsF7Hiro= +=S87t -----END PGP SIGNATURE----- diff --git a/dev-libs/uclibc/uclibc-0.9.21.ebuild b/dev-libs/uclibc/uclibc-0.9.21.ebuild index 40e909aa6f97..78c7cbfcaafa 100644 --- a/dev-libs/uclibc/uclibc-0.9.21.ebuild +++ b/dev-libs/uclibc/uclibc-0.9.21.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.21.ebuild,v 1.9 2004/07/14 02:30:20 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.21.ebuild,v 1.10 2005/01/11 06:19:57 vapier Exp $ inherit eutils diff --git a/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild b/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild index 04a2835040ce..10c3362a1484 100644 --- a/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild +++ b/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild,v 1.10 2004/10/15 05:33:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild,v 1.11 2005/01/11 06:19:57 vapier Exp $ inherit eutils flag-o-matic gcc diff --git a/dev-libs/uclibc/uclibc-0.9.26-r7.ebuild b/dev-libs/uclibc/uclibc-0.9.26-r7.ebuild index 4a77165f09c5..67036398fde1 100644 --- a/dev-libs/uclibc/uclibc-0.9.26-r7.ebuild +++ b/dev-libs/uclibc/uclibc-0.9.26-r7.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r7.ebuild,v 1.2 2004/10/28 05:55:32 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r7.ebuild,v 1.3 2005/01/11 06:19:57 vapier Exp $ inherit eutils flag-o-matic gcc diff --git a/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild b/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild index dbc8593902e7..e2cbb6096398 100644 --- a/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild +++ b/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild @@ -1,8 +1,15 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild,v 1.3 2004/12/15 02:28:27 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild,v 1.4 2005/01/11 06:19:57 vapier Exp $ -inherit eutils flag-o-matic gcc +inherit eutils flag-o-matic toolchain-funcs + +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then + export CTARGET=${CATEGORY/cross-} + fi +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 - @@ -10,7 +17,7 @@ inherit eutils flag-o-matic gcc # diff -urN --exclude .cvsignore --exclude CVS uClibc-0.9.26 uClibc | bzip2 - > uClibc-0.9.26-cvs-update-`date +%Y%m%d`.patch.bz2 # rm -rf uClibc-0.9.26-cvs-update-`date +%Y%m%d`.patch.bz2 uClibc uClibc-0.9.26 -MY_P="${P/ucl/uCl}" +MY_P=${P/ucl/uCl} # only CVS_VER >= 20041117 is supported CVS_VER="20041209" PATCH_VER="1.4" @@ -21,10 +28,12 @@ SRC_URI="http://www.kernel.org/pub/linux/libs/uclibc/${MY_P}.tar.bz2 mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2" LICENSE="LGPL-2" -SLOT="0" +[[ ${CTARGET} != ${CHOST} ]] \ + && SLOT="${CTARGET}" \ + || SLOT="0" KEYWORDS="-*" #KEYWORDS="~x86 ~ppc ~sparc ~mips ~arm" -IUSE="build debug hardened ipv6 static xattr" # nls is not supported yet +IUSE="alsa build debug hardened ipv6 static xattr" # nls is not supported yet RESTRICT="nostrip" # 2004/11/16 the only binutils w/ relro support for uclibc @@ -32,7 +41,22 @@ DEPEND="sys-devel/gcc" RDEPEND="" PROVIDE="virtual/glibc virtual/libc" -S=${WORKDIR}/${MY_P} +S="${WORKDIR}/${MY_P}" + +alt_prefix() { + if [[ ${CTARGET} = ${CHOST} ]] ; then + echo /usr + else + echo /usr/${CTARGET} + fi +} +alt_rprefix() { + if [[ ${CTARGET} = ${CHOST} ]] ; then + echo / + else + echo /usr/${CTARGET} + fi +} CPU_ARM="GENERIC_ARM ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}" CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}}" @@ -40,40 +64,28 @@ CPU_PPC="" CPU_SH="SH{2,3,4,5}" CPU_X86="GENERIC_386 {3,4,5,6}86 PENTIUM{II,III,4} K{6,7} ELAN CRUSOE WINCHIP{C6,2} CYRIXIII NEHEMIAH" IUSE_UCLIBC_CPU="${CPU_ARM} ${CPU_MIPS} ${CPU_PPC} ${CPU_SH} ${CPU_X86}" -IUSE_UCLIBC_ENDIAN="LITTLE BIG" check_cpu_opts() { - local cpu_var="CPU_$(echo ${ARCH} | tr [a-z] [A-Z])" - if [ -z "${UCLIBC_CPU}" ] ; then + local cpu_var="CPU_$(echo $(tc-arch ${CTARGET}) | tr [a-z] [A-Z])" + if [[ -z ${UCLIBC_CPU} ]] ; then ewarn "You really should consider setting UCLIBC_CPU" ewarn "Otherwise, the build will be generic (read: slow)." ewarn "Available CPU options:" - eval echo ${!cpu_var} - export UCLIBC_CPU="${UCLIBC_CPU_DEFAULT}" + UCLIBC_CPU=$(eval echo ${!cpu_var}) + echo ${UCLIBC_CPU} + export UCLIBC_CPU=${UCLIBC_CPU%% *} else local cpu found=0 for cpu in $(eval echo ${!cpu_var}) ; do - [ "${UCLIBC_CPU}" = "${cpu}" ] && found=1 && break + [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break done - if [ ${found} -eq 0 ] ; then + if [[ ${found} -eq 0 ]] ; then ewarn "UCLIBC_CPU choice '${UCLIBC_CPU}' not supported" ewarn "Valid choices:" eval echo ${!cpu_var} die "pick a supported cpu type" fi fi - - if [ -z "${UCLIBC_ENDIAN}" ] ; then - ewarn "You really should consider setting UCLIBC_ENDIAN" - ewarn "Otherwise, the build may choose the wrong default." - ewarn "Available CPU endians: little big" - export UCLIBC_ENDIAN="${UCLIBC_ENDIAN_DEFAULT}" - else - export UCLIBC_ENDIAN="$(echo ${UCLIBC_ENDIAN} | tr [a-z] [A-Z])" - if [ "${UCLIBC_ENDIAN}" != "LITTLE" -a "${UCLIBC_ENDIAN}" != "BIG" ] ; then - die "UCLIBC_ENDIAN may only be 'little' or 'big'" - fi - fi } src_unpack() { @@ -83,10 +95,10 @@ src_unpack() { ########## PATCHES ########## - [ -n "${CVS_VER}" ] && \ + [[ -n ${CVS_VER} ]] && \ epatch ${DISTDIR}/${MY_P}-cvs-update-${CVS_VER}.patch.bz2 - if [ -n "${PATCH_VER}" ] ; then + if [[ -n ${PATCH_VER} ]] ; then unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 epatch ${WORKDIR}/patch # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f) @@ -96,13 +108,13 @@ src_unpack() { ########## CPU SELECTION ########## local target config_target - case ${ARCH} in - arm) target="arm"; config_target="GENERIC_ARM";; - mips) target="mips"; config_target="MIPS_ISA_1";; - ppc) target="powerpc"; config_target="no cpu-specific options";; - sh) target="sh"; config_target="SH4";; - x86) target="i386"; config_target="GENERIC_386";; - *) die "${ARCH} lists no defaults :/";; + case $(tc-arch ${CTARGET}) in + arm) target="arm"; config_target="GENERIC_ARM";; + mips) target="mips"; config_target="MIPS_ISA_1";; + ppc) target="powerpc"; config_target="no cpu-specific options";; + sh) target="sh"; config_target="SH4";; + x86) target="i386"; config_target="GENERIC_386";; + *) die "$(tc-arch ${CTARGET}) lists no defaults :/";; esac sed -i -e "s:default TARGET_i386:default TARGET_${target}:" \ extra/Configs/Config.in @@ -122,7 +134,7 @@ src_unpack() { fi sed -i -e 's:^ARCH_.*_ENDIAN=y::' .config - echo "ARCH_${UCLIBC_ENDIAN}_ENDIAN=y" >> .config + echo "ARCH_$(tc-endian | tr [a-z] [A-Z])_ENDIAN=y" >> .config for def in DO_C99_MATH UCLIBC_HAS_{RPC,CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC,FTW} ; do sed -i -e "s:# ${def} is not set:${def}=y:" .config @@ -146,7 +158,7 @@ src_unpack() { use ipv6 && sed -i -e "s:# UCLIBC_HAS_IPV6 is not set:UCLIBC_HAS_IPV6=y:" .config # uncomment if you miss wordexp (alsa-lib) - #use build || sed -i -e "s:# UCLIBC_HAS_WORDEXP is not set:UCLIBC_HAS_WORDEXP=y:" .config + use alsa && sed -i -e "s:# UCLIBC_HAS_WORDEXP is not set:UCLIBC_HAS_WORDEXP=y:" .config # we need to do it independently of hardened to get ssp.c built into libc sed -i -e "s:# UCLIBC_SECURITY.*:UCLIBC_SECURITY=y:" .config @@ -162,7 +174,7 @@ src_unpack() { fi if use hardened ; then - if has ${ARCH} mips ppc x86 ; then + if has $(tc-arch ${CTARGET}) mips ppc x86 ; then echo "UCLIBC_BUILD_PIE=y" >> .config else echo "UCLIBC_BUILD_PIE=n" >> .config @@ -183,15 +195,12 @@ src_unpack() { use xattr && echo "UCLIBC_XATTR=y" >> .config # we are building against system installed kernel headers - sed -i -e 's:KERNEL_SOURCE.*:KERNEL_SOURCE="/usr":' .config - - if [ "${PORTAGE_LIBC}" = "uClibc" ] ; then - sed -i \ - -e 's:SHARED_LIB_LOADER_PREFIX=.*:SHARED_LIB_LOADER_PREFIX="/lib":' \ - -e 's:DEVEL_PREFIX=.*:DEVEL_PREFIX="/usr":' \ - -e 's:RUNTIME_PREFIX=.*:RUNTIME_PREFIX="/":' \ - .config - fi + sed -i \ + -e "s:KERNEL_SOURCE.*:KERNEL_SOURCE=\"$(alt_prefix)\":" \ + -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)\":" \ + .config yes "" | make -s oldconfig > /dev/null || die "could not make oldconfig" @@ -217,32 +226,44 @@ src_compile() { # emake -j1 || die "could not make locales" # cd ../.. #fi + local makeopts + type -p ${CTARGET}-ar && makeopts="CROSS=${CTARGET}-" + + emake -j1 ${makeopts} || die "could not make" + [[ ${CTARGET} != ${CHOST} ]] && return 0 - emake -j1 || die "could not make" - if [ "${PORTAGE_LIBC}" = "uClibc" ] ; then - emake -j1 utils || die "could not make utils" + if [[ ${CHOST} == *-uclibc ]] ; then + emake -j1 ${makeopts} utils || die "could not make utils" fi if ! use build ; then if ! hasq maketest $RESTRICT ; then - # assert test fails on pax/grsec enabled kernels - normal - # vfork test fails in sandbox (both glibc/uclibc) - cd test; make; cd .. + src_test fi fi } +src_test() { + # assert test fails on pax/grsec enabled kernels - normal + # vfork test fails in sandbox (both glibc/uclibc) + cd test + make +} + src_install() { - emake PREFIX=${D} install || die "install failed" + emake PREFIX="${D}" install || die "install failed" # remove files coming from kernel-headers # scsi is uclibc's own directory since cvs 20040212 - if [ "${PORTAGE_LIBC}" = "uClibc" ] ; then - rm -rf ${D}/usr/include/{asm,linux} - rm -f ${D}/usr/lib/lib*_pic.a - ! use static && use build && rm -f ${D}/usr/lib/lib*.a + rm -r "${D}"$(alt_prefix)/include/{asm,linux,asm-generic} + + [[ ${CTARGET} != ${CHOST} ]] && return 0 - emake PREFIX=${D} install_utils || die "install-utils failed" + if [[ ${CHOST} == *-uclibc ]] ; then +# rm -f "${D}"$(alt_prefix)/lib/lib*_pic.a +# ! use static && use build && rm -f "${D}"$(alt_prefix)/lib/lib*.a + + emake PREFIX="${D}" install_utils || die "install-utils failed" dodir /usr/bin exeinto /usr/bin doexe extra/scripts/getent @@ -255,25 +276,27 @@ src_install() { } pkg_postinst() { -if [ "${PORTAGE_LIBC}" = "uClibc" ] ; then +[[ ${CTARGET} != ${CHOST} ]] && return 0 + +if [[ ${CHOST} == *-uclibc ]] ; then # remove invalid symlinks if any #local x= #for x in TZ ld.so.conf ld.so.preload ; do # [ ! -e "${ROOT}/etc/${x}" ] && rm -f ${ROOT}/etc/${x} #done - if [ ! -e "${ROOT}/etc/TZ" ] ; then + if [[ ! -e ${ROOT}/etc/TZ ]] ; then echo "Please remember to set your timezone in /etc/TZ." - echo "UTC" > ${ROOT}/etc/TZ + echo "UTC" > "${ROOT}"/etc/TZ fi - if [ ! -e "${ROOT}/etc/ld.so.conf" ] ; then - [ -d "${ROOT}/usr/X11R6/lib" ] \ - && echo "/usr/X11R6/lib" > ${ROOT}/etc/ld.so.conf \ - || > ${ROOT}/etc/ld.so.conf + if [[ ! -e ${ROOT}/etc/ld.so.conf ]] ; then + [[ -d ${ROOT}/usr/X11R6/lib ]] \ + && echo "/usr/X11R6/lib" > "${ROOT}"/etc/ld.so.conf \ + || > "${ROOT}"/etc/ld.so.conf fi - if [ "${ROOT}" = "/" ] ; then + if [[ ${ROOT} == "/" ]] ; then # update cache before reloading init /sbin/ldconfig # reload init ... diff --git a/dev-libs/uclibc/uclibc-9999.ebuild b/dev-libs/uclibc/uclibc-9999.ebuild index be59607e3e48..a5188ebe2212 100644 --- a/dev-libs/uclibc/uclibc-9999.ebuild +++ b/dev-libs/uclibc/uclibc-9999.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-9999.ebuild,v 1.4 2004/09/06 19:07:39 ciaranm Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-9999.ebuild,v 1.5 2005/01/11 06:19:57 vapier Exp $ ECVS_SERVER="uclibc.org:/var/cvs" ECVS_MODULE="uClibc" |