summaryrefslogtreecommitdiff
path: root/media-libs
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/Manifest.gzbin69623 -> 69625 bytes
-rw-r--r--media-libs/libheif/Manifest2
-rw-r--r--media-libs/libheif/libheif-1.18.2.ebuild98
-rw-r--r--media-libs/x265/Manifest8
-rw-r--r--media-libs/x265/files/x265-3.6-cmake-cleanup.patch47
-rw-r--r--media-libs/x265/files/x265-3.6-code-cleanup.patch140
-rw-r--r--media-libs/x265/x265-3.5-r5.ebuild12
-rw-r--r--media-libs/x265/x265-3.6.ebuild12
-rw-r--r--media-libs/x265/x265-9999.ebuild12
9 files changed, 322 insertions, 9 deletions
diff --git a/media-libs/Manifest.gz b/media-libs/Manifest.gz
index 372488cdc49e..eab39e0379ea 100644
--- a/media-libs/Manifest.gz
+++ b/media-libs/Manifest.gz
Binary files differ
diff --git a/media-libs/libheif/Manifest b/media-libs/libheif/Manifest
index fb200ed73776..3a94b9564ca4 100644
--- a/media-libs/libheif/Manifest
+++ b/media-libs/libheif/Manifest
@@ -2,8 +2,10 @@ AUX libheif-1.18.1-prepend_DESTDIR_when_generating_heif-convert_symlink.patch 13
DIST libheif-1.15.2.tar.gz 1749773 BLAKE2B 788ecf59c936bfae9544bedd5fa50fd74f04adf29f804994bc208d2a5339b13984baf78a508babd80fa0d48381b2cc0bfb1e1140de97437b8c0336378a64fcb6 SHA512 79f22dad084bbe965dae7b8f92fc119dbdde7a04577ca9c7bc28b1a022a06f0ae64d3fbd11e82d6907f0fd678a31d98275e508a51a6bd0a9e8675c93790f1996
DIST libheif-1.17.6.tar.gz 1433302 BLAKE2B 937a1ddfd86c4d50a609e24d00c07e0d1924a5532e36293f83fd67a38f4c13186cb5c4837598000d6d3516ec1965fdc6709ef825c327fd5ce3ea2194008b6efd SHA512 47d93df4f584979cea26af74cd8543b13398356b5fd46b1b378f7738cee471e80b7e117f6ce307674a549182f5ce22a577c6e79a6e72fe166421efc4be04687a
DIST libheif-1.18.1.tar.gz 1524386 BLAKE2B 07c01c273460618d56b9259c2930da34632fffdcc2338480277e678ab173126bc9d6882a33dc459ed7cdacd7e636ff8d13c406c76c046afc47166609e9595942 SHA512 0b37b834882af8368fc550e75245f4cf487c71a041833ba5e7887155e289e9c2058b41724524091347f297cfdec45b537796a97f4c43531aecf9f0a099753f41
+DIST libheif-1.18.2.tar.gz 1525096 BLAKE2B 667a68f324f89b2274ea837ec8d40ada5450dce79f2b8d9e8ba365fe5f02d4222195109519380a6d38c4ebca929575e58c3a8e517aed27a2696d67db3e287556 SHA512 8fd47dbc8e31fdb6a972c852bc4e78440492ee3dd769e139f28ad489ccc23e6cf42a90cd23b16405fa30df3c7c43c78b2b65d5ca3ffb449bf06789b457ed3072
EBUILD libheif-1.15.2-r1.ebuild 2058 BLAKE2B 4769aaea2e7165a43dc8761d944ff77df1ca87ed6fe4bef4f291075db39c44b151f46198e1e74683072ad3a26aced9f259a71db8a5512cf74cec047c1750073b SHA512 108ed5a9a7ab77110dc53189ae90f245672f39e76784678cb007b560b8284e862ae4142cd6abf484bdfb0029c41bfdec9aa5c352fa9ba1439d39fb3cdd63af96
EBUILD libheif-1.17.6.ebuild 2260 BLAKE2B 801416c69d5893ccd22ba87003e14a01991c34fe34158489bb74bdabc3fb8e884466e6e9acd0d83efdd4f73f3a99b1e7050466972ee564e0b71de2544156234a SHA512 888ab7c3e4336aae325fe6c0d344bc213b6009522f31eef490d884a3e7d97d38b8d188abaee017dccedbd69821499027664263ce43d4aac4d0a063dd274f8522
EBUILD libheif-1.18.1.ebuild 2394 BLAKE2B f9c698929ecab311ac0839b36bbc4f52dddea68d47096207c2087c058d8f53e42993cb55acdf6f03bb48b8186e113c158b9182c882bb3cee86bd95b022f11809 SHA512 dc9690c1ab290b68cdc29cb2be5d5d48e4c1c287ca14f97693b3fdff2acfef14683867aef02ca50df5b3520f3e757fc1a69605f964bbe47eb0b6dc7ef0679bd5
+EBUILD libheif-1.18.2.ebuild 2249 BLAKE2B 02d8b9b176afd5a143d7cf63df8e0477f988f6b45d967292db77cffd6a3f5949627ef9dc6f2b14616202fe84af1a399ccf6cdff4a37f184b94c72369492665f5 SHA512 eeb4448259a555d941fcb23c321e757cd7d0176829a2f2442e7aec4d0d03eef8d74fa9367401ee24e6b9f0096255383cc4e70d3054220c020f24134fff95a95c
EBUILD libheif-9999.ebuild 2394 BLAKE2B f9c698929ecab311ac0839b36bbc4f52dddea68d47096207c2087c058d8f53e42993cb55acdf6f03bb48b8186e113c158b9182c882bb3cee86bd95b022f11809 SHA512 dc9690c1ab290b68cdc29cb2be5d5d48e4c1c287ca14f97693b3fdff2acfef14683867aef02ca50df5b3520f3e757fc1a69605f964bbe47eb0b6dc7ef0679bd5
MISC metadata.xml 809 BLAKE2B f26844fa79747ac286a0130cb8cb2b4f0e771ed7fa3f9fe29a3fbd71876902c868dc32305f928cedbb88dcadab3c07cb4f85c647369adc904c7c9c463dd05343 SHA512 754ef9004dc664cca658bfbd0392fce837557efe1b92aefe198dd529cb388048f49e37648c7338829d6ecd87ea953efd0f66895191aea7bd39730c2f7240f032
diff --git a/media-libs/libheif/libheif-1.18.2.ebuild b/media-libs/libheif/libheif-1.18.2.ebuild
new file mode 100644
index 000000000000..1aea405a52d6
--- /dev/null
+++ b/media-libs/libheif/libheif-1.18.2.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake xdg multilib-minimal
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/strukturag/libheif.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/strukturag/libheif/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+fi
+
+DESCRIPTION="ISO/IEC 23008-12:2017 HEIF file format decoder and encoder"
+HOMEPAGE="https://github.com/strukturag/libheif"
+
+LICENSE="GPL-3"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="+aom gdk-pixbuf go rav1e svt-av1 test +threads x265"
+REQUIRED_USE="test? ( go )"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ test? (
+ dev-cpp/catch
+ dev-lang/go
+ )
+"
+DEPEND="
+ media-libs/dav1d:=[${MULTILIB_USEDEP}]
+ media-libs/libde265[${MULTILIB_USEDEP}]
+ media-libs/libpng:0=[${MULTILIB_USEDEP}]
+ media-libs/tiff:=[${MULTILIB_USEDEP}]
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ media-libs/libjpeg-turbo:0=[${MULTILIB_USEDEP}]
+ aom? ( >=media-libs/libaom-2.0.0:=[${MULTILIB_USEDEP}] )
+ gdk-pixbuf? ( x11-libs/gdk-pixbuf[${MULTILIB_USEDEP}] )
+ go? ( dev-lang/go )
+ rav1e? ( media-video/rav1e:= )
+ svt-av1? ( media-libs/svt-av1:=[${MULTILIB_USEDEP}] )
+ x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libheif/heif_version.h
+)
+
+src_prepare() {
+ if use test ; then
+ # bug 865351
+ rm tests/catch.hpp || die
+ ln -s "${ESYSROOT}"/usr/include/catch2/catch.hpp tests/catch.hpp || die
+ fi
+
+ cmake_src_prepare
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ export GO111MODULE=auto
+ local mycmakeargs=(
+ -DENABLE_PLUGIN_LOADING=true
+ -DWITH_LIBDE265=true
+ -DWITH_AOM_DECODER=$(usex aom)
+ -DWITH_AOM_ENCODER=$(usex aom)
+ -DWITH_GDK_PIXBUF=$(usex gdk-pixbuf)
+ -DWITH_RAV1E="$(multilib_native_usex rav1e)"
+ -DWITH_SvtEnc="$(usex svt-av1)"
+ -DWITH_X265=$(usex x265)
+ -DWITH_KVAZAAR=true
+ -DWITH_JPEG_DECODER=true
+ -DWITH_JPEG_ENCODER=true
+ -DWITH_OpenJPEG_DECODER=true
+ -DWITH_OpenJPEG_ENCODER=true
+ )
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ default
+ cmake_src_compile
+}
+
+multilib_src_test() {
+ default
+}
+
+multilib_src_install() {
+ cmake_src_install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+}
diff --git a/media-libs/x265/Manifest b/media-libs/x265/Manifest
index 358ecdba5a3c..59362e8d5dc4 100644
--- a/media-libs/x265/Manifest
+++ b/media-libs/x265/Manifest
@@ -6,6 +6,8 @@ AUX x265-3.3-ppc64.patch 590 BLAKE2B bbc6f18b8f192424450d2860e33ea6dbba14b46876f
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-cmake-cleanup.patch 1551 BLAKE2B 86071cac1e63667812debbeaf3d8074d40359ba92282c48b72a83ccb286f03ddb7b5107f6d13c106102ea7ee067e4a0976c7ab2fa58e869711893efd55838d61 SHA512 43d4c8420e8722337b9787ad434f00747bb97d7fe71dfd4934e1a8b36525ee7cc96ba2dd1dde3b7621452a59b2db2dbcd887732c8bfd828449e48e955e9c7f9b
+AUX x265-3.6-code-cleanup.patch 5838 BLAKE2B e7c4507fccd66f8e964a321c41f5ca2f6a6f385898689f2432f42772f85000730f05caeb664f1f52fe8bde876414a7c9da2b4a641fc28001f2c65e1e28d281b5 SHA512 feeab88a3c41e01c5fa83a74936b0ea93b0787dd7a4ce3f3442a34c57b0faa0b1c70c4a2524ade06d2cc0d7c0bcdbfe0038f75283363998638b493f55cb4edae
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 15836 BLAKE2B 9dc3384f38654a49c0dc62273ed824b5a556494233d33cba0032e7949c38d095299d7e30fe47046a162ac07ec13cff3ea85322738396c2999f4d873813698f24 SHA512 ec4d47d6b2d7e4ffed3891476811955f4eec420563d02caec27138fb580f3d47173ab9be2be6ddee98eef07e9b878df8a9648e7ffbd4add397e5aaca6616c9a5
@@ -13,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 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
+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
MISC metadata.xml 541 BLAKE2B 4509c092fe30d689d4f18d077d429bbd0c05f704fa2027dd400d3686a35f1d39631480abce2357cb7cec8f468b2eeed2a08156f8830938171016c6e77d3f2a73 SHA512 d80b09241e28cffdab81e21f40d81f4da4814574f3e56109684f654887767a671c111bdc9f44566b0e7ab7c8cca949a5718d8afb20f0a43e73c2e6b878bd28a7
diff --git a/media-libs/x265/files/x265-3.6-cmake-cleanup.patch b/media-libs/x265/files/x265-3.6-cmake-cleanup.patch
new file mode 100644
index 000000000000..7cbe3722f1e0
--- /dev/null
+++ b/media-libs/x265/files/x265-3.6-cmake-cleanup.patch
@@ -0,0 +1,47 @@
+From d6b009be2aa62c679ea994125c02310d4b8d401b Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:23:49 +0200
+Subject: [PATCH 1/2] cmake: cleanup old policies
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,18 +6,9 @@ if(NOT CMAKE_BUILD_TYPE)
+ FORCE)
+ endif()
+ message(STATUS "cmake version ${CMAKE_VERSION}")
+-if(POLICY CMP0025)
+- cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang
+-endif()
+-if(POLICY CMP0042)
+- cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
+-endif()
+-if(POLICY CMP0054)
+- cmake_policy(SET CMP0054 OLD) # Only interpret if() arguments as variables or keywords when unquoted
+-endif()
+
++cmake_minimum_required (VERSION 3.28) # OBJECT libraries require 2.8.8
+ project (x265)
+-cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
+ include(CheckIncludeFiles)
+ include(CheckFunctionExists)
+ include(CheckSymbolExists)
+
+From 701cc9679e9453cc94afac7904657262109e56b5 Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:23:59 +0200
+Subject: [PATCH 2/2] cmake: fix nasm warning
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+--- a/cmake/FindNasm.cmake
++++ b/cmake/FindNasm.cmake
+@@ -20,6 +20,6 @@ if(NASM_EXECUTABLE)
+ endif()
+
+ # Provide standardized success/failure messages
+-find_package_handle_standard_args(nasm
++find_package_handle_standard_args(Nasm
+ REQUIRED_VARS NASM_EXECUTABLE
+ VERSION_VAR NASM_VERSION_STRING)
diff --git a/media-libs/x265/files/x265-3.6-code-cleanup.patch b/media-libs/x265/files/x265-3.6-code-cleanup.patch
new file mode 100644
index 000000000000..dbea7ef6c1ff
--- /dev/null
+++ b/media-libs/x265/files/x265-3.6-code-cleanup.patch
@@ -0,0 +1,140 @@
+From bca0b4b72977683794d441e57adc8c279ff4bfca Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:25:35 +0200
+Subject: [PATCH 1/4] use boolean compare instead of bitwise
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/common/cudata.cpp b/common/cudata.cpp
+index 19281de..d5b295f 100644
+--- a/common/cudata.cpp
++++ b/common/cudata.cpp
+@@ -73,7 +73,7 @@ inline bool isEqualRow(int addrA, int addrB)
+ /* Check whether 2 addresses point to the same row or column */
+ inline bool isEqualRowOrCol(int addrA, int addrB)
+ {
+- return isEqualCol(addrA, addrB) | isEqualRow(addrA, addrB);
++ return isEqualCol(addrA, addrB) || isEqualRow(addrA, addrB);
+ }
+
+ /* Check whether one address points to the first column */
+
+From da3eb3ea55be74e440b272e24d7d8e67cb7a76db Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:44:55 +0200
+Subject: [PATCH 2/4] fix variable shadowing
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/common/cudata.h b/common/cudata.h
+index 8397f05..7f132e6 100644
+--- a/common/cudata.h
++++ b/common/cudata.h
+@@ -48,7 +48,7 @@ enum PartSize
+ SIZE_2NxnD, // asymmetric motion partition, 2Nx(3N/2) + 2Nx( N/2)
+ SIZE_nLx2N, // asymmetric motion partition, ( N/2)x2N + (3N/2)x2N
+ SIZE_nRx2N, // asymmetric motion partition, (3N/2)x2N + ( N/2)x2N
+- NUM_SIZES
++ PART_NUM_SIZES
+ };
+
+ enum PredMode
+
+From 4ec09af244e2cfe3dfb739d74af7640ac114e775 Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:45:33 +0200
+Subject: [PATCH 3/4] register is a unused and reserved keyword in c++-17
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/common/md5.cpp b/common/md5.cpp
+index a9042f4..7e638e7 100644
+--- a/common/md5.cpp
++++ b/common/md5.cpp
+@@ -185,7 +185,10 @@ void MD5Final(MD5Context *ctx, uint8_t *digest)
+ */
+ void MD5Transform(uint32_t *buf, uint32_t *in)
+ {
+- register uint32_t a, b, c, d;
++#if __cplusplus < 201703L
++ register
++#endif
++ uint32_t a, b, c, d;
+
+ a = buf[0];
+ b = buf[1];
+
+From 09379bbfe797e54f91ef5702c802f75aad604067 Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 14:26:55 +0200
+Subject: [PATCH 4/4] use std::abs instead of abs to avoid truncating values
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/common/pixel.cpp b/common/pixel.cpp
+index 3cd074c..62410f3 100644
+--- a/common/pixel.cpp
++++ b/common/pixel.cpp
+@@ -124,10 +124,10 @@ int ads_x4(int encDC[4], uint32_t *sums, int delta, uint16_t *costMvX, int16_t *
+ int nmv = 0;
+ for (int16_t i = 0; i < width; i++, sums++)
+ {
+- int ads = abs(encDC[0] - long(sums[0]))
+- + abs(encDC[1] - long(sums[lx >> 1]))
+- + abs(encDC[2] - long(sums[delta]))
+- + abs(encDC[3] - long(sums[delta + (lx >> 1)]))
++ int ads = std::abs(encDC[0] - long(sums[0]))
++ + std::abs(encDC[1] - long(sums[lx >> 1]))
++ + std::abs(encDC[2] - long(sums[delta]))
++ + std::abs(encDC[3] - long(sums[delta + (lx >> 1)]))
+ + costMvX[i];
+ if (ads < thresh)
+ mvs[nmv++] = i;
+@@ -141,8 +141,8 @@ int ads_x2(int encDC[2], uint32_t *sums, int delta, uint16_t *costMvX, int16_t *
+ int nmv = 0;
+ for (int16_t i = 0; i < width; i++, sums++)
+ {
+- int ads = abs(encDC[0] - long(sums[0]))
+- + abs(encDC[1] - long(sums[delta]))
++ int ads = std::abs(encDC[0] - long(sums[0]))
++ + std::abs(encDC[1] - long(sums[delta]))
+ + costMvX[i];
+ if (ads < thresh)
+ mvs[nmv++] = i;
+@@ -156,7 +156,7 @@ int ads_x1(int encDC[1], uint32_t *sums, int, uint16_t *costMvX, int16_t *mvs, i
+ int nmv = 0;
+ for (int16_t i = 0; i < width; i++, sums++)
+ {
+- int ads = abs(encDC[0] - long(sums[0]))
++ int ads = std::abs(encDC[0] - long(sums[0]))
+ + costMvX[i];
+ if (ads < thresh)
+ mvs[nmv++] = i;
+diff --git a/encoder/analysis.cpp b/encoder/analysis.cpp
+index aabf386..127032d 100644
+--- a/encoder/analysis.cpp
++++ b/encoder/analysis.cpp
+@@ -2692,8 +2692,8 @@ void Analysis::classifyCU(const CUData& ctu, const CUGeom& cuGeom, const Mode& b
+ {
+ offset = (depth * X265_REFINE_INTER_LEVELS) + i;
+ /* Calculate distance values */
+- diffRefine[i] = abs((int64_t)(trainData.cuVariance - m_frame->m_classifyVariance[offset]));
+- diffRefineRd[i] = abs((int64_t)(cuCost - m_frame->m_classifyRd[offset]));
++ diffRefine[i] = std::abs((int64_t)(trainData.cuVariance - m_frame->m_classifyVariance[offset]));
++ diffRefineRd[i] = std::abs((int64_t)(cuCost - m_frame->m_classifyRd[offset]));
+
+ /* Calculate prior probability - ranges between 0 and 1 */
+ if (trainingCount)
+diff --git a/encoder/ratecontrol.cpp b/encoder/ratecontrol.cpp
+index 9f2b8d9..7732ccd 100644
+--- a/encoder/ratecontrol.cpp
++++ b/encoder/ratecontrol.cpp
+@@ -1891,7 +1891,7 @@ double RateControl::tuneQScaleForGrain(double rcOverflow)
+ int newQp = rcOverflow > 1.1 ? curQp + 2 : rcOverflow > 1 ? curQp + 1 : curQp - 1 ;
+ double projectedBitrate = int(m_fps + 0.5) * m_qpToEncodedBits[newQp];
+ if (curBitrate > 0 && projectedBitrate > 0)
+- q = abs(projectedBitrate - m_bitrate) < abs (curBitrate - m_bitrate) ? x265_qp2qScale(newQp) : m_lastQScaleFor[P_SLICE];
++ q = std::abs(projectedBitrate - m_bitrate) < std::abs (curBitrate - m_bitrate) ? x265_qp2qScale(newQp) : m_lastQScaleFor[P_SLICE];
+ else
+ q = rcOverflow > 1 ? qScaleAvg * qpstep : rcOverflow < 1 ? qScaleAvg / qpstep : m_lastQScaleFor[P_SLICE];
+ return q;
diff --git a/media-libs/x265/x265-3.5-r5.ebuild b/media-libs/x265/x265-3.5-r5.ebuild
index ad78f487735a..c9db10613904 100644
--- a/media-libs/x265/x265-3.5-r5.ebuild
+++ b/media-libs/x265/x265-3.5-r5.ebuild
@@ -42,6 +42,8 @@ PATCHES=(
"${FILESDIR}/${PN}-3.5-r5-cpp-std.patch"
"${FILESDIR}/${PN}-3.5-r5-gcc15.patch"
"${FILESDIR}/${PN}-3.5-r5-test-ns_2.patch"
+ "${FILESDIR}/${PN}-3.6-cmake-cleanup.patch"
+ "${FILESDIR}/${PN}-3.6-code-cleanup.patch"
)
pkg_setup() {
@@ -99,7 +101,6 @@ multilib_src_configure() {
filter-lto
local mycmakeargs=(
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_PIC=ON
-DENABLE_LIBNUMA="$(usex numa)"
-DENABLE_SVT_HEVC="no" # missing
@@ -107,6 +108,11 @@ multilib_src_configure() {
-DGIT_ARCHETYPE=1 #814116
-DLIB_INSTALL_DIR="$(get_libdir)"
)
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DENABLE_CLI="no"
+ )
+ fi
# Unfortunately, the asm for x86/x32/arm isn't PIC-safe.
# x86 # Bug #528202, bug #913412
@@ -114,7 +120,9 @@ multilib_src_configure() {
if [[ ${ABI} = x86 ]] || [[ ${ABI} = x32 ]] || [[ ${ABI} = arm ]] ; then
mycmakeargs+=(
-DENABLE_ASSEMBLY=OFF
- -DENABLE_TESTS="no" #728748
+ # ENABLE_TESTS requires ENABLE_ASSEMBLY=ON to be visible
+ # source/CMakeLists.txt:858
+ # -DENABLE_TESTS="no" #728748
)
else
mycmakeargs+=(
diff --git a/media-libs/x265/x265-3.6.ebuild b/media-libs/x265/x265-3.6.ebuild
index 064bd95be46a..ba013c73d378 100644
--- a/media-libs/x265/x265-3.6.ebuild
+++ b/media-libs/x265/x265-3.6.ebuild
@@ -42,6 +42,8 @@ PATCHES=(
"${FILESDIR}/${PN}-3.5-r5-cpp-std.patch"
"${FILESDIR}/${PN}-3.5-r5-gcc15.patch"
"${FILESDIR}/${PN}-3.6-test-ns_2.patch"
+ "${FILESDIR}/${PN}-3.6-cmake-cleanup.patch"
+ "${FILESDIR}/${PN}-3.6-code-cleanup.patch"
)
pkg_setup() {
@@ -99,7 +101,6 @@ multilib_src_configure() {
filter-lto
local mycmakeargs=(
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_PIC=ON
-DENABLE_LIBNUMA="$(usex numa)"
-DENABLE_SVT_HEVC="no" # missing
@@ -107,6 +108,11 @@ multilib_src_configure() {
-DGIT_ARCHETYPE=1 #814116
-DLIB_INSTALL_DIR="$(get_libdir)"
)
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DENABLE_CLI="no"
+ )
+ fi
# Unfortunately, the asm for x86/x32/arm isn't PIC-safe.
# x86 # Bug #528202, bug #913412
@@ -114,7 +120,9 @@ multilib_src_configure() {
if [[ ${ABI} = x86 ]] || [[ ${ABI} = x32 ]] || [[ ${ABI} = arm ]] ; then
mycmakeargs+=(
-DENABLE_ASSEMBLY=OFF
- -DENABLE_TESTS="no" #728748
+ # ENABLE_TESTS requires ENABLE_ASSEMBLY=ON to be visible
+ # source/CMakeLists.txt:858
+ # -DENABLE_TESTS="no" #728748
)
else
mycmakeargs+=(
diff --git a/media-libs/x265/x265-9999.ebuild b/media-libs/x265/x265-9999.ebuild
index 9e4c71595c06..bf2855a23f64 100644
--- a/media-libs/x265/x265-9999.ebuild
+++ b/media-libs/x265/x265-9999.ebuild
@@ -41,6 +41,8 @@ PATCHES=(
"${FILESDIR}/${PN}-3.5-r5-cpp-std.patch"
"${FILESDIR}/${PN}-3.5-r5-gcc15.patch"
"${FILESDIR}/${PN}-9999-test-ns.patch"
+ "${FILESDIR}/${PN}-3.6-cmake-cleanup.patch"
+ "${FILESDIR}/${PN}-3.6-code-cleanup.patch"
)
pkg_setup() {
@@ -98,7 +100,6 @@ multilib_src_configure() {
filter-lto
local mycmakeargs=(
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_PIC=ON
-DENABLE_LIBNUMA="$(usex numa)"
-DENABLE_MULTIVIEW="yes"
@@ -107,6 +108,11 @@ multilib_src_configure() {
-DGIT_ARCHETYPE=1 #814116
-DLIB_INSTALL_DIR="$(get_libdir)"
)
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DENABLE_CLI="no"
+ )
+ fi
# Unfortunately, the asm for x86/x32/arm isn't PIC-safe.
# x86 # Bug #528202, bug #913412
@@ -114,7 +120,9 @@ multilib_src_configure() {
if [[ ${ABI} = x86 ]] || [[ ${ABI} = x32 ]] || [[ ${ABI} = arm ]] ; then
mycmakeargs+=(
-DENABLE_ASSEMBLY=OFF
- -DENABLE_TESTS="no" #728748
+ # ENABLE_TESTS requires ENABLE_ASSEMBLY=ON to be visible
+ # source/CMakeLists.txt:858
+ # -DENABLE_TESTS="no" #728748
)
else
mycmakeargs+=(