summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2261c13fbb4f5cfce9377e291fe83f7c8aea4722 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: drakkan <nicola.murino at gmail dot com>

_android_arch=x86

pkgname=android-${_android_arch}-pcre
pkgver=8.43
pkgrel=2
pkgdesc="A library that implements Perl 5-style regular expressions (android)"
arch=(any)
url="http://www.pcre.org/"
license=("BSD")
depends=('android-ndk')
options=(!strip !buildflags staticlibs !emptydirs)
makedepends=('android-configure'
             "android-${_android_arch}-bzip2"
             "android-${_android_arch}-zlib")
optdepends=("android-${_android_arch}-bzip2"
             "android-${_android_arch}-zlib")
source=("https://ftp.pcre.org/pub/pcre/pcre-$pkgver.tar.bz2"{,.sig})
validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') # Philip Hazel
sha256sums=('91e762520003013834ac1adb4a938d53b22a216341c061b0cf05603b290faf6b'
         'SKIP')

build() {
    cd "${srcdir}"/pcre-${pkgver}
    source android-env ${_android_arch}

    export LIBS="-L${ANDROID_PREFIX_LIB}"
    export CPPFLAGS="-I${ANDROID_PREFIX_INCLUDE}"

    android-${_android_arch}-configure \
      --enable-jit \
      --enable-pcre16 \
      --enable-pcre32 \
      --enable-pcregrep-libz \
      --enable-pcregrep-libbz2
    make $MAKEFLAGS
}

package() {
    cd "${srcdir}"/pcre-${pkgver}
    source android-env ${_android_arch}

    make DESTDIR="$pkgdir" install
    rm -r "${pkgdir}"/${ANDROID_PREFIX_BIN}
    rm -r "${pkgdir}"/${ANDROID_PREFIX_SHARE}
    ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so
    ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a
}