blob: 0da234c5e3e8c5b8be0253dc577444ebcea5dbb8 (
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# Maintainer: Karl-Felix Glatzer <karl.glatzer@gmx.de>
# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Chocobo1 <chocobo1 AT archlinux DOT net>
pkgname=mingw-w64-aom
pkgver=3.11.0
pkgrel=1
pkgdesc="Alliance for Open Media video codec (mingw-w64)"
url="https://aomedia.org/"
arch=('any')
license=(BSD-3-Clause)
depends=(
mingw-w64-crt
)
options=(
!strip
!buildflags
staticlibs
!debug
)
makedepends=(
mingw-w64-gcc
mingw-w64-cmake
ninja
yasm
)
source=(
https://storage.googleapis.com/aom-releases/libaom-$pkgver.tar.gz{,.asc}
"cmake.patch"
)
b2sums=('3fd4cf48c73decc73d95604f2af12b329cbc02975c15232d16fa43366695bf0a7356f3685bccbc34c02f36c903d98100a7a4139659d90308c271e34c4d027019'
'SKIP'
'627c000cc5b152e78714898156ebebb2524749bd1d701bbbdca0b431301426c2f821403299a6fd4420be80133d4e7178dea8b2f4aae2ab34e9e81e584ebda345')
validpgpkeys=(
B002F08B74A148DAA01F7123A48E86DB0B830498 # AOMedia release signing key <av1-discuss@aomedia.org>
)
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
cd "${srcdir}/libaom-$pkgver"
patch -Np1 -i "${srcdir}"/cmake.patch
}
build() {
# upstream wants this off
CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=0}"
CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=0}"
for _arch in ${_architectures}; do
mkdir -p "${srcdir}/libaom-$pkgver"/build-static-${_arch} && cd "${srcdir}/libaom-$pkgver"/build-static-${_arch}
${_arch}-cmake -G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_SHARED_LIBS=0 \
-D ENABLE_TESTS=0 \
..
cmake --build .
done
for _arch in ${_architectures}; do
mkdir -p "${srcdir}/libaom-$pkgver"/build-${_arch} && cd "${srcdir}/libaom-$pkgver"/build-${_arch}
${_arch}-cmake -G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_SHARED_LIBS=1 \
-D ENABLE_TESTS=0 \
..
cmake --build .
done
}
package() {
cd "${srcdir}/libaom-$pkgver"
for _arch in ${_architectures}; do
DESTDIR="$pkgdir" cmake --install build-static-${_arch}
DESTDIR="$pkgdir" cmake --install build-${_arch}
${_arch}-strip -s "${pkgdir}"/usr/${_arch}/bin/*.exe
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
done
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 {LICENSE,PATENTS}
}
# vim:set sw=2 sts=-1 et:
|