diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9b88e5cfce0b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com> +# Contributor: David Runge <dvzrv@archlinux.org> +# Contributor: Gaetan Bisson <bisson@archlinux.org> + +_android_arch=x86-64 + +pkgname=android-${_android_arch}-npth +pkgver=1.7 +pkgrel=1 +arch=('any') +pkgdesc="The new GNU portable threads library (Android ${_android_arch})" +url="https://www.gnupg.org/software/npth/index.html" +license=('LGPL-2.1-or-later') +depends=('android-ndk') +makedepends=('android-configure') +options=(!strip !buildflags staticlibs !emptydirs) +source=("https://gnupg.org/ftp/gcrypt/npth/npth-$pkgver.tar.bz2") +md5sums=('286274d0106ec408efebe4a399975b11') + +prepare() { + cd "${srcdir}/npth-$pkgver" + source android-env ${_android_arch} + + autoreconf -fiv + sed -i 's|have_ld_version_script=yes|have_ld_version_script=no|g' configure + sed -i '/config_libs \$LIB_CLOCK_GETTIME/d' configure +} + +build() { + cd "${srcdir}/npth-$pkgver" + source android-env ${_android_arch} + + export ac_cv_search_pthread_cancel=yes + export ac_cv_type_pthread_rwlock_t=no + export ac_cv_search_clock_gettime=yes + android-${_android_arch}-configure \ + --disable-tests + make $MAKEFLAGS +} + +package() { + cd "${srcdir}/npth-$pkgver" + source android-env ${_android_arch} + + make DESTDIR="$pkgdir" install + rm -rf "${pkgdir}"/${ANDROID_PREFIX_SHARE} + ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so + ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a +} |