Version bump. Add xz tarball support so we can upload our own release tarballs early...
authorMike Frysinger <vapier@gentoo.org>
Fri, 13 Jan 2012 21:18:30 +0000 (21:18 +0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 13 Jan 2012 21:18:30 +0000 (21:18 +0000)
Package-Manager: portage-2.2.0_alpha84/cvs/Linux x86_64

sys-libs/glibc/ChangeLog
sys-libs/glibc/Manifest
sys-libs/glibc/files/eblits/src_unpack.eblit
sys-libs/glibc/glibc-2.15.ebuild [new file with mode: 0644]
sys-libs/glibc/glibc-9999.ebuild

index 56d7289e0f7a0030bf37a680c06ea43aab654466..6dc367d17e7f18930fd1f61f06cf8f3662a73fc6 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for sys-libs/glibc
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.814 2012/01/03 20:09:54 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.815 2012/01/13 21:18:30 vapier Exp $
+
+*glibc-2.15 (13 Jan 2012)
+
+  13 Jan 2012; Mike Frysinger <vapier@gentoo.org> +glibc-2.15.ebuild,
+  glibc-9999.ebuild, files/eblits/src_unpack.eblit:
+  Version bump. Add xz tarball support so we can upload our own release
+  tarballs early without conflicting with official ones. Drop coreutils static
+  checks since latest glibc versions no longer have that bug.
 
   03 Jan 2012; Mike Frysinger <vapier@gentoo.org> glibc-2.13-r2.ebuild,
   glibc-2.13-r4.ebuild, glibc-2.14.ebuild, glibc-2.14.1.ebuild,
index 9c4b4d96ea09dbe3cf388b4fafdb40610d9e5ab6..5fff8eda96fc3e33017fbf1d780d78b6b28bf84b 100644 (file)
@@ -22,7 +22,7 @@ AUX eblits/pkg_setup.eblit 3886 RMD160 d2f86a2f404941bc7b6f6dabc29dd293dc2e9972
 AUX eblits/src_compile.eblit 5777 RMD160 589394dbad302c02ba2ca75730938a9d58986980 SHA1 1b827f4f649924558a7c115614ffb20f841ffef7 SHA256 4fec8eb713125dd89c5d2e19b2499dfcca8796943fb437e419e417929c6d92af
 AUX eblits/src_install.eblit 7470 RMD160 e21782fd708e57616b501a9920aeca72cea5cbb7 SHA1 2eed96771de35d77255f3957ff8023a53fdb4e99 SHA256 3a1599442d729d23f678b6582276ea6125855fe2f4c15f36851f89d441f4e145
 AUX eblits/src_test.eblit 1172 RMD160 a70e31e655cd3e306af6a498002de85b72258566 SHA1 4aec15e6ab67279258fd23400701fd38c106a38b SHA256 e5a390761b7ec613460b8da26df3ffe2a137217261dd9f87f2b78c3fa2a12727
-AUX eblits/src_unpack.eblit 5286 RMD160 6bb0879a4b2eb29872c4099e4d94b64dc7911741 SHA1 288d73641a315537b83d00524431d4cd2c5fb3f0 SHA256 7daf6650a96699e52b48b207a1bcdfa93658871d11ee634a2d52764450978d2f
+AUX eblits/src_unpack.eblit 5483 RMD160 f623d6a731227a5c79d30b9d00c1fd1d46f880fd SHA1 60abbd3a42424a4edeec748e4e9ebc2600545719 SHA256 9b24a56bd32bab9ec2f4e765addb2cda0ade81b4a2eaa637ef8dc223f0d62c5b
 AUX nscd 1621 RMD160 f6d20c4c3814f70d7741f3fa2e0b53ba32c37960 SHA1 5751fe798024c2021b7b3ed3e798618e2a38244a SHA256 6165db3a2fcb251d4f3655c0461e018ce9c92a37f7f22a8fd2b75178b5435bc8
 AUX nsswitch.conf 503 RMD160 f375f92f6b41029c93382c39cef896261b140cfc SHA1 42f7f5cc3de75c69bf60d806ac8490106ea63326 SHA256 6c38b8642d5da884327ad678d0351d57be3621562253bd9711394bad87e45e2d
 DIST glibc-2.10.1-patches-7.tar.bz2 113612 RMD160 333b6e15132dd72f09369aea52e88156aecfda5a SHA1 b8b42bd16f99b43d20a08790b9bffac4dfd57060 SHA256 6c94493e08c13072c94c967f55b659e6c950ec470c9677c43cfab10e24a88370
@@ -42,6 +42,8 @@ DIST glibc-2.14.1-patches-2.tar.bz2 152871 RMD160 b5a24969009858e2988b04a46198b6
 DIST glibc-2.14.1-patches-3.tar.bz2 156339 RMD160 8174e9368f2dad6104371b2dd5275c82041d7878 SHA1 660a1b4b161521d075e3c82345e490c7d988218b SHA256 fdf7bb8df325e1c72c293e00083fcc6480f9873b250fc1d2cd8ca40ab6c94b20
 DIST glibc-2.14.1.tar.bz2 15650580 RMD160 f6efab63efdddefd7b868ffcba53885450064996 SHA1 f1945eea78bb30563d33c9e6a5f6f97f374135b4 SHA256 6e85a2fa3ebe6b28103361f09d27eeda37a021f24dab73f34064456d5a715b3b
 DIST glibc-2.14.tar.bz2 15630590 RMD160 f2ba450342f353c7b0a9001ad375ff0adf3f86fc SHA1 2236a3530f83637c4338d81d9ac0f5b4c5e69820 SHA256 8404b54651d42133d9a2ab17d30d698e53c5f250b2ad8e5f3d9a208ea7c75d6c
+DIST glibc-2.15-patches-1.tar.bz2 148712 RMD160 5dcc571f6291b5599c7d2148f6095df21178ec79 SHA1 bfe47d2b4df2dd19b67561222dc7b2e3c38b45e8 SHA256 04b1f5124efa5af68df35f1c9f1dcf9366aa4b36ba8744ea070396f4eb709b28
+DIST glibc-2.15.tar.xz 10675188 RMD160 bc0f83611fa657d4c8cfa726bb54cfc70cab2d42 SHA1 58b038e2f184bbaac02dbfa41ed8c5851fedd5c9 SHA256 d94d85a27cac2a76ab263b7a130309a46c27ca725e39cd3260e83082366c9dd8
 DIST glibc-2.9-20081201.tar.bz2 16430489 RMD160 1e1feb4ee9c0892a0544c05adb6dd249544621cf SHA1 5756ca3b543a370c4ec9ffc8038b72bf0aa61c71 SHA256 6f8e515775e20ed48610860d10315adda418a3649b3465f36ee5cd467364a8f6
 DIST glibc-2.9-patches-8.tar.bz2 106638 RMD160 dbf343c0f2254674c6096fd65fe5dd33ad119248 SHA1 106452700e7a1a525266f79e77a49b443a8ed411 SHA256 5f1f8b569ac02c2f538bebd64d137bccb442ddfcb28b3ef17b86134edd8e3f6c
 DIST glibc-2.9-ports-20081201.tar.bz2 487663 RMD160 80eb0035ed2e021e79755d4151ccd6d73cd78d8d SHA1 90a6ecbce37aabe6093c4dd0c8817cbf86321627 SHA256 19bb6e89855171d7ae01aef92054dfe4524521fbc13c67bfaa3ee81944210744
@@ -52,6 +54,7 @@ DIST glibc-ports-2.12.1.tar.bz2 621800 RMD160 98b5d5f544336f16bfc8af193e5c447ee6
 DIST glibc-ports-2.13.tar.bz2 625945 RMD160 676406e35c8e4fdceb4fcfa83bfbdb1ef3a3aa6a SHA1 1cc771b4bf80f4b0872a342763f4aa4a9a9292cd SHA256 b11c4501ae929883447f409c31d65e82822b1c5693075a825a3d54612876ee5a
 DIST glibc-ports-2.14.1.tar.bz2 630641 RMD160 aebb9e53aaa98cd6a76b2a278685cda03049c7d3 SHA1 f649bd5c0191315c92f6a4f46aaf7aa1bf82445d SHA256 1c830afb6d4aa166edaa09ec539580377ecbb16ba655d0aad6f5cb5a9a269aa9
 DIST glibc-ports-2.14.tar.bz2 631253 RMD160 e15f35b9e3bd6acb1a0608be15056bfe7a94c207 SHA1 47da0ab038ea7cc28bc82ff558ad2f6779c79995 SHA256 580a656a55a17ba3db80ab0a9321332cd1f0aaddd7fad76004b524303fb6632d
+DIST glibc-ports-2.15.tar.xz 427764 RMD160 037a5f681c1a48ff9ce84bde3ad66fe33e43b52a SHA1 f2ec7341143a52bfaf60ff373255a52bc710e985 SHA256 36ba204155df8822811103182c7534902905674919796b8751dc295f46db91a5
 EBUILD glibc-2.10.1-r1.ebuild 8107 RMD160 798b89a63ee0451e7075949b02db941f9e4ff634 SHA1 22bcd755c8598136ad04773b6a072abb5c0563af SHA256 044780395e2b461a15625ecd51586655abcc38b8cb72f2fa81cb11ca70d3fe20
 EBUILD glibc-2.11.3.ebuild 8321 RMD160 55d034a3be88ad8eea4b8608d425f23fedf17bce SHA1 c88d57842cafa2163e3118152f46b3b85f25669d SHA256 24c1127c9d2b9897ffe6bcf9d2c813c0670aea4b4d53e816e04f7abc85fac615
 EBUILD glibc-2.12.1-r3.ebuild 8692 RMD160 12a681950b6c34f65078129af40aa77e9fd74b35 SHA1 9990a8020060daba3c2d28b03371cf56c489e1e7 SHA256 05f0722404f9985d0a991e5bec6cb8ae9d9c43fc26216b610284d00de88b60f0
@@ -62,25 +65,26 @@ EBUILD glibc-2.14.1-r1.ebuild 8968 RMD160 10b3c60e52a60d05e0330b08d1eb513f86e278
 EBUILD glibc-2.14.1-r2.ebuild 8968 RMD160 5b2ded8b7e0e3647b57e4cdc17d59aa10b2d746b SHA1 f1539189460666a9b2f469a9937f95eb951067fd SHA256 e9521dc92f0dbf83b959cd21a1c42899be7275ee11a5034b4814a11dcf73f253
 EBUILD glibc-2.14.1.ebuild 8813 RMD160 aed9592045c2842511497c277c4c79a0043adef2 SHA1 759d2eda7ade9dd34d1e1cdfbb85b890b3d3d909 SHA256 c0a547a759ce09f3754b4cf40a8c5fdb85fcad28577d11c1a8c35d6f4a0e73af
 EBUILD glibc-2.14.ebuild 8812 RMD160 f756180e46e9a36d18728384398daa41b4a67fda SHA1 f8904de5b46867d45225215a40a9934aaa0e3929 SHA256 cdd85a673de42bfee3caf2b94f005899ed50e630b034d6447fb38ee390c3d9ea
+EBUILD glibc-2.15.ebuild 8585 RMD160 fece5fba3c866b076e8e128871903e96a1ecc5dd SHA1 15b75a12db01ac1e037a8a1310ed23dd28b6340f SHA256 ff74485d51f3bf2df94f179a99a2c7d682b0ebb8ef424593db0cb81d6e2062ac
 EBUILD glibc-2.9_p20081201-r3.ebuild 7753 RMD160 7acecefa5c624837429358db505df5e863eaee90 SHA1 5494a83a774beb78d44e4e010e7c2e9af4c68dab SHA256 742005812b5a42b80a3ca4562b9b6b02661bcda6d77b5068a6e64bb6d20054bd
-EBUILD glibc-9999.ebuild 8789 RMD160 cb7c0aa7866c031533846c94dd632d26cde8b064 SHA1 e3619da20d49aa6b358b6c95b83c94bf34e5bfe4 SHA256 9e7a7444b0aeb1cd27e5689a94a029c637627971f4fd1fb2e4361a0e7b3d6fc9
-MISC ChangeLog 36975 RMD160 5c353d1174662ce9e194c13555ed3707163b7deb SHA1 d7cd531ffc0d1bb29aea6f5d98a01f35aa41ad9d SHA256 609c7c9ff0bf9e29921c95e9f3fe3ac585aff1d786554a4bd597e5b122360a28
+EBUILD glibc-9999.ebuild 8412 RMD160 f9276abbc22e292c2a320305255b79640abead06 SHA1 e52ac36ce92000a17746f9f17651e27e757721c0 SHA256 cf715a05b552927634423b39c111bcac371d81ded6da2e9a67ed54bca3d2db6b
+MISC ChangeLog 37338 RMD160 e78c87fdac98e182fc88aa3a9ef4b353d3fab7a9 SHA1 dad5983e7d56e462b3ae7d08b1544911dc0c6d4c SHA256 a9f87feab45a13c988d5e481e49bed8632e29d8dbfe9fb2def0ad575ae3346af
 MISC ChangeLog-2007 108587 RMD160 cab72e91dbf79869f246537d0d99870a836cc61d SHA1 ab2825c549e4bfe385f7b3d477b594f2317c3b37 SHA256 bd7e842bcda0f9e8375963d71dbb1604e1e8ef89484f3e205afde631eeec2c17
 MISC metadata.xml 423 RMD160 cf6f12db580ed1cff7cf7287723daece896268ae SHA1 ecd822cb67d353dea55f6a07d0e14a4b3a3644a7 SHA256 9e9a0143eff95971cf35957f2334ba791557e6408fff8784188fdba70d48f4b5
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
-iQIcBAEBAgAGBQJPA2CoAAoJELEHsLL7fEFWukUP/2SpvBToDjEjHyFizVRsKKuu
-MWsDct2a80/AcoWczjNFhiau9J5oSxZXeqU8Rb4mKFicIDfMTRU2aKp+IEoa+ptZ
-Y1lI4Nd11AGbfS53pcBHKK7+mDf+y1MG3/phPDM5gXM553sQn0AX+Hn+4q2mu2h8
-vZRIBOSaEXanX8elsT2L4A2Dv9BMMmgDBwbCiCz7w7hZqt6RrBpcN5an6gG4SA9K
-LzCdsaPTB+aZrpIgCXojNpOT1clodzouie77/4ml4r5eTdFH7v3Um4ww3/6l2bY0
-RmAfIa18BJXt6VZ0+ncdAwUzDTjRflZuzKx7QjsRkpTgau/XYoBVNOuUE9ANsBww
-it8wr/k+XgmkLW70EdK8Ys2BkE++xg7uC1s2qGwIelKOYFwblgm1Zs5SXJ8wtmL6
-ts3NohxySesNoy3bq9l0VLbuVxYNM2eu3uIhr26kyFPa83v5o05IAvkif/ond4ui
-Jb491joBnqwxFoBWbHyvJPHlzkB8rdKMTZI09RBv6SK4FcBKh24om8bm992dfbM9
-Fx165bfa1wwwbymmypEXTI2aTIctrkPRv1+3l/bvMZc4PbufOfrigstjtLTpJf8D
-a476A6E3SzgU4iQ41PY8CTddC3LcFksNRXCqT++MFREr6X6y2S4zvcq7NVqFnFtE
-d1mf3gxFnCAcqF107E/g
-=dSaa
+iQIcBAEBAgAGBQJPEJ+uAAoJELEHsLL7fEFW66cP/j9CpqNNxk5bwSslMtwjkJ1F
+rYxr3AXTqlKU4BwVtZR6mButnvRk/D/2NamJEv40uzckwIx5TOEnyvgNXHoAaGak
+vh7iu7rt7tfzKAa0rO+O/xOe6WcxsQ73bufkEyyGCR9y/WKawFbxbz5hzgDVt5pu
+j2Bl6VGX0Axz9Y4/IE8az3vXLHb28PhGteIyO53GajODMtS4Mi/VlHhiJFr8ou40
+UPvVdevMlnlsRiDmE7LCMZp43q5irsQ4i3r6rl4kDyGTYloDJlBsDYVgAswpEUHE
+MCnfOjMFEaIyZTYgshTx9DyPKyMtFi35ZZmcJRuASiICoqA37fKjTQ5uNkZh5DvN
+0yQtkJmP13KMKHlHjQWkexdXWbArajunCRxRGKENeJGxz1qaIc1OwN3KR9kp18FB
+JzOIJ5tJVYrjXWy71eJnFuEcf9BQdXYZV+b4Gh7cmYRYhFzTYSn1us+DJzMb0EVe
+ZRx4BSPDXf0wjb9D+EtjOnNEoUUNvSQRY8HM8ilWgkCphfvNYNm8YuRCdSCyeemU
+WTtwJAOESk/jv6BKU+lHYPtrQwSm4X3e54Svh+JLRC5PtFlVAjLmk/xtttW5Vws7
+KKquXdOZCAMEX3apdoj9z03jOf4VdhyLS8+Gg8OsbFgKvgdTmiKv+JJnMIZVQjrR
+V7Wl/k1/lPrtSVLyfkNY
+=qETc
 -----END PGP SIGNATURE-----
index cc683cd23031d2082b32432c7c60ad93eaa58a30..2517e12f7d0bee6f6ff3972745ee89a121c5bce7 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.14 2011/12/12 17:47:28 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.15 2012/01/13 21:18:30 vapier Exp $
 
 int_to_KV() {
        local version=$1 major minor micro
@@ -69,8 +69,16 @@ unpack_pkg() {
                        a="${a}-${RELEASE_VER}"
                fi
        fi
-       unpack ${a}.tar.bz2
-       [[ -n $1 ]] && mv ${a} $1
+       if has ${a}.tar.xz ${A} ; then
+               unpack ${a}.tar.xz
+               if [[ ! -d ${a} ]] ; then
+                       # EAPI=0 does not support .xz
+                       xz -dc "${DISTDIR}/${a}.tar.xz" | tar xof - || die
+               fi
+       else
+               unpack ${a}.tar.bz2
+       fi
+       [[ -n $1 ]] && { mv ${a} $1 || die ; }
 }
 
 toolchain-glibc_src_unpack() {
diff --git a/sys-libs/glibc/glibc-2.15.ebuild b/sys-libs/glibc/glibc-2.15.ebuild
new file mode 100644 (file)
index 0000000..c72815e
--- /dev/null
@@ -0,0 +1,255 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.15.ebuild,v 1.1 2012/01/13 21:18:30 vapier Exp $
+
+inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
+
+DESCRIPTION="GNU libc6 (also called glibc2) C library"
+HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
+
+LICENSE="LGPL-2"
+#KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+RESTRICT="strip" # strip ourself #46186
+EMULTILIB_PKG="true"
+
+# Configuration variables
+RELEASE_VER=""
+BRANCH_UPDATE=""
+SNAP_VER=""
+case ${PV} in
+9999*)
+       EGIT_REPO_URIS=( "git://sourceware.org/git/glibc.git" "git://sourceware.org/git/glibc-ports.git" )
+       EGIT_SOURCEDIRS=( "${S}" "${S}/ports" )
+       inherit git-2
+       ;;
+*_p*)
+       RELEASE_VER=${PV%_p*}
+       SNAP_VER=${PV#*_p}
+       ;;
+*)
+       RELEASE_VER=${PV}
+       ;;
+esac
+MANPAGE_VER=""                                 # pregenerated manpages
+INFOPAGE_VER=""                                # pregenerated infopages
+LIBIDN_VER=""                                  # it's integrated into the main tarball now
+PATCH_VER="1"                                  # Gentoo patchset
+PORTS_VER=${RELEASE_VER}                       # version of glibc ports addon
+LT_VER=""                                      # version of linuxthreads addon
+NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"}        # min kernel version nptl requires
+#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"}           # min kernel version linuxthreads requires
+
+IUSE="debug gd glibc-omitfp hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}"
+[[ -n ${RELEASE_VER} ]] && S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}}
+
+# Here's how the cross-compile logic breaks down ...
+#  CTARGET - machine that will target the binaries
+#  CHOST   - machine that will host the binaries
+#  CBUILD  - machine that will build the binaries
+# If CTARGET != CHOST, it means you want a libc for cross-compiling.
+# If CHOST != CBUILD, it means you want to cross-compile the libc.
+#  CBUILD = CHOST = CTARGET    - native build/install
+#  CBUILD != (CHOST = CTARGET) - cross-compile a native build
+#  (CBUILD = CHOST) != CTARGET - libc for cross-compiler
+#  CBUILD != CHOST != CTARGET  - cross-compile a libc for a cross-compiler
+# For install paths:
+#  CHOST = CTARGET  - install into /
+#  CHOST != CTARGET - install into /usr/CTARGET/
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+       if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+               export CTARGET=${CATEGORY/cross-}
+       fi
+fi
+
+[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20}
+
+is_crosscompile() {
+       [[ ${CHOST} != ${CTARGET} ]]
+}
+alt_libdir() {
+       if is_crosscompile ; then
+               echo /usr/${CTARGET}/$(get_libdir)
+       else
+               echo /$(get_libdir)
+       fi
+}
+
+if is_crosscompile ; then
+       SLOT="${CTARGET}-2.2"
+else
+       # Why SLOT 2.2 you ask yourself while sippin your tea ?
+       # Everyone knows 2.2 > 0, duh.
+       SLOT="2.2"
+fi
+
+# General: We need a new-enough binutils for as-needed
+# arch: we need to make sure our binutils/gcc supports TLS
+DEPEND=">=sys-devel/gcc-3.4.4
+       arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 )
+       x86? ( >=sys-devel/gcc-4.3 )
+       amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 )
+       ppc? ( >=sys-devel/gcc-4.1.0 )
+       ppc64? ( >=sys-devel/gcc-4.1.0 )
+       >=sys-devel/binutils-2.15.94
+       ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)}
+       >=app-misc/pax-utils-0.1.10
+       virtual/os-headers
+       nls? ( sys-devel/gettext )
+       !<sys-apps/sandbox-1.2.18.1-r2
+       !<sys-apps/portage-2.1.2
+       !<sys-devel/patch-2.6
+       selinux? ( sys-libs/libselinux )"
+RDEPEND="!sys-kernel/ps3-sources
+       nls? ( sys-devel/gettext )
+       selinux? ( sys-libs/libselinux )"
+
+if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+       DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
+       [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
+else
+       DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )"
+       RDEPEND="${RDEPEND}
+               vanilla? ( !sys-libs/timezone-data )
+               !vanilla? ( sys-libs/timezone-data )"
+fi
+
+SRC_URI=$(
+       upstream_uris() {
+               echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1
+       }
+       gentoo_uris() {
+               local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI"
+               devspace=${devspace//HTTP/http://dev.gentoo.org/}
+               echo mirror://gentoo/$1 ${devspace//URI/$1}
+       }
+
+       TARNAME=${PN}
+       if [[ -n ${SNAP_VER} ]] ; then
+               TARNAME="${PN}-${RELEASE_VER}"
+               [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER}
+               upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2
+       elif [[ -z ${EGIT_REPO_URIS} ]] ; then
+               upstream_uris ${TARNAME}-${RELEASE_VER}.tar.xz
+       fi
+       [[ -n ${LIBIDN_VER}    ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2
+       [[ -n ${PORTS_VER}     ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.xz
+       [[ -n ${LT_VER}        ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2
+       [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
+       [[ -n ${PATCH_VER}     ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
+       [[ -n ${MANPAGE_VER}   ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2
+       [[ -n ${INFOPAGE_VER}  ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2
+)
+
+# eblit-include [--skip] <function> [version]
+eblit-include() {
+       local skipable=false
+       [[ $1 == "--skip" ]] && skipable=true && shift
+       [[ $1 == pkg_* ]] && skipable=true
+
+       local e v func=$1 ver=$2
+       [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
+       for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+               e="${FILESDIR}/eblits/${func}${v}.eblit"
+               if [[ -e ${e} ]] ; then
+                       source "${e}"
+                       return 0
+               fi
+       done
+       ${skipable} && return 0
+       die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe <function>
+# run the specified function if it is defined
+eblit-run-maybe() {
+       [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run <function> [version]
+# aka: src_unpack() { eblit-run src_unpack ; }
+eblit-run() {
+       eblit-include --skip common "${*:2}"
+       eblit-include "$@"
+       eblit-run-maybe eblit-$1-pre
+       eblit-${PN}-$1
+       eblit-run-maybe eblit-$1-post
+}
+
+src_unpack()  { eblit-run src_unpack  ; }
+src_compile() { eblit-run src_compile ; }
+src_test()    { eblit-run src_test    ; }
+src_install() { eblit-run src_install ; }
+
+# FILESDIR might not be available during binpkg install
+for x in setup {pre,post}inst ; do
+       e="${FILESDIR}/eblits/pkg_${x}.eblit"
+       if [[ -e ${e} ]] ; then
+               . "${e}"
+               eval "pkg_${x}() { eblit-run pkg_${x} ; }"
+       fi
+done
+
+eblit-src_unpack-pre() {
+       case ${CHOST} in
+       x86_64*)
+               has x32 $(get_all_abis) || GLIBC_PATCH_EXCLUDE+=" 1200_all_glibc-2.14.1-x32.patch"
+               ;;
+       esac
+}
+
+eblit-src_unpack-post() {
+       if use hardened ; then
+               cd "${S}"
+               einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
+               gcc-specs-pie && epatch "${FILESDIR}"/2.12/glibc-2.12-hardened-pie.patch
+               epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch
+               epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch
+
+               einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
+               cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \
+                       debug/stack_chk_fail.c || die
+               cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \
+                       debug/chk_fail.c || die
+
+               if use debug ; then
+                       # When using Hardened Gentoo stack handler, have smashes dump core for
+                       # analysis - debug only, as core could be an information leak
+                       # (paranoia).
+                       sed -i \
+                               -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
+                               debug/Makefile \
+                               || die "Failed to modify debug/Makefile for debug stack handler"
+                       sed -i \
+                               -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
+                               debug/Makefile \
+                               || die "Failed to modify debug/Makefile for debug fortify handler"
+               fi
+
+               # Build nscd with ssp-all
+               sed -i \
+                       -e 's:-fstack-protector$:-fstack-protector-all:' \
+                       nscd/Makefile \
+                       || die "Failed to ensure nscd builds with ssp-all"
+       fi
+}
+
+maint_pkg_create() {
+       local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}"
+       cd ${base}
+       local stamp=$(date +%Y%m%d)
+       local d
+       for d in libc ports ; do
+               #(cd ${d} && cvs up)
+               case ${d} in
+                       libc)  tarball="${P}";;
+                       ports) tarball="${PN}-ports-${PV}";;
+               esac
+               rm -f ${tarball}*
+               ln -sf ${d} ${tarball}
+               tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma
+               du -b "${T}"/${tarball}.tar.lzma
+       done
+}
index 66c41cc2343931a088979717a7b0a98d2b2117e3..e181933cb315b9bd20209f56a47a0fc72f0147af 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-9999.ebuild,v 1.3 2011/11/16 16:07:46 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-9999.ebuild,v 1.4 2012/01/13 21:18:30 vapier Exp $
 
 inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
 
@@ -191,20 +191,6 @@ for x in setup {pre,post}inst ; do
        fi
 done
 
-pkg_setup() {
-       eblit-run pkg_setup
-
-       # Static binary sanity check #332927
-       if [[ ${ROOT} == "/" ]] && \
-          has_version "<${CATEGORY}/${P}" && \
-          built_with_use sys-apps/coreutils static
-       then
-               eerror "Please rebuild coreutils with USE=-static, then install"
-               eerror "glibc, then you may rebuild coreutils with USE=static."
-               die "Avoiding system meltdown #332927"
-       fi
-}
-
 eblit-src_unpack-post() {
        if use hardened ; then
                cd "${S}"