From 2a44c81d9a309d8e5bf02cf47f31f8fe51705b62 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 21 Apr 2012 16:54:11 +0000 Subject: Unmask now that 2.14 is going stable. Package-Manager: portage-2.2.0_alpha100/cvs/Linux x86_64 --- sys-libs/glibc/ChangeLog | 8 +- sys-libs/glibc/Manifest | 32 ++--- sys-libs/glibc/glibc-2.15-r1.ebuild | 250 ++++++++++++++++++++++++++++++++++++ sys-libs/glibc/glibc-2.15.ebuild | 250 ------------------------------------ 4 files changed, 273 insertions(+), 267 deletions(-) create mode 100644 sys-libs/glibc/glibc-2.15-r1.ebuild delete mode 100644 sys-libs/glibc/glibc-2.15.ebuild (limited to 'sys-libs') diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog index f59e4863197d..87a4ca1b25ef 100644 --- a/sys-libs/glibc/ChangeLog +++ b/sys-libs/glibc/ChangeLog @@ -1,6 +1,12 @@ # 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.836 2012/04/21 15:54:06 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.837 2012/04/21 16:54:11 vapier Exp $ + +*glibc-2.15-r1 (21 Apr 2012) + + 21 Apr 2012; Mike Frysinger -glibc-2.15.ebuild, + +glibc-2.15-r1.ebuild: + Unmask now that 2.14 is going stable. 21 Apr 2012; Mike Frysinger glibc-2.9_p20081201-r3.ebuild, glibc-2.10.1-r1.ebuild, glibc-2.11.3.ebuild, diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index 32ff109e753f..5f99644184a8 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -41,7 +41,7 @@ DIST glibc-2.14.1-patches-5.tar.bz2 159559 RMD160 25b72ae44aab4ec3f7fc516f144353 DIST glibc-2.14.1-patches-6.tar.bz2 160817 RMD160 3b77e187f3b2317520b941aef9c096dfdd2273f9 SHA1 8dbf85b457cd62c3d31f00af2aebc4876dc93ef1 SHA256 a22576bd199d7a2212f2cc0e7b4795ece6fa047b3c73da4e8e11590e4859d07e 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-8.tar.bz2 148999 RMD160 ca2c77d9e2a64ba41516b352833f453f45fc5055 SHA1 2bc4fde9e335b02d34961dab24f48805fa944263 SHA256 bbce2cf397e6aa3defd4c5025116382bd6dcca8ea29277d382a5a9a4d72349ad +DIST glibc-2.15-patches-9.tar.bz2 150196 RMD160 4a9da53ae101f51300c39c9d791180068e2e618f SHA1 0335f611d10ae4e9f5d6e12ff485b1fcd3e1236f SHA256 57858aee5f120dec5a97e376ee2fe1774eafd160d3ea36241a048fbc617305c8 DIST glibc-2.15.tar.xz 10280176 RMD160 29afafcb61f5842b6b458e322a004aac06dbf6df SHA1 0a7936be3bd0562b076b95dacb7c9daa3dbc83fc SHA256 321ec482abdc27b03244f7b345ee22dc431bc55daf9c000a4e7b040fbdbecb50 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 @@ -63,26 +63,26 @@ EBUILD glibc-2.13-r4.ebuild 8535 RMD160 c99729b72704a34f94cbaf502d67094843ddbd69 EBUILD glibc-2.14.1-r2.ebuild 8905 RMD160 fe5975027559e747fcc00af3b4d7e745a82c7945 SHA1 e63db5f11586a97a305affec605aa87f88056dbe SHA256 04cd638edd59c92597233edc14471780eead6287642656b812e19c8fe2c64a8e EBUILD glibc-2.14.1-r3.ebuild 8902 RMD160 15310bf8a90a8d1669e391b85cbd209982186258 SHA1 c1e14abf7768e6012fb31c064ab6ab98539fd9e1 SHA256 db7a3a82f129ca81ac9e3c8646d6450da00bd5af5c2a8042017f5155d80f1164 EBUILD glibc-2.14.ebuild 8739 RMD160 0cf8007db758513dbe73ecb747182591923ea03b SHA1 b9fb14a5c62cc69e827037a7ea3acf56b62dc4e7 SHA256 8a2129dec1c258364aab30c9dc73d9e64e6f167e14f49a3160f41f4674ea714e -EBUILD glibc-2.15.ebuild 8514 RMD160 63aed3c70ced7f5117cf2099d74026374f46f03e SHA1 9c4d1b3effe7742b0d45b2cbe7c1128d2f5dc222 SHA256 e0db70eaa721e1d02069204e5917da5286ba6c73eb98e8a965f1fdfb7321ed18 +EBUILD glibc-2.15-r1.ebuild 8515 RMD160 31108ad67839517c3c6b0a9b153854e625d97163 SHA1 39291111adf3b5f129d0a4c55778c2b5382bb27a SHA256 6c186cd827f9e79384cdd1f6883bcf7d5a22d15ff450c945e164c0b0fc6c2f6e EBUILD glibc-2.9_p20081201-r3.ebuild 7680 RMD160 3baebfd0be6aed5c3d03fdbfd46a19a9dad83428 SHA1 958f7f408c36a584bf4f0151089d5e5dbdb838b5 SHA256 342058f41b7338fc4fdd9e0ba5b4931e0e13babc53c04028f4798906e74ac988 EBUILD glibc-9999.ebuild 8339 RMD160 b469ce2db3698b41700faa1550dbbbba3ba1102d SHA1 05e48dae282cf3403b8011ffdc5d871b0abe0ef8 SHA256 01a360e79dd302ea81312f0ade84efdd933a3c8ea6396d445460ad72aa8a45e7 -MISC ChangeLog 41257 RMD160 a786a379394904c3505262043003e9e4fed4953f SHA1 9d68cabfdb5d195a679d922e0467042d4ee0e50d SHA256 4739938cd3ad40e1850c93719fce01cc075cee4bf747c6f86c2a32cd14e8d049 +MISC ChangeLog 41423 RMD160 6062b88c8a0ffa4ac9fce640d2c029c262c77623 SHA1 2d98ecc0c9143b57739379d9442b49210334b8f7 SHA256 20f7ee202456bdee01afc78e3f823273014b8887dce25906a571051563b6bb60 MISC ChangeLog-2007 108587 RMD160 cab72e91dbf79869f246537d0d99870a836cc61d SHA1 ab2825c549e4bfe385f7b3d477b594f2317c3b37 SHA256 bd7e842bcda0f9e8375963d71dbb1604e1e8ef89484f3e205afde631eeec2c17 MISC metadata.xml 276 RMD160 532073ae23585e45260005f9cb7faff78a2f34d4 SHA1 840d8831dbc1a441fe86d812f874961026b5fd66 SHA256 b6767fa81e801d5bb20ba7c96f91674159dddcdedb23e49fb24e93c3a879fd04 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQIcBAEBAgAGBQJPkthwAAoJELEHsLL7fEFWmBUP/RhaZIK7F5mxc7jfceryGpj4 -jxxGy9t3yxUw/BoPrQ+Eo6CYjR32A8q2bKY4oKNSXoBZvMxvraWJjEr5jvw5+zhb -yEXgrqQaPMMG27nAL2SxM2gTzTTcp3xOPQ9qXGnKiXvs+rqzU3YjcxWUTJkYr1gp -WtGUofXbZw0ZET5axbLB1IUWVIIW9Ec0WQMBHN4EExccu9T+UeK3BB311u+eGDo1 -RWp8kBZOviECGs8GFIBLywWlmwr+MVSbgrJF+dqRcoTggDfaB2AZ/ZL2fxbTkVub -zOnVdtTdvot6Uqi4P6XpAyL2aAztwrXam8ljiEG5tqCHSsLyHntcvPKjwH2QFyD/ -15cgJpPd8ZSXNfKRhTBWEpZ0GAyT874PwhUs9ftg2O1uwiavundbzw80vg9zBiZG -V4AeZVM6F09SPYsUuaOdAYjibMTqtCgLF/HzHrfhLvfg/zgZ9wpTRe0tUXWGf7Gu -JrYWWf5a/uR2GevIyAA0+rRhJ69bcJ/tsx2+S1G8YyCb/oW1XaqqaK+JVDz2slGe -bHksgzaEhadtHeVTezaD1+W+A5m36L23YNFSxFLrqOgfSNzG2LOTR4EySJIatBMl -QpSGsjhD3ATb26cDYxpOXumoA6fG1r5jnekYoDgSz/dyS+xJ6q/RE1044nzUsK7I -rZBZ5O3NK4RVAmfJkSiG -=TT8p +iQIcBAEBAgAGBQJPkuaAAAoJELEHsLL7fEFW4lwQAIkEjp7vukHp++rArSxRaRDC +Co+G+FaXSKMJ8pHBy9xyqk/jg3Ji0T2NWKMI4ylnrvY6AM5yfx2ZmF6aLglCGtzy +KY7CtkWCNc3m5ShaU33TQEs+z4vWETBPsJKBmEl26XMMIVF3Nzt+o0eLHayIue0n +Hy1LPdOb88p8DrrDPR6JceW6mf9sc7TlUYQoEIT/pzh4WGnjx2tey1LH20XE4YTZ +KZt2ztxF165qv9loKZFXdbX/OnqAU8vg8TTpEjpgL3YEDUxW4vHxoFZw8Cu2x3U6 +Drszi0s5oO1xYTH90WSeQpKQU2/D0Ct6h/D50R7CYwgmtrM2DbkOkVEcFKdz8o1Q +FKNv/GlnY909XiBeKTZVP30DIUvv8sBHnGRMLYiS7YQlXDP9nUaAtUE9WNsXMGKc +a7N+o1qi4cp2sijfg+yJYG96WhrR7gD2ZRNAvOaqYA0ORtzf4hRWKUi7DZyVPRSn +POKgBRTSzRAhzA46vUnTAe9JcNJna7N9+JJ9gAd+R1GVjyzZVjUb/7RxcXbA00sk +q9VmEmtjNsQRhJ2FA+EC1bo4bhyZRtEX5S+8HUtUpGSrJqRzCPA80eLCXiOq/+20 +ByTCIoBzsRj9tqvdw+8clpGQeTYIMgynsHLNfl/415lFBjF4TBg0K5mQ6Fi5UJ5f +BC0Y0VmvL1UH7gS69EPk +=SWoL -----END PGP SIGNATURE----- diff --git a/sys-libs/glibc/glibc-2.15-r1.ebuild b/sys-libs/glibc/glibc-2.15-r1.ebuild new file mode 100644 index 000000000000..2514a0501b32 --- /dev/null +++ b/sys-libs/glibc/glibc-2.15-r1.ebuild @@ -0,0 +1,250 @@ +# 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-r1.ebuild,v 1.1 2012/04/21 16:54:11 vapier Exp $ + +inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib unpacker + +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="9" # 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 hardened multilib 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 + ! [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 [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 +# run the specified function if it is defined +eblit-run-maybe() { + [[ $(type -t "$@") == "function" ]] && "$@" +} + +# eblit-run [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() { + [[ ${CHOST} == x86_64* ]] && has x32 $(get_all_abis) \ + || GLIBC_PATCH_EXCLUDE+=" 1200_all_glibc-${PV}-x32.patch" +} + +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 +} diff --git a/sys-libs/glibc/glibc-2.15.ebuild b/sys-libs/glibc/glibc-2.15.ebuild deleted file mode 100644 index 0cbb5f2a3c16..000000000000 --- a/sys-libs/glibc/glibc-2.15.ebuild +++ /dev/null @@ -1,250 +0,0 @@ -# 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.12 2012/04/21 15:54:06 vapier Exp $ - -inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib unpacker - -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="8" # 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 hardened multilib 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 - ! [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 [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 -# run the specified function if it is defined -eblit-run-maybe() { - [[ $(type -t "$@") == "function" ]] && "$@" -} - -# eblit-run [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() { - [[ ${CHOST} == x86_64* ]] && has x32 $(get_all_abis) \ - || GLIBC_PATCH_EXCLUDE+=" 1200_all_glibc-${PV}-x32.patch" -} - -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 -} -- cgit v1.2.3-65-gdbad