diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-12-22 14:31:03 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-12-22 14:31:03 +0000 |
commit | d3956ab36d4cf4f16769e60c1968392d6bf62e0b (patch) | |
tree | 6216db08b97272474fd4cc2b253f06f287913905 /sys-libs/uclibc | |
parent | Stable for amd64 wrt bug #491966 (diff) | |
download | historical-d3956ab36d4cf4f16769e60c1968392d6bf62e0b.tar.gz historical-d3956ab36d4cf4f16769e60c1968392d6bf62e0b.tar.bz2 historical-d3956ab36d4cf4f16769e60c1968392d6bf62e0b.zip |
Add pread/pwrite fix #475920, eventfd fix #482866, and linux-headers fix #490008.
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Manifest-Sign-Key: 0xFB7C4156
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-r7.ebuild | 340 |
3 files changed, 363 insertions, 15 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog index ef70bb3e5d28..38f604f0fba7 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.81 2013/12/22 13:48:29 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.82 2013/12/22 14:30:57 vapier Exp $ + +*uclibc-0.9.33.2-r7 (22 Dec 2013) + + 22 Dec 2013; Mike Frysinger <vapier@gentoo.org> +uclibc-0.9.33.2-r7.ebuild: + Add pread/pwrite fix #475920, eventfd fix #482866, and linux-headers fix + #490008. 22 Dec 2013; Mike Frysinger <vapier@gentoo.org> uclibc-0.9.33.2-r6.ebuild: Stabilize for all. diff --git a/sys-libs/uclibc/Manifest b/sys-libs/uclibc/Manifest index de38e0555405..82cd66c36c0d 100644 --- a/sys-libs/uclibc/Manifest +++ b/sys-libs/uclibc/Manifest @@ -17,6 +17,7 @@ DIST uClibc-0.9.33.2-patches-5.tar.bz2 10084 SHA256 9c9814360470b1ff3308a85fe8a6 DIST uClibc-0.9.33.2-patches-6.tar.bz2 19661 SHA256 81f090b8446c09614d01a2de0637ee21fd16b57f3b5740d6d2f9e02a6869cf27 SHA512 ae2be61ab469b27d9c9b8c3d457f67e24b261db45f511c4d330364aef5843fc0775bc3de61bb9e6e027fabaea7f5736ab4fef9aaddc4d4a777743768afbe0129 WHIRLPOOL a8cd8b066374a49483caa1ea4df1446145c6bafa4f85c00d9136f185dc2ab9f616abc0687c25559e34d6f33a5015f963303293223b1e9f0a7b5777d5b08a3030 DIST uClibc-0.9.33.2-patches-7.tar.bz2 20917 SHA256 5509055465d580c92dee9ac62fe99228655f6b9b6b48d3a74fe88e9dfcde2377 SHA512 7284b021c5cfd2c08178f1e0ac0323dbad7d48cd9eddbafa6f0ef80d3e713fe2c26b75cbceccb5e44e17754e7d5509c69d9f1dbecbe74bb640ad34027f81d516 WHIRLPOOL 5a93c521c8faa7f067a4a4a8c951dad0decfddd4f005f0bd6a3ae7930ea0dee45385abb2153636e30625e4fa551529e3cdb31b8e818fdd1ae704e42f47460b4d DIST uClibc-0.9.33.2-patches-8.tar.bz2 20355 SHA256 22e199113574cd44f381c341173b5a9fb09525100f0a9c0c6799b3b5c9d2a3f2 SHA512 fd7648c13255077d8e7a81de4ca5e7c11b0fe15a0766839d877c3bb9022afaf703043019fa4fb84b666cb16f7b255c1aa919aec2b5799d55aa6d74e36c4ea2aa WHIRLPOOL d63b9ea705ce09d2b2e177ab7318830b5855bd7aed2169ba95add340b12ec54b847137647f0cf9206710ea629e3ce07d45ea9d67caaab4cea78a4d1aab6142dc +DIST uClibc-0.9.33.2-patches-9.tar.bz2 23996 SHA256 01148f0dd60bb00ae11a5e83c419cddd82cf30e82e9ac71e267502010c1e7a04 SHA512 c7e267e9349f500e5ff040d2e2c4027d1e877eb8985108f8a604f9633a0a5d6a3e3cb35f77a3989f4701c44c3129abdbf01b3e0979e36bca87fce76f24e74192 WHIRLPOOL 0572f3e5f498985cad9dbba45206b7751317089e8ab63a7281dd7c9d7b8168e8beafc894ae64a0ab90a35db4e21ba98698fe94e14e341278b10f2ffcbd071183 DIST uClibc-0.9.33.2.tar.bz2 2834029 SHA256 988d2c777e0605fe253d12157f71ec68f25d1bb8428725d2b7460bf9977e1662 SHA512 1cf18fe5418e12ae12ce995d7455d465bc4737f225afc49512ec69858771e099bead7b18408b01c7e6f845dcc80c3b4f875332eeffdcc04ae4b48474fb29a8dd WHIRLPOOL e2ca16c179893a58228e701ddf8b5614cb6b3fe2eaa6e2a9b909a27f78a348723fa7ec99f7b437ce35d9ac0870e3e2ec4e4d46834ca6b3cbc3d8fa5306b57fb4 DIST uClibc-locale-030818.tgz 236073 SHA256 c4362be318a38f18d98dccf462d22d95bab92f05548bb93f65298fe9afaebd57 EBUILD uclibc-0.9.28.3-r8.ebuild 14630 SHA256 27a5827a295d4b02c34136abcc8a41793d33c9dba849d5050a416760eb9cc8b0 SHA512 bdd97456ff19eb03f47245f8a971deebefb11d3808f15382422d39a437cc7f2881bf799f04baffe5a302ec35b406030bc4c5d79d7e6a5c68de38ebe12dd47f20 WHIRLPOOL 18e5a59ddb7e980affb2e3b84c23109a9744072b5ec525d86bc71ceea057aa19a2340ff23314ccfd56e63fde25d83d0acada8649431b417aaf62851187fa4eb0 @@ -31,24 +32,25 @@ EBUILD uclibc-0.9.33.2-r3.ebuild 10768 SHA256 5efe6a51165a63f7821accf3dd4b09ffed EBUILD uclibc-0.9.33.2-r4.ebuild 9109 SHA256 3b46d25a027c76ebf0c341c0766c1f6272747d29f7fb2790435585efdea542a6 SHA512 5bf8844d582fcdebf05f022866ecd4b14687282f4b2d4e8c1cb1a670af5d8fde653c422778bea8c96aff6bf52bcb807ab1c9f4398aaf1cad9d02f867d2689220 WHIRLPOOL 9e9156aa332d54cb7a03c641038d43344ae4dec64521b3eb5052183b43e60068e4970c80ecf72e9f1a0157664a0cace121c60671b9ef1b75e6394d490b17bc4c EBUILD uclibc-0.9.33.2-r5.ebuild 9116 SHA256 8ba9e2a9cfce1c18d23ca5dca98d9993f22ab04ed773c19779fdf0e71da8dcd2 SHA512 839d02f2259ea5bb05f111655fe30ae31e95f79e1bf0e1caa947e5217f35e8f2b770f2677be6a8acf5f8dcf6e92d91881a90137fda54234d2158e90ef04e0712 WHIRLPOOL 8cd7a1acc2072f684cb29d1fb5c22d065dfed074cbc5abb9275ccd764713fd4abd928ae81ee34452726b03cf1f0dbe344363e28f5e944a37b578708507b1666a 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.ebuild 10630 SHA256 db49c741a424d2433ec3978184c979b2a9fcb903f83eeb110adcec76940b342e SHA512 75e974586c57662f2f39d6a80a1162ec611b31b4dfa881a2ab2094f6b35c6b9375c98a53c957580395b4754cc8c27b4a53737b6d9a0f099ab4a3c45ae1169125 WHIRLPOOL 9f8f01465c556c372d926e701abef49770c1772b40ad83325439343d22561a4b1f4cf6c9bcdba78815f2e8af11d3455deee3dd81225c54b83de3dd132e2462c9 EBUILD uclibc-9999.ebuild 9108 SHA256 ddeff7104340a8a5c5bd46dbe44d27cc000bb84899b089ba530210e55cf6f9de SHA512 fa14dcf54ea00811d87d04aa1c47230b6181268de53c545532ec44e412c45166cf9f32c0aa70dfa10841ed32ed5de1ba73eab2ac870ba60c259fda78cd5fccd5 WHIRLPOOL 8e63062268e7d87c03c05a025f894f9a7acd5711c0bec199dbe98cacb88391db8758a137804a0cc43f48b65aad6d288cd2b3744ecd5a23b6779ee735f6e61388 -MISC ChangeLog 22299 SHA256 413023003654f7f675695ee6dbe0d226ca2a62d4a550ac8d8d9aa2df7684dc50 SHA512 445f3cf7763316682051370e15b56fb8c933717c40f0a8e9142c9beb5871ded3893b7feb5feb337181f0cc67bba391225a2c7b94404f46db055bb1aa9b37f530 WHIRLPOOL 94da10ed6715ca1c98a8fa9e136731b4fe4187f8aabcdc4ad010c32766de6e5c6640c4af88a5dc6d012a1d637d1195f986c250698bfaeb821649e817dc59ed82 +MISC ChangeLog 22499 SHA256 01e923169b2cfde89055f524a192d3cb605a6abc35536908c84b2ed8d04ab200 SHA512 c875884b27f2a4ef088ecb414a380834c6ab2efc9b05b6cf6409c0a6f51b3125673db3088e26c8ac900086d78a882b7d8edda89804f76a00ee01e4e72ac17b52 WHIRLPOOL 2033dcb1c6cb22dccf781fd75959504199ecde443a4a7983caa668d560e345ce6e4b26f1d3d3f4ee37f19e34f63530ac4a6f0ae8cc67f24e741d132d1fa0574b MISC metadata.xml 1435 SHA256 cd15ca4d65ec270c128fb37bd2c489b6e83c566203028cc8ecf9a90bea9c071d SHA512 84b5c8b1afe189587178d7736c3fca20b8079cf5ab666d524962e104a0a531de3fe39bdb2d3b69e4a77c322b8392fe7df292ea50ff89d80f99201aef1a12bc2b WHIRLPOOL 1e93f7bf529709eea2a8dfa81737bff41d22bd8af35ed562f06479f337b53ddc7aedd362c91f8361016c462edb5e8007586a7fde7f960fd4b7b88eff02c42e81 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iQIcBAEBCAAGBQJStu2wAAoJELEHsLL7fEFWg58QAJd2bQMHVXbJDmsAyrFXNyxE -cmiwS02h5EgHwefPcXaVKAPJFJxSzE43RWUr8jXuIBQRP+Dff9Lf3l4Z7I5YK5z5 -/uFfRIbmHPrQh63KYXxmvStvsLb4O3fK9B+6yMj/eyKqVXRVkVAbqabXbGW2SxK7 -H6SzRWCj6VFFOK3EVrDzCkaXDLF7wdrXpkD/eb1sSKY1+e+BiFQ751TrdUZE6x9p -j4YxU9q4bKDXSyBCGEByO2boCq/AQIOqEytZsZNhAK4FAspqJsDlycMkK073faqi -HUOT3ho8Nu+UrPIVYrGyZzoYPu6GZG8kwpmdrtaCL2eIOSi22p3muj1RCQOit3R1 -JSgI8S4ima0H+hErRonNIOd4T3Lu5VyibtGr4fg9vYdaO2ZDA/n86BYooltJ3krr -THiquYLKn/IqoGaCjGnDXPWZE07nPozfqxLMBiqLCbiekkHVq5oglDftAF6FPFfb -uzUFRkj+PUrm1freKlngWu743ULmusboguSRz2qJkajrMlm5ZPG8Pq90xvdkEGcu -cVimxd9x5bkNzflueCHJScAtLfblxO8loBqYxdnJFCfCKWN9m3w5dm/3BaSwaiKe -qYnkg8MAVX7xzuNKDw70HSfj5S1RoCctZwyKj/xhKHSe35KupLaL37xXcQt+eNFE -0yqQy9IFYntjrGuTvW0y -=Qiz+ +iQIcBAEBCAAGBQJStvekAAoJELEHsLL7fEFWaiwP/1/DS7ctPwuGVT9t5eXoJ/w8 +iRT+rHQubiVJpe09awA00anJaj9Ptg8t/tUB+RYl1d0K3Nem8VwBUK+PnI+6ORms +DSQeWgFuytXlUE+OH2NOddj1KzPBIfucj+zrZqsUdYH4jlTX24oW+Nnyo3zlffHp +EQ47x0DPlxUtNY4+qW889W++s/B5QocBU2JTrcO7ZTaSmOxP6m2XvYjjSIpAlPln +Q8h+LY7tJWeF1DyX615RjDJ5cHOzgFZpi80yUWVqe83nl3jTECbnRXl9/6c7GV1e ++x0dQg28Ai0tFDIHG+qBgrA/CSp0MvHoqwDCRJ9xMsOwYmbNXcXa5cD0Mi9nBTwf +F2HDrWnHqFhBi/3QK9w7QVr/synp0IG88ARnFJUTHNZ8Oo+UOpR6Rfz/AAitthVe +nmQ/eEe//txGQG6r0R77LtOQFHMoeqxrW/ISo+ZATvgml8AU7vCoXSNvRhAO0R9l ++CSOybw3SUct4ZodpPebvEdZbldNaH+/uFLVj6OZC+eGz69JGaEWdyGnM1RJ3XyC +72Z2y/GPZLlRbNUgnnaFttIMGjckHHkSC32JW2t2HMcMi8wtEPZ2QnH3vZhU3PpK +XUf1MXhNJaiuEh2K2xO1tLoakDqy5f3HhteKCC4+Xoltbp1cXuLdrIa3QRUTGi21 +hgeR6ejZv3N/J5U0AHsg +=2C9D -----END PGP SIGNATURE----- diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r7.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r7.ebuild new file mode 100644 index 000000000000..c4d05184760f --- /dev/null +++ b/sys-libs/uclibc/uclibc-0.9.33.2-r7.ebuild @@ -0,0 +1,340 @@ +# Copyright 1999-2013 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-r7.ebuild,v 1.1 2013/12/22 14:30:57 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="9" + 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 +} |