diff options
Diffstat (limited to 'media-libs')
21 files changed, 773 insertions, 450 deletions
diff --git a/media-libs/Manifest.gz b/media-libs/Manifest.gz Binary files differindex 3ab9caa38de0..372488cdc49e 100644 --- a/media-libs/Manifest.gz +++ b/media-libs/Manifest.gz diff --git a/media-libs/openexr/Manifest b/media-libs/openexr/Manifest index b647f20656a7..5662db42265c 100644 --- a/media-libs/openexr/Manifest +++ b/media-libs/openexr/Manifest @@ -16,6 +16,6 @@ EBUILD openexr-3.1.11.ebuild 2065 BLAKE2B e0c0fdcdd04715324b708c5096fa9e5a6d71a9 EBUILD openexr-3.1.12.ebuild 2068 BLAKE2B 152d93c66f05c1ec9b83f9631e9984f0a5a4f39abcd7063b19756d4f0f8e9aef1d91301cd95018feca57c763558faedfe78ba07bec5f7517cf3c8c07925fbc19 SHA512 a24d130a7dd6207ae1da95cf2a04fbfbeb1188179a2f9e1c838d2a58ea502a4b0398bdbb2d9666f25926c424f24e6b940c7ec1daeabe2c7439398ce4571fcec2 EBUILD openexr-3.1.5-r1.ebuild 2067 BLAKE2B 5def6ac36362ea8d8810bd2056df16ca57e658e83eb2a0ae6846cc322ae0be41f8c76dad1498947ed8b44fad9fac46a598e1cf173395c1a9946719f2359743b2 SHA512 9b7f62c74c723fe18766db36e4f75623818c8d2697d23f24c742061280a373fef973cc5478bd8a27492aa82249f189bdcc4c395854199d910e54d91033755174 EBUILD openexr-3.1.7.ebuild 1924 BLAKE2B 1ae6aeb5a4693d21d798b6260fb2b485044dcfa33820f328f81993f7d3fa6a7ba98c12f183dda3b58fc8d99c3785c5e5d15acdab03d6fe2c9b19bbe76905e5cc SHA512 df60600d657768a811a5b62cb3f77c0fca177ea595b2895c7e62d797fc147f8ef0551512b67ef80d0b0ece156de143bf36e7dd20dbc88f276f879d95fb8e58e8 -EBUILD openexr-3.2.3.ebuild 3578 BLAKE2B 0c0c031a5d51ffc6779a6a37c6fb55778023c094df2af374c672d67a807d5291e9b49e87285b0a020ae600c138a8ec4210cd93f2729d57a8f4acd19f999f2e01 SHA512 d40057a90a5c44b1bb6dffbaac88f182e65d3b8ff137017f356c1fe4f7150c21a47c091555ec183bcb868827dc6a183f43d38086f10d6aa9b978e7bed6f26d3a -EBUILD openexr-3.2.4.ebuild 3581 BLAKE2B add5ee44ca12bac0c81fde17fe61c9999b735a140c5e810ea435a473465a6a8a95c099e0d4ac2c190cf5ed527d450855e66147dcc46c72f08803ad951bf33d83 SHA512 f45267a61b2b6a68943b64cc99867730c51935c9f272859fdec028696556d3cd0c5b375727bad4973b643965f948b2c9571e52763861ea39dba2007da1ff4717 +EBUILD openexr-3.2.3-r1.ebuild 3574 BLAKE2B 6fa156942b70f95f96351e116019a5d29dc1090ca3e37c57a7ebf34f250d1e3dd4da05dfad3bb1aab6f37430b9c18699f5b86d5fbb64c563e5c88951a4897808 SHA512 fbb278658606442bfdb214cf13c6b779af2a4aa5dcc424c6302587ddef484324e670145482ee36b722a3c0ffaad05883b4ed36c09b1075f5d30057ca30f18305 +EBUILD openexr-3.2.4-r1.ebuild 3577 BLAKE2B 6276b5d70f57a4cadc8a2a3ca28adee9abb97fce743a46b6ae21bc9b1c25554020721abb995aa46295df911acb2a100e315cf4fe6ca020d6eeffbae5235d4ea4 SHA512 af257822a7b0490e68bb34889d73f28fcf1cda998b07772a85dd4c3fa3b970ef70eff5cb7af518721e0b13f608cbb0e1161dfabefa3ec17f2729c6a56ed86a12 MISC metadata.xml 798 BLAKE2B d780a0ead28144e6031fedeed720d1cd79bfa8ab54a1f9d2a99324ac6db4948cf25ebf73abd630d7e697b8578ef5b6442679ce05d1949784fb8a17ed2a6fb9a1 SHA512 5c9d837a72b41c0d8463ffadd639fde0c9dc620abf4b51ef7718efed5d94a12a336d85f10d65e2fbffd3d4c59fe12a09e71f42f68d081917f4d7f1aba24de893 diff --git a/media-libs/openexr/openexr-3.2.3.ebuild b/media-libs/openexr/openexr-3.2.3-r1.ebuild index 146862dea6dd..7b883cfee438 100644 --- a/media-libs/openexr/openexr-3.2.3.ebuild +++ b/media-libs/openexr/openexr-3.2.3-r1.ebuild @@ -29,7 +29,7 @@ REQUIRED_USE="doc? ( utils )" RESTRICT="!test? ( test )" RDEPEND=" - app-arch/libdeflate[zlib] + app-arch/libdeflate:= >=dev-libs/imath-3.1.6:= " DEPEND="${RDEPEND}" diff --git a/media-libs/openexr/openexr-3.2.4.ebuild b/media-libs/openexr/openexr-3.2.4-r1.ebuild index 915a3cbda2ae..1207ed892873 100644 --- a/media-libs/openexr/openexr-3.2.4.ebuild +++ b/media-libs/openexr/openexr-3.2.4-r1.ebuild @@ -29,7 +29,7 @@ REQUIRED_USE="doc? ( utils )" RESTRICT="!test? ( test )" RDEPEND=" - app-arch/libdeflate[zlib] + app-arch/libdeflate:= >=dev-libs/imath-3.1.6:= " DEPEND="${RDEPEND}" diff --git a/media-libs/x264/Manifest b/media-libs/x264/Manifest index ea1c6afe1fd2..670161764170 100644 --- a/media-libs/x264/Manifest +++ b/media-libs/x264/Manifest @@ -1,7 +1,9 @@ DIST x264-0.0.20220222.tar.bz2 777236 BLAKE2B 45e57c48b4b889f5c7b4ce87d1442d26d907aac47fb7c586b34239317a8b74bb93eac3058eed766728fbca6370656d9a6f070e8992643984a89560e28edf206d SHA512 1cf864059f83731ac47008c1af1d9ac06d06283439cf883a020f8a76e0c7efc3b525791d11efe8784d0e39ded68dd03794f0502fa64cc07df2f2de064a55e1d9 DIST x264-0.0.20231114.tar.bz2 833229 BLAKE2B e8e60767d16ea11e55f9dd56f1c74535a06b07a498b91d4372872925915563b67fb917c5856e2e40e1f58acbab3142509d036cae8d56820bef0e16ee7bc35196 SHA512 7705c2827c6b280afc7403bce206f82ee94c1ba76c582d3e6ae017b9c4f08c4475ac70373f8a0bcda73046221456efc3f338c57aaf03c11f4d8e63f69bb94db5 +DIST x264-0.0.20240513.tar.bz2 841594 BLAKE2B fe88195c52d90e635a0aedef7d18886160147ba41cd1a692ae9a661b76608ac11e05aa5bc4628030f833d6a822cee187f3fbc4c015e094eb1b30c96783147124 SHA512 6d0d9e079d6c7650abb5c00ad60cf3cfe72a220b3ee7cd030d4daeefdd9feeb4d056cf2e01b2f8d2fb0a66ccc15cdde860237f8ac5eac42ede6e5444a81346f8 EBUILD x264-0.0.20220222.ebuild 2101 BLAKE2B e31719349399dfa83e5d0c97b3684b2f9484d051951f740e12d478b1a57448add56c5d5ff9e461f05d89cb9012205074d7a3e9246af65079cbbe5a88c191ed22 SHA512 ea9bb23667b27e6b14a1b0d3b751509c2fdd5dab93de26d1f4c2a73067bddbec2d76edf839a6bf096338b97f3e17b8866163950e2b99af7c3f1e4e64cda46cd1 EBUILD x264-0.0.20231114-r1.ebuild 2110 BLAKE2B 97718174c391e9f26985a17ca2af7db148decb4da582ff73efc9ba5c2394c0dff43f937394d88cd0d734597dc0c53551a4890363838dff33201772a8283174ce SHA512 8e908ea8b30c90954e7f4a8c3db3d9f9b8a87926cc427de1f4b4b7ba443cd237741ef8810009efc788c8441def07e510e7b6e9348e746bdfad4d0980694132f4 EBUILD x264-0.0.20231114.ebuild 2137 BLAKE2B 52fd9c1d3fd59454498fcb75a39f930e91fc27588e7f649530acc04b3d3b975e4721948c170c7cd34e2f32245a2fc5e6b2f8bcf5114d3171f8336ee8e2ec3fd4 SHA512 0e1f1ab79148090f34f80bd4eb2456c98a9f3c895098123d90e0afa059f5197270f6c0b6b6d4c85011d32acca4cedd7a5e5d85990d7725e7add5e0fa6bcb753b -EBUILD x264-9999.ebuild 2117 BLAKE2B c473e8b833146e2e5bae7636255b5e8695496d4504727c4187b74973a6d3390f0762f21d078d1cd05df04952b1d41aef9f7a54fd322d49782d00128165264d75 SHA512 db5ac6976837486ca58c64103d441ec17e35cbc804485341a31f55de360abaf8a882083f7964c4f631c6e65d8ddc788982e379118f1d9eb353fd970e23c50d18 +EBUILD x264-0.0.20240513.ebuild 2117 BLAKE2B 61202add96a3e761c3eddbd1999c3112992364ee7914b655db26ca49e3a6116111741a5ea68d0136dc409b99f0ef32a93fea9187d7de89523a48d6e3da906353 SHA512 e69bee05bba06593067bb82603cac1e3b8f06edec0ee5f55e974b3815f7f0ee3d26e7852966297a0868e808b7ff436efbc909ba7c26249ad9630811df365907e +EBUILD x264-9999.ebuild 2117 BLAKE2B 61202add96a3e761c3eddbd1999c3112992364ee7914b655db26ca49e3a6116111741a5ea68d0136dc409b99f0ef32a93fea9187d7de89523a48d6e3da906353 SHA512 e69bee05bba06593067bb82603cac1e3b8f06edec0ee5f55e974b3815f7f0ee3d26e7852966297a0868e808b7ff436efbc909ba7c26249ad9630811df365907e MISC metadata.xml 436 BLAKE2B ae066438ad1ac844f1c212b463498e0d4ee3e0b38d24b7a85a36dca419cfffc83799c69fed3af8d7ae35e619a961ca7aa3b4cbb86ade79eff318e05da836ea68 SHA512 f019ace06237e2e0244efd5cee86fdadafb03dfd0f2dec16dfce3d39ffe5a80292840c14378eed2270b47bcc6f32d5b59d358461f93bc7fc25ff14f35be4b41c diff --git a/media-libs/x264/x264-0.0.20240513.ebuild b/media-libs/x264/x264-0.0.20240513.ebuild new file mode 100644 index 000000000000..e5fa9d33f6bd --- /dev/null +++ b/media-libs/x264/x264-0.0.20240513.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with media-video/x264-encoder + +inherit multilib-minimal toolchain-funcs flag-o-matic + +DESCRIPTION="Free library for encoding X264/AVC streams" +HOMEPAGE="https://www.videolan.org/developers/x264.html" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://code.videolan.org/videolan/x264.git" +else + X264_COMMIT="4613ac3c15fd75cebc4b9f65b7fb95e70a3acce1" + SRC_URI="https://code.videolan.org/videolan/x264/-/archive/${X264_COMMIT}/x264-${X264_COMMIT}.tar.bz2 -> ${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" + S="${WORKDIR}/${PN}-${X264_COMMIT}" +fi + +LICENSE="GPL-2" +SLOT="0/164" # SONAME +IUSE="cpu_flags_ppc_altivec +interlaced opencl static-libs +threads" + +ASM_DEP=">=dev-lang/nasm-2.13" +DEPEND=" + abi_x86_32? ( ${ASM_DEP} ) + abi_x86_64? ( ${ASM_DEP} ) + opencl? ( dev-lang/perl ) +" +RDEPEND="opencl? ( >=virtual/opencl-0-r3[${MULTILIB_USEDEP}] )" + +DOCS=( AUTHORS doc/{ratecontrol,regression_test,standards,threads,vui}.txt ) + +multilib_src_configure() { + tc-export CC + + if [[ ${ABI} == x86 || ${ABI} == amd64 ]]; then + export AS="nasm" + else + export AS="${CC}" + fi + + local asm_conf="" + + if \ + [[ ${ABI} == x86* ]] \ + || [[ ${ABI} == "x32" ]] \ + || [[ ${CHOST} == armv5* ]] \ + || [[ ${ABI} == ppc* ]] && { use !cpu_flags_ppc_altivec ; } \ + || use mips && { ! test-compile 'c' 'int main(void){__asm__("addvi.b $w0, $w1, 1");return 0;}' ; } + then + asm_conf=" --disable-asm" + fi + + "${S}/configure" \ + --prefix="${EPREFIX}"/usr \ + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + --disable-cli \ + --disable-avs \ + --disable-lavf \ + --disable-swscale \ + --disable-ffms \ + --disable-gpac \ + --enable-pic \ + --enable-shared \ + --host="${CHOST}" \ + --cross-prefix="${CHOST}-" \ + $(usex interlaced "" "--disable-interlaced") \ + $(usex opencl "" "--disable-opencl") \ + $(usex static-libs "--enable-static" "") \ + $(usex threads "" "--disable-thread") \ + ${asm_conf} || die +} diff --git a/media-libs/x264/x264-9999.ebuild b/media-libs/x264/x264-9999.ebuild index e94280109f25..e5fa9d33f6bd 100644 --- a/media-libs/x264/x264-9999.ebuild +++ b/media-libs/x264/x264-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -14,7 +14,7 @@ if [[ ${PV} == 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://code.videolan.org/videolan/x264.git" else - X264_COMMIT="c196240409e4d7c01b47448d93b1f9683aaa7cf7" + X264_COMMIT="4613ac3c15fd75cebc4b9f65b7fb95e70a3acce1" SRC_URI="https://code.videolan.org/videolan/x264/-/archive/${X264_COMMIT}/x264-${X264_COMMIT}.tar.bz2 -> ${P}.tar.bz2" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" S="${WORKDIR}/${PN}-${X264_COMMIT}" diff --git a/media-libs/x265/Manifest b/media-libs/x265/Manifest index 2e754649e763..358ecdba5a3c 100644 --- a/media-libs/x265/Manifest +++ b/media-libs/x265/Manifest @@ -1,13 +1,19 @@ 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 test-ns.patch 13886 BLAKE2B acc90ce7878861ee0faf6e5a4081a63c9ace5153895a4f69d1ccdbcfeabb9fd782ab86841d98a05f0bc36566749368b111f00dad4b7fcab4b8fdd347c7fc1579 SHA512 fc9182128855babca12629188221e8b3bb5c7eb8148e83532d16a3e1ef0fcd211d1b55728ce10a510481cd7eb4f47918d644eb6d6b795969545b62a57307af59 AUX tests.patch 650 BLAKE2B 21759b11966e12df1a72a1ed00935ff781ad8b912e734de65cf0872cf92400aef71d4aebbe067dd1059a1d445cd9819cef4dc4b1c7df63ca7b8e97b8e578045e SHA512 a4a3b69fa86e6910ff4f963b9667c8deaea4ff88f3396e8e426e61d036b12cbf550bff7867657da1ba98417f1ccae88db1887b94ea6271604060e01fb8698d79 AUX x265-3.3-ppc64.patch 590 BLAKE2B bbc6f18b8f192424450d2860e33ea6dbba14b46876f05cf9c499412d491127c877c342b1900bb9d06d66126aca2f383da1a4986ce69670ebc392fec0fe9b59a9 SHA512 bb4ace2c4bc899a0ccdd17fb78e63980354f41ff0f201812d47c5df16b23fea6fcdbde086e737d0efd5d8cb8fa571a131c03433bec31999c71ff51bccd754950 +AUX x265-3.5-r5-cpp-std.patch 779 BLAKE2B 815de056af19c721d612fccf8bea233764bdd161d175c0d7f9b0591a91b6607a5e7556e70fe181d7ab02b4e5067b818fe7a8162c2c2ce5fd01779c8f1c641111 SHA512 2ce2c6fa598db565bd5a6acddd0ec9095b68fde28584a23c5a398a16b44a5514b6d4ec2f9b8e4ab9a871320c694f4723958eca55588d90b3fdb5a94244c08729 +AUX x265-3.5-r5-gcc15.patch 1187 BLAKE2B ff951ae974c7df6aaccbb8b0f937564b41b88bbe029a2b6d0e188911a3ce80276fa960d559c86c4d1762a93c448b1862b02e00b5247e7cec83531b5921b9700a SHA512 ed87e6919f0bcd6a719411716c4dbd0016e4d7c23beca4cf7d93d0beca4c7af275c8734e103098f7f358161917fed0a6a0d1301e1eb8de8744a8b4e6b288519f +AUX x265-3.5-r5-test-ns_2.patch 521 BLAKE2B 987a20dd57642bf5003d138913e39a4efd0a1c3708ba186619777d8854964dcb8415a6fcefcaefe5f2a12741664cf852aea5181cc47179ae6bdb6268c477c1f0 SHA512 f03ed7f48df097ea4f8d92809a4eb68234cb62dc47b66e10616df6c8f6dea06a403bcedb47b54994d81563faa3b0b6a82bea6043dddbbdb75dd584924e90e900 +AUX x265-3.6-test-ns_2.patch 1060 BLAKE2B 19d59ef567fc67bdcab790a29567ddc16c861a5952af5cb32cfe40634920c6c3bbafb0730b5d012922e7dd15b57ad3aeff689a178ce35e46ea1619a4ceddff8d SHA512 aeea732684209e55155d012cf134badc455c598e4540384b765679e5dc91331ccfabd8b2f5b48c132390f103d774424fa547e146eb9e1f498581635b1da3b709 AUX x265-9999-arm.patch 2115 BLAKE2B 92f2225fd23030220531e6bfda7a3d4ce197090a7b1d996fe5995885fe332352e3628ca3fe307d2ae7af2d0342b183c5bbe4337201c51fb4092e273eae2f1308 SHA512 602725dc487397466c48d4d0aa09d8d63b3519fc72cd9538e732c2c82f6f3fa9c959f6f29ff3f810fec82dbdf609d9fd37fe05dd67496fc4c8bbda5f87c9f165 -AUX x265-9999-test-ns.patch 14971 BLAKE2B 8750a3a94eefd78dfe082c46634606a1abe4ae1b9cf89971e5532a1fc8d42e8b406ca71ab2dfd3e77bdc589e553e190c423a12b5c1007eae9fe12d86e7603ef7 SHA512 55baf712622acfb0d76eee3b283ba38905327eacb0ce52f202563e7e6c1c8593bcae84acc876c91f36ac22fcc06950ffa181515b58d199821c8d265f309594e7 +AUX x265-9999-test-ns.patch 15836 BLAKE2B 9dc3384f38654a49c0dc62273ed824b5a556494233d33cba0032e7949c38d095299d7e30fe47046a162ac07ec13cff3ea85322738396c2999f4d873813698f24 SHA512 ec4d47d6b2d7e4ffed3891476811955f4eec420563d02caec27138fb580f3d47173ab9be2be6ddee98eef07e9b878df8a9648e7ffbd4add397e5aaca6616c9a5 +DIST x265-3.6.tar.gz 1655889 BLAKE2B 2598421e2e21974998b0b20895dc7e12dbf6ebe1b6c23bb5a7710b575d3db773335cd1f0b3ef110b79cf4d6dd01e543e9807a0509963497edc25f617f80c29f3 SHA512 570429c3f0b560b2f946ac9baba97d66d7d6485e46eb695b17003b5913028f62d35822477633e911cd3ea60e6ce0ecc7d9d82de7d8257272f9ca7b43761438be DIST x265_3.5.tar.gz 1537044 BLAKE2B 4fe15b762eda08a4379f69df622bef603fed784a237381d5c95876412020c113d053af829fa1eb66468462a6edc0de32dc597b1a98a63e9aa0250a47f4e76d05 SHA512 230e683239c3e262096ba96246c6f67229a1625d163f86647a411733bb1cf349685858aee3017bce818bb6992448d0abaa9241615a5b620561ce47ecb164f997 -EBUILD x265-3.5-r2.ebuild 6342 BLAKE2B 3a5bf8ebedc877d8d69c3021f925fb77559ea682a423438d734953e9960518d9d96672955bf56d7d11409ba734c38edd43f60f25b1f5b666f68de11591fe4370 SHA512 55e41cc836b62aab1c64da0e2b1d5ea35a204bcee5408b47fc732237af394daf419e965fb963c4cba4814b00f2d40ea9ce707aa14f5695b18f5f8dadb43272c6 -EBUILD x265-3.5-r3.ebuild 6278 BLAKE2B eed60ccfe4d08c4b50fea28409ec6542b4641d312042cd9ea6d4d982483be4013202d7cbd5f2f8b4e70f307f69e597ccc4f7b27bf0285b4f9bfe5e93a2d1a0cd SHA512 45d787b42c2d8ca8f082b0b46137608ada716a011d1a83fe99a1f7a27fb39d3f1bb58e8b8f4d8bbd912b58191907ef8b04d3b0a7879ad1268568f962e38e4ee7 -EBUILD x265-3.5-r4.ebuild 6284 BLAKE2B 711ba48141c743309234a82643f786515a6f3455724175164a990cd51066925afb941255407f615e0090d9d8f8488a3c25ac7768c6d80459195d1b391c8fec17 SHA512 aa54eccb1c21a9c414d232731cbba199acaa39e6030a31f42cb4990fd4ac624b6e792f588bc73f68af880adf028f2eec612aab255bd93cf42d1ab42b17094746 -EBUILD x265-9999.ebuild 6267 BLAKE2B 8c72626a97d64b7f1470625d932f7294ca17d503a0a89a81e567f4f13a1cc04fd41275e4a5ddc9e6e4f4d3ed9b1e7edd56092d10bb57d4e219776a4b8c26fd9c SHA512 0eb5ec91ed93440ebd8cf79724591fc4a8f03405cf42d33b7f9d3d0dad2cc1a018e23c301ec659a2dacc7c97eff199569bb60cfcb90999a3a785f964cf3481a1 -MISC metadata.xml 626 BLAKE2B 59840316bac42695fd0c76baad143fcbdf810d80b48aa0260633b7dd70cd24a064ac0e3284772368bffd05415befd99fc4f224d2c2c7fc44e27ec56759f04b07 SHA512 97ba150042a2f4558c828af03bb489faa4385af6a2c72ed3f7489091e011a94e40330117a3f2edddea8fc73652396fb53e9190bdd00cb2b3d1c8b553ed2d0d7e +EBUILD x265-3.5-r3.ebuild 6322 BLAKE2B ca7ca9bb3bc5b1b2b9cac87e66c3b9ac6274046f3d9de4bf482b3eb41cc298cb343540aecdd452f76e568adcd81ee448c500ff33b04bebe0538b1ff57ab97381 SHA512 34e8d843a8de25ea41752dc66df2663fb352405d8ea6206bd92d9e8bf6c32ffc567a5e4e06d7e6df589d5da9f6579c8a3e96a93a3d3865961e6f5c3de9958234 +EBUILD x265-3.5-r4.ebuild 6328 BLAKE2B 018ae5f029ced97cc842ab0909a4586ec71c9bd218b08476161468e347694315f186752cc89aa50aae11d3de182b55c7f13b8c9594a3fe2d123812a0a0e7e994 SHA512 649eddcc4c087a23160c2ecbfc305c62010fc5b72a31f82c2f772dfa73b999db93bf791410df78ff843f15f1da9ad4aefa4a830b88989fa8681095291f7ee168 +EBUILD x265-3.5-r5.ebuild 5137 BLAKE2B b57ffbaf26fd9ff55c278d2d13f18120dfc760b9be4d943a35e96e898ebceb471fe63c88f18e9b410c77c849d1fde1cbc9f101d3b030eec41bff4fbdcce6a61e SHA512 bb52e246492bd6ce050716ca5ff73e7865f319f08367068dd932a937a4ed298d008dfd7a34796ce8fb085ce7e57e58c19fed72b09dcd50b02a0addfdac8d1e8d +EBUILD x265-3.6.ebuild 5164 BLAKE2B 440ae0712a1d9d477b9b1cf3e8441ee6d9cf9724ba8bfc2a0cfe26635fbb1fdb8187a1478239bbff32aed5efa1b96e3b279903c8c0bed9099aa5ebf25602420f SHA512 c92b945df6cc74ca3d02965064ab763ca2cfa6e88e292520e49e3c4153b6b176a2deda8336b4dfa6bb2b6705fea628b545a752f540af5493de36e4f3ab58cdd7 +EBUILD x265-9999.ebuild 5161 BLAKE2B 6a6c948ac735944fd928aa0da10cd592530b3c3326970dffe0e166e48f65de18e852660954962ae2037d755d895967fe268541eaa3622b84a0a91c7c1b85de18 SHA512 9967cce944d9e7746ef5882c20cfbaf51eca203d932e34a53042fe5481dbd55d93fa4cd09eba5277a0e308b977ba9238f60d07bda6b55d2d22c3cf5c55bdffc1 +MISC metadata.xml 541 BLAKE2B 4509c092fe30d689d4f18d077d429bbd0c05f704fa2027dd400d3686a35f1d39631480abce2357cb7cec8f468b2eeed2a08156f8830938171016c6e77d3f2a73 SHA512 d80b09241e28cffdab81e21f40d81f4da4814574f3e56109684f654887767a671c111bdc9f44566b0e7ab7c8cca949a5718d8afb20f0a43e73c2e6b878bd28a7 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-3.6-test-ns_2.patch b/media-libs/x265/files/x265-3.6-test-ns_2.patch new file mode 100644 index 000000000000..63308e5bb48d --- /dev/null +++ b/media-libs/x265/files/x265-3.6-test-ns_2.patch @@ -0,0 +1,30 @@ +--- source.orig/encoder/encoder.cpp ++++ source/encoder/encoder.cpp +@@ -1478,7 +1478,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); + +--- 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) 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-r2.ebuild b/media-libs/x265/x265-3.5-r2.ebuild deleted file mode 100644 index 3fa4d5cb933f..000000000000 --- a/media-libs/x265/x265-3.5-r2.ebuild +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake 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 ~ia64 ~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_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-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..ad78f487735a --- /dev/null +++ b/media-libs/x265/x265-3.5-r5.ebuild @@ -0,0 +1,194 @@ +# 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_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 -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 new file mode 100644 index 000000000000..064bd95be46a --- /dev/null +++ b/media-libs/x265/x265-3.6.ebuild @@ -0,0 +1,194 @@ +# 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" +) + +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_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 -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 8be9f4a93e84..9e4c71595c06 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 -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=( $(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() { |