aboutsummaryrefslogtreecommitdiffstats
path: root/main/x265/APKBUILD
blob: 941952df2d07313ce39519242ea9f7196b36313f (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=x265
pkgver=2.5
pkgrel=0
pkgdesc="Open Source H265/HEVC video encoder"
url="https://bitbucket.org/multicoreware/x265"
arch="all"
license="GPL"
makedepends="cmake yasm"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://bitbucket.org/multicoreware/$pkgname/downloads/${pkgname}_${pkgver}.tar.gz"
builddir="$srcdir/${pkgname}_$pkgver"

build() {
	cd "$builddir"/build/linux

	# It has textrel on x86 so we disable asm.
	local cmake_opts=""
	case "$CARCH" in
		x86) cmake_opts="-DENABLE_ASSEMBLY=OFF";;
		ppc64le) cmake_opts="-DENABLE_ALTIVEC=OFF";;
	esac

	cmake \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_VERBOSE_MAKEFILE=ON \
		$cmake_opts \
		../../source
	make
}

package() {
	cd "$builddir"/build/linux

	make DESTDIR="$pkgdir" install
}

sha512sums="f39b0b06a9f6ab9ab19fcdc1cba1578ace433e22dc8ec3f549ec3e5eeaaf40d17de6c7d419c12c16717ae795c45d953ef34a2fc9376d7e83eb7e9e74ab19ec93  x265-2.5.tar.gz"