From 1802160f23e91c618b3c7379fd99127682cfce19 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 22 Sep 2024 14:47:12 +0100 Subject: gentoo auto-resync : 22:09:2024 - 14:47:12 --- media-libs/x265/Manifest | 6 +- media-libs/x265/x265-3.5-r5.ebuild | 202 ------------------------------------- media-libs/x265/x265-3.5-r6.ebuild | 202 +++++++++++++++++++++++++++++++++++++ media-libs/x265/x265-3.6-r1.ebuild | 202 +++++++++++++++++++++++++++++++++++++ media-libs/x265/x265-3.6.ebuild | 202 ------------------------------------- media-libs/x265/x265-9999.ebuild | 4 +- 6 files changed, 409 insertions(+), 409 deletions(-) delete mode 100644 media-libs/x265/x265-3.5-r5.ebuild create mode 100644 media-libs/x265/x265-3.5-r6.ebuild create mode 100644 media-libs/x265/x265-3.6-r1.ebuild delete mode 100644 media-libs/x265/x265-3.6.ebuild (limited to 'media-libs/x265') diff --git a/media-libs/x265/Manifest b/media-libs/x265/Manifest index dcadff704318..25e8d6839d57 100644 --- a/media-libs/x265/Manifest +++ b/media-libs/x265/Manifest @@ -15,7 +15,7 @@ DIST x265-3.6.tar.gz 1655889 BLAKE2B 2598421e2e21974998b0b20895dc7e12dbf6ebe1b6c DIST x265_3.5.tar.gz 1537044 BLAKE2B 4fe15b762eda08a4379f69df622bef603fed784a237381d5c95876412020c113d053af829fa1eb66468462a6edc0de32dc597b1a98a63e9aa0250a47f4e76d05 SHA512 230e683239c3e262096ba96246c6f67229a1625d163f86647a411733bb1cf349685858aee3017bce818bb6992448d0abaa9241615a5b620561ce47ecb164f997 EBUILD x265-3.5-r3.ebuild 6316 BLAKE2B 5b99f0ce346bb24e74e561ec7b135e10c32346121750bb27c3a93fa5e36dc182436fe44ec6c0838762690ebb4258876b0134db8788838872d21e1e7e9c2f8dee SHA512 898a05326c6b89dba113e55fa842e7dd830d13197dced98d7a0015a402132a9c1848106443cbc3e4b9ab26e5ad53e63dbb9ed4e4b199c963e9c1bdf7be134e1e EBUILD x265-3.5-r4.ebuild 6322 BLAKE2B c6adc976356fcf9cb3fdc62a6fbe59fe5685a105ea57f5a6267aee55d5ab5f06c43f7cdb29fdae7d2fefbe8b31407fbcb30c104a044473a11357a3a80ac3672e SHA512 8d443c96c79b9ca9737509f72839f2db02854f21f8391e9dd60a2c83eb967363bbe1953e2aa7ba4b9b675aa685c88abd2a84af0d99e461be7719c2e56a70f7b4 -EBUILD x265-3.5-r5.ebuild 5343 BLAKE2B eefbad58d102fec9ec5bfbecf424e7f3967715ef99b11a321b0cc80e9cabc02bd76d0ac5ce7ef2f6d8d4835287daafedba19e6131d5c38c1e694e933e15d20b2 SHA512 c5ccc95c29718659381d2855a0f3d9f28ef60a92e34bfb03cb52dddc9c9aabb4d0b9c4d0dc4251d59b7beb20ba93ab5aa128311c1d9034692111760e3c9ae229 -EBUILD x265-3.6.ebuild 5370 BLAKE2B 32fc65ba64535edf20e10110e4a6a3700936099a128caeea21ec4628fd6cb2c8cd628cb71a51ed547d1a068482c4d1a96bc3afa1b5f09e4bdb14dc83f0e1b779 SHA512 d6ac971603f4e82bca3cf9a6d90e4fa8976b6ade8833a98a03340e94b6b24a7f82cc6270106d546827bd7e3949608d0f9fcfabd59a51fbdeb620126b948cc8ca -EBUILD x265-9999.ebuild 5367 BLAKE2B aa9a9cedfa72fc0caa242801a7378ea8a8c5afaaa51ff38a33c29ead943bc165f02e6074bb19581d00eedf49416f208e39edd0623196a58f9ee1752e1ad8aba3 SHA512 5ffe18314c90f517529c338c5e7b575a0371cbb2e59f75890cc38846516a13fca8c847106267ee66b95fe460bfa73eef961c8d488bd12bb5039c7b8232742141 +EBUILD x265-3.5-r6.ebuild 5350 BLAKE2B 0b019e6c35b3e61990ee28bb19ea8a157b44531617d7e71e0f039a62a2dd24909bc3c640b554fb5e1433db3424e4b35eead1e2685ac606470a428bd460855541 SHA512 22816466595e1e5bbf4358ef62683cee064bbc4c6aa1f71c5d780f6e4b217a8b25c6a8c1b4732fdeba686c271272355a30746fc040404dfe896edc67840f190b +EBUILD x265-3.6-r1.ebuild 5377 BLAKE2B 20af7e260b2aa890a1e3c32bd7cec9cd40c80ed7693b478925ab7b321721ee7d927d2b88f1c86ee4ea1226cf197dbac32d1c6bcb78bad9c909097e2665f53e46 SHA512 2f88e7adf5da0bfc03baa169ca125a7d81eab9fcd7cfffc4cfe47b140e527f69ba67057e41b17441620e9ee84d55b64ee1d188fb6e88f9665722f91b4e475342 +EBUILD x265-9999.ebuild 5374 BLAKE2B 7134b8f29ccab6ddbeb933de089caade90f02c8affbe8c2f1c703ac1fee116824b5406b0b1bce7da93a995df8ee661340f69002b41e8b772cbbb613d7e976958 SHA512 c49a0acb6893a2f54e89fec2f8af26f63d79b6302697f8f85ce222b7749af17a5075f7bfcd72852288a41846281fe18802ceefb7330f5b2c5aa15ad34e4cb696 MISC metadata.xml 541 BLAKE2B 4509c092fe30d689d4f18d077d429bbd0c05f704fa2027dd400d3686a35f1d39631480abce2357cb7cec8f468b2eeed2a08156f8830938171016c6e77d3f2a73 SHA512 d80b09241e28cffdab81e21f40d81f4da4814574f3e56109684f654887767a671c111bdc9f44566b0e7ab7c8cca949a5718d8afb20f0a43e73c2e6b878bd28a7 diff --git a/media-libs/x265/x265-3.5-r5.ebuild b/media-libs/x265/x265-3.5-r5.ebuild deleted file mode 100644 index c9db10613904..000000000000 --- a/media-libs/x265/x265-3.5-r5.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="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" - "${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 -} diff --git a/media-libs/x265/x265-3.5-r6.ebuild b/media-libs/x265/x265-3.5-r6.ebuild new file mode 100644 index 000000000000..f38a58ad7981 --- /dev/null +++ b/media-libs/x265/x265-3.5-r6.ebuild @@ -0,0 +1,202 @@ +# 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 +} diff --git a/media-libs/x265/x265-3.6-r1.ebuild b/media-libs/x265/x265-3.6-r1.ebuild new file mode 100644 index 000000000000..7fe46d01d35a --- /dev/null +++ b/media-libs/x265/x265-3.6-r1.ebuild @@ -0,0 +1,202 @@ +# 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 -> ${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/209" +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}/${PN}-9999-arm.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.6-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 +} diff --git a/media-libs/x265/x265-3.6.ebuild b/media-libs/x265/x265-3.6.ebuild deleted file mode 100644 index ba013c73d378..000000000000 --- a/media-libs/x265/x265-3.6.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="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 -> ${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/209" -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}/${PN}-9999-arm.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.6-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 -} diff --git a/media-libs/x265/x265-9999.ebuild b/media-libs/x265/x265-9999.ebuild index bf2855a23f64..472c0eb7e4fd 100644 --- a/media-libs/x265/x265-9999.ebuild +++ b/media-libs/x265/x265-9999.ebuild @@ -6,7 +6,7 @@ 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/" +HOMEPAGE="https://www.x265.org/ https://bitbucket.org/multicoreware/x265_git/" if [[ ${PV} = 9999* ]]; then inherit git-r3 @@ -108,7 +108,7 @@ multilib_src_configure() { -DGIT_ARCHETYPE=1 #814116 -DLIB_INSTALL_DIR="$(get_libdir)" ) - if multilib_is_native_abi; then + if ! multilib_is_native_abi; then mycmakeargs+=( -DENABLE_CLI="no" ) -- cgit v1.2.3