diff options
Diffstat (limited to 'community/libpostal/APKBUILD')
-rw-r--r-- | community/libpostal/APKBUILD | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/community/libpostal/APKBUILD b/community/libpostal/APKBUILD index f290195f914..9eb2b994f56 100644 --- a/community/libpostal/APKBUILD +++ b/community/libpostal/APKBUILD @@ -1,11 +1,12 @@ # Contributor: Bart Ribbers <bribbers@disroot.org> # Maintainer: Bart Ribbers <bribbers@disroot.org> pkgname=libpostal -pkgver=1.1_alpha +pkgver=1.1 pkgrel=1 pkgdesc="A C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data" url="https://github.com/openvenues/libpostal" -arch="all" +# riscv64 has relocation failures, https://github.com/openvenues/libpostal/issues/549 +arch="all !riscv64" license="MIT" makedepends=" autoconf @@ -14,23 +15,29 @@ makedepends=" " checkdepends="libpostal-data" subpackages="$pkgname-dev" -source="https://github.com/openvenues/libpostal/archive/v${pkgver/_/-}/libpostal-v${pkgver/_/-}.tar.gz - 0001-fix-test_expansion_contains_phrase_option_with_languages.patch - " -builddir="$srcdir/libpostal-${pkgver/_/-}" +source="https://github.com/openvenues/libpostal/archive/refs/tags/v$pkgver/libpostal-v$pkgver.tar.gz" +# s390x has a test failure but we're unable to see the log case "$CARCH" in - x86*) _sse2="" ;; - *) _sse2="--disable-sse2" ;; +s390x) options="!check" ;; esac -# s390x and mips64 have a test failure but we're unable to see the log -case "$CARCH" in - s390x|mips64) options="!check" ;; - arm*) _scanner_flags="--with-cflags-scanner-extra=-marm" ;; -esac +prepare() { + default_prepare + + ./bootstrap.sh +} build() { + case "$CARCH" in + x86*) local sse2="" ;; + *) local sse2="--disable-sse2" ;; + esac + + case "$CARCH" in + arm*) local scanner_flags="--with-cflags-scanner-extra=-marm" ;; + esac + ./bootstrap.sh ./configure \ --build=$CBUILD \ @@ -39,8 +46,8 @@ build() { --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ - $_sse2 \ - $_scanner_flags \ + $sse2 \ + $scanner_flags \ --datadir=/usr/share \ --disable-data-download make @@ -54,5 +61,6 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="1ab48473b0ebdaed21426c33f0950174bb37a3aaf1354a8be5a4bc1c92575880cb7bc54679e147ed24d43f07b10ba350d683d48a66760e78fc9bbc36ca2786d6 libpostal-v1.1-alpha.tar.gz -2e332062aca04adca55f340fdb0bcf2a5fdd4c4cca7d785df5a8d66d4eaed4c10a15cb4899e327a9b2657d6a3d32a8fcb6d88e43a88d815ddbca5cc696e2561d 0001-fix-test_expansion_contains_phrase_option_with_languages.patch" +sha512sums=" +ca9915b03530abb0349a323468206cb856c7b8fd8de1dc0de796a73701cc92f8aa0d8f8e3fe6c133a2bb4bda9d241ca5fabe381f2e67522e19566aaf0b5736ff libpostal-v1.1.tar.gz +" |