2008-11-03 06:12:53 +00:00
|
|
|
# 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
|
2008-11-17 08:16:31 +00:00
|
|
|
--without-cvs --without-selinux --libdir=/usr/lib32
|
2008-11-03 06:12:53 +00:00
|
|
|
--with-headers=/usr/include --cache-file=config.cache
|
|
|
|
--infodir=/usr/share/info"
|
|
|
|
make_install_target="install_root=$XBPS_DESTDIR/$pkgname-$version install"
|
|
|
|
short_desc="The GNU C library (32 bits)"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
checksum=f5756668f201e093cae0404e59dcf8c43ccc07757fd0a7455298ed89126c366a
|
|
|
|
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
|
|
|
|
system API for all programs written in C and C-compatible languages such
|
|
|
|
as C++ and Objective C; the runtime facilities of other programming
|
|
|
|
languages use the C library to access the underlying operating system.
|
|
|
|
|
2008-11-17 08:16:31 +00:00
|
|
|
This package installs the 32 bit libraries for x86_64 systems."
|
2008-11-03 06:12:53 +00:00
|
|
|
|
2008-11-03 07:38:38 +00:00
|
|
|
# This package doesn't make sense on 32bit systems.
|
|
|
|
only_for_archs=x86_64
|
2008-11-03 06:12:53 +00:00
|
|
|
cross_compiler=yes
|
|
|
|
build_depends="perl-5.10.0"
|
|
|
|
|
|
|
|
pre_configure()
|
|
|
|
{
|
|
|
|
# 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.
|
2009-03-11 05:31:56 +00:00
|
|
|
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
|
2008-11-03 06:12:53 +00:00
|
|
|
|
2009-03-11 05:31:56 +00:00
|
|
|
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
|
2008-11-03 06:12:53 +00:00
|
|
|
|
|
|
|
# Remove bins and unneeded stuff for compat32.
|
2009-03-11 05:31:56 +00:00
|
|
|
[ -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
|
2008-11-03 06:12:53 +00:00
|
|
|
|
2009-03-11 05:31:56 +00:00
|
|
|
cd $DESTDIR/lib && ln -s ../lib32/ld-linux.so.2 .
|
2008-11-21 08:58:43 +00:00
|
|
|
|
|
|
|
# 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
|
2008-11-03 06:12:53 +00:00
|
|
|
|
|
|
|
rm -rf $tmpdir
|
2008-11-17 08:16:31 +00:00
|
|
|
wrksrc=$XBPS_BUILDDIR/libc
|
2008-11-03 06:12:53 +00:00
|
|
|
}
|