summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-08-04 01:55:14 +0000
committerMike Frysinger <vapier@gentoo.org>2014-08-04 01:55:14 +0000
commitaa67f148dc83440bef235b24e645363edf545422 (patch)
tree50ad4567864a7e942ec71aa9fba4de7d5194ff32 /sys-libs/uclibc
parentInstall gdb datafiles for cross-gdbs too as they need their own python/xml/et... (diff)
downloadhistorical-aa67f148dc83440bef235b24e645363edf545422.tar.gz
historical-aa67f148dc83440bef235b24e645363edf545422.tar.bz2
historical-aa67f148dc83440bef235b24e645363edf545422.zip
Pull in time.h updates to fix building w/latest udev.
Package-Manager: portage-2.2.10/cvs/Linux x86_64 Manifest-Sign-Key: 0xD2E96200
Diffstat (limited to 'sys-libs/uclibc')
-rw-r--r--sys-libs/uclibc/ChangeLog7
-rw-r--r--sys-libs/uclibc/Manifest30
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r12.ebuild340
3 files changed, 362 insertions, 15 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog
index 829b25c1f728..bfd8968d16ef 100644
--- a/sys-libs/uclibc/ChangeLog
+++ b/sys-libs/uclibc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-libs/uclibc
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.91 2014/08/01 08:19:10 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.92 2014/08/04 01:55:12 vapier Exp $
+
+*uclibc-0.9.33.2-r12 (04 Aug 2014)
+
+ 04 Aug 2014; Mike Frysinger <vapier@gentoo.org> +uclibc-0.9.33.2-r12.ebuild:
+ Pull in time.h updates to fix building w/latest udev.
01 Aug 2014; Mike Frysinger <vapier@gentoo.org> uclibc-0.9.33.2-r11.ebuild:
Stabilize for all.
diff --git a/sys-libs/uclibc/Manifest b/sys-libs/uclibc/Manifest
index 000e58e161f9..fd6a41d5c055 100644
--- a/sys-libs/uclibc/Manifest
+++ b/sys-libs/uclibc/Manifest
@@ -6,6 +6,7 @@ DIST uClibc-0.9.33.2-patches-10.tar.bz2 23990 SHA256 d23cc4362c180c88bd16a7b8b53
DIST uClibc-0.9.33.2-patches-11.tar.bz2 24310 SHA256 f6d9728fea5f2a7290261816aa9823d469e7da8a706e87c169dd4a691e1a6dc2 SHA512 fcc9c14d37ae2ebc343344062ea71ecd732a7787dfe08556e16f60a66e856193d288bfc4958be71a5679b8edd1210984a53bcb4b4a5ebab88584ad6bdc1773c0 WHIRLPOOL ff1a4352428aabb6f77446797d823f212527d26dbd693817dcfac32faf489650d8d7367245afb946b7935f9e177c311b7e75b287411866e65c38d22b72216f2a
DIST uClibc-0.9.33.2-patches-12.tar.bz2 27137 SHA256 3582de8f2df50dd70b639ed3be61d68bc6d79c1cf1d6e8528358fdc915bbe3ff SHA512 6b6ffafd2cd7f39636df0a73f223cb8045df1f2e1c5737007ff6161ed1247eb1a7ca8a1923f69551b2bbac16292939c8f8e6692ab9c6160f50a6533bf8b68637 WHIRLPOOL bd966ec003c99d47b74d671dcf13328cd01c58352ec13cfeb56e05f3b6b50cef893d6207e4096b5cfdf39c0ca143900a3ac4e5b0a72fb64a887fb6acc0b57ae6
DIST uClibc-0.9.33.2-patches-13.tar.bz2 28146 SHA256 80c3e53927bd5c850b2b9ae7ba43e489b50cd7e7d05174074f22fc81eda448b6 SHA512 60d82b67dc3451593a6ab221087c5fea47fab2016821fd3011affa133f1dc84660f46d70821b678a018fb7329928147eaff9722de9157fb99d44893ab5a10319 WHIRLPOOL 820ae31c449347ef9e47916831ee77b2adb968ffb9ab6e6b1072eea9c05efed2ec5a2245ffd6df7abd1f66f5214f5388adf22f656c3405bdc29108c0b2a71451
+DIST uClibc-0.9.33.2-patches-14.tar.bz2 28773 SHA256 3d2adac6d27db2a6d9c0ed93eb19e97a1a2fa24835a6bfc102767cd6dea3971b SHA512 45fdbceedf0e80bb0adafad37d1d5ca3ff4315def576bb2570bc26abebcdb60125ee01fb69cdfe72353bac4a664e1e9c7af0671b84f48f546ac32dabbea49e3e WHIRLPOOL 899c5f4781eaa5291ff755221a3895dc4c563ac32ea48ab9bad8715373c91a06e23b9512d65fab093ce5d6e658727fcfa613393b40bccc5b1b5a93e1a42b1906
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
@@ -17,6 +18,7 @@ DIST uClibc-0.9.33.2.tar.bz2 2834029 SHA256 988d2c777e0605fe253d12157f71ec68f25d
EBUILD uclibc-0.9.33.2-r1.ebuild 10638 SHA256 b3c450389a1c396563382e8061fa206baef9acece2cc709a9acc73a03c090217 SHA512 915b875e34f14af9be8a6f682d9d502f99c9fcd6fcec21bbb01089aa8df9c974b7bd833a3f80ac413bf79c231658692cf9a04dcdced4ef1f5d47475e2716c8ff WHIRLPOOL 63cc2fd711fe328d447aead14cf404345ca9ffed306ef474b363d7bd59dcb8f44d31fb1d95964b220c1f082e4a60aba9e3bc87c349856a9833966b4182145fa8
EBUILD uclibc-0.9.33.2-r10.ebuild 9111 SHA256 51da60846dd833b34f380d2e02be5f76fb7fff36fab173ba68fad74847b48a8a SHA512 df290b2a19a2b26b72fbcc0bbac4831f270e458c51c1576cc18114fb1292fd8558fae5061d3504f33c20c716b70b11b4874cdb0e30c1c5c439377de60f81b74c WHIRLPOOL 51b1dd43c1dfd6d271f55287f9672fbd5fb9ea888b103679d3719d46c9c323f2ff04b210c4cc286188563d1edbdf7c94e7fe5e28afeacc6017fd014e9e898c7b
EBUILD uclibc-0.9.33.2-r11.ebuild 9111 SHA256 4d6d676afb9b5a0024e1cc0b7572cf972a3c0d634ea5b5bdbde49047453613f8 SHA512 f3567ee9895bdefa4421d02a21ef3be493c62767af18f8f477414e4aba515cae79a7560aa17414a58ab71056e02b8bb6a8da3a9985586bf282ff8e6d2ff63aa6 WHIRLPOOL 728024ea502e379d67e4b3b27f636b80bf28d99657a9534dcd7c961b826486fd4810b7b5088a7d1facf08354554b8c14c12d057d76d91e72e99480bba9c2c8d8
+EBUILD uclibc-0.9.33.2-r12.ebuild 9118 SHA256 05e4f2de7118b62369921ffe5e5b26d75929f40ff8eb836c241fc3d2ca2a533d SHA512 04c6fb3bff06e0de959d2d95029054986e4ce196a78f1d7005add557a5e08fa9589a96d8435473a48865f54aaa60066bcdb19bd6ec3d0dc7bcab38493c5a7ff3 WHIRLPOOL 5942d7ed4c68a09b053508825b22f1fec9021973b81033dba7ef319af3527c2de1836ff15fbec77e3061b03e6a66f4ff761729ef1b3766ab3c73d2d1f0c001f8
EBUILD uclibc-0.9.33.2-r2.ebuild 10631 SHA256 08f05130b3b7b7df2f0a0bb3330e2599132e872f2e38fe9f9b3586df6a180deb SHA512 a5fa061a09d21aa5d743d5d118e2a60357eff384a959e4e099d9056c557fd2f3d995dd79b01c25e7cd905ff66836e2a540b14a1fd6fcf9229db441763c9d17f5 WHIRLPOOL 60f695ca98a92f99618c4bd1c5adc68527c407c30b9ef22a83aafa9372ff16f4e6f67821cbd5aa48bae8d327e9d16c6ac5d5cb5fe39819f04ba492b1d13a9a72
EBUILD uclibc-0.9.33.2-r3.ebuild 10768 SHA256 5efe6a51165a63f7821accf3dd4b09ffed5e0729c965cac560075e6df2e90480 SHA512 5179bcee9831d3d61cbd9fbeeaa615bc7bd71c5c7d81ba2e107bfe65503439ec3a166ed91f3112ee33fea63a53b2505d95795c8fcf94d666373e3e1e918e52ef WHIRLPOOL e9b20565a20bd6e8a6c9c17168629cb885c40a5b9d246d4656c363eee654b4aeda621c81e552fa36ab1cc0292a24a709d0c9cb99d21c30a1952f9f44f5594878
EBUILD uclibc-0.9.33.2-r4.ebuild 9109 SHA256 3b46d25a027c76ebf0c341c0766c1f6272747d29f7fb2790435585efdea542a6 SHA512 5bf8844d582fcdebf05f022866ecd4b14687282f4b2d4e8c1cb1a670af5d8fde653c422778bea8c96aff6bf52bcb807ab1c9f4398aaf1cad9d02f867d2689220 WHIRLPOOL 9e9156aa332d54cb7a03c641038d43344ae4dec64521b3eb5052183b43e60068e4970c80ecf72e9f1a0157664a0cace121c60671b9ef1b75e6394d490b17bc4c
@@ -27,22 +29,22 @@ EBUILD uclibc-0.9.33.2-r8.ebuild 9110 SHA256 f5c2e6f7053997fbaa2dd537cacd3776e49
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 23986 SHA256 c7b188025195bc79ce0989361a7f65c0397b385f83d0f9af0ea9533cdaa4a685 SHA512 2072998dbec09aea972931b5b349606c4de9a931a8a1511a3cdbff157d9563cd1af438b8981b24d47644cd710e6972bdcfcee0d25e8716580a48068d33155b54 WHIRLPOOL 5a33429a0ff5f0cae970cdea6808615b95a1c6ac1ae8bfe4d85e2b978135190800789cddfb63c336909b5b7e2a23c3266d9c1fa21626525037ce303d204da520
+MISC ChangeLog 24158 SHA256 2d78678090aa006b61f8043d96107cb683bdba3ba8a8a2c94ab51d257ac7ec2f SHA512 f8faddbbd0d07a4fbd6d3a056dd8c2eae4f20cb342ef91cc003de7d7925b3d9fc3c2f608b33429c768d285949dee37ffd872c996dc761c5f80d5045d8fddec68 WHIRLPOOL 0626ae5ae42979478886f15b6077fd82f5411064c8cd2115136f619de04a31e0f098956ad30b009075ee3e748d31ee880d645c07296e29d56e8140cf2f00c2fc
MISC metadata.xml 1292 SHA256 b4bdcfd7ab17ae024dcd8c22acab27dd02fbb6232fad9f9f2e266bed316b726e SHA512 c6f18ed33a662a22c8ea24342ab604cbf63009360f6f7ca25560f64876fa5fc81b21f6791fb0f3b7e9205171577334b00e8d81d05953dfd3b02e7304f504424e WHIRLPOOL 29c8024561257c0f36af0a107d891358039ae4631f3218527b30b490abe8cb409e91112945c4ff371cecbf43978b0946d64d873a5a914d025093b4e407ac5687
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iQIcBAEBCAAGBQJT202AAAoJEPGu1DbS6WIA/goP/06oqMJs1Uv1FvmkJ0JmWvg7
-hmWNd6sxtCiTpoEICB9tAWG5DVGj8w1Zqy1Fq1jnrJKbeCHeMWBDHGyJxL1opPIP
-rry5WnpoN5Emd8IJM7ruJA6J2OeDF1YArpRzF+IwZqZGv88f56hMH7grkxsNyeWo
-rQEA1G1t4u2YhDNLcx8708gVywguk/28ui+HBInuLfKxjCeATqTEFPDtUNrW+E1j
-gI858hfO+DiSZ3pkWnLHllkAn1ODjVCDlC61ro4yQJH6gXzwDrbK70G4/R9inQb5
-2QOcTJr7xDmRNjXGALevHrcmdLHPwTlHDxGkDpmlIZ9fdxLtKb4Mlpx5ThfWDtFX
-7NuMSzOnYeDGkfzRypKdL8z6iRJo0r+ojkTReZsIdN5RzkeLeK+Zfy0iUrDtAUV/
-AVug8T0pKbmdFX0P2vGuFh/SmDzMzud6GU+WpspfXN/Kq85cb9XpRktG8QHbSb6S
-Nm9o++PDOxMiCGs3i1sSythDZc2ysSm1PKgcjvpG6akX6ZkjBeArAJ1FtV3wb1rP
-/DgDRAEKoXORCeuJ9/Ypr/oTpFzVXs5lTZNVa/D26MI/JbMD1IaY+BbxvZ8DvKT1
-bTEcX5TJtBBxd9g7lZGsq5iWrt7Vxu0Ky18pQF0VuZVoBpylNmvsuVT93ATRUKjn
-poBREKjGtQeIip2zxrwt
-=YH6w
+iQIcBAEBCAAGBQJT3ugHAAoJEPGu1DbS6WIAu1QP/0PPpTl1r+ejBujOKKkRVfxg
+E8ZHfRUlQk6IhlYojpdIHV4QqcQYdbYN8j0OWaaYWaIjSXO9g1Jcvy3f7QgXLIBH
+JEoGbNcjv8jDmmZijKKnaVf06WjfGZ1raPODaCEwIlYoRXoGkKHX0qoF9L4aLcrt
+aqz+yBj/xgCXKQQSLiW9NOekjjr5ShSCq4D8C/U3uU8VbSQxorG+a02vU5Ol+VAL
+TsRiKgKJILmRA4W7pFb6c/GfWRKcrlAezOBGjjWmUK+9N05E5pDFTYnw7OJ6elwJ
+5ZlIKT38Yfl6SJnU5d9skhj6UNEwsn+dm9HeIBPuEs/ERco8bxSRxnfsDc0kzvk4
+YtfLWV5rjhGErf0g8QRp3KA19vA5kQfFyFwWfXWhnMNBtkDwwYlVrxrcviBC0alR
+AtGBw5ibLZxnFnamdZnfXGLgLo5wexRN03x2yWBViAOgzovj6APtYY5ojIRQxPat
+LnhQlqh5a4QLgIR/bYCq7Mmx6AUht2YQAiULJKEDWwh+xtVwSDH9mEXrFjp7gxD6
+iNKLQ0xyjg+9vwIStBwzLyxzTEqOC5bhUu0DKfc3H8BG1NxGTCUDUZrrTSx4i0E+
+H9PszhQ4MdfuX5NU6DJB6I07m9l1p843sAB5KnaPJEUGTqUqLWNobAvFVFQQJSz6
+jIGDUwq/EhhGHxboi5DM
+=g9NE
-----END PGP SIGNATURE-----
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r12.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r12.ebuild
new file mode 100644
index 000000000000..17ee239d0ad3
--- /dev/null
+++ b/sys-libs/uclibc/uclibc-0.9.33.2-r12.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-r12.ebuild,v 1.1 2014/08/04 01:55:12 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="14"
+ 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
+}