# Contributor: Carlo Landmeter # Maintainer: Natanael Copa pkgname=x265 pkgver=3.1.2 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="00fc2d8460657c0d2edcc54fd8c4521785c632f8811b74d0cd0a3efa0f06f1fb8cdd6233ad4917c1f40b3c1f1660a6c97ad947e656b7c3e9a51f8ae84afef65a x265-3.1.2.tar.gz"