diff options
Diffstat (limited to 'abs/core/binutils')
-rw-r--r-- | abs/core/binutils/PKGBUILD | 88 | ||||
-rw-r--r-- | abs/core/binutils/binutils.install | 13 |
2 files changed, 51 insertions, 50 deletions
diff --git a/abs/core/binutils/PKGBUILD b/abs/core/binutils/PKGBUILD index 9a8b925..0ec1438 100644 --- a/abs/core/binutils/PKGBUILD +++ b/abs/core/binutils/PKGBUILD @@ -1,70 +1,74 @@ -# $Id: PKGBUILD 19325 2008-11-20 11:47:00Z andyrtr $ -# Maintainer: Andreas Radke <andyrtr@archlinux.org> +# $Id: PKGBUILD 80784 2010-05-22 08:05:08Z allan $ +# Maintainer: Allan McRae <allan@archlinux.org> -# toolchain build order: kernel-headers->glibc->binutils->gcc-libs->gcc->binutils->glibc +# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc pkgname=binutils -pkgver=2.19 -pkgrel=1 -_date=20081119 +pkgver=2.20.1 +pkgrel=3 +_date=20100521 pkgdesc="A set of programs to assemble and manipulate binary and object files" arch=('i686' 'x86_64') -url="http://sources.redhat.com/binutils" +url="http://www.gnu.org/software/binutils/" license=('GPL') groups=('base') +depends=('glibc>=2.12-1' 'zlib') options=('!libtool' '!distcc' '!ccache') -depends=('glibc>=2.9-1' 'texinfo>=4.12-3') -source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2) -md5sums=('4a49694b08ef0e5931dba4813326d062') install=binutils.install +source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2) +md5sums=('67053ffd8582e646e171fccd55b2f0f6') -build() { - # for cvs checkout -# mkdir ${startdir}/src/${pkgname}-${_date} -# cd ${startdir}/src/${pkgname}-${_date} -# export _TAG=binutils-2_19-branch -# export 'CVSROOT=:pserver:anoncvs@sourceware.org:/cvs/src' -# cvs -z9 co -r $_TAG binutils || return 1 -# cd src && tar -cvjf ../../../binutils-2.19_${_date}.tar.bz2 * -# return 1 - - cd ${startdir}/src +mksource() { + mkdir ${pkgname}-${_date} + cd ${pkgname}-${_date} + export _TAG=binutils-2_20-branch + export 'CVSROOT=:pserver:anoncvs@sourceware.org:/cvs/src' + cvs -z9 co -r $_TAG binutils || return 1 + cd src && tar -cvjf ../../binutils-${pkgver}_${_date}.tar.bz2 * +} - mkdir build - cd build +build() { + cd ${srcdir} + mkdir build && cd build CC="gcc -L`pwd`/bfd/.libs/" if [ "${CARCH}" = "x86_64" ]; then - ../configure --prefix=/usr --infodir=/usr/share/info --enable-shared --enable-64-bit-bfd --disable-multilib + ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-64-bit-bfd --disable-multilib else - ../configure --prefix=/usr --infodir=/usr/share/info --enable-shared + ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared fi + # fix man files install path + sed -i -e "s:mandir \= \/usr\/share:mandir \= ${pkgdir}\/usr\/share:" ${srcdir}/build/Makefile || return 1 # fix info files install path sed -i -e "s:infodir \= \/usr\/share:infodir \= ${pkgdir}\/usr\/share:" ${srcdir}/build/Makefile || return 1 # This checks the host environment and makes sure all the necessary tools are available to compile Binutils. make configure-host || return 1 - make tooldir=${startdir}/pkg/usr || return 1 - make prefix=${startdir}/pkg/usr tooldir=${startdir}/pkg/usr install - install -m 644 ../include/libiberty.h ${startdir}/pkg/usr/include + make tooldir=${pkgdir}/usr || return 1 +} - if [ "${CARCH}" = "x86_64" ]; then - # Rebuild libiberty.a with -fPIC - make -C libiberty clean - make CFLAGS="$CFLAGS -fPIC" -C libiberty - install -m 644 libiberty/libiberty.a ${startdir}/pkg/usr/lib - # Rebuild libbfd.a with -fPIC - make -C bfd clean - make CFLAGS="$CFLAGS -fPIC" -C bfd - install -m 644 bfd/libbfd.a ${startdir}/pkg/usr/lib - fi +package() { + cd ${srcdir}/build + make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install + install -m644 ${srcdir}/include/libiberty.h ${pkgdir}/usr/include - rm -f ${startdir}/pkg/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}* + # Rebuild libiberty.a with -fPIC + make -C libiberty clean + make CFLAGS="$CFLAGS -fPIC" -C libiberty + install -m644 libiberty/libiberty.a ${pkgdir}/usr/lib + + # Rebuild libbfd.a with -fPIC + make -C bfd clean + # hidden visability prevent 3rd party shared libraries exporting bfd non-stable API + make CFLAGS="$CFLAGS -fPIC -fvisibility=hidden" -C bfd + install -m644 bfd/libbfd.a ${pkgdir}/usr/lib + + rm -f ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}* # Remove these symlinks, with binutils prereleases they are not ABI stable. # Programs should compile static to the .a file. - rm -f ${startdir}/pkg/usr/lib/lib{bfd,opcodes}.so - - rm -f ${pkgdir}/usr/share/info/dir + rm -f ${pkgdir}/usr/lib/lib{bfd,opcodes}.so + echo "INPUT ( /usr/lib/libbfd.a -liberty -lz )" >${pkgdir}/usr/lib/libbfd.so + echo "INPUT ( /usr/lib/libopcodes.a -lbfd )" >${pkgdir}/usr/lib/libopcodes.so } diff --git a/abs/core/binutils/binutils.install b/abs/core/binutils/binutils.install index a1e762a..51781e7 100644 --- a/abs/core/binutils/binutils.install +++ b/abs/core/binutils/binutils.install @@ -1,20 +1,17 @@ infodir=/usr/share/info filelist=(as.info bfd.info binutils.info configure.info gprof.info ld.info standards.info) -post_install() { +post_upgrade() { + [ -x usr/bin/install-info ] || return 0 for file in ${filelist[@]}; do - install-info $infodir/$file $infodir/dir 2> /dev/null + install-info $infodir/$file.gz $infodir/dir 2> /dev/null done } -post_upgrade() { - post_install $1 -} - pre_remove() { + [ -x usr/bin/install-info ] || return 0 for file in ${filelist[@]}; do - install-info --delete $infodir/$file $infodir/dir 2> /dev/null + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null done } -# vim:set ts=2 sw=2 et: |