[arch-commits] Commit in binutils/trunk (PKGBUILD binutils.install)

Allan McRae allan at archlinux.org
Wed Apr 22 08:40:20 EDT 2009


    Date: Wednesday, April 22, 2009 @ 08:40:20
  Author: allan
Revision: 36435

upgpkg: binutils 2.19.1-2
    gcc-4.4 toolchain rebuild, update cvs snapshot, remove texinfo dep through install script, add upstream patch to improve as-needed usage, add linker scripts for libbfd.so and libopcodes.so, compress info pages

Modified:
  binutils/trunk/PKGBUILD
  binutils/trunk/binutils.install

------------------+
 PKGBUILD         |   41 ++++++++++++++++++++++++-----------------
 binutils.install |    6 ++++--
 2 files changed, 28 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-04-22 12:29:56 UTC (rev 36434)
+++ PKGBUILD	2009-04-22 12:40:20 UTC (rev 36435)
@@ -1,35 +1,39 @@
 # $Id$
-# Maintainer: Andreas Radke <andyrtr at archlinux.org>
+# Maintainer: Allan McRae <allan at archlinux.org>
 
 # toolchain build order: kernel-headers->glibc->binutils->gcc-libs->gcc->binutils->glibc
 
 pkgname=binutils
 pkgver=2.19.1
-pkgrel=1
-_date=20090205
+pkgrel=2
+_date=20090419
 pkgdesc="A set of programs to assemble and manipulate binary and object files"
 arch=('i686' 'x86_64')
 url="http://www.gnu.org/software/binutils/"
 license=('GPL')
 groups=('base')
+depends=('glibc>=2.9-5' 'zlib')
 options=('!libtool' '!distcc' '!ccache')
-depends=('glibc>=2.9-4' 'texinfo>=4.13a-3' 'zlib')
-source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2)
-md5sums=('8fd8a7082814124917289eba9f2b46f1')
 install=binutils.install
+source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2
+        binutils-2.19-as-needed.patch)
+md5sums=('18db08329c4a1a22ec57ea4c0d7440a6'
+         'f6fd22284040a0b05e74ed2ff504a6d9')
 
 build() {
   # for cvs checkout
-  mkdir ${startdir}/src/${pkgname}-${_date}
-  cd ${startdir}/src/${pkgname}-${_date}
+  mkdir ${srcdir}/${pkgname}-${_date}
+  cd ${srcdir}/${pkgname}-${_date}
   export _TAG=binutils-2_19-branch
   export 'CVSROOT=:pserver:anoncvs at sourceware.org:/cvs/src'
 #  cvs -z9 co -r $_TAG binutils || return 1
-#  cd src && tar -cvjf ../../../binutils-{pkgver}_${_date}.tar.bz2 *
+#  cd src && tar -cvjf ${startdir}/binutils-${pkgver}_${_date}.tar.bz2 *
 #  return 1
 
-  cd ${startdir}/src
+  cd ${srcdir}
 
+  patch -Np1 -i binutils-2.19-as-needed.patch
+
   mkdir build
   cd build
 
@@ -47,26 +51,29 @@
   # 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
+  make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install
+  install -m644 ${srcdir}/include/libiberty.h ${pkgdir}/usr/include
 
   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
+    install -m644 libiberty/libiberty.a ${pkgdir}/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
+    install -m644 bfd/libbfd.a ${pkgdir}/usr/lib
   fi
 
-  rm -f ${startdir}/pkg/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
+  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/lib/lib{bfd,opcodes}.so
+  echo "INPUT (libbfd.a -liberty -lz )" >${pkgdir}/usr/lib/libbfd.so
+  echo "INPUT ( %{_libdir}/libopcodes.a -lbfd )" >${pkgdir}/usr/lib/libopcodes.so
 
   rm -f ${pkgdir}/usr/share/info/dir
+  gzip -9 ${pkgdir}/usr/share/info/*
 }

Modified: binutils.install
===================================================================
--- binutils.install	2009-04-22 12:29:56 UTC (rev 36434)
+++ binutils.install	2009-04-22 12:40:20 UTC (rev 36435)
@@ -2,8 +2,9 @@
 filelist=(as.info bfd.info binutils.info configure.info gprof.info ld.info standards.info)
 
 post_install() {
+  [ -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
 }
 
@@ -12,8 +13,9 @@
 }
 
 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
 }
 



More information about the arch-commits mailing list