archrelease: copy trunk to extra-x86_64
[arch-packages.git] / pcre2 / trunk / PKGBUILD
blob6979a2a1ae231b640a04c895bced518c8c9b0694
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Mateusz 'mrlemux' Lemusisk mrlemux at gmail dotcom
3 # Based on the pcre package by Sébastien "Seblu" Luttringer
4 # Contributor: Allan McRae <allan@archlinux.org>
5 # Contributor: Eric Belanger <eric@archlinux.org>
6 # Contributor: John Proctor <jproctor@prium.net>
8 pkgname=pcre2
9 pkgver=10.42
10 pkgrel=2
11 pkgdesc='A library that implements Perl 5-style regular expressions. 2nd version'
12 arch=('x86_64')
13 url='https://www.pcre.org/'
14 license=('BSD')
15 depends=('readline' 'zlib' 'bzip2' 'bash')
16 provides=(libpcre2-{8,16,32,posix}.so)
17 options=(staticlibs)
18 source=("https://github.com/PhilipHazel/pcre2/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.bz2"{,.sig})
19 sha512sums=('72fbde87fecec3aa4b47225dd919ea1d55e97f2cbcf02aba26e5a0d3b1ffb58c25a80a9ef069eb99f9cf4e41ba9604ad06a7ec159870e1e875d86820e12256d3'
20             'SKIP')
21 validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8')  # Philip Hazel <ph10@hermes.cam.ac.uk>
23 build() {
24   cd $pkgname-$pkgver
26   # use fat LTO objects for static libraries
27   CFLAGS+=" -ffat-lto-objects"
28   CXXFLAGS+=" -ffat-lto-objects"
30   ./configure \
31     --prefix=/usr \
32     --enable-pcre2-16 \
33     --enable-pcre2-32 \
34     --enable-jit \
35     --enable-pcre2grep-libz \
36     --enable-pcre2grep-libbz2 \
37     --enable-pcre2test-libreadline
38   make
41 check() {
42   cd $pkgname-$pkgver
43   make -j1 check
46 package() {
47   cd $pkgname-$pkgver
48   make DESTDIR="$pkgdir" install
50   install -Dm644 LICENCE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
53 # vim:set sw=2 sts=-1 et: