diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-01-08 03:55:22 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-01-08 03:55:22 +0000 |
commit | 82ab583e84ccec3cd244451e1ecc77b9bc03b626 (patch) | |
tree | 23f0141a8e3d837f7002ec6de181cd72f64576d4 /sys-libs | |
parent | Bump (diff) | |
download | historical-82ab583e84ccec3cd244451e1ecc77b9bc03b626.tar.gz historical-82ab583e84ccec3cd244451e1ecc77b9bc03b626.tar.bz2 historical-82ab583e84ccec3cd244451e1ecc77b9bc03b626.zip |
Add fix from upstream for marking ll_tzname vars local #497466 by David Hendricks.
Package-Manager: portage-2.2.8/cvs/Linux x86_64
Manifest-Sign-Key: 0xD2E96200
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/uclibc/ChangeLog | 10 | ||||
-rw-r--r-- | sys-libs/uclibc/Manifest | 30 | ||||
-rw-r--r-- | sys-libs/uclibc/uclibc-0.9.33.2-r9.ebuild | 340 |
3 files changed, 364 insertions, 16 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog index 9a239a627bfc..f63c433cfae7 100644 --- a/sys-libs/uclibc/ChangeLog +++ b/sys-libs/uclibc/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-libs/uclibc -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.84 2013/12/25 09:56:14 vapier Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.85 2014/01/08 03:55:16 vapier Exp $ + +*uclibc-0.9.33.2-r9 (08 Jan 2014) + + 08 Jan 2014; Mike Frysinger <vapier@gentoo.org> +uclibc-0.9.33.2-r9.ebuild: + Add fix from upstream for marking ll_tzname vars local #497466 by David + Hendricks. 25 Dec 2013; Mike Frysinger <vapier@gentoo.org> uclibc-0.9.33.2-r8.ebuild: Fast stabilize due to crasher in current stable #495256 by Anthony Basile. diff --git a/sys-libs/uclibc/Manifest b/sys-libs/uclibc/Manifest index c67a0e476614..b3b3e2631077 100644 --- a/sys-libs/uclibc/Manifest +++ b/sys-libs/uclibc/Manifest @@ -12,6 +12,7 @@ DIST uClibc-0.9.33.1-patches-2.tar.bz2 5640 SHA256 a441d40de4ee4a763e39c7ec39633 DIST uClibc-0.9.33.1.tar.bz2 2830006 SHA256 33df86ec088ec19784e10fb954950677ddee63c06f0edccd4ade1a7971a9d137 SHA512 4c11215e644ed5e6238792c9e2c38aa4fd59c6009846e0e5f849cf14e1b058393e476e3367b6860ccb693c0060be6e4a42f9e91ed08e83878a0094c5b7e006f8 WHIRLPOOL 9943d139c5b9169c6c4a54d646eea910a488db49bb42e912952e07b8ef54fb13de718388c54e7e8176100820df3654859481b287bda8f9ef6871e8119ec18913 DIST uClibc-0.9.33.2-patches-1.tar.bz2 2351 SHA256 f85756b12ce5f20747f7900b30016bc4c391e0b6977cf6ecfe35891da0f851d8 SHA512 a3f49eb0732c96ab241bd7cbca281418760f78d19e98ccc94a9cf7a54428e12884e90f1240cd0368e9d2f1f74ea9f332a4987496395176503d667abfa59b221a WHIRLPOOL de7ce039d8710b32ae5a189b173e339abdf1636868f021fc26ce77e2db984864813072eb6f033de4d1b41d0df075d426a242299edad62a2ca02045cc587ded69 DIST uClibc-0.9.33.2-patches-10.tar.bz2 23990 SHA256 d23cc4362c180c88bd16a7b8b53a1b88011e1a39d1371e3fb3cef915731ea0e8 SHA512 798acc60f7512ecc38aac72b29a12ca8f19531c64e5b4b576734f53ea5cbab9ec69d0f253fbb3fa6e721a5f6ea3a982f729af7112a44719a2aa1adda0defeef1 WHIRLPOOL 265218bfa42f5e24f8486d48be59e37185841aad7b7d5bd76859c394175b2361c6e428d2feaa695c5b1317fdcc10a2013029d327739017131aabca92274e89df +DIST uClibc-0.9.33.2-patches-11.tar.bz2 24310 SHA256 f6d9728fea5f2a7290261816aa9823d469e7da8a706e87c169dd4a691e1a6dc2 SHA512 fcc9c14d37ae2ebc343344062ea71ecd732a7787dfe08556e16f60a66e856193d288bfc4958be71a5679b8edd1210984a53bcb4b4a5ebab88584ad6bdc1773c0 WHIRLPOOL ff1a4352428aabb6f77446797d823f212527d26dbd693817dcfac32faf489650d8d7367245afb946b7935f9e177c311b7e75b287411866e65c38d22b72216f2a DIST uClibc-0.9.33.2-patches-2.tar.bz2 2854 SHA256 a43192a582ad5428daaceec23aaf096ac037a723eb79724aa716f3850674fecd SHA512 f7ef2bc1a2498e2215828c52003a4ddc4ebe79dd43def367398fad7895c5e5ce9ae4ce68e51141193ef7d47d0727ed477c7b00fbb95b47cd6f251aacbd15048c WHIRLPOOL 80bd9de5b4c5eb671a462a094cd016d0931885ca4604a489017cc36ae5d960a5f08cb72185011d796d5bf9c4809ed2331416ca9b0dae00991ac1e998fc31f7c9 DIST uClibc-0.9.33.2-patches-3.tar.bz2 4002 SHA256 2c06d1f80c8b7e5b0ef60571720273e2ccc55551a3dacc9ed5f7c04e9eda7018 SHA512 935dded858fbd4ce7317bdd1c097f26d8752bd241c12c9b1420e621bb80e59d8f74f84a8ae4df86bb07a03b2354e6c8ce4ba980aaa6d9be63c5e518da393db52 WHIRLPOOL d72989fbc7c700191b5703591bff4ff39ba6a3bb9c230cefb11c21cb2cd5f3f25bd52e8f6783bc651bd273d15146246491923bb1c357ce117da496910acefe6e DIST uClibc-0.9.33.2-patches-5.tar.bz2 10084 SHA256 9c9814360470b1ff3308a85fe8a61ce35eb57c288301b7244450b894f9627a29 SHA512 efd70db740d090d4791e4afc33db2a26df9151ca5be8bcd499ce65d33222af784cb11cbc1f6a4288cab5a4ad1b686488ce836bb62629a9c04f643d40706ac917 WHIRLPOOL b88c36d0eb3f3398a5e96d155cdd8d1b3f6c02ecba4d3f7b167f35c983cf6098e3795839f3f8e0564a91d364c6e2aa0408adcc4647af2143be51a892f2508b27 @@ -35,24 +36,25 @@ EBUILD uclibc-0.9.33.2-r5.ebuild 9116 SHA256 8ba9e2a9cfce1c18d23ca5dca98d9993f22 EBUILD uclibc-0.9.33.2-r6.ebuild 9109 SHA256 0819c77f16056f27b16644c74913175adc98d15b9abe13ba80ba0e9479a71400 SHA512 260d8bdc0f368c21bfc9aef028160fa0ea1ab8181b24d4f1e214febfd0149a0ebf29d7d70b3d3b2b798608ffa26625f738d09d7b0f00ef4121f032a57df81041 WHIRLPOOL fa9dd33aa58578ac7cfbe4dc328b5945ba3a30a6c6f88acf70e9da7e026032e46a0bb8ddfd57e1f92d340c1c9bc9f1e8d0a1c8f2beef86b05fe3e87910da13af EBUILD uclibc-0.9.33.2-r7.ebuild 9116 SHA256 8fbbd90b84cb26e1e6a1e3ff0f86c86f8a9adbc4e5efbd6390af0c477d04e2a3 SHA512 b09cad98dc814f0fc4696e0b08955247b335dcfb31df050ab704d4635a0b25a963fccaaf871e303bef05e7b8ac3d5d305bd681e13cce3134eebc382007c487a2 WHIRLPOOL 178bd8a03c1dc164122b04e3265a3e79f5d0f5d068f2273de37c5bc2af07e67519923ae8640ff59c7a17d40fdc0164742bbb88c99357fc86f8bc3f30f50843a1 EBUILD uclibc-0.9.33.2-r8.ebuild 9110 SHA256 f5c2e6f7053997fbaa2dd537cacd3776e49f6f4c57ee0ce62bf0a19abde700f8 SHA512 eea382c406cc3f8f4c8d97d296497fb8e56f3d3180c6d2df0c4cd690a127cad0e58f235fad8e758f5bba433afaf0d3ac45c33adf389a5a224331971e0a9e93a9 WHIRLPOOL 306130ca8f3cddb65886831eb9556378fc8d7c3a311ba614a696fff0d3fb2cdcc372009860aae28541e6c11deeb94f2769791d1ac36fdb5b21e366755790a9b9 +EBUILD uclibc-0.9.33.2-r9.ebuild 9117 SHA256 c7fd2c6d1979dee89dc827486e6322dd22325f6b015c84647121f8f54eff2dad SHA512 cfee7dea57e3c579eddae1fd45f3ae8606ee25cee1560f62c8d4a50cfdddec3284d621053385e6849f3a6b2a33476ea91bc6f8ca093492cb287db8c7a05e0a6a WHIRLPOOL 8a3b541a7e70c02f86b471caf1bf6e9d5afff734d0340295f898eb9ff4913c32d6a30d2ab4cc886a21d2429f472be488589e008ad9021316982d0651c089d55c EBUILD uclibc-0.9.33.2.ebuild 10630 SHA256 db49c741a424d2433ec3978184c979b2a9fcb903f83eeb110adcec76940b342e SHA512 75e974586c57662f2f39d6a80a1162ec611b31b4dfa881a2ab2094f6b35c6b9375c98a53c957580395b4754cc8c27b4a53737b6d9a0f099ab4a3c45ae1169125 WHIRLPOOL 9f8f01465c556c372d926e701abef49770c1772b40ad83325439343d22561a4b1f4cf6c9bcdba78815f2e8af11d3455deee3dd81225c54b83de3dd132e2462c9 EBUILD uclibc-9999.ebuild 9108 SHA256 ddeff7104340a8a5c5bd46dbe44d27cc000bb84899b089ba530210e55cf6f9de SHA512 fa14dcf54ea00811d87d04aa1c47230b6181268de53c545532ec44e412c45166cf9f32c0aa70dfa10841ed32ed5de1ba73eab2ac870ba60c259fda78cd5fccd5 WHIRLPOOL 8e63062268e7d87c03c05a025f894f9a7acd5711c0bec199dbe98cacb88391db8758a137804a0cc43f48b65aad6d288cd2b3744ecd5a23b6779ee735f6e61388 -MISC ChangeLog 22833 SHA256 ff0f79fa09d8b9d7f2272036b650c91ac89ef338c1a44f44e2cb244af6f14086 SHA512 2b27277b2d107636c70c7f4274a8bfd4e505fd11689f69421b4d7330d9f0d27943375fd085290825c891ce288da9c1368db7a12fe6ad5cfbcb2cb3a937fb6e0a WHIRLPOOL 788fdfc1d0f841843d9c1278b69e9a9d09ea00871f2fffb03b80ae1205f7a670d79e0927095067a44ef45cc6f6be1b7f05e0cba48d9494c28329db0b612cc216 +MISC ChangeLog 23034 SHA256 cd86276c2ca27124cb6a7c34f2ca54ba3642cee416382f4cc88082ef94fae50f SHA512 f4e7fb381912d57085affb525c368061f6f9a8b7d70fe6fceb440e17f6a6c24bba832a025c82f5f3d536a04322cce7bc6e67656acd9f552c3552e672f70421d7 WHIRLPOOL fc40f385c4a52d4e75bc085df56083a94b6c5f0a4c4363cdf4ead2b05cf2f8084e37cc1261463a5eaee0e7729bcb55ee95321bd8871c5b7c7a77c837a9fc6cbf MISC metadata.xml 1435 SHA256 cd15ca4d65ec270c128fb37bd2c489b6e83c566203028cc8ecf9a90bea9c071d SHA512 84b5c8b1afe189587178d7736c3fca20b8079cf5ab666d524962e104a0a531de3fe39bdb2d3b69e4a77c322b8392fe7df292ea50ff89d80f99201aef1a12bc2b WHIRLPOOL 1e93f7bf529709eea2a8dfa81737bff41d22bd8af35ed562f06479f337b53ddc7aedd362c91f8361016c462edb5e8007586a7fde7f960fd4b7b88eff02c42e81 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iQIcBAEBCAAGBQJSuqu/AAoJELEHsLL7fEFWIBIQAKaxiyXQLSuC/GrSsdU0QdGO -fpnbT2+/PZc3wn5S6iKQa9ulP+SLgLpXz4RzWq+X5VG0xKHWiWcz1YgaD9mDZjKd -gDkxStgtQ3SEyRQCIblfJ+RYIlzkZaw/wUQc4jVleen/tNZptYDPeIWnHtnB0vwK -S8K9pIKXi30eQDIVpvUURt5SDp8Zg+LJJ0hyFsSZSrAVuqxN/vpdtJV0/+jaV2AH -LVifzq+YyRK4uPXRGiixyidGEIrFkd8EO6TwR9oFTgw/H12gH1n94+8YczpU4ExQ -xK4qbX9Ge+5RHcWjl1H/8mYthU+5aLVscrQQyQzQCYbdVlq0P4bhabvR04C2oKD1 -w8wapmkDnZ6aO1JXrReSUdrNA604amV45ztU7FFzzbVLrVDqEdSIgLhZ+o6w3SVu -5nKK2PXPd5vYREzbDysqmvzYO1ajqET783tOdSMZgG8QgmTtPsOYvWyS5/MmJFM/ -vXtnl2y25h5KHN6sRG95czCsysFlw5ngR7VnjgLllmzJ8DvYlV4Q42nZSD3c0g74 -7X7sbbyhHlaasQBdEBlVdfpBnlMEQwYElDE/yr2sE3TqhYNN/YjNOYJ90PCYzPkm -L+3D1+3nW+HsMoMwsp6u6PgGa5SNpMpuE4zV+pFhJ/duxhKeornIfF71LXYydFsx -lDL3pdWwMdgyODM66ujv -=HoTd +iQIcBAEBCAAGBQJSzMwsAAoJEPGu1DbS6WIA/IkP/Rk+mtEwyOWZQ5ZtYqlyMRtI +ClEgkipo6RdWp1kiBzk9vkJSHQk0pJ7biksUx49WWE/b1Hn5XnIX5v5paLX1IJuU +YQORzG/WwtpMODcZ5h0zSaPfap0Zc0+cASpN2NLGANXSAEREeUZmMLdAoWi6u9U2 +igamkbMwH0eLGeRBbdYqsn0uMir8kwAY8UICRmxjLUa47F4iSF5FpC4bqmlAVT5z +uLz8ha9RrJ5j4lTXirs9qAsW278/MjVj6sOE7RFwmq/5SmBJHmSvWzzG7UnxXtjI +ILhG8C4+AefB7e2NerhNUmJ3bhX+kEz8GOAqGwCxLGqd2hLjxCruBhyJZ/e3o846 +oc/FZRUCDMTmS63cl1PbUNODtsh6/bdYJwkV5vzFHs9SRS0DEpQr+sAjsIAtXfPn +4PovC5eREK8fZD71YS4wdxObOm0SvodTcwZKLBzaFbesokjPd+Wydq4Cqxm6gMo/ +fmhmUo3XtUyB5OImS/kaeLcrE89UoHvTCXHedizYMVB+DWfy5GihSVdC99t9L6Zd +sGqJZPbgnXh4ldmtMXiQ1/7FMYLlK5FZFanT+tAZ3NDHR25x3gLO5U8tsxw3CPDV ++pPr3Y11cTTLjpBnns9i/qo/F7dkNF6JMtXzEA0Uq62CcaRu97Kk3I7uPPgqZUfo +p2I13Dxw5ZWuuZYEhmAq +=bnwe -----END PGP SIGNATURE----- diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r9.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r9.ebuild new file mode 100644 index 000000000000..ff0c0b852f94 --- /dev/null +++ b/sys-libs/uclibc/uclibc-0.9.33.2-r9.ebuild @@ -0,0 +1,340 @@ +# Copyright 1999-2014 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-r9.ebuild,v 1.1 2014/01/08 03:55:16 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="11" + 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 +} + +check_cpu_opts() { + case ${CTARGET} in + # Need to handle $ABI here w/mips. + mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; + sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; + i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; + # XXX: Should figure out how to handle sparc. + esac +} + +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_SUPPORT_AI_ADDRCONFIG + UCLIBC_SUSV3_LEGACY + UCLIBC_SUSV3_LEGACY_MACROS + UCLIBC_SUSV4_LEGACY + UCLIBC_USE_NETLINK + 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 + + epatch_user + + 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=$(tc-arch) config_target + case ${target} in + amd64) target="x86_64";; + arm) target="arm"; config_target="GENERIC_ARM";; + avr) target="avr32";; + mips) target="mips"; config_target="MIPS_ISA_1";; + ppc) target="powerpc";; + sh) target="sh"; config_target="SH4";; + x86) target="i386"; config_target="486";; + esac + if [[ -n ${config_target} ]] ; then + sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ + extra/Configs/Config.${target} || die + fi + 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 +} |