blob: cc2d294780bd9496aa2f3f311692fdc1b41f09e0 (
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
64
65
66
67
|
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Michael Hansen <zrax0111 gmail com>
_android_arch=x86
pkgname=android-${_android_arch}-libwebm
pkgver=1.0.0.30
pkgrel=1
arch=('any')
pkgdesc="WebM video file parser (Android ${_android_arch})"
url="https://www.webmproject.org/"
license=('BSD')
depends=('android-ndk')
makedepends=('android-cmake')
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://github.com/webmproject/libwebm/archive/libwebm-${pkgver}.tar.gz"
'cmake_install.patch')
md5sums=('ca0884b845e5150cdec1d0cf8729ef3d'
'0043032d67179a644969ef9909ad8d11')
prepare() {
cd "${srcdir}/libwebm-libwebm-${pkgver}"
patch -p1 -i ../cmake_install.patch
sed -i 's/cmake_minimum_required(VERSION 3.2)/cmake_minimum_required(VERSION 3.6)/g' CMakeLists.txt
}
build() {
cd "${srcdir}/libwebm-libwebm-${pkgver}"
source android-env ${_android_arch}
android-${_android_arch}-cmake \
-S . \
-B build-shared \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_IWYU=ON \
-DENABLE_WEBM_PARSER=ON \
-DENABLE_SAMPLE_PROGRAMS=OFF \
-DENABLE_TESTS=OFF \
-DENABLE_WEBMINFO=OFF \
-Wno-dev
make -C build-shared $MAKEFLAGS
android-${_android_arch}-cmake \
-S . \
-B build-static \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_SHARED_LIBS=OFF \
-DENABLE_IWYU=ON \
-DENABLE_WEBM_PARSER=ON \
-DENABLE_SAMPLE_PROGRAMS=OFF \
-DENABLE_TESTS=OFF \
-DENABLE_WEBMINFO=OFF \
-Wno-dev
make -C build-static $MAKEFLAGS
}
package() {
cd "${srcdir}/libwebm-libwebm-${pkgver}"
source android-env ${_android_arch}
make -C build-shared DESTDIR="${pkgdir}" install
make -C build-static DESTDIR="${pkgdir}" install
${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so
${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a
}
|