summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 83da6a5f8a6c334737295b084383cf08196c9a0b (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
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>

_android_arch=armv7a-eabi

pkgname=android-${_android_arch}-libjpeg-turbo
pkgver=3.0.3
pkgrel=1
arch=('any')
pkgdesc="JPEG image codec with accelerated baseline compression and decompression (Android ${_android_arch})"
license=("custom")
url="http://libjpeg-turbo.virtualgl.org"
groups=('android-libjpeg-turbo'
        'android-libjpeg')
depends=('android-ndk')
makedepends=('android-cmake'
             'yasm')
provides=("android-${_android_arch}-libjpeg")
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/$pkgver.tar.gz")
md5sums=('081269bd1f35eaadb7ce2e3b4f03aebb')

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

    android-${_android_arch}-cmake \
        -S . \
        -B build \
        -DWITH_JPEG8=ON
    make -C build $MAKEFLAGS
}

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

    make -C build 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
}