From e23a08d0c97a0cc415aaa165da840b056f93c997 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 8 Oct 2021 23:06:07 +0100 Subject: gentoo resync : 08.10.2021 --- media-libs/x265/Manifest | 6 +- media-libs/x265/files/arm-r1.patch | 34 +++++- media-libs/x265/x265-3.5-r1.ebuild | 219 ------------------------------------ media-libs/x265/x265-3.5-r2.ebuild | 220 +++++++++++++++++++++++++++++++++++++ media-libs/x265/x265-9999.ebuild | 1 + 5 files changed, 254 insertions(+), 226 deletions(-) delete mode 100644 media-libs/x265/x265-3.5-r1.ebuild create mode 100644 media-libs/x265/x265-3.5-r2.ebuild (limited to 'media-libs/x265') diff --git a/media-libs/x265/Manifest b/media-libs/x265/Manifest index c3437dcff8c8..57609943e42e 100644 --- a/media-libs/x265/Manifest +++ b/media-libs/x265/Manifest @@ -1,4 +1,4 @@ -AUX arm-r1.patch 1448 BLAKE2B 1cb6b7282436c23565833eef725f74f6a0780911b54a84f3b552f936288496f429a057410cd57fb0214741b0f6b307ad3bd546872a628fe33cf2e036bb625113 SHA512 43d646200d2df2b041d9c2100559ea84f3a45a974624bd4b174eb4804201f4291a3d4e9915e16d81d781bb8ad49c6d4e61f438f470480362418e4e6e758ff1b5 +AUX arm-r1.patch 2252 BLAKE2B 86ea85441e4023cf415f57ea6b909e3a9d6c3cc4f35c1e402d4a84632f533e37b3ba8bea07af4cde0218c20c684d59cb4632de1cf73d6f2cc843e048c7a424a9 SHA512 387e8fd56fbc4d56765c0bcad2f5c5a1b43c4d3db51f81d010e0926932a58b16dcaae614e191efdfb0afedcf6ae5981966e8a94258fb0b22e85e003a1cea15ec AUX neon.patch 677 BLAKE2B 805177f9d3d3f703699adad93b0ca655065b9d093ecc3776600fa4eb3c565962beac47ebbeb35dcdf6fa3d0d19c734310b4032bcda62aeeea8ddc99debe901f1 SHA512 69e3d7c6d987ccbbaa7111eb8efc1e02c1e02096936a0eedfbe7e9e1c1377bed0f50f7b09aec0768e8de31251b8e3d2191aab56f19259c0e4aeda9684ab55bc6 AUX test-ns.patch 14677 BLAKE2B fa48d03bca5d72b7b3eac7f6ac98c93bde12ec845f9eecdde2c4ed5ed4ac6688d74ea75e11f00d4f901967f81cd80f138eaae662bd6cc1f67948121c3c0b2e34 SHA512 c6d2752027e42403704c68948256c52a237f8b83ee97d4b8e21cc13654964342ed061e5f048984fb649e9980f4899a64931ec97d6dfa1b786db6346134b04281 AUX tests.patch 650 BLAKE2B 21759b11966e12df1a72a1ed00935ff781ad8b912e734de65cf0872cf92400aef71d4aebbe067dd1059a1d445cd9819cef4dc4b1c7df63ca7b8e97b8e578045e SHA512 a4a3b69fa86e6910ff4f963b9667c8deaea4ff88f3396e8e426e61d036b12cbf550bff7867657da1ba98417f1ccae88db1887b94ea6271604060e01fb8698d79 @@ -6,7 +6,7 @@ AUX x265-3.3-ppc64.patch 590 BLAKE2B bbc6f18b8f192424450d2860e33ea6dbba14b46876f DIST x265_3.4.tar.gz 1469365 BLAKE2B 1021d9d62779d0cecddea56496b4e46bd8ccfd91fdf292efe412dc82b3c974095a5f9bd095057aa08e77b164555adc594549dea6aef7fbc0c025ae7295df721e SHA512 576b18711935e7da8433b2170d24ed159eb12ff1a18399360afa1b2132db33b463145c65ed918f667528ee954bbdfb5c69e5480f1c1df801515cefc592f3206e DIST x265_3.5.tar.gz 1537044 BLAKE2B 4fe15b762eda08a4379f69df622bef603fed784a237381d5c95876412020c113d053af829fa1eb66468462a6edc0de32dc597b1a98a63e9aa0250a47f4e76d05 SHA512 230e683239c3e262096ba96246c6f67229a1625d163f86647a411733bb1cf349685858aee3017bce818bb6992448d0abaa9241615a5b620561ce47ecb164f997 EBUILD x265-3.4.ebuild 6377 BLAKE2B 8cc509d9a0d7c8d4b0ed2226f3eae682035f725648d0c43b3083c6db50ae8afb3351855f38204a55bd1b5dd8fec3d6f6e11c5f12a0b3533f051e16983cef10f2 SHA512 d634f733615b5c2abbb3ced26c867e18a997172869e7991066d9f7ca18486f2140ee8195edd2f3584a3479f5a556ddb7e4e428d5a2bf963b56c9fde993853843 -EBUILD x265-3.5-r1.ebuild 6323 BLAKE2B 44ca896e96db19607d459260f0d08b21127a16110f30ddccf022880c285b81046915f0b21fc6a3e6b3565fb05ae582ec2589e95e4053af4aa278c2a70034bb06 SHA512 dcb576be87c85b898be29daa033381803675ff39424374340954a4e7cd04918c16c15667e43966d9efb1f9809792e5917f00fa1c1f749f6192b44f85a3c02bb7 +EBUILD x265-3.5-r2.ebuild 6350 BLAKE2B 0b952a0dc4f51ad94c34ce61afd4a89c4d581157016680ef2825b729e94f28dbeb4273052ac37dcc3ad66479b6369e771c6d678e63197e79ff132731a120080e SHA512 13821133cc698549521bc92cbe5644176db63a43c79b2f91ccdb373f5eec0b6384624ce50498978031e973c5eab3cb98a4ed814ed5651ff0f63b1839057eab5d EBUILD x265-3.5.ebuild 6295 BLAKE2B a27b1827080b93140f8a8548633a62682a68aca0b9bb9311306ed2d22dd012020e4ed39882a7d0025f1b31c253d769abedc620fb5889417d8bd44222494377a6 SHA512 4438c74042c8eaa5c9a153344fb28a1ac99b7f07b4d3db763db3904eba10774097c2b56a4892f67ac89ea82b6ab28f12ac84c6d532416e4cda8a5ca1e46dcf85 -EBUILD x265-9999.ebuild 6323 BLAKE2B 44ca896e96db19607d459260f0d08b21127a16110f30ddccf022880c285b81046915f0b21fc6a3e6b3565fb05ae582ec2589e95e4053af4aa278c2a70034bb06 SHA512 dcb576be87c85b898be29daa033381803675ff39424374340954a4e7cd04918c16c15667e43966d9efb1f9809792e5917f00fa1c1f749f6192b44f85a3c02bb7 +EBUILD x265-9999.ebuild 6350 BLAKE2B 0b952a0dc4f51ad94c34ce61afd4a89c4d581157016680ef2825b729e94f28dbeb4273052ac37dcc3ad66479b6369e771c6d678e63197e79ff132731a120080e SHA512 13821133cc698549521bc92cbe5644176db63a43c79b2f91ccdb373f5eec0b6384624ce50498978031e973c5eab3cb98a4ed814ed5651ff0f63b1839057eab5d MISC metadata.xml 622 BLAKE2B 337e399c3be2dfc52c2f422a76ae80faad2424d221e074041e06cc0a10403bea1aca3975ae6afaf9bb4b50cc5069db8413928e8697458014c6f96d1856421f79 SHA512 be4f7c57f732fa836cda726da9426a0e4bdac2a681a4be3bb157e7cf7b8f517e3002653d9ee7a58ba81601d34fb6168680453bbdaa10389b65945f7b4d1a492c diff --git a/media-libs/x265/files/arm-r1.patch b/media-libs/x265/files/arm-r1.patch index 8a8102dd2580..69aa3036eff3 100644 --- a/media-libs/x265/files/arm-r1.patch +++ b/media-libs/x265/files/arm-r1.patch @@ -1,10 +1,8 @@ More aliases for ARM. Do not force CFLAGS for ARM. -Index: source/CMakeLists.txt -=================================================================== ---- source.orig/CMakeLists.txt -+++ source/CMakeLists.txt +--- 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) @@ -40,3 +38,31 @@ Index: source/CMakeLists.txt 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/x265-3.5-r1.ebuild b/media-libs/x265/x265-3.5-r1.ebuild deleted file mode 100644 index 3e0116c5da00..000000000000 --- a/media-libs/x265/x265-3.5-r1.ebuild +++ /dev/null @@ -1,219 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake multilib-minimal multilib multibuild flag-o-matic - -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 ~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_git/" - -LICENSE="GPL-2" -# subslot = libx265 soname -SLOT="0/199" -IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic 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" -) - -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 - ) - 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() { - 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)" - ) - - 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_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-r2.ebuild b/media-libs/x265/x265-3.5-r2.ebuild new file mode 100644 index 000000000000..58018488f52c --- /dev/null +++ b/media-libs/x265/x265-3.5-r2.ebuild @@ -0,0 +1,220 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake multilib-minimal multilib multibuild flag-o-matic + +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 ~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_git/" + +LICENSE="GPL-2" +# subslot = libx265 soname +SLOT="0/199" +IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic 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" +) + +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() { + 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)" + ) + + 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_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-9999.ebuild b/media-libs/x265/x265-9999.ebuild index 3e0116c5da00..58018488f52c 100644 --- a/media-libs/x265/x265-9999.ebuild +++ b/media-libs/x265/x265-9999.ebuild @@ -105,6 +105,7 @@ x265_variant_src_configure() { -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF + -DENABLE_HDR10_PLUS=ON ) if [[ ${ABI} = x86 ]] ; then mycmakeargs+=( -DENABLE_ASSEMBLY=OFF ) -- cgit v1.2.3