APKBUILD 1.29 KB
Newer Older
1
2
# Maintainer: 
pkgname=x264
3
pkgver=20191105
4
5
6
7
8
pkgrel=0
pkgdesc="Library for encoding H264/AVC video streams"
url="https://www.videolan.org/developers/x264.html"
arch="all"
options="textrels"
9
10
license="GPL-2.0+"
depends=""
11
makedepends="bash coreutils libx11-dev perl"
A. Wilcox's avatar
A. Wilcox committed
12
case $CTARGET_ARCH in
A. Wilcox's avatar
A. Wilcox committed
13
	x86_64) makedepends="$makedepends nasm";;
A. Wilcox's avatar
A. Wilcox committed
14
esac
15
subpackages="$pkgname-dev $pkgname-libs"
16
source="https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-$pkgver-2245-stable.tar.bz2"
17
18
19
builddir="$srcdir/$pkgname-snapshot-$pkgver-2245-stable"

build() {
20
	_asmopts=""
21
22
	case "$CARCH" in
		# ppc requires AltiVec, we run on G3s
23
		ppc | pmmx) _asmopts="--disable-asm" ;;
24
		# VSX was added in power8
25
		ppc64) _asmopts="--disable-vsx" ;;
26
27
28
	esac

	# note: not autotools
29
30
	CFLAGS="$(printf '%s' "$CFLAGS" | sed 's/-Os//')" \
	./configure \
31
32
33
34
		--host=$CHOST \
		--prefix=/usr \
		--enable-shared \
		--enable-static \
35
		$_asmopts \
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
		--enable-pic \
		--extra-cflags=-fno-aggressive-loop-optimizations
	make
}

check() {
	./x264 --version
}

package() {
	make DESTDIR="$pkgdir" \
		bindir=/usr/bin libdir=/usr/lib includedir=/usr/include \
		install
}

51
sha512sums="5a5bc2bd322af8544a6e7d89d6c56d1b609f8a69e177b20964fda1b5c8ad3a0ca77ff00b8ec47412a0c069afac677300c1d26aaaa704cf9be93df27f189171d3  x264-snapshot-20191105-2245-stable.tar.bz2"