diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-12-03 16:52:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-12-03 16:52:34 +0000 |
commit | 609d242279b7f66c68009d4e450ed0bcba68e32b (patch) | |
tree | 2965b8e3dd9fbae91c9ad859c6456b240668323c /sys-libs | |
parent | fixed path to ipppd in net.ippp0 (diff) | |
download | historical-609d242279b7f66c68009d4e450ed0bcba68e32b.tar.gz historical-609d242279b7f66c68009d4e450ed0bcba68e32b.tar.bz2 historical-609d242279b7f66c68009d4e450ed0bcba68e32b.zip |
more cross-compile fixes from David Belanger
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/glibc/Manifest | 10 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.3.4.20040808-r1.ebuild | 72 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.3.4.20041102.ebuild | 60 |
3 files changed, 79 insertions, 63 deletions
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index 647f34b8043d..6b8f0a326ab5 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -7,8 +7,8 @@ MD5 e4f211c5762191a6fce67b15caf38c31 glibc-2.3.2-r12.ebuild 20537 MD5 d59fdfb3aca88476d792b71922c765a5 glibc-2.3.3.20040420-r2.ebuild 21630 MD5 48dcbf88afd15efb62b4313337261968 glibc-2.3.4.20040619-r2.ebuild 21077 MD5 567094e03359ffc1c95af7356395228d metadata.xml 162 -MD5 4de3ef52fedc7ed9a8129ebd5f552756 glibc-2.3.4.20040808-r1.ebuild 22266 -MD5 d581e8fe852f6916509363daad57c1fb glibc-2.3.4.20041102.ebuild 26933 +MD5 0337c379042671fe6d09271a287b3f04 glibc-2.3.4.20040808-r1.ebuild 22512 +MD5 f35a6db16ef2ed743974f94ca8d7365d glibc-2.3.4.20041102.ebuild 27271 MD5 9cc1e6b6f749dba7c8759bd07266f7d9 files/digest-glibc-2.2.5-r9 143 MD5 2d5306ef875573750af642a9f93b634a files/digest-glibc-2.3.2-r12 312 MD5 42af7e35fe2404a49954f91fd1aee891 files/digest-glibc-2.3.3.20040420-r2 312 @@ -137,7 +137,7 @@ MD5 039f62650037a4a15cef3066b26d27c9 files/2.3.4/glibc-2.3.4-mips-update-__throw -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.10 (GNU/Linux) -iD8DBQFBr/D6roRuSHgZdywRAlXuAJ4lgUvJ760guYWqkjDgj1le3btpwQCfawj/ -a955a/5VwUiF3gdozTR8GRY= -=MCya +iD8DBQFBsJnuroRuSHgZdywRAka6AJ9TPfywB3qvpBtlM5HcPzBAyzUwJwCfcGv7 +7T7W1GDOuPZKrh3mTgKnks4= +=9MZc -----END PGP SIGNATURE----- diff --git a/sys-libs/glibc/glibc-2.3.4.20040808-r1.ebuild b/sys-libs/glibc/glibc-2.3.4.20040808-r1.ebuild index 0753ff106769..323276cb15b7 100644 --- a/sys-libs/glibc/glibc-2.3.4.20040808-r1.ebuild +++ b/sys-libs/glibc/glibc-2.3.4.20040808-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.4.20040808-r1.ebuild,v 1.13 2004/12/03 04:51:54 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.4.20040808-r1.ebuild,v 1.14 2004/12/03 16:52:34 vapier Exp $ inherit eutils flag-o-matic gcc versionator @@ -14,6 +14,9 @@ BRANCH_UPDATE="20040808" # support required to enable nptl. MIN_KERNEL_VERSION="2.6.5" +# (very) Theoretical cross-compiler support +export CTARGET="${CTARGET:-${CHOST}}" + if [ -z "${BRANCH_UPDATE}" ]; then BASE_PV="${NEW_PV}" @@ -39,7 +42,7 @@ SRC_URI="http://dev.gentoo.org/~lv/${PN}-${BASE_PV}.tar.bz2 http://dev.gentoo.org/~lv/${PN}-${NEW_PV}-branch-update-${BRANCH_UPDATE}.patch.bz2" LICENSE="LGPL-2" -SLOT="2.2" +SLOT="${CTARGET}-2.2" KEYWORDS="x86 amd64 hppa ppc64 ~ppc -mips" IUSE="nls pic build nptl erandom hardened multilib debug userlocales" RESTRICT="nostrip" # we'll handle stripping ourself #46186 @@ -62,17 +65,21 @@ PDEPEND="amd64? ( multilib? ( app-emulation/emul-linux-x86-glibc ) )" PROVIDE="virtual/glibc virtual/libc" - -# (very) Theoretical cross-compiler support -export CTARGET="${CTARGET:-${CHOST}}" - # We need to be able to set alternative headers for # compiling for non-native platform # Will also become useful for testing kernel-headers without screwing up # the whole system. # note: intentionally undocumented. -[ -z "${ALT_HEADERS}" ] && ALT_HEADERS="${ROOT}/usr/include" - +alt_headers() { + if [ -z "${ALT_HEADERS}" ] ; then + if [[ ${CTARGET} = ${CHOST} ]] ; then + ALT_HEADERS="${ROOT}/usr/include" + else + ALT_HEADERS="${ROOT}/usr/${CTARGET}/include" + fi + fi + echo "${ALT_HEADERS}" +} setup_flags() { # Over-zealous CFLAGS can often cause problems. What may work for one @@ -126,7 +133,7 @@ setup_flags() { check_kheader_version() { - local header="${ALT_HEADERS}/linux/version.h" + local header="$(alt_headers)/linux/version.h" [ -z "$1" ] && return 1 @@ -231,7 +238,7 @@ install_locales() { cd ${WORKDIR}/build make PARALLELMFLAGS="${MAKEOPTS}" \ install_root=${D} localedata/install-locales || die - keepdir /usr/lib/locale/ru_RU/LC_MESSAGES + [[ ${CTARGET} = ${CHOST} ]] && keepdir /usr/lib/locale/ru_RU/LC_MESSAGES } @@ -560,7 +567,7 @@ src_compile() { --disable-profile \ --without-gd \ --without-cvs \ - --with-headers=${ALT_HEADERS} \ + --with-headers=$(alt_headers) \ --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ @@ -613,9 +620,26 @@ EOF done fi - if ! use build; then - cd ${WORKDIR}/build + if use pic && ! use amd64 ; then + find ${S}/${buildtarget}/ -name "soinit.os" -exec cp {} ${D}/lib/soinit.o \; + find ${S}/${buildtarget}/ -name "sofini.os" -exec cp {} ${D}/lib/sofini.o \; + find ${S}/${buildtarget}/ -name "*_pic.a" -exec cp {} ${D}/lib \; + find ${S}/${buildtarget}/ -name "*.map" -exec cp {} ${D}/lib \; + for i in ${D}/lib/*.map; do + mv ${i} ${i%.map}_pic.map + done + fi + + # We'll take care of the cache ourselves + rm -f ${D}/etc/ld.so.cache + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + [[ ${CTARGET} != ${CHOST} ]] && return 0 + + cd ${WORKDIR}/build + if ! use build ; then if ! has noinfo ${FEATURES} ; then einfo "Installing Info pages..." make PARALLELMFLAGS="${MAKEOPTS}" \ @@ -635,7 +659,7 @@ EOF exeinto /etc/init.d ; doexe ${FILESDIR}/nscd cd ${S} - dodoc BUGS ChangeLog* CONFORMANCE COPYING* FAQ INTERFACE \ + dodoc BUGS ChangeLog* CONFORMANCE FAQ INTERFACE \ NEWS NOTES PROJECTS README* else rm -rf ${D}/usr/share ${D}/usr/lib/gconv @@ -643,31 +667,13 @@ EOF einfo "Installing Timezone data..." make PARALLELMFLAGS="${MAKEOPTS}" \ install_root=${D} \ - timezone/install-others -C ${WORKDIR}/build || die - fi - - if use pic && ! use amd64 ; then - find ${S}/${buildtarget}/ -name "soinit.os" -exec cp {} ${D}/lib/soinit.o \; - find ${S}/${buildtarget}/ -name "sofini.os" -exec cp {} ${D}/lib/sofini.o \; - find ${S}/${buildtarget}/ -name "*_pic.a" -exec cp {} ${D}/lib \; - find ${S}/${buildtarget}/ -name "*.map" -exec cp {} ${D}/lib \; - - for i in ${D}/lib/*.map; do - mv ${i} ${i%.map}_pic.map - done + timezone/install-others || die fi # Is this next line actually needed or does the makefile get it right? # It previously has 0755 perms which was killing things. fperms 4711 /usr/lib/misc/pt_chown - # Currently libraries in /usr/lib/gconv do not get loaded if not - # in search path ... -# insinto /etc/env.d -# doins ${FILESDIR}/03glibc - - rm -f ${D}/etc/ld.so.cache - # Prevent overwriting of the /etc/localtime symlink. We'll handle the # creation of the "factory" symlink in pkg_postinst(). rm -f ${D}/etc/localtime diff --git a/sys-libs/glibc/glibc-2.3.4.20041102.ebuild b/sys-libs/glibc/glibc-2.3.4.20041102.ebuild index bb88f05efd62..e6dd1c95ccf3 100644 --- a/sys-libs/glibc/glibc-2.3.4.20041102.ebuild +++ b/sys-libs/glibc/glibc-2.3.4.20041102.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.4.20041102.ebuild,v 1.7 2004/12/03 04:51:54 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.4.20041102.ebuild,v 1.8 2004/12/03 16:52:34 vapier Exp $ inherit eutils flag-o-matic gcc versionator @@ -14,6 +14,9 @@ BRANCH_UPDATE="20041102" # support required to enable nptl. MIN_KERNEL_VERSION="2.6.5" +# (very) Theoretical cross-compiler support +export CTARGET="${CTARGET:-${CHOST}}" + if [ -z "${BRANCH_UPDATE}" ]; then BASE_PV="${NEW_PV}" @@ -62,17 +65,21 @@ PDEPEND="amd64? ( multilib? ( app-emulation/emul-linux-x86-glibc ) )" PROVIDE="virtual/glibc virtual/libc" - -# (very) Theoretical cross-compiler support -export CTARGET="${CTARGET:-${CHOST}}" - # We need to be able to set alternative headers for # compiling for non-native platform # Will also become useful for testing kernel-headers without screwing up # the whole system. # note: intentionally undocumented. -[ -z "${ALT_HEADERS}" ] && ALT_HEADERS="${ROOT}/usr/include" - +alt_headers() { + if [ -z "${ALT_HEADERS}" ] ; then + if [[ ${CTARGET} = ${CHOST} ]] ; then + ALT_HEADERS="${ROOT}/usr/include" + else + ALT_HEADERS="${ROOT}/usr/${CTARGET}/include" + fi + fi + echo "${ALT_HEADERS}" +} setup_flags() { # Over-zealous CFLAGS can often cause problems. What may work for one @@ -126,7 +133,7 @@ setup_flags() { check_kheader_version() { - local header="${ALT_HEADERS}/linux/version.h" + local header="$(alt_headers)/linux/version.h" [ -z "$1" ] && return 1 @@ -590,7 +597,7 @@ glibc_do_configure() { --host=${CTARGET} --disable-profile --without-gd - --with-headers=${ALT_HEADERS} + --with-headers=$(alt_headers) --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info @@ -736,9 +743,26 @@ EOF done fi - if ! use build; then - cd ${WORKDIR}/${MYMAINBUILDDIR} + if use pic && ! use amd64 ; then + find ${S}/${buildtarget}/ -name "soinit.os" -exec cp {} ${D}/lib/soinit.o \; + find ${S}/${buildtarget}/ -name "sofini.os" -exec cp {} ${D}/lib/sofini.o \; + find ${S}/${buildtarget}/ -name "*_pic.a" -exec cp {} ${D}/lib \; + find ${S}/${buildtarget}/ -name "*.map" -exec cp {} ${D}/lib \; + for i in ${D}/lib/*.map; do + mv ${i} ${i%.map}_pic.map + done + fi + + # We'll take care of the cache ourselves + rm -f ${D}/etc/ld.so.cache + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + [[ ${CTARGET} != ${CHOST} ]] && return 0 + + cd ${WORKDIR}/${MYMAINBUILDDIR} + if ! use build ; then if ! has noinfo ${FEATURES} ; then einfo "Installing Info pages..." make PARALLELMFLAGS="${MAKEOPTS}" \ @@ -764,29 +788,15 @@ EOF rm -rf ${D}/usr/share ${D}/usr/$(get_libdir)/gconv einfo "Installing Timezone data..." - cd ${WORKDIR}/${MYMAINBUILDDIR} make PARALLELMFLAGS="${MAKEOPTS}" \ install_root=${D} \ timezone/install-others || die fi - if use pic && ! use amd64 ; then - find ${S}/${buildtarget}/ -name "soinit.os" -exec cp {} ${D}/lib/soinit.o \; - find ${S}/${buildtarget}/ -name "sofini.os" -exec cp {} ${D}/lib/sofini.o \; - find ${S}/${buildtarget}/ -name "*_pic.a" -exec cp {} ${D}/lib \; - find ${S}/${buildtarget}/ -name "*.map" -exec cp {} ${D}/lib \; - - for i in ${D}/lib/*.map; do - mv ${i} ${i%.map}_pic.map - done - fi - # Is this next line actually needed or does the makefile get it right? # It previously has 0755 perms which was killing things. fperms 4711 /usr/lib/misc/pt_chown - rm -f ${D}/etc/ld.so.cache - # Prevent overwriting of the /etc/localtime symlink. We'll handle the # creation of the "factory" symlink in pkg_postinst(). rm -f ${D}/etc/localtime |