diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2002-10-09 20:11:28 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2002-10-09 20:11:28 +0000 |
commit | 7b3f2d29fba0ea8224a3b6aa29e6907c57d1d76d (patch) | |
tree | 791d33188467484ead8c4a4151cea7633a5914a0 /sys-libs | |
parent | gcc3 build fixing update (diff) | |
download | historical-7b3f2d29fba0ea8224a3b6aa29e6907c57d1d76d.tar.gz historical-7b3f2d29fba0ea8224a3b6aa29e6907c57d1d76d.tar.bz2 historical-7b3f2d29fba0ea8224a3b6aa29e6907c57d1d76d.zip |
divdi3 patch for ppc
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/glibc/ChangeLog | 7 | ||||
-rw-r--r-- | sys-libs/glibc/files/digest-glibc-2.2.5-r8 | 2 | ||||
-rw-r--r-- | sys-libs/glibc/files/glibc-2.2.5-divdi3.diff | 407 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.2.5-r7.ebuild | 19 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.2.5-r8.ebuild | 220 |
5 files changed, 424 insertions, 231 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog index 1ab2ae7960ee..75846b791d69 100644 --- a/sys-libs/glibc/ChangeLog +++ b/sys-libs/glibc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-libs/glibc # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.15 2002/09/27 09:55:02 aliz Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.16 2002/10/09 20:11:28 azarah Exp $ + + 09 Oct 2002; Martin Schlemmer <azarah@gentoo.org> glibc-2.2.5-r7.ebuild, + glibc-2.2.5-divdi3.diff : + + Add divdi3 patches for PPC, thanks to nall <nall@themountaingoats.net>. *glibc-2.2.5-r8 (27 Sep 2002) diff --git a/sys-libs/glibc/files/digest-glibc-2.2.5-r8 b/sys-libs/glibc/files/digest-glibc-2.2.5-r8 deleted file mode 100644 index acc05c85ba28..000000000000 --- a/sys-libs/glibc/files/digest-glibc-2.2.5-r8 +++ /dev/null @@ -1,2 +0,0 @@ -MD5 5be613d02b934d8e305dd2f93062fa6c glibc-2.2.5.tar.bz2 12404613 -MD5 33b9ae01d51263867d338adfba105278 glibc-linuxthreads-2.2.5.tar.bz2 168269 diff --git a/sys-libs/glibc/files/glibc-2.2.5-divdi3.diff b/sys-libs/glibc/files/glibc-2.2.5-divdi3.diff new file mode 100644 index 000000000000..084e26fa4a19 --- /dev/null +++ b/sys-libs/glibc/files/glibc-2.2.5-divdi3.diff @@ -0,0 +1,407 @@ +--- libc/sysdeps/i386/Makefile.jj Fri Sep 17 18:59:13 1999 ++++ libc/sysdeps/i386/Makefile Thu Feb 28 19:04:03 2002 +@@ -9,6 +9,12 @@ ifeq ($(subdir),csu) + # On i686 we must avoid generating the trampoline functions generated + # to get the GOT pointer. + CFLAGS-initfini.s += -march=i386 -mcpu=i386 ++ ++ifeq (yes,$(build-shared)) ++# Compatibility ++sysdep_routines += divdi3 ++shared-only-routines += divdi3 ++endif + endif + + ifeq ($(subdir),db2) +--- libc/sysdeps/m68k/Makefile.jj Thu Aug 23 18:49:59 2001 ++++ libc/sysdeps/m68k/Makefile Thu Feb 28 19:04:29 2002 +@@ -33,6 +33,14 @@ CFLAGS-setjmp.c := -fno-omit-frame-point + # The 68k `long double' is a distinct type we support. + long-double-fcts = yes + ++ifeq ($(subdir),csu) ++ifeq (yes,$(build-shared)) ++# Compatibility ++sysdep_routines += divdi3 ++shared-only-routines += divdi3 ++endif ++endif ++ + ifeq ($(subdir),elf) + CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused + endif +--- libc/sysdeps/s390/s390-32/Makefile.jj Fri Mar 16 09:59:44 2001 ++++ libc/sysdeps/s390/s390-32/Makefile Thu Feb 28 19:04:44 2002 +@@ -1,5 +1,13 @@ + pic-ccflag = -fpic + ++ifeq ($(subdir),csu) ++ifeq (yes,$(build-shared)) ++# Compatibility ++sysdep_routines += divdi3 ++shared-only-routines += divdi3 ++endif ++endif ++ + ifeq ($(subdir),gmon) + sysdep_routines += s390-mcount + endif +--- libc/sysdeps/powerpc/Makefile.orig 2000-11-27 17:32:47.000000000 -0600 ++++ libc/sysdeps/powerpc/Makefile 2002-10-02 20:43:26.000000000 -0500 +@@ -24,6 +24,13 @@ + endif + + ifeq ($(subdir),csu) ++ ++ifeq (yes,$(build-shared)) ++# Compatibility ++sysdep_routines += divdi3 ++shared-only-routines += divdi3 ++endif ++ + ifneq ($(elf),no) + # The initfini generation code doesn't work in the presence of -fPIC, so + # we use -fpic instead which is much better. +--- libc/sysdeps/powerpc/Versions.orig 2000-02-28 15:27:57.000000000 -0600 ++++ libc/sysdeps/powerpc/Versions 2002-10-02 20:43:20.000000000 -0500 +@@ -1,3 +1,10 @@ ++libc { ++ GLIBC_2.0 { ++ # Functions from libgcc. ++ __divdi3; __moddi3; __udivdi3; __umoddi3; ++ } ++} ++ + libm { + GLIBC_2.1 { + # symbols used in macros from sysdeps/powerpc/bits/fenv.h +--- libc/sysdeps/wordsize-32/divdi3.c.jj Thu Feb 28 18:53:16 2002 ++++ libc/sysdeps/wordsize-32/divdi3.c Thu Feb 28 19:02:18 2002 +@@ -0,0 +1,327 @@ ++/* 64-bit multiplication and division ++ Copyright (C) 1989, 1992-1999, 2000, 2001, 2002 ++ Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include <endian.h> ++#include <stdlib.h> ++#include <bits/wordsize.h> ++ ++#if __WORDSIZE != 32 ++#error This is for 32-bit targets only ++#endif ++ ++typedef unsigned int UQItype __attribute__ ((mode (QI))); ++typedef int SItype __attribute__ ((mode (SI))); ++typedef unsigned int USItype __attribute__ ((mode (SI))); ++typedef int DItype __attribute__ ((mode (DI))); ++typedef unsigned int UDItype __attribute__ ((mode (DI))); ++#define Wtype SItype ++#define HWtype SItype ++#define DWtype DItype ++#define UWtype USItype ++#define UHWtype USItype ++#define UDWtype UDItype ++#define W_TYPE_SIZE 32 ++ ++#include <stdlib/longlong.h> ++ ++#if __BYTE_ORDER == __BIG_ENDIAN ++struct DWstruct { Wtype high, low;}; ++#elif __BYTE_ORDER == __LITTLE_ENDIAN ++struct DWstruct { Wtype low, high;}; ++#else ++#error Unhandled endianity ++#endif ++typedef union { struct DWstruct s; DWtype ll; } DWunion; ++ ++static UDWtype ++__udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp) ++{ ++ DWunion ww; ++ DWunion nn, dd; ++ DWunion rr; ++ UWtype d0, d1, n0, n1, n2; ++ UWtype q0, q1; ++ UWtype b, bm; ++ ++ nn.ll = n; ++ dd.ll = d; ++ ++ d0 = dd.s.low; ++ d1 = dd.s.high; ++ n0 = nn.s.low; ++ n1 = nn.s.high; ++ ++#if !UDIV_NEEDS_NORMALIZATION ++ if (d1 == 0) ++ { ++ if (d0 > n1) ++ { ++ /* 0q = nn / 0D */ ++ ++ udiv_qrnnd (q0, n0, n1, n0, d0); ++ q1 = 0; ++ ++ /* Remainder in n0. */ ++ } ++ else ++ { ++ /* qq = NN / 0d */ ++ ++ if (d0 == 0) ++ d0 = 1 / d0; /* Divide intentionally by zero. */ ++ ++ udiv_qrnnd (q1, n1, 0, n1, d0); ++ udiv_qrnnd (q0, n0, n1, n0, d0); ++ ++ /* Remainder in n0. */ ++ } ++ ++ if (rp != 0) ++ { ++ rr.s.low = n0; ++ rr.s.high = 0; ++ *rp = rr.ll; ++ } ++ } ++ ++#else /* UDIV_NEEDS_NORMALIZATION */ ++ ++ if (d1 == 0) ++ { ++ if (d0 > n1) ++ { ++ /* 0q = nn / 0D */ ++ ++ count_leading_zeros (bm, d0); ++ ++ if (bm != 0) ++ { ++ /* Normalize, i.e. make the most significant bit of the ++ denominator set. */ ++ ++ d0 = d0 << bm; ++ n1 = (n1 << bm) | (n0 >> (W_TYPE_SIZE - bm)); ++ n0 = n0 << bm; ++ } ++ ++ udiv_qrnnd (q0, n0, n1, n0, d0); ++ q1 = 0; ++ ++ /* Remainder in n0 >> bm. */ ++ } ++ else ++ { ++ /* qq = NN / 0d */ ++ ++ if (d0 == 0) ++ d0 = 1 / d0; /* Divide intentionally by zero. */ ++ ++ count_leading_zeros (bm, d0); ++ ++ if (bm == 0) ++ { ++ /* From (n1 >= d0) /\ (the most significant bit of d0 is set), ++ conclude (the most significant bit of n1 is set) /\ (the ++ leading quotient digit q1 = 1). ++ ++ This special case is necessary, not an optimization. ++ (Shifts counts of W_TYPE_SIZE are undefined.) */ ++ ++ n1 -= d0; ++ q1 = 1; ++ } ++ else ++ { ++ /* Normalize. */ ++ ++ b = W_TYPE_SIZE - bm; ++ ++ d0 = d0 << bm; ++ n2 = n1 >> b; ++ n1 = (n1 << bm) | (n0 >> b); ++ n0 = n0 << bm; ++ ++ udiv_qrnnd (q1, n1, n2, n1, d0); ++ } ++ ++ /* n1 != d0... */ ++ ++ udiv_qrnnd (q0, n0, n1, n0, d0); ++ ++ /* Remainder in n0 >> bm. */ ++ } ++ ++ if (rp != 0) ++ { ++ rr.s.low = n0 >> bm; ++ rr.s.high = 0; ++ *rp = rr.ll; ++ } ++ } ++#endif /* UDIV_NEEDS_NORMALIZATION */ ++ ++ else ++ { ++ if (d1 > n1) ++ { ++ /* 00 = nn / DD */ ++ ++ q0 = 0; ++ q1 = 0; ++ ++ /* Remainder in n1n0. */ ++ if (rp != 0) ++ { ++ rr.s.low = n0; ++ rr.s.high = n1; ++ *rp = rr.ll; ++ } ++ } ++ else ++ { ++ /* 0q = NN / dd */ ++ ++ count_leading_zeros (bm, d1); ++ if (bm == 0) ++ { ++ /* From (n1 >= d1) /\ (the most significant bit of d1 is set), ++ conclude (the most significant bit of n1 is set) /\ (the ++ quotient digit q0 = 0 or 1). ++ ++ This special case is necessary, not an optimization. */ ++ ++ /* The condition on the next line takes advantage of that ++ n1 >= d1 (true due to program flow). */ ++ if (n1 > d1 || n0 >= d0) ++ { ++ q0 = 1; ++ sub_ddmmss (n1, n0, n1, n0, d1, d0); ++ } ++ else ++ q0 = 0; ++ ++ q1 = 0; ++ ++ if (rp != 0) ++ { ++ rr.s.low = n0; ++ rr.s.high = n1; ++ *rp = rr.ll; ++ } ++ } ++ else ++ { ++ UWtype m1, m0; ++ /* Normalize. */ ++ ++ b = W_TYPE_SIZE - bm; ++ ++ d1 = (d1 << bm) | (d0 >> b); ++ d0 = d0 << bm; ++ n2 = n1 >> b; ++ n1 = (n1 << bm) | (n0 >> b); ++ n0 = n0 << bm; ++ ++ udiv_qrnnd (q0, n1, n2, n1, d1); ++ umul_ppmm (m1, m0, q0, d0); ++ ++ if (m1 > n1 || (m1 == n1 && m0 > n0)) ++ { ++ q0--; ++ sub_ddmmss (m1, m0, m1, m0, d1, d0); ++ } ++ ++ q1 = 0; ++ ++ /* Remainder in (n1n0 - m1m0) >> bm. */ ++ if (rp != 0) ++ { ++ sub_ddmmss (n1, n0, n1, n0, m1, m0); ++ rr.s.low = (n1 << b) | (n0 >> bm); ++ rr.s.high = n1 >> bm; ++ *rp = rr.ll; ++ } ++ } ++ } ++ } ++ ++ ww.s.low = q0; ++ ww.s.high = q1; ++ return ww.ll; ++} ++ ++DWtype ++__divdi3 (DWtype u, DWtype v) ++{ ++ Wtype c = 0; ++ DWtype w; ++ ++ if (u < 0) ++ { ++ c = ~c; ++ u = -u; ++ } ++ if (v < 0) ++ { ++ c = ~c; ++ v = -v; ++ } ++ w = __udivmoddi4 (u, v, NULL); ++ if (c) ++ w = -w; ++ return w; ++} ++ ++DWtype ++__moddi3 (DWtype u, DWtype v) ++{ ++ Wtype c = 0; ++ DWtype w; ++ ++ if (u < 0) ++ { ++ c = ~c; ++ u = -u; ++ } ++ if (v < 0) ++ { ++ c = ~c; ++ v = -v; ++ } ++ __udivmoddi4 (u, v, &w); ++ if (c) ++ w = -w; ++ return w; ++} ++ ++UDWtype ++__udivdi3 (UDWtype u, UDWtype v) ++{ ++ return __udivmoddi4 (u, v, NULL); ++} ++ ++UDWtype ++__umoddi3 (UDWtype u, UDWtype v) ++{ ++ UDWtype w; ++ ++ __udivmoddi4 (u, v, &w); ++ return w; ++} diff --git a/sys-libs/glibc/glibc-2.2.5-r7.ebuild b/sys-libs/glibc/glibc-2.2.5-r7.ebuild index 917ff17017ed..791d5c6c61b8 100644 --- a/sys-libs/glibc/glibc-2.2.5-r7.ebuild +++ b/sys-libs/glibc/glibc-2.2.5-r7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.2.5-r7.ebuild,v 1.8 2002/10/05 05:39:27 drobbins Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.2.5-r7.ebuild,v 1.9 2002/10/09 20:11:28 azarah Exp $ IUSE="nls pic build" inherit flag-o-matic @@ -35,8 +35,8 @@ fi PROVIDE="virtual/glibc" #lock glibc at -O2 -- linuxthreads needs it and we want to be conservative here -export CFLAGS="$CFLAGS -O2" -export CXXFLAGS="$CFLAGS" +export CFLAGS="${CFLAGS//-O?} -O2" +export CXXFLAGS="${CFLAGS}" src_unpack() { unpack glibc-${PV}.tar.bz2 || die @@ -88,10 +88,10 @@ src_unpack() { # cd ${S}; patch -p1 < ${FILESDIR}/${P}-sunrpc-overflow.diff || die - if [ "${ARCH}" = "x86" ]; then - # This patch fixes the nvidia-glx probs, openoffice and vmware probs and such.. - # http://sources.redhat.com/ml/libc-hacker/2002-02/msg00152.html - cd ${S}; patch -p1 < ${FILESDIR}/glibc-divdi3.diff || die + if [ "${ARCH}" = "x86" -o "${ARCH}" = "ppc" ]; then + # This patch fixes the nvidia-glx probs, openoffice and vmware probs and such.. + # http://sources.redhat.com/ml/libc-hacker/2002-02/msg00152.html + cd ${S}; patch -p1 < ${FILESDIR}/${P}-divdi3.diff || die fi # Some gcc-3.1.1 fixes. This works fine for other versions of gcc as well, @@ -115,8 +115,11 @@ src_unpack() { src_compile() { local myconf="" + # If we build for the build system we use the kernel headers from the target - use build && myconf="${myconf} --with-header=${ROOT}usr/include" + use build \ + && myconf="${myconf} --with-header=${ROOT}usr/include" + use nls || myconf="${myconf} --disable-nls" rm -rf buildhere diff --git a/sys-libs/glibc/glibc-2.2.5-r8.ebuild b/sys-libs/glibc/glibc-2.2.5-r8.ebuild deleted file mode 100644 index c6cd3e75c36c..000000000000 --- a/sys-libs/glibc/glibc-2.2.5-r8.ebuild +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright 1999-2002 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.2.5-r8.ebuild,v 1.3 2002/10/05 05:39:27 drobbins Exp $ - -IUSE="nls build" -inherit flag-o-matic - -filter-flags "-fomit-frame-pointer -malign-double" - -S=${WORKDIR}/${P} -DESCRIPTION="GNU libc6 (also called glibc2) C library" -SRC_URI="ftp://sources.redhat.com/pub/glibc/releases/glibc-${PV}.tar.bz2 - ftp://sources.redhat.com/pub/glibc/releases/glibc-linuxthreads-${PV}.tar.bz2" -HOMEPAGE="http://www.gnu.org/software/libc/libc.html" - -KEYWORDS="x86 ppc sparc sparc64" -LICENSE="GPL-2" -SLOT="2.2" - -#portage-1.8.9 needed for smart library merging feature (avoids segfaults on glibc upgrade) -#drobbins, 18 Mar 2002: we now rely on the system profile to select the correct linus-headers -# -#we need gcc-2.95.3-r7 or later to fix the atexit() issue with the sandbox patch -#azarah, 3 Aug 2002 -DEPEND="sys-kernel/linux-headers - >=sys-devel/gcc-2.95.3-r7 - nls? ( sys-devel/gettext )" - -RDEPEND="sys-kernel/linux-headers - sys-apps/baselayout - !build? ( >=sys-apps/portage-2.0.23 )" - -PROVIDE="virtual/glibc" - -#lock glibc at -O2 -- linuxthreads needs it and we want to be conservative here -export CFLAGS="$CFLAGS -O2" -export CXXFLAGS="$CFLAGS" - -pkg_config() { - eerror - eerror "This is a bad revision of glibc that breaks binary compatibility!!" - eerror - die -} - -src_unpack() { - unpack glibc-${PV}.tar.bz2 || die - - cd ${S} - #extract pre-made man pages. Otherwise we need perl, which is a no-no. - mkdir man; cd man - tar xjf ${FILESDIR}/glibc-manpages-${PV}.tar.bz2 || die - cd ${S} - unpack glibc-linuxthreads-${PV}.tar.bz2 || die - - # This patch apparently eliminates compiler warnings for some versions of gcc. - # For information about the string2 patch, see: - # http://lists.gentoo.org/pipermail/gentoo-dev/2001-June/001559.html - cd ${S}; patch -p0 < ${FILESDIR}/glibc-2.2.4-string2.h.diff || die - - # This next one is a new patch to fix thread signal handling. See: - # http://sources.redhat.com/ml/libc-hacker/2002-02/msg00120.html - # (Added by drobbins on 05 Mar 2002) - cd ${S}; patch -p0 < ${FILESDIR}/glibc-2.2.5-threadsig.diff || die - - # This next patch fixes a test that will timeout due to ReiserFS' slow handling of sparse files - cd ${S}/io; patch -p0 < ${FILESDIR}/glibc-2.2.2-test-lfs-timeout.patch || die - - # The following spinlock error should only bite if you compile without any -O in CFLAGS, so a tweak - # shouldn't be necessary. The solution is to add -O2. According to Andreas Jaeger of SuSE, "glibc - # *needs* to be compiled with optimization" (emphasis mine). So let's fix the optimization settings, - # not tweak glibc. - # (drobbins, 10 Feb 2002) - # http://sources.redhat.com/ml/bug-glibc/2001-09/msg00041.html - # http://sources.redhat.com/ml/bug-glibc/2001-09/msg00042.html - # cd ${S}/linuxthreads - # cp spinlock.c spinlock.c.orig - # sed -e 's/"=m" (lock->__status) : "0" (lock->__status/"+m" (lock->__status/g' spinlock.c.orig > spinlock.c - - # The glob() buffer overflow in glibc 2.2.4 was fixed in 2.2.5; commenting out. - # http://lwn.net/2001/1220/a/glibc-vulnerability.php3 - # cd ${S} - # patch -p1 < ${FILESDIR}/glibc-2.2.4-glob-overflow.diff || die - - # A buffer overflow vulnerability exists in multiple implementations of DNS - # resolver libraries. This affects glibc-2.2.5 and earlier. See bug #4923 - # and: - # - # http://www.cert.org/advisories/CA-2002-19.html - cd ${S}; patch -p1 < ${FILESDIR}/${P}-dns-network-overflow.diff || die - - # Security update for sunrpc - # <aliz@gentoo.org> - # - cd ${S}; patch -p1 < ${FILESDIR}/${P}-sunrpc-overflow.diff || die - - # This one fixes a segfault in some programs when sandbox is running. - # We need gcc-2.95.3-r7 or later, or else precompiled stuff like Quake3, - # etc do not run. See for more info: - # - # http://sources.redhat.com/ml/bug-glibc/2002-04/msg00025.html - # http://bugs.gentoo.org/show_bug.cgi?id=501 - # - # Azarah (3 Aug 2002) - cd ${S}; patch -p1 < ${FILESDIR}/${P}-sandbox.diff || die - - if [ ${ARCH} == "x86" ]; then - # This patch fixes the nvidia-glx probs, openoffice and vmware probs and such.. - # http://sources.redhat.com/ml/libc-hacker/2002-02/msg00152.html - cd ${S} - patch -p1 < ${FILESDIR}/glibc-divdi3.diff || die - fi - - # Some gcc-3.1.1 fixes. This works fine for other versions of gcc as well, - # and should generally be ok, as it just fixes define order that causes scope - # problems with gcc-3.1.1. - # (Azarah, 14 Jul 2002) - cd ${S}; patch -p1 < ${FILESDIR}/glibc-2.2.5-gcc311.patch || die - - # Avoid "Error: illegal instruction" when compiling on sparc with gcc 3.1.1 - if [ ${ARCH} == "sparc" -o ${ARCH} == "sparc64" ]; then - patch -p1 < ${FILESDIR}/glibc-2.2.5-gcc311-sparc.patch || die - fi -} - -src_compile() { - local myconf="" - # If we build for the build system we use the kernel headers from the target - use build && myconf="${myconf} --with-header=${ROOT}usr/include" - use nls || myconf="${myconf} --disable-nls" - - rm -rf buildhere - mkdir buildhere - cd buildhere - ../configure --host=${CHOST} \ - --with-gd=no \ - --without-cvs \ - --enable-add-ons=linuxthreads \ - --disable-profile \ - --prefix=/usr \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --libexecdir=/usr/lib/misc \ - ${myconf} || die - #This next option breaks the Sun JDK and the IBM JDK - #We should really keep compatibility with older kernels, anyway - #--enable-kernel=2.4.0 - - make PARALLELMFLAGS="${MAKEOPTS}" || die - make check -} - - -src_install() { - export LC_ALL=C - make PARALLELMFLAGS="${MAKEOPTS}" \ - install_root=${D} \ - install -C buildhere || die - - if [ -z "`use build`" ] - then - make PARALLELMFLAGS="${MAKEOPTS}" \ - install_root=${D} \ - info -C buildhere || die - - make PARALLELMFLAGS="${MAKEOPTS}" \ - install_root=${D} \ - localedata/install-locales -C buildhere || die - - #install linuxthreads man pages - dodir /usr/share/man/man3 - doman ${S}/man/*.3thr - install -m 644 nscd/nscd.conf ${D}/etc - dodoc BUGS ChangeLog* CONFORMANCE COPYING* FAQ INTERFACE \ - NEWS NOTES PROJECTS README* - else - rm -rf ${D}/usr/share ${D}/usr/lib/gconv - fi - - if [ "`use pic`" ] - then - find ${S}/buildhere -name "*_pic.a" -exec cp {} ${D}/lib \; - find ${S}/buildhere -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. - chmod 4755 ${D}/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 - - #some things want this, notably ash. - dosym /usr/lib/libbsd-compat.a /usr/lib/libbsd.a -} - -pkg_postinst() { - # Correct me if I am wrong here, but my /etc/localtime is a file - # created by zic .... - # I am thinking that it should only be recreated if no /etc/localtime - # exists, or if it is an invalid symlink. - # - # For invalid symlink: - # -f && -e will fail - # -L will succeed - # - if [ ! -e ${ROOT}/etc/localtime ] - then - echo "Please remember to set your timezone using the zic command." - rm -f ${ROOT}/etc/localtime - ln -s ../usr/share/zoneinfo/Factory ${ROOT}/etc/localtime - fi -} - |