binutils: prepare to be a bootstrap pkg; supersedes chroot-binutils.

This commit is contained in:
Juan RP 2013-10-23 10:33:46 +02:00
parent 819bbdd0c9
commit f0246d3cc5

View file

@ -1,9 +1,7 @@
# Template file for 'binutils' # Template file for 'binutils'
pkgname=binutils pkgname=binutils
version=2.23.52.0.2 version=2.23.52.0.2
revision=3 revision=4
hostmakedepends="flex perl"
makedepends="zlib-devel"
short_desc="GNU binary utilities" short_desc="GNU binary utilities"
maintainer="Juan RP <xtraeme@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.gnu.org/software/binutils/" homepage="http://www.gnu.org/software/binutils/"
@ -11,10 +9,23 @@ license="GPL-3"
distfiles="${KERNEL_SITE}/devel/binutils/$pkgname-$version.tar.xz" distfiles="${KERNEL_SITE}/devel/binutils/$pkgname-$version.tar.xz"
checksum=c2229d5d4067c782b67cfaf7f049acd8361407c0870991bc5430be5c548f6825 checksum=c2229d5d4067c782b67cfaf7f049acd8361407c0870991bc5430be5c548f6825
bootstrap=yes
if [ "$CHROOT_READY" ]; then
hostmakedepends="flex perl"
fi
makedepends="zlib-devel"
if [ "$CROSS_BUILD" ]; then if [ "$CROSS_BUILD" ]; then
makedepends+=" libfl-devel" makedepends+=" libfl-devel"
fi fi
pre_configure() {
# Drop bashism!
sed -e 's,source,\.,g' -i ld/scripttempl/elf.sc
}
do_configure() { do_configure() {
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
CONFIGFLAG="--enable-64-bit-bfd --enable-multilib" CONFIGFLAG="--enable-64-bit-bfd --enable-multilib"
@ -93,10 +104,6 @@ do_install() {
mv ${DESTDIR}/usr/lib32/* ${DESTDIR}/usr/lib mv ${DESTDIR}/usr/lib32/* ${DESTDIR}/usr/lib
rmdir ${DESTDIR}/usr/lib32 rmdir ${DESTDIR}/usr/lib32
fi fi
# Remove the requirement of PACKAGE{,_VERSION} to be defined
# from bfd.h... wth?
sed -i 35,+3d ${DESTDIR}/usr/include/bfd.h
} }
binutils-devel_package() { binutils-devel_package() {
@ -112,6 +119,6 @@ binutils-devel_package() {
binutils_package() { binutils_package() {
pkg_install() { pkg_install() {
vmove usr vmove all
} }
} }