From 19b8381b640a17b093528cc607c328d1f6fb8267 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 17 Nov 2008 09:16:31 +0100 Subject: [PATCH] glibc{,32}: do not use base_package anymore and misc changes. --HG-- extra : convert_revision : 3b62a749010b0a05ffe2baa5bb317c5555dfaa49 --- templates/glibc.tmpl | 15 +++++---------- templates/glibc32.tmpl | 28 +++++++++++++++------------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/templates/glibc.tmpl b/templates/glibc.tmpl index 608d015fe3..9475fd7a85 100644 --- a/templates/glibc.tmpl +++ b/templates/glibc.tmpl @@ -7,8 +7,8 @@ build_style=gnu_configure configure_script="../configure" configure_args="--with-tls -disable-profile --with-__thread --enable-kernel=2.6.16 --enable-add-ons --without-gd --enable-bind-now - --without-cvs --without-selinux --prefix=/usr --libdir=/usr/lib - --with-headers=/usr/include --infodir=/usr/share/info" + --without-cvs --without-selinux --infodir=/usr/share/info + --libdir=/usr/lib" make_install_target="install_root=$XBPS_DESTDIR/$pkgname-$version install localedata/install-locales" short_desc="The GNU C library" @@ -21,7 +21,6 @@ long_desc=" as C++ and Objective C; the runtime facilities of other programming languages use the C library to access the underlying operating system." -base_package=yes base_chroot=yes build_depends="gcc-4.3.2" @@ -48,16 +47,12 @@ post_install() . $XBPS_HELPERSDIR/replace-interpreter.sh replace_interpreter bash $destdir/usr/bin/ldd - # On x86_64, use /lib rather than /lib64 and add the - # dynamic linker's 32bit version. + # On x86_64, add dynamic linker's 32bit version to ldd. if [ "$xbps_machine" = "x86_64" ]; then rtldlist="/lib/ld-linux.so.2 /lib/ld-linux-x86-64.so.2" sed -i "s|^RTLDLIST.*$|RTLDLIST=\"$rtldlist\"|" \ $destdir/usr/bin/ldd - cd $destdir && ln -s lib lib64 - cd $destdir/usr && ln -s lib lib64 - # Add /lib32 and /usr/lib32 into ld.so.conf for now. - echo "/lib32" >> $destdir/etc/ld.so.conf - echo "/usr/lib32" >> $destdir/etc/ld.so.conf fi + + wrksrc=libc } diff --git a/templates/glibc32.tmpl b/templates/glibc32.tmpl index 1765b80509..c2e584dfbc 100644 --- a/templates/glibc32.tmpl +++ b/templates/glibc32.tmpl @@ -8,7 +8,7 @@ configure_script="../configure" configure_env="BUILD_CC=$XBPS_CROSS_TARGET-gcc" configure_args="--with-tls -disable-profile --with-__thread --enable-kernel=2.6.16 --enable-add-ons --without-gd --enable-bind-now - --without-cvs --without-selinux --prefix=/usr --libdir=/usr/lib32 + --without-cvs --without-selinux --libdir=/usr/lib32 --with-headers=/usr/include --cache-file=config.cache --infodir=/usr/share/info" make_install_target="install_root=$XBPS_DESTDIR/$pkgname-$version install" @@ -22,12 +22,11 @@ long_desc=" as C++ and Objective C; the runtime facilities of other programming languages use the C library to access the underlying operating system. - This version is only for 64 bits systems." + This package installs the 32 bit libraries for x86_64 systems." # This package doesn't make sense on 32bit systems. only_for_archs=x86_64 cross_compiler=yes -base_package=yes build_depends="perl-5.10.0" pre_configure() @@ -59,11 +58,12 @@ post_install() mkdir -p $tmpdir/usr/include/sys # Remove all headers except the ones required for 32bits stuff. - mv -v $destdir/include/gnu/stubs-32.h $tmpdir/usr/include/gnu - mv -v $destdir/include/sys/elf.h $tmpdir/usr/include/sys - mv -v $destdir/include/sys/vm86.h $tmpdir/usr/include/sys + mv -v $destdir/usr/include/gnu/stubs-32.h $tmpdir/usr/include/gnu + mv -v $destdir/usr/include/sys/elf.h $tmpdir/usr/include/sys + mv -v $destdir/usr/include/sys/vm86.h $tmpdir/usr/include/sys - rm -rf $destdir/include + rm -rf $destdir/usr/include + mkdir -p $destdir/lib mkdir -p $destdir/usr/include mkdir -p $destdir/usr/lib32/gconv mv -v $tmpdir/usr/include/* $destdir/usr/include @@ -71,13 +71,15 @@ post_install() # Remove bins and unneeded stuff for compat32. [ -d $destdir/xbps_destdir ] && rm -rf $destdir/xbps_destdir rm -rf $destdir/sbin $destdir/bin $destdir/usr/sbin $destdir/usr/bin - rm -rf $destdir/share $destdir/libexec $destdir/etc - mv -v $destdir/lib/gconv/* $destdir/usr/lib32/gconv + rm -rf $destdir/usr/share $destdir/usr/libexec $destdir/etc + mv -v $destdir/usr/lib/* $destdir/usr/lib32/ + rmdir $destdir/usr/lib - # Remove wrong symlinks in shared libs and move them to /lib32. - find $destdir/lib -type l -print|xargs rm -v - mv -v $destdir/lib/* $destdir/lib32 - cd $destdir/lib && ln -s ../lib32/ld-linux.so.2 ld-linux.so.2 + # Make some symlinks from /lib32 in /lib, to make gcc-multilib happy. + cd $destdir/lib && ln -s ../lib32/libc_nonshared.a . + cd $destdir/lib && ln -s ../lib32/ld-linux.so.2 . + cd $destdir/lib && ln -s ../lib32/libpthread_nonshared.a . rm -rf $tmpdir + wrksrc=$XBPS_BUILDDIR/libc }