2010-11-12 06:49:29 +08:00
|
|
|
#
|
|
|
|
# Core Packages for Chakra, part of chakra-project.org
|
|
|
|
#
|
|
|
|
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
|
|
|
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
|
2010-04-04 22:20:41 +08:00
|
|
|
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
|
2010-03-13 23:25:19 +08:00
|
|
|
|
|
|
|
pkgname=binutils
|
2012-01-10 05:25:47 +08:00
|
|
|
pkgver=2.22
|
2011-04-12 02:22:13 +08:00
|
|
|
pkgrel=1
|
2012-01-10 05:25:47 +08:00
|
|
|
_date=20120109
|
|
|
|
pkgdesc="A set of programs to assemble and manipulate binary and object files."
|
2010-03-13 23:25:19 +08:00
|
|
|
arch=('i686' 'x86_64')
|
|
|
|
url="http://www.gnu.org/software/binutils/"
|
|
|
|
license=('GPL')
|
|
|
|
groups=('base')
|
2012-04-20 06:45:58 +08:00
|
|
|
depends=('glibc>=2.15' 'zlib')
|
2011-10-08 08:02:42 +08:00
|
|
|
checkdepends=('dejagnu')
|
|
|
|
options=('!libtool' '!distcc' '!ccache')
|
2012-01-10 05:25:47 +08:00
|
|
|
install="binutils.install"
|
|
|
|
source=("http://chakra.sourceforge.net/sources/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2")
|
|
|
|
md5sums=('d6df201cbf66394defc603e1318061fd')
|
2010-03-13 23:25:19 +08:00
|
|
|
|
|
|
|
mksource() {
|
2012-01-10 05:25:47 +08:00
|
|
|
export _TAG="binutils-2_22-branch"
|
|
|
|
export CVSROOT=":pserver:anoncvs@sourceware.org:/cvs/src"
|
|
|
|
|
|
|
|
mkdir -p "${pkgname}-${_date}"
|
|
|
|
pushd "${pkgname}-${_date}" >/dev/null
|
|
|
|
cvs -z9 co -r "${_TAG}" binutils && \
|
|
|
|
mv src binutils && \
|
|
|
|
tar -cvjf "../binutils-${pkgver}_${_date}.tar.bz2" binutils/*
|
|
|
|
popd >/dev/null
|
2010-03-13 23:25:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2012-01-10 05:25:47 +08:00
|
|
|
cd "${srcdir}"
|
|
|
|
mkdir -p binutils-build && cd binutils-build
|
2011-04-12 02:22:13 +08:00
|
|
|
|
2012-01-10 05:25:47 +08:00
|
|
|
[ "${CARCH}" == 'x86_64' ] && CONFIGFLAGS=('--enable-64-bit-bfd' '--disable-multilib')
|
2011-04-12 02:22:13 +08:00
|
|
|
|
2012-01-10 05:25:47 +08:00
|
|
|
"${srcdir}/${pkgname}/configure" \
|
|
|
|
--prefix=/usr \
|
|
|
|
--enable-ld=no \
|
|
|
|
--enable-gold=yes \
|
|
|
|
--enable-lto \
|
|
|
|
--enable-plugins \
|
|
|
|
--enable-threads \
|
|
|
|
--enable-shared \
|
|
|
|
"${CONFIGFLAGS[@]}"
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2011-10-08 08:02:42 +08:00
|
|
|
# check the host environment and makes sure all the necessary tools are available
|
2011-04-12 02:22:13 +08:00
|
|
|
make configure-host
|
|
|
|
|
2012-01-10 05:25:47 +08:00
|
|
|
make tooldir="${pkgdir}/usr"
|
2010-05-16 23:08:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2012-01-10 05:25:47 +08:00
|
|
|
cd "${srcdir}/binutils-build"
|
|
|
|
make prefix="${pkgdir}/usr" tooldir="${pkgdir}/usr" install
|
2011-04-12 02:22:13 +08:00
|
|
|
|
|
|
|
# Remove Windows/Novell specific man pages
|
2012-01-10 05:25:47 +08:00
|
|
|
rm -f "${pkgdir}/usr/share/man/man1"/{dlltool,nlmconv,windres,windmc}*
|
2010-03-13 23:25:19 +08:00
|
|
|
}
|
2012-01-10 05:25:47 +08:00
|
|
|
|