summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-12-24 21:07:09 +0000
committerMike Frysinger <vapier@gentoo.org>2013-12-24 21:07:09 +0000
commit81eb3fece3d95f0bec79fcfb2d84004a3b3d2edc (patch)
treecac4d2c68f95b2a105a06d7585059b3708104db5 /sys-libs/uclibc
parentReplace gksu/kdesu usage with pkexec (bug 486452); drop silly dependency on s... (diff)
downloadhistorical-81eb3fece3d95f0bec79fcfb2d84004a3b3d2edc.tar.gz
historical-81eb3fece3d95f0bec79fcfb2d84004a3b3d2edc.tar.bz2
historical-81eb3fece3d95f0bec79fcfb2d84004a3b3d2edc.zip
Update statfs64 patch from upstream #495256 by Anthony Basile.
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/ChangeLog7
-rw-r--r--sys-libs/uclibc/Manifest30
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r8.ebuild340
3 files changed, 362 insertions, 15 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog
index 38f604f0fba7..dfb932e62d1f 100644
--- a/sys-libs/uclibc/ChangeLog
+++ b/sys-libs/uclibc/ChangeLog
@@ -1,6 +1,11 @@
# 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.82 2013/12/22 14:30:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.83 2013/12/24 21:07:03 vapier Exp $
+
+*uclibc-0.9.33.2-r8 (24 Dec 2013)
+
+ 24 Dec 2013; Mike Frysinger <vapier@gentoo.org> +uclibc-0.9.33.2-r8.ebuild:
+ Update statfs64 patch from upstream #495256 by Anthony Basile.
*uclibc-0.9.33.2-r7 (22 Dec 2013)
diff --git a/sys-libs/uclibc/Manifest b/sys-libs/uclibc/Manifest
index 82cd66c36c0d..15802a99477e 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 SHA256 2258cb1a52299d08af33de391003e
DIST uClibc-0.9.33.1-patches-2.tar.bz2 5640 SHA256 a441d40de4ee4a763e39c7ec39633241f880295a19b1b20e0b22b887b3efb228 SHA512 87890d701421245af19d606fcfdadf374455c56ef82f6062856e9cd98300e170e202235744d91e9cba4b62379b2684d7309ba1fb78b71495412c77155ec9ad6e WHIRLPOOL efab33aa24a27f120ee6aeab1b3c5ef467983976ca00e869fd005406fafbcfe900dc422d769ba50c715bb01195740bf8d8e9ec3939b1d483b377b0b89113c16c
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-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
@@ -33,24 +34,25 @@ EBUILD uclibc-0.9.33.2-r4.ebuild 9109 SHA256 3b46d25a027c76ebf0c341c0766c1f62727
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-r8.ebuild 9117 SHA256 0924e5834fa5df102efb1e4a27c51256d2b8812e72111305476c0963a77c9218 SHA512 0d5c75bdf0ceac64874da66543cef7f26fecd07cbc14b927ff2731c768dd645740abc0c2e3d6c54cba8d23e5a84ce753bd74968c6bcf635e0396a2c8e10ff1a6 WHIRLPOOL b059abef32f00d2ab8ca9d8594a300e79f76eeb9f315e4557aae19dc2954d062b429b6e3489eb8990b8f36baec25402643914fd91ce3fc3c3a52d1a0482d9f9b
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 22499 SHA256 01e923169b2cfde89055f524a192d3cb605a6abc35536908c84b2ed8d04ab200 SHA512 c875884b27f2a4ef088ecb414a380834c6ab2efc9b05b6cf6409c0a6f51b3125673db3088e26c8ac900086d78a882b7d8edda89804f76a00ee01e4e72ac17b52 WHIRLPOOL 2033dcb1c6cb22dccf781fd75959504199ecde443a4a7983caa668d560e345ce6e4b26f1d3d3f4ee37f19e34f63530ac4a6f0ae8cc67f24e741d132d1fa0574b
+MISC ChangeLog 22678 SHA256 69c67fc764bd029167841116154abd1bc6f7cde0ce3036ed9c6d11f8624e7e66 SHA512 16a25c212d8153797b0e7121376586564674a85e983f9fb64c139a1f77a5ddc5d6911065e16328d0d49bf09cee5c583c69cfc09a5992e49c0610ffecb8d84d85 WHIRLPOOL f1dbb2510f310c944e4934f8113afc04e58ebeb12a16cd33b0ef08bc89db2651a2fa3fb253df0cd6364067346775a7e00116060191c805f0a4aebcb07334bf0a
MISC metadata.xml 1435 SHA256 cd15ca4d65ec270c128fb37bd2c489b6e83c566203028cc8ecf9a90bea9c071d SHA512 84b5c8b1afe189587178d7736c3fca20b8079cf5ab666d524962e104a0a531de3fe39bdb2d3b69e4a77c322b8392fe7df292ea50ff89d80f99201aef1a12bc2b WHIRLPOOL 1e93f7bf529709eea2a8dfa81737bff41d22bd8af35ed562f06479f337b53ddc7aedd362c91f8361016c462edb5e8007586a7fde7f960fd4b7b88eff02c42e81
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-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
+iQIcBAEBCAAGBQJSufd8AAoJELEHsLL7fEFWVNcP/ix4TvQw/EBr60tVYaMSaqlc
+XbcifGOhDvOt3i2MGwfAaYU95F/qAJ35LHKt6bUNQwny50SUohUxFasrB/dv5ik0
+yGTu80W/b8n0btM58dYf0QX12dKLBO8RLzrwZPYDWwft5Su5+CAyZQ042QZmHLZX
+i40l5Ok6AIbPNpybOQOITQGxWtdDBvKFkSpqn4/iN4XfeD2nb0RRF5ltflNeLjdQ
+ItGOXluYlMpufJy/ewNeE5SwmmhVd+qcTuD6RTOEBh/bBjuG5I1sySMqSps3Ry7o
+j4cqbbXMYTZWp9wNlipLjmj6kF+yyThhZrZSG885NAboMYxKCpw0/CsThnMolUaY
+aHuymmvqDF1+Rv0rJIQ9OJW8krh05QPfR0CpXgghDUBy3DJjFB4O1oiRttY4YPZu
+JFWr0gtsQoqnAJXMGsZZxXQ3B7sUukFxAOa8bJCGrQOhAJTXx1Di62UjEYW5qPP+
+PLGXjjQGAUHp3tyQMEXB89pRTJnL7MrTFUyK1Dqehj7A4x1eUv1JPw9ucErd9dKT
+SGWjbgwHNTJCaVUjAibj5CaPjUfTK4HMKF/v6i6R8bVmIAVd+O+vlZg6J61gDQ6C
+RUBmBlxvRFfdoUZ4m3nCZvh1SbWQh3p8DWIBXL+RFeyVOgOOHopIRKXC+WNFzVbs
+Hg8Q4I5jFUxOZFtZ8NuX
+=g/nM
-----END PGP SIGNATURE-----
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r8.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r8.ebuild
new file mode 100644
index 000000000000..b6115d6b441e
--- /dev/null
+++ b/sys-libs/uclibc/uclibc-0.9.33.2-r8.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-r8.ebuild,v 1.1 2013/12/24 21:07:03 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="10"
+ 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
+}