2012-02-28 11:02:28 +00:00
|
|
|
# Template file for 'chroot-binutils'
|
|
|
|
pkgname=chroot-binutils
|
2013-05-10 07:48:01 +00:00
|
|
|
version=2.23.52.0.2
|
2013-05-26 04:27:16 +00:00
|
|
|
revision=2
|
2012-06-12 08:43:35 +00:00
|
|
|
wrksrc="binutils-${version}"
|
2012-02-28 11:02:28 +00:00
|
|
|
short_desc="GNU binary utilities -- for xbps-src use"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
homepage="http://www.gnu.org/software/binutils/"
|
|
|
|
license="GPL-3"
|
2012-06-12 08:43:35 +00:00
|
|
|
distfiles="${KERNEL_SITE}/devel/binutils/binutils-$version.tar.xz"
|
2013-05-10 07:48:01 +00:00
|
|
|
checksum=c2229d5d4067c782b67cfaf7f049acd8361407c0870991bc5430be5c548f6825
|
2012-02-28 11:02:28 +00:00
|
|
|
|
2013-03-24 09:21:58 +00:00
|
|
|
if [ "$IN_CHROOT" ]; then
|
|
|
|
hostmakedepends="flex perl"
|
2012-06-12 08:43:35 +00:00
|
|
|
fi
|
2013-03-24 09:21:58 +00:00
|
|
|
makedepends="zlib-devel"
|
2012-10-25 05:04:51 +00:00
|
|
|
bootstrap=yes
|
|
|
|
|
2012-06-12 08:43:35 +00:00
|
|
|
do_configure() {
|
2013-03-24 09:21:58 +00:00
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
2013-02-02 17:00:39 +00:00
|
|
|
CONFIGFLAG="--enable-64-bit-bfd --enable-multilib"
|
|
|
|
fi
|
2013-05-26 04:27:16 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
2013-05-26 08:41:55 +00:00
|
|
|
# Do not use configure_args nor build_style=gnu-configure,
|
2013-05-26 04:27:16 +00:00
|
|
|
# avoiding --with-sysroot to $XBPS_CROSS_BASE.
|
|
|
|
CONFIGFLAG="--host=$XBPS_CROSS_TRIPLET --with-build-sysroot=$XBPS_CROSS_BASE"
|
|
|
|
fi
|
|
|
|
./configure --prefix=/usr --disable-shared \
|
2013-02-02 17:00:39 +00:00
|
|
|
--enable-threads --disable-plugins \
|
|
|
|
--with-mmap --disable-bootstrap ${CONFIGFLAG}
|
2012-06-12 08:43:35 +00:00
|
|
|
}
|
2012-02-28 11:02:28 +00:00
|
|
|
|
2012-06-12 08:43:35 +00:00
|
|
|
do_build() {
|
2013-02-02 17:00:39 +00:00
|
|
|
make ${makejobs}
|
2012-06-12 08:43:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2013-03-24 09:21:58 +00:00
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
2012-02-28 11:02:28 +00:00
|
|
|
mkdir -p ${DESTDIR}/usr/lib
|
2013-05-10 07:48:01 +00:00
|
|
|
cd ${DESTDIR}/usr
|
|
|
|
ln -s lib lib64
|
|
|
|
cd ${wrksrc}
|
2012-02-28 11:02:28 +00:00
|
|
|
fi
|
|
|
|
|
2012-06-12 08:43:35 +00:00
|
|
|
make DESTDIR=${DESTDIR} tooldir=/usr install
|
|
|
|
|
2012-02-28 11:02:28 +00:00
|
|
|
[ -h ${DESTDIR}/usr/lib64 ] && rm -f ${DESTDIR}/usr/lib64
|
|
|
|
rm -f ${DESTDIR}/usr/lib/*.a
|
|
|
|
rm -rf ${DESTDIR}/usr/share ${DESTDIR}/usr/include
|
|
|
|
}
|
2013-04-12 06:55:23 +00:00
|
|
|
|
|
|
|
chroot-binutils_package() {
|
2013-05-10 07:48:01 +00:00
|
|
|
provides="binutils-${version}"
|
2013-04-12 06:55:23 +00:00
|
|
|
conflicts="binutils>=0"
|
|
|
|
noverifyrdeps=yes
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr
|
|
|
|
}
|
|
|
|
}
|