* [gentoo-commits] repo/gentoo:master commit in: media-libs/x265/, media-libs/x265/files/
@ 2015-10-16 9:30 Alexis Ballier
0 siblings, 0 replies; 7+ messages in thread
From: Alexis Ballier @ 2015-10-16 9:30 UTC (permalink / raw
To: gentoo-commits
commit: b67f0bc2ed20d6b73cf4528818faef7bfcfb2254
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 16 09:28:49 2015 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Fri Oct 16 09:29:00 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b67f0bc2
media-libs/x265: Add patch to fix link order when doing multi-variant build.
as-needed might drop important libraries (dl here), causing the library to be underlinked.
Package-Manager: portage-2.2.23
| 27 ++++++++++++++++++++++
.../{x265-1.8-r2.ebuild => x265-1.8-r3.ebuild} | 1 +
2 files changed, 28 insertions(+)
--git a/media-libs/x265/files/1.8-extralibs_order.patch b/media-libs/x265/files/1.8-extralibs_order.patch
new file mode 100644
index 0000000..95f6887
--- /dev/null
+++ b/media-libs/x265/files/1.8-extralibs_order.patch
@@ -0,0 +1,27 @@
+Link EXTRA_LIB before PLATFORM_LIBS since they're static libraries and as-needed
+might drop required libraries if they come after.
+
+Index: x265_11047/source/CMakeLists.txt
+===================================================================
+--- x265_11047.orig/source/CMakeLists.txt
++++ x265_11047/source/CMakeLists.txt
+@@ -455,6 +455,9 @@ option(ENABLE_SHARED "Build shared libra
+ if(ENABLE_SHARED)
+ add_library(x265-shared SHARED "${PROJECT_BINARY_DIR}/x265.def" ${YASM_OBJS}
+ ${X265_RC_FILE} $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common>)
++ if(EXTRA_LIB)
++ target_link_libraries(x265-shared ${EXTRA_LIB})
++ endif()
+ target_link_libraries(x265-shared ${PLATFORM_LIBS})
+ if(MSVC)
+ set_target_properties(x265-shared PROPERTIES OUTPUT_NAME libx265)
+@@ -480,9 +483,6 @@ if(ENABLE_SHARED)
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR})
+ endif()
+- if(EXTRA_LIB)
+- target_link_libraries(x265-shared ${EXTRA_LIB})
+- endif()
+ if(LINKER_OPTIONS)
+ # set_target_properties can't do list expansion
+ string(REPLACE ";" " " LINKER_OPTION_STR "${LINKER_OPTIONS}")
diff --git a/media-libs/x265/x265-1.8-r2.ebuild b/media-libs/x265/x265-1.8-r3.ebuild
similarity index 99%
rename from media-libs/x265/x265-1.8-r2.ebuild
rename to media-libs/x265/x265-1.8-r3.ebuild
index 18bfcc1..ae1ad80 100644
--- a/media-libs/x265/x265-1.8-r2.ebuild
+++ b/media-libs/x265/x265-1.8-r3.ebuild
@@ -43,6 +43,7 @@ src_unpack() {
src_prepare() {
epatch "${FILESDIR}/${PV}-build-Disable-march-selection-from-CMakeLists.txt.patch" # bug #510890
+ epatch "${FILESDIR}/1.8-extralibs_order.patch"
}
# By default, the library and the encoder is configured for only one output bit
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/x265/, media-libs/x265/files/
@ 2017-02-07 11:36 Alexis Ballier
0 siblings, 0 replies; 7+ messages in thread
From: Alexis Ballier @ 2017-02-07 11:36 UTC (permalink / raw
To: gentoo-commits
commit: 1a09e44eac27b76085eafe0db8f52ed46c98ee41
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 7 11:35:50 2017 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Feb 7 11:35:58 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a09e44e
media-libs/x265: Fixes for arm.
Add patch to properly detect ARM.
Do not force CFLAGS for ARM, esp. -march=native which breaks when cross compiling.
Add neon useflag.
Disable neon on main10 & main12 profiles as those do not build, bug #589674.
Add patch to define proper symbols when disabling neon.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
media-libs/x265/files/arm.patch | 34 ++++++++++++++++++++++++++++++++++
media-libs/x265/files/neon.patch | 16 ++++++++++++++++
media-libs/x265/x265-2.2.ebuild | 14 +++++++++++++-
media-libs/x265/x265-9999.ebuild | 18 +++++++++++++++---
4 files changed, 78 insertions(+), 4 deletions(-)
diff --git a/media-libs/x265/files/arm.patch b/media-libs/x265/files/arm.patch
new file mode 100644
index 00000000..69edcde
--- /dev/null
+++ b/media-libs/x265/files/arm.patch
@@ -0,0 +1,34 @@
+More aliases for ARM.
+Do not force CFLAGS for ARM.
+
+Index: source/CMakeLists.txt
+===================================================================
+--- source.orig/CMakeLists.txt
++++ source/CMakeLists.txt
+@@ -41,7 +41,7 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_
+ # System architecture detection
+ string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
+ set(X86_ALIASES x86 i386 i686 x86_64 amd64)
+-set(ARM_ALIASES armv6l armv7l)
++set(ARM_ALIASES armv6l armv6j armv7l armv7a)
+ list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
+ list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
+ set(POWER_ALIASES ppc64 ppc64le)
+@@ -208,15 +208,11 @@ if(GCC)
+ endif()
+ endif()
+ endif()
+- if(ARM AND CROSS_COMPILE_ARM)
+- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
+- elseif(ARM)
++ if(ARM)
+ find_package(Neon)
+ if(CPU_HAS_NEON)
+- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
++ set(ARM_ARGS -mfpu=neon)
+ add_definitions(-DHAVE_NEON)
+- else()
+- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
+ endif()
+ endif()
+ add_definitions(${ARM_ARGS})
diff --git a/media-libs/x265/files/neon.patch b/media-libs/x265/files/neon.patch
new file mode 100644
index 00000000..444c899
--- /dev/null
+++ b/media-libs/x265/files/neon.patch
@@ -0,0 +1,16 @@
+These functions are only built when enabling assembly on ARM; use proper check
+to avoid undefined symbols.
+
+Index: source/common/primitives.cpp
+===================================================================
+--- source.orig/common/primitives.cpp
++++ source/common/primitives.cpp
+@@ -270,7 +270,7 @@ void PFX(cpu_emms)(void) {}
+ void PFX(cpu_cpuid)(uint32_t, uint32_t *eax, uint32_t *, uint32_t *, uint32_t *) { *eax = 0; }
+ void PFX(cpu_xgetbv)(uint32_t, uint32_t *, uint32_t *) {}
+
+-#if X265_ARCH_ARM == 0
++#if X265_ARCH_ARM == 0 || !defined(ENABLE_ASSEMBLY)
+ void PFX(cpu_neon_test)(void) {}
+ int PFX(cpu_fast_neon_mrc_test)(void) { return 0; }
+ #endif // X265_ARCH_ARM
diff --git a/media-libs/x265/x265-2.2.ebuild b/media-libs/x265/x265-2.2.ebuild
index 0608b09..ac326ae 100644
--- a/media-libs/x265/x265-2.2.ebuild
+++ b/media-libs/x265/x265-2.2.ebuild
@@ -22,7 +22,7 @@ HOMEPAGE="http://x265.org/"
LICENSE="GPL-2"
# subslot = libx265 soname
SLOT="0/102"
-IUSE="+10bit +12bit numa pic test"
+IUSE="+10bit +12bit neon numa pic test"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
@@ -30,6 +30,8 @@ DEPEND="${RDEPEND}
abi_x86_32? ( ${ASM_DEPEND} )
abi_x86_64? ( ${ASM_DEPEND} )"
+PATCHES=( "${FILESDIR}/arm.patch" "${FILESDIR}/neon.patch" )
+
src_unpack() {
if [[ ${PV} = 9999* ]]; then
mercurial_src_unpack
@@ -79,6 +81,10 @@ x265_variant_src_configure() {
if [[ ${ABI} = x86 ]] ; then
mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
fi
+ if [[ ${ABI} = arm ]] ; then
+ # 589674
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
;;
"main10")
mycmakeargs+=(
@@ -90,6 +96,10 @@ x265_variant_src_configure() {
if [[ ${ABI} = x86 ]] ; then
mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
fi
+ if [[ ${ABI} = arm ]] ; then
+ # 589674
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
;;
"main")
if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
@@ -134,6 +144,8 @@ multilib_src_configure() {
elif [[ ${ABI} = x32 ]] ; then
# bug #510890
myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ elif [[ ${ABI} = arm ]] ; then
+ mycmakeargs+=( -DENABLE_ASSEMBLY=$(usex neon ON OFF) )
fi
local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
diff --git a/media-libs/x265/x265-9999.ebuild b/media-libs/x265/x265-9999.ebuild
index 3ac5bf9..9edba39 100644
--- a/media-libs/x265/x265-9999.ebuild
+++ b/media-libs/x265/x265-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -21,8 +21,8 @@ HOMEPAGE="http://x265.org/"
LICENSE="GPL-2"
# subslot = libx265 soname
-SLOT="0/104"
-IUSE="+10bit +12bit numa pic test"
+SLOT="0/108"
+IUSE="+10bit +12bit neon numa pic test"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
@@ -30,6 +30,8 @@ DEPEND="${RDEPEND}
abi_x86_32? ( ${ASM_DEPEND} )
abi_x86_64? ( ${ASM_DEPEND} )"
+PATCHES=( "${FILESDIR}/arm.patch" "${FILESDIR}/neon.patch" )
+
src_unpack() {
if [[ ${PV} = 9999* ]]; then
mercurial_src_unpack
@@ -79,6 +81,10 @@ x265_variant_src_configure() {
if [[ ${ABI} = x86 ]] ; then
mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
fi
+ if [[ ${ABI} = arm ]] ; then
+ # 589674
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
;;
"main10")
mycmakeargs+=(
@@ -90,6 +96,10 @@ x265_variant_src_configure() {
if [[ ${ABI} = x86 ]] ; then
mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
fi
+ if [[ ${ABI} = arm ]] ; then
+ # 589674
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
;;
"main")
if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
@@ -134,6 +144,8 @@ multilib_src_configure() {
elif [[ ${ABI} = x32 ]] ; then
# bug #510890
myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ elif [[ ${ABI} = arm ]] ; then
+ mycmakeargs+=( -DENABLE_ASSEMBLY=$(usex neon ON OFF) )
fi
local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/x265/, media-libs/x265/files/
@ 2017-02-17 11:10 Alexis Ballier
0 siblings, 0 replies; 7+ messages in thread
From: Alexis Ballier @ 2017-02-17 11:10 UTC (permalink / raw
To: gentoo-commits
commit: d206b9487177999c596a0d3a141df257923812fd
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 17 10:56:01 2017 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 11:10:05 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d206b948
media-libs/x265: Use a more complete match for ppc64.
Might help wrt https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
Package-Manager: Portage-2.3.3, Repoman-2.3.1
media-libs/x265/files/ppc64.patch | 15 +++++++++++++++
media-libs/x265/x265-2.2.ebuild | 2 +-
media-libs/x265/x265-2.3.ebuild | 2 +-
media-libs/x265/x265-9999.ebuild | 2 +-
4 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/media-libs/x265/files/ppc64.patch b/media-libs/x265/files/ppc64.patch
new file mode 100644
index 0000000000..f453c0de0a
--- /dev/null
+++ b/media-libs/x265/files/ppc64.patch
@@ -0,0 +1,15 @@
+More complete ppc64 matches.
+
+Index: x265_2.2/source/CMakeLists.txt
+===================================================================
+--- x265_2.2.orig/source/CMakeLists.txt
++++ x265_2.2/source/CMakeLists.txt
+@@ -44,7 +44,7 @@ set(X86_ALIASES x86 i386 i686 x86_64 amd
+ set(ARM_ALIASES armv6l armv6j armv7l armv7a)
+ list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
+ list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
+-set(POWER_ALIASES ppc64 ppc64le)
++set(POWER_ALIASES ppc64 ppc64le powerpc64 powerpc64le)
+ list(FIND POWER_ALIASES "${SYSPROC}" POWERMATCH)
+ if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
+ set(X86 1)
diff --git a/media-libs/x265/x265-2.2.ebuild b/media-libs/x265/x265-2.2.ebuild
index 18162f242f..c6ca8a6803 100644
--- a/media-libs/x265/x265-2.2.ebuild
+++ b/media-libs/x265/x265-2.2.ebuild
@@ -30,7 +30,7 @@ DEPEND="${RDEPEND}
abi_x86_32? ( ${ASM_DEPEND} )
abi_x86_64? ( ${ASM_DEPEND} )"
-PATCHES=( "${FILESDIR}/arm.patch" "${FILESDIR}/neon.patch" )
+PATCHES=( "${FILESDIR}/arm.patch" "${FILESDIR}/neon.patch" "${FILESDIR}/ppc64.patch" )
src_unpack() {
if [[ ${PV} = 9999* ]]; then
diff --git a/media-libs/x265/x265-2.3.ebuild b/media-libs/x265/x265-2.3.ebuild
index 49b07f692b..76189dc858 100644
--- a/media-libs/x265/x265-2.3.ebuild
+++ b/media-libs/x265/x265-2.3.ebuild
@@ -30,7 +30,7 @@ DEPEND="${RDEPEND}
abi_x86_32? ( ${ASM_DEPEND} )
abi_x86_64? ( ${ASM_DEPEND} )"
-PATCHES=( "${FILESDIR}/arm.patch" "${FILESDIR}/neon.patch" )
+PATCHES=( "${FILESDIR}/arm.patch" "${FILESDIR}/neon.patch" "${FILESDIR}/ppc64.patch" )
src_unpack() {
if [[ ${PV} = 9999* ]]; then
diff --git a/media-libs/x265/x265-9999.ebuild b/media-libs/x265/x265-9999.ebuild
index 69300360d5..05efee2ad9 100644
--- a/media-libs/x265/x265-9999.ebuild
+++ b/media-libs/x265/x265-9999.ebuild
@@ -30,7 +30,7 @@ DEPEND="${RDEPEND}
abi_x86_32? ( ${ASM_DEPEND} )
abi_x86_64? ( ${ASM_DEPEND} )"
-PATCHES=( "${FILESDIR}/arm.patch" "${FILESDIR}/neon.patch" )
+PATCHES=( "${FILESDIR}/arm.patch" "${FILESDIR}/neon.patch" "${FILESDIR}/ppc64.patch" )
src_unpack() {
if [[ ${PV} = 9999* ]]; then
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/x265/, media-libs/x265/files/
@ 2020-09-08 18:08 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2020-09-08 18:08 UTC (permalink / raw
To: gentoo-commits
commit: 91c314279cf31e6605927cf49e144fc2ddb2896d
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 8 17:10:38 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Sep 8 18:07:42 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91c31427
media-libs/x265: Drop 2.8, 2.9, 3.0, 3.1*, 3.2*, 3.3
Closes: https://bugs.gentoo.org/729628
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
media-libs/x265/Manifest | 8 -
media-libs/x265/files/arm.patch | 34 ----
media-libs/x265/files/non_x86.patch | 20 ---
media-libs/x265/files/ppc64.patch | 15 --
media-libs/x265/files/x265-2.9-detect512.patch | 25 ---
media-libs/x265/files/x265-3.3-arm.patch | 34 ----
media-libs/x265/files/x265-3.3-neon.patch | 16 --
media-libs/x265/metadata.xml | 1 -
media-libs/x265/x265-2.8.ebuild | 197 ----------------------
media-libs/x265/x265-2.9.ebuild | 197 ----------------------
media-libs/x265/x265-3.0.ebuild | 196 ----------------------
media-libs/x265/x265-3.1.2.ebuild | 196 ----------------------
media-libs/x265/x265-3.1.ebuild | 196 ----------------------
media-libs/x265/x265-3.2.1.ebuild | 196 ----------------------
media-libs/x265/x265-3.2.ebuild | 196 ----------------------
media-libs/x265/x265-3.3.ebuild | 220 -------------------------
16 files changed, 1747 deletions(-)
diff --git a/media-libs/x265/Manifest b/media-libs/x265/Manifest
index 0d4b2ec0e0c..54e9273750f 100644
--- a/media-libs/x265/Manifest
+++ b/media-libs/x265/Manifest
@@ -1,9 +1 @@
-DIST x265_2.8.tar.gz 1379551 BLAKE2B c124864a08492739cdde89e44d72c84ad94a0b236d2c59d995e53a26d1a5fb9ec1557a03640a3065a727be69bfb0c0633b50351dc875c9706a1550f488c8ee24 SHA512 c2a8eaec64aa022badcbcd2a96304a9abd9d08489300b6a9c4c9d76066f3d9848e6948238c84ae16ea91bff0b2fac528a67ee29950d94dcd0ea7c0e9e7baa714
-DIST x265_2.9.tar.gz 1385848 BLAKE2B ff14eba55cea0646ad0ffc12f9032c9033d23c9d805939fc3a049911ebae459eee097349f074dcd224bef97d6140dbc37ee9bd3db54c5473b158e135784d2179 SHA512 270818c7fd84947fde371e32bef225c1880cfb0bcd95378d95b51f50577a134d7cd585fcdfa43b103a24d76c5ad826b09509a07eb9e208e8f2b56f2f77365cf3
-DIST x265_3.0.tar.gz 1398519 BLAKE2B e3ac28b01e89ce8a428f294c759644a8177e1b79941aba5e1b53033c236e3445f9afeea96f8adf7e5cdcfff8c790ca9fcadcc8b2de6c31ba3fe9ba87321a8ca8 SHA512 bb7665194ddd4bccbb91c16337463ad4ef32111a1e7779e4cc16964df0992aa99e578cb74fef0edbf41119105e4085574247f60541b0558cc36730ea12d2c6ba
-DIST x265_3.1.2.tar.gz 1419864 BLAKE2B 1eeb210e58d6977f9a048b84e924d690868aa350b6e736f577b5c1a62b9c5b71cfb2b03f004f26839ea44b9db871313bc9888af95999a576dcc167e79d297c61 SHA512 00fc2d8460657c0d2edcc54fd8c4521785c632f8811b74d0cd0a3efa0f06f1fb8cdd6233ad4917c1f40b3c1f1660a6c97ad947e656b7c3e9a51f8ae84afef65a
-DIST x265_3.1.tar.gz 1419649 BLAKE2B b9151f136fdc6c0512f481af6c8d4d575ce4c75ef8891b42ca24ddfd1f4802bfe8cd47bb07dfc1834243560a8d36ddd5ca4d79d7b9f140fbd411b5b80ea6b8d4 SHA512 81905b6286a61fada7cb1632d7f8461295a28e8d53ccd53d3c26c60c7d8091df47a1b694de28caa721f632d66940f5ceeb44d3405dc3b079edd17d21c30e7a7d
-DIST x265_3.2.1.tar.gz 1426255 BLAKE2B 4184cfa290b36f497c5f3a5e3b597bf44e52dd20ba6af21c665d98709c9b984122a339d93aae572756a94549c0c1a293ee195c6c1d34902d298664ecf016f896 SHA512 5cb29b9d4475c1f686f6e31e47ccddde3db1639d5dcf9c058513389a9fdeb35a83b14e30e59498a76dec74bb0b410b6d8f5b1b45d18927be9811bb6a40d8d568
-DIST x265_3.2.tar.gz 1425689 BLAKE2B 58da4aa52381ec89b0aea1dc896fef92d9ec9fc781fd279acd0a338cd872f52482c81c558dde749c1205dbc13341a9851c381d01e2f312f5e2b4712d2242b7d3 SHA512 08c779026fe4c03797efef9d6a898b16c308355311e167c81b976345eb78039725a31294c77a60b76b4ef648d8720e16b2d6524e7108755531a5375231f5313e
-DIST x265_3.3.tar.gz 1438685 BLAKE2B 43806915c3b22fabff71c307dc53e9a3408262528f8ec01bf81168826eee26b468b0e68c738e3c0371f6de6121a3ac090bfaeed0cbfca0a3b8c57710d7f25ad0 SHA512 3d56900ecd58e83d2ecc93d956524e3b0e622dbe3c74a137c7b21f98599245547403401e9ec7f679996fd09fca788aa10272bf17e58a68fce449c8cb555ad7c0
DIST x265_3.4.tar.gz 1469365 BLAKE2B 1021d9d62779d0cecddea56496b4e46bd8ccfd91fdf292efe412dc82b3c974095a5f9bd095057aa08e77b164555adc594549dea6aef7fbc0c025ae7295df721e SHA512 576b18711935e7da8433b2170d24ed159eb12ff1a18399360afa1b2132db33b463145c65ed918f667528ee954bbdfb5c69e5480f1c1df801515cefc592f3206e
diff --git a/media-libs/x265/files/arm.patch b/media-libs/x265/files/arm.patch
deleted file mode 100644
index 69edcdecfb9..00000000000
--- a/media-libs/x265/files/arm.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-More aliases for ARM.
-Do not force CFLAGS for ARM.
-
-Index: source/CMakeLists.txt
-===================================================================
---- source.orig/CMakeLists.txt
-+++ source/CMakeLists.txt
-@@ -41,7 +41,7 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_
- # System architecture detection
- string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
- set(X86_ALIASES x86 i386 i686 x86_64 amd64)
--set(ARM_ALIASES armv6l armv7l)
-+set(ARM_ALIASES armv6l armv6j armv7l armv7a)
- list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
- list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
- set(POWER_ALIASES ppc64 ppc64le)
-@@ -208,15 +208,11 @@ if(GCC)
- endif()
- endif()
- endif()
-- if(ARM AND CROSS_COMPILE_ARM)
-- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
-- elseif(ARM)
-+ if(ARM)
- find_package(Neon)
- if(CPU_HAS_NEON)
-- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
-+ set(ARM_ARGS -mfpu=neon)
- add_definitions(-DHAVE_NEON)
-- else()
-- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
- endif()
- endif()
- add_definitions(${ARM_ARGS})
diff --git a/media-libs/x265/files/non_x86.patch b/media-libs/x265/files/non_x86.patch
deleted file mode 100644
index 3c7e389329a..00000000000
--- a/media-libs/x265/files/non_x86.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-# HG changeset patch
-# User Jayashree <jayashree.c@multicorewareinc.com>
-# Date 1527224165 -19800
-# Fri May 25 10:26:05 2018 +0530
-# Node ID 4504219210793536d921ee4e0b3058698c630bf4
-# Parent cc2c5e46f3c87d27e3602af30b06ba6a0fbe2704
-Fix build error on on ppc64le
-
-diff -r cc2c5e46f3c8 -r 450421921079 source/common/param.cpp
---- a/source/common/param.cpp Mon May 21 18:42:29 2018 +0530
-+++ b/source/common/param.cpp Fri May 25 10:26:05 2018 +0530
-@@ -633,7 +633,7 @@
- if (bValueWasNull)
- p->cpuid = atobool(value);
- else
-- p->cpuid = parseCpuName(value, bError);
-+ p->cpuid = parseCpuName(value, bError, false);
- #endif
- }
- OPT("fps")
diff --git a/media-libs/x265/files/ppc64.patch b/media-libs/x265/files/ppc64.patch
deleted file mode 100644
index f453c0de0a5..00000000000
--- a/media-libs/x265/files/ppc64.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-More complete ppc64 matches.
-
-Index: x265_2.2/source/CMakeLists.txt
-===================================================================
---- x265_2.2.orig/source/CMakeLists.txt
-+++ x265_2.2/source/CMakeLists.txt
-@@ -44,7 +44,7 @@ set(X86_ALIASES x86 i386 i686 x86_64 amd
- set(ARM_ALIASES armv6l armv6j armv7l armv7a)
- list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
- list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
--set(POWER_ALIASES ppc64 ppc64le)
-+set(POWER_ALIASES ppc64 ppc64le powerpc64 powerpc64le)
- list(FIND POWER_ALIASES "${SYSPROC}" POWERMATCH)
- if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
- set(X86 1)
diff --git a/media-libs/x265/files/x265-2.9-detect512.patch b/media-libs/x265/files/x265-2.9-detect512.patch
deleted file mode 100644
index 8437ed09b88..00000000000
--- a/media-libs/x265/files/x265-2.9-detect512.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/source/common/cpu.cpp
-+++ b/source/common/cpu.cpp
-@@ -110,6 +110,11 @@
- { "", 0 },
- };
-
-+bool detect512()
-+{
-+ return(enable512);
-+}
-+
- #if X265_ARCH_X86
-
- extern "C" {
-@@ -123,10 +128,6 @@
- #pragma warning(disable: 4309) // truncation of constant value
- #endif
-
--bool detect512()
--{
-- return(enable512);
--}
- uint32_t cpu_detect(bool benableavx512 )
- {
-
diff --git a/media-libs/x265/files/x265-3.3-arm.patch b/media-libs/x265/files/x265-3.3-arm.patch
deleted file mode 100644
index 7e7c8c58b72..00000000000
--- a/media-libs/x265/files/x265-3.3-arm.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-More aliases for ARM.
-Do not force CFLAGS for ARM.
-
-Index: source/CMakeLists.txt
-===================================================================
---- old/CMakeLists.txt
-+++ new/CMakeLists.txt
-@@ -41,7 +41,7 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_
- # System architecture detection
- string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
- set(X86_ALIASES x86 i386 i686 x86_64 amd64)
--set(ARM_ALIASES armv6l armv7l)
-+set(ARM_ALIASES armv6l armv6j armv7l armv7a)
- list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
- list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
- set(POWER_ALIASES ppc64 ppc64le)
-@@ -208,15 +208,11 @@ if(GCC)
- endif()
- endif()
- endif()
-- if(ARM AND CROSS_COMPILE_ARM)
-- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
-- elseif(ARM)
-+ if(ARM)
- find_package(Neon)
- if(CPU_HAS_NEON)
-- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
-+ set(ARM_ARGS -mfpu=neon)
- add_definitions(-DHAVE_NEON)
-- else()
-- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
- endif()
- endif()
- add_definitions(${ARM_ARGS})
diff --git a/media-libs/x265/files/x265-3.3-neon.patch b/media-libs/x265/files/x265-3.3-neon.patch
deleted file mode 100644
index 316e670febe..00000000000
--- a/media-libs/x265/files/x265-3.3-neon.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-These functions are only built when enabling assembly on ARM; use proper check
-to avoid undefined symbols.
-
-Index: source/common/primitives.cpp
-===================================================================
---- old/common/primitives.cpp
-+++ new/common/primitives.cpp
-@@ -270,7 +270,7 @@ void PFX(cpu_emms)(void) {}
- void PFX(cpu_cpuid)(uint32_t, uint32_t *eax, uint32_t *, uint32_t *, uint32_t *) { *eax = 0; }
- void PFX(cpu_xgetbv)(uint32_t, uint32_t *, uint32_t *) {}
-
--#if X265_ARCH_ARM == 0
-+#if X265_ARCH_ARM == 0 || !defined(ENABLE_ASSEMBLY)
- void PFX(cpu_neon_test)(void) {}
- int PFX(cpu_fast_neon_mrc_test)(void) { return 0; }
- #endif // X265_ARCH_ARM
diff --git a/media-libs/x265/metadata.xml b/media-libs/x265/metadata.xml
index 2049b41f26e..ed61a9259d5 100644
--- a/media-libs/x265/metadata.xml
+++ b/media-libs/x265/metadata.xml
@@ -5,7 +5,6 @@
<email>media-video@gentoo.org</email>
</maintainer>
<use>
- <flag name="asm">Enable x86_64 assembly optimizations.</flag>
<flag name="10bit">Add support for producing 10bits HEVC.</flag>
<flag name="12bit">Add support for producing 12bits HEVC.</flag>
<flag name="numa">Build with support for NUMA nodes.</flag>
diff --git a/media-libs/x265/x265-2.8.ebuild b/media-libs/x265/x265-2.8.ebuild
deleted file mode 100644
index 3041c243b77..00000000000
--- a/media-libs/x265/x265-2.8.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils multilib-minimal multilib multibuild flag-o-matic
-
-if [[ ${PV} = 9999* ]]; then
- inherit mercurial
- EHG_REPO_URI="https://bitbucket.org/multicoreware/x265"
-else
- SRC_URI="https://bitbucket.org/multicoreware/x265/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="amd64 arm ~arm64 hppa ~ia64 ppc ppc64 x86"
-fi
-
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="http://x265.org/"
-
-LICENSE="GPL-2"
-# subslot = libx265 soname
-SLOT="0/160"
-IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
-RESTRICT="!test? ( test )"
-
-ASM_DEPEND=">=dev-lang/yasm-1.2.0"
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/arm.patch"
- "${FILESDIR}/neon.patch"
- "${FILESDIR}/ppc64.patch"
- "${FILESDIR}/non_x86.patch"
-)
-
-src_unpack() {
- if [[ ${PV} = 9999* ]]; then
- mercurial_src_unpack
- # Can't set it at global scope due to mercurial.eclass limitations...
- export S=${WORKDIR}/${P}/source
- else
- unpack ${A}
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
- fi
-}
-
-# By default, the library and the encoder is configured for only one output bit
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
-# files with a different bit depth, which is annoying. However, upstream
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
-# that together so that the resulting library can produce all three of them
-# instead of only one.
-# The API requires the bit depth parameter, so that libx265 can then chose which
-# variant of the encoder to use.
-# To achieve this, we have to build one (static) library for each non-main
-# variant, and link it into the main library.
-# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it: "main" *MUST* come last in the following list.
-
-x265_get_variants() {
- local variants=""
- use 12bit && variants+="main12 "
- use 10bit && variants+="main10 "
- variants+="main"
- echo "${variants}"
-}
-
-x265_variant_src_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
-
- local mycmakeargs=( "${myabicmakeargs[@]}" )
- case "${MULTIBUILD_VARIANT}" in
- "main12")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DMAIN12=ON
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main10")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main")
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist=""
- for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS=-L.
- -DLINKED_10BIT=$(usex 10bit)
- -DLINKED_12BIT=$(usex 12bit)
- )
- fi
- ;;
- *)
- die "Unknown variant: ${MULTIBUILD_VARIANT}";;
- esac
- cmake-utils_src_configure
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- append-cflags -fPIC
- append-cxxflags -fPIC
- local myabicmakeargs=(
- $(cmake-utils_use_enable test TESTS)
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
- -DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DLIB_INSTALL_DIR="$(get_libdir)"
- )
-
- if [[ ${ABI} = x86 ]] ; then
- # Bug #528202
- if use pic ; then
- ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it."
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- elif [[ ${ABI} = x32 ]] ; then
- # bug #510890
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = arm ]] ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=$(usex pic OFF $(usex cpu_flags_arm_neon ON OFF)) )
- use cpu_flags_arm_neon && use pic && ewarn "PIC has been requested but arm neon asm is not PIC-safe, disabling it."
- fi
-
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_configure
-}
-
-multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant cmake-utils_src_compile
-}
-
-x265_variant_src_test() {
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
- "${BUILD_DIR}/test/TestBench" || die
- else
- einfo "Unit tests check only assembly."
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
- einfo "Skipping tests."
- fi
-}
-
-multilib_src_test() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_test
-}
-
-multilib_src_install() {
- # Install only "main" variant since the others are already linked into it.
- local MULTIBUILD_VARIANTS=( "main" )
- multibuild_foreach_variant cmake-utils_src_install
-}
-
-multilib_src_install_all() {
- dodoc -r "${S}/../doc/"*
-}
diff --git a/media-libs/x265/x265-2.9.ebuild b/media-libs/x265/x265-2.9.ebuild
deleted file mode 100644
index ead3e157954..00000000000
--- a/media-libs/x265/x265-2.9.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils multilib-minimal multilib multibuild flag-o-matic
-
-if [[ ${PV} = 9999* ]]; then
- inherit mercurial
- EHG_REPO_URI="https://bitbucket.org/multicoreware/x265"
-else
- SRC_URI="https://bitbucket.org/multicoreware/x265/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
-fi
-
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="http://x265.org/"
-
-LICENSE="GPL-2"
-# subslot = libx265 soname
-SLOT="0/165"
-IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
-RESTRICT="!test? ( test )"
-
-ASM_DEPEND=">=dev-lang/yasm-1.2.0"
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/arm.patch"
- "${FILESDIR}/neon.patch"
- "${FILESDIR}/ppc64.patch"
- "${FILESDIR}"/${PN}-2.9-detect512.patch
-)
-
-src_unpack() {
- if [[ ${PV} = 9999* ]]; then
- mercurial_src_unpack
- # Can't set it at global scope due to mercurial.eclass limitations...
- export S=${WORKDIR}/${P}/source
- else
- unpack ${A}
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
- fi
-}
-
-# By default, the library and the encoder is configured for only one output bit
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
-# files with a different bit depth, which is annoying. However, upstream
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
-# that together so that the resulting library can produce all three of them
-# instead of only one.
-# The API requires the bit depth parameter, so that libx265 can then chose which
-# variant of the encoder to use.
-# To achieve this, we have to build one (static) library for each non-main
-# variant, and link it into the main library.
-# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it: "main" *MUST* come last in the following list.
-
-x265_get_variants() {
- local variants=""
- use 12bit && variants+="main12 "
- use 10bit && variants+="main10 "
- variants+="main"
- echo "${variants}"
-}
-
-x265_variant_src_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
-
- local mycmakeargs=( "${myabicmakeargs[@]}" )
- case "${MULTIBUILD_VARIANT}" in
- "main12")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DMAIN12=ON
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main10")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main")
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist=""
- for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS=-L.
- -DLINKED_10BIT=$(usex 10bit)
- -DLINKED_12BIT=$(usex 12bit)
- )
- fi
- ;;
- *)
- die "Unknown variant: ${MULTIBUILD_VARIANT}";;
- esac
- cmake-utils_src_configure
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- append-cflags -fPIC
- append-cxxflags -fPIC
- local myabicmakeargs=(
- $(cmake-utils_use_enable test TESTS)
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
- -DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DLIB_INSTALL_DIR="$(get_libdir)"
- )
-
- if [[ ${ABI} = x86 ]] ; then
- # Bug #528202
- if use pic ; then
- ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it."
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- elif [[ ${ABI} = x32 ]] ; then
- # bug #510890
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = arm ]] ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=$(usex pic OFF $(usex cpu_flags_arm_neon ON OFF)) )
- use cpu_flags_arm_neon && use pic && ewarn "PIC has been requested but arm neon asm is not PIC-safe, disabling it."
- fi
-
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_configure
-}
-
-multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant cmake-utils_src_compile
-}
-
-x265_variant_src_test() {
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
- "${BUILD_DIR}/test/TestBench" || die
- else
- einfo "Unit tests check only assembly."
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
- einfo "Skipping tests."
- fi
-}
-
-multilib_src_test() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_test
-}
-
-multilib_src_install() {
- # Install only "main" variant since the others are already linked into it.
- local MULTIBUILD_VARIANTS=( "main" )
- multibuild_foreach_variant cmake-utils_src_install
-}
-
-multilib_src_install_all() {
- dodoc -r "${S}/../doc/"*
-}
diff --git a/media-libs/x265/x265-3.0.ebuild b/media-libs/x265/x265-3.0.ebuild
deleted file mode 100644
index df633a2e1d7..00000000000
--- a/media-libs/x265/x265-3.0.ebuild
+++ /dev/null
@@ -1,196 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils multilib-minimal multilib multibuild flag-o-matic
-
-if [[ ${PV} = 9999* ]]; then
- inherit mercurial
- EHG_REPO_URI="https://bitbucket.org/multicoreware/x265"
-else
- SRC_URI="https://bitbucket.org/multicoreware/x265/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
-fi
-
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="http://x265.org/"
-
-LICENSE="GPL-2"
-# subslot = libx265 soname
-SLOT="0/169"
-IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
-RESTRICT="!test? ( test )"
-
-ASM_DEPEND=">=dev-lang/yasm-1.2.0"
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/arm.patch"
- "${FILESDIR}/neon.patch"
- "${FILESDIR}/ppc64.patch"
-)
-
-src_unpack() {
- if [[ ${PV} = 9999* ]]; then
- mercurial_src_unpack
- # Can't set it at global scope due to mercurial.eclass limitations...
- export S=${WORKDIR}/${P}/source
- else
- unpack ${A}
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
- fi
-}
-
-# By default, the library and the encoder is configured for only one output bit
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
-# files with a different bit depth, which is annoying. However, upstream
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
-# that together so that the resulting library can produce all three of them
-# instead of only one.
-# The API requires the bit depth parameter, so that libx265 can then chose which
-# variant of the encoder to use.
-# To achieve this, we have to build one (static) library for each non-main
-# variant, and link it into the main library.
-# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it: "main" *MUST* come last in the following list.
-
-x265_get_variants() {
- local variants=""
- use 12bit && variants+="main12 "
- use 10bit && variants+="main10 "
- variants+="main"
- echo "${variants}"
-}
-
-x265_variant_src_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
-
- local mycmakeargs=( "${myabicmakeargs[@]}" )
- case "${MULTIBUILD_VARIANT}" in
- "main12")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DMAIN12=ON
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main10")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main")
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist=""
- for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS=-L.
- -DLINKED_10BIT=$(usex 10bit)
- -DLINKED_12BIT=$(usex 12bit)
- )
- fi
- ;;
- *)
- die "Unknown variant: ${MULTIBUILD_VARIANT}";;
- esac
- cmake-utils_src_configure
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- append-cflags -fPIC
- append-cxxflags -fPIC
- local myabicmakeargs=(
- $(cmake-utils_use_enable test TESTS)
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
- -DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DLIB_INSTALL_DIR="$(get_libdir)"
- )
-
- if [[ ${ABI} = x86 ]] ; then
- # Bug #528202
- if use pic ; then
- ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it."
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- elif [[ ${ABI} = x32 ]] ; then
- # bug #510890
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = arm ]] ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=$(usex pic OFF $(usex cpu_flags_arm_neon ON OFF)) )
- use cpu_flags_arm_neon && use pic && ewarn "PIC has been requested but arm neon asm is not PIC-safe, disabling it."
- fi
-
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_configure
-}
-
-multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant cmake-utils_src_compile
-}
-
-x265_variant_src_test() {
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
- "${BUILD_DIR}/test/TestBench" || die
- else
- einfo "Unit tests check only assembly."
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
- einfo "Skipping tests."
- fi
-}
-
-multilib_src_test() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_test
-}
-
-multilib_src_install() {
- # Install only "main" variant since the others are already linked into it.
- local MULTIBUILD_VARIANTS=( "main" )
- multibuild_foreach_variant cmake-utils_src_install
-}
-
-multilib_src_install_all() {
- dodoc -r "${S}/../doc/"*
-}
diff --git a/media-libs/x265/x265-3.1.2.ebuild b/media-libs/x265/x265-3.1.2.ebuild
deleted file mode 100644
index b69d74af980..00000000000
--- a/media-libs/x265/x265-3.1.2.ebuild
+++ /dev/null
@@ -1,196 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils multilib-minimal multilib multibuild flag-o-matic
-
-if [[ ${PV} = 9999* ]]; then
- inherit mercurial
- EHG_REPO_URI="https://bitbucket.org/multicoreware/x265"
-else
- SRC_URI="https://bitbucket.org/multicoreware/x265/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
-fi
-
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="http://x265.org/"
-
-LICENSE="GPL-2"
-# subslot = libx265 soname
-SLOT="0/176"
-IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
-RESTRICT="!test? ( test )"
-
-ASM_DEPEND=">=dev-lang/yasm-1.2.0"
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/arm.patch"
- "${FILESDIR}/neon.patch"
- "${FILESDIR}/ppc64.patch"
-)
-
-src_unpack() {
- if [[ ${PV} = 9999* ]]; then
- mercurial_src_unpack
- # Can't set it at global scope due to mercurial.eclass limitations...
- export S=${WORKDIR}/${P}/source
- else
- unpack ${A}
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
- fi
-}
-
-# By default, the library and the encoder is configured for only one output bit
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
-# files with a different bit depth, which is annoying. However, upstream
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
-# that together so that the resulting library can produce all three of them
-# instead of only one.
-# The API requires the bit depth parameter, so that libx265 can then chose which
-# variant of the encoder to use.
-# To achieve this, we have to build one (static) library for each non-main
-# variant, and link it into the main library.
-# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it: "main" *MUST* come last in the following list.
-
-x265_get_variants() {
- local variants=""
- use 12bit && variants+="main12 "
- use 10bit && variants+="main10 "
- variants+="main"
- echo "${variants}"
-}
-
-x265_variant_src_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
-
- local mycmakeargs=( "${myabicmakeargs[@]}" )
- case "${MULTIBUILD_VARIANT}" in
- "main12")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DMAIN12=ON
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main10")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main")
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist=""
- for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS=-L.
- -DLINKED_10BIT=$(usex 10bit)
- -DLINKED_12BIT=$(usex 12bit)
- )
- fi
- ;;
- *)
- die "Unknown variant: ${MULTIBUILD_VARIANT}";;
- esac
- cmake-utils_src_configure
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- append-cflags -fPIC
- append-cxxflags -fPIC
- local myabicmakeargs=(
- $(cmake-utils_use_enable test TESTS)
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
- -DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DLIB_INSTALL_DIR="$(get_libdir)"
- )
-
- if [[ ${ABI} = x86 ]] ; then
- # Bug #528202
- if use pic ; then
- ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it."
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- elif [[ ${ABI} = x32 ]] ; then
- # bug #510890
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = arm ]] ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=$(usex pic OFF $(usex cpu_flags_arm_neon ON OFF)) )
- use cpu_flags_arm_neon && use pic && ewarn "PIC has been requested but arm neon asm is not PIC-safe, disabling it."
- fi
-
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_configure
-}
-
-multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant cmake-utils_src_compile
-}
-
-x265_variant_src_test() {
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
- "${BUILD_DIR}/test/TestBench" || die
- else
- einfo "Unit tests check only assembly."
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
- einfo "Skipping tests."
- fi
-}
-
-multilib_src_test() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_test
-}
-
-multilib_src_install() {
- # Install only "main" variant since the others are already linked into it.
- local MULTIBUILD_VARIANTS=( "main" )
- multibuild_foreach_variant cmake-utils_src_install
-}
-
-multilib_src_install_all() {
- dodoc -r "${S}/../doc/"*
-}
diff --git a/media-libs/x265/x265-3.1.ebuild b/media-libs/x265/x265-3.1.ebuild
deleted file mode 100644
index b69d74af980..00000000000
--- a/media-libs/x265/x265-3.1.ebuild
+++ /dev/null
@@ -1,196 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils multilib-minimal multilib multibuild flag-o-matic
-
-if [[ ${PV} = 9999* ]]; then
- inherit mercurial
- EHG_REPO_URI="https://bitbucket.org/multicoreware/x265"
-else
- SRC_URI="https://bitbucket.org/multicoreware/x265/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
-fi
-
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="http://x265.org/"
-
-LICENSE="GPL-2"
-# subslot = libx265 soname
-SLOT="0/176"
-IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
-RESTRICT="!test? ( test )"
-
-ASM_DEPEND=">=dev-lang/yasm-1.2.0"
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/arm.patch"
- "${FILESDIR}/neon.patch"
- "${FILESDIR}/ppc64.patch"
-)
-
-src_unpack() {
- if [[ ${PV} = 9999* ]]; then
- mercurial_src_unpack
- # Can't set it at global scope due to mercurial.eclass limitations...
- export S=${WORKDIR}/${P}/source
- else
- unpack ${A}
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
- fi
-}
-
-# By default, the library and the encoder is configured for only one output bit
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
-# files with a different bit depth, which is annoying. However, upstream
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
-# that together so that the resulting library can produce all three of them
-# instead of only one.
-# The API requires the bit depth parameter, so that libx265 can then chose which
-# variant of the encoder to use.
-# To achieve this, we have to build one (static) library for each non-main
-# variant, and link it into the main library.
-# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it: "main" *MUST* come last in the following list.
-
-x265_get_variants() {
- local variants=""
- use 12bit && variants+="main12 "
- use 10bit && variants+="main10 "
- variants+="main"
- echo "${variants}"
-}
-
-x265_variant_src_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
-
- local mycmakeargs=( "${myabicmakeargs[@]}" )
- case "${MULTIBUILD_VARIANT}" in
- "main12")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DMAIN12=ON
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main10")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main")
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist=""
- for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS=-L.
- -DLINKED_10BIT=$(usex 10bit)
- -DLINKED_12BIT=$(usex 12bit)
- )
- fi
- ;;
- *)
- die "Unknown variant: ${MULTIBUILD_VARIANT}";;
- esac
- cmake-utils_src_configure
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- append-cflags -fPIC
- append-cxxflags -fPIC
- local myabicmakeargs=(
- $(cmake-utils_use_enable test TESTS)
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
- -DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DLIB_INSTALL_DIR="$(get_libdir)"
- )
-
- if [[ ${ABI} = x86 ]] ; then
- # Bug #528202
- if use pic ; then
- ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it."
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- elif [[ ${ABI} = x32 ]] ; then
- # bug #510890
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = arm ]] ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=$(usex pic OFF $(usex cpu_flags_arm_neon ON OFF)) )
- use cpu_flags_arm_neon && use pic && ewarn "PIC has been requested but arm neon asm is not PIC-safe, disabling it."
- fi
-
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_configure
-}
-
-multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant cmake-utils_src_compile
-}
-
-x265_variant_src_test() {
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
- "${BUILD_DIR}/test/TestBench" || die
- else
- einfo "Unit tests check only assembly."
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
- einfo "Skipping tests."
- fi
-}
-
-multilib_src_test() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_test
-}
-
-multilib_src_install() {
- # Install only "main" variant since the others are already linked into it.
- local MULTIBUILD_VARIANTS=( "main" )
- multibuild_foreach_variant cmake-utils_src_install
-}
-
-multilib_src_install_all() {
- dodoc -r "${S}/../doc/"*
-}
diff --git a/media-libs/x265/x265-3.2.1.ebuild b/media-libs/x265/x265-3.2.1.ebuild
deleted file mode 100644
index 6ce84bf0fa1..00000000000
--- a/media-libs/x265/x265-3.2.1.ebuild
+++ /dev/null
@@ -1,196 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils multilib-minimal multilib multibuild flag-o-matic
-
-if [[ ${PV} = 9999* ]]; then
- inherit mercurial
- EHG_REPO_URI="https://bitbucket.org/multicoreware/x265"
-else
- SRC_URI="https://bitbucket.org/multicoreware/x265/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
-fi
-
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="http://x265.org/"
-
-LICENSE="GPL-2"
-# subslot = libx265 soname
-SLOT="0/179"
-IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
-RESTRICT="!test? ( test )"
-
-ASM_DEPEND=">=dev-lang/yasm-1.2.0"
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/arm.patch"
- "${FILESDIR}/neon.patch"
- "${FILESDIR}/ppc64.patch"
-)
-
-src_unpack() {
- if [[ ${PV} = 9999* ]]; then
- mercurial_src_unpack
- # Can't set it at global scope due to mercurial.eclass limitations...
- export S=${WORKDIR}/${P}/source
- else
- unpack ${A}
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
- fi
-}
-
-# By default, the library and the encoder is configured for only one output bit
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
-# files with a different bit depth, which is annoying. However, upstream
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
-# that together so that the resulting library can produce all three of them
-# instead of only one.
-# The API requires the bit depth parameter, so that libx265 can then chose which
-# variant of the encoder to use.
-# To achieve this, we have to build one (static) library for each non-main
-# variant, and link it into the main library.
-# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it: "main" *MUST* come last in the following list.
-
-x265_get_variants() {
- local variants=""
- use 12bit && variants+="main12 "
- use 10bit && variants+="main10 "
- variants+="main"
- echo "${variants}"
-}
-
-x265_variant_src_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
-
- local mycmakeargs=( "${myabicmakeargs[@]}" )
- case "${MULTIBUILD_VARIANT}" in
- "main12")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DMAIN12=ON
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main10")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main")
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist=""
- for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS=-L.
- -DLINKED_10BIT=$(usex 10bit)
- -DLINKED_12BIT=$(usex 12bit)
- )
- fi
- ;;
- *)
- die "Unknown variant: ${MULTIBUILD_VARIANT}";;
- esac
- cmake-utils_src_configure
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- append-cflags -fPIC
- append-cxxflags -fPIC
- local myabicmakeargs=(
- $(cmake-utils_use_enable test TESTS)
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
- -DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DLIB_INSTALL_DIR="$(get_libdir)"
- )
-
- if [[ ${ABI} = x86 ]] ; then
- # Bug #528202
- if use pic ; then
- ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it."
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- elif [[ ${ABI} = x32 ]] ; then
- # bug #510890
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = arm ]] ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=$(usex pic OFF $(usex cpu_flags_arm_neon ON OFF)) )
- use cpu_flags_arm_neon && use pic && ewarn "PIC has been requested but arm neon asm is not PIC-safe, disabling it."
- fi
-
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_configure
-}
-
-multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant cmake-utils_src_compile
-}
-
-x265_variant_src_test() {
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
- "${BUILD_DIR}/test/TestBench" || die
- else
- einfo "Unit tests check only assembly."
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
- einfo "Skipping tests."
- fi
-}
-
-multilib_src_test() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_test
-}
-
-multilib_src_install() {
- # Install only "main" variant since the others are already linked into it.
- local MULTIBUILD_VARIANTS=( "main" )
- multibuild_foreach_variant cmake-utils_src_install
-}
-
-multilib_src_install_all() {
- dodoc -r "${S}/../doc/"*
-}
diff --git a/media-libs/x265/x265-3.2.ebuild b/media-libs/x265/x265-3.2.ebuild
deleted file mode 100644
index 6ce84bf0fa1..00000000000
--- a/media-libs/x265/x265-3.2.ebuild
+++ /dev/null
@@ -1,196 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils multilib-minimal multilib multibuild flag-o-matic
-
-if [[ ${PV} = 9999* ]]; then
- inherit mercurial
- EHG_REPO_URI="https://bitbucket.org/multicoreware/x265"
-else
- SRC_URI="https://bitbucket.org/multicoreware/x265/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
-fi
-
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="http://x265.org/"
-
-LICENSE="GPL-2"
-# subslot = libx265 soname
-SLOT="0/179"
-IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
-RESTRICT="!test? ( test )"
-
-ASM_DEPEND=">=dev-lang/yasm-1.2.0"
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/arm.patch"
- "${FILESDIR}/neon.patch"
- "${FILESDIR}/ppc64.patch"
-)
-
-src_unpack() {
- if [[ ${PV} = 9999* ]]; then
- mercurial_src_unpack
- # Can't set it at global scope due to mercurial.eclass limitations...
- export S=${WORKDIR}/${P}/source
- else
- unpack ${A}
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
- fi
-}
-
-# By default, the library and the encoder is configured for only one output bit
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
-# files with a different bit depth, which is annoying. However, upstream
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
-# that together so that the resulting library can produce all three of them
-# instead of only one.
-# The API requires the bit depth parameter, so that libx265 can then chose which
-# variant of the encoder to use.
-# To achieve this, we have to build one (static) library for each non-main
-# variant, and link it into the main library.
-# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it: "main" *MUST* come last in the following list.
-
-x265_get_variants() {
- local variants=""
- use 12bit && variants+="main12 "
- use 10bit && variants+="main10 "
- variants+="main"
- echo "${variants}"
-}
-
-x265_variant_src_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
-
- local mycmakeargs=( "${myabicmakeargs[@]}" )
- case "${MULTIBUILD_VARIANT}" in
- "main12")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DMAIN12=ON
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main10")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = ppc64 ]] ; then
- # https://bugs.gentoo.org/show_bug.cgi?id=607802#c5
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF )
- fi
- ;;
- "main")
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist=""
- for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS=-L.
- -DLINKED_10BIT=$(usex 10bit)
- -DLINKED_12BIT=$(usex 12bit)
- )
- fi
- ;;
- *)
- die "Unknown variant: ${MULTIBUILD_VARIANT}";;
- esac
- cmake-utils_src_configure
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- append-cflags -fPIC
- append-cxxflags -fPIC
- local myabicmakeargs=(
- $(cmake-utils_use_enable test TESTS)
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
- -DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DLIB_INSTALL_DIR="$(get_libdir)"
- )
-
- if [[ ${ABI} = x86 ]] ; then
- # Bug #528202
- if use pic ; then
- ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it."
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- elif [[ ${ABI} = x32 ]] ; then
- # bug #510890
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = arm ]] ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=$(usex pic OFF $(usex cpu_flags_arm_neon ON OFF)) )
- use cpu_flags_arm_neon && use pic && ewarn "PIC has been requested but arm neon asm is not PIC-safe, disabling it."
- fi
-
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_configure
-}
-
-multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant cmake-utils_src_compile
-}
-
-x265_variant_src_test() {
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
- "${BUILD_DIR}/test/TestBench" || die
- else
- einfo "Unit tests check only assembly."
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
- einfo "Skipping tests."
- fi
-}
-
-multilib_src_test() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_test
-}
-
-multilib_src_install() {
- # Install only "main" variant since the others are already linked into it.
- local MULTIBUILD_VARIANTS=( "main" )
- multibuild_foreach_variant cmake-utils_src_install
-}
-
-multilib_src_install_all() {
- dodoc -r "${S}/../doc/"*
-}
diff --git a/media-libs/x265/x265-3.3.ebuild b/media-libs/x265/x265-3.3.ebuild
deleted file mode 100644
index 1bcd7b28a79..00000000000
--- a/media-libs/x265/x265-3.3.ebuild
+++ /dev/null
@@ -1,220 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_ECLASS=cmake
-inherit flag-o-matic multibuild cmake-multilib
-
-if [[ ${PV} = 9999* ]]; then
- inherit mercurial
- EHG_REPO_URI="https://bitbucket.org/multicoreware/x265"
-else
- SRC_URI="https://bitbucket.org/multicoreware/x265/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
-fi
-
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="http://x265.org/ https://bitbucket.org/multicoreware/x265/wiki/Home"
-
-LICENSE="GPL-2"
-# subslot = libx265 soname
-SLOT="0/188"
-IUSE="+asm +10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa test"
-
-# Test suite requires assembly support and is known to be broken
-RESTRICT="test"
-
-ASM_DEPEND=">=dev-lang/nasm-2.13"
-
-BDEPEND="asm? (
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )
- )"
-
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.3-arm.patch
- "${FILESDIR}"/${PN}-3.3-neon.patch
- "${FILESDIR}"/${PN}-3.3-ppc64.patch
-)
-
-src_unpack() {
- if [[ ${PV} = 9999* ]] ; then
- mercurial_src_unpack
- # Can't set it at global scope due to mercurial.eclass limitations...
- export S=${WORKDIR}/${P}/source
- else
- unpack ${A}
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
- fi
-}
-
-# By default, the library and the encoder is configured for only one output bit
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
-# files with a different bit depth, which is annoying. However, upstream
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
-# that together so that the resulting library can produce all three of them
-# instead of only one.
-# The API requires the bit depth parameter, so that libx265 can then chose which
-# variant of the encoder to use.
-# To achieve this, we have to build one (static) library for each non-main
-# variant, and link it into the main library.
-# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it: "main" *MUST* come last in the following list.
-
-x265_get_variants() {
- local -a variants=()
- use 12bit && variants+=( main12 )
- use 10bit && variants+=( main10 )
- variants+=( main )
- echo "${variants[@]}"
-}
-
-x265_variant_src_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
-
- local mycmakeargs=( "${myabicmakeargs[@]}" )
- case "${MULTIBUILD_VARIANT}" in
- "main12")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DMAIN12=ON
- )
- # disable altivec for 12bit build #607802#c5
- [[ ${ABI} = ppc* ]] && mycmakeargs+=( -DENABLE_ALTIVEC=OFF )
- ;;
- "main10")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- )
- # disable altivec for 10bit build #607802#c5
- [[ ${ABI} = ppc* ]] && mycmakeargs+=( -DENABLE_ALTIVEC=OFF )
- ;;
- "main")
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist="" v=
- for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS=-L.
- -DLINKED_10BIT=$(usex 10bit)
- -DLINKED_12BIT=$(usex 12bit)
- )
- # we have to handle ppc here and not in multilib_src_configure
- # because we want those flags apply ONLY to "main" variant
- if [[ ${ABI} = ppc* ]] ; then
- myabicmakeargs+=(
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
- )
- fi
- fi
- ;;
- *)
- die "Unknown variant: ${MULTIBUILD_VARIANT}";;
- esac
-
- cmake_src_configure
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- local myabicmakeargs=(
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
- -DENABLE_PIC=ON
- -DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DLIB_INSTALL_DIR="$(get_libdir)"
- )
-
- local supports_asm=yes
-
- if [[ ${ABI} = x86 ]] ; then
- if use asm ; then
- # Bug #528202
- ewarn "x86 asm is not PIC-safe, disabling it."
- supports_asm=no
- fi
- elif [[ ${ABI} = x32 ]] ; then
- if use asm ; then
- # bug #510890
- ewarn "x32 ABI doesn't support asm"
- supports_asm=no
- fi
- elif [[ ${ABI} = arm ]] ; then
- if use asm && use cpu_flags_arm_neon ; then
- supports_asm=yes
- elif use asm ; then
- ewarn "arm asm is not PIC-safe, disabling it."
- supports_asm=no
- fi
- elif [[ ${ABI} = ppc* ]] ; then
- if use asm ; then
- ewarn "ppc64 uses altivec instead of asm, disabling it."
- supports_asm=no
- fi
- fi
-
- if [[ "${supports_asm}" = yes ]] && use asm ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=ON )
-
- if multilib_is_native_abi ; then
- myabicmakeargs+=( -DENABLE_TESTS=$(usex test ON OFF) )
- fi
- else
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
-
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_configure
-}
-
-multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant cmake_src_compile
-}
-
-x265_variant_src_test() {
- if [[ -x "${BUILD_DIR}/test/TestBench" ]] ; then
- "${BUILD_DIR}/test/TestBench" || die
- else
- einfo "Unit tests check only assembly."
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
- einfo "Skipping tests."
- fi
-}
-
-multilib_src_test() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_test
-}
-
-multilib_src_install() {
- # Install only "main" variant since the others are already linked into it.
- local MULTIBUILD_VARIANTS=( "main" )
- multibuild_foreach_variant cmake_src_install
-}
-
-multilib_src_install_all() {
- dodoc -r "${S}/../doc/"*
-
- # we don't install *.a files for all variants,
- # so just delete these files instead of pretending
- # real USE=static-libs support
- find "${ED}" -name "*.a" -delete || die
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/x265/, media-libs/x265/files/
@ 2024-08-25 15:44 Sam James
0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2024-08-25 15:44 UTC (permalink / raw
To: gentoo-commits
commit: 86fff0790dd62c7e91afbfecbf52ed9300a83e19
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Fri Aug 23 16:43:10 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 25 15:43:06 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86fff079
media-libs/x265: add 3.5-r5, ebuild cleanup
Clean up cruft and duplicate code.
Split up patches so we can re-use them.
Silently disable tests on x86, x32 and arm32. They never worked, have no deps
and were failing before because the options was not visible.
Closes: https://bugs.gentoo.org/728748
Closes: https://bugs.gentoo.org/937416
Closes: https://bugs.gentoo.org/937750
Closes: https://bugs.gentoo.org/937753
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/x265/files/test-ns.patch | 55 +++---
media-libs/x265/files/x265-3.5-r5-cpp-std.patch | 23 +++
media-libs/x265/files/x265-3.5-r5-gcc15.patch | 29 ++++
media-libs/x265/files/x265-3.5-r5-test-ns_2.patch | 11 ++
media-libs/x265/files/x265-9999-test-ns.patch | 157 +++++++++--------
media-libs/x265/metadata.xml | 1 -
media-libs/x265/x265-3.5-r3.ebuild | 1 +
media-libs/x265/x265-3.5-r4.ebuild | 1 +
media-libs/x265/x265-3.5-r5.ebuild | 195 ++++++++++++++++++++++
media-libs/x265/x265-9999.ebuild | 195 ++++++++++------------
10 files changed, 452 insertions(+), 216 deletions(-)
diff --git a/media-libs/x265/files/test-ns.patch b/media-libs/x265/files/test-ns.patch
index 898751a7ae2d..86cadade6a09 100644
--- a/media-libs/x265/files/test-ns.patch
+++ b/media-libs/x265/files/test-ns.patch
@@ -1,7 +1,5 @@
Namespace functions for multi-bitdepth builds so that libraries are self-contained.
-Index: source/common/param.h
-===================================================================
--- source.orig/common/param.h
+++ source/common/param.h
@@ -53,6 +53,18 @@ int x265_param_default_preset(x265_param
@@ -23,8 +21,6 @@ Index: source/common/param.h
#define PARAM_NS X265_NS
#endif
}
-Index: source/encoder/api.cpp
-===================================================================
--- source.orig/encoder/api.cpp
+++ source/encoder/api.cpp
@@ -106,9 +106,9 @@ x265_encoder *x265_encoder_open(x265_par
@@ -58,15 +54,6 @@ Index: source/encoder/api.cpp
}
x265_copy_params(&save, encoder->m_latestParam);
int ret = encoder->reconfigureParam(encoder->m_latestParam, param_in);
-@@ -604,7 +604,7 @@ fail:
- *pi_nal = 0;
-
- if (numEncoded && encoder->m_param->csvLogLevel && encoder->m_outputCount >= encoder->m_latestParam->chunkStart)
-- x265_csvlog_frame(encoder->m_param, pic_out);
-+ PARAM_NS::x265_csvlog_frame(encoder->m_param, pic_out);
-
- if (numEncoded < 0)
- encoder->m_aborted = true;
@@ -637,7 +637,7 @@ void x265_vmaf_encoder_log(x265_encoder*
encoder->fetchStats(&stats, sizeof(stats));
int padx = encoder->m_sps.conformanceWindow.rightOffset;
@@ -76,15 +63,6 @@ Index: source/encoder/api.cpp
}
}
#endif
-@@ -651,7 +651,7 @@ void x265_encoder_log(x265_encoder* enc,
- encoder->fetchStats(&stats, sizeof(stats));
- int padx = encoder->m_sps.conformanceWindow.rightOffset;
- int pady = encoder->m_sps.conformanceWindow.bottomOffset;
-- x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
-+ PARAM_NS::x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
- }
- }
-
@@ -872,7 +872,7 @@ void x265_alloc_analysis_data(x265_param
return;
@@ -94,8 +72,6 @@ Index: source/encoder/api.cpp
}
void x265_free_analysis_data(x265_param *param, x265_analysis_data* analysis)
-Index: source/encoder/encoder.cpp
-===================================================================
--- source.orig/encoder/encoder.cpp
+++ source/encoder/encoder.cpp
@@ -186,8 +186,8 @@ void Encoder::create()
@@ -127,15 +103,6 @@ Index: source/encoder/encoder.cpp
X265_FREE(m_dupBuffer[i]);
}
-@@ -1592,7 +1592,7 @@ int Encoder::encode(const x265_picture*
- if (m_exportedPic)
- {
- if (!m_param->bUseAnalysisFile && m_param->analysisSave)
-- x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
-+ PARAM_NS::x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
- ATOMIC_DEC(&m_exportedPic->m_countRefEncoders);
- m_exportedPic = NULL;
- m_dpb->recycleUnreferenced();
@@ -1968,7 +1968,7 @@ int Encoder::encode(const x265_picture*
/* Free up inputPic->analysisData since it has already been used */
@@ -280,8 +247,6 @@ Index: source/encoder/encoder.cpp
m_aborted = true; \
return; \
}\
-Index: source/common/param.cpp
-===================================================================
--- source.orig/common/param.cpp
+++ source/common/param.cpp
@@ -102,7 +102,7 @@ x265_param *x265_param_alloc()
@@ -293,3 +258,23 @@ Index: source/common/param.cpp
#ifdef SVT_HEVC
x265_free(p->svtHevcParam);
#endif
+--- source.orig/encoder/api.cpp
++++ source/encoder/api.cpp
+@@ -604,7 +604,7 @@ fail:
+ *pi_nal = 0;
+
+ if (numEncoded && encoder->m_param->csvLogLevel && encoder->m_outputCount >= encoder->m_latestParam->chunkStart)
+- x265_csvlog_frame(encoder->m_param, pic_out);
++ PARAM_NS::x265_csvlog_frame(encoder->m_param, pic_out);
+
+ if (numEncoded < 0)
+ encoder->m_aborted = true;
+@@ -651,7 +651,7 @@ void x265_encoder_log(x265_encoder* enc,
+ encoder->fetchStats(&stats, sizeof(stats));
+ int padx = encoder->m_sps.conformanceWindow.rightOffset;
+ int pady = encoder->m_sps.conformanceWindow.bottomOffset;
+- x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
++ PARAM_NS::x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
+ }
+ }
+
diff --git a/media-libs/x265/files/x265-3.5-r5-cpp-std.patch b/media-libs/x265/files/x265-3.5-r5-cpp-std.patch
new file mode 100644
index 000000000000..99fbf9bd75de
--- /dev/null
+++ b/media-libs/x265/files/x265-3.5-r5-cpp-std.patch
@@ -0,0 +1,23 @@
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Fri, 23 Aug 2024 14:31:40 +0200
+Subject: [PATCH] don't force old c++ standards
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -221,14 +221,6 @@ if(GCC)
+ if(NOT INTEL_CXX AND NOT CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
+ add_definitions(-Wno-class-memaccess)
+ endif()
+- if(ENABLE_HDR10_PLUS)
+- if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8")
+- message(FATAL_ERROR "gcc version above 4.8 required to support hdr10plus")
+- endif()
+- add_definitions(-std=gnu++11)
+- else()
+- add_definitions(-std=gnu++98)
+- endif()
+ if(ENABLE_PIC)
+ add_definitions(-fPIC)
+ endif(ENABLE_PIC)
diff --git a/media-libs/x265/files/x265-3.5-r5-gcc15.patch b/media-libs/x265/files/x265-3.5-r5-gcc15.patch
new file mode 100644
index 000000000000..6a474d3c192f
--- /dev/null
+++ b/media-libs/x265/files/x265-3.5-r5-gcc15.patch
@@ -0,0 +1,29 @@
+From: Ted Rodgers <ted.d.rodgers@gmail.com>
+Date: Fri, 23 Aug 2024 12:15:56 +0200
+Subject: [PATCH] Explicitly include <cstdint>
+
+GCC 15 will no longer include <cstdint> by default, resulting in build
+failures in projects that do not explicitly include it.
+
+Error:
+/var/tmp/portage/media-libs/x265-3.5-r4/work/x265_3.5/source/dynamicHDR10/json11/json11.cpp:101:32: error: ‘uint8_t’ does not name a type
+ 101 | } else if (static_cast<uint8_t>(ch) <= 0x1f) {
+ | ^~~~~~~
+/var/tmp/portage/media-libs/x265-3.5-r4/work/x265_3.5/source/dynamicHDR10/json11/json11.cpp:28:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
+ 27 | #include <limits>
+ +++ |+#include <cstdint>
+ 28 |
+
+See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+--- a/dynamicHDR10/json11/json11.cpp
++++ b/dynamicHDR10/json11/json11.cpp
+@@ -25,6 +25,7 @@
+ #include <cstdlib>
+ #include <cstdio>
+ #include <limits>
++#include <cstdint>
+
+ #if _MSC_VER
+ #pragma warning(disable: 4510) //const member cannot be default initialized
diff --git a/media-libs/x265/files/x265-3.5-r5-test-ns_2.patch b/media-libs/x265/files/x265-3.5-r5-test-ns_2.patch
new file mode 100644
index 000000000000..eec119f7f923
--- /dev/null
+++ b/media-libs/x265/files/x265-3.5-r5-test-ns_2.patch
@@ -0,0 +1,11 @@
+--- source.orig/encoder/encoder.cpp
++++ source/encoder/encoder.cpp
+@@ -1592,7 +1592,7 @@ int Encoder::encode(const x265_picture*
+ if (m_exportedPic)
+ {
+ if (!m_param->bUseAnalysisFile && m_param->analysisSave)
+- x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
+ ATOMIC_DEC(&m_exportedPic->m_countRefEncoders);
+ m_exportedPic = NULL;
+ m_dpb->recycleUnreferenced();
diff --git a/media-libs/x265/files/x265-9999-test-ns.patch b/media-libs/x265/files/x265-9999-test-ns.patch
index ed3de18ae83e..35859c54455e 100644
--- a/media-libs/x265/files/x265-9999-test-ns.patch
+++ b/media-libs/x265/files/x265-9999-test-ns.patch
@@ -31,6 +31,25 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
#define PARAM_NS X265_NS
#endif
}
+--- a/common/threadpool.cpp
++++ b/common/threadpool.cpp
+@@ -25,6 +25,7 @@
+ #include "common.h"
+ #include "threadpool.h"
+ #include "threading.h"
++#include "param.h"
+
+ #include <new>
+
+@@ -314,7 +315,7 @@ ThreadPool* ThreadPool::allocThreadPools(x265_param* p, int& numPools, bool isTh
+ sprintf(nextCount, "%d", cpusPerNode[i]);
+ strcat(poolString, nextCount);
+ }
+- x265_param_parse(p, "pools", poolString);
++ PARAM_NS::x265_param_parse(p, "pools", poolString);
+ }
+ #endif
+ if (p->numaPools && *p->numaPools)
--- a/encoder/api.cpp
+++ b/encoder/api.cpp
@@ -106,9 +106,9 @@ x265_encoder *x265_encoder_open(x265_param *p)
@@ -64,16 +83,16 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
}
x265_copy_params(&save, encoder->m_latestParam);
int ret = encoder->reconfigureParam(encoder->m_latestParam, param_in);
-@@ -602,7 +602,7 @@ fail:
- *pi_nal = 0;
-
+@@ -604,7 +604,7 @@ fail:
if (numEncoded && encoder->m_param->csvLogLevel && encoder->m_outputCount >= encoder->m_latestParam->chunkStart)
-- x265_csvlog_frame(encoder->m_param, pic_out);
-+ PARAM_NS::x265_csvlog_frame(encoder->m_param, pic_out);
+ {
+ for (int layer = 0; layer < encoder->m_param->numLayers; layer++)
+- x265_csvlog_frame(encoder->m_param, pic_out[layer]);
++ PARAM_NS::x265_csvlog_frame(encoder->m_param, pic_out[layer]);
+ }
if (numEncoded < 0)
- encoder->m_aborted = true;
-@@ -643,7 +643,7 @@ void x265_vmaf_encoder_log(x265_encoder* enc, int argc, char **argv, x265_param
+@@ -646,7 +646,7 @@ void x265_vmaf_encoder_log(x265_encoder* enc, int argc, char **argv, x265_param
encoder->fetchStats(&stats, sizeof(stats));
int padx = encoder->m_sps.conformanceWindow.rightOffset;
int pady = encoder->m_sps.conformanceWindow.bottomOffset;
@@ -82,16 +101,16 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
}
}
#endif
-@@ -657,7 +657,7 @@ void x265_encoder_log(x265_encoder* enc, int argc, char **argv)
- encoder->fetchStats(&stats, sizeof(stats));
- int padx = encoder->m_sps.conformanceWindow.rightOffset;
- int pady = encoder->m_sps.conformanceWindow.bottomOffset;
-- x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
-+ PARAM_NS::x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
+@@ -662,7 +662,7 @@ void x265_encoder_log(x265_encoder* enc, int argc, char **argv)
+ for (int layer = 0; layer < encoder->m_param->numLayers; layer++)
+ {
+ encoder->fetchStats(stats, sizeof(stats[layer]), layer);
+- x265_csvlog_encode(encoder->m_param, &stats[0], padx, pady, argc, argv);
++ PARAM_NS::x265_csvlog_encode(encoder->m_param, &stats[0], padx, pady, argc, argv);
+ }
}
}
-
-@@ -878,7 +878,7 @@ void x265_alloc_analysis_data(x265_param *param, x265_analysis_data* analysis)
+@@ -884,7 +884,7 @@ void x265_alloc_analysis_data(x265_param *param, x265_analysis_data* analysis)
return;
fail:
@@ -102,7 +121,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
void x265_free_analysis_data(x265_param *param, x265_analysis_data* analysis)
--- a/encoder/encoder.cpp
+++ b/encoder/encoder.cpp
-@@ -216,8 +216,8 @@ void Encoder::create()
+@@ -217,8 +217,8 @@ void Encoder::create()
{
m_dupBuffer[i] = (AdaptiveFrameDuplication*)x265_malloc(sizeof(AdaptiveFrameDuplication));
m_dupBuffer[i]->dupPic = NULL;
@@ -113,7 +132,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
m_dupBuffer[i]->dupPlane = NULL;
m_dupBuffer[i]->dupPlane = X265_MALLOC(char, framesize);
m_dupBuffer[i]->dupPic->planes[0] = m_dupBuffer[i]->dupPlane;
-@@ -768,7 +768,7 @@ int Encoder::setAnalysisData(x265_analysis_data *analysis_data, int poc, uint32_
+@@ -774,7 +774,7 @@ int Encoder::setAnalysisData(x265_analysis_data *analysis_data, int poc, uint32_
curFrame->m_analysisData = (*analysis_data);
curFrame->m_analysisData.numCUsInFrame = widthInCU * heightInCU;
curFrame->m_analysisData.numPartitions = m_param->num4x4Partitions;
@@ -122,7 +141,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
if (m_param->maxCUSize == 16)
{
if (analysis_data->sliceType == X265_TYPE_IDR || analysis_data->sliceType == X265_TYPE_I)
-@@ -872,7 +872,7 @@ void Encoder::destroy()
+@@ -881,7 +881,7 @@ void Encoder::destroy()
for (uint32_t i = 0; i < DUP_BUFFER; i++)
{
X265_FREE(m_dupBuffer[i]->dupPlane);
@@ -131,61 +150,61 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
X265_FREE(m_dupBuffer[i]);
}
-@@ -1478,7 +1478,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
- if (m_exportedPic)
+@@ -1491,7 +1491,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
+ if (*m_exportedPic)
{
if (!m_param->bUseAnalysisFile && m_param->analysisSave)
-- x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
-+ PARAM_NS::x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
-
- ATOMIC_DEC(&m_exportedPic->m_countRefEncoders);
+- x265_free_analysis_data(m_param, &m_exportedPic[0]->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &m_exportedPic[0]->m_analysisData);
-@@ -1892,7 +1892,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
-
- /* Free up inputPic->analysisData since it has already been used */
- if ((m_param->analysisLoad && !m_param->analysisSave) || ((m_param->bAnalysisType == AVC_INFO) && slice->m_sliceType != I_SLICE))
-- x265_free_analysis_data(m_param, &outFrame->m_analysisData);
-+ PARAM_NS::x265_free_analysis_data(m_param, &outFrame->m_analysisData);
+ for (int i = 0; i < m_param->numLayers; i++)
+ {
+@@ -1973,7 +1973,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
- if (pic_out)
- {
-@@ -1971,7 +1971,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
- writeAnalysisFile(&pic_out->analysisData, *outFrame->m_encData);
- pic_out->analysisData.saveParam = pic_out->analysisData.saveParam;
- if (m_param->bUseAnalysisFile)
-- x265_free_analysis_data(m_param, &pic_out->analysisData);
-+ PARAM_NS::x265_free_analysis_data(m_param, &pic_out->analysisData);
+ /* Free up inputPic->analysisData since it has already been used */
+ if ((m_param->analysisLoad && !m_param->analysisSave) || ((m_param->bAnalysisType == AVC_INFO) && slice->m_sliceType != I_SLICE))
+- x265_free_analysis_data(m_param, &outFrame->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &outFrame->m_analysisData);
+ if (pic_out[sLayer])
+ {
+ PicYuv* recpic = outFrame->m_reconPic[0];
+@@ -2052,7 +2052,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
+ writeAnalysisFile(&pic_out[sLayer]->analysisData, *outFrame->m_encData);
+ pic_out[sLayer]->analysisData.saveParam = pic_out[sLayer]->analysisData.saveParam;
+ if (m_param->bUseAnalysisFile)
+- x265_free_analysis_data(m_param, &pic_out[sLayer]->analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &pic_out[sLayer]->analysisData);
+ }
}
- }
- if (m_param->rc.bStatWrite && (m_param->analysisMultiPassRefine || m_param->analysisMultiPassDistortion))
-@@ -1986,7 +1986,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
- writeAnalysisFileRefine(&outFrame->m_analysisData, *outFrame->m_encData);
- }
- if (m_param->analysisMultiPassRefine || m_param->analysisMultiPassDistortion)
-- x265_free_analysis_data(m_param, &outFrame->m_analysisData);
-+ PARAM_NS::x265_free_analysis_data(m_param, &outFrame->m_analysisData);
- if (m_param->internalCsp == X265_CSP_I400)
- {
- if (slice->m_sliceType == P_SLICE)
-@@ -2153,7 +2153,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
+ if (m_param->rc.bStatWrite && (m_param->analysisMultiPassRefine || m_param->analysisMultiPassDistortion))
+@@ -2067,7 +2067,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
+ writeAnalysisFileRefine(&outFrame->m_analysisData, *outFrame->m_encData);
+ }
+ if (m_param->analysisMultiPassRefine || m_param->analysisMultiPassDistortion)
+- x265_free_analysis_data(m_param, &outFrame->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &outFrame->m_analysisData);
+ if (m_param->internalCsp == X265_CSP_I400)
+ {
+ if (slice->m_sliceType == P_SLICE)
+@@ -2250,7 +2250,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
uint32_t heightInCU = (m_param->sourceHeight + m_param->maxCUSize - 1) >> m_param->maxLog2CUSize;
- frameEnc->m_analysisData.numCUsInFrame = widthInCU * heightInCU;
- frameEnc->m_analysisData.numPartitions = m_param->num4x4Partitions;
-- x265_alloc_analysis_data(m_param, &frameEnc->m_analysisData);
-+ PARAM_NS::x265_alloc_analysis_data(m_param, &frameEnc->m_analysisData);
- frameEnc->m_analysisData.poc = frameEnc->m_poc;
+ frameEnc[0]->m_analysisData.numCUsInFrame = widthInCU * heightInCU;
+ frameEnc[0]->m_analysisData.numPartitions = m_param->num4x4Partitions;
+- x265_alloc_analysis_data(m_param, &frameEnc[0]->m_analysisData);
++ PARAM_NS::x265_alloc_analysis_data(m_param, &frameEnc[0]->m_analysisData);
+ frameEnc[0]->m_analysisData.poc = frameEnc[0]->m_poc;
if (m_param->rc.bStatRead)
- readAnalysisFile(&frameEnc->m_analysisData, frameEnc->m_poc, frameEnc->m_lowres.sliceType);
-@@ -2164,7 +2164,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
+ readAnalysisFile(&frameEnc[0]->m_analysisData, frameEnc[0]->m_poc, frameEnc[0]->m_lowres.sliceType);
+@@ -2261,7 +2261,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
for (int i = 0; i < m_param->rc.zonefileCount; i++)
{
- if (m_param->rc.zones[i].startFrame == frameEnc->m_poc)
+ if (m_param->rc.zones[i].startFrame == frameEnc[0]->m_poc)
- x265_encoder_reconfig(this, m_param->rc.zones[i].zoneParam);
+ PARAM_NS::x265_encoder_reconfig(this, m_param->rc.zones[i].zoneParam);
}
}
-@@ -2307,7 +2307,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)
+@@ -2408,7 +2408,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)
analysis->numCUsInFrame = numCUsInFrame;
analysis->numCuInHeight = heightInCU;
analysis->numPartitions = m_param->num4x4Partitions;
@@ -194,7 +213,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
}
if (m_param->bEnableTemporalSubLayers > 2)
{
-@@ -4434,7 +4434,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -4711,7 +4711,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
else if (fread(val, size, readSize, fileOffset) != readSize)\
{\
x265_log(NULL, X265_LOG_ERROR, "Error reading analysis data\n");\
@@ -203,7 +222,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
m_aborted = true;\
return;\
}\
-@@ -4470,7 +4470,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -4747,7 +4747,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
if (poc != curPoc || feof(m_analysisFileIn))
{
x265_log(NULL, X265_LOG_WARNING, "Error reading analysis data: Cannot find POC %d\n", curPoc);
@@ -212,7 +231,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
return;
}
}
-@@ -4504,7 +4504,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -4781,7 +4781,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
if (m_param->scaleFactor)
analysis->numPartitions *= factor;
/* Memory is allocated for inter and intra analysis data based on the slicetype */
@@ -221,7 +240,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
if (m_param->ctuDistortionRefine == CTU_DISTORTION_INTERNAL)
{
-@@ -4757,7 +4757,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -5034,7 +5034,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
else if (fread(val, size, readSize, fileOffset) != readSize)\
{\
x265_log(NULL, X265_LOG_ERROR, "Error reading analysis data\n");\
@@ -230,7 +249,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
m_aborted = true;\
return;\
}\
-@@ -4794,7 +4794,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -5071,7 +5071,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
if (poc != curPoc || feof(m_analysisFileIn))
{
x265_log(NULL, X265_LOG_WARNING, "Error reading analysis data: Cannot find POC %d\n", curPoc);
@@ -239,7 +258,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
return;
}
}
-@@ -4825,7 +4825,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
+@@ -5102,7 +5102,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, const x
analysis->numCuInHeight = cuLoc.heightInCU;
/* Memory is allocated for inter and intra analysis data based on the slicetype */
@@ -248,7 +267,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
if (m_param->ctuDistortionRefine == CTU_DISTORTION_INTERNAL)
{
-@@ -5440,7 +5440,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, int sli
+@@ -5717,7 +5717,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, int sli
if (fread(val, size, readSize, fileOffset) != readSize)\
{\
x265_log(NULL, X265_LOG_ERROR, "Error reading analysis 2 pass data\n"); \
@@ -257,7 +276,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
m_aborted = true; \
return; \
}\
-@@ -5454,7 +5454,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, int sli
+@@ -5731,7 +5731,7 @@ void Encoder::readAnalysisFile(x265_analysis_data* analysis, int curPoc, int sli
if (poc != curPoc || feof(m_analysisFileIn))
{
x265_log(NULL, X265_LOG_WARNING, "Error reading analysis 2 pass data: Cannot find POC %d\n", curPoc);
@@ -266,7 +285,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
return;
}
/* Now arrived at the right frame, read the record */
-@@ -5561,7 +5561,7 @@ void Encoder::writeAnalysisFile(x265_analysis_data* analysis, FrameData &curEncD
+@@ -5838,7 +5838,7 @@ void Encoder::writeAnalysisFile(x265_analysis_data* analysis, FrameData &curEncD
if (fwrite(val, size, writeSize, fileOffset) < writeSize)\
{\
x265_log(NULL, X265_LOG_ERROR, "Error writing analysis data\n");\
@@ -275,7 +294,7 @@ Namespace functions for multi-bitdepth builds so that libraries are self-contain
m_aborted = true;\
return;\
}\
-@@ -5783,7 +5783,7 @@ void Encoder::writeAnalysisFileRefine(x265_analysis_data* analysis, FrameData &c
+@@ -6060,7 +6060,7 @@ void Encoder::writeAnalysisFileRefine(x265_analysis_data* analysis, FrameData &c
if (fwrite(val, size, writeSize, fileOffset) < writeSize)\
{\
x265_log(NULL, X265_LOG_ERROR, "Error writing analysis 2 pass data\n"); \
diff --git a/media-libs/x265/metadata.xml b/media-libs/x265/metadata.xml
index af1229eaf0d8..91d4b52dc9b9 100644
--- a/media-libs/x265/metadata.xml
+++ b/media-libs/x265/metadata.xml
@@ -8,7 +8,6 @@
<flag name="10bit">Add support for producing 10bits HEVC.</flag>
<flag name="12bit">Add support for producing 12bits HEVC.</flag>
<flag name="numa">Build with support for NUMA nodes.</flag>
- <flag name="pic">Disable optimized assembly code that is not PIC friendly</flag>
</use>
<upstream>
<remote-id type="bitbucket">multicoreware/x265_git</remote-id>
diff --git a/media-libs/x265/x265-3.5-r3.ebuild b/media-libs/x265/x265-3.5-r3.ebuild
index f3d6c8cbd76a..7e950e3b98c8 100644
--- a/media-libs/x265/x265-3.5-r3.ebuild
+++ b/media-libs/x265/x265-3.5-r3.ebuild
@@ -36,6 +36,7 @@ PATCHES=(
"${FILESDIR}/x265-3.3-ppc64.patch"
"${FILESDIR}/tests.patch"
"${FILESDIR}/test-ns.patch"
+ "${FILESDIR}/${PN}-3.5-r5-test-ns_2.patch"
)
src_unpack() {
diff --git a/media-libs/x265/x265-3.5-r4.ebuild b/media-libs/x265/x265-3.5-r4.ebuild
index 11fbb36fc212..172970e12143 100644
--- a/media-libs/x265/x265-3.5-r4.ebuild
+++ b/media-libs/x265/x265-3.5-r4.ebuild
@@ -36,6 +36,7 @@ PATCHES=(
"${FILESDIR}/x265-3.3-ppc64.patch"
"${FILESDIR}/tests.patch"
"${FILESDIR}/test-ns.patch"
+ "${FILESDIR}/${PN}-3.5-r5-test-ns_2.patch"
)
src_unpack() {
diff --git a/media-libs/x265/x265-3.5-r5.ebuild b/media-libs/x265/x265-3.5-r5.ebuild
new file mode 100644
index 000000000000..47245cb0ed6a
--- /dev/null
+++ b/media-libs/x265/x265-3.5-r5.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic multilib-minimal multibuild
+
+DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
+HOMEPAGE="http://x265.org/ https://bitbucket.org/multicoreware/x265_git/"
+
+if [[ ${PV} = 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://bitbucket.org/multicoreware/x265_git/"
+ MY_P="${PN}-${PV}"
+else
+ SRC_URI="https://bitbucket.org/multicoreware/x265_git/downloads/${PN}_${PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
+ MY_P="${PN}_${PV}"
+fi
+
+S="${WORKDIR}/${MY_P}/source"
+unset MY_P
+
+LICENSE="GPL-2"
+# subslot = libx265 soname
+SLOT="0/199"
+IUSE="+10bit +12bit cpu_flags_ppc_vsx2 numa test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+ASM_DEPEND=">=dev-lang/nasm-2.13"
+BDEPEND="
+ abi_x86_32? ( ${ASM_DEPEND} )
+ abi_x86_64? ( ${ASM_DEPEND} )"
+
+PATCHES=(
+ "${FILESDIR}/arm-r1.patch"
+ "${FILESDIR}/neon.patch"
+ "${FILESDIR}/tests.patch"
+ "${FILESDIR}/test-ns.patch"
+ "${FILESDIR}/${PN}-3.5-r5-cpp-std.patch"
+ "${FILESDIR}/${PN}-3.5-r5-gcc15.patch"
+ "${FILESDIR}/${PN}-3.5-r5-test-ns_2.patch"
+)
+
+pkg_setup() {
+ variants=(
+ $(usev 12bit "main12")
+ $(usev 10bit "main10")
+ )
+}
+
+# By default, the library and the encoder is configured for only one output bit
+# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
+# files with a different bit depth, which is annoying. However, upstream
+# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
+# that together so that the resulting library can produce all three of them
+# instead of only one.
+# The API requires the bit depth parameter, so that libx265 can then chose which
+# variant of the encoder to use.
+# To achieve this, we have to build one (static) library for each non-main
+# variant, and link it into the main library.
+# Upstream documents using the 8bit variant as main library, hence we do not
+# allow disabling it
+
+x265_variant_src_configure() {
+ einfo "Configuring variant: ${MULTIBUILD_VARIANT} for ABI: ${ABI}"
+
+ local mycmakeargs=(
+ "${mycmakeargs[@]}"
+ -DHIGH_BIT_DEPTH=ON
+ -DEXPORT_C_API=OFF
+ -DENABLE_SHARED=OFF
+ -DENABLE_CLI=OFF
+ )
+
+ case "${MULTIBUILD_VARIANT}" in
+ "main12")
+ mycmakeargs+=(
+ -DMAIN12=ON
+ )
+ ;;
+ "main10")
+ mycmakeargs+=(
+ -DENABLE_HDR10_PLUS=ON
+ )
+ ;;
+ *)
+ die "Unknown variant: ${MULTIBUILD_VARIANT}";;
+ esac
+ cmake_src_configure
+}
+
+multilib_src_configure() {
+ # -Werror=odr
+ # https://bugs.gentoo.org/875854
+ # https://bitbucket.org/multicoreware/x265_git/issues/937/build-fails-with-lto
+ filter-lto
+
+ local mycmakeargs=(
+ $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
+ -DENABLE_PIC=ON
+ -DENABLE_LIBNUMA="$(usex numa)"
+ -DENABLE_MULTIVIEW="yes"
+ -DENABLE_SVT_HEVC="no" # missing
+ -DENABLE_VTUNE="no" # missing
+ -DGIT_ARCHETYPE=1 #814116
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ )
+
+ # Unfortunately, the asm for x86/x32/arm isn't PIC-safe.
+ # x86 # Bug #528202, bug #913412
+ # x32 # bug #510890
+ if [[ ${ABI} = x86 ]] || [[ ${ABI} = x32 ]] || [[ ${ABI} = arm ]] ; then
+ mycmakeargs+=(
+ -DENABLE_ASSEMBLY=OFF
+ -DENABLE_TESTS="no" #728748
+ )
+ else
+ mycmakeargs+=(
+ -DENABLE_TESTS="$(usex test)"
+ )
+ fi
+
+ if [[ ${ABI} = ppc* ]] ; then
+ # upstream uses mix of altivec + power8 vectors
+ # it's impossible to enable altivec without CPU_POWER8
+ # and it does not work on ppc32
+ # so we toggle both variables together
+ mycmakeargs+=(
+ -DCPU_POWER8="$(usex cpu_flags_ppc_vsx2)"
+ -DENABLE_ALTIVEC="$(usex cpu_flags_ppc_vsx2)"
+ )
+ fi
+
+ local MULTIBUILD_VARIANTS=( "${variants[@]}" )
+ if [[ "${#MULTIBUILD_VARIANTS[@]}" -gt 1 ]] ; then
+ multibuild_foreach_variant x265_variant_src_configure
+
+ local liblist="" v=
+ for v in "${MULTIBUILD_VARIANTS[@]}" ; do
+ ln -sf "${BUILD_DIR}-${v}/libx265.a" "${BUILD_DIR%-*}/libx265_${v}.a" || die
+ liblist+="libx265_${v}.a;"
+ done
+
+ mycmakeargs+=(
+ -DEXTRA_LIB="${liblist}"
+ -DEXTRA_LINK_FLAGS="-L${BUILD_DIR%-*}"
+ -DLINKED_10BIT"=$(usex 10bit)"
+ -DLINKED_12BIT="$(usex 12bit)"
+ )
+ fi
+
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ local MULTIBUILD_VARIANTS=( "${variants[@]}" )
+ if [[ "${#MULTIBUILD_VARIANTS[@]}" -gt 1 ]] ; then
+ multibuild_foreach_variant cmake_src_compile
+ fi
+ cmake_src_compile
+}
+
+x265_variant_src_test() {
+ if [[ -x "${BUILD_DIR}/test/TestBench" ]] ; then
+ "${BUILD_DIR}/test/TestBench" || die
+ else
+ einfo "Unit tests check only assembly."
+ einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
+ einfo "Skipping tests."
+ fi
+}
+
+multilib_src_test() {
+ local MULTIBUILD_VARIANTS=( "${variants[@]}" )
+ if [[ "${#MULTIBUILD_VARIANTS[@]}" -gt 1 ]] ; then
+ multibuild_foreach_variant x265_variant_src_test
+ fi
+ x265_variant_src_test
+}
+
+multilib_src_install() {
+ cmake_src_install
+}
+
+multilib_src_install_all() {
+ dodoc -r "${S}/../doc/"*
+
+ # we don't install *.a files for all variants,
+ # so just delete these files instead of pretending
+ # real USE=static-libs support
+ find "${ED}" -name "*.a" -delete || die
+}
diff --git a/media-libs/x265/x265-9999.ebuild b/media-libs/x265/x265-9999.ebuild
index 8be9f4a93e84..e9c94f79c127 100644
--- a/media-libs/x265/x265-9999.ebuild
+++ b/media-libs/x265/x265-9999.ebuild
@@ -5,21 +5,25 @@ EAPI=8
inherit cmake flag-o-matic multilib-minimal multibuild
+DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
+HOMEPAGE="http://x265.org/ https://bitbucket.org/multicoreware/x265_git/"
+
if [[ ${PV} = 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://bitbucket.org/multicoreware/x265_git/"
- S=${WORKDIR}/${P}/source
+ MY_P="${PN}-${PV}"
else
- SRC_URI="https://bitbucket.org/multicoreware/x265_git/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
+ SRC_URI="https://bitbucket.org/multicoreware/x265_git/downloads/${PN}_${PV}.tar.gz -> ${PN}-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
+ MY_P="${PN}_${PV}"
fi
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="http://x265.org/ https://bitbucket.org/multicoreware/x265_git/"
+S="${WORKDIR}/${MY_P}/source"
+unset MY_P
LICENSE="GPL-2"
# subslot = libx265 soname
-SLOT="0/208"
+SLOT="0/212"
IUSE="+10bit +12bit cpu_flags_ppc_vsx2 numa test"
RESTRICT="!test? ( test )"
@@ -34,16 +38,16 @@ PATCHES=(
"${FILESDIR}/${PN}-9999-arm.patch"
"${FILESDIR}/neon.patch"
"${FILESDIR}/tests.patch"
+ "${FILESDIR}/${PN}-3.5-r5-cpp-std.patch"
+ "${FILESDIR}/${PN}-3.5-r5-gcc15.patch"
"${FILESDIR}/${PN}-9999-test-ns.patch"
)
-src_unpack() {
- if [[ ${PV} = 9999* ]]; then
- git-r3_src_unpack
- else
- unpack ${A}
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
- fi
+pkg_setup() {
+ variants=(
+ $(usev 12bit "main12")
+ $(usev 10bit "main10")
+ )
}
# By default, the library and the encoder is configured for only one output bit
@@ -57,102 +61,34 @@ src_unpack() {
# To achieve this, we have to build one (static) library for each non-main
# variant, and link it into the main library.
# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it: "main" *MUST* come last in the following list.
-
-x265_get_variants() {
- local variants=""
- use 12bit && variants+="main12 "
- use 10bit && variants+="main10 "
- variants+="main"
- echo "${variants}"
-}
+# allow disabling it
x265_variant_src_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
-
einfo "Configuring variant: ${MULTIBUILD_VARIANT} for ABI: ${ABI}"
- local mycmakeargs=( "${myabicmakeargs[@]}" )
+ local mycmakeargs=(
+ "${mycmakeargs[@]}"
+ -DHIGH_BIT_DEPTH=ON
+ -DEXPORT_C_API=OFF
+ -DENABLE_SHARED=OFF
+ -DENABLE_CLI=OFF
+ )
+
case "${MULTIBUILD_VARIANT}" in
"main12")
mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
-DMAIN12=ON
)
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm* ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- # disable altivec for 12bit build #607802#c5
- if [[ ${ABI} = ppc* ]] ; then
- mycmakeargs+=(
- -DENABLE_ALTIVEC=OFF
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- )
- fi
;;
"main10")
mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
-DENABLE_HDR10_PLUS=ON
)
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm* ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- # disable altivec for 10bit build #607802#c5
- if [[ ${ABI} = ppc* ]] ; then
- mycmakeargs+=(
- -DENABLE_ALTIVEC=OFF
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- )
- fi
- ;;
- "main")
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist="" v=
- for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS=-L.
- -DLINKED_10BIT=$(usex 10bit)
- -DLINKED_12BIT=$(usex 12bit)
- )
- if [[ ${ABI} = ppc* ]] ; then
- # upstream uses mix of altivec + power8 vectors
- # it's impossible to enable altivec without CPU_POWER8
- # and it does not work on ppc32
- # so we toggle both variables together
- mycmakeargs+=(
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
- )
- fi
- fi
;;
*)
die "Unknown variant: ${MULTIBUILD_VARIANT}";;
esac
cmake_src_configure
- popd >/dev/null || die
}
multilib_src_configure() {
@@ -161,37 +97,73 @@ multilib_src_configure() {
# https://bitbucket.org/multicoreware/x265_git/issues/937/build-fails-with-lto
filter-lto
- local myabicmakeargs=(
- -DENABLE_TESTS=$(usex test ON OFF)
+ local mycmakeargs=(
$(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_PIC=ON
- -DENABLE_LIBNUMA=$(usex numa ON OFF)
+ -DENABLE_LIBNUMA="$(usex numa)"
+ -DENABLE_MULTIVIEW="yes"
+ -DENABLE_SVT_HEVC="no" # missing
+ -DENABLE_VTUNE="no" # missing
-DGIT_ARCHETYPE=1 #814116
-DLIB_INSTALL_DIR="$(get_libdir)"
)
# Unfortunately, the asm for x86/x32/arm isn't PIC-safe.
- if [[ ${ABI} = x86 ]] ; then
- # Bug #528202, bug #913412
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = x32 ]] ; then
- # bug #510890
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = arm ]] ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ # x86 # Bug #528202, bug #913412
+ # x32 # bug #510890
+ if [[ ${ABI} = x86 ]] || [[ ${ABI} = x32 ]] || [[ ${ABI} = arm ]] ; then
+ mycmakeargs+=(
+ -DENABLE_ASSEMBLY=OFF
+ -DENABLE_TESTS="no" #728748
+ )
+ else
+ mycmakeargs+=(
+ -DENABLE_TESTS="$(usex test)"
+ )
+ fi
+
+ if [[ ${ABI} = ppc* ]] ; then
+ # upstream uses mix of altivec + power8 vectors
+ # it's impossible to enable altivec without CPU_POWER8
+ # and it does not work on ppc32
+ # so we toggle both variables together
+ mycmakeargs+=(
+ -DCPU_POWER8="$(usex cpu_flags_ppc_vsx2)"
+ -DENABLE_ALTIVEC="$(usex cpu_flags_ppc_vsx2)"
+ )
fi
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_configure
+ local MULTIBUILD_VARIANTS=( "${variants[@]}" )
+ if [[ "${#MULTIBUILD_VARIANTS[@]}" -gt 1 ]] ; then
+ multibuild_foreach_variant x265_variant_src_configure
+
+ local liblist="" v=
+ for v in "${MULTIBUILD_VARIANTS[@]}" ; do
+ ln -sf "${BUILD_DIR}-${v}/libx265.a" "${BUILD_DIR%-*}/libx265_${v}.a" || die
+ liblist+="libx265_${v}.a;"
+ done
+
+ mycmakeargs+=(
+ -DEXTRA_LIB="${liblist}"
+ -DEXTRA_LINK_FLAGS="-L${BUILD_DIR%-*}"
+ -DLINKED_10BIT"=$(usex 10bit)"
+ -DLINKED_12BIT="$(usex 12bit)"
+ )
+ fi
+
+ cmake_src_configure
}
multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant cmake_src_compile
+ local MULTIBUILD_VARIANTS=( "${variants[@]}" )
+ if [[ "${#MULTIBUILD_VARIANTS[@]}" -gt 1 ]] ; then
+ multibuild_foreach_variant cmake_src_compile
+ fi
+ cmake_src_compile
}
x265_variant_src_test() {
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
+ if [[ -x "${BUILD_DIR}/test/TestBench" ]] ; then
"${BUILD_DIR}/test/TestBench" || die
else
einfo "Unit tests check only assembly."
@@ -201,14 +173,15 @@ x265_variant_src_test() {
}
multilib_src_test() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_test
+ local MULTIBUILD_VARIANTS=( "${variants[@]}" )
+ if [[ "${#MULTIBUILD_VARIANTS[@]}" -gt 1 ]] ; then
+ multibuild_foreach_variant x265_variant_src_test
+ fi
+ x265_variant_src_test
}
multilib_src_install() {
- # Install only "main" variant since the others are already linked into it.
- local MULTIBUILD_VARIANTS=( "main" )
- multibuild_foreach_variant cmake_src_install
+ cmake_src_install
}
multilib_src_install_all() {
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/x265/, media-libs/x265/files/
@ 2024-08-26 20:50 Sam James
0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2024-08-26 20:50 UTC (permalink / raw
To: gentoo-commits
commit: e3a0d61649d20884c6afc94588a8e7c58462b55e
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Mon Aug 26 13:39:58 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 26 20:50:26 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3a0d616
media-libs/x265: allow building with c++17, small ebuild fixes
The new x265-3.5-r5-cpp-std.patch disabled setting c++98 or c++11 as versions.
This made newer compilers default to c++17 and thus `register` a unused and
reserved keyword.
While on it fix some obvious things that might cause problems:
one shadowed variable
use std::abs in place of abs so we don't accidentally truncate values
use boolean instead of bitwise comparison when comparing bool
Move ENABLE_CLI=OFF for non native multilib builds to make it clearer.
Don't set ENABLE_TESTS=no on platforms where we set ENABLE_ASSEMBLY=OFF, because
it requires it to be ON and this the option is never created.
Closes: https://bugs.gentoo.org/938515
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38289
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/x265/files/x265-3.6-cmake-cleanup.patch | 47 +++++++
media-libs/x265/files/x265-3.6-code-cleanup.patch | 140 +++++++++++++++++++++
media-libs/x265/x265-3.5-r5.ebuild | 12 +-
media-libs/x265/x265-3.6.ebuild | 12 +-
media-libs/x265/x265-9999.ebuild | 12 +-
5 files changed, 217 insertions(+), 6 deletions(-)
diff --git a/media-libs/x265/files/x265-3.6-cmake-cleanup.patch b/media-libs/x265/files/x265-3.6-cmake-cleanup.patch
new file mode 100644
index 000000000000..7cbe3722f1e0
--- /dev/null
+++ b/media-libs/x265/files/x265-3.6-cmake-cleanup.patch
@@ -0,0 +1,47 @@
+From d6b009be2aa62c679ea994125c02310d4b8d401b Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:23:49 +0200
+Subject: [PATCH 1/2] cmake: cleanup old policies
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,18 +6,9 @@ if(NOT CMAKE_BUILD_TYPE)
+ FORCE)
+ endif()
+ message(STATUS "cmake version ${CMAKE_VERSION}")
+-if(POLICY CMP0025)
+- cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang
+-endif()
+-if(POLICY CMP0042)
+- cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
+-endif()
+-if(POLICY CMP0054)
+- cmake_policy(SET CMP0054 OLD) # Only interpret if() arguments as variables or keywords when unquoted
+-endif()
+
++cmake_minimum_required (VERSION 3.28) # OBJECT libraries require 2.8.8
+ project (x265)
+-cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
+ include(CheckIncludeFiles)
+ include(CheckFunctionExists)
+ include(CheckSymbolExists)
+
+From 701cc9679e9453cc94afac7904657262109e56b5 Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:23:59 +0200
+Subject: [PATCH 2/2] cmake: fix nasm warning
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+--- a/cmake/FindNasm.cmake
++++ b/cmake/FindNasm.cmake
+@@ -20,6 +20,6 @@ if(NASM_EXECUTABLE)
+ endif()
+
+ # Provide standardized success/failure messages
+-find_package_handle_standard_args(nasm
++find_package_handle_standard_args(Nasm
+ REQUIRED_VARS NASM_EXECUTABLE
+ VERSION_VAR NASM_VERSION_STRING)
diff --git a/media-libs/x265/files/x265-3.6-code-cleanup.patch b/media-libs/x265/files/x265-3.6-code-cleanup.patch
new file mode 100644
index 000000000000..dbea7ef6c1ff
--- /dev/null
+++ b/media-libs/x265/files/x265-3.6-code-cleanup.patch
@@ -0,0 +1,140 @@
+From bca0b4b72977683794d441e57adc8c279ff4bfca Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:25:35 +0200
+Subject: [PATCH 1/4] use boolean compare instead of bitwise
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/common/cudata.cpp b/common/cudata.cpp
+index 19281de..d5b295f 100644
+--- a/common/cudata.cpp
++++ b/common/cudata.cpp
+@@ -73,7 +73,7 @@ inline bool isEqualRow(int addrA, int addrB)
+ /* Check whether 2 addresses point to the same row or column */
+ inline bool isEqualRowOrCol(int addrA, int addrB)
+ {
+- return isEqualCol(addrA, addrB) | isEqualRow(addrA, addrB);
++ return isEqualCol(addrA, addrB) || isEqualRow(addrA, addrB);
+ }
+
+ /* Check whether one address points to the first column */
+
+From da3eb3ea55be74e440b272e24d7d8e67cb7a76db Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:44:55 +0200
+Subject: [PATCH 2/4] fix variable shadowing
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/common/cudata.h b/common/cudata.h
+index 8397f05..7f132e6 100644
+--- a/common/cudata.h
++++ b/common/cudata.h
+@@ -48,7 +48,7 @@ enum PartSize
+ SIZE_2NxnD, // asymmetric motion partition, 2Nx(3N/2) + 2Nx( N/2)
+ SIZE_nLx2N, // asymmetric motion partition, ( N/2)x2N + (3N/2)x2N
+ SIZE_nRx2N, // asymmetric motion partition, (3N/2)x2N + ( N/2)x2N
+- NUM_SIZES
++ PART_NUM_SIZES
+ };
+
+ enum PredMode
+
+From 4ec09af244e2cfe3dfb739d74af7640ac114e775 Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:45:33 +0200
+Subject: [PATCH 3/4] register is a unused and reserved keyword in c++-17
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/common/md5.cpp b/common/md5.cpp
+index a9042f4..7e638e7 100644
+--- a/common/md5.cpp
++++ b/common/md5.cpp
+@@ -185,7 +185,10 @@ void MD5Final(MD5Context *ctx, uint8_t *digest)
+ */
+ void MD5Transform(uint32_t *buf, uint32_t *in)
+ {
+- register uint32_t a, b, c, d;
++#if __cplusplus < 201703L
++ register
++#endif
++ uint32_t a, b, c, d;
+
+ a = buf[0];
+ b = buf[1];
+
+From 09379bbfe797e54f91ef5702c802f75aad604067 Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:26:55 +0200
+Subject: [PATCH 4/4] use std::abs instead of abs to avoid truncating values
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/common/pixel.cpp b/common/pixel.cpp
+index 3cd074c..62410f3 100644
+--- a/common/pixel.cpp
++++ b/common/pixel.cpp
+@@ -124,10 +124,10 @@ int ads_x4(int encDC[4], uint32_t *sums, int delta, uint16_t *costMvX, int16_t *
+ int nmv = 0;
+ for (int16_t i = 0; i < width; i++, sums++)
+ {
+- int ads = abs(encDC[0] - long(sums[0]))
+- + abs(encDC[1] - long(sums[lx >> 1]))
+- + abs(encDC[2] - long(sums[delta]))
+- + abs(encDC[3] - long(sums[delta + (lx >> 1)]))
++ int ads = std::abs(encDC[0] - long(sums[0]))
++ + std::abs(encDC[1] - long(sums[lx >> 1]))
++ + std::abs(encDC[2] - long(sums[delta]))
++ + std::abs(encDC[3] - long(sums[delta + (lx >> 1)]))
+ + costMvX[i];
+ if (ads < thresh)
+ mvs[nmv++] = i;
+@@ -141,8 +141,8 @@ int ads_x2(int encDC[2], uint32_t *sums, int delta, uint16_t *costMvX, int16_t *
+ int nmv = 0;
+ for (int16_t i = 0; i < width; i++, sums++)
+ {
+- int ads = abs(encDC[0] - long(sums[0]))
+- + abs(encDC[1] - long(sums[delta]))
++ int ads = std::abs(encDC[0] - long(sums[0]))
++ + std::abs(encDC[1] - long(sums[delta]))
+ + costMvX[i];
+ if (ads < thresh)
+ mvs[nmv++] = i;
+@@ -156,7 +156,7 @@ int ads_x1(int encDC[1], uint32_t *sums, int, uint16_t *costMvX, int16_t *mvs, i
+ int nmv = 0;
+ for (int16_t i = 0; i < width; i++, sums++)
+ {
+- int ads = abs(encDC[0] - long(sums[0]))
++ int ads = std::abs(encDC[0] - long(sums[0]))
+ + costMvX[i];
+ if (ads < thresh)
+ mvs[nmv++] = i;
+diff --git a/encoder/analysis.cpp b/encoder/analysis.cpp
+index aabf386..127032d 100644
+--- a/encoder/analysis.cpp
++++ b/encoder/analysis.cpp
+@@ -2692,8 +2692,8 @@ void Analysis::classifyCU(const CUData& ctu, const CUGeom& cuGeom, const Mode& b
+ {
+ offset = (depth * X265_REFINE_INTER_LEVELS) + i;
+ /* Calculate distance values */
+- diffRefine[i] = abs((int64_t)(trainData.cuVariance - m_frame->m_classifyVariance[offset]));
+- diffRefineRd[i] = abs((int64_t)(cuCost - m_frame->m_classifyRd[offset]));
++ diffRefine[i] = std::abs((int64_t)(trainData.cuVariance - m_frame->m_classifyVariance[offset]));
++ diffRefineRd[i] = std::abs((int64_t)(cuCost - m_frame->m_classifyRd[offset]));
+
+ /* Calculate prior probability - ranges between 0 and 1 */
+ if (trainingCount)
+diff --git a/encoder/ratecontrol.cpp b/encoder/ratecontrol.cpp
+index 9f2b8d9..7732ccd 100644
+--- a/encoder/ratecontrol.cpp
++++ b/encoder/ratecontrol.cpp
+@@ -1891,7 +1891,7 @@ double RateControl::tuneQScaleForGrain(double rcOverflow)
+ int newQp = rcOverflow > 1.1 ? curQp + 2 : rcOverflow > 1 ? curQp + 1 : curQp - 1 ;
+ double projectedBitrate = int(m_fps + 0.5) * m_qpToEncodedBits[newQp];
+ if (curBitrate > 0 && projectedBitrate > 0)
+- q = abs(projectedBitrate - m_bitrate) < abs (curBitrate - m_bitrate) ? x265_qp2qScale(newQp) : m_lastQScaleFor[P_SLICE];
++ q = std::abs(projectedBitrate - m_bitrate) < std::abs (curBitrate - m_bitrate) ? x265_qp2qScale(newQp) : m_lastQScaleFor[P_SLICE];
+ else
+ q = rcOverflow > 1 ? qScaleAvg * qpstep : rcOverflow < 1 ? qScaleAvg / qpstep : m_lastQScaleFor[P_SLICE];
+ return q;
diff --git a/media-libs/x265/x265-3.5-r5.ebuild b/media-libs/x265/x265-3.5-r5.ebuild
index ad78f487735a..c9db10613904 100644
--- a/media-libs/x265/x265-3.5-r5.ebuild
+++ b/media-libs/x265/x265-3.5-r5.ebuild
@@ -42,6 +42,8 @@ PATCHES=(
"${FILESDIR}/${PN}-3.5-r5-cpp-std.patch"
"${FILESDIR}/${PN}-3.5-r5-gcc15.patch"
"${FILESDIR}/${PN}-3.5-r5-test-ns_2.patch"
+ "${FILESDIR}/${PN}-3.6-cmake-cleanup.patch"
+ "${FILESDIR}/${PN}-3.6-code-cleanup.patch"
)
pkg_setup() {
@@ -99,7 +101,6 @@ multilib_src_configure() {
filter-lto
local mycmakeargs=(
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_PIC=ON
-DENABLE_LIBNUMA="$(usex numa)"
-DENABLE_SVT_HEVC="no" # missing
@@ -107,6 +108,11 @@ multilib_src_configure() {
-DGIT_ARCHETYPE=1 #814116
-DLIB_INSTALL_DIR="$(get_libdir)"
)
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DENABLE_CLI="no"
+ )
+ fi
# Unfortunately, the asm for x86/x32/arm isn't PIC-safe.
# x86 # Bug #528202, bug #913412
@@ -114,7 +120,9 @@ multilib_src_configure() {
if [[ ${ABI} = x86 ]] || [[ ${ABI} = x32 ]] || [[ ${ABI} = arm ]] ; then
mycmakeargs+=(
-DENABLE_ASSEMBLY=OFF
- -DENABLE_TESTS="no" #728748
+ # ENABLE_TESTS requires ENABLE_ASSEMBLY=ON to be visible
+ # source/CMakeLists.txt:858
+ # -DENABLE_TESTS="no" #728748
)
else
mycmakeargs+=(
diff --git a/media-libs/x265/x265-3.6.ebuild b/media-libs/x265/x265-3.6.ebuild
index 064bd95be46a..ba013c73d378 100644
--- a/media-libs/x265/x265-3.6.ebuild
+++ b/media-libs/x265/x265-3.6.ebuild
@@ -42,6 +42,8 @@ PATCHES=(
"${FILESDIR}/${PN}-3.5-r5-cpp-std.patch"
"${FILESDIR}/${PN}-3.5-r5-gcc15.patch"
"${FILESDIR}/${PN}-3.6-test-ns_2.patch"
+ "${FILESDIR}/${PN}-3.6-cmake-cleanup.patch"
+ "${FILESDIR}/${PN}-3.6-code-cleanup.patch"
)
pkg_setup() {
@@ -99,7 +101,6 @@ multilib_src_configure() {
filter-lto
local mycmakeargs=(
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_PIC=ON
-DENABLE_LIBNUMA="$(usex numa)"
-DENABLE_SVT_HEVC="no" # missing
@@ -107,6 +108,11 @@ multilib_src_configure() {
-DGIT_ARCHETYPE=1 #814116
-DLIB_INSTALL_DIR="$(get_libdir)"
)
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DENABLE_CLI="no"
+ )
+ fi
# Unfortunately, the asm for x86/x32/arm isn't PIC-safe.
# x86 # Bug #528202, bug #913412
@@ -114,7 +120,9 @@ multilib_src_configure() {
if [[ ${ABI} = x86 ]] || [[ ${ABI} = x32 ]] || [[ ${ABI} = arm ]] ; then
mycmakeargs+=(
-DENABLE_ASSEMBLY=OFF
- -DENABLE_TESTS="no" #728748
+ # ENABLE_TESTS requires ENABLE_ASSEMBLY=ON to be visible
+ # source/CMakeLists.txt:858
+ # -DENABLE_TESTS="no" #728748
)
else
mycmakeargs+=(
diff --git a/media-libs/x265/x265-9999.ebuild b/media-libs/x265/x265-9999.ebuild
index 9e4c71595c06..bf2855a23f64 100644
--- a/media-libs/x265/x265-9999.ebuild
+++ b/media-libs/x265/x265-9999.ebuild
@@ -41,6 +41,8 @@ PATCHES=(
"${FILESDIR}/${PN}-3.5-r5-cpp-std.patch"
"${FILESDIR}/${PN}-3.5-r5-gcc15.patch"
"${FILESDIR}/${PN}-9999-test-ns.patch"
+ "${FILESDIR}/${PN}-3.6-cmake-cleanup.patch"
+ "${FILESDIR}/${PN}-3.6-code-cleanup.patch"
)
pkg_setup() {
@@ -98,7 +100,6 @@ multilib_src_configure() {
filter-lto
local mycmakeargs=(
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_PIC=ON
-DENABLE_LIBNUMA="$(usex numa)"
-DENABLE_MULTIVIEW="yes"
@@ -107,6 +108,11 @@ multilib_src_configure() {
-DGIT_ARCHETYPE=1 #814116
-DLIB_INSTALL_DIR="$(get_libdir)"
)
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DENABLE_CLI="no"
+ )
+ fi
# Unfortunately, the asm for x86/x32/arm isn't PIC-safe.
# x86 # Bug #528202, bug #913412
@@ -114,7 +120,9 @@ multilib_src_configure() {
if [[ ${ABI} = x86 ]] || [[ ${ABI} = x32 ]] || [[ ${ABI} = arm ]] ; then
mycmakeargs+=(
-DENABLE_ASSEMBLY=OFF
- -DENABLE_TESTS="no" #728748
+ # ENABLE_TESTS requires ENABLE_ASSEMBLY=ON to be visible
+ # source/CMakeLists.txt:858
+ # -DENABLE_TESTS="no" #728748
)
else
mycmakeargs+=(
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/x265/, media-libs/x265/files/
@ 2024-12-28 17:33 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2024-12-28 17:33 UTC (permalink / raw
To: gentoo-commits
commit: 280653614f39fe2b719d6130751b1b27e9516c28
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 28 15:56:30 2024 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 28 16:59:21 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28065361
media-libs/x265: drop 3.5-r3, 3.5-r4, 3.5-r6
Closes: https://bugs.gentoo.org/943178
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
media-libs/x265/Manifest | 1 -
media-libs/x265/files/arm-r1.patch | 68 -------
media-libs/x265/files/x265-3.3-ppc64.patch | 15 --
media-libs/x265/files/x265-3.5-r5-test-ns_2.patch | 11 --
media-libs/x265/x265-3.5-r3.ebuild | 223 ----------------------
media-libs/x265/x265-3.5-r4.ebuild | 223 ----------------------
media-libs/x265/x265-3.5-r6.ebuild | 202 --------------------
7 files changed, 743 deletions(-)
diff --git a/media-libs/x265/Manifest b/media-libs/x265/Manifest
index 2ea6fb64ce0a..6a038e209d17 100644
--- a/media-libs/x265/Manifest
+++ b/media-libs/x265/Manifest
@@ -1,2 +1 @@
DIST x265-3.6.tar.gz 1655889 BLAKE2B 2598421e2e21974998b0b20895dc7e12dbf6ebe1b6c23bb5a7710b575d3db773335cd1f0b3ef110b79cf4d6dd01e543e9807a0509963497edc25f617f80c29f3 SHA512 570429c3f0b560b2f946ac9baba97d66d7d6485e46eb695b17003b5913028f62d35822477633e911cd3ea60e6ce0ecc7d9d82de7d8257272f9ca7b43761438be
-DIST x265_3.5.tar.gz 1537044 BLAKE2B 4fe15b762eda08a4379f69df622bef603fed784a237381d5c95876412020c113d053af829fa1eb66468462a6edc0de32dc597b1a98a63e9aa0250a47f4e76d05 SHA512 230e683239c3e262096ba96246c6f67229a1625d163f86647a411733bb1cf349685858aee3017bce818bb6992448d0abaa9241615a5b620561ce47ecb164f997
diff --git a/media-libs/x265/files/arm-r1.patch b/media-libs/x265/files/arm-r1.patch
deleted file mode 100644
index 69aa3036eff3..000000000000
--- a/media-libs/x265/files/arm-r1.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-More aliases for ARM.
-Do not force CFLAGS for ARM.
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -40,7 +40,7 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_
- # System architecture detection
- string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
- set(X86_ALIASES x86 i386 i686 x86_64 amd64)
--set(ARM_ALIASES armv6l armv7l aarch64)
-+set(ARM_ALIASES armv6l armv6l armv7l armv7a aarch64)
- list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
- list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
- set(POWER_ALIASES ppc64 ppc64le)
-@@ -239,11 +239,7 @@ if(GCC)
- endif()
- endif()
- if(ARM AND CROSS_COMPILE_ARM)
-- if(ARM64)
-- set(ARM_ARGS -fPIC)
-- else()
-- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
-- endif()
-+ set(ARM_ARGS -fPIC)
- message(STATUS "cross compile arm")
- elseif(ARM)
- if(ARM64)
-@@ -252,10 +248,10 @@ if(GCC)
- else()
- find_package(Neon)
- if(CPU_HAS_NEON)
-- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
-+ set(ARM_ARGS -mfpu=neon -fPIC)
- add_definitions(-DHAVE_NEON)
- else()
-- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
-+ set(ARM_ARGS -fPIC)
- endif()
- endif()
- endif()
---- a/dynamicHDR10/CMakeLists.txt
-+++ b/dynamicHDR10/CMakeLists.txt
-@@ -43,14 +43,14 @@ if(GCC)
- endif()
- endif()
- if(ARM AND CROSS_COMPILE_ARM)
-- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
-+ set(ARM_ARGS -fPIC)
- elseif(ARM)
- find_package(Neon)
- if(CPU_HAS_NEON)
-- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
-+ set(ARM_ARGS -fPIC)
- add_definitions(-DHAVE_NEON)
- else()
-- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
-+ set(ARM_ARGS -fPIC)
- endif()
- endif()
- add_definitions(${ARM_ARGS})
-@@ -150,4 +150,4 @@ set(BIN_INSTALL_DIR bin CACHE STRING "Install location of executables")
- option(ENABLE_SHARED "Build shared library" OFF)
-
- install(FILES hdr10plus.h DESTINATION include)
--endif()
-\ No newline at end of file
-+endif()
-
diff --git a/media-libs/x265/files/x265-3.3-ppc64.patch b/media-libs/x265/files/x265-3.3-ppc64.patch
deleted file mode 100644
index 8e739e3fab1b..000000000000
--- a/media-libs/x265/files/x265-3.3-ppc64.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-More complete ppc64 matches.
-
-Index: x265_2.2/source/CMakeLists.txt
-===================================================================
---- old/CMakeLists.txt
-+++ new/CMakeLists.txt
-@@ -44,7 +44,7 @@ set(X86_ALIASES x86 i386 i686 x86_64 amd
- set(ARM_ALIASES armv6l armv6j armv7l armv7a)
- list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
- list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
--set(POWER_ALIASES ppc64 ppc64le)
-+set(POWER_ALIASES ppc64 ppc64le powerpc64 powerpc64le)
- list(FIND POWER_ALIASES "${SYSPROC}" POWERMATCH)
- if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
- set(X86 1)
diff --git a/media-libs/x265/files/x265-3.5-r5-test-ns_2.patch b/media-libs/x265/files/x265-3.5-r5-test-ns_2.patch
deleted file mode 100644
index eec119f7f923..000000000000
--- a/media-libs/x265/files/x265-3.5-r5-test-ns_2.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- source.orig/encoder/encoder.cpp
-+++ source/encoder/encoder.cpp
-@@ -1592,7 +1592,7 @@ int Encoder::encode(const x265_picture*
- if (m_exportedPic)
- {
- if (!m_param->bUseAnalysisFile && m_param->analysisSave)
-- x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
-+ PARAM_NS::x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
- ATOMIC_DEC(&m_exportedPic->m_countRefEncoders);
- m_exportedPic = NULL;
- m_dpb->recycleUnreferenced();
diff --git a/media-libs/x265/x265-3.5-r3.ebuild b/media-libs/x265/x265-3.5-r3.ebuild
deleted file mode 100644
index 7dae9a86bfa8..000000000000
--- a/media-libs/x265/x265-3.5-r3.ebuild
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake flag-o-matic multilib-minimal multibuild
-
-if [[ ${PV} = 9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://bitbucket.org/multicoreware/x265_git/"
- S=${WORKDIR}/${P}/source
-else
- SRC_URI="https://bitbucket.org/multicoreware/x265_git/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv x86"
-fi
-
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="http://x265.org/ https://bitbucket.org/multicoreware/x265_git/"
-
-LICENSE="GPL-2"
-# subslot = libx265 soname
-SLOT="0/199"
-IUSE="+10bit +12bit cpu_flags_ppc_vsx2 numa test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}"
-ASM_DEPEND=">=dev-lang/nasm-2.13"
-BDEPEND="
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/arm-r1.patch"
- "${FILESDIR}/neon.patch"
- "${FILESDIR}/x265-3.3-ppc64.patch"
- "${FILESDIR}/tests.patch"
- "${FILESDIR}/test-ns.patch"
- "${FILESDIR}/${PN}-3.5-r5-test-ns_2.patch"
-)
-
-src_unpack() {
- if [[ ${PV} = 9999* ]]; then
- git-r3_src_unpack
- else
- unpack ${A}
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
- fi
-}
-
-# By default, the library and the encoder is configured for only one output bit
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
-# files with a different bit depth, which is annoying. However, upstream
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
-# that together so that the resulting library can produce all three of them
-# instead of only one.
-# The API requires the bit depth parameter, so that libx265 can then chose which
-# variant of the encoder to use.
-# To achieve this, we have to build one (static) library for each non-main
-# variant, and link it into the main library.
-# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it: "main" *MUST* come last in the following list.
-
-x265_get_variants() {
- local variants=""
- use 12bit && variants+="main12 "
- use 10bit && variants+="main10 "
- variants+="main"
- echo "${variants}"
-}
-
-x265_variant_src_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
-
- einfo "Configuring variant: ${MULTIBUILD_VARIANT} for ABI: ${ABI}"
-
- local mycmakeargs=( "${myabicmakeargs[@]}" )
- case "${MULTIBUILD_VARIANT}" in
- "main12")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DMAIN12=ON
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm* ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- # disable altivec for 12bit build #607802#c5
- if [[ ${ABI} = ppc* ]] ; then
- mycmakeargs+=(
- -DENABLE_ALTIVEC=OFF
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- )
- fi
- ;;
- "main10")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DENABLE_HDR10_PLUS=ON
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm* ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- # disable altivec for 10bit build #607802#c5
- if [[ ${ABI} = ppc* ]] ; then
- mycmakeargs+=(
- -DENABLE_ALTIVEC=OFF
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- )
- fi
- ;;
- "main")
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist="" v=
- for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS=-L.
- -DLINKED_10BIT=$(usex 10bit)
- -DLINKED_12BIT=$(usex 12bit)
- )
- if [[ ${ABI} = ppc* ]] ; then
- # upstream uses mix of altivec + power8 vectors
- # it's impossible to enable altivec without CPU_POWER8
- # and it does not work on ppc32
- # so we toggle both variables together
- mycmakeargs+=(
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
- )
- fi
- fi
- ;;
- *)
- die "Unknown variant: ${MULTIBUILD_VARIANT}";;
- esac
- cmake_src_configure
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- # -Werror=odr
- # https://bugs.gentoo.org/875854
- # https://bitbucket.org/multicoreware/x265_git/issues/937/build-fails-with-lto
- filter-lto
-
- local myabicmakeargs=(
- -DENABLE_TESTS=$(usex test ON OFF)
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
- -DENABLE_PIC=ON
- -DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DGIT_ARCHETYPE=1 #814116
- -DLIB_INSTALL_DIR="$(get_libdir)"
- )
-
- # Unfortunately, the asm for x86/x32/arm isn't PIC-safe.
- if [[ ${ABI} = x86 ]] ; then
- # Bug #528202, bug #913412
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = x32 ]] ; then
- # bug #510890
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = arm ]] ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
-
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_configure
-}
-
-multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant cmake_src_compile
-}
-
-x265_variant_src_test() {
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
- "${BUILD_DIR}/test/TestBench" || die
- else
- einfo "Unit tests check only assembly."
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
- einfo "Skipping tests."
- fi
-}
-
-multilib_src_test() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_test
-}
-
-multilib_src_install() {
- # Install only "main" variant since the others are already linked into it.
- local MULTIBUILD_VARIANTS=( "main" )
- multibuild_foreach_variant cmake_src_install
-}
-
-multilib_src_install_all() {
- dodoc -r "${S}/../doc/"*
-
- # we don't install *.a files for all variants,
- # so just delete these files instead of pretending
- # real USE=static-libs support
- find "${ED}" -name "*.a" -delete || die
-}
diff --git a/media-libs/x265/x265-3.5-r4.ebuild b/media-libs/x265/x265-3.5-r4.ebuild
deleted file mode 100644
index 762fbb6bd7f4..000000000000
--- a/media-libs/x265/x265-3.5-r4.ebuild
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake flag-o-matic multilib-minimal multibuild
-
-if [[ ${PV} = 9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://bitbucket.org/multicoreware/x265_git/"
- S=${WORKDIR}/${P}/source
-else
- SRC_URI="https://bitbucket.org/multicoreware/x265_git/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
-fi
-
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="http://x265.org/ https://bitbucket.org/multicoreware/x265_git/"
-
-LICENSE="GPL-2"
-# subslot = libx265 soname
-SLOT="0/199"
-IUSE="+10bit +12bit cpu_flags_ppc_vsx2 numa test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}"
-ASM_DEPEND=">=dev-lang/nasm-2.13"
-BDEPEND="
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/arm-r1.patch"
- "${FILESDIR}/neon.patch"
- "${FILESDIR}/x265-3.3-ppc64.patch"
- "${FILESDIR}/tests.patch"
- "${FILESDIR}/test-ns.patch"
- "${FILESDIR}/${PN}-3.5-r5-test-ns_2.patch"
-)
-
-src_unpack() {
- if [[ ${PV} = 9999* ]]; then
- git-r3_src_unpack
- else
- unpack ${A}
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
- fi
-}
-
-# By default, the library and the encoder is configured for only one output bit
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
-# files with a different bit depth, which is annoying. However, upstream
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
-# that together so that the resulting library can produce all three of them
-# instead of only one.
-# The API requires the bit depth parameter, so that libx265 can then chose which
-# variant of the encoder to use.
-# To achieve this, we have to build one (static) library for each non-main
-# variant, and link it into the main library.
-# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it: "main" *MUST* come last in the following list.
-
-x265_get_variants() {
- local variants=""
- use 12bit && variants+="main12 "
- use 10bit && variants+="main10 "
- variants+="main"
- echo "${variants}"
-}
-
-x265_variant_src_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
-
- einfo "Configuring variant: ${MULTIBUILD_VARIANT} for ABI: ${ABI}"
-
- local mycmakeargs=( "${myabicmakeargs[@]}" )
- case "${MULTIBUILD_VARIANT}" in
- "main12")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DMAIN12=ON
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm* ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- # disable altivec for 12bit build #607802#c5
- if [[ ${ABI} = ppc* ]] ; then
- mycmakeargs+=(
- -DENABLE_ALTIVEC=OFF
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- )
- fi
- ;;
- "main10")
- mycmakeargs+=(
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- -DENABLE_HDR10_PLUS=ON
- )
- if [[ ${ABI} = x86 ]] ; then
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- if [[ ${ABI} = arm* ]] ; then
- # 589674
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
- # disable altivec for 10bit build #607802#c5
- if [[ ${ABI} = ppc* ]] ; then
- mycmakeargs+=(
- -DENABLE_ALTIVEC=OFF
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- )
- fi
- ;;
- "main")
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist="" v=
- for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS=-L.
- -DLINKED_10BIT=$(usex 10bit)
- -DLINKED_12BIT=$(usex 12bit)
- )
- if [[ ${ABI} = ppc* ]] ; then
- # upstream uses mix of altivec + power8 vectors
- # it's impossible to enable altivec without CPU_POWER8
- # and it does not work on ppc32
- # so we toggle both variables together
- mycmakeargs+=(
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
- )
- fi
- fi
- ;;
- *)
- die "Unknown variant: ${MULTIBUILD_VARIANT}";;
- esac
- cmake_src_configure
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- # -Werror=odr
- # https://bugs.gentoo.org/875854
- # https://bitbucket.org/multicoreware/x265_git/issues/937/build-fails-with-lto
- filter-lto
-
- local myabicmakeargs=(
- -DENABLE_TESTS=$(usex test ON OFF)
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
- -DENABLE_PIC=ON
- -DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DGIT_ARCHETYPE=1 #814116
- -DLIB_INSTALL_DIR="$(get_libdir)"
- )
-
- # Unfortunately, the asm for x86/x32/arm isn't PIC-safe.
- if [[ ${ABI} = x86 ]] ; then
- # Bug #528202, bug #913412
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = x32 ]] ; then
- # bug #510890
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- elif [[ ${ABI} = arm ]] ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
- fi
-
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_configure
-}
-
-multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant cmake_src_compile
-}
-
-x265_variant_src_test() {
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
- "${BUILD_DIR}/test/TestBench" || die
- else
- einfo "Unit tests check only assembly."
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
- einfo "Skipping tests."
- fi
-}
-
-multilib_src_test() {
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
- multibuild_foreach_variant x265_variant_src_test
-}
-
-multilib_src_install() {
- # Install only "main" variant since the others are already linked into it.
- local MULTIBUILD_VARIANTS=( "main" )
- multibuild_foreach_variant cmake_src_install
-}
-
-multilib_src_install_all() {
- dodoc -r "${S}/../doc/"*
-
- # we don't install *.a files for all variants,
- # so just delete these files instead of pretending
- # real USE=static-libs support
- find "${ED}" -name "*.a" -delete || die
-}
diff --git a/media-libs/x265/x265-3.5-r6.ebuild b/media-libs/x265/x265-3.5-r6.ebuild
deleted file mode 100644
index f38a58ad7981..000000000000
--- a/media-libs/x265/x265-3.5-r6.ebuild
+++ /dev/null
@@ -1,202 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake flag-o-matic multilib-minimal multibuild
-
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
-HOMEPAGE="https://www.x265.org/ https://bitbucket.org/multicoreware/x265_git/"
-
-if [[ ${PV} = 9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://bitbucket.org/multicoreware/x265_git/"
- MY_P="${PN}-${PV}"
-else
- SRC_URI="https://bitbucket.org/multicoreware/x265_git/downloads/${PN}_${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
- MY_P="${PN}_${PV}"
-fi
-
-S="${WORKDIR}/${MY_P}/source"
-unset MY_P
-
-LICENSE="GPL-2"
-# subslot = libx265 soname
-SLOT="0/199"
-IUSE="+10bit +12bit cpu_flags_ppc_vsx2 numa test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}"
-ASM_DEPEND=">=dev-lang/nasm-2.13"
-BDEPEND="
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/arm-r1.patch"
- "${FILESDIR}/neon.patch"
- "${FILESDIR}/tests.patch"
- "${FILESDIR}/test-ns.patch"
- "${FILESDIR}/${PN}-3.5-r5-cpp-std.patch"
- "${FILESDIR}/${PN}-3.5-r5-gcc15.patch"
- "${FILESDIR}/${PN}-3.5-r5-test-ns_2.patch"
- "${FILESDIR}/${PN}-3.6-cmake-cleanup.patch"
- "${FILESDIR}/${PN}-3.6-code-cleanup.patch"
-)
-
-pkg_setup() {
- variants=(
- $(usev 12bit "main12")
- $(usev 10bit "main10")
- )
-}
-
-# By default, the library and the encoder is configured for only one output bit
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
-# files with a different bit depth, which is annoying. However, upstream
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
-# that together so that the resulting library can produce all three of them
-# instead of only one.
-# The API requires the bit depth parameter, so that libx265 can then chose which
-# variant of the encoder to use.
-# To achieve this, we have to build one (static) library for each non-main
-# variant, and link it into the main library.
-# Upstream documents using the 8bit variant as main library, hence we do not
-# allow disabling it
-
-x265_variant_src_configure() {
- einfo "Configuring variant: ${MULTIBUILD_VARIANT} for ABI: ${ABI}"
-
- local mycmakeargs=(
- "${mycmakeargs[@]}"
- -DHIGH_BIT_DEPTH=ON
- -DEXPORT_C_API=OFF
- -DENABLE_SHARED=OFF
- -DENABLE_CLI=OFF
- )
-
- case "${MULTIBUILD_VARIANT}" in
- "main12")
- mycmakeargs+=(
- -DMAIN12=ON
- )
- ;;
- "main10")
- mycmakeargs+=(
- -DENABLE_HDR10_PLUS=ON
- )
- ;;
- *)
- die "Unknown variant: ${MULTIBUILD_VARIANT}";;
- esac
- cmake_src_configure
-}
-
-multilib_src_configure() {
- # -Werror=odr
- # https://bugs.gentoo.org/875854
- # https://bitbucket.org/multicoreware/x265_git/issues/937/build-fails-with-lto
- filter-lto
-
- local mycmakeargs=(
- -DENABLE_PIC=ON
- -DENABLE_LIBNUMA="$(usex numa)"
- -DENABLE_SVT_HEVC="no" # missing
- -DENABLE_VTUNE="no" # missing
- -DGIT_ARCHETYPE=1 #814116
- -DLIB_INSTALL_DIR="$(get_libdir)"
- )
- if ! multilib_is_native_abi; then
- mycmakeargs+=(
- -DENABLE_CLI="no"
- )
- fi
-
- # Unfortunately, the asm for x86/x32/arm isn't PIC-safe.
- # x86 # Bug #528202, bug #913412
- # x32 # bug #510890
- if [[ ${ABI} = x86 ]] || [[ ${ABI} = x32 ]] || [[ ${ABI} = arm ]] ; then
- mycmakeargs+=(
- -DENABLE_ASSEMBLY=OFF
- # ENABLE_TESTS requires ENABLE_ASSEMBLY=ON to be visible
- # source/CMakeLists.txt:858
- # -DENABLE_TESTS="no" #728748
- )
- else
- mycmakeargs+=(
- -DENABLE_TESTS="$(usex test)"
- )
- fi
-
- if [[ ${ABI} = ppc* ]] ; then
- # upstream uses mix of altivec + power8 vectors
- # it's impossible to enable altivec without CPU_POWER8
- # and it does not work on ppc32
- # so we toggle both variables together
- mycmakeargs+=(
- -DCPU_POWER8="$(usex cpu_flags_ppc_vsx2)"
- -DENABLE_ALTIVEC="$(usex cpu_flags_ppc_vsx2)"
- )
- fi
-
- local MULTIBUILD_VARIANTS=( "${variants[@]}" )
- if [[ "${#MULTIBUILD_VARIANTS[@]}" -gt 1 ]] ; then
- multibuild_foreach_variant x265_variant_src_configure
-
- local liblist="" v=
- for v in "${MULTIBUILD_VARIANTS[@]}" ; do
- ln -s "${BUILD_DIR}-${v}/libx265.a" "${BUILD_DIR}/libx265_${v}.a" || die
- liblist+="libx265_${v}.a;"
- done
-
- mycmakeargs+=(
- -DEXTRA_LIB="${liblist}"
- -DEXTRA_LINK_FLAGS="-L${BUILD_DIR}"
- -DLINKED_10BIT"=$(usex 10bit)"
- -DLINKED_12BIT="$(usex 12bit)"
- )
- fi
-
- cmake_src_configure
-}
-
-multilib_src_compile() {
- local MULTIBUILD_VARIANTS=( "${variants[@]}" )
- if [[ "${#MULTIBUILD_VARIANTS[@]}" -gt 1 ]] ; then
- multibuild_foreach_variant cmake_src_compile
- fi
- cmake_src_compile
-}
-
-x265_variant_src_test() {
- if [[ -x "${BUILD_DIR}/test/TestBench" ]] ; then
- "${BUILD_DIR}/test/TestBench" || die
- else
- einfo "Unit tests check only assembly."
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
- einfo "Skipping tests."
- fi
-}
-
-multilib_src_test() {
- local MULTIBUILD_VARIANTS=( "${variants[@]}" )
- if [[ "${#MULTIBUILD_VARIANTS[@]}" -gt 1 ]] ; then
- multibuild_foreach_variant x265_variant_src_test
- fi
- x265_variant_src_test
-}
-
-multilib_src_install() {
- cmake_src_install
-}
-
-multilib_src_install_all() {
- dodoc -r "${S}/../doc/"*
-
- # we don't install *.a files for all variants,
- # so just delete these files instead of pretending
- # real USE=static-libs support
- find "${ED}" -name "*.a" -delete || die
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-12-28 17:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 20:50 [gentoo-commits] repo/gentoo:master commit in: media-libs/x265/, media-libs/x265/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-12-28 17:33 Andreas Sturmlechner
2024-08-25 15:44 Sam James
2020-09-08 18:08 Andreas Sturmlechner
2017-02-17 11:10 Alexis Ballier
2017-02-07 11:36 Alexis Ballier
2015-10-16 9:30 Alexis Ballier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox