diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-10-22 17:10:10 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-10-22 17:10:10 +0000 |
commit | f89cf404787ac1639d5102013840662d1745e376 (patch) | |
tree | 563c479ae4d77055c102fca58d3318fde8df1950 /sys-libs/glibc | |
parent | Version bump, fixing bug #157746, big thanks to Martin Schlemmer and courmisch (diff) | |
download | historical-f89cf404787ac1639d5102013840662d1745e376.tar.gz historical-f89cf404787ac1639d5102013840662d1745e376.tar.bz2 historical-f89cf404787ac1639d5102013840662d1745e376.zip |
Version bump.
Package-Manager: portage-2.1.3.15
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r-- | sys-libs/glibc/ChangeLog | 7 | ||||
-rw-r--r-- | sys-libs/glibc/Manifest | 29 | ||||
-rw-r--r-- | sys-libs/glibc/files/digest-glibc-2.7 | 12 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.7.ebuild | 290 |
4 files changed, 333 insertions, 5 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog index a940f6e89650..7ca1d7da7490 100644 --- a/sys-libs/glibc/ChangeLog +++ b/sys-libs/glibc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-libs/glibc # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.558 2007/10/17 16:48:59 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.559 2007/10/22 17:10:09 vapier Exp $ + +*glibc-2.7 (22 Oct 2007) + + 22 Oct 2007; Mike Frysinger <vapier@gentoo.org> +glibc-2.7.ebuild: + Version bump. 17 Oct 2007; Raúl Porcel <armin76@gentoo.org> glibc-2.6.1.ebuild: alpha/ia64/sparc stable wrt #195427 diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index deda3a61b6bd..5604db197ec5 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX 2.3.1/glibc-2.3.1-ctype-compat-v3.patch 2823 RMD160 f1162b7f313f7ea18fb178157d3bd6205d818e3a SHA1 d1dceb79689e9c627ebd630389ec1948d7a0a6e4 SHA256 0bc07eb47578d5bfb98774b18bf07aee2af44a7ccd947602c223b34e0d88394a MD5 941f13d27badc76c1e3704c59acaff26 files/2.3.1/glibc-2.3.1-ctype-compat-v3.patch 2823 RMD160 f1162b7f313f7ea18fb178157d3bd6205d818e3a files/2.3.1/glibc-2.3.1-ctype-compat-v3.patch 2823 @@ -494,6 +497,8 @@ DIST glibc-2.6-patches-1.6.tar.bz2 90833 RMD160 27c026a10c9dcda00458f310d0c00855 DIST glibc-2.6.1-patches-1.1.tar.bz2 88555 RMD160 bf3fba98ea19be57379473b246831841b889f9e9 SHA1 ee349f628d9f61d88c5d6c73ebf8905c8b52d01e SHA256 46d825b0da52f14575c9bc0762b172e043b0a3f726b497f6b20d44120120448b DIST glibc-2.6.1.tar.bz2 15767401 RMD160 a58226e394780a6996d608febf5881134990919e SHA1 85573fee8d79180165e9466a1fc25133b5792190 SHA256 3ded3a3c3ba2cf02d72479a5cc0829c7c261a9d0934e49a79233de9fa276ec22 DIST glibc-2.6.tar.bz2 15637436 RMD160 9f201f54d41941df299ab88722f4095dd417a5e4 SHA1 33a7d9aab6f0a76161d59341273e46d9aae8fc01 SHA256 f773ae5762c193091df46244ce355e38d358e8f8be088be0dbf934a193063bba +DIST glibc-2.7-patches-1.0.tar.bz2 85492 RMD160 4ce6bde232829b415d3cec6dbadc9e00e0c47db5 SHA1 bd9ab3d92d606c9e9a2598b86d42b83bfd65f4de SHA256 2d0d147bec11273ace68e8d662dddbde66823a4702a1e2b80499e4fa6c5b8476 +DIST glibc-2.7.tar.bz2 15976860 RMD160 c5c0b5a611d26956c46a289478b3349cea2ebf72 SHA1 ccc70e95db826e4b1fd3b484154402fdc3df88f7 SHA256 4224a522ac4ee0fd89eb337e7505e280dfb05e2fe1ad44339ba8874081c0451a DIST glibc-fedora-20041219T2331.tar.bz2 761998 RMD160 cfc859a7e0a904cfb340c832267d3377e850cf6e SHA1 31e10b882bb9288831e1a1b2ed0ddece7099ffbd SHA256 e36ffa84388ebb746cb80c37d6fd1acc9e45e07b85c30b0a2ad9f511fae59cec DIST glibc-infopages-2.3.5.tar.bz2 1273846 RMD160 14a587e5df98ad113fa1499d2a958efbb47c437a SHA1 bb974b6dacd02161532717a9d8f97248acd6da14 SHA256 79a602955e3cf4288fa9967240b397281594acab18c263d2ef864e7d71aa54e1 DIST glibc-infopages-2.3.6.tar.bz2 1298413 RMD160 5a83ca63c4153e5677797c0c0043aec0b55a6fe3 SHA1 8812dc121d24aad022e2aa4289dc75380e325d90 SHA256 651701bb5d8431401fa0f2252ad1cd37f69dc3a2aa28e4ce3405b4417b5e2c22 @@ -504,6 +509,7 @@ DIST glibc-libidn-2.5.1.tar.bz2 102290 RMD160 683d557160b28a2369c9dd53ab36367e66 DIST glibc-libidn-2.5.tar.bz2 102330 RMD160 e10e85e0ee7cdab2e5518a93978cb688ccabee88 SHA1 ee7e019e01aa338e28db1eeb34abb2cb09d2f30a SHA256 de77e49e0beee6061d4c6e480f322566ba25d4e5e018c456a18ea4a8da5c0ede DIST glibc-libidn-2.6.1.tar.bz2 102319 RMD160 20b86f6c40365084898916fe614b210a7b0ec2e7 SHA1 5440648e71078ecb179c4501b5f6717b54294945 SHA256 67c98ca1299f5f25eaece256d033e0e63bcf6876b920ca62a1fe61ac62c5c451 DIST glibc-libidn-2.6.tar.bz2 101974 RMD160 f4ee5fff7ff2c500c08e47390b88f77898314cf4 SHA1 a23fa4c6b9dd6e4413b43cd21c803039f7de3719 SHA256 25adf6cf0de727bf02978192baddf8cbc77adfbacf15e1428163fbeb267b1862 +DIST glibc-libidn-2.7.tar.bz2 101939 RMD160 17a9692cc59d9f41d6b9fcd68f283f401e206483 SHA1 2338cc9b5795f5e97a19aac6d7d00ab750e81ac3 SHA256 07de78810a5320d696792b67131c4cf3d6654aee015a6b74820d66fb00799000 DIST glibc-linuxthreads-2.2.5.tar.bz2 168269 RMD160 4886cb3ccd1a05c48dafb2565b08835551033ecb SHA1 bb0137b2d80641c3caaba37571cebbbc5945e5a7 SHA256 c3d0fa7aa579537afb5087e058a9748db9ab0ffe5fdcf4330224e19c35c05cf5 DIST glibc-linuxthreads-2.3.2.tar.bz2 216310 RMD160 9be07e5896f5e4e728bdbbebb00d78d8cf3ca5d3 SHA1 4676b3a59ec1c1f77be7669409aa835ad66f03d7 SHA256 529b34d1f859801b91b889a47feb4ba3cd4560ecb1dd9782486bc9198f7d3999 DIST glibc-linuxthreads-2.3.5.tar.bz2 236946 RMD160 b86afc7e2359165704d09c4c3b0d84826c636890 SHA1 bfc44a76a708f905fe9c414162d5efcd3d47355f SHA256 3fec798bb944c2f89f1d95ec7bb38f60e1393c9db0da6bdbb922606e023108b5 @@ -516,6 +522,7 @@ DIST glibc-ports-2.4.tar.bz2 381472 RMD160 72987098f9fbd5a1ad617bf2136081c0db80a DIST glibc-ports-2.5.tar.bz2 409372 RMD160 e7e29df135a5f0f72760d10e5ad46de038e40725 SHA1 7da6257e641759ed29c4d316700fce6f604bc812 SHA256 80c38a005325e7539012bd665fb8e06af9ee9bfc74efb236ebff121265bfd463 DIST glibc-ports-2.6.1.tar.bz2 431292 RMD160 aa6ba7bc58932c81416c3407a8dd0b5e61f5454a SHA1 f620103c8b02ced80a425c79691573f949bf5d6b SHA256 d094028bc6d6691f56b4efeff7cd7e1c7ca10733e0cb5efc36e8fb08d8324bf1 DIST glibc-ports-2.6.tar.bz2 431332 RMD160 275a10d95b5fa34a7c37469468eddbca928fa225 SHA1 ebc15149c8f6f492256cfab585f969a222e2f396 SHA256 398f56ad651939110ad6af88fdd3e92b5cb0583e6f612f2f12ba0134a22b1fac +DIST glibc-ports-2.7.tar.bz2 435392 RMD160 b9b96b357a394f29d5617aaa26a2c000bcf88874 SHA1 2186eac2248f1dd604f20a9dc8215ce12319d273 SHA256 3e481996259af87c3581da23481970a27de679e3c87cfa9a5a59751cd20c7b44 DIST glibc-powerpc-cpu-addon-v0.01.tgz 22422 RMD160 3483c94ec55819b36aa66fc60462317f8d15e4df SHA1 fd30cde7c7cb42baa2c8fa1ac88eeeeb509cac29 SHA256 0ffa9a432fffb9bfed99c529b631a27534ba848c7ec1d707732338b73a4a8ce9 EBUILD glibc-2.2.5-r10.ebuild 4845 RMD160 aac21107eada185cd0d732414543a4e52676fae6 SHA1 b9d514afa456f93233b0a437ae90512eb9784da0 SHA256 a91c13db667c4f2f5178eb9253d90e101ffb37c7db3b811f30692a681c4f19be MD5 e2675850bcc3c8916b41f6dc2c04062e glibc-2.2.5-r10.ebuild 4845 @@ -565,10 +572,14 @@ EBUILD glibc-2.6.ebuild 39505 RMD160 3f35b31a13ca8d31edf0da96656037e508598952 SH MD5 ee1117c5ccbe92814ac6cd5586c541e6 glibc-2.6.ebuild 39505 RMD160 3f35b31a13ca8d31edf0da96656037e508598952 glibc-2.6.ebuild 39505 SHA256 24e3558f82c2dae463f2d42949877bc22ad2689ba05bac1077710fe0714f4e1a glibc-2.6.ebuild 39505 -MISC ChangeLog 106241 RMD160 1425e85b0740df49ac1ec0237a0b47499929d6bd SHA1 d3e4e7205e1aced4e027cbae2b5767846f73bc17 SHA256 3068c0fc059610129fd747a6c8b3969e06f7c902de44e3dda434dae3f0e5db2c -MD5 7a17d3a2a3b5465838de6a78f19b619f ChangeLog 106241 -RMD160 1425e85b0740df49ac1ec0237a0b47499929d6bd ChangeLog 106241 -SHA256 3068c0fc059610129fd747a6c8b3969e06f7c902de44e3dda434dae3f0e5db2c ChangeLog 106241 +EBUILD glibc-2.7.ebuild 10894 RMD160 76ca25e7cdbc7536ef52aa1cdbf8f865c8a678ae SHA1 7c80f452909415b16bf701da427083a5766f6ce3 SHA256 11e854c666f3b828951e1749665841cbf6c4c2de974492bbe2130f4ae704bd75 +MD5 e7b64735e3a2467e09119acf2334c152 glibc-2.7.ebuild 10894 +RMD160 76ca25e7cdbc7536ef52aa1cdbf8f865c8a678ae glibc-2.7.ebuild 10894 +SHA256 11e854c666f3b828951e1749665841cbf6c4c2de974492bbe2130f4ae704bd75 glibc-2.7.ebuild 10894 +MISC ChangeLog 106352 RMD160 02b81f5b11ef5436c04af3bd680341bda8eb53fe SHA1 65bb902c6aa8a60aec9e45b3e7d39c38189e95a6 SHA256 a8d0f1a0264a53a425728f628c863a4651a8cb5309f0dc9493a6768fbc1ea8d6 +MD5 273a983960fb9f5b418bf67b3e55c3b2 ChangeLog 106352 +RMD160 02b81f5b11ef5436c04af3bd680341bda8eb53fe ChangeLog 106352 +SHA256 a8d0f1a0264a53a425728f628c863a4651a8cb5309f0dc9493a6768fbc1ea8d6 ChangeLog 106352 MISC metadata.xml 162 RMD160 d002486a43522f2116b1d9d59828c484956d66e2 SHA1 d6b4923897f6ae673b4f93646f5b4ba61d5a2c3c SHA256 65a915d44de1f01d4b7f72d313b4192c38374a9835d24988c00c1e73dca5805a MD5 567094e03359ffc1c95af7356395228d metadata.xml 162 RMD160 d002486a43522f2116b1d9d59828c484956d66e2 metadata.xml 162 @@ -609,3 +620,13 @@ SHA256 02997288d0876f47a6ad5b60406d77e9c278a8a3dd275686f2ec441f499fd325 files/di MD5 719336d695bfa0ed37a966138cd587e1 files/digest-glibc-2.6.1 1030 RMD160 efad1be8a12224cbb91872b961cb1dc4c6b0c2e0 files/digest-glibc-2.6.1 1030 SHA256 2419cc2d213b8e7d1b10750a28497b95829771603d40e334894096003bfb6288 files/digest-glibc-2.6.1 1030 +MD5 baf468a2025fc16885bf253d426c2789 files/digest-glibc-2.7 1006 +RMD160 cfdd934377511afd4acd6927bcc5f62e51fa511c files/digest-glibc-2.7 1006 +SHA256 3848f8a2db5633f751afaee8042e3201bc3971cbaea971cefb7bca35fc87d967 files/digest-glibc-2.7 1006 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.7 (GNU/Linux) + +iD8DBQFHHNlQp/wUKkr7RBoRAhufAKCKvZoOhXLb8BWa9/TwqOpDhZGskwCfRHXH +CU6bTwZmG22/wb28UAwq4+4= +=opG3 +-----END PGP SIGNATURE----- diff --git a/sys-libs/glibc/files/digest-glibc-2.7 b/sys-libs/glibc/files/digest-glibc-2.7 new file mode 100644 index 000000000000..817564b32b42 --- /dev/null +++ b/sys-libs/glibc/files/digest-glibc-2.7 @@ -0,0 +1,12 @@ +MD5 b7ff01b9532a35dcd2d0f33233d1fa51 glibc-2.7-patches-1.0.tar.bz2 85492 +RMD160 4ce6bde232829b415d3cec6dbadc9e00e0c47db5 glibc-2.7-patches-1.0.tar.bz2 85492 +SHA256 2d0d147bec11273ace68e8d662dddbde66823a4702a1e2b80499e4fa6c5b8476 glibc-2.7-patches-1.0.tar.bz2 85492 +MD5 065c5952b439deba40083ccd67bcc8f7 glibc-2.7.tar.bz2 15976860 +RMD160 c5c0b5a611d26956c46a289478b3349cea2ebf72 glibc-2.7.tar.bz2 15976860 +SHA256 4224a522ac4ee0fd89eb337e7505e280dfb05e2fe1ad44339ba8874081c0451a glibc-2.7.tar.bz2 15976860 +MD5 226809992fb1f3dc6ea23e0f26952ea4 glibc-libidn-2.7.tar.bz2 101939 +RMD160 17a9692cc59d9f41d6b9fcd68f283f401e206483 glibc-libidn-2.7.tar.bz2 101939 +SHA256 07de78810a5320d696792b67131c4cf3d6654aee015a6b74820d66fb00799000 glibc-libidn-2.7.tar.bz2 101939 +MD5 eaeb8527b8fa286c2d887157214f9998 glibc-ports-2.7.tar.bz2 435392 +RMD160 b9b96b357a394f29d5617aaa26a2c000bcf88874 glibc-ports-2.7.tar.bz2 435392 +SHA256 3e481996259af87c3581da23481970a27de679e3c87cfa9a5a59751cd20c7b44 glibc-ports-2.7.tar.bz2 435392 diff --git a/sys-libs/glibc/glibc-2.7.ebuild b/sys-libs/glibc/glibc-2.7.ebuild new file mode 100644 index 000000000000..da9f251d40f0 --- /dev/null +++ b/sys-libs/glibc/glibc-2.7.ebuild @@ -0,0 +1,290 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.7.ebuild,v 1.1 2007/10/22 17:10:09 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 ~ppc ~ppc64 ~x86" +RESTRICT="strip" # strip ourself #46186 +EMULTILIB_PKG="true" + +# Configuration variables +RELEASE_VER=$(get_version_component_range 1-3) # major glibc version +BRANCH_UPDATE=$(get_version_component_range 4) # upstream cvs snaps +MANPAGE_VER="" # pregenerated manpages +INFOPAGE_VER="" # pregenerated infopages +PATCH_VER="1.0" # Gentoo patchset +PATCH_GLIBC_VER=${RELEASE_VER} # glibc version in 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 + +[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER:-2.6.20} + +IUSE="debug nls hardened multilib selinux glibc-omitfp profile glibc-compat20 ${LT_VER:+nptl nptlonly}" +S=${WORKDIR}/glibc-${RELEASE_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 + +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" + PROVIDE="virtual/libc" +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 ) + 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:+)} + || ( >=sys-devel/gcc-config-1.3.12 app-admin/eselect-compiler ) + >=app-misc/pax-utils-0.1.10 + virtual/os-headers + nls? ( sys-devel/gettext ) + >=sys-apps/portage-2.1.2 + selinux? ( sys-libs/libselinux )" +RDEPEND="nls? ( sys-devel/gettext ) + selinux? ( sys-libs/libselinux )" + +if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then + DEPEND="${DEPEND} ${CATEGORY}/gcc" + [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" +else + DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c" + RDEPEND="${RDEPEND} sys-libs/timezone-data" +fi + +SRC_URI=$( + upstream_uris() { + echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/pub/glibc/{releases,snapshots}/$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} + } + + upstream_uris glibc-${RELEASE_VER}.tar.bz2 + upstream_uris glibc-libidn-${RELEASE_VER}.tar.bz2 + + [[ -n ${PORTS_VER} ]] && upstream_uris glibc-ports-${PORTS_VER}.tar.bz2 + [[ -n ${LT_VER} ]] && upstream_uris glibc-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-${PATCH_GLIBC_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 + + 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 <function> [version] +# aka: src_unpack() { eblit-run src_unpack ; } +eblit-run() { + eblit-include --skip common "${*:2}" + eblit-include "$@" + eblit-${PN}-$1 || die +} + +src_unpack() { eblit-run src_unpack ; } +src_compile() { eblit-run src_compile ; } +src_test() { eblit-run src_test ; } +src_install() { eblit-run src_install ; } + +pkg_setup() { + die "Review 196720 before upgrading mmmkay" + + # prevent native builds from downgrading ... maybe update to allow people + # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2) + if [[ ${ROOT} != "/" ]] && ! tc-is-cross-compiler ; then + if has_version '>'${CATEGORY}/${PF} ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction" + die "aborting to save your system" + fi + fi + + # users have had a chance to phase themselves, time to give em the boot + if [[ -e ${ROOT}/etc/locale.gen ]] && [[ -e ${ROOT}/etc/locales.build ]] ; then + eerror "You still haven't deleted ${ROOT}/etc/locales.build." + eerror "Do so now after making sure ${ROOT}/etc/locale.gen is kosher." + die "lazy upgrader detected" + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml" + die "please fix your CHOST" + fi + + if [[ -n ${LT_VER} ]] ; then + if use nptlonly && ! use nptl ; then + eerror "If you want nptlonly, add nptl to your USE too ;p" + die "nptlonly without nptl" + fi + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty, which is probably not what you want." + fi + + use hardened && ! gcc-specs-pie && \ + ewarn "PIE hardening not applied, as your compiler doesn't default to PIE" +} + +fix_lib64_symlinks() { + # the original Gentoo/AMD64 devs decided that since 64bit is the native + # bitdepth for AMD64, lib should be used for 64bit libraries. however, + # this ignores the FHS and breaks multilib horribly... especially + # since it wont even work without a lib64 symlink anyways. *rolls eyes* + # see bug 59710 for more information. + # Travis Tilley <lv@gentoo.org> (08 Aug 2004) + if [ -L ${ROOT}/lib64 ] ; then + ewarn "removing /lib64 symlink and moving lib to lib64..." + ewarn "dont hit ctrl-c until this is done" + rm ${ROOT}/lib64 + # now that lib64 is gone, nothing will run without calling ld.so + # directly. luckily the window of brokenness is almost non-existant + use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64 + use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64 + # all better :) + ldconfig + ln -s lib64 ${ROOT}/lib + einfo "done! :-)" + einfo "fixed broken lib64/lib symlink in ${ROOT}" + fi + if [ -L ${ROOT}/usr/lib64 ] ; then + rm ${ROOT}/usr/lib64 + mv ${ROOT}/usr/lib ${ROOT}/usr/lib64 + ln -s lib64 ${ROOT}/usr/lib + einfo "fixed broken lib64/lib symlink in ${ROOT}/usr" + fi + if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then + rm ${ROOT}/usr/X11R6/lib64 + mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64 + ln -s lib64 ${ROOT}/usr/X11R6/lib + einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6" + fi +} + +pkg_preinst() { + # PPC64+others may want to eventually be added to this logic if they + # decide to be multilib compatible and FHS compliant. note that this + # chunk of FHS compliance only applies to 64bit archs where 32bit + # compatibility is a major concern (not IA64, for example). + + # amd64's 2005.0 is the first amd64 profile to not need this code. + # 2005.0 is setup properly, and this is executed as part of the + # 2004.3 -> 2005.0 upgrade script. + # It can be removed after 2004.3 has been purged from portage. + { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks + + # it appears that /lib/tls is sometimes not removed. See bug + # 69258 for more info. + if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && [[ ! -d ${D}/$(alt_libdir)/tls ]] ; then + ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..." + rm -r "${ROOT}"/$(alt_libdir)/tls || die + fi + + # Shouldnt need to keep this updated + [[ -e ${ROOT}/etc/locale.gen ]] && rm -f "${D}"/etc/locale.gen + + # simple test to make sure our new glibc isnt completely broken. + # make sure we don't test with statically built binaries since + # they will fail. also, skip if this glibc is a cross compiler. + [[ ${ROOT} != "/" ]] && return 0 + [[ -d ${D}/$(get_libdir) ]] || return 0 + local x striptest + for x in date env ls true uname ; do + x=$(type -p ${x}) + [[ -z ${x} ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) + [[ -z ${striptest} ]] && continue + [[ ${striptest} == *"statically linked"* ]] && continue + "${D}"/$(get_libdir)/ld-*.so \ + --library-path "${D}"/$(get_libdir) \ + ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done +} + +pkg_postinst() { + if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" + fi + + if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then + # Reload init ... + /sbin/telinit U + + # if the host locales.gen contains no entries, we'll install everything + local locale_list="${ROOT}etc/locale.gen" + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${ROOT}usr/share/i18n/SUPPORTED" + fi + local x jobs + for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done + locale-gen -j ${jobs:-1} --config "${locale_list}" + fi +} |