aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2022-03-21 20:39:17 +0200
committerprspkt <p.rspkt@yandex.com>2022-04-14 14:37:14 +0000
commit848f17c0ef88fbfcdaaeebaea8e8c5900aff4e35 (patch)
tree7612365fba3d45ee8a6b0269ee24b02bdbbd4d3b
parentf89791516430c7401d0572587b0f644bb4e1ef18 (diff)
downloadaports-848f17c0ef88fbfcdaaeebaea8e8c5900aff4e35.tar.gz
aports-848f17c0ef88fbfcdaaeebaea8e8c5900aff4e35.tar.bz2
aports-848f17c0ef88fbfcdaaeebaea8e8c5900aff4e35.tar.xz
community/x265: enable high (10, 12) bit depths
-rw-r--r--community/x265/APKBUILD33
1 files changed, 32 insertions, 1 deletions
diff --git a/community/x265/APKBUILD b/community/x265/APKBUILD
index 97c259e038..e7a48dcf1e 100644
--- a/community/x265/APKBUILD
+++ b/community/x265/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=x265
pkgver=3.5
-pkgrel=2
+pkgrel=3
pkgdesc="Open Source H265/HEVC video encoder"
url="https://www.videolan.org/developers/x265.html"
arch="all"
@@ -22,17 +22,48 @@ build() {
# It has textrel on x86 so we disable asm.
x86) cmake_opts="-DENABLE_ASSEMBLY=OFF";;
ppc*) cmake_opts="-DENABLE_ALTIVEC=OFF -DCPU_POWER8=OFF";;
+ # Fails to build 10 and 12 bit versions
+ aarch64) cmake_opts="-DENABLE_ASSEMBLY=OFF";;
# See https://bitbucket.org/multicoreware/x265_git/issues/559
*) cmake_opts="-DCMAKE_ASM_NASM_FLAGS=-w-macro-params-legacy";;
esac
# CMAKE_BUILD_TYPE - Don't change to None! This is a video encoder,
# performance is the most important.
+ cmake -B build-12 -S source -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DHIGH_BIT_DEPTH=TRUE \
+ -DMAIN12=TRUE \
+ -DEXPORT_C_API=FALSE \
+ -DENABLE_CLI=FALSE \
+ -DENABLE_SHARED=FALSE \
+ $cmake_opts
+ cmake --build build-12
+
+ cmake -B build-10 -S source -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DHIGH_BIT_DEPTH=TRUE \
+ -DEXPORT_C_API=FALSE \
+ -DENABLE_CLI=FALSE \
+ -DENABLE_SHARED=FALSE \
+ $cmake_opts
+ cmake --build build-10
+
cmake -B build -S source -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DEXTRA_LIB='x265_main10.a;x265_main12.a' \
+ -DEXTRA_LINK_FLAGS='-L.' \
+ -DLINKED_10BIT=TRUE \
+ -DLINKED_12BIT=TRUE \
$cmake_opts
+ ln -s ../build-10/libx265.a build/libx265_main10.a
+ ln -s ../build-12/libx265.a build/libx265_main12.a
cmake --build build
}