summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-12-27 04:20:52 +0000
committerMike Frysinger <vapier@gentoo.org>2008-12-27 04:20:52 +0000
commit5417b7532101c0db8b1360fa51f4367cb204a3d3 (patch)
tree1d8570d9a0caf39f402f802d5db4a6901b98edc9 /sys-libs
parentVersion bump. (diff)
downloadhistorical-5417b7532101c0db8b1360fa51f4367cb204a3d3.tar.gz
historical-5417b7532101c0db8b1360fa51f4367cb204a3d3.tar.bz2
historical-5417b7532101c0db8b1360fa51f4367cb204a3d3.zip
Fix popen() issues and get more arches usable.
Package-Manager: portage-2.2_rc18/cvs/Linux 2.6.28 x86_64
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/ChangeLog8
-rw-r--r--sys-libs/glibc/Manifest10
-rw-r--r--sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild362
3 files changed, 375 insertions, 5 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog
index 9a2bc1812244..b2242e7491a0 100644
--- a/sys-libs/glibc/ChangeLog
+++ b/sys-libs/glibc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-libs/glibc
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.598 2008/12/24 13:48:22 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.599 2008/12/27 04:20:52 vapier Exp $
+
+*glibc-2.9_p20081201-r1 (27 Dec 2008)
+
+ 27 Dec 2008; Mike Frysinger <vapier@gentoo.org>
+ +glibc-2.9_p20081201-r1.ebuild:
+ Fix popen() issues and get more arches usable.
24 Dec 2008; Mike Frysinger <vapier@gentoo.org>
glibc-2.8_p20080602-r1.ebuild:
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index 1a5ec13e8903..470db4120db5 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -153,6 +153,7 @@ DIST glibc-2.8-patches-5.tar.bz2 102998 RMD160 364bb746714ac782ad4d36c180c3f1f57
DIST glibc-2.8-ports-20080602.tar.bz2 469234 RMD160 57ae79a79c6f82f5ff217e9052f4569c136dca7d SHA1 c3a45ea27c9eb1bf99f1caafe085b50951089384 SHA256 1f3665e80b5832f7d281c109bc2f5412521cc9ccc3bd7b499fd493ff5eb9aa9b
DIST glibc-2.9-20081201.tar.bz2 16430489 RMD160 1e1feb4ee9c0892a0544c05adb6dd249544621cf SHA1 5756ca3b543a370c4ec9ffc8038b72bf0aa61c71 SHA256 6f8e515775e20ed48610860d10315adda418a3649b3465f36ee5cd467364a8f6
DIST glibc-2.9-patches-1.tar.bz2 90506 RMD160 af77324b9ed996b5a810b47adc1ccafd8db8e866 SHA1 c0b379263591aeed7a37ed14cbf7afad092eaf59 SHA256 aa83340b5cdfb16f4605ec00f3b7cc6358167d0261b2b455351933aaf9e215a7
+DIST glibc-2.9-patches-2.tar.bz2 95889 RMD160 ec322f454862cacfdc6cc2a55da4e18a9b78b09a SHA1 df9beb6254767d1348537d004bd77f001985f95c SHA256 a2706c2562798b72a0b13ab4bf486b2a2f60afe2e83ea1302a925d34886d9d5f
DIST glibc-2.9-ports-20081201.tar.bz2 487663 RMD160 80eb0035ed2e021e79755d4151ccd6d73cd78d8d SHA1 90a6ecbce37aabe6093c4dd0c8817cbf86321627 SHA256 19bb6e89855171d7ae01aef92054dfe4524521fbc13c67bfaa3ee81944210744
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
@@ -194,13 +195,14 @@ EBUILD glibc-2.6.ebuild 39471 RMD160 34e74c13546882daaf4d0c2e0b404913f813d59f SH
EBUILD glibc-2.7-r2.ebuild 12448 RMD160 6f538486745189237ba75721612b7871b3774659 SHA1 cd432bcfb222964c9d5156a6c12930a595ce9bcd SHA256 1c61fafa0a910a39821124a3b526b86aea714e6c4414f81a42394a28b5ee9383
EBUILD glibc-2.8_p20080602-r1.ebuild 12995 RMD160 712a2b49b8ee4ea10aba46420e52d8cbc1c35e89 SHA1 f82deb613482db8bbf5961cf00566fa2f970042d SHA256 4fc342ae0a7b6c635758e0efe7b013eaed250af26fb7a3004bfeaf95d134b787
EBUILD glibc-2.8_p20080602.ebuild 13096 RMD160 130b6aa612187ae6bf6bc3bb9349619d9e3e664d SHA1 16f93a5e834cb3968e551c40d2225d671a2436c7 SHA256 53cd4bffa721bf489eb33b090e638dfd1420a9a3ac3ae87107f62a63906ab9c9
+EBUILD glibc-2.9_p20081201-r1.ebuild 13001 RMD160 1b5eed28c8d04cd40e66cf224a60b3a46ced37e7 SHA1 5c70898247fea2e735bb34ec1516aae95ed74933 SHA256 20211cd1eacc3ce29b576f023fa79d4e5915dfb40daa962175586387e9846e94
EBUILD glibc-2.9_p20081201.ebuild 12992 RMD160 cd59777b34002951a50f87cfd9c314308bf3dc12 SHA1 8bf700b1d0ee5ad652d5808e1ffba2eeb0373adb SHA256 6d1e2c6aa9c55097317028b84ff6ada5e9d7ee869fa62be7ba8cbddaedb38717
-MISC ChangeLog 113042 RMD160 4da769d0e10682a017c4a4e18cc04be2a3d7aaf2 SHA1 b9705f8081b5664696e1585117ad0e876b26df63 SHA256 2b45b000e77da1ec181a4966e925156b12690f074c6a2c6085a9f383ca53fea9
+MISC ChangeLog 113215 RMD160 5faa8e32e49fb6452b4bfcad9d90ff2d5f296299 SHA1 98eea50eebaea9ed8d8ac6cd538aaaf486c78884 SHA256 1700b3adef61ac9f69a3b370edf2a3eb50e6478fc6ddba09799da05d1eb2d5d9
MISC metadata.xml 1112 RMD160 1aa9770356149948593ebe35a1bd3940dd72fca2 SHA1 40514cc45c26bab671d78aa1567441bf72b0c6cc SHA256 4acea698dc4f66c17f4f3f81b28cd6b32f5425fd49f380df4a016489f786b1f5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
-iEYEARECAAYFAklSSB8ACgkQn/5bYzqsSmFwbQCfXpt9n0hc4UcAUkOejqx4l/3v
-RY4An2EMryNwe4X0dblbAQANPZzS66H5
-=0++f
+iEYEARECAAYFAklVrSoACgkQn/5bYzqsSmFrHQCgrT8V7VrN9CHNuNNvytri0mTV
+jGsAn0rahcS3ZFP11SgYdj1dlSxuUTzE
+=+53Y
-----END PGP SIGNATURE-----
diff --git a/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild b/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild
new file mode 100644
index 000000000000..e33ff8592809
--- /dev/null
+++ b/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild
@@ -0,0 +1,362 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild,v 1.1 2008/12/27 04:20:52 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="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+RESTRICT="strip" # strip ourself #46186
+EMULTILIB_PKG="true"
+
+# Configuration variables
+if [[ ${PV} == *_p* ]] ; then
+RELEASE_VER=${PV%_p*}
+BRANCH_UPDATE=""
+SNAP_VER=${PV#*_p}
+else
+RELEASE_VER=${PV}
+BRANCH_UPDATE=""
+SNAP_VER=""
+fi
+MANPAGE_VER="" # pregenerated manpages
+INFOPAGE_VER="" # pregenerated infopages
+PATCH_VER="2" # Gentoo patchset
+PORTS_VER=${RELEASE_VER} # version of glibc ports addon
+LIBIDN_VER="" # version of libidn 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 glibc-compat20 hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl nptlonly}"
+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"
+ 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-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
+ 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 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
+ else
+ upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2
+ fi
+ [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2
+ [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2
+ [[ -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
+
+ 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 || die
+ 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 ; }
+
+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.5/glibc-2.5-hardened-pie.patch
+ epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch
+ epatch "${FILESDIR}"/2.7/glibc-2.7-hardened-inittls-nosysenter.patch
+
+ einfo "Installing Hardened Gentoo SSP handler"
+ cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \
+ debug/stack_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"
+ 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
+}
+
+pkg_setup() {
+ # 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} == "/" ]] && [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; 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() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ # 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
+
+ # 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
+ cd / #228809
+ 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() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ 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
+}