summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fa99ff7289084a66ce33cc7bf3ec528169991b9c (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
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Daniel Bermond <dbermond@archlinux.org>

_android_arch=x86

pkgname=android-${_android_arch}-highway
pkgver=1.1.0
pkgrel=1
arch=('any')
pkgdesc="A C++ library that provides portable SIMD/vector intrinsics (Android ${_android_arch})"
url='https://github.com/google/highway/'
license=('Apache-2.0'
         'BSD-3-Clause')
depends=('android-ndk')
makedepends=('android-cmake')
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://github.com/google/highway/archive/${pkgver}/highway-${pkgver}.tar.gz")
sha256sums=('354a8b4539b588e70b98ec70844273e3f2741302c4c377bcc4e81b3d1866f7c9')

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

    android-${_android_arch}-cmake \
        -S . \
        -B build \
        -Wno-dev \
        -DBUILD_TESTING=OFF \
        -DHWY_ENABLE_EXAMPLES=OFF \
        -DHWY_ENABLE_TESTS=OFF
    make -C build $MAKEFLAGS
}

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

    make -C build DESTDIR="$pkgdir" install
    ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so
}