mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
x265: enable higher bit depths
This commit is contained in:
parent
60dd0293ef
commit
17e4c89dce
1 changed files with 47 additions and 2 deletions
|
@ -1,10 +1,11 @@
|
||||||
# Template file for 'x265'
|
# Template file for 'x265'
|
||||||
pkgname=x265
|
pkgname=x265
|
||||||
version=3.6
|
version=3.6
|
||||||
revision=1
|
revision=2
|
||||||
build_wrksrc=source
|
build_wrksrc=source
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DENABLE_PIC=1"
|
configure_args="-DENABLE_PIC=1 -DEXTRA_LINK_FLAGS='-L.'
|
||||||
|
-DEXTRA_LIB='x265_main10.a;x265_main12.a' -DLINKED_10BIT=TRUE -DLINKED_12BIT=TRUE"
|
||||||
hostmakedepends="git"
|
hostmakedepends="git"
|
||||||
short_desc="Open Source H.265/HEVC video encoder"
|
short_desc="Open Source H.265/HEVC video encoder"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
|
@ -52,6 +53,50 @@ pre_configure() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
post_configure() {
|
||||||
|
# We need to build the library multiple times in order to support multiple bit depths
|
||||||
|
# The libraries are linked together using -DDEXTRA_LIB=...
|
||||||
|
|
||||||
|
configure_args="${configure_args/-DEXTRA_LIB=.*/}"
|
||||||
|
configure_args="${configure_args/-DLINKED_10BIT=.*/}"
|
||||||
|
configure_args="${configure_args/-DLINKED_12BIT=.*/}"
|
||||||
|
|
||||||
|
# source/common/x86/intrapred16.asm:20642: error: invalid combination of opcode and operands
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
i686*) configure_args="${configure_args/-DENABLE_ASSEMBLY=.*/} -DENABLE_ASSEMBLY=OFF" ;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
(
|
||||||
|
cmake_builddir="build-10" \
|
||||||
|
configure_args="${configure_args} -DHIGH_BIT_DEPTH=TRUE -DENABLE_CLI=FALSE -DEXPORT_C_API=FALSE -DENABLE_SHARED=FALSE" \
|
||||||
|
do_configure
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
cmake_builddir="build-12" \
|
||||||
|
configure_args="${configure_args} -DHIGH_BIT_DEPTH=TRUE -DMAIN12=TRUE -DENABLE_CLI=FALSE -DEXPORT_C_API=FALSE -DENABLE_SHARED=FALSE" \
|
||||||
|
do_configure
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
pre_build() {
|
||||||
|
(
|
||||||
|
cd build-10
|
||||||
|
export NINJA_STATUS="[1/3][%f/%t] "
|
||||||
|
ninja ${makejobs} ${make_build_args} ${make_build_target}
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
cd build-12
|
||||||
|
export NINJA_STATUS="[2/3][%f/%t] "
|
||||||
|
ninja ${makejobs} ${make_build_args} ${make_build_target}
|
||||||
|
)
|
||||||
|
|
||||||
|
ln -sf ../build-10/libx265.a build/libx265_main10.a
|
||||||
|
ln -sf ../build-12/libx265.a build/libx265_main12.a
|
||||||
|
}
|
||||||
|
|
||||||
x265-devel_package() {
|
x265-devel_package() {
|
||||||
depends="${sourcepkg}>=${version}_${revision}"
|
depends="${sourcepkg}>=${version}_${revision}"
|
||||||
short_desc+=" - development files"
|
short_desc+=" - development files"
|
||||||
|
|
Loading…
Add table
Reference in a new issue