summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 36da344f568b75e50e29d48b5196d9a7f78bbb3a (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
51
52
53
54
55
56
57
58
59
60
61
62
63
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Anatol Pomozov
# Contributor: JSpaces <jspace@unseen.is>
# Contributor: Triode <triode1@btinternet.com>

_android_arch=x86

pkgname=android-${_android_arch}-libsoxr
pkgver=0.1.3
pkgrel=2
arch=('any')
pkgdesc="The SoX Resampler library that aims to give fast and high quality results for any constant resampling ratio (Android ${_android_arch})"
url='https://sourceforge.net/p/soxr/wiki/Home/'
license=('GPL')
depends=('android-ndk')
makedepends=('android-cmake')
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://downloads.sourceforge.net/project/soxr/soxr-${pkgver}-Source.tar.xz")
md5sums=('3f16f4dcb35b471682d4321eda6f6c08')

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

    android-${_android_arch}-cmake \
        -S . \
        -B build-shared \
        -DBUILD_EXAMPLES=OFF \
        -DBUILD_TESTS=OFF \
        -DBUILD_SHARED_LIBS=ON \
        -DWITH_AVFFT=OFF \
        -DWITH_LSR_BINDINGS=ON \
        -DWITH_OPENMP=OFF \
        -DWITH_PFFFT=ON \
        -Wno-dev
    make -C build-shared $MAKEFLAGS

    android-${_android_arch}-cmake \
        -S . \
        -B build-static \
        -DBUILD_EXAMPLES=OFF \
        -DBUILD_TESTS=OFF \
        -DBUILD_SHARED_LIBS=OFF \
        -DWITH_AVFFT=OFF \
        -DWITH_LSR_BINDINGS=ON \
        -DWITH_OPENMP=OFF \
        -DWITH_PFFFT=ON \
        -Wno-dev
    make -C build-static $MAKEFLAGS
}

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

    make -C build-shared DESTDIR="${pkgdir}" install
    cp -vf build-static/src/lib*.a "${pkgdir}/${ANDROID_PREFIX_LIB}/"

    rm -rf "${pkgdir}/${ANDROID_PREFIX_SHARE}"
    ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so
    ${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a
}