PKGBUILD 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Maintainer (arch): Sébastien "Seblu" Luttringer
  2. # Contributor: Allan McRae <allan@archlinux.org>
  3. # Contributor: Eric Belanger <eric@archlinux.org>
  4. # Contributor: John Proctor <jproctor@prium.net>
  5. # Maintainer: Luke Shumaker <lukeshu@parabola.nu>
  6. # Contributor: Márcio Silva <coadde@hyperbola.info>
  7. # Contributor: bill-auger <bill-auger@programmer.net>
  8. _pkgname=pcre
  9. pkgname=pcre-static
  10. pkgver=8.45
  11. pkgrel=1
  12. pkgrel+=.static1
  13. pkgdesc='A library that implements Perl 5-style regular expressions'
  14. pkgdesc+=' (static libraries)'
  15. arch=('x86_64')
  16. arch+=('armv7h' 'i686')
  17. url='https://www.pcre.org/'
  18. license=('BSD3')
  19. depends=("$_pkgname=$pkgver")
  20. options=('staticlibs')
  21. validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') # Philip Hazel
  22. source=("https://ftp.pcre.org/pub/pcre/$pkgname-$pkgver.tar.bz2"{,.sig})
  23. # ftp.pcre.org is offline
  24. source=(https://sourceforge.net/projects/pcre/files/pcre/${pkgver}/${_pkgname}-${pkgver}.tar.bz2{,.sig})
  25. sha512sums=('91bff52eed4a2dfc3f3bfdc9c672b88e7e2ffcf3c4b121540af8a4ae8c1ce05178430aa6b8000658b9bb7b4252239357250890e20ceb84b79cdfcde05154061a'
  26. 'SKIP')
  27. prepare() {
  28. cd $_pkgname-$pkgver
  29. # apply patch from the source array (should be a pacman feature)
  30. local filename
  31. for filename in "${source[@]}"; do
  32. if [[ "$filename" =~ \.patch$ ]]; then
  33. msg2 "Applying patch ${filename##*/}"
  34. patch -p1 -N -i "$srcdir/${filename##*/}"
  35. fi
  36. done
  37. :
  38. }
  39. build() {
  40. cd $_pkgname-$pkgver
  41. ./configure \
  42. --prefix=/usr \
  43. --enable-unicode-properties \
  44. --enable-pcre16 \
  45. --enable-pcre32 \
  46. --enable-jit \
  47. --enable-pcregrep-libz \
  48. --enable-pcregrep-libbz2 \
  49. --enable-pcretest-libreadline
  50. make
  51. }
  52. check() {
  53. cd $_pkgname-$pkgver
  54. if [[ $CARCH == armv7h ]]; then return 0; fi # qemu: Unsupported syscall: 229
  55. make -j1 check || : # 'RunTest' test fails in librechroot
  56. }
  57. package() {
  58. cd $_pkgname-$pkgver
  59. make DESTDIR="$pkgdir" install
  60. install -Dm644 LICENCE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  61. # remove conflicting files
  62. rm -vr -- \
  63. "$pkgdir"/usr/bin/ \
  64. "$pkgdir"/usr/include/ \
  65. "$pkgdir"/usr/lib/pkgconfig/ \
  66. "$pkgdir"/usr/share/doc/ \
  67. "$pkgdir"/usr/share/man/
  68. rm -v -- \
  69. "${pkgdir}"/usr/lib/lib*.so \
  70. "${pkgdir}"/usr/lib/lib*.so.*
  71. }