aboutsummaryrefslogtreecommitdiffstats
path: root/main/x265/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/x265/APKBUILD')
-rw-r--r--main/x265/APKBUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/main/x265/APKBUILD b/main/x265/APKBUILD
new file mode 100644
index 0000000000..c63beda323
--- /dev/null
+++ b/main/x265/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=x265
+pkgver=3.0
+pkgrel=0
+pkgdesc="Open Source H265/HEVC video encoder"
+url="http://x265.org"
+arch="all"
+license="GPL-2.0-or-later"
+makedepends="cmake nasm"
+subpackages="$pkgname-dev $pkgname-libs"
+source="$pkgname-$pkgver.tar.gz::https://bitbucket.org/multicoreware/x265/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";;
+ ppc*) cmake_opts="-DENABLE_ALTIVEC=OFF -DCPU_POWER8=OFF";;
+ esac
+
+ cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ $cmake_opts \
+ ../../source
+ make
+}
+
+check() {
+ cd "$builddir"/build/linux
+
+ ./x265 --version
+}
+
+package() {
+ cd "$builddir"/build/linux
+
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="bb7665194ddd4bccbb91c16337463ad4ef32111a1e7779e4cc16964df0992aa99e578cb74fef0edbf41119105e4085574247f60541b0558cc36730ea12d2c6ba x265-3.0.tar.gz"