summaryrefslogtreecommitdiff
path: root/core/glibc
diff options
context:
space:
mode:
Diffstat (limited to 'core/glibc')
-rw-r--r--core/glibc/PKGBUILD34
1 files changed, 28 insertions, 6 deletions
diff --git a/core/glibc/PKGBUILD b/core/glibc/PKGBUILD
index 2a06375ec..175e7a3b2 100644
--- a/core/glibc/PKGBUILD
+++ b/core/glibc/PKGBUILD
@@ -8,8 +8,10 @@ pkgname=glibc
pkgver=2.15
pkgrel=7
_glibcdate=20111227
+_glibcportsver=2.15
+_glibcportsdate=20120127
pkgdesc="GNU C Library"
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url="http://www.gnu.org/software/libc"
license=('GPL' 'LGPL')
groups=('base')
@@ -20,7 +22,8 @@ backup=(etc/gai.conf
etc/nscd.conf)
options=('!strip')
install=glibc.install
-source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.tar.xz
+source=(http://mirrors.kernel.org/archlinux/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.tar.xz
+ http://repo.parabolagnulinux.org/other/glibc-ports-${_glibcportsver}_${_glibcportsdate}.tar.xz
glibc-2.10-dont-build-timezone.patch
glibc-__i686.patch
glibc-2.12.2-ignore-origin-of-privileged-program.patch
@@ -52,6 +55,7 @@ source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.t
locale.gen.txt
locale-gen)
md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
+ '935995663b89924a98d20a636045949a'
'4dadb9203b69a3210d53514bb46f41c3'
'40cd342e21f71f5e49e32622b25acc52'
'e60e33591c9ec1447e4cddadcbb9cf3a'
@@ -83,14 +87,22 @@ md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
'07ac979b6ab5eeb778d55f041529d623'
'476e9113489f93b348b21e144b6a8fcf')
-
mksource() {
- git clone git://sourceware.org/git/glibc.git
+ git clone http://sourceware.org/git/glibc.git
pushd glibc
#git checkout -b glibc-2.15-arch origin/release/2.15/master
- git checkout -b glibc-2.15-arch origin/master
+ git checkout -b glibc-${pkgver}-arch origin/master
popd
tar -cvJf glibc-${pkgver}_${_glibcdate}.tar.xz glibc/*
+ mksource-ports
+}
+
+mksource-ports() {
+ git clone http://sourceware.org/git/glibc-ports.git
+ pushd glibc-ports
+ git checkout -b glibc-${_glibcportsver}-arch origin/release/${_glibcportsver}/master
+ popd
+ tar -cvJf glibc-ports-${_glibcportsver}_${_glibcportsdate}.tar.xz glibc-ports/*
}
@@ -208,6 +220,13 @@ build() {
# http://sourceware.org/git/?p=glibc.git;a=commit;h=6cbeae47
patch -p1 -i ${srcdir}/glibc-2.15-nearbyintf-rounding.patch
+ if [ "${CARCH}" = "mips64el" ]; then
+ ln -s ../glibc-ports ports
+
+ # Fix typo making util-linux build fail.
+ sed -i "s/_MIPS_SIM_ABIN32/_MIPS_SIM_NABI32/" ports/sysdeps/unix/sysv/linux/mips/Makefile
+ fi
+
install -dm755 ${pkgdir}/etc
touch ${pkgdir}/etc/ld.so.conf
@@ -218,6 +237,9 @@ build() {
if [[ ${CARCH} = "i686" ]]; then
# Hack to fix NPTL issues with Xen, only required on 32bit platforms
export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
+ elif [[ ${CARCH} = "mips64el" ]]; then
+ # mips64el is only supported out of tree.
+ extra_addons=",ports"
fi
echo "slibdir=/lib" >> configparms
@@ -229,7 +251,7 @@ build() {
${srcdir}/glibc/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
--with-headers=/usr/include \
- --enable-add-ons=nptl,libidn \
+ --enable-add-ons=nptl,libidn$extra_addons \
--enable-kernel=2.6.32 \
--with-tls --with-__thread \
--enable-bind-now --without-gd \