diff options
author | Ned Ludd <solar@gentoo.org> | 2008-05-05 18:50:22 +0000 |
---|---|---|
committer | Ned Ludd <solar@gentoo.org> | 2008-05-05 18:50:22 +0000 |
commit | 9f0ef41f301e62f6aa52cb7f8e99d3fdb161fc6e (patch) | |
tree | 383e1705e1f4031510ced056737d2996b74cd2e9 /sys-libs/uclibc | |
parent | Stable for HPPA (bug #219716). (diff) | |
download | historical-9f0ef41f301e62f6aa52cb7f8e99d3fdb161fc6e.tar.gz historical-9f0ef41f301e62f6aa52cb7f8e99d3fdb161fc6e.tar.bz2 historical-9f0ef41f301e62f6aa52cb7f8e99d3fdb161fc6e.zip |
- little cleanup and add the realpath patch from bug 125701 to address the sandbox problem with coreutils
Package-Manager: portage-2.1.3.19
Diffstat (limited to 'sys-libs/uclibc')
-rw-r--r-- | sys-libs/uclibc/ChangeLog | 12 | ||||
-rw-r--r-- | sys-libs/uclibc/Manifest | 22 | ||||
-rw-r--r-- | sys-libs/uclibc/uclibc-0.9.28-r1.ebuild | 455 | ||||
-rw-r--r-- | sys-libs/uclibc/uclibc-0.9.28-r2.ebuild | 455 | ||||
-rw-r--r-- | sys-libs/uclibc/uclibc-0.9.28.1.ebuild | 456 | ||||
-rw-r--r-- | sys-libs/uclibc/uclibc-0.9.28.3-r1.ebuild | 459 | ||||
-rw-r--r-- | sys-libs/uclibc/uclibc-0.9.28.3-r2.ebuild | 459 | ||||
-rw-r--r-- | sys-libs/uclibc/uclibc-0.9.28.3-r4.ebuild | 459 | ||||
-rw-r--r-- | sys-libs/uclibc/uclibc-0.9.28.3-r6.ebuild (renamed from sys-libs/uclibc/uclibc-0.9.28.3-r5.ebuild) | 4 | ||||
-rw-r--r-- | sys-libs/uclibc/uclibc-0.9.28.ebuild | 455 |
10 files changed, 16 insertions, 3220 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog index 8e656e77c9af..25c4fb23c4be 100644 --- a/sys-libs/uclibc/ChangeLog +++ b/sys-libs/uclibc/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sys-libs/uclibc # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.33 2008/05/04 18:54:21 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.34 2008/05/05 18:50:22 solar Exp $ + +*uclibc-0.9.28.3-r6 (05 May 2008) + + 05 May 2008; <solar@gentoo.org> -uclibc-0.9.28.ebuild, + -uclibc-0.9.28-r1.ebuild, -uclibc-0.9.28-r2.ebuild, + -uclibc-0.9.28.1.ebuild, -uclibc-0.9.28.3-r1.ebuild, + -uclibc-0.9.28.3-r2.ebuild, -uclibc-0.9.28.3-r4.ebuild, + -uclibc-0.9.28.3-r5.ebuild, +uclibc-0.9.28.3-r6.ebuild: + - little cleanup and add the realpath patch from bug 125701 to address the + sandbox problem with coreutils *uclibc-0.9.28.3-r5 (04 May 2008) diff --git a/sys-libs/uclibc/Manifest b/sys-libs/uclibc/Manifest index 6a633a663ebd..42ed649f8b82 100644 --- a/sys-libs/uclibc/Manifest +++ b/sys-libs/uclibc/Manifest @@ -1,30 +1,14 @@ DIST uClibc-0.9.27-cvs-update-20050114.patch.bz2 839 RMD160 08439855b6dc481216132d3882b8f634ecbe4555 SHA1 0e1a400745f0cbd739c6c08f45951eea836b1102 SHA256 83b86570ed0f0109f2ff04e753daf18a9bf59eab5b01b8d04a2406bb4100c423 DIST uClibc-0.9.27-patches-1.6.tar.bz2 24001 RMD160 eca81853e00e5144c165b2eb4733059d53f93234 SHA1 93beb60660145c1b661c577f1e89a7217841c0c9 SHA256 78ff8162423b5563b1a97ae5294ab1e919b9489e171962053da54c04ee127797 DIST uClibc-0.9.27.tar.bz2 1693895 RMD160 4c580c0c468bcd7e77a6b4223847f17b6ad241cc SHA1 e0de53949998253e25e6b946b564062babb723b4 SHA256 d43098b9d1cac5cc983672f885d82b59459c3abcb12ef8141653581c77cd0d9c -DIST uClibc-0.9.28-patches-1.3.tar.bz2 22522 RMD160 f12b3f4b3131a4a76767b089f1b813182192f8e5 SHA1 948558b10df5c7ce295ef8bfad4f13aa91fafb70 SHA256 362047c2773ad2e328dfd59e0033f5fc111afc571c34c2de90a822616fc29a9b -DIST uClibc-0.9.28-patches-1.6.tar.bz2 28097 RMD160 b171d9e20fd80550e4aca83fbc1bf781c58823ca SHA1 1dd0976281aaeec82ace1f0c20bd4d0cf65201ba SHA256 4b3e78582e836bd06fc7bbf1e1a0e6cd9037a8b06746e14b87006654c266631e -DIST uClibc-0.9.28-patches-1.7.tar.bz2 31188 RMD160 aab3e3cc52c22b88b477259aa1b162755df24ae4 SHA1 e47dac600ace9128a728cb1486d64fc564da6cc7 SHA256 331dc7ee32eede26f72c1af564f22d99d8d7f1902dbee85fa778e779d0747e55 -DIST uClibc-0.9.28.1-patches-1.0.tar.bz2 16654 RMD160 5114240c7dcd95c908a5ee956e10e7f52c96053e SHA1 3ed65a6808b9aa182036bf3059e9a51163799030 SHA256 d91f0a458c6f35eb862f6bb54daf74eb7e58d4c2543cf6dd0ac01d2eade51314 -DIST uClibc-0.9.28.1.tar.bz2 1782149 RMD160 7b225c5554427045732fecc4a1771e7847a9186e SHA1 3b7e34d05697456f5afe23d8666fad1c458813d6 SHA256 0b4381eb3a99948958dec592a7cc64bd5a07195139f5ee6d8d687f4d45b1ee56 DIST uClibc-0.9.28.3-patches-1.0.tar.bz2 16079 RMD160 2224a7b826932fcd5c96a0bddb30fcfa4173de35 SHA1 098f90da4879bc3a14afe662f19163c969bde431 SHA256 c432d869fc3e8a4e2137541e8a1ab93e7d634387d9ca5131842721f4b080b72e -DIST uClibc-0.9.28.3-patches-1.1.tar.bz2 16766 RMD160 db2b641782f3605dc03a549c6dc0774d25644ae6 SHA1 85592a518eec9cac9ce076eecafccc714d6cea4e SHA256 6e71f8ebf8fc3b9e21297d161ed7880fe7bad9d95ef23583fa5a60e0bd52c0ca -DIST uClibc-0.9.28.3-patches-1.2.tar.bz2 17096 RMD160 f7ab3b4ff648c6c39edd53145bd95678b1d38093 SHA1 be59a9ebb2f14a1e26c9241282b0e1f0d095e6d6 SHA256 cbcf7d5e2923335d4123bc713357a236329c1bb58bb3acb0d11e63c517c6d0d7 DIST uClibc-0.9.28.3-patches-1.3.tar.bz2 21241 RMD160 c78dda0bdbc751721559d91bdd60a29e5260007b SHA1 f89a0bd18fbda1101ad419c3abc06068dd237776 SHA256 b3a3a98798861e38525082884b4a5be1ab42d281c2680db3ddc0085d031aa397 -DIST uClibc-0.9.28.3-patches-1.5.tar.bz2 21478 RMD160 a01a0d95d20b1879633c134a0f05e700d36aa47d SHA1 ab7c66a040b68d6e48af36c832f7c113d7cebf74 SHA256 f789b2449c04ef5df35ae660355128181a6eff655b220cdcf1b9f0adb01db29f -DIST uClibc-0.9.28.3-patches-1.6.tar.bz2 22615 RMD160 1a3e4a982d38cfcd0507423cae5c71a1f0d72f23 SHA1 a05e2d482d2d6e01f8720c497d5e1ca8a00e0421 SHA256 21807328be047e0008432d6254bdc0d8b1677df6d947cd54cfb882e63c4b81c0 +DIST uClibc-0.9.28.3-patches-1.7.tar.bz2 22796 RMD160 73c13613f93115533b5b2065ab65ef8d18cf67a2 SHA1 8f072be977039725a080438ce13e8ed7e23337e5 SHA256 936f744539787ee0537ca733efbee6323cb48ad9e11d52aba2971e6cfe89b915 DIST uClibc-0.9.28.3.tar.bz2 1795383 RMD160 61591281f4193d4dcd0fa3252fb3286028d4cb63 SHA1 77c5220697a1772d0d9da4bda0d866e4f4b68540 SHA256 1d86d5dad6060e7057cfe023ffc7b7661bdc7fe95112b37447851c0a75b547a1 -DIST uClibc-0.9.28.tar.bz2 1763847 RMD160 41646bd94459a9c6f10aea4a4483fa4fedf30e7d SHA1 9124a6e5b0454da3f967725d54fde806189ad27b SHA256 c8bc5383eafaa299e9874ae50acc6549f8b54bc29ed64a9a3387b3e4cd7f4bcb DIST uClibc-locale-030818.tgz 236073 RMD160 8e3f4b20b94e07e535cbbbe81287186014c5f151 SHA1 78f901e6ed228ed84106bd034c1b97eee1eecb50 SHA256 c4362be318a38f18d98dccf462d22d95bab92f05548bb93f65298fe9afaebd57 EBUILD uclibc-0.9.27-r1.ebuild 12343 RMD160 fc942541ccf1a6f0213005b4936456705bf89bbb SHA1 fe4072f852dfa9ac1cd14af58eb73fe6bc926098 SHA256 6201d1cd508883a5bc614be83169439b9e7865ab144489cf822a37f7929376fe -EBUILD uclibc-0.9.28-r1.ebuild 14242 RMD160 270f1c4c529518db30c7372ab3555514204155cf SHA1 fac61dcfbe8cb622fc12c0de3cf114e28690203d SHA256 6ad7c9a88c0eca1834f5ae3a1250c63041d3b7e40b09daebb513827f59ff4f71 -EBUILD uclibc-0.9.28-r2.ebuild 14243 RMD160 a3f038d13a59367e707c85d4c02a98a02c286a3f SHA1 8cf73e7163166b6ef0e32d82f313abfb7d4f9a71 SHA256 ebce6cded52b597ff09d134a4f28efc611b02d6c89f9968b93876cd8a4132727 -EBUILD uclibc-0.9.28.1.ebuild 14283 RMD160 62091fa37af73b1f77bd339a7fb2daf504630298 SHA1 961c70c7f1f4f0fe142e2147d3dae7bb01fd7855 SHA256 454169402f21e93af2c7eceb080ed93fffb598f4710d97540006138fbc125b44 -EBUILD uclibc-0.9.28.3-r1.ebuild 14482 RMD160 8b67d88786cb67298bb82e16c71210f1cd22bedd SHA1 c69cb9b466f91e42a63e2db511e0d66f7ca6f0a8 SHA256 ce21d2372c24fcc5abb39eb5c2f2eb30b4aaf6c47a377f62f46bc34c6d7188ca -EBUILD uclibc-0.9.28.3-r2.ebuild 14481 RMD160 063fbe0096cae80eb609ee9256c04925c7ebdb9f SHA1 db46e5a09d21a45d24b0b2a897a8aa0416b06a63 SHA256 93ed42f5bd71ca5c93de03bbe8213dc0c85d1da3780a203a6a5e3c4547b5e914 EBUILD uclibc-0.9.28.3-r3.ebuild 14479 RMD160 8c98d256d1cb59dc47feb1b32903e83639323ff7 SHA1 a084eb0fa2a32c0aeb625693a2617f4ec97ce733 SHA256 90453171437194b2af4dc420628069856eaf26d59063d74e0bfc6863299c1293 -EBUILD uclibc-0.9.28.3-r4.ebuild 14483 RMD160 ef59ac03064a8758309c795e6f38cfc8a1956009 SHA1 872d949769952a0820690561623ea80969460269 SHA256 e02c98b26ad2d8152ed24ea81da136c5661da7a909ad63e58af3125783e06a8d -EBUILD uclibc-0.9.28.3-r5.ebuild 14482 RMD160 fcb90b0b23897b6adc27814aacc7ed1d01c6326c SHA1 bac600ca95a74012ab174eb4844ac67c71194b3f SHA256 bec915acb78abb51ee27fcbb96a0a883021a2d60948c56bff0060e0d45a37c65 +EBUILD uclibc-0.9.28.3-r6.ebuild 14482 RMD160 e3b0b96cc63a8072bae29d285d1c196425f67dd0 SHA1 fdf655357b0f8e5d73b796acf2e653f1e006150c SHA256 e777ff6a3f19e6a0e2d00dd20e07d14a428be3d0bde412b3fb7975ca113a63a7 EBUILD uclibc-0.9.28.3.ebuild 14473 RMD160 89e8993f578da9f77cf4b9b320ff0221672ff078 SHA1 6dc607dc6d665bb015deeb325efa3c2a207db09b SHA256 7e5ea21ddfd6943b3f934e917b6808c758644eb02bd84e0a55224ac8ed4e3ff6 -EBUILD uclibc-0.9.28.ebuild 14235 RMD160 fc6203de389eef708fdf583945dd77aade3b50b9 SHA1 0a1f018d57a9dee50416bcd2d50785f3dd20a7f2 SHA256 bdc000424fc7d5ffdd3639bbaeee5fdb1e54cdf22f65d831f39a98a71f4d373d -MISC ChangeLog 13139 RMD160 c97102ef409e006da989d3551ebf611e76a94859 SHA1 f94470ebbd03b600e58a8573382754afe68c6305 SHA256 177566d19cae9c0871c24bd0d9ef125405ff6ed4f7ec72abab7c46bcfc11a7e0 +MISC ChangeLog 13567 RMD160 9baac769a13c09364e416d96ce19be9462606159 SHA1 4224fcb2d32c217ff01f7ed3a7bf54e7370f901b SHA256 fbe7acca1d1f082435e79990e3cba34bcc63f0c7ea6a84a9cf644b985e7eda22 MISC metadata.xml 999 RMD160 8367607c1e522c03d21a0f0ce68b316d42bd08cb SHA1 0433f3a405603e702c155ec67f67cb95bf628a1c SHA256 0be91c12da3e7c119ee885d360c0e983a69f0141614902bb2de6c54c08d4c56c diff --git a/sys-libs/uclibc/uclibc-0.9.28-r1.ebuild b/sys-libs/uclibc/uclibc-0.9.28-r1.ebuild deleted file mode 100644 index b5ca48bf0ca2..000000000000 --- a/sys-libs/uclibc/uclibc-0.9.28-r1.ebuild +++ /dev/null @@ -1,455 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28-r1.ebuild,v 1.15 2008/03/24 19:30:04 solar Exp $ - -#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" -#inherit subversion -inherit eutils flag-o-matic toolchain-funcs - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; 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 -fi - -MY_P=uClibc-${PV} -SVN_VER="" -PATCH_VER="1.6" -DESCRIPTION="C library for developing embedded Linux systems" -HOMEPAGE="http://www.uclibc.org/" -SRC_URI="http://www.kernel.org/pub/linux/libs/uclibc/${MY_P}.tar.bz2 - nls? ( !userlocales? ( pregen? ( - x86? ( http://www.uclibc.org/downloads/uClibc-locale-030818.tgz ) - ) ) )" -[[ -z ${SVN_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-svn-update-${SVN_VER}.patch.bz2" -[[ -z ${PATCH_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2" - -LICENSE="LGPL-2" -[[ ${CTARGET} != ${CHOST} ]] \ - && SLOT="${CTARGET}" \ - || SLOT="0" -KEYWORDS="-* ~arm ~m68k -mips ppc ~sh ~sparc x86" -IUSE="build uclibc-compat debug hardened iconv ipv6 minimal nls pregen savedconfig userlocales wordexp" -RESTRICT="strip" - -RDEPEND="" -if [[ ${CTARGET} == ${CHOST} ]] ; then - DEPEND="virtual/os-headers app-misc/pax-utils" - PROVIDE="virtual/libc" -else - DEPEND="" -fi - -S=${WORKDIR}/${MY_P} - -alt_build_kprefix() { - if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \ - || [[ -n ${UCLIBC_AND_GLIBC} ]] - then - echo /usr - else - echo /usr/${CTARGET}/usr - fi -} -just_headers() { - use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] -} - -uclibc_endian() { - # XXX: this wont work for a toolchain which is bi-endian, but we - # dont have any such thing at the moment, so not a big deal - touch "${T}"/endian.s - $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o - case $(file "${T}"/endian.o) in - *" MSB "*) echo "big";; - *" LSB "*) echo "little";; - *) echo "NFC";; - esac - rm -f "${T}"/endian.{s,o} -} - -pkg_setup() { - just_headers && return 0 - has_version ${CATEGORY}/uclibc || return 0 - [[ -n ${UCLIBC_AND_GLIBC} ]] && return 0 - [[ ${ROOT} != "/" ]] && return 0 - - if ! built_with_use --missing false ${CATEGORY}/uclibc nls && use nls && ! use pregen ; then - eerror "You previously built uclibc with USE=-nls." - eerror "You cannot generate locale data with this" - eerror "system. Please rerun emerge with USE=pregen." - die "host cannot support locales" - elif built_with_use --missing false ${CATEGORY}/uclibc nls && ! use nls ; then - eerror "You previously built uclibc with USE=nls." - eerror "Rebuilding uClibc with USE=-nls will prob" - eerror "destroy your system." - die "switching from nls is baaaad" - fi -} - -PIE_STABLE="arm mips ppc x86" - -CPU_ALPHA="" -CPU_AMD64="" -CPU_ARM="GENERIC_ARM ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}" -CPU_IA64="" -CPU_M68K="" -CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}}" -CPU_PPC="" -CPU_SH="SH{2,3,4,5}" -CPU_SPARC="" -CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX 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_SPARC} ${CPU_X86}" - -check_cpu_opts() { - local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])" - [[ -z ${!cpu_var} ]] && return 0 - - 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:" - UCLIBC_CPU=$(eval echo ${!cpu_var}) - echo ${UCLIBC_CPU} - case ${CTARGET} in - mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; - sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; - i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; - *) export UCLIBC_CPU=${UCLIBC_CPU%% *};; - esac - else - local cpu found=0 - for cpu in $(eval echo ${!cpu_var}) ; do - [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break - done - 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 -} - -src_unpack() { - [[ -n ${ESVN_REPO_URI} ]] \ - && subversion_src_unpack \ - || unpack ${A} - cd "${S}" - - check_cpu_opts - - echo - einfo "Runtime Prefix: /" - einfo "Devel Prefix: /usr" - einfo "Kernel Prefix: $(alt_build_kprefix)" - einfo "CBUILD: ${CBUILD}" - einfo "CHOST: ${CHOST}" - einfo "CTARGET: ${CTARGET}" - einfo "CPU: ${UCLIBC_CPU:-default}" - einfo "ENDIAN: $(uclibc_endian)" - echo - - ########## PATCHES ########## - - [[ -n ${SVN_VER} ]] && \ - epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch - - if [[ -n ${PATCH_VER} ]] ; then - unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 - EPATCH_SUFFIX="patch" - epatch "${WORKDIR}"/patch - # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f) - cp "${WORKDIR}"/patch/math/libm/* "${S}"/libm/ || die - epatch "${WORKDIR}"/patch/math - fi - - ########## CPU SELECTION ########## - - local target config_target - case $(tc-arch) in - alpha) target="alpha"; config_target="no cpu-specific options";; - amd64) target="x86_64"; config_target="no cpu-specific options";; - arm) target="arm"; config_target="GENERIC_ARM";; - ia64) target="ia64"; config_target="no cpu-specific options";; - m68k) target="m68k"; config_target="no cpu-specific options";; - mips) target="mips"; config_target="MIPS_ISA_1";; - ppc) target="powerpc"; config_target="no cpu-specific options";; - sh) target="sh"; config_target="SH4";; - sparc) target="sparc"; config_target="no cpu-specific options";; - x86) target="i386"; config_target="GENERIC_386";; - *) die "$(tc-arch) lists no defaults :/";; - esac - sed -i -e "s:default TARGET_i386:default TARGET_${target}:" \ - extra/Configs/Config.in - sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ - extra/Configs/Config.${target} - - ########## CONFIG SETUP ########## - - make defconfig >/dev/null || die "could not config" - - for def in DO{DEBUG{,_PT},ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do - sed -i -e "s:${def}=y:# ${def} is not set:" .config - done - if use debug ; then - #echo "SUPPORT_LD_DEBUG_EARLY=y" >> .config - echo "SUPPORT_LD_DEBUG=y" >> .config - echo "DODEBUG=y" >> .config - #echo "DODEBUG_PT=y" >> .config - fi - - sed -i -e '/ARCH_.*_ENDIAN/d' .config - echo "ARCH_$(uclibc_endian | tr [a-z] [A-Z])_ENDIAN=y" >> .config - - if [[ $(tc-is-softfloat) != "no" ]] ; then - sed -i -e '/^HAS_FPU=y$/d' .config - echo 'HAS_FPU=n' >> .config - fi - - local moredefs="DL_FINI_CRT_COMPAT" - # We need todo this for a few months. .28 is a major upgrade. - # Don't do it from cross-compiling case though - if ! use uclibc-compat ; then - if [[ -z ${UCLIBC_AND_GLIBC} ]] && [[ -z ${UCLIBC_SCANNED_COMPAT} ]] && \ - ! just_headers && [[ ${CHOST} == ${CTARGET} ]] ; then - local fnames="" - einfo "Doing a scanelf in paths for bins containing the __uClibc_start_main symbol" - fnames=$(scanelf -pyqs__uClibc_start_main -F%F#s) - if [[ -z ${fnames} ]] ; then - einfo "This system is clean." - einfo "To prevent the scanning of files again in the future you can export UCLIBC_SCANNED_COMPAT=1" - moredefs="" - else - ewarn "You need to remerge the packages that contain the following files before you can remerge ${P} without USE=uclibc-compat enabled." - ewarn "qfile ${fnames}" - echo - ewarn "Leaving on ${moredefs}" - fi - else - moredefs="" - fi - fi - for def in ${moredefs} MALLOC_GLIBC_COMPAT 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 - done - echo "UCLIBC_HAS_FULL_RPC=y" >> .config - echo "PTHREADS_DEBUG_SUPPORT=y" >> .config - echo "UCLIBC_HAS_TZ_FILE_READ_MANY=n" >> .config - - if use iconv ; then - sed -i -e "s:# UCLIBC_HAS_LOCALE is not set:UCLIBC_HAS_LOCALE=y:" .config - echo "UCLIBC_HAS_XLOCALE=n" >> .config - echo "UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y" >> .config - echo "UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y" >> .config - - if use nls ; then - echo "UCLIBC_HAS_GETTEXT_AWARENESS=y" >> .config - else - echo "UCLIBC_HAS_GETTEXT_AWARENESS=n" >> .config - fi - - if use pregen ; then - echo "UCLIBC_PREGENERATED_LOCALE_DATA=y" >> .config - echo "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=y" >> .config - if use userlocales ; then - cp "${DISTDIR}"/${MY_P}-user-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy ${MY_P}-user-locale.tar.gz" - else - cp "${DISTDIR}"/${MY_P}-$(tc-arch)-full-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy locale" - fi - else - echo "UCLIBC_PREGENERATED_LOCALE_DATA=n" >> .config - fi - else - echo "UCLIBC_HAS_LOCALE=n" >> .config - fi - - 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 wordexp && 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 - echo "UCLIBC_HAS_SSP=y" >> .config - echo "SSP_USE_ERANDOM=n" >> .config - echo "PROPOLICE_BLOCK_ABRT=n" >> .config - if use debug ; then - echo "PROPOLICE_BLOCK_SEGV=y" >> .config - echo "PROPOLICE_BLOCK_KILL=n" >> .config - else - echo "PROPOLICE_BLOCK_SEGV=n" >> .config - echo "PROPOLICE_BLOCK_KILL=y" >> .config - fi - - # arm/mips do not emit PT_GNU_STACK, but if we enable this here - # it will be emitted as RWE, ppc has to be checked, x86 needs it - # this option should be used independently of hardened - # relro could be also moved out of hardened - if has $(tc-arch) x86 ; then - echo "UCLIBC_BUILD_NOEXECSTACK=y" >> .config - else - echo "UCLIBC_BUILD_NOEXECSTACK=n" >> .config - fi - echo "UCLIBC_BUILD_RELRO=y" >> .config - if use hardened ; then - if has $(tc-arch) ${PIE_STABLE} ; then - echo "UCLIBC_BUILD_PIE=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - fi - echo "SSP_QUICK_CANARY=n" >> .config - echo "UCLIBC_BUILD_SSP=y" >> .config - echo "UCLIBC_BUILD_NOW=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - echo "SSP_QUICK_CANARY=y" >> .config - echo "UCLIBC_BUILD_SSP=n" >> .config - echo "UCLIBC_BUILD_NOW=n" >> .config - fi - - # Allow users some custom control over the config - if use savedconfig ; then - for conf in ${PN}-${PV}-${PR} ${PN}-${PV} ${PN}; do - configfile=${ROOT}/etc/${PN}/${CTARGET}/${conf}.config - einfo "Checking existence of ${configfile} ..." - [[ -r ${configfile} ]] || configfile=/etc/${PN}/${CHOST}/${conf}.config - if [[ -r ${configfile} ]] ; then - cp "${configfile}" "${S}"/.config - einfo "Found your ${configfile} and using it." - einfo "Note that this feature is *totally unsupported*." - break - fi - done - fi - - # setup build and run paths - local cross=${CTARGET}- - type -p ${cross}ar > /dev/null || cross="" - sed -i \ - -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \ - -e "/^KERNEL_SOURCE/s:=.*:=\"$(alt_build_kprefix)\":" \ - -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ - -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ - -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ - .config || die - - yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig" - - cp .config myconfig - - emake -s clean > /dev/null || die "could not clean" -} - -setup_locales() { - cd "${S}"/extra/locale - if use userlocales && [[ -f ${ROOT}/etc/locales.build ]] ; then - :; - elif use minimal ; then - find ./charmaps -name ASCII.pairs > codesets.txt - find ./charmaps -name ISO-8859-1.pairs >> codesets.txt - cat <<-EOF > locales.txt - @euro e - UTF-8 yes - 8-bit yes - en_US ISO-8859-1 - en_US.UTF-8 UTF-8 - EOF - else - find ./charmaps -name '*.pairs' > codesets.txt - cp LOCALES locales.txt - fi - cd - -} - -src_compile() { - cp myconfig .config - - emake headers || die "make headers failed" - just_headers && return 0 - - if use iconv && ! use pregen ; then - cd extra/locale - make clean || die "make locale clean failed" - setup_locales - emake || die "make locales failed" - cd ../.. - fi - - emake || die "make failed" - [[ ${CTARGET} != ${CHOST} ]] && return 0 - - if [[ ${CHOST} == *-uclibc ]] ; then - emake utils || die "make utils failed" - fi -} - -src_test() { - [[ ${CHOST} != ${CTARGET} ]] && return 0 - [[ ${CBUILD} != ${CHOST} ]] && return 0 - - # assert test fails on pax/grsec enabled kernels - normal - # vfork test fails in sandbox (both glibc/uclibc) - make UCLIBC_ONLY=1 check || die "test failed" -} - -src_install() { - local sysroot=${D} - [[ ${CHOST} != ${CTARGET} ]] && sysroot="${sysroot}/usr/${CTARGET}" - - local target="install" - just_headers && target="install_dev" - make DESTDIR="${sysroot}" ${target} || die "install failed" - - # remove files coming from kernel-headers - rm -rf "${sysroot}"/usr/include/{linux,asm*} - - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - if [[ ${CTARGET} != ${CHOST} ]] ; then - dosym usr/include /usr/${CTARGET}/sys-include - return 0 - fi - - if [[ ${CHOST} == *-uclibc ]] ; then - make DESTDIR="${D}" install_utils || die "install-utils failed" - dobin extra/scripts/getent - fi - - if ! use build ; then - dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 - doman docs/man/*.[1-9] - fi -} - -pkg_postinst() { - [[ ${CTARGET} != ${CHOST} ]] && return 0 - [[ ${CHOST} != *-uclibc ]] && return 0 - - if [[ ! -e ${ROOT}/etc/TZ ]] ; then - ewarn "Please remember to set your timezone in /etc/TZ" - [[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc - echo "UTC" > "${ROOT}"/etc/TZ - fi - - if [[ ${ROOT} == "/" ]] ; then - # update cache before reloading init - /sbin/ldconfig - # reload init ... - [[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null - fi -} diff --git a/sys-libs/uclibc/uclibc-0.9.28-r2.ebuild b/sys-libs/uclibc/uclibc-0.9.28-r2.ebuild deleted file mode 100644 index 3422626eeee5..000000000000 --- a/sys-libs/uclibc/uclibc-0.9.28-r2.ebuild +++ /dev/null @@ -1,455 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28-r2.ebuild,v 1.10 2008/03/24 19:30:04 solar Exp $ - -#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" -#inherit subversion -inherit eutils flag-o-matic toolchain-funcs - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; 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 -fi - -MY_P=uClibc-${PV} -SVN_VER="" -PATCH_VER="1.7" -DESCRIPTION="C library for developing embedded Linux systems" -HOMEPAGE="http://www.uclibc.org/" -SRC_URI="http://www.kernel.org/pub/linux/libs/uclibc/${MY_P}.tar.bz2 - nls? ( !userlocales? ( pregen? ( - x86? ( http://www.uclibc.org/downloads/uClibc-locale-030818.tgz ) - ) ) )" -[[ -z ${SVN_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-svn-update-${SVN_VER}.patch.bz2" -[[ -z ${PATCH_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2" - -LICENSE="LGPL-2" -[[ ${CTARGET} != ${CHOST} ]] \ - && SLOT="${CTARGET}" \ - || SLOT="0" -KEYWORDS="-* ~arm ~m68k -mips ~ppc ~sh ~sparc x86" -IUSE="build uclibc-compat debug hardened iconv ipv6 minimal nls pregen savedconfig userlocales wordexp" -RESTRICT="strip" - -RDEPEND="" -if [[ ${CTARGET} == ${CHOST} ]] ; then - DEPEND="virtual/os-headers app-misc/pax-utils" - PROVIDE="virtual/libc" -else - DEPEND="" -fi - -S=${WORKDIR}/${MY_P} - -alt_build_kprefix() { - if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \ - || [[ -n ${UCLIBC_AND_GLIBC} ]] - then - echo /usr - else - echo /usr/${CTARGET}/usr - fi -} -just_headers() { - use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] -} - -uclibc_endian() { - # XXX: this wont work for a toolchain which is bi-endian, but we - # dont have any such thing at the moment, so not a big deal - touch "${T}"/endian.s - $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o - case $(file "${T}"/endian.o) in - *" MSB "*) echo "big";; - *" LSB "*) echo "little";; - *) echo "NFC";; - esac - rm -f "${T}"/endian.{s,o} -} - -pkg_setup() { - just_headers && return 0 - has_version ${CATEGORY}/uclibc || return 0 - [[ -n ${UCLIBC_AND_GLIBC} ]] && return 0 - [[ ${ROOT} != "/" ]] && return 0 - - if ! built_with_use --missing false ${CATEGORY}/uclibc nls && use nls && ! use pregen ; then - eerror "You previously built uclibc with USE=-nls." - eerror "You cannot generate locale data with this" - eerror "system. Please rerun emerge with USE=pregen." - die "host cannot support locales" - elif built_with_use --missing false ${CATEGORY}/uclibc nls && ! use nls ; then - eerror "You previously built uclibc with USE=nls." - eerror "Rebuilding uClibc with USE=-nls will prob" - eerror "destroy your system." - die "switching from nls is baaaad" - fi -} - -PIE_STABLE="arm mips ppc x86" - -CPU_ALPHA="" -CPU_AMD64="" -CPU_ARM="GENERIC_ARM ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}" -CPU_IA64="" -CPU_M68K="" -CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}}" -CPU_PPC="" -CPU_SH="SH{2,3,4,5}" -CPU_SPARC="" -CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX 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_SPARC} ${CPU_X86}" - -check_cpu_opts() { - local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])" - [[ -z ${!cpu_var} ]] && return 0 - - 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:" - UCLIBC_CPU=$(eval echo ${!cpu_var}) - echo ${UCLIBC_CPU} - case ${CTARGET} in - mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; - sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; - i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; - *) export UCLIBC_CPU=${UCLIBC_CPU%% *};; - esac - else - local cpu found=0 - for cpu in $(eval echo ${!cpu_var}) ; do - [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break - done - 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 -} - -src_unpack() { - [[ -n ${ESVN_REPO_URI} ]] \ - && subversion_src_unpack \ - || unpack ${A} - cd "${S}" - - check_cpu_opts - - echo - einfo "Runtime Prefix: /" - einfo "Devel Prefix: /usr" - einfo "Kernel Prefix: $(alt_build_kprefix)" - einfo "CBUILD: ${CBUILD}" - einfo "CHOST: ${CHOST}" - einfo "CTARGET: ${CTARGET}" - einfo "CPU: ${UCLIBC_CPU:-default}" - einfo "ENDIAN: $(uclibc_endian)" - echo - - ########## PATCHES ########## - - [[ -n ${SVN_VER} ]] && \ - epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch - - if [[ -n ${PATCH_VER} ]] ; then - unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 - EPATCH_SUFFIX="patch" - epatch "${WORKDIR}"/patch - # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f) - cp "${WORKDIR}"/patch/math/libm/* "${S}"/libm/ || die - epatch "${WORKDIR}"/patch/math - fi - - ########## CPU SELECTION ########## - - local target config_target - case $(tc-arch) in - alpha) target="alpha"; config_target="no cpu-specific options";; - amd64) target="x86_64"; config_target="no cpu-specific options";; - arm) target="arm"; config_target="GENERIC_ARM";; - ia64) target="ia64"; config_target="no cpu-specific options";; - m68k) target="m68k"; config_target="no cpu-specific options";; - mips) target="mips"; config_target="MIPS_ISA_1";; - ppc) target="powerpc"; config_target="no cpu-specific options";; - sh) target="sh"; config_target="SH4";; - sparc) target="sparc"; config_target="no cpu-specific options";; - x86) target="i386"; config_target="GENERIC_386";; - *) die "$(tc-arch) lists no defaults :/";; - esac - sed -i -e "s:default TARGET_i386:default TARGET_${target}:" \ - extra/Configs/Config.in - sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ - extra/Configs/Config.${target} - - ########## CONFIG SETUP ########## - - make defconfig >/dev/null || die "could not config" - - for def in DO{DEBUG{,_PT},ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do - sed -i -e "s:${def}=y:# ${def} is not set:" .config - done - if use debug ; then - #echo "SUPPORT_LD_DEBUG_EARLY=y" >> .config - echo "SUPPORT_LD_DEBUG=y" >> .config - echo "DODEBUG=y" >> .config - #echo "DODEBUG_PT=y" >> .config - fi - - sed -i -e '/ARCH_.*_ENDIAN/d' .config - echo "ARCH_$(uclibc_endian | tr [a-z] [A-Z])_ENDIAN=y" >> .config - - if [[ $(tc-is-softfloat) != "no" ]] ; then - sed -i -e '/^HAS_FPU=y$/d' .config - echo 'HAS_FPU=n' >> .config - fi - - local moredefs="DL_FINI_CRT_COMPAT" - # We need todo this for a few months. .28 is a major upgrade. - # Don't do it from cross-compiling case though - if ! use uclibc-compat ; then - if [[ -z ${UCLIBC_AND_GLIBC} ]] && [[ -z ${UCLIBC_SCANNED_COMPAT} ]] && \ - ! just_headers && [[ ${CHOST} == ${CTARGET} ]] ; then - local fnames="" - einfo "Doing a scanelf in paths for bins containing the __uClibc_start_main symbol" - fnames=$(scanelf -pyqs__uClibc_start_main -F%F#s) - if [[ -z ${fnames} ]] ; then - einfo "This system is clean." - einfo "To prevent the scanning of files again in the future you can export UCLIBC_SCANNED_COMPAT=1" - moredefs="" - else - ewarn "You need to remerge the packages that contain the following files before you can remerge ${P} without USE=uclibc-compat enabled." - ewarn "qfile ${fnames}" - echo - ewarn "Leaving on ${moredefs}" - fi - else - moredefs="" - fi - fi - for def in ${moredefs} MALLOC_GLIBC_COMPAT 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 - done - echo "UCLIBC_HAS_FULL_RPC=y" >> .config - echo "PTHREADS_DEBUG_SUPPORT=y" >> .config - echo "UCLIBC_HAS_TZ_FILE_READ_MANY=n" >> .config - - if use iconv ; then - sed -i -e "s:# UCLIBC_HAS_LOCALE is not set:UCLIBC_HAS_LOCALE=y:" .config - echo "UCLIBC_HAS_XLOCALE=n" >> .config - echo "UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y" >> .config - echo "UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y" >> .config - - if use nls ; then - echo "UCLIBC_HAS_GETTEXT_AWARENESS=y" >> .config - else - echo "UCLIBC_HAS_GETTEXT_AWARENESS=n" >> .config - fi - - if use pregen ; then - echo "UCLIBC_PREGENERATED_LOCALE_DATA=y" >> .config - echo "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=y" >> .config - if use userlocales ; then - cp "${DISTDIR}"/${MY_P}-user-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy ${MY_P}-user-locale.tar.gz" - else - cp "${DISTDIR}"/${MY_P}-$(tc-arch)-full-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy locale" - fi - else - echo "UCLIBC_PREGENERATED_LOCALE_DATA=n" >> .config - fi - else - echo "UCLIBC_HAS_LOCALE=n" >> .config - fi - - 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 wordexp && 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 - echo "UCLIBC_HAS_SSP=y" >> .config - echo "SSP_USE_ERANDOM=n" >> .config - echo "PROPOLICE_BLOCK_ABRT=n" >> .config - if use debug ; then - echo "PROPOLICE_BLOCK_SEGV=y" >> .config - echo "PROPOLICE_BLOCK_KILL=n" >> .config - else - echo "PROPOLICE_BLOCK_SEGV=n" >> .config - echo "PROPOLICE_BLOCK_KILL=y" >> .config - fi - - # arm/mips do not emit PT_GNU_STACK, but if we enable this here - # it will be emitted as RWE, ppc has to be checked, x86 needs it - # this option should be used independently of hardened - # relro could be also moved out of hardened - if has $(tc-arch) x86 ; then - echo "UCLIBC_BUILD_NOEXECSTACK=y" >> .config - else - echo "UCLIBC_BUILD_NOEXECSTACK=n" >> .config - fi - echo "UCLIBC_BUILD_RELRO=y" >> .config - if use hardened ; then - if has $(tc-arch) ${PIE_STABLE} ; then - echo "UCLIBC_BUILD_PIE=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - fi - echo "SSP_QUICK_CANARY=n" >> .config - echo "UCLIBC_BUILD_SSP=y" >> .config - echo "UCLIBC_BUILD_NOW=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - echo "SSP_QUICK_CANARY=y" >> .config - echo "UCLIBC_BUILD_SSP=n" >> .config - echo "UCLIBC_BUILD_NOW=n" >> .config - fi - - # Allow users some custom control over the config - if use savedconfig ; then - for conf in ${PN}-${PV}-${PR} ${PN}-${PV} ${PN}; do - configfile=${ROOT}/etc/${PN}/${CTARGET}/${conf}.config - einfo "Checking existence of ${configfile} ..." - [[ -r ${configfile} ]] || configfile=/etc/${PN}/${CHOST}/${conf}.config - if [[ -r ${configfile} ]] ; then - cp "${configfile}" "${S}"/.config - einfo "Found your ${configfile} and using it." - einfo "Note that this feature is *totally unsupported*." - break - fi - done - fi - - # setup build and run paths - local cross=${CTARGET}- - type -p ${cross}ar > /dev/null || cross="" - sed -i \ - -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \ - -e "/^KERNEL_SOURCE/s:=.*:=\"$(alt_build_kprefix)\":" \ - -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ - -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ - -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ - .config || die - - yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig" - - cp .config myconfig - - emake -s clean > /dev/null || die "could not clean" -} - -setup_locales() { - cd "${S}"/extra/locale - if use userlocales && [[ -f ${ROOT}/etc/locales.build ]] ; then - :; - elif use minimal ; then - find ./charmaps -name ASCII.pairs > codesets.txt - find ./charmaps -name ISO-8859-1.pairs >> codesets.txt - cat <<-EOF > locales.txt - @euro e - UTF-8 yes - 8-bit yes - en_US ISO-8859-1 - en_US.UTF-8 UTF-8 - EOF - else - find ./charmaps -name '*.pairs' > codesets.txt - cp LOCALES locales.txt - fi - cd - -} - -src_compile() { - cp myconfig .config - - emake headers || die "make headers failed" - just_headers && return 0 - - if use iconv && ! use pregen ; then - cd extra/locale - make clean || die "make locale clean failed" - setup_locales - emake || die "make locales failed" - cd ../.. - fi - - emake || die "make failed" - [[ ${CTARGET} != ${CHOST} ]] && return 0 - - if [[ ${CHOST} == *-uclibc ]] ; then - emake utils || die "make utils failed" - fi -} - -src_test() { - [[ ${CHOST} != ${CTARGET} ]] && return 0 - [[ ${CBUILD} != ${CHOST} ]] && return 0 - - # assert test fails on pax/grsec enabled kernels - normal - # vfork test fails in sandbox (both glibc/uclibc) - make UCLIBC_ONLY=1 check || die "test failed" -} - -src_install() { - local sysroot=${D} - [[ ${CHOST} != ${CTARGET} ]] && sysroot="${sysroot}/usr/${CTARGET}" - - local target="install" - just_headers && target="install_dev" - make DESTDIR="${sysroot}" ${target} || die "install failed" - - # remove files coming from kernel-headers - rm -rf "${sysroot}"/usr/include/{linux,asm*} - - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - if [[ ${CTARGET} != ${CHOST} ]] ; then - dosym usr/include /usr/${CTARGET}/sys-include - return 0 - fi - - if [[ ${CHOST} == *-uclibc ]] ; then - make DESTDIR="${D}" install_utils || die "install-utils failed" - dobin extra/scripts/getent - fi - - if ! use build ; then - dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 - doman docs/man/*.[1-9] - fi -} - -pkg_postinst() { - [[ ${CTARGET} != ${CHOST} ]] && return 0 - [[ ${CHOST} != *-uclibc ]] && return 0 - - if [[ ! -e ${ROOT}/etc/TZ ]] ; then - ewarn "Please remember to set your timezone in /etc/TZ" - [[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc - echo "UTC" > "${ROOT}"/etc/TZ - fi - - if [[ ${ROOT} == "/" ]] ; then - # update cache before reloading init - /sbin/ldconfig - # reload init ... - [[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null - fi -} diff --git a/sys-libs/uclibc/uclibc-0.9.28.1.ebuild b/sys-libs/uclibc/uclibc-0.9.28.1.ebuild deleted file mode 100644 index f02a5162c280..000000000000 --- a/sys-libs/uclibc/uclibc-0.9.28.1.ebuild +++ /dev/null @@ -1,456 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.1.ebuild,v 1.8 2008/03/24 19:30:04 solar Exp $ - -#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" -#inherit subversion -inherit eutils flag-o-matic toolchain-funcs - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; 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 -fi - -MY_P=uClibc-${PV} -SVN_VER="" -PATCH_VER="1.0" -DESCRIPTION="C library for developing embedded Linux systems" -HOMEPAGE="http://www.uclibc.org/" -SRC_URI="http://www.kernel.org/pub/linux/libs/uclibc/${MY_P}.tar.bz2 - nls? ( !userlocales? ( pregen? ( - x86? ( http://www.uclibc.org/downloads/uClibc-locale-030818.tgz ) - ) ) )" -[[ -z ${SVN_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-svn-update-${SVN_VER}.patch.bz2" -[[ -z ${PATCH_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2" - -LICENSE="LGPL-2" -[[ ${CTARGET} != ${CHOST} ]] \ - && SLOT="${CTARGET}" \ - || SLOT="0" -KEYWORDS="-* ~arm ~m68k -mips ~ppc ~sh ~sparc x86" -IUSE="build uclibc-compat debug hardened iconv ipv6 minimal nls pregen savedconfig userlocales wordexp" -RESTRICT="strip" - -RDEPEND="" -if [[ ${CTARGET} == ${CHOST} ]] ; then - DEPEND="virtual/os-headers app-misc/pax-utils" - PROVIDE="virtual/libc" -else - DEPEND="" -fi - -S=${WORKDIR}/${MY_P} - -alt_build_kprefix() { - if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \ - || [[ -n ${UCLIBC_AND_GLIBC} ]] - then - echo /usr - else - echo /usr/${CTARGET}/usr - fi -} -just_headers() { - use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] -} - -uclibc_endian() { - # XXX: this wont work for a toolchain which is bi-endian, but we - # dont have any such thing at the moment, so not a big deal - touch "${T}"/endian.s - $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o - case $(file "${T}"/endian.o) in - *" MSB "*) echo "big";; - *" LSB "*) echo "little";; - *) echo "NFC";; - esac - rm -f "${T}"/endian.{s,o} -} - -pkg_setup() { - just_headers && return 0 - has_version ${CATEGORY}/uclibc || return 0 - [[ -n ${UCLIBC_AND_GLIBC} ]] && return 0 - [[ ${ROOT} != "/" ]] && return 0 - [[ ${CATEGORY} == cross-* ]] && return 0 - - if ! built_with_use --missing false ${CATEGORY}/uclibc nls && use nls && ! use pregen ; then - eerror "You previously built uclibc with USE=-nls." - eerror "You cannot generate locale data with this" - eerror "system. Please rerun emerge with USE=pregen." - die "host cannot support locales" - elif built_with_use --missing false ${CATEGORY}/uclibc nls && ! use nls ; then - eerror "You previously built uclibc with USE=nls." - eerror "Rebuilding uClibc with USE=-nls will prob" - eerror "destroy your system." - die "switching from nls is baaaad" - fi -} - -PIE_STABLE="arm mips ppc x86" - -CPU_ALPHA="" -CPU_AMD64="" -CPU_ARM="GENERIC_ARM ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}" -CPU_IA64="" -CPU_M68K="" -CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}}" -CPU_PPC="" -CPU_SH="SH{2,3,4,5}" -CPU_SPARC="" -CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX 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_SPARC} ${CPU_X86}" - -check_cpu_opts() { - local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])" - [[ -z ${!cpu_var} ]] && return 0 - - 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:" - UCLIBC_CPU=$(eval echo ${!cpu_var}) - echo ${UCLIBC_CPU} - case ${CTARGET} in - mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; - sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; - i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; - *) export UCLIBC_CPU=${UCLIBC_CPU%% *};; - esac - else - local cpu found=0 - for cpu in $(eval echo ${!cpu_var}) ; do - [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break - done - 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 -} - -src_unpack() { - [[ -n ${ESVN_REPO_URI} ]] \ - && subversion_src_unpack \ - || unpack ${A} - cd "${S}" - - check_cpu_opts - - echo - einfo "Runtime Prefix: /" - einfo "Devel Prefix: /usr" - einfo "Kernel Prefix: $(alt_build_kprefix)" - einfo "CBUILD: ${CBUILD}" - einfo "CHOST: ${CHOST}" - einfo "CTARGET: ${CTARGET}" - einfo "CPU: ${UCLIBC_CPU:-default}" - einfo "ENDIAN: $(uclibc_endian)" - echo - - ########## PATCHES ########## - - [[ -n ${SVN_VER} ]] && \ - epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch - - if [[ -n ${PATCH_VER} ]] ; then - unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 - EPATCH_SUFFIX="patch" - epatch "${WORKDIR}"/patch - # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f) - cp "${WORKDIR}"/patch/math/libm/* "${S}"/libm/ || die - epatch "${WORKDIR}"/patch/math - fi - - ########## CPU SELECTION ########## - - local target config_target - case $(tc-arch) in - alpha) target="alpha"; config_target="no cpu-specific options";; - amd64) target="x86_64"; config_target="no cpu-specific options";; - arm) target="arm"; config_target="GENERIC_ARM";; - ia64) target="ia64"; config_target="no cpu-specific options";; - m68k) target="m68k"; config_target="no cpu-specific options";; - mips) target="mips"; config_target="MIPS_ISA_1";; - ppc) target="powerpc"; config_target="no cpu-specific options";; - sh) target="sh"; config_target="SH4";; - sparc) target="sparc"; config_target="no cpu-specific options";; - x86) target="i386"; config_target="GENERIC_386";; - *) die "$(tc-arch) lists no defaults :/";; - esac - sed -i -e "s:default TARGET_i386:default TARGET_${target}:" \ - extra/Configs/Config.in - sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ - extra/Configs/Config.${target} - - ########## CONFIG SETUP ########## - - make defconfig >/dev/null || die "could not config" - - for def in DO{DEBUG{,_PT},ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do - sed -i -e "s:${def}=y:# ${def} is not set:" .config - done - if use debug ; then - #echo "SUPPORT_LD_DEBUG_EARLY=y" >> .config - echo "SUPPORT_LD_DEBUG=y" >> .config - echo "DODEBUG=y" >> .config - #echo "DODEBUG_PT=y" >> .config - fi - - sed -i -e '/ARCH_.*_ENDIAN/d' .config - echo "ARCH_$(uclibc_endian | tr [a-z] [A-Z])_ENDIAN=y" >> .config - - if [[ $(tc-is-softfloat) != "no" ]] ; then - sed -i -e '/^HAS_FPU=y$/d' .config - echo 'HAS_FPU=n' >> .config - fi - - local moredefs="DL_FINI_CRT_COMPAT" - # We need todo this for a few months. .28 is a major upgrade. - # Don't do it from cross-compiling case though - if ! use uclibc-compat ; then - if [[ -z ${UCLIBC_AND_GLIBC} ]] && [[ -z ${UCLIBC_SCANNED_COMPAT} ]] && \ - ! just_headers && [[ ${CHOST} == ${CTARGET} ]] ; then - local fnames="" - einfo "Doing a scanelf in paths for bins containing the __uClibc_start_main symbol" - fnames=$(scanelf -pyqs__uClibc_start_main -F%F#s) - if [[ -z ${fnames} ]] ; then - einfo "This system is clean." - einfo "To prevent the scanning of files again in the future you can export UCLIBC_SCANNED_COMPAT=1" - moredefs="" - else - ewarn "You need to remerge the packages that contain the following files before you can remerge ${P} without USE=uclibc-compat enabled." - ewarn "qfile ${fnames}" - echo - ewarn "Leaving on ${moredefs}" - fi - else - moredefs="" - fi - fi - for def in ${moredefs} MALLOC_GLIBC_COMPAT 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 - done - echo "UCLIBC_HAS_FULL_RPC=y" >> .config - echo "PTHREADS_DEBUG_SUPPORT=y" >> .config - echo "UCLIBC_HAS_TZ_FILE_READ_MANY=n" >> .config - - if use iconv ; then - sed -i -e "s:# UCLIBC_HAS_LOCALE is not set:UCLIBC_HAS_LOCALE=y:" .config - echo "UCLIBC_HAS_XLOCALE=n" >> .config - echo "UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y" >> .config - echo "UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y" >> .config - - if use nls ; then - echo "UCLIBC_HAS_GETTEXT_AWARENESS=y" >> .config - else - echo "UCLIBC_HAS_GETTEXT_AWARENESS=n" >> .config - fi - - if use pregen ; then - echo "UCLIBC_PREGENERATED_LOCALE_DATA=y" >> .config - echo "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=y" >> .config - if use userlocales ; then - cp "${DISTDIR}"/${MY_P}-user-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy ${MY_P}-user-locale.tar.gz" - else - cp "${DISTDIR}"/${MY_P}-$(tc-arch)-full-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy locale" - fi - else - echo "UCLIBC_PREGENERATED_LOCALE_DATA=n" >> .config - fi - else - echo "UCLIBC_HAS_LOCALE=n" >> .config - fi - - 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 wordexp && 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 - echo "UCLIBC_HAS_SSP=y" >> .config - echo "SSP_USE_ERANDOM=n" >> .config - echo "PROPOLICE_BLOCK_ABRT=n" >> .config - if use debug ; then - echo "PROPOLICE_BLOCK_SEGV=y" >> .config - echo "PROPOLICE_BLOCK_KILL=n" >> .config - else - echo "PROPOLICE_BLOCK_SEGV=n" >> .config - echo "PROPOLICE_BLOCK_KILL=y" >> .config - fi - - # arm/mips do not emit PT_GNU_STACK, but if we enable this here - # it will be emitted as RWE, ppc has to be checked, x86 needs it - # this option should be used independently of hardened - # relro could be also moved out of hardened - if has $(tc-arch) x86 ; then - echo "UCLIBC_BUILD_NOEXECSTACK=y" >> .config - else - echo "UCLIBC_BUILD_NOEXECSTACK=n" >> .config - fi - echo "UCLIBC_BUILD_RELRO=y" >> .config - if use hardened ; then - if has $(tc-arch) ${PIE_STABLE} ; then - echo "UCLIBC_BUILD_PIE=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - fi - echo "SSP_QUICK_CANARY=n" >> .config - echo "UCLIBC_BUILD_SSP=y" >> .config - echo "UCLIBC_BUILD_NOW=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - echo "SSP_QUICK_CANARY=y" >> .config - echo "UCLIBC_BUILD_SSP=n" >> .config - echo "UCLIBC_BUILD_NOW=n" >> .config - fi - - # Allow users some custom control over the config - if use savedconfig ; then - for conf in ${PN}-${PV}-${PR} ${PN}-${PV} ${PN}; do - configfile=${ROOT}/etc/${PN}/${CTARGET}/${conf}.config - einfo "Checking existence of ${configfile} ..." - [[ -r ${configfile} ]] || configfile=/etc/${PN}/${CHOST}/${conf}.config - if [[ -r ${configfile} ]] ; then - cp "${configfile}" "${S}"/.config - einfo "Found your ${configfile} and using it." - einfo "Note that this feature is *totally unsupported*." - break - fi - done - fi - - # setup build and run paths - local cross=${CTARGET}- - type -p ${cross}ar > /dev/null || cross="" - sed -i \ - -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \ - -e "/^KERNEL_SOURCE/s:=.*:=\"$(alt_build_kprefix)\":" \ - -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ - -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ - -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ - .config || die - - yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig" - - cp .config myconfig - - emake -s clean > /dev/null || die "could not clean" -} - -setup_locales() { - cd "${S}"/extra/locale - if use userlocales && [[ -f ${ROOT}/etc/locales.build ]] ; then - :; - elif use minimal ; then - find ./charmaps -name ASCII.pairs > codesets.txt - find ./charmaps -name ISO-8859-1.pairs >> codesets.txt - cat <<-EOF > locales.txt - @euro e - UTF-8 yes - 8-bit yes - en_US ISO-8859-1 - en_US.UTF-8 UTF-8 - EOF - else - find ./charmaps -name '*.pairs' > codesets.txt - cp LOCALES locales.txt - fi - cd - -} - -src_compile() { - cp myconfig .config - - emake headers || die "make headers failed" - just_headers && return 0 - - if use iconv && ! use pregen ; then - cd extra/locale - make clean || die "make locale clean failed" - setup_locales - emake || die "make locales failed" - cd ../.. - fi - - emake || die "make failed" - [[ ${CTARGET} != ${CHOST} ]] && return 0 - - if [[ ${CHOST} == *-uclibc ]] ; then - emake utils || die "make utils failed" - fi -} - -src_test() { - [[ ${CHOST} != ${CTARGET} ]] && return 0 - [[ ${CBUILD} != ${CHOST} ]] && return 0 - - # assert test fails on pax/grsec enabled kernels - normal - # vfork test fails in sandbox (both glibc/uclibc) - make UCLIBC_ONLY=1 check || die "test failed" -} - -src_install() { - local sysroot=${D} - [[ ${CHOST} != ${CTARGET} ]] && sysroot="${sysroot}/usr/${CTARGET}" - - local target="install" - just_headers && target="install_dev" - make DESTDIR="${sysroot}" ${target} || die "install failed" - - # remove files coming from kernel-headers - rm -rf "${sysroot}"/usr/include/{linux,asm*} - - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - if [[ ${CTARGET} != ${CHOST} ]] ; then - dosym usr/include /usr/${CTARGET}/sys-include - return 0 - fi - - if [[ ${CHOST} == *-uclibc ]] ; then - make DESTDIR="${D}" install_utils || die "install-utils failed" - dobin extra/scripts/getent - fi - - if ! use build ; then - dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 - doman docs/man/*.[1-9] - fi -} - -pkg_postinst() { - [[ ${CTARGET} != ${CHOST} ]] && return 0 - [[ ${CHOST} != *-uclibc ]] && return 0 - - if [[ ! -e ${ROOT}/etc/TZ ]] ; then - ewarn "Please remember to set your timezone in /etc/TZ" - [[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc - echo "UTC" > "${ROOT}"/etc/TZ - fi - - if [[ ${ROOT} == "/" ]] ; then - # update cache before reloading init - /sbin/ldconfig - # reload init ... - [[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null - fi -} diff --git a/sys-libs/uclibc/uclibc-0.9.28.3-r1.ebuild b/sys-libs/uclibc/uclibc-0.9.28.3-r1.ebuild deleted file mode 100644 index ffb6ef875746..000000000000 --- a/sys-libs/uclibc/uclibc-0.9.28.3-r1.ebuild +++ /dev/null @@ -1,459 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r1.ebuild,v 1.3 2008/03/24 19:30:04 solar Exp $ - -#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" -#inherit subversion -inherit eutils flag-o-matic toolchain-funcs - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; 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 -fi - -MY_P=uClibc-${PV} -SVN_VER="" -PATCH_VER="1.1" -DESCRIPTION="C library for developing embedded Linux systems" -HOMEPAGE="http://www.uclibc.org/" -SRC_URI="mirror://kernel/linux/libs/uclibc/${MY_P}.tar.bz2 - http://uclibc.org/downloads/${MY_P}.tar.bz2 - nls? ( !userlocales? ( pregen? ( - x86? ( http://www.uclibc.org/downloads/uClibc-locale-030818.tgz ) - ) ) )" -[[ -z ${SVN_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-svn-update-${SVN_VER}.patch.bz2" -[[ -z ${PATCH_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2" - -LICENSE="LGPL-2" -[[ ${CTARGET} != ${CHOST} ]] \ - && SLOT="${CTARGET}" \ - || SLOT="0" -KEYWORDS="-* ~arm ~m68k -mips ~ppc ~sh ~sparc ~x86" -IUSE="build uclibc-compat debug hardened iconv ipv6 minimal nls pregen savedconfig userlocales wordexp" -RESTRICT="strip" - -RDEPEND="" -if [[ ${CTARGET} == ${CHOST} ]] ; then - DEPEND="virtual/os-headers app-misc/pax-utils" - PROVIDE="virtual/libc" -else - DEPEND="" -fi - -S=${WORKDIR}/${MY_P} - -alt_build_kprefix() { - if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \ - || [[ -n ${UCLIBC_AND_GLIBC} ]] - then - echo /usr - else - echo /usr/${CTARGET}/usr - fi -} -just_headers() { - use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] -} - -uclibc_endian() { - # XXX: this wont work for a toolchain which is bi-endian, but we - # dont have any such thing at the moment, so not a big deal - touch "${T}"/endian.s - $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o - case $(file "${T}"/endian.o) in - *" MSB "*) echo "big";; - *" LSB "*) echo "little";; - *) echo "NFC";; - esac - rm -f "${T}"/endian.{s,o} -} - -pkg_setup() { - just_headers && return 0 - has_version ${CATEGORY}/uclibc || return 0 - [[ -n ${UCLIBC_AND_GLIBC} ]] && return 0 - [[ ${ROOT} != "/" ]] && return 0 - [[ ${CATEGORY} == cross-* ]] && return 0 - - if ! built_with_use --missing false ${CATEGORY}/uclibc nls && use nls && ! use pregen ; then - eerror "You previously built uclibc with USE=-nls." - eerror "You cannot generate locale data with this" - eerror "system. Please rerun emerge with USE=pregen." - die "host cannot support locales" - elif built_with_use --missing false ${CATEGORY}/uclibc nls && ! use nls ; then - eerror "You previously built uclibc with USE=nls." - eerror "Rebuilding uClibc with USE=-nls will prob" - eerror "destroy your system." - die "switching from nls is baaaad" - fi -} - -PIE_STABLE="arm mips ppc x86" - -CPU_ALPHA="" -CPU_AMD64="" -CPU_ARM="GENERIC_ARM ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}" -CPU_IA64="" -CPU_M68K="" -CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}}" -CPU_PPC="" -CPU_SH="SH{2,3,4,5}" -CPU_SPARC="" -CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX 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_SPARC} ${CPU_X86}" - -check_cpu_opts() { - local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])" - [[ -z ${!cpu_var} ]] && return 0 - - 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:" - UCLIBC_CPU=$(eval echo ${!cpu_var}) - echo ${UCLIBC_CPU} - case ${CTARGET} in - mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; - sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; - i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; - *) export UCLIBC_CPU=${UCLIBC_CPU%% *};; - esac - else - local cpu found=0 - for cpu in $(eval echo ${!cpu_var}) ; do - [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break - done - 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 -} - -src_unpack() { - [[ -n ${ESVN_REPO_URI} ]] \ - && subversion_src_unpack \ - || unpack ${A} - cd "${S}" - - check_cpu_opts - - echo - einfo "Runtime Prefix: /" - einfo "Devel Prefix: /usr" - einfo "Kernel Prefix: $(alt_build_kprefix)" - einfo "CBUILD: ${CBUILD}" - einfo "CHOST: ${CHOST}" - einfo "CTARGET: ${CTARGET}" - einfo "CPU: ${UCLIBC_CPU:-default}" - einfo "ENDIAN: $(uclibc_endian)" - echo - - ########## PATCHES ########## - - [[ -n ${SVN_VER} ]] && \ - epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch - - if [[ -n ${PATCH_VER} ]] ; then - unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 - EPATCH_SUFFIX="patch" - epatch "${WORKDIR}"/patch - # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f) - cp "${WORKDIR}"/patch/math/libm/* "${S}"/libm/ || die - epatch "${WORKDIR}"/patch/math - fi - - ########## CPU SELECTION ########## - - local target config_target - case $(tc-arch) in - alpha) target="alpha"; config_target="no cpu-specific options";; - amd64) target="x86_64"; config_target="no cpu-specific options";; - arm) target="arm"; config_target="GENERIC_ARM";; - ia64) target="ia64"; config_target="no cpu-specific options";; - m68k) target="m68k"; config_target="no cpu-specific options";; - mips) target="mips"; config_target="MIPS_ISA_1";; - ppc) target="powerpc"; config_target="no cpu-specific options";; - sh) target="sh"; config_target="SH4";; - sparc) target="sparc"; config_target="no cpu-specific options";; - x86) target="i386"; config_target="GENERIC_386";; - *) die "$(tc-arch) lists no defaults :/";; - esac - sed -i -e "s:default TARGET_i386:default TARGET_${target}:" \ - extra/Configs/Config.in - sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ - extra/Configs/Config.${target} - - ########## CONFIG SETUP ########## - - make defconfig >/dev/null || die "could not config" - - for def in DO{DEBUG{,_PT},ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do - sed -i -e "s:${def}=y:# ${def} is not set:" .config - done - if use debug ; then - #echo "SUPPORT_LD_DEBUG_EARLY=y" >> .config - echo "SUPPORT_LD_DEBUG=y" >> .config - echo "DODEBUG=y" >> .config - #echo "DODEBUG_PT=y" >> .config - fi - - sed -i -e '/ARCH_.*_ENDIAN/d' .config - echo "ARCH_$(uclibc_endian | tr [a-z] [A-Z])_ENDIAN=y" >> .config - - if [[ $(tc-is-softfloat) != "no" ]] ; then - sed -i -e '/^HAS_FPU=y$/d' .config - echo 'HAS_FPU=n' >> .config - fi - - local moredefs="DL_FINI_CRT_COMPAT" - # We need todo this for a few months. .28 is a major upgrade. - # Don't do it from cross-compiling case though - if ! use uclibc-compat ; then - if [[ -z ${UCLIBC_AND_GLIBC} ]] && [[ -z ${UCLIBC_SCANNED_COMPAT} ]] && \ - ! just_headers && [[ ${CHOST} == ${CTARGET} ]] ; then - local fnames="" - einfo "Doing a scanelf in paths for bins containing the __uClibc_start_main symbol" - fnames=$(scanelf -pyqs__uClibc_start_main -F%F#s) - if [[ -z ${fnames} ]] ; then - einfo "This system is clean." - einfo "To prevent the scanning of files again in the future you can export UCLIBC_SCANNED_COMPAT=1" - moredefs="" - else - ewarn "You need to remerge the packages that contain the following files before you can remerge ${P} without USE=uclibc-compat enabled." - ewarn "qfile ${fnames}" - echo - ewarn "Leaving on ${moredefs}" - fi - else - moredefs="" - fi - fi - for def in ${moredefs} MALLOC_GLIBC_COMPAT 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 - done - echo "UCLIBC_HAS_FULL_RPC=y" >> .config - echo "PTHREADS_DEBUG_SUPPORT=y" >> .config - echo "UCLIBC_HAS_TZ_FILE_READ_MANY=n" >> .config - - if use iconv ; then - sed -i -e "s:# UCLIBC_HAS_LOCALE is not set:UCLIBC_HAS_LOCALE=y:" .config - echo "UCLIBC_HAS_XLOCALE=n" >> .config - echo "UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y" >> .config - echo "UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y" >> .config - - if use nls ; then - echo "UCLIBC_HAS_GETTEXT_AWARENESS=y" >> .config - else - echo "UCLIBC_HAS_GETTEXT_AWARENESS=n" >> .config - fi - - if use pregen ; then - echo "UCLIBC_PREGENERATED_LOCALE_DATA=y" >> .config - echo "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=y" >> .config - if use userlocales ; then - cp "${DISTDIR}"/${MY_P}-user-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy ${MY_P}-user-locale.tar.gz" - else - cp "${DISTDIR}"/${MY_P}-$(tc-arch)-full-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy locale" - fi - else - echo "UCLIBC_PREGENERATED_LOCALE_DATA=n" >> .config - fi - else - echo "UCLIBC_HAS_LOCALE=n" >> .config - fi - - 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 wordexp && 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 - echo "UCLIBC_HAS_SSP=y" >> .config - echo "SSP_USE_ERANDOM=n" >> .config - echo "PROPOLICE_BLOCK_ABRT=n" >> .config - if use debug ; then - echo "PROPOLICE_BLOCK_SEGV=y" >> .config - echo "PROPOLICE_BLOCK_KILL=n" >> .config - else - echo "PROPOLICE_BLOCK_SEGV=n" >> .config - echo "PROPOLICE_BLOCK_KILL=y" >> .config - fi - - # arm/mips do not emit PT_GNU_STACK, but if we enable this here - # it will be emitted as RWE, ppc has to be checked, x86 needs it - # this option should be used independently of hardened - # relro could be also moved out of hardened - if has $(tc-arch) x86 ; then - echo "UCLIBC_BUILD_NOEXECSTACK=y" >> .config - else - echo "UCLIBC_BUILD_NOEXECSTACK=n" >> .config - fi - echo "UCLIBC_BUILD_RELRO=y" >> .config - if use hardened ; then - if has $(tc-arch) ${PIE_STABLE} ; then - echo "UCLIBC_BUILD_PIE=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - fi - echo "SSP_QUICK_CANARY=n" >> .config - echo "UCLIBC_BUILD_SSP=y" >> .config - echo "UCLIBC_BUILD_NOW=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - echo "SSP_QUICK_CANARY=y" >> .config - echo "UCLIBC_BUILD_SSP=n" >> .config - echo "UCLIBC_BUILD_NOW=n" >> .config - fi - - # Allow users some custom control over the config - if use savedconfig ; then - for conf in ${PN}-${PV}-${PR} ${PN}-${PV} ${PN}; do - configfile=${ROOT}/etc/${PN}/${CTARGET}/${conf}.config - einfo "Checking existence of ${configfile} ..." - [[ -r ${configfile} ]] || configfile=/etc/${PN}/${CHOST}/${conf}.config - if [[ -r ${configfile} ]] ; then - cp "${configfile}" "${S}"/.config - einfo "Found your ${configfile} and using it." - einfo "Note that this feature is *totally unsupported*." - break - fi - done - fi - - # setup build and run paths - local cross=${CTARGET}- - type -p ${cross}ar > /dev/null || cross="" - sed -i \ - -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \ - -e "/^KERNEL_SOURCE/s:=.*:=\"$(alt_build_kprefix)\":" \ - -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ - -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ - -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ - .config || die - - yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig" - - cp .config myconfig - - emake -s clean > /dev/null || die "could not clean" -} - -setup_locales() { - cd "${S}"/extra/locale - if use userlocales && [[ -f ${ROOT}/etc/locales.build ]] ; then - :; - elif use minimal ; then - find ./charmaps -name ASCII.pairs > codesets.txt - find ./charmaps -name ISO-8859-1.pairs >> codesets.txt - cat <<-EOF > locales.txt - @euro e - UTF-8 yes - 8-bit yes - en_US ISO-8859-1 - en_US.UTF-8 UTF-8 - EOF - else - find ./charmaps -name '*.pairs' > codesets.txt - cp LOCALES locales.txt - fi - cd - -} - -src_compile() { - cp myconfig .config - - emake headers || die "make headers failed" - just_headers && return 0 - - if use iconv && ! use pregen ; then - cd extra/locale - make clean || die "make locale clean failed" - setup_locales - emake || die "make locales failed" - cd ../.. - fi - - emake || die "make failed" - if [[ ${CTARGET} != ${CHOST} ]] ; then - emake -C utils hostutils || die "make hostutils failed" - elif [[ ${CHOST} == *-uclibc ]] ; then - emake utils || die "make utils failed" - fi -} - -src_test() { - [[ ${CHOST} != ${CTARGET} ]] && return 0 - [[ ${CBUILD} != ${CHOST} ]] && return 0 - - # assert test fails on pax/grsec enabled kernels - normal - # vfork test fails in sandbox (both glibc/uclibc) - make UCLIBC_ONLY=1 check || die "test failed" -} - -src_install() { - local sysroot=${D} - [[ ${CHOST} != ${CTARGET} ]] && sysroot="${sysroot}/usr/${CTARGET}" - - local target="install" - just_headers && target="install_dev" - emake DESTDIR="${sysroot}" ${target} || die "install failed" - - # remove files coming from kernel-headers - rm -rf "${sysroot}"/usr/include/{linux,asm*} - - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - if [[ ${CTARGET} != ${CHOST} ]] ; then - dosym usr/include /usr/${CTARGET}/sys-include - newbin utils/ldconfig.host ${CTARGET}-ldconfig || die - newbin utils/ldd.host ${CTARGET}-ldd || die - return 0 - fi - - if [[ ${CHOST} == *-uclibc ]] ; then - make DESTDIR="${D}" install_utils || die "install-utils failed" - dobin extra/scripts/getent - fi - - if ! use build ; then - dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 - doman docs/man/*.[1-9] - fi -} - -pkg_postinst() { - [[ ${CTARGET} != ${CHOST} ]] && return 0 - [[ ${CHOST} != *-uclibc ]] && return 0 - - if [[ ! -e ${ROOT}/etc/TZ ]] ; then - ewarn "Please remember to set your timezone in /etc/TZ" - [[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc - echo "UTC" > "${ROOT}"/etc/TZ - fi - - if [[ ${ROOT} == "/" ]] ; then - # update cache before reloading init - /sbin/ldconfig - # reload init ... - [[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null - fi -} diff --git a/sys-libs/uclibc/uclibc-0.9.28.3-r2.ebuild b/sys-libs/uclibc/uclibc-0.9.28.3-r2.ebuild deleted file mode 100644 index ab5dc23950f3..000000000000 --- a/sys-libs/uclibc/uclibc-0.9.28.3-r2.ebuild +++ /dev/null @@ -1,459 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r2.ebuild,v 1.4 2008/03/27 15:10:32 phreak Exp $ - -#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" -#inherit subversion -inherit eutils flag-o-matic toolchain-funcs - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; 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 -fi - -MY_P=uClibc-${PV} -SVN_VER="" -PATCH_VER="1.2" -DESCRIPTION="C library for developing embedded Linux systems" -HOMEPAGE="http://www.uclibc.org/" -SRC_URI="mirror://kernel/linux/libs/uclibc/${MY_P}.tar.bz2 - http://uclibc.org/downloads/${MY_P}.tar.bz2 - nls? ( !userlocales? ( pregen? ( - x86? ( http://www.uclibc.org/downloads/uClibc-locale-030818.tgz ) - ) ) )" -[[ -z ${SVN_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-svn-update-${SVN_VER}.patch.bz2" -[[ -z ${PATCH_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2" - -LICENSE="LGPL-2" -[[ ${CTARGET} != ${CHOST} ]] \ - && SLOT="${CTARGET}" \ - || SLOT="0" -KEYWORDS="-* ~arm ~m68k -mips ppc ~sh ~sparc x86" -IUSE="build uclibc-compat debug hardened iconv ipv6 minimal nls pregen savedconfig userlocales wordexp" -RESTRICT="strip" - -RDEPEND="" -if [[ ${CTARGET} == ${CHOST} ]] ; then - DEPEND="virtual/os-headers app-misc/pax-utils" - PROVIDE="virtual/libc" -else - DEPEND="" -fi - -S=${WORKDIR}/${MY_P} - -alt_build_kprefix() { - if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \ - || [[ -n ${UCLIBC_AND_GLIBC} ]] - then - echo /usr - else - echo /usr/${CTARGET}/usr - fi -} -just_headers() { - use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] -} - -uclibc_endian() { - # XXX: this wont work for a toolchain which is bi-endian, but we - # dont have any such thing at the moment, so not a big deal - touch "${T}"/endian.s - $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o - case $(file "${T}"/endian.o) in - *" MSB "*) echo "big";; - *" LSB "*) echo "little";; - *) echo "NFC";; - esac - rm -f "${T}"/endian.{s,o} -} - -pkg_setup() { - just_headers && return 0 - has_version ${CATEGORY}/uclibc || return 0 - [[ -n ${UCLIBC_AND_GLIBC} ]] && return 0 - [[ ${ROOT} != "/" ]] && return 0 - [[ ${CATEGORY} == cross-* ]] && return 0 - - if ! built_with_use --missing false ${CATEGORY}/uclibc nls && use nls && ! use pregen ; then - eerror "You previously built uclibc with USE=-nls." - eerror "You cannot generate locale data with this" - eerror "system. Please rerun emerge with USE=pregen." - die "host cannot support locales" - elif built_with_use --missing false ${CATEGORY}/uclibc nls && ! use nls ; then - eerror "You previously built uclibc with USE=nls." - eerror "Rebuilding uClibc with USE=-nls will prob" - eerror "destroy your system." - die "switching from nls is baaaad" - fi -} - -PIE_STABLE="arm mips ppc x86" - -CPU_ALPHA="" -CPU_AMD64="" -CPU_ARM="GENERIC_ARM ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}" -CPU_IA64="" -CPU_M68K="" -CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}}" -CPU_PPC="" -CPU_SH="SH{2,3,4,5}" -CPU_SPARC="" -CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX 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_SPARC} ${CPU_X86}" - -check_cpu_opts() { - local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])" - [[ -z ${!cpu_var} ]] && return 0 - - 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:" - UCLIBC_CPU=$(eval echo ${!cpu_var}) - echo ${UCLIBC_CPU} - case ${CTARGET} in - mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; - sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; - i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; - *) export UCLIBC_CPU=${UCLIBC_CPU%% *};; - esac - else - local cpu found=0 - for cpu in $(eval echo ${!cpu_var}) ; do - [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break - done - 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 -} - -src_unpack() { - [[ -n ${ESVN_REPO_URI} ]] \ - && subversion_src_unpack \ - || unpack ${A} - cd "${S}" - - check_cpu_opts - - echo - einfo "Runtime Prefix: /" - einfo "Devel Prefix: /usr" - einfo "Kernel Prefix: $(alt_build_kprefix)" - einfo "CBUILD: ${CBUILD}" - einfo "CHOST: ${CHOST}" - einfo "CTARGET: ${CTARGET}" - einfo "CPU: ${UCLIBC_CPU:-default}" - einfo "ENDIAN: $(uclibc_endian)" - echo - - ########## PATCHES ########## - - [[ -n ${SVN_VER} ]] && \ - epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch - - if [[ -n ${PATCH_VER} ]] ; then - unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 - EPATCH_SUFFIX="patch" - epatch "${WORKDIR}"/patch - # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f) - cp "${WORKDIR}"/patch/math/libm/* "${S}"/libm/ || die - epatch "${WORKDIR}"/patch/math - fi - - ########## CPU SELECTION ########## - - local target config_target - case $(tc-arch) in - alpha) target="alpha"; config_target="no cpu-specific options";; - amd64) target="x86_64"; config_target="no cpu-specific options";; - arm) target="arm"; config_target="GENERIC_ARM";; - ia64) target="ia64"; config_target="no cpu-specific options";; - m68k) target="m68k"; config_target="no cpu-specific options";; - mips) target="mips"; config_target="MIPS_ISA_1";; - ppc) target="powerpc"; config_target="no cpu-specific options";; - sh) target="sh"; config_target="SH4";; - sparc) target="sparc"; config_target="no cpu-specific options";; - x86) target="i386"; config_target="GENERIC_386";; - *) die "$(tc-arch) lists no defaults :/";; - esac - sed -i -e "s:default TARGET_i386:default TARGET_${target}:" \ - extra/Configs/Config.in - sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ - extra/Configs/Config.${target} - - ########## CONFIG SETUP ########## - - make defconfig >/dev/null || die "could not config" - - for def in DO{DEBUG{,_PT},ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do - sed -i -e "s:${def}=y:# ${def} is not set:" .config - done - if use debug ; then - #echo "SUPPORT_LD_DEBUG_EARLY=y" >> .config - echo "SUPPORT_LD_DEBUG=y" >> .config - echo "DODEBUG=y" >> .config - #echo "DODEBUG_PT=y" >> .config - fi - - sed -i -e '/ARCH_.*_ENDIAN/d' .config - echo "ARCH_$(uclibc_endian | tr [a-z] [A-Z])_ENDIAN=y" >> .config - - if [[ $(tc-is-softfloat) != "no" ]] ; then - sed -i -e '/^HAS_FPU=y$/d' .config - echo 'HAS_FPU=n' >> .config - fi - - local moredefs="DL_FINI_CRT_COMPAT" - # We need todo this for a few months. .28 is a major upgrade. - # Don't do it from cross-compiling case though - if ! use uclibc-compat ; then - if [[ -z ${UCLIBC_AND_GLIBC} ]] && [[ -z ${UCLIBC_SCANNED_COMPAT} ]] && \ - ! just_headers && [[ ${CHOST} == ${CTARGET} ]] ; then - local fnames="" - einfo "Doing a scanelf in paths for bins containing the __uClibc_start_main symbol" - fnames=$(scanelf -pyqs__uClibc_start_main -F%F#s) - if [[ -z ${fnames} ]] ; then - einfo "This system is clean." - einfo "To prevent the scanning of files again in the future you can export UCLIBC_SCANNED_COMPAT=1" - moredefs="" - else - ewarn "You need to remerge the packages that contain the following files before you can remerge ${P} without USE=uclibc-compat enabled." - ewarn "qfile ${fnames}" - echo - ewarn "Leaving on ${moredefs}" - fi - else - moredefs="" - fi - fi - for def in ${moredefs} MALLOC_GLIBC_COMPAT 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 - done - echo "UCLIBC_HAS_FULL_RPC=y" >> .config - echo "PTHREADS_DEBUG_SUPPORT=y" >> .config - echo "UCLIBC_HAS_TZ_FILE_READ_MANY=n" >> .config - - if use iconv ; then - sed -i -e "s:# UCLIBC_HAS_LOCALE is not set:UCLIBC_HAS_LOCALE=y:" .config - echo "UCLIBC_HAS_XLOCALE=n" >> .config - echo "UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y" >> .config - echo "UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y" >> .config - - if use nls ; then - echo "UCLIBC_HAS_GETTEXT_AWARENESS=y" >> .config - else - echo "UCLIBC_HAS_GETTEXT_AWARENESS=n" >> .config - fi - - if use pregen ; then - echo "UCLIBC_PREGENERATED_LOCALE_DATA=y" >> .config - echo "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=y" >> .config - if use userlocales ; then - cp "${DISTDIR}"/${MY_P}-user-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy ${MY_P}-user-locale.tar.gz" - else - cp "${DISTDIR}"/${MY_P}-$(tc-arch)-full-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy locale" - fi - else - echo "UCLIBC_PREGENERATED_LOCALE_DATA=n" >> .config - fi - else - echo "UCLIBC_HAS_LOCALE=n" >> .config - fi - - 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 wordexp && 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 - echo "UCLIBC_HAS_SSP=y" >> .config - echo "SSP_USE_ERANDOM=n" >> .config - echo "PROPOLICE_BLOCK_ABRT=n" >> .config - if use debug ; then - echo "PROPOLICE_BLOCK_SEGV=y" >> .config - echo "PROPOLICE_BLOCK_KILL=n" >> .config - else - echo "PROPOLICE_BLOCK_SEGV=n" >> .config - echo "PROPOLICE_BLOCK_KILL=y" >> .config - fi - - # arm/mips do not emit PT_GNU_STACK, but if we enable this here - # it will be emitted as RWE, ppc has to be checked, x86 needs it - # this option should be used independently of hardened - # relro could be also moved out of hardened - if has $(tc-arch) x86 ; then - echo "UCLIBC_BUILD_NOEXECSTACK=y" >> .config - else - echo "UCLIBC_BUILD_NOEXECSTACK=n" >> .config - fi - echo "UCLIBC_BUILD_RELRO=y" >> .config - if use hardened ; then - if has $(tc-arch) ${PIE_STABLE} ; then - echo "UCLIBC_BUILD_PIE=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - fi - echo "SSP_QUICK_CANARY=n" >> .config - echo "UCLIBC_BUILD_SSP=y" >> .config - echo "UCLIBC_BUILD_NOW=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - echo "SSP_QUICK_CANARY=y" >> .config - echo "UCLIBC_BUILD_SSP=n" >> .config - echo "UCLIBC_BUILD_NOW=n" >> .config - fi - - # Allow users some custom control over the config - if use savedconfig ; then - for conf in ${PN}-${PV}-${PR} ${PN}-${PV} ${PN}; do - configfile=${ROOT}/etc/${PN}/${CTARGET}/${conf}.config - einfo "Checking existence of ${configfile} ..." - [[ -r ${configfile} ]] || configfile=/etc/${PN}/${CHOST}/${conf}.config - if [[ -r ${configfile} ]] ; then - cp "${configfile}" "${S}"/.config - einfo "Found your ${configfile} and using it." - einfo "Note that this feature is *totally unsupported*." - break - fi - done - fi - - # setup build and run paths - local cross=${CTARGET}- - type -p ${cross}ar > /dev/null || cross="" - sed -i \ - -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \ - -e "/^KERNEL_SOURCE/s:=.*:=\"$(alt_build_kprefix)\":" \ - -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ - -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ - -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ - .config || die - - yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig" - - cp .config myconfig - - emake -s clean > /dev/null || die "could not clean" -} - -setup_locales() { - cd "${S}"/extra/locale - if use userlocales && [[ -f ${ROOT}/etc/locales.build ]] ; then - :; - elif use minimal ; then - find ./charmaps -name ASCII.pairs > codesets.txt - find ./charmaps -name ISO-8859-1.pairs >> codesets.txt - cat <<-EOF > locales.txt - @euro e - UTF-8 yes - 8-bit yes - en_US ISO-8859-1 - en_US.UTF-8 UTF-8 - EOF - else - find ./charmaps -name '*.pairs' > codesets.txt - cp LOCALES locales.txt - fi - cd - -} - -src_compile() { - cp myconfig .config - - emake headers || die "make headers failed" - just_headers && return 0 - - if use iconv && ! use pregen ; then - cd extra/locale - make clean || die "make locale clean failed" - setup_locales - emake || die "make locales failed" - cd ../.. - fi - - emake || die "make failed" - if [[ ${CTARGET} != ${CHOST} ]] ; then - emake -C utils hostutils || die "make hostutils failed" - elif [[ ${CHOST} == *-uclibc ]] ; then - emake utils || die "make utils failed" - fi -} - -src_test() { - [[ ${CHOST} != ${CTARGET} ]] && return 0 - [[ ${CBUILD} != ${CHOST} ]] && return 0 - - # assert test fails on pax/grsec enabled kernels - normal - # vfork test fails in sandbox (both glibc/uclibc) - make UCLIBC_ONLY=1 check || die "test failed" -} - -src_install() { - local sysroot=${D} - [[ ${CHOST} != ${CTARGET} ]] && sysroot="${sysroot}/usr/${CTARGET}" - - local target="install" - just_headers && target="install_dev" - emake DESTDIR="${sysroot}" ${target} || die "install failed" - - # remove files coming from kernel-headers - rm -rf "${sysroot}"/usr/include/{linux,asm*} - - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - if [[ ${CTARGET} != ${CHOST} ]] ; then - dosym usr/include /usr/${CTARGET}/sys-include - newbin utils/ldconfig.host ${CTARGET}-ldconfig || die - newbin utils/ldd.host ${CTARGET}-ldd || die - return 0 - fi - - if [[ ${CHOST} == *-uclibc ]] ; then - make DESTDIR="${D}" install_utils || die "install-utils failed" - dobin extra/scripts/getent - fi - - if ! use build ; then - dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 - doman docs/man/*.[1-9] - fi -} - -pkg_postinst() { - [[ ${CTARGET} != ${CHOST} ]] && return 0 - [[ ${CHOST} != *-uclibc ]] && return 0 - - if [[ ! -e ${ROOT}/etc/TZ ]] ; then - ewarn "Please remember to set your timezone in /etc/TZ" - [[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc - echo "UTC" > "${ROOT}"/etc/TZ - fi - - if [[ ${ROOT} == "/" ]] ; then - # update cache before reloading init - /sbin/ldconfig - # reload init ... - [[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null - fi -} diff --git a/sys-libs/uclibc/uclibc-0.9.28.3-r4.ebuild b/sys-libs/uclibc/uclibc-0.9.28.3-r4.ebuild deleted file mode 100644 index 6d7d20e5e53b..000000000000 --- a/sys-libs/uclibc/uclibc-0.9.28.3-r4.ebuild +++ /dev/null @@ -1,459 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r4.ebuild,v 1.3 2008/04/16 14:21:47 phreak Exp $ - -#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" -#inherit subversion -inherit eutils flag-o-matic toolchain-funcs - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; 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 -fi - -MY_P=uClibc-${PV} -SVN_VER="" -PATCH_VER="1.5" -DESCRIPTION="C library for developing embedded Linux systems" -HOMEPAGE="http://www.uclibc.org/" -SRC_URI="mirror://kernel/linux/libs/uclibc/${MY_P}.tar.bz2 - http://uclibc.org/downloads/${MY_P}.tar.bz2 - nls? ( !userlocales? ( pregen? ( - x86? ( http://www.uclibc.org/downloads/uClibc-locale-030818.tgz ) - ) ) )" -[[ -z ${SVN_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-svn-update-${SVN_VER}.patch.bz2" -[[ -z ${PATCH_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2" - -LICENSE="LGPL-2" -[[ ${CTARGET} != ${CHOST} ]] \ - && SLOT="${CTARGET}" \ - || SLOT="0" -KEYWORDS="-* ~arm ~m68k -mips ~ppc ~sh ~sparc ~x86" -IUSE="build uclibc-compat debug hardened iconv ipv6 minimal nls pregen savedconfig userlocales wordexp" -RESTRICT="strip" - -RDEPEND="" -if [[ ${CTARGET} == ${CHOST} ]] ; then - DEPEND="virtual/os-headers app-misc/pax-utils" - PROVIDE="virtual/libc" -else - DEPEND="" -fi - -S=${WORKDIR}/${MY_P} - -alt_build_kprefix() { - if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \ - || [[ -n ${UCLIBC_AND_GLIBC} ]] - then - echo /usr - else - echo /usr/${CTARGET}/usr - fi -} -just_headers() { - use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] -} - -uclibc_endian() { - # XXX: this wont work for a toolchain which is bi-endian, but we - # dont have any such thing at the moment, so not a big deal - touch "${T}"/endian.s - $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o - case $(file "${T}"/endian.o) in - *" MSB "*) echo "big";; - *" LSB "*) echo "little";; - *) echo "NFC";; - esac - rm -f "${T}"/endian.{s,o} -} - -pkg_setup() { - just_headers && return 0 - has_version ${CATEGORY}/uclibc || return 0 - [[ -n ${UCLIBC_AND_GLIBC} ]] && return 0 - [[ ${ROOT} != "/" ]] && return 0 - [[ ${CATEGORY} == cross-* ]] && return 0 - - if ! built_with_use --missing false ${CATEGORY}/uclibc nls && use nls && ! use pregen ; then - eerror "You previously built uclibc with USE=-nls." - eerror "You cannot generate locale data with this" - eerror "system. Please rerun emerge with USE=pregen." - die "host cannot support locales" - elif built_with_use --missing false ${CATEGORY}/uclibc nls && ! use nls ; then - eerror "You previously built uclibc with USE=nls." - eerror "Rebuilding uClibc with USE=-nls will prob" - eerror "destroy your system." - die "switching from nls is baaaad" - fi -} - -PIE_STABLE="arm mips ppc x86" - -CPU_ALPHA="" -CPU_AMD64="" -CPU_ARM="GENERIC_ARM ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}" -CPU_IA64="" -CPU_M68K="" -CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}}" -CPU_PPC="" -CPU_SH="SH{2,3,4,5}" -CPU_SPARC="" -CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX 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_SPARC} ${CPU_X86}" - -check_cpu_opts() { - local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])" - [[ -z ${!cpu_var} ]] && return 0 - - 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:" - UCLIBC_CPU=$(eval echo ${!cpu_var}) - echo ${UCLIBC_CPU} - case ${CTARGET} in - mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; - sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; - i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; - *) export UCLIBC_CPU=${UCLIBC_CPU%% *};; - esac - else - local cpu found=0 - for cpu in $(eval echo ${!cpu_var}) ; do - [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break - done - 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 -} - -src_unpack() { - [[ -n ${ESVN_REPO_URI} ]] \ - && subversion_src_unpack \ - || unpack ${A} - cd "${S}" - - check_cpu_opts - - echo - einfo "Runtime Prefix: /" - einfo "Devel Prefix: /usr" - einfo "Kernel Prefix: $(alt_build_kprefix)" - einfo "CBUILD: ${CBUILD}" - einfo "CHOST: ${CHOST}" - einfo "CTARGET: ${CTARGET}" - einfo "CPU: ${UCLIBC_CPU:-default}" - einfo "ENDIAN: $(uclibc_endian)" - echo - - ########## PATCHES ########## - - [[ -n ${SVN_VER} ]] && \ - epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch - - if [[ -n ${PATCH_VER} ]] ; then - unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 - EPATCH_SUFFIX="patch" - epatch "${WORKDIR}"/patch - # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f) - cp "${WORKDIR}"/patch/math/libm/* "${S}"/libm/ || die - epatch "${WORKDIR}"/patch/math - fi - - ########## CPU SELECTION ########## - - local target config_target - case $(tc-arch) in - alpha) target="alpha"; config_target="no cpu-specific options";; - amd64) target="x86_64"; config_target="no cpu-specific options";; - arm) target="arm"; config_target="GENERIC_ARM";; - ia64) target="ia64"; config_target="no cpu-specific options";; - m68k) target="m68k"; config_target="no cpu-specific options";; - mips) target="mips"; config_target="MIPS_ISA_1";; - ppc) target="powerpc"; config_target="no cpu-specific options";; - sh) target="sh"; config_target="SH4";; - sparc) target="sparc"; config_target="no cpu-specific options";; - x86) target="i386"; config_target="GENERIC_386";; - *) die "$(tc-arch) lists no defaults :/";; - esac - sed -i -e "s:default TARGET_i386:default TARGET_${target}:" \ - extra/Configs/Config.in - sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ - extra/Configs/Config.${target} - - ########## CONFIG SETUP ########## - - make defconfig >/dev/null || die "could not config" - - for def in DO{DEBUG{,_PT},ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do - sed -i -e "s:${def}=y:# ${def} is not set:" .config - done - if use debug ; then - #echo "SUPPORT_LD_DEBUG_EARLY=y" >> .config - echo "SUPPORT_LD_DEBUG=y" >> .config - echo "DODEBUG=y" >> .config - #echo "DODEBUG_PT=y" >> .config - fi - - sed -i -e '/ARCH_.*_ENDIAN/d' .config - echo "ARCH_$(uclibc_endian | tr [a-z] [A-Z])_ENDIAN=y" >> .config - - if [[ $(tc-is-softfloat) != "no" ]] ; then - sed -i -e '/^HAS_FPU=y$/d' .config - echo 'HAS_FPU=n' >> .config - fi - - local moredefs="DL_FINI_CRT_COMPAT" - # We need todo this for a few months. .28 is a major upgrade. - # Don't do it from cross-compiling case though - if ! use uclibc-compat ; then - if [[ -z ${UCLIBC_AND_GLIBC} ]] && [[ -z ${UCLIBC_SCANNED_COMPAT} ]] && \ - ! just_headers && [[ ${CHOST} == ${CTARGET} ]] ; then - local fnames="" - einfo "Doing a scanelf in paths for bins containing the __uClibc_start_main symbol" - fnames=$(scanelf -pyqs__uClibc_start_main -F%F#s) - if [[ -z ${fnames} ]] ; then - einfo "This system is clean." - einfo "To prevent the scanning of files again in the future you can export UCLIBC_SCANNED_COMPAT=1" - moredefs="" - else - ewarn "You need to remerge the packages that contain the following files before you can remerge ${P} without USE=uclibc-compat enabled." - ewarn "qfile ${fnames}" - echo - ewarn "Leaving on ${moredefs}" - fi - else - moredefs="" - fi - fi - for def in ${moredefs} MALLOC_GLIBC_COMPAT 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 - done - echo "UCLIBC_HAS_FULL_RPC=y" >> .config - echo "PTHREADS_DEBUG_SUPPORT=y" >> .config - echo "UCLIBC_HAS_TZ_FILE_READ_MANY=n" >> .config - - if use iconv ; then - sed -i -e "s:# UCLIBC_HAS_LOCALE is not set:UCLIBC_HAS_LOCALE=y:" .config - echo "UCLIBC_HAS_XLOCALE=n" >> .config - echo "UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y" >> .config - echo "UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y" >> .config - - if use nls ; then - echo "UCLIBC_HAS_GETTEXT_AWARENESS=y" >> .config - else - echo "UCLIBC_HAS_GETTEXT_AWARENESS=n" >> .config - fi - - if use pregen ; then - echo "UCLIBC_PREGENERATED_LOCALE_DATA=y" >> .config - echo "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=y" >> .config - if use userlocales ; then - cp "${DISTDIR}"/${MY_P}-user-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy ${MY_P}-user-locale.tar.gz" - else - cp "${DISTDIR}"/${MY_P}-$(tc-arch)-full-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy locale" - fi - else - echo "UCLIBC_PREGENERATED_LOCALE_DATA=n" >> .config - fi - else - echo "UCLIBC_HAS_LOCALE=n" >> .config - fi - - 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 wordexp && 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 - echo "UCLIBC_HAS_SSP=y" >> .config - echo "SSP_USE_ERANDOM=n" >> .config - echo "PROPOLICE_BLOCK_ABRT=n" >> .config - if use debug ; then - echo "PROPOLICE_BLOCK_SEGV=y" >> .config - echo "PROPOLICE_BLOCK_KILL=n" >> .config - else - echo "PROPOLICE_BLOCK_SEGV=n" >> .config - echo "PROPOLICE_BLOCK_KILL=y" >> .config - fi - - # arm/mips do not emit PT_GNU_STACK, but if we enable this here - # it will be emitted as RWE, ppc has to be checked, x86 needs it - # this option should be used independently of hardened - # relro could be also moved out of hardened - if has $(tc-arch) x86 ; then - echo "UCLIBC_BUILD_NOEXECSTACK=y" >> .config - else - echo "UCLIBC_BUILD_NOEXECSTACK=n" >> .config - fi - echo "UCLIBC_BUILD_RELRO=y" >> .config - if use hardened ; then - if has $(tc-arch) ${PIE_STABLE} ; then - echo "UCLIBC_BUILD_PIE=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - fi - echo "SSP_QUICK_CANARY=n" >> .config - echo "UCLIBC_BUILD_SSP=y" >> .config - echo "UCLIBC_BUILD_NOW=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - echo "SSP_QUICK_CANARY=y" >> .config - echo "UCLIBC_BUILD_SSP=n" >> .config - echo "UCLIBC_BUILD_NOW=n" >> .config - fi - - # Allow users some custom control over the config - if use savedconfig ; then - for conf in ${PN}-${PV}-${PR} ${PN}-${PV} ${PN}; do - configfile=${ROOT}/etc/${PN}/${CTARGET}/${conf}.config - einfo "Checking existence of ${configfile} ..." - [[ -r ${configfile} ]] || configfile=/etc/${PN}/${CHOST}/${conf}.config - if [[ -r ${configfile} ]] ; then - cp "${configfile}" "${S}"/.config - einfo "Found your ${configfile} and using it." - einfo "Note that this feature is *totally unsupported*." - break - fi - done - fi - - # setup build and run paths - local cross=${CTARGET}- - type -p ${cross}ar > /dev/null || cross="" - sed -i \ - -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \ - -e "/^KERNEL_SOURCE/s:=.*:=\"$(alt_build_kprefix)\":" \ - -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ - -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ - -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ - .config || die - - yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig" - - cp .config myconfig - - emake -s clean > /dev/null || die "could not clean" -} - -setup_locales() { - cd "${S}"/extra/locale - if use userlocales && [[ -f ${ROOT}/etc/locales.build ]] ; then - :; - elif use minimal ; then - find ./charmaps -name ASCII.pairs > codesets.txt - find ./charmaps -name ISO-8859-1.pairs >> codesets.txt - cat <<-EOF > locales.txt - @euro e - UTF-8 yes - 8-bit yes - en_US ISO-8859-1 - en_US.UTF-8 UTF-8 - EOF - else - find ./charmaps -name '*.pairs' > codesets.txt - cp LOCALES locales.txt - fi - cd - -} - -src_compile() { - cp myconfig .config - - emake headers || die "make headers failed" - just_headers && return 0 - - if use iconv && ! use pregen ; then - cd extra/locale - make clean || die "make locale clean failed" - setup_locales - emake || die "make locales failed" - cd ../.. - fi - - emake || die "make failed" - if [[ ${CTARGET} != ${CHOST} ]] ; then - emake -C utils hostutils || die "make hostutils failed" - elif [[ ${CHOST} == *-uclibc ]] ; then - emake utils || die "make utils failed" - fi -} - -src_test() { - [[ ${CHOST} != ${CTARGET} ]] && return 0 - [[ ${CBUILD} != ${CHOST} ]] && return 0 - - # assert test fails on pax/grsec enabled kernels - normal - # vfork test fails in sandbox (both glibc/uclibc) - make UCLIBC_ONLY=1 check || die "test failed" -} - -src_install() { - local sysroot=${D} - [[ ${CHOST} != ${CTARGET} ]] && sysroot="${sysroot}/usr/${CTARGET}" - - local target="install" - just_headers && target="install_dev" - emake DESTDIR="${sysroot}" ${target} || die "install failed" - - # remove files coming from kernel-headers - rm -rf "${sysroot}"/usr/include/{linux,asm*} - - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - if [[ ${CTARGET} != ${CHOST} ]] ; then - dosym usr/include /usr/${CTARGET}/sys-include - newbin utils/ldconfig.host ${CTARGET}-ldconfig || die - newbin utils/ldd.host ${CTARGET}-ldd || die - return 0 - fi - - if [[ ${CHOST} == *-uclibc ]] ; then - make DESTDIR="${D}" install_utils || die "install-utils failed" - dobin extra/scripts/getent - fi - - if ! use build ; then - dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 - doman docs/man/*.[1-9] - fi -} - -pkg_postinst() { - [[ ${CTARGET} != ${CHOST} ]] && return 0 - [[ ${CHOST} != *-uclibc ]] && return 0 - - if [[ ! -e ${ROOT}/etc/TZ ]] ; then - ewarn "Please remember to set your timezone in /etc/TZ" - [[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc - echo "UTC" > "${ROOT}"/etc/TZ - fi - - if [[ ${ROOT} == "/" ]] ; then - # update cache before reloading init - /sbin/ldconfig - # reload init ... - [[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null - fi -} diff --git a/sys-libs/uclibc/uclibc-0.9.28.3-r5.ebuild b/sys-libs/uclibc/uclibc-0.9.28.3-r6.ebuild index 478d23edb820..e514b9092235 100644 --- a/sys-libs/uclibc/uclibc-0.9.28.3-r5.ebuild +++ b/sys-libs/uclibc/uclibc-0.9.28.3-r6.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r5.ebuild,v 1.1 2008/05/04 18:54:21 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r6.ebuild,v 1.1 2008/05/05 18:50:22 solar Exp $ #ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" #inherit subversion @@ -21,7 +21,7 @@ fi MY_P=uClibc-${PV} SVN_VER="" -PATCH_VER="1.6" +PATCH_VER="1.7" DESCRIPTION="C library for developing embedded Linux systems" HOMEPAGE="http://www.uclibc.org/" SRC_URI="mirror://kernel/linux/libs/uclibc/${MY_P}.tar.bz2 diff --git a/sys-libs/uclibc/uclibc-0.9.28.ebuild b/sys-libs/uclibc/uclibc-0.9.28.ebuild deleted file mode 100644 index 94a25c8cd4d8..000000000000 --- a/sys-libs/uclibc/uclibc-0.9.28.ebuild +++ /dev/null @@ -1,455 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.ebuild,v 1.35 2008/03/24 19:30:04 solar Exp $ - -#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" -#inherit subversion -inherit eutils flag-o-matic toolchain-funcs - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; 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 -fi - -MY_P=uClibc-${PV} -SVN_VER="" -PATCH_VER="1.3" -DESCRIPTION="C library for developing embedded Linux systems" -HOMEPAGE="http://www.uclibc.org/" -SRC_URI="http://www.kernel.org/pub/linux/libs/uclibc/${MY_P}.tar.bz2 - nls? ( !userlocales? ( pregen? ( - x86? ( http://www.uclibc.org/downloads/uClibc-locale-030818.tgz ) - ) ) )" -[[ -z ${SVN_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-svn-update-${SVN_VER}.patch.bz2" -[[ -z ${PATCH_VER} ]] || \ - SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2" - -LICENSE="LGPL-2" -[[ ${CTARGET} != ${CHOST} ]] \ - && SLOT="${CTARGET}" \ - || SLOT="0" -KEYWORDS="-* arm m68k -mips ppc sh sparc x86" -IUSE="build uclibc-compat debug hardened iconv ipv6 minimal nls pregen savedconfig userlocales wordexp" -RESTRICT="strip" - -RDEPEND="" -if [[ ${CTARGET} == ${CHOST} ]] ; then - DEPEND="virtual/os-headers app-misc/pax-utils" - PROVIDE="virtual/libc" -else - DEPEND="" -fi - -S=${WORKDIR}/${MY_P} - -alt_build_kprefix() { - if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \ - || [[ -n ${UCLIBC_AND_GLIBC} ]] - then - echo /usr - else - echo /usr/${CTARGET}/usr - fi -} -just_headers() { - use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] -} - -uclibc_endian() { - # XXX: this wont work for a toolchain which is bi-endian, but we - # dont have any such thing at the moment, so not a big deal - touch "${T}"/endian.s - $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o - case $(file "${T}"/endian.o) in - *" MSB "*) echo "big";; - *" LSB "*) echo "little";; - *) echo "NFC";; - esac - rm -f "${T}"/endian.{s,o} -} - -pkg_setup() { - just_headers && return 0 - has_version ${CATEGORY}/uclibc || return 0 - [[ -n ${UCLIBC_AND_GLIBC} ]] && return 0 - [[ ${ROOT} != "/" ]] && return 0 - - if ! built_with_use --missing false ${CATEGORY}/uclibc nls && use nls && ! use pregen ; then - eerror "You previously built uclibc with USE=-nls." - eerror "You cannot generate locale data with this" - eerror "system. Please rerun emerge with USE=pregen." - die "host cannot support locales" - elif built_with_use --missing false ${CATEGORY}/uclibc nls && ! use nls ; then - eerror "You previously built uclibc with USE=nls." - eerror "Rebuilding uClibc with USE=-nls will prob" - eerror "destroy your system." - die "switching from nls is baaaad" - fi -} - -PIE_STABLE="arm mips ppc x86" - -CPU_ALPHA="" -CPU_AMD64="" -CPU_ARM="GENERIC_ARM ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}" -CPU_IA64="" -CPU_M68K="" -CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}}" -CPU_PPC="" -CPU_SH="SH{2,3,4,5}" -CPU_SPARC="" -CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX 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_SPARC} ${CPU_X86}" - -check_cpu_opts() { - local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])" - [[ -z ${!cpu_var} ]] && return 0 - - 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:" - UCLIBC_CPU=$(eval echo ${!cpu_var}) - echo ${UCLIBC_CPU} - case ${CTARGET} in - mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; - sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; - i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; - *) export UCLIBC_CPU=${UCLIBC_CPU%% *};; - esac - else - local cpu found=0 - for cpu in $(eval echo ${!cpu_var}) ; do - [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break - done - 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 -} - -src_unpack() { - [[ -n ${ESVN_REPO_URI} ]] \ - && subversion_src_unpack \ - || unpack ${A} - cd "${S}" - - check_cpu_opts - - echo - einfo "Runtime Prefix: /" - einfo "Devel Prefix: /usr" - einfo "Kernel Prefix: $(alt_build_kprefix)" - einfo "CBUILD: ${CBUILD}" - einfo "CHOST: ${CHOST}" - einfo "CTARGET: ${CTARGET}" - einfo "CPU: ${UCLIBC_CPU:-default}" - einfo "ENDIAN: $(uclibc_endian)" - echo - - ########## PATCHES ########## - - [[ -n ${SVN_VER} ]] && \ - epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch - - if [[ -n ${PATCH_VER} ]] ; then - unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 - EPATCH_SUFFIX="patch" - epatch "${WORKDIR}"/patch - # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f) - cp "${WORKDIR}"/patch/math/libm/* "${S}"/libm/ || die - epatch "${WORKDIR}"/patch/math - fi - - ########## CPU SELECTION ########## - - local target config_target - case $(tc-arch) in - alpha) target="alpha"; config_target="no cpu-specific options";; - amd64) target="x86_64"; config_target="no cpu-specific options";; - arm) target="arm"; config_target="GENERIC_ARM";; - ia64) target="ia64"; config_target="no cpu-specific options";; - m68k) target="m68k"; config_target="no cpu-specific options";; - mips) target="mips"; config_target="MIPS_ISA_1";; - ppc) target="powerpc"; config_target="no cpu-specific options";; - sh) target="sh"; config_target="SH4";; - sparc) target="sparc"; config_target="no cpu-specific options";; - x86) target="i386"; config_target="GENERIC_386";; - *) die "$(tc-arch) lists no defaults :/";; - esac - sed -i -e "s:default TARGET_i386:default TARGET_${target}:" \ - extra/Configs/Config.in - sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ - extra/Configs/Config.${target} - - ########## CONFIG SETUP ########## - - make defconfig >/dev/null || die "could not config" - - for def in DO{DEBUG{,_PT},ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do - sed -i -e "s:${def}=y:# ${def} is not set:" .config - done - if use debug ; then - #echo "SUPPORT_LD_DEBUG_EARLY=y" >> .config - echo "SUPPORT_LD_DEBUG=y" >> .config - echo "DODEBUG=y" >> .config - #echo "DODEBUG_PT=y" >> .config - fi - - sed -i -e '/ARCH_.*_ENDIAN/d' .config - echo "ARCH_$(uclibc_endian | tr [a-z] [A-Z])_ENDIAN=y" >> .config - - if [[ $(tc-is-softfloat) != "no" ]] ; then - sed -i -e '/^HAS_FPU=y$/d' .config - echo 'HAS_FPU=n' >> .config - fi - - local moredefs="DL_FINI_CRT_COMPAT" - # We need todo this for a few months. .28 is a major upgrade. - # Don't do it from cross-compiling case though - if ! use uclibc-compat ; then - if [[ -z ${UCLIBC_AND_GLIBC} ]] && [[ -z ${UCLIBC_SCANNED_COMPAT} ]] && \ - ! just_headers && [[ ${CHOST} == ${CTARGET} ]] ; then - local fnames="" - einfo "Doing a scanelf in paths for bins containing the __uClibc_start_main symbol" - fnames=$(scanelf -pyqs__uClibc_start_main -F%F#s) - if [[ -z ${fnames} ]] ; then - einfo "This system is clean." - einfo "To prevent the scanning of files again in the future you can export UCLIBC_SCANNED_COMPAT=1" - moredefs="" - else - ewarn "You need to remerge the packages that contain the following files before you can remerge ${P} without USE=uclibc-compat enabled." - ewarn "qfile ${fnames}" - echo - ewarn "Leaving on ${moredefs}" - fi - else - moredefs="" - fi - fi - for def in ${moredefs} MALLOC_GLIBC_COMPAT 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 - done - echo "UCLIBC_HAS_FULL_RPC=y" >> .config - echo "PTHREADS_DEBUG_SUPPORT=y" >> .config - echo "UCLIBC_HAS_TZ_FILE_READ_MANY=n" >> .config - - if use iconv ; then - sed -i -e "s:# UCLIBC_HAS_LOCALE is not set:UCLIBC_HAS_LOCALE=y:" .config - echo "UCLIBC_HAS_XLOCALE=n" >> .config - echo "UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y" >> .config - echo "UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y" >> .config - - if use nls ; then - echo "UCLIBC_HAS_GETTEXT_AWARENESS=y" >> .config - else - echo "UCLIBC_HAS_GETTEXT_AWARENESS=n" >> .config - fi - - if use pregen ; then - echo "UCLIBC_PREGENERATED_LOCALE_DATA=y" >> .config - echo "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=y" >> .config - if use userlocales ; then - cp "${DISTDIR}"/${MY_P}-user-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy ${MY_P}-user-locale.tar.gz" - else - cp "${DISTDIR}"/${MY_P}-$(tc-arch)-full-locale.tar.gz \ - extra/locale/uClibc-locale-030818.tgz \ - || die "could not copy locale" - fi - else - echo "UCLIBC_PREGENERATED_LOCALE_DATA=n" >> .config - fi - else - echo "UCLIBC_HAS_LOCALE=n" >> .config - fi - - 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 wordexp && 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 - echo "UCLIBC_HAS_SSP=y" >> .config - echo "SSP_USE_ERANDOM=n" >> .config - echo "PROPOLICE_BLOCK_ABRT=n" >> .config - if use debug ; then - echo "PROPOLICE_BLOCK_SEGV=y" >> .config - echo "PROPOLICE_BLOCK_KILL=n" >> .config - else - echo "PROPOLICE_BLOCK_SEGV=n" >> .config - echo "PROPOLICE_BLOCK_KILL=y" >> .config - fi - - # arm/mips do not emit PT_GNU_STACK, but if we enable this here - # it will be emitted as RWE, ppc has to be checked, x86 needs it - # this option should be used independently of hardened - # relro could be also moved out of hardened - if has $(tc-arch) x86 ; then - echo "UCLIBC_BUILD_NOEXECSTACK=y" >> .config - else - echo "UCLIBC_BUILD_NOEXECSTACK=n" >> .config - fi - echo "UCLIBC_BUILD_RELRO=y" >> .config - if use hardened ; then - if has $(tc-arch) ${PIE_STABLE} ; then - echo "UCLIBC_BUILD_PIE=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - fi - echo "SSP_QUICK_CANARY=n" >> .config - echo "UCLIBC_BUILD_SSP=y" >> .config - echo "UCLIBC_BUILD_NOW=y" >> .config - else - echo "UCLIBC_BUILD_PIE=n" >> .config - echo "SSP_QUICK_CANARY=y" >> .config - echo "UCLIBC_BUILD_SSP=n" >> .config - echo "UCLIBC_BUILD_NOW=n" >> .config - fi - - # Allow users some custom control over the config - if use savedconfig ; then - for conf in ${PN}-${PV}-${PR} ${PN}-${PV} ${PN}; do - configfile=${ROOT}/etc/${PN}/${CTARGET}/${conf}.config - einfo "Checking existence of ${configfile} ..." - [[ -r ${configfile} ]] || configfile=/etc/${PN}/${CHOST}/${conf}.config - if [[ -r ${configfile} ]] ; then - cp "${configfile}" "${S}"/.config - einfo "Found your ${configfile} and using it." - einfo "Note that this feature is *totally unsupported*." - break - fi - done - fi - - # setup build and run paths - local cross=${CTARGET}- - type -p ${cross}ar > /dev/null || cross="" - sed -i \ - -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \ - -e "/^KERNEL_SOURCE/s:=.*:=\"$(alt_build_kprefix)\":" \ - -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ - -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ - -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ - .config || die - - yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig" - - cp .config myconfig - - emake -s clean > /dev/null || die "could not clean" -} - -setup_locales() { - cd "${S}"/extra/locale - if use userlocales && [[ -f ${ROOT}/etc/locales.build ]] ; then - :; - elif use minimal ; then - find ./charmaps -name ASCII.pairs > codesets.txt - find ./charmaps -name ISO-8859-1.pairs >> codesets.txt - cat <<-EOF > locales.txt - @euro e - UTF-8 yes - 8-bit yes - en_US ISO-8859-1 - en_US.UTF-8 UTF-8 - EOF - else - find ./charmaps -name '*.pairs' > codesets.txt - cp LOCALES locales.txt - fi - cd - -} - -src_compile() { - cp myconfig .config - - emake headers || die "make headers failed" - just_headers && return 0 - - if use iconv && ! use pregen ; then - cd extra/locale - make clean || die "make locale clean failed" - setup_locales - emake || die "make locales failed" - cd ../.. - fi - - emake || die "make failed" - [[ ${CTARGET} != ${CHOST} ]] && return 0 - - if [[ ${CHOST} == *-uclibc ]] ; then - emake utils || die "make utils failed" - fi -} - -src_test() { - [[ ${CHOST} != ${CTARGET} ]] && return 0 - [[ ${CBUILD} != ${CHOST} ]] && return 0 - - # assert test fails on pax/grsec enabled kernels - normal - # vfork test fails in sandbox (both glibc/uclibc) - make UCLIBC_ONLY=1 check || die "test failed" -} - -src_install() { - local sysroot=${D} - [[ ${CHOST} != ${CTARGET} ]] && sysroot="${sysroot}/usr/${CTARGET}" - - local target="install" - just_headers && target="install_dev" - make DESTDIR="${sysroot}" ${target} || die "install failed" - - # remove files coming from kernel-headers - rm -rf "${sysroot}"/usr/include/{linux,asm*} - - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - if [[ ${CTARGET} != ${CHOST} ]] ; then - dosym usr/include /usr/${CTARGET}/sys-include - return 0 - fi - - if [[ ${CHOST} == *-uclibc ]] ; then - make DESTDIR="${D}" install_utils || die "install-utils failed" - dobin extra/scripts/getent - fi - - if ! use build ; then - dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 - doman docs/man/*.[1-9] - fi -} - -pkg_postinst() { - [[ ${CTARGET} != ${CHOST} ]] && return 0 - [[ ${CHOST} != *-uclibc ]] && return 0 - - if [[ ! -e ${ROOT}/etc/TZ ]] ; then - ewarn "Please remember to set your timezone in /etc/TZ" - [[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc - echo "UTC" > "${ROOT}"/etc/TZ - fi - - if [[ ${ROOT} == "/" ]] ; then - # update cache before reloading init - /sbin/ldconfig - # reload init ... - [[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null - fi -} |