PKGBUILD 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Maintainer: André Silva <emulatorman@hyperbola.info>
  2. # Maintainer: Márcio Silva <coadde@hyperbola.info>
  3. # Contributor: Luke R. <g4jc@hyperbola.info>
  4. # Contributor: Tobias Dausend <throgh@hyperbola.info>
  5. # Based on binutils package
  6. _ctarget=i686-unknown-hyperbolabsd
  7. pkgname=$_ctarget-binutils
  8. pkgver=2.34
  9. pkgrel=7
  10. pkgdesc="A set of programs to assemble and manipulate binary and object files for HyperbolaBSD i686 target"
  11. arch=('i686' 'x86_64')
  12. url="https://www.gnu.org/software/binutils/"
  13. license=('GPL-3' 'LGPL-3')
  14. groups=('cross-devel')
  15. depends=('zlib')
  16. checkdepends=('dejagnu' 'bc')
  17. options=('staticlibs' '!distcc' '!ccache')
  18. source=(https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.lz{,.sig}
  19. binutils-hyperbolabsd.patch)
  20. validpgpkeys=('3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F') # Nick Clifton <nickc@redhat.com>
  21. sha512sums=('f4aadea1afa85d9ceb7be377afab9270a42ab0fd1fae86a7c69510b80de1aaac76f15cfb8730f9d233466a89fd020ab7e6e705e754c6b40f5fe2d16a5214562e'
  22. 'SKIP'
  23. '92da2fe67434caa03e568ca590720d149e05fd642e6b0009e87f344c03c635de3a7da50b48d8e7d0644390762563001246fc52499b86e19e2d8d05ee4c88592c')
  24. prepare() {
  25. cd binutils-$pkgver
  26. # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
  27. sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
  28. # HyperbolaBSD patch
  29. patch -p1 -i ${srcdir}/binutils-hyperbolabsd.patch
  30. mkdir ${srcdir}/binutils-build
  31. }
  32. build() {
  33. cd binutils-build
  34. ../binutils-$pkgver/configure \
  35. --prefix=/usr \
  36. --libdir=/usr/$_ctarget/lib \
  37. --with-lib-path=/lib:/usr/lib:/usr/local/lib \
  38. --with-bugurl=https://issues.hyperbola.info/ \
  39. --enable-threads \
  40. --enable-ld=default \
  41. --enable-gold \
  42. --enable-plugins \
  43. --enable-deterministic-archives \
  44. --with-pic \
  45. --disable-werror \
  46. --disable-gdb \
  47. --disable-nls \
  48. --target=$_ctarget
  49. # check the host environment and makes sure all the necessary tools are available
  50. make configure-host
  51. make
  52. }
  53. check() {
  54. cd binutils-build
  55. # unset LDFLAGS as testsuite makes assumptions about which ones are active
  56. # ignore failures in gold testsuite...
  57. make -k LDFLAGS="" check || true
  58. }
  59. package() {
  60. cd binutils-build
  61. make prefix=${pkgdir}/usr libdir=${pkgdir}/usr/$_ctarget/lib install
  62. # Remove info documents that conflict with host version
  63. rm -rf ${pkgdir}/usr/share/info
  64. # install license files
  65. install -dm755 ${pkgdir}/usr/share/licenses/${pkgname}
  66. install -m644 ${srcdir}/binutils-$pkgver/COPYING3{,.LIB} ${pkgdir}/usr/share/licenses/${pkgname}
  67. }