glibc32: update to match latest i686 pkg.

--HG--
extra : convert_revision : 078d7f9f1baf9c4fda9d3fd2c848d41a6c02d7ce
This commit is contained in:
Juan RP 2010-01-29 18:46:21 +01:00
parent a4070a27a9
commit 06f81470b5
3 changed files with 46 additions and 68 deletions

18
srcpkgs/glibc32/INSTALL Normal file
View file

@ -0,0 +1,18 @@
#
# This script adds /lib32 and /usr/lib32 into ld.so's cache for
# x86_64 systems.
#
case "${ACTION}" in
post)
if [ ! -d etc/ld.so.conf.d ]; then
mkdir -p etc/ld.so.conf.d
echo "include /etc/ld.so.conf.d/*.conf" >> etc/ld.so.conf
fi
if [ ! -f etc/ld.so.conf.d/glibc32.conf ]; then
echo "/lib32" >> etc/ld.so.conf.d/glibc32.conf
echo "/usr/lib32" >> etc/ld.so.conf.d/glibc32.conf
chmod 644 etc/ld.so.conf.d/glibc32.conf
sbin/ldconfig -r .
fi
;;
esac

10
srcpkgs/glibc32/REMOVE Normal file
View file

@ -0,0 +1,10 @@
#
# This script removes ld.so glibc32 generated files.
#
case "${ACTION}" in
post)
if [ -f etc/ld.so.conf.d/glibc32.conf ]; then
rm -f etc/ld.so.conf.d/glibc32.conf
fi
;;
esac

View file

@ -1,20 +1,11 @@
# Template file for 'glibc32'
pkgname=glibc32
version=2.8
wrksrc="libc"
distfiles="ftp://ftp.archlinux.org/other/glibc/glibc-2.8_20080828.tar.bz2"
build_style=gnu_configure
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 --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"
version=2.11_2
distfiles="http://xbps.nopcode.org/repos/stable/i686/glibc-${version}.i686.xbps"
build_style=custom-install
short_desc="The GNU C library (32 bits)"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum=f5756668f201e093cae0404e59dcf8c43ccc07757fd0a7455298ed89126c366a
checksum=57e3be723f12626479e54451f56460335ccbca8a1270c92638b4e423502deeb1
long_desc="
The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system. It provides the
@ -24,62 +15,21 @@ long_desc="
This package installs the 32 bit libraries for x86_64 systems."
# This package doesn't make sense on 32bit systems.
nostrip=yes
noextract=yes
noverifyrdeps=yes
only_for_archs=x86_64
cross_compiler=yes
build_depends="perl-5.10.0"
pre_configure()
Add_dependency build libarchive-devel
do_install()
{
# We must configure it in another directory.
mkdir -p $wrksrc/build_obj && cd $wrksrc/build_obj
wrksrc=$wrksrc/build_obj
echo "slibdir=/lib32" > $wrksrc/configparms
echo "CFLAGS+=-march=${XBPS_CROSS_TARGET%%-*} -mtune=generic" \
>> $wrksrc/configparms
echo "libc_cv_forced_unwind=yes" > config.cache
echo "libc_cv_c_cleanup=yes" >> config.cache
}
pre_install()
{
# Pre-create /lib32 and /usr/lib32 directories.
for f in lib32 usr/lib32; do
[ ! -d $XBPS_MASTERDIR/$f ] && mkdir -p $XBPS_MASTERDIR/$f
done
}
post_install()
{
local tmpdir=$XBPS_BUILDDIR/$pkgname-tmp
mkdir -p $tmpdir/usr/include/gnu
mkdir -p $tmpdir/usr/include/sys
# Remove all headers except the ones required for 32bits stuff.
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/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
# 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/usr/share $DESTDIR/usr/libexec $DESTDIR/etc
mv -v $DESTDIR/usr/lib/* $DESTDIR/usr/lib32/
rmdir $DESTDIR/usr/lib
cd $DESTDIR/lib && ln -s ../lib32/ld-linux.so.2 .
# Add /lib32 and /usr/lib32 into ld.so.conf.
echo "/lib32" >> $XBPS_MASTERDIR/etc/ld.so.conf
echo "/usr/lib32" >> $XBPS_MASTERDIR/etc/ld.so.conf
rm -rf $tmpdir
wrksrc=$XBPS_BUILDDIR/libc
local srcfile="${XBPS_SRCDISTDIR}/$(basename ${distfiles})"
bsdtar xf ${srcfile} -C ${wrksrc} || return 1
install -d ${DESTDIR}/lib32 ${DESTDIR}/usr/lib32/gconv
cp -a ${wrksrc}/lib/*.so* ${DESTDIR}/lib32
cp -a ${wrksrc}/usr/lib/gconv/* ${DESTDIR}/usr/lib32/gconv
install -d ${DESTDIR}/lib
cd ${DESTDIR}/lib && ln -sf ../lib32/ld-${version}.so ld-linux.so.2
}