aboutsummaryrefslogtreecommitdiffstats
path: root/main/x264/APKBUILD
blob: e1c65381e1c4a94d52d3ce6a4cacc2a4e692ed9f (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=x264
pkgver=20180304
pkgrel=1
pkgdesc="Free library for encoding H264/AVC video streams"
url="http://www.videolan.org/developers/x264.html"
arch="all"
license="GPL-2.0-or-later"
makedepends="libx11-dev bash nasm coreutils perl"
subpackages="$pkgname-dev $pkgname-libs"
source="ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-$pkgver-2245-stable.tar.bz2"
builddir="$srcdir/$pkgname-snapshot-$pkgver-2245-stable"

build() {
	cd "$builddir"

	local asmopts=
	case "$CARCH" in
		# x86 assembly contains TEXTRELs
		# arm neon assembly contains TEXTRELs
		x86 | arm*) asmopts="--disable-asm"
	esac

	# note: not autotools
	CFLAGS="${CFLAGS/-Os/}" ./configure \
		--host=$CHOST \
		--prefix=/usr \
		--enable-shared \
		--enable-static \
		$asmopts \
		--enable-pic \
		--extra-cflags=-fno-aggressive-loop-optimizations
	make
}

check() {
	cd "$builddir"

	./x264 --version
}

package() {
	cd "$builddir"

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

sha512sums="6ee146dd94a086a5065b8633381212d691a8574465bf75347647508c8d748be20dd2e7a6162f93037287f916f0b179a7a54a37dd4779be1b0c46a3586f9c19c5  x264-snapshot-20180304-2245-stable.tar.bz2"