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
1 changed files with 15 additions and 8 deletions

View File

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