Change autoconf pkgs to configure it with /usr or /.
This depends if a package uses $base_package, by default not set, means the package will be installed into masterdir/usr, if set will be installed into masterdir directly. While here fixup binutils, gcc and glibc! I'm approaching to the point on where I'll be able to chroot into masterdir and having working pkgs installed. --HG-- extra : convert_revision : be3c3e0d7368e7a1e1ef1c9add932aeeab82688d
This commit is contained in:
parent
680c82f965
commit
28a5a070c1
6 changed files with 70 additions and 48 deletions
|
@ -4,6 +4,8 @@ version=2.18
|
|||
distfiles="http://ftp.gnu.org/gnu/binutils/$pkgname-$version@.tar.bz2"
|
||||
build_style=gnu_configure
|
||||
configure_args="--disable-werror --enable-shared --disable-multilib"
|
||||
make_install_target="tooldir=$XBPS_DESTDIR/$pkgname-$version
|
||||
install prefix=$XBPS_DESTDIR/$pkgname-$version"
|
||||
short_desc="GNU binary utilities"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
checksum=487a33a452f0edcf1f8bb8fc23dff5c7a82edec3f3f8b65632b6c945e961ee9b
|
||||
|
|
|
@ -4,10 +4,11 @@ version=4.3.2
|
|||
distfiles="
|
||||
http://ftp.gnu.org/pub/gnu/gcc/$pkgname-$version/$pkgname-$version@.tar.bz2"
|
||||
build_style=gnu_configure
|
||||
configure_args="--enable-clocale=gnu --disable-libstdcxx-pch
|
||||
configure_args="--enable-clocale=gnu --disable-bootstrap
|
||||
--enable-threads=posix --enable-__cxa_atexit --disable-multilib
|
||||
--enable-languages=c,c++,fortran,objc,obj-c++
|
||||
--with-mpfr=$XBPS_MASTERDIR --with-gmp=$XBPS_MASTERDIR"
|
||||
--enable-languages=c,c++,objc,obj-c++
|
||||
--with-local-prefix=$XBPS_DESTDIR/$pkgname-$version
|
||||
--with-mpfr=$XBPS_MASTERDIR/usr --with-gmp=$XBPS_MASTERDIR/usr"
|
||||
short_desc="The GNU C Compiler suite"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
checksum=bfbf487731ad5dca37efe480a837417de071bd67e685d5c1df6a290707575165
|
||||
|
|
5
templates/glibc-runstuff-after-install.sh
Normal file
5
templates/glibc-runstuff-after-install.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#
|
||||
# Rebuild dynamic linker's cache after building glibc.
|
||||
#
|
||||
$XBPS_DESTDIR/$pkgname-$version/sbin/ldconfig -C $XBPS_SYSCONFDIR/ld.so.cache
|
||||
$XBPS_DESTDIR/$pkgname-$version/sbin/ldconfig
|
3
templates/glibc-runstuff-before-install.sh
Normal file
3
templates/glibc-runstuff-before-install.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Create $XBPS_SYSCONFDIR/ld.conf
|
||||
#
|
||||
$touch_cmd $XBPS_SYSCONFDIR/ld.so.conf
|
|
@ -4,14 +4,12 @@ version=2.8
|
|||
wrksrc="libc"
|
||||
distfiles="ftp://ftp.archlinux.org/other/glibc/$pkgname-2.8_20080828@.tar.bz2"
|
||||
build_style=gnu_configure
|
||||
unset LD_LIBRARY_PATH
|
||||
disable_ldflags=yes
|
||||
configure_script="$env_cmd CC=$XBPS_MASTERDIR/bin/gcc
|
||||
CXX=$XBPS_MASTERDIR/bin/g++ CPP=$XBPS_MASTERDIR/bin/cpp
|
||||
LD=$XBPS_MASTERDIR/bin/ld AS=$XBPS_MASTERDIR/bin/as ../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"
|
||||
--without-cvs --without-selinux --prefix=/usr"
|
||||
make_install_target="install_root=$XBPS_DESTDIR/$pkgname-$version install
|
||||
localedata/install-locales"
|
||||
short_desc="The GNU C library"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
checksum=f5756668f201e093cae0404e59dcf8c43ccc07757fd0a7455298ed89126c366a
|
||||
|
@ -22,4 +20,5 @@ 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
|
||||
build_depends="gcc-4.3.2"
|
||||
|
|
82
xbps.sh
82
xbps.sh
|
@ -269,7 +269,7 @@ reset_tmpl_vars()
|
|||
run_stuff_before_install_cmd run_stuff_after_install_cmd \
|
||||
make_install_target postinstall_helpers version \
|
||||
ignore_files tar_override_cmd xml_entries sgml_entries \
|
||||
make_install_prefix build_depends disable_ldflags \
|
||||
build_depends \
|
||||
XBPS_EXTRACT_DONE XBPS_CONFIGURE_DONE \
|
||||
XBPS_BUILD_DONE XBPS_INSTALL_DONE"
|
||||
|
||||
|
@ -332,7 +332,9 @@ prepare_tmpl()
|
|||
XBPS_BUILD_DONE="$wrksrc/.xbps_build_done"
|
||||
XBPS_INSTALL_DONE="$wrksrc/.xbps_install_done"
|
||||
|
||||
export PATH="$XBPS_MASTERDIR/bin:$XBPS_MASTERDIR/sbin:/bin:/sbin:/usr/bin:/usr/sbin"
|
||||
export PATH="$XBPS_MASTERDIR/bin:$XBPS_MASTERDIR/sbin"
|
||||
export PATH="$PATH:$XBPS_MASTERDIR/usr/bin:$XBPS_MASTERDIR/usr/sbin"
|
||||
export PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin"
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -582,42 +584,38 @@ fixup_tmpl_libtool()
|
|||
# we use the master directory while relinking, all will be fine
|
||||
# once the package is stowned.
|
||||
#
|
||||
if [ -f $wrksrc/ltmain.sh ]; then
|
||||
if [ -f $wrksrc/ltmain.sh -a -f $wrksrc/libtool ]; then
|
||||
$rm_cmd -f $wrksrc/libtool
|
||||
$ln_cmd -s $XBPS_MASTERDIR/bin/libtool $wrksrc/libtool
|
||||
$ln_cmd -s $XBPS_MASTERDIR/usr/bin/libtool $wrksrc/libtool
|
||||
fi
|
||||
|
||||
for f in $($find_cmd $wrksrc -type f -name libtool); do
|
||||
if [ -f $f ]; then
|
||||
$rm_cmd -f $f
|
||||
$ln_cmd -s $XBPS_MASTERDIR/bin/libtool $f
|
||||
$ln_cmd -s $XBPS_MASTERDIR/usr/bin/libtool $f
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
set_build_vars()
|
||||
{
|
||||
if [ -z "$disable_ldflags" ]; then
|
||||
LDFLAGS="-L$XBPS_MASTERDIR/lib -Wl,-R$XBPS_MASTERDIR/lib $LDFLAGS"
|
||||
LDFLAGS="-L$XBPS_DESTDIR/$pkgname-$version/lib $LDFLAGS"
|
||||
fi
|
||||
|
||||
SAVE_LDLIBPATH=$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH="$XBPS_MASTERDIR/usr/lib"
|
||||
LDFLAGS="-L$XBPS_MASTERDIR/usr/lib"
|
||||
CFLAGS="$CFLAGS $XBPS_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $XBPS_CXXFLAGS"
|
||||
CPPFLAGS="-I$XBPS_MASTERDIR/include $CPPFLAGS"
|
||||
PKG_CONFIG="$XBPS_MASTERDIR/bin/pkg-config"
|
||||
CPPFLAGS="-I$XBPS_MASTERDIR/usr/include $CPPFLAGS"
|
||||
PKG_CONFIG="$XBPS_MASTERDIR/usr/bin/pkg-config"
|
||||
|
||||
if [ -z "$disable_ldflags" ]; then
|
||||
export LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
export CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS"
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
|
||||
export LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS"
|
||||
export CPPFLAGS="$CPPFLAGS" PKG_CONFIG="$PKG_CONFIG"
|
||||
}
|
||||
|
||||
unset_build_vars()
|
||||
{
|
||||
unset LDFLAGS CFLAGS CXXFLAGS CPPFLAGS PKG_CONFIG
|
||||
unset LDFLAGS CFLAGS CXXFLAGS CPPFLAGS PKG_CONFIG LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=$SAVE_LDLIBPATH
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -709,19 +707,22 @@ configure_src_phase()
|
|||
|
||||
[ -z "$configure_script" ] && configure_script="./configure"
|
||||
|
||||
local _prefix=
|
||||
if [ -z "$base_package" ]; then
|
||||
_prefix=/usr
|
||||
else
|
||||
_prefix=/
|
||||
fi
|
||||
|
||||
#
|
||||
# Packages using GNU autoconf
|
||||
#
|
||||
if [ "$build_style" = "gnu_configure" ]; then
|
||||
cd $wrksrc || exit 1
|
||||
#
|
||||
# Pass consistent arguments to not have unexpected
|
||||
# surprises later.
|
||||
#
|
||||
${configure_script} \
|
||||
--prefix="$XBPS_MASTERDIR" \
|
||||
--mandir="$XBPS_DESTDIR/$pkgname-$version/man" \
|
||||
--infodir="$XBPS_DESTDIR/$pkgname-$version/share/info" \
|
||||
--prefix=${_prefix} \
|
||||
--infodir=$XBPS_DESTDIR/$pkgname-$version/share/info \
|
||||
--mandir=$XBPS_DESTDIR/$pkgname-$version/share/man \
|
||||
--sysconfdir="$XBPS_SYSCONFDIR" \
|
||||
${configure_args}
|
||||
|
||||
|
@ -852,7 +853,10 @@ install_src_phase()
|
|||
|
||||
[ -z $pkg ] && [ -z $pkgname ] && return 1
|
||||
|
||||
[ -z "$make_install_target" ] && make_install_target=install
|
||||
if [ -z "$make_install_target" ]; then
|
||||
make_install_target="install prefix=$XBPS_DESTDIR/$pkgname-$version"
|
||||
fi
|
||||
|
||||
[ -z "$make_cmd" ] && make_cmd=/usr/bin/make
|
||||
|
||||
#
|
||||
|
@ -869,14 +873,10 @@ install_src_phase()
|
|||
|
||||
echo "=> Running install phase for: $pkgname-$version."
|
||||
|
||||
[ -z "$make_install_prefix" ] && \
|
||||
make_install_prefix="prefix=$XBPS_DESTDIR/$pkgname-$version"
|
||||
|
||||
#
|
||||
# Install package via make.
|
||||
#
|
||||
${make_cmd} ${make_install_target} ${make_install_args} \
|
||||
${make_install_prefix}
|
||||
${make_cmd} ${make_install_target} ${make_install_args}
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "*** ERROR installing $pkgname-$version ***"
|
||||
exit 1
|
||||
|
@ -1400,10 +1400,15 @@ stow_pkg()
|
|||
xstow_ignore_files="$xstow_ignore_files $ignore_files"
|
||||
fi
|
||||
|
||||
if [ -z "$base_package" ]; then
|
||||
local pkg_masterdir=$XBPS_MASTERDIR/usr
|
||||
[ ! -d $pkg_masterdir ] && $mkdir_cmd -p $pkg_masterdir
|
||||
else
|
||||
local pkg_masterdir=$XBPS_MASTERDIR
|
||||
fi
|
||||
|
||||
$XBPS_XSTOW_CMD -ignore "${xstow_ignore_files}" ${xstow_args} \
|
||||
-pd-targets $XBPS_MASTERDIR \
|
||||
-dir $XBPS_DESTDIR -target $XBPS_MASTERDIR \
|
||||
$XBPS_DESTDIR/$pkg
|
||||
-dir $XBPS_DESTDIR -target $pkg_masterdir $XBPS_DESTDIR/$pkg
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "*** ERROR: couldn't create symlinks for $pkg ***"
|
||||
exit 1
|
||||
|
@ -1461,7 +1466,14 @@ unstow_pkg()
|
|||
xstow_ignore_files="$xstow_ignore_files $ignore_files"
|
||||
fi
|
||||
|
||||
$XBPS_XSTOW_CMD -dir $XBPS_DESTDIR -target $XBPS_MASTERDIR \
|
||||
if [ -z "$base_package" ]; then
|
||||
local pkg_masterdir=$XBPS_MASTERDIR/usr
|
||||
[ ! -d $pkg_masterdir ] && $mkdir_cmd -p $pkg_masterdir
|
||||
else
|
||||
local pkg_masterdir=$XBPS_MASTERDIR
|
||||
fi
|
||||
|
||||
$XBPS_XSTOW_CMD -dir $XBPS_DESTDIR -target $pkg_masterdir \
|
||||
-D -i-file-in-dir share/info/dir -ignore \
|
||||
"${xstow_ignore_files}" $XBPS_DESTDIR/$pkgname-$version
|
||||
if [ $? -ne 0 ]; then
|
||||
|
|
Loading…
Reference in a new issue