diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-07-05 04:13:20 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-07-05 04:13:20 +0000 |
commit | f881440a0d52d6f82aab9c0cef9161550cae47c9 (patch) | |
tree | 03a4c9551135b816589fa5504fee7002aad64c5b /sys-libs/uclibc | |
parent | 2.2.0_alpha116 version bump. This includes all of the fixes in 2.1.11.5. (diff) | |
download | historical-f881440a0d52d6f82aab9c0cef9161550cae47c9.tar.gz historical-f881440a0d52d6f82aab9c0cef9161550cae47c9.tar.bz2 historical-f881440a0d52d6f82aab9c0cef9161550cae47c9.zip |
Pull in rpmatch from upstream to move it from header to C library for gnulib #423491.
Package-Manager: portage-2.2.0_alpha115/cvs/Linux x86_64
Diffstat (limited to 'sys-libs/uclibc')
-rw-r--r-- | sys-libs/uclibc/ChangeLog | 8 | ||||
-rw-r--r-- | sys-libs/uclibc/Manifest | 30 | ||||
-rw-r--r-- | sys-libs/uclibc/uclibc-0.9.33.2-r1.ebuild | 372 |
3 files changed, 395 insertions, 15 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog index 41016bdb9ff1..6d993283162c 100644 --- a/sys-libs/uclibc/ChangeLog +++ b/sys-libs/uclibc/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-libs/uclibc # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.67 2012/06/09 06:47:12 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.68 2012/07/05 04:13:20 vapier Exp $ + +*uclibc-0.9.33.2-r1 (05 Jul 2012) + + 05 Jul 2012; Mike Frysinger <vapier@gentoo.org> +uclibc-0.9.33.2-r1.ebuild: + Pull in rpmatch from upstream to move it from header to C library for gnulib + #423491. 09 Jun 2012; Mike Frysinger <vapier@gentoo.org> -uclibc-0.9.27-r1.ebuild, -uclibc-0.9.28.3-r3.ebuild, -uclibc-0.9.28.3-r7.ebuild, diff --git a/sys-libs/uclibc/Manifest b/sys-libs/uclibc/Manifest index b15d2131994a..040cef0ff83b 100644 --- a/sys-libs/uclibc/Manifest +++ b/sys-libs/uclibc/Manifest @@ -11,6 +11,7 @@ DIST uClibc-0.9.33.1-patches-1.tar.bz2 2406 RMD160 1bc437f26786ef622ce6463ee3882 DIST uClibc-0.9.33.1-patches-2.tar.bz2 5640 RMD160 6bc26fbb57ae71e71e4c31463a31ce6fa9a13f1a SHA1 9f048c40b2256098f006f2858d18f02b4d016a9c SHA256 a441d40de4ee4a763e39c7ec39633241f880295a19b1b20e0b22b887b3efb228 DIST uClibc-0.9.33.1.tar.bz2 2830006 RMD160 ab51fa11c1a1eece7dc70d307d63b9e0bf5c601c SHA1 8360891d368726a8c6d9ac3e1431c73bb8e99b0b SHA256 33df86ec088ec19784e10fb954950677ddee63c06f0edccd4ade1a7971a9d137 DIST uClibc-0.9.33.2-patches-1.tar.bz2 2351 RMD160 a069c2f917615674388476947cfbe822ba444edb SHA1 263e93d8f82a60ba071e274200dd1ee4e932f10e SHA256 f85756b12ce5f20747f7900b30016bc4c391e0b6977cf6ecfe35891da0f851d8 +DIST uClibc-0.9.33.2-patches-2.tar.bz2 2854 RMD160 833d2f4d1424704d92259ef2da5d1d77cafa8624 SHA1 386ddbc08ef0f066dcb4383c4db83f8460acefa8 SHA256 a43192a582ad5428daaceec23aaf096ac037a723eb79724aa716f3850674fecd DIST uClibc-0.9.33.2.tar.bz2 2834029 RMD160 842e5eba2790603a6e241bbd4a5859e35fb602b8 SHA1 4d8d67d6754409bd10015d67d1ce7a04c0b001ba SHA256 988d2c777e0605fe253d12157f71ec68f25d1bb8428725d2b7460bf9977e1662 DIST uClibc-locale-030818.tgz 236073 RMD160 8e3f4b20b94e07e535cbbbe81287186014c5f151 SHA1 78f901e6ed228ed84106bd034c1b97eee1eecb50 SHA256 c4362be318a38f18d98dccf462d22d95bab92f05548bb93f65298fe9afaebd57 EBUILD uclibc-0.9.28.3-r8.ebuild 14630 RMD160 f09d2247239cee060af6185e8ecffca82efec3dd SHA1 1fb9de93e3a59875fe3bf61788641fd00b30b0f8 SHA256 27a5827a295d4b02c34136abcc8a41793d33c9dba849d5050a416760eb9cc8b0 @@ -19,24 +20,25 @@ EBUILD uclibc-0.9.30.1.ebuild 11352 RMD160 23df522f9fb1b22a136a81e966168cf993d12 EBUILD uclibc-0.9.30.ebuild 13759 RMD160 285b4924ccecf62170b3d679b2e4be31a1225be4 SHA1 3c0e9eb2f44b1f6129c5056328de93397b818bcf SHA256 878f2b1a77e3de34f05949ad9d605b39971011e032010fddf68a8c06a7e1f3ea EBUILD uclibc-0.9.33.1-r1.ebuild 10638 RMD160 4421ee4794536f1db1f7f05badbec4262b58a8da SHA1 e45218ccbb71f74bee401ea9542e697aa542420d SHA256 3dd5ada253e15765973bafc55b9af445e985f9abf5315210ca9ef960c979edd8 EBUILD uclibc-0.9.33.1.ebuild 10612 RMD160 c24371364b6be330dce159c81e026af1d325b68e SHA1 2b47f4962b5278f57fc271507155a0d9f741f442 SHA256 f175807254cff8e8e91fb0173d3d965f3eee27458e3917c042b085cf7ef7c236 +EBUILD uclibc-0.9.33.2-r1.ebuild 10638 RMD160 bbefb30822becca88a83c6b3f484caa61fc373c5 SHA1 e102f060ea6bb5625952051ad8749d38b678539a SHA256 b3c450389a1c396563382e8061fa206baef9acece2cc709a9acc73a03c090217 EBUILD uclibc-0.9.33.2.ebuild 10630 RMD160 0f9a864a6e23c856b003ce74ce8f18d7257f24c9 SHA1 49d4a3ef777735301754e9c89c91eeaeb28d89fe SHA256 db49c741a424d2433ec3978184c979b2a9fcb903f83eeb110adcec76940b342e EBUILD uclibc-9999.ebuild 10630 RMD160 71e355a49727b807c39d8c002c21bd63fbb662be SHA1 9c04d623ae9a084dd5f7f4f282d7cdf713d9a381 SHA256 1cec3d6d45c9f727a958f4d8216b8b82897f9a3af6bc5ce3d32cc7aa7947c6b0 -MISC ChangeLog 20022 RMD160 ccc24b3d0e6832fcad9c430a0329c24cb4a0a7e8 SHA1 2c7d632fd379ad5d6f94856dc84eb25e9a9e3eb8 SHA256 af9800c855f2c9362f9aeabf9a7d46d945ccdfe0a10ac8731ff1c35485e8d070 +MISC ChangeLog 20226 RMD160 00e96c1e554da8e2037a6ddeb1a1e0e14dbe4dd8 SHA1 4bfdaa573d6a25a5b76fffbc8c597289e4fbcd4f SHA256 85fc7bb8532ed113af9dc6fbe7d52ec09420f9cedb80d7e839b4948241d5734f MISC metadata.xml 1435 RMD160 c1c094bb21b394fcbe9700d82a0c53b6fbfecb7b SHA1 cd0fb903aff700a6c15c685c7457429025e6d08d SHA256 cd15ca4d65ec270c128fb37bd2c489b6e83c566203028cc8ecf9a90bea9c071d -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQIcBAEBAgAGBQJP0vF+AAoJELEHsLL7fEFWYsIP/14ly/NHKudCLTSgZLkuF+RB -v9wfKHUg5XbnRZu+DHp9IV8GPxr422b12sbhGsVh237VJSs+teuCjvkRGwI4TNXr -p/KR+MIAA81kj6412Mv2e30CK8RuRObuM77FWYLX4J+lYgpzAhgXXXENjh3LbY1l -h+FFjOQ/tb5ebbJfiP0C3Q2oRwUPlXaw4Ad86s/fDPZU80GP/fmVXQU1FB8fBF0d -BRlkiot2Qym0WODuO650Bjy0bEYSbZiShjq6zTsPrCqHvPMNGrqy5vNYZHv/ZbF3 -fUtWfXgRdK2XpeHR0lbWkoY5306qkTWEzMh0Sw05V0pnoAFzfzP+/0FqcHC5cPEg -6O8JOSrL1RtnDZBR9cW2MGAW1kToYw6MC7+YDuox9ly9MmOlmF6kaaWYaQhy+myS -nAmt49K1KRKKkSDyj3289scsZAnPjI2bnWbxzSnl+XU1vPDSr7C4uenaxelFsMQg -yDKQ1lIEz/yLSHl+ahvAYzdQd9wfkROVxMpI76wkUnL3FQL7BhEcpsbnWgJ0PZup -05azLfQz/9A4VIr/erbxSIyE6vaG0AZHdO3X5+rhxxq1fN1FRyuYFFKh4G+9twFb -uhSVJf6j+bUFHDVE2538UYCY/xQpZQj/xgE42DwXOMAfoL7dEijUhchb/gMAU/3n -UFPxfbKOhDMqKP6JbAPI -=0LTy +iQIcBAEBAgAGBQJP9RRxAAoJELEHsLL7fEFWBvAP/RbDUagiVKmA8O1tzh5sSon4 +6LhIdiVGFkFzGkIbsG3icyGoRwFaQ0Y2OsZRBlIjZJpSdC5G08HmB5lSK/+YDNi4 +tb/VfQ27JSlVXIUBmGSjzcPhn91ZJXglR7orWD52aus75h+pzTJtyMgc0JM9xwhc +PfhDOBp72fDgUQGgogBuOIR9/OJ5TfZVvRq/Xq0pg1soD3qJjddlLACz2VuPW7+h +FTy1Mz02A2+2g/pAlPI96SxyzGR+am+BAco/puPqJApZ/yrfcELC9B1Dx/MNUjZ3 +7vWNyCkmJMdEd6EtZPwKtK7DWc7TKoyRivqq8qAXTcrYjhQCUhUfD338X1C/qX57 +JTi7yHh9/YXtYmu07ToU3+teUt2eU2q4TaCXkkSN3EJasO9B43wobemlglbgx+tL +UKLA3c1UM3AE3GVv35p7w3PWPdbAIHeKDKE0ogtpCRaI6heIhCYFLDDUAI8Vevlh +iTZvLhBdDprw+HpQ+x88/a66j2lLzalbWc1HD0Y2M7ug8BRmgVS3l/2M8hE/DATt +6II1tefmvHrHkBAzM+Qzds9sD8mvt8q4PXTyWWkKJ29ED0000UNM1IXSBSK3yR21 +wS32xhiiRlONeWn7KlEpOsl3VLA6OSzytLWN7AgEnA33zjgZK120kYI/PTPSXrS/ +kknzzjfzmH7licFL/Dj5 +=N/we -----END PGP SIGNATURE----- diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r1.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r1.ebuild new file mode 100644 index 000000000000..aa65b176e410 --- /dev/null +++ b/sys-libs/uclibc/uclibc-0.9.33.2-r1.ebuild @@ -0,0 +1,372 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r1.ebuild,v 1.1 2012/07/05 04:13:20 vapier Exp $ + +inherit eutils flag-o-matic multilib toolchain-funcs savedconfig +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://git.busybox.net/uClibc" + inherit git-2 +fi + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then + export CTARGET=${CATEGORY/cross-} + fi +fi + +MY_P=uClibc-${PV} +DESCRIPTION="C library for developing embedded Linux systems" +HOMEPAGE="http://www.uclibc.org/" +if [[ ${PV} != "9999" ]] ; then + PATCH_VER="2" + SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2 + ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}" + KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86" +fi + +LICENSE="LGPL-2" +SLOT="0" +IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only" +RESTRICT="strip" + +S=${WORKDIR}/${MY_P} + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} +alt_build_kprefix() { + if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then + echo /usr/include + else + echo /usr/${CTARGET}/usr/include + fi +} + +just_headers() { + use crosscompile_opts_headers-only && is_crosscompile +} + +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() { + if [ ${CTARGET} == ${CHOST} ] ; then + case ${CHOST} in + *-uclinux*|*-uclibc*) ;; + *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;; + esac + fi +} + +# XXX: We should kill these off. +CPU_ALPHA="" +CPU_AMD64="" +CPU_ARM="GENERIC_ARM ARM{610,710,7TDMI,720T,920T,922T,926T,10T,1136JF_S,1176JZ{_,F_}S,_{SA110,SA1100,XSCALE,IWMMXT},_CORTEX_{M3,M1}}" +CPU_IA64="" +CPU_M68K="" +CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32{,R2},64}} MIPS_{N64,O32,N32}_ABI" +CPU_PPC="" +CPU_SH="SH{2,2A,3,4,5}" +CPU_SPARC="SPARC_V{7,8,9,9B}" +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 +} + +kconfig_q_opt() { + local flag=$1; shift + case ${flag} in + y|n) ;; + *) flag=$(usex ${flag} y n) ;; + esac + + local var="defs_${flag}" + eval "${var}+=( $* )" +} + +get_opt() { + ( + unset ${1} + . ${2:-"${S}"/.config} + echo ${!1} + ) +} + +src_oldconfig() { + yes "" 2>/dev/null | emake -s oldconfig >/dev/null +} +src_config() { + restore_config .config + if [ -f .config ]; then + src_oldconfig + return 0 + else + ewarn "Could not locate user configfile, so we will save a default one" + fi + + emake ARCH=${target} defconfig >/dev/null || die + + local defs_{y,n} defs + + defs=( + DO{DEBUG_PT,ASSERTS} + SUPPORT_LD_DEBUG_EARLY + UCLIBC_HAS_PROFILING + ) + kconfig_q_opt n "${defs[@]}" + kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG + + sed -i -e '/ARCH_.*_ENDIAN/d' .config + kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN" + + if [[ ${CTARGET} == arm* ]] ; then + kconfig_q_opt n CONFIG_ARM_OABI + kconfig_q_opt y CONFIG_ARM_EABI + fi + + defs=( + MALLOC_GLIBC_COMPAT + DO_C99_MATH + UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC} + UCLIBC_HAS_FENV + UCLIBC_HAS_{N,}FTW + UCLIBC_HAS_GNU_GLOB + UCLIBC_HAS_LIBUTIL + UCLIBC_HAS_PROGRAM_INVOCATION_NAME + UCLIBC_HAS_RESOLVER_SUPPORT + UCLIBC_HAS_TZ_FILE_READ_MANY + UCLIBC_HAS_UTMPX + UCLIBC_SUSV3_LEGACY + UCLIBC_SUSV3_LEGACY_MACROS + UCLIBC_SUSV4_LEGACY + PTHREADS_DEBUG_SUPPORT + ) + kconfig_q_opt y "${defs[@]}" + kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE + kconfig_q_opt n UCLIBC_HAS_LOCALE + kconfig_q_opt n HAS_NO_THREADS + kconfig_q_opt ipv6 UCLIBC_HAS_IPV6 + kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE + kconfig_q_opt !nptl LINUXTHREADS_OLD + kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC + kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP + kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT + + # we need to do it independently of hardened to get ssp.c built into libc + kconfig_q_opt y UCLIBC_HAS_SSP + kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT + kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM + kconfig_q_opt n PROPOLICE_BLOCK_ABRT + kconfig_q_opt y PROPOLICE_BLOCK_SEGV + + # 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 + if has $(tc-arch) x86 || has $(tc-arch) ppc ; then + kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK + else + kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK + fi + kconfig_q_opt y UCLIBC_BUILD_RELRO + kconfig_q_opt hardened UCLIBC_BUILD_PIE + kconfig_q_opt hardened UCLIBC_BUILD_NOW + kconfig_q_opt !ssp SSP_QUICK_CANARY + kconfig_q_opt ssp UCLIBC_BUILD_SSP + + local def + for def in 1 2 ; do + # Run twice as some config opts depend on others being enabled first. + for def in ${defs_y[@]} ; do + sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config + done + for def in ${defs_n[@]} ; do + sed -i -e "s:${def}=y:# ${def} is not set:g" .config + done + src_oldconfig + done + + einfo "Enabled options:" + for def in ${defs_y[@]} ; do + einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}") + done + einfo "Disabled options:" + for def in ${defs_n[@]} ; do + einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}") + done + + # setup build and run paths + sed -i \ + -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \ + -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \ + -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ + -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ + -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ + -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \ + .config || die + + src_oldconfig +} + +src_unpack() { + if [[ ${PV} == "9999" ]] ; then + git-2_src_unpack + else + unpack ${A} + fi + cd "${S}" + if [[ -n ${PATCH_VER} ]] ; then + EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch + fi + + 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 + + ########## 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";; + avr) target="avr32"; config_target="no cpu-specific options";; + 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 CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ + extra/Configs/Config.${target} + sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak + + src_config + + if use iconv ; then + # Run after make clean, otherwise files removed + find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt + if [[ ! -f /etc/locale.gen ]] ; then + # See ./extra/locale/LOCALES for examples + die "Please create an appropriate /etc/locale.gen for locale support" + fi + echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt + cat /etc/locale.gen >> ./extra/locale/locales.txt + fi +} + +src_compile() { + emake headers || die + just_headers && return 0 + + emake || die + if is_crosscompile ; then + emake -C utils hostutils || die + else + emake utils || die + fi +} + +src_test() { + is_crosscompile && return 0 + + # assert test fails on pax/grsec enabled kernels - normal + # vfork test fails in sandbox (both glibc/uclibc) + emake UCLIBC_ONLY=1 check || die +} + +src_install() { + local sysroot=${D} + is_crosscompile && sysroot+="/usr/${CTARGET}" + + local target="install" + just_headers && target="install_headers" + emake DESTDIR="${sysroot}" ${target} || die + + save_config .config + + # 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 is_crosscompile ; then + dosym usr/include /usr/${CTARGET}/sys-include + if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then + newbin utils/ldconfig.host ${CTARGET}-ldconfig || die + newbin utils/ldd.host ${CTARGET}-ldd || die + fi + return 0 + fi + + emake DESTDIR="${D}" install_utils || die + dobin extra/scripts/getent + dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 +} + +pkg_postinst() { + is_crosscompile && return 0 + + if [ ! -e "${ROOT}"/etc/TZ ] ; then + ewarn "Please remember to set your timezone in /etc/TZ" + mkdir -p "${ROOT}"/etc + echo "UTC" > "${ROOT}"/etc/TZ + fi + [ "${ROOT}" != "/" ] && return 0 + # update cache before reloading init + ldconfig + # reload init ... + /sbin/telinit U 2>/dev/null +} |