diff options
Diffstat (limited to 'media-video')
127 files changed, 6324 insertions, 9166 deletions
diff --git a/media-video/Manifest.gz b/media-video/Manifest.gz Binary files differindex d186573a799e..c936afb5419f 100644 --- a/media-video/Manifest.gz +++ b/media-video/Manifest.gz diff --git a/media-video/dvdstyler/Manifest b/media-video/dvdstyler/Manifest index a8351c075848..bdc91be0677b 100644 --- a/media-video/dvdstyler/Manifest +++ b/media-video/dvdstyler/Manifest @@ -2,5 +2,6 @@ AUX ffmpeg5.patch 3209 BLAKE2B fdf3f68d7cc292c37ca7b8cbc023de80b696c3b01b9326d6c AUX wx30.patch 624 BLAKE2B fa464a7e39d721e52eec106794ecee23e802e7b57d2448d2d95c5cb932864615cf6e969d7a31ee3c1154265aeb1725c8fd65bd30271085bb782adf351df8d7f8 SHA512 aa2404bcca318e5fc5adea98bf1efa4a91128a3067e0ed1a4313f61ac55c17b4b9524655221c7d3107f1264a7ed5dcde33bc8c9bc63ff5a5bb3006a2e9cabfa0 AUX wx32.patch 424 BLAKE2B 68eb622d8417f4b01391dd1aad10cc0e2575434149bbde54803e97010a2b367014225b17761f34a5b5a52356eb4aef4bc4bb0037cc6efe988918476bff8e5b11 SHA512 7d97ac865b7efb883d054f01a0702e4867a9da132cc1ab7fc2c1cc74d8ee252ce07e9b4a2f1e197ca6dd50d5923cf84c20e6d5908799d7bc214cf9e496221e51 DIST DVDStyler-3.2.1.tar.bz2 9040634 BLAKE2B f6c3ec5d6595b650ead167ae6532a0849cc6545e1531f10483a7dd2f9962ea6cd4494b7eb8224bbc6e70588b1054fc13a13a5e2f5d977b5b80692c7cc2553d53 SHA512 09124a6c8db2b8d8072bfe2f7de98474d736a36a66d5124eab1b925da9ca830901f554ca80d9a4403365616001d869237002a2cb467cf3cc11b37aea12ff9d90 -EBUILD dvdstyler-3.2.1-r1.ebuild 1744 BLAKE2B be3cc796d5c57cf09a6d7e39daebcfbb6b3ca8058dd0b6c7bf825a2776ebfb740a7eca54e85dafa7c0f1b218b851b9e9a7b286dcf17924c56a0c45f50c92a6ec SHA512 37657998a7abbb8c7b0f94decb3473a3e0d5ee889d9331e2a278d727a45322fcce48d83c352639b12a19aba393efc6639ac5cf751c87cf9b11cb2071276b0c29 +EBUILD dvdstyler-3.2.1-r2.ebuild 1752 BLAKE2B cd8aaf15cdae8a34c7ebb74d3ae138d4fc7aeeb75d97fa558515322d24f926f0ec4ca007898fddaa1dc49ac36f21fe9a2cc7fc4485f138d557d88f5bc290d295 SHA512 03b2c1fe1b6123a7c5f01443d7c4b2cb1188f53d590d552e2aac65774031f11d9954340575109e8af6f8ae1fb797e71164aba8e3e47f1539bca6c59f39e39646 +EBUILD dvdstyler-3.2.1-r3.ebuild 2046 BLAKE2B 836aafc96700e495bc42c3071e029971b63d71639acc4e7c533b96176455782a17f4085ebe732de103c010c587edf542be8ba418769dfa6c1610caa4f0793cde SHA512 3298bc795dd2189000cddc05394ad388eae453b6b8ba02ecebd62d1a3013fbacd4e313e2e451b96f3de72eea70f8eff0f40e243d5f577844bd03bd203e990de2 MISC metadata.xml 303 BLAKE2B 968311b2bad01107bc5da7eb9357989f0d9030ee07696d1ba676a4d5cc59773b8b474bae5167f0cdf1b39e5e182f41aec3b64dd7ac0df04302024ae75481c551 SHA512 8cb99add5aa709b0f9b14bc8c5fab09c958fa0b04f20bf4657e7a125761bec3e59fa6893a4b4633b8dc1d84c598ba518f757adef2ab1a5866a45f8c7cd59cf61 diff --git a/media-video/dvdstyler/dvdstyler-3.2.1-r1.ebuild b/media-video/dvdstyler/dvdstyler-3.2.1-r2.ebuild index 9da92a439bf5..825c9de9e393 100644 --- a/media-video/dvdstyler/dvdstyler-3.2.1-r1.ebuild +++ b/media-video/dvdstyler/dvdstyler-3.2.1-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -22,11 +22,11 @@ DEPEND=" app-cdr/cdrtools >=app-cdr/dvd+rw-tools-7.1 media-libs/libexif:= + media-libs/libjpeg-turbo:= >=media-libs/wxsvg-1.5.23:= >=media-video/dvdauthor-0.7.1 - >=media-video/ffmpeg-2.6:0=[encode] + media-video/ffmpeg:=[encode(+)] >=media-video/xine-ui-0.99.7 - virtual/jpeg:0 x11-libs/wxGTK:${WX_GTK_VER}=[gstreamer,X] sys-apps/dbus udev? ( >=virtual/libudev-215:= ) diff --git a/media-video/dvdstyler/dvdstyler-3.2.1-r3.ebuild b/media-video/dvdstyler/dvdstyler-3.2.1-r3.ebuild new file mode 100644 index 000000000000..2c5dc2e582e1 --- /dev/null +++ b/media-video/dvdstyler/dvdstyler-3.2.1-r3.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P=${P/dvds/DVDS} +WX_GTK_VER=3.2-gtk3 + +inherit ffmpeg-compat wxwidgets + +DESCRIPTION="A cross-platform free DVD authoring application" +HOMEPAGE="https://www.dvdstyler.org/" +SRC_URI="https://downloads.sourceforge.net/${PN}/${MY_P}.tar.bz2" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug +udev" + +DEPEND=" + app-cdr/cdrtools + >=app-cdr/dvd+rw-tools-7.1 + media-libs/libexif:= + media-libs/libjpeg-turbo:= + >=media-libs/wxsvg-1.5.23:= + >=media-video/dvdauthor-0.7.1 + media-video/ffmpeg-compat:6=[encode(+)] + >=media-video/xine-ui-0.99.7 + x11-libs/wxGTK:${WX_GTK_VER}=[gstreamer,X] + sys-apps/dbus + udev? ( >=virtual/libudev-215:= ) +" +RDEPEND="${DEPEND} + >=app-cdr/dvdisaster-0.72.4 + media-video/mjpegtools +" +BDEPEND=" + app-arch/zip + app-text/xmlto + sys-devel/gettext + app-alternatives/yacc + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/ffmpeg5.patch + "${FILESDIR}"/wx30.patch + "${FILESDIR}"/wx32.patch +) + +src_prepare() { + default + + # disable obsolete GNOME 2.x libraries wrt #508854 + sed -i -e '/PKG_CONFIG/s:libgnomeui-2.0:dIsAbLeAuToMaGiC&:' configure || die + # rmdir: failed to remove `tempfoobar': Directory not empty + sed -i -e '/rmdir "$$t"/d' docs/Makefile.in || die + # fix underlinking wrt #367863 + sed -i -e 's:@LIBS@:& -ljpeg:' wxVillaLib/Makefile.in || die + # silence desktop-file-validate QA check + sed -i \ + -e '/Icon/s:.png::' -e '/^Encoding/d' -e '/Categories/s:Application;::' \ + data/dvdstyler.desktop || die +} + +src_configure() { + # TODO: fix with >=ffmpeg-7 then drop compat (FFMPEG_PATH is "unused" but + # ./configure will abort if the `ffmpeg` command is not found) + ffmpeg_compat_setup 6 + ffmpeg_compat_add_flags + local -x ac_cv_path_FFMPEG_PATH=${SYSROOT}$(ffmpeg_compat_get_prefix 6)/bin/ffmpeg + + setup-wxwidgets unicode + econf \ + $(use_enable debug) \ + --with-wx-config="${WX_CONFIG}" +} + +src_install() { + default + rm "${ED}"/usr/share/doc/${PF}/{COPYING*,INSTALL*} || die +} diff --git a/media-video/ffdiaporama/Manifest b/media-video/ffdiaporama/Manifest index a13b55a0435d..cec79741d3ab 100644 --- a/media-video/ffdiaporama/Manifest +++ b/media-video/ffdiaporama/Manifest @@ -1,3 +1,3 @@ DIST ffdiaporama-2.2_pre20240203.tar.gz 63277387 BLAKE2B 466f8c38b4e308b024f1a8961a0efb0ec5f6c5fe651a8165bd74d8e87823bf3134c5234012f1bd7637d339df92d495f1fc4acaf63670b30ec220e1667963caa0 SHA512 e5e46997df7c90016380f15e4b8b5bab4c8df97e536d4f90216e09ab3c09114dba1b034ea8ce23a6b3c04808ba35e92fd850ab1c1bd8fa1db3e7d8ae7cb6d212 -EBUILD ffdiaporama-2.2_pre20240203.ebuild 1235 BLAKE2B 7374977c769a3996d8d53c96705e04d504a7d0549ab147d686181709040d70fd6dc3ace9298aaba033d46fa774772cdf17e0b25f300f330d92674d64ecdb82c9 SHA512 3de38e58beb9ac31852b366b7ea3f110a012ab3d45771cfe20bd6c6fab6cb4c3e5ea72b11299eb7dbaaa1c78107775212ac2015a9b16d18c3cd52936fba04a59 +EBUILD ffdiaporama-2.2_pre20240203-r1.ebuild 1238 BLAKE2B c6ab621a35317517fbc2b3797ca73381108a3b8baacfd90e2b0e0b3ee0224639d27f2c38d6d375eb208f70d27c030d26cdbdd2de6c390005e19d87e50696b665 SHA512 1db08293c38ddc9a0bbfb17af5a8a12148e03f0d81541b2e6620dd3d7eecbb751ace87057363cf4ecacb5aa5c2e8480d22d53de5cff710eafcf32563fcdec6e7 MISC metadata.xml 2289 BLAKE2B 508259cbede84e5680f8cf7f481143ab52c3915adef22a0f39198e20174b64327ae7570ce583c585a65aaf39f4478b10e3bf248155c0b49fd00a9e7f70051a34 SHA512 9df8bd5dfab9954b93b61d6460a6d94b5b42a9973d1e27a10b2210d7fe955a70d3f327ce558091055924c3dd9dcf04c84a7bcd475bd5bf7e7808ec4291af48d7 diff --git a/media-video/ffdiaporama/ffdiaporama-2.2_pre20240203.ebuild b/media-video/ffdiaporama/ffdiaporama-2.2_pre20240203-r1.ebuild index 6e7189a3b361..6f789a7d3c07 100644 --- a/media-video/ffdiaporama/ffdiaporama-2.2_pre20240203.ebuild +++ b/media-video/ffdiaporama/ffdiaporama-2.2_pre20240203-r1.ebuild @@ -27,7 +27,7 @@ RDEPEND=" dev-qt/qtwidgets:5 dev-qt/qtxml:5 media-gfx/exiv2:= - >=media-video/ffmpeg-6:=[encode] + >=media-video/ffmpeg-6:=[encode(+)] openclipart? ( media-gfx/openclipart[svg,-gzip] )" DEPEND="${RDEPEND}" diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest index e491be3ed6af..d95c95c0da11 100644 --- a/media-video/ffmpeg-chromium/Manifest +++ b/media-video/ffmpeg-chromium/Manifest @@ -1,27 +1,13 @@ AUX chromium.patch 1536 BLAKE2B 8caf1ff11f8da710138cbb857bd42e8679f98f3c30a3eaddb51611b7c39fb48c23890257997d3ddfee47244e6ffc0abb241e3118e0e8bcbf63442885445bcee3 SHA512 711b338178fe042aff92375d6593197337529986ea55ac6288df4c725145dd06c41fcfc11df4843e03eeaa4bad90ed558acf8f6945b9b96c9751fff92a41811a AUX ffmpeg-chromium-120.patch 1485 BLAKE2B 49ece028bf7da100adc7af93e82b6235fb39f12199ce037b730b97012ca787047b45be821cec609cdfa7e00bb1f8c88a9ecae0b7b88fd8db6f53476b94833f9f SHA512 0f3276f75132bd8adbde4305ffa604cfa3d504ed66f883af109c75711d0f9af6dee2d55d7298ec36864a421250a0c4998d3306f0e47750c016c4274545195b49 -DIST ffmpeg-chromium-125.tar.xz 10372892 BLAKE2B 53b805354b55f1dfbe2341b767aaccca7efea4cced02db9090be88e89a4d2d688904ffc996c206d92a99d4eb93733b7f8cb47fd80dc43019c3bb6690903a1140 SHA512 c1b68b16a3dbd6f96e52c313b9ddf1c193ef302e5cbe7e127c511e54a4453c32c84b3df954e397d7ba834ef17fe1cba6efabfde855d3bb9e497bcde1b66c3d8d -DIST ffmpeg-chromium-126.tar.xz 10402160 BLAKE2B 96a92ff2a5ece8668693f5ef7ed5da3e61a523b98a91d00316494df91edfc42c1622663719a3c192de2a4ebf7a6258f08c53393201ee3fc3261f162e1b529dcd SHA512 8fc10b1d5fe159a1dd718229bf8ec50ed0bea1fedd917859b3a0703f15e94809087e67ccf2031eb14ae8b06ad32d958ed71ff54621fd667f5507abd9738a6f0c -DIST ffmpeg-chromium-127.tar.xz 10418192 BLAKE2B 2a623ee8e2c0940e4067e6ebecaecdc64c45b16022327a84d77323348c210b091c58eb52b4afea1f2918cd29a27c3457a3294f561a5e6ee2db28c63f432b23bd SHA512 0cddb21761ad3b54f5393d3963ca94518cb4ab8183f2bbe975f8419bd94d8b20131750a22d75fd56b304a2b83be364993a839f727342b7eed6a2d1868f79af4c -DIST ffmpeg-chromium-128.tar.xz 10420280 BLAKE2B 0b5b3ca891445042c9c1a27713b57a0d99f75fd2d57116b89afa1020dde61a1b2d3d14e0c6d639a17fd0b45359e803580100c600e6ac99eb383630512ab8402b SHA512 a420da69c49c11bf49229066f7f08d837d8bfacfa47c659b8c3e5bb28426b65749a16ce221bf2996541902f2d55750c43e75596102a6449cdf4a845cbad777dc -DIST ffmpeg-chromium-129.tar.xz 10424032 BLAKE2B dbe0b8c2d799958660b6a3ca0f1a8e68a8f5b81ef813f2837b1c66bc03a9200cc8273b6c077fec5402157701cd341ce75055d39aac7b78e5af39537285a0bb8a SHA512 c6ac36f41cc7eed353b92809a481dd783ca52eabc15a10d6a41cb241e2ad8a25cb2467b62c671f303f90b6b3bb1497a196b4488457832fb5b51a796de20ca49c -DIST ffmpeg-chromium-130.tar.xz 10420352 BLAKE2B 1b7711a3ee349d1e0d8ad8f761c8a38f78a5088dcf985d5da6423938fd93512b177d749949d4a6a3894f6b1faa4e4a0a0584067448d2ac5c886c00bbc25db89c SHA512 ee1a13634695ef5fb3e1a812420662e17449cab5e3c4e29611f9503b771ccb60c4821136160c51faeb4e18919efc3138ca8e034a27f44739a60cc3452d31572a -DIST ffmpeg-chromium-131.tar.xz 10550352 BLAKE2B 985a4d0caede506050d2277af956723ae74236e2373d766862cef669031e91e44bcb51de219a76a1663f5cac5d85c74bd85215e96dffb14e6090d05ba6031f6c SHA512 1ccba5547ead2a64bcf72b6cdc9b6f9f8a6f817840125248b4d41efdf8376f8a69e8f7d3e4527cf155bb0a058ea6fc9f4cdb12d40a4b74189682e0db7b501ba3 DIST ffmpeg-chromium-132.tar.xz 10588420 BLAKE2B 988fa447019d4fc3a26685bffd9345b4cf31ace3d39c31a070551f4d4f664cf2982b47c4b6265c2f3e2e7b0eca65effb68a9e25840b6a5ca61600a33d5901b8b SHA512 51856a226e29345c708356e1c6ae478239f1f634937e0ad4caa73e33c7bef1dbaeae97d8670ccd8f15e628fc3d399fdb3a4be1769c57d1283704743b6ce23b72 DIST ffmpeg-chromium-133.tar.xz 10592716 BLAKE2B 81aac47dfb694c605242e762e6ced29714bc9780907afda6f61f55afef5416d1d998dda6785e8e64b7968f8b9cfc03bdcc4711535ccad65e6a9c55c626d30226 SHA512 798704455973439d3a1990e6344fe7bf1ebef370e7316cb813e898b84b4a39809e5681d54554a765a8f474731fcdf69897fb00f0b5e7ecc6b2e1bd6eef46a77a DIST ffmpeg-chromium-134.tar.xz 10687424 BLAKE2B c33487885bb6c75f9bc93abf7b11b52266930dde95411d7e702a2039d94de79d0fa9a4d5f82af12fb7db9e3b3e2be24147a446c6498c60c17841aa5738ec403e SHA512 369aae6bd3b065db3e3b9cac004209e596e9bbeada1a03bb8e20df4b026810fc12489ce52fb95a4320eeec31c09460d18e5c598f36fab1205024f0540be1c639 DIST ffmpeg-chromium-135.tar.xz 10688848 BLAKE2B 6421b2d7ef39bc30941e99bcf94bb53e8f4dc896c15aebb6863050b9da31215fb2fa77e710eabe79fe342d5cd1836e353272bf75193b82ddae282f21c92b9ef2 SHA512 9597736a6707c4b5fdcdf185962a3de8a8155855593813d85adfbe64b492d44e0ce66621e94f2c8de00a3ec2aca7c9f1c6850cbe3fb7de35ed6b9bddf3076288 DIST ffmpeg-chromium-136.tar.xz 10727884 BLAKE2B 4c3fc2bfc961c6a7c6c93268b55c2af45028d416316f7703db6b9c94a920a326a9d20b48f79743051087782b1e542f516536d796d436154d5c28dc14b6d32671 SHA512 7a88958b49b6c7fea525ec69faf7049336f80b037576dd08345c0feac901a8d21a7272db7300aed858508331cb837cbc0e07e14a4bead79f112d93caa2b26dfc -EBUILD ffmpeg-chromium-125.ebuild 6479 BLAKE2B f71dbdd8922f14df1bca7a085645fdf48b843efe57c022bb31e2728e886c57f80b7993c675a71fd25641b995332d6a8b8015ff6eef988d2b005fb8a1ae980878 SHA512 21c167a3ba28277ac66a400fce531848a5a04a4be344ac94a7de421b8e8814f3c7f3b5612ba91c5ef1607bba371211655f7dfc87a44b8c239b473c8a7f7062a1 -EBUILD ffmpeg-chromium-126.ebuild 6479 BLAKE2B 31d1f47cf086e7617bcabc9b342c0155a0bc2782c569e65c391a4d15161165ec6869027b7498d5a20cad433f00d5bc4d64944498170b8b408be4147390ea3910 SHA512 8e7fe997f6ab7ebe4a3e24ab695b8d978296cb368ba2aeda0e5acd4e0dba5ed32bb95b4ae4210ebeef6b178004da153d4fd530ed509c050e777924f786752c37 -EBUILD ffmpeg-chromium-127.ebuild 6479 BLAKE2B 7357fe026fd686a96c6098e5259cbbd745b9b3e16afe088f3f0001a40994599439b2638d387b3dbc2aa66eba28a366ec3d032a4ed5d18948d501f8ab8cad086b SHA512 59380fcf97cc23930f8c3ff4023a8351881e8cf11dcfdad16d8c40ebb9891074ae6661455cd3395f0ca55552e8c0782458a9409bb175401d0af2e8a4222b82f4 -EBUILD ffmpeg-chromium-128.ebuild 6479 BLAKE2B 9b7d9a1d995d0a925979ba122a51821d98e5299329f5453bcf3f80587ebc0e760afc9d9b65a3a444bf3dc00bd3bf495cc1d0fcbd6daa25ad477e2f2ae39c6beb SHA512 8c6b99f807c0b7b6bc6fe9d5c2ff436ffaab41ac4e20c7567f17d8ac6a66ec1007353a1f383052dc707da692002a05cc3a2f447947fce6c5b224e08de3a4eef5 -EBUILD ffmpeg-chromium-129.ebuild 6479 BLAKE2B 291953066345a7e3018ba56e1cd7ebb12c5f14220c19030b78197381764fb5fe5ff48fad423786ef0dbd335ba917886ab2d71765ef7cae43eed324a0cd08eb88 SHA512 e59e8ec78bcdd939b100ba681488d3c212539ee79a441be0dd6d894689b8a37b2b0e7fbf6d18a9cbf3673daec0be9055dc455c1b0d38fb5afb34594319e63206 -EBUILD ffmpeg-chromium-130.ebuild 6479 BLAKE2B 1f58dc1d9b2dcafc3376f6d5048257e35d6bd8b0a0e1eb282de9ea0f710a4500cef8f17653dd41b2e099d02ec5674e01b08bb06ab96e7ef941dcb1254880d80f SHA512 5a7388287e60aed2a0542343805ca1a49a887d97bb9d6e4b2a4d1730a1898c4b953106479a12444ac856099ac7376e22df5484366a0246e86910284c6d3b55a6 -EBUILD ffmpeg-chromium-131.ebuild 6479 BLAKE2B 7eb290e9d70180370f3cf2cd0ed93ecdfea60e08df4586730533709650dccd461b43f5f1f2fdc69aa751894d3aefd550ea47fb0aa03adf3c123c1896f167eff6 SHA512 d978f8a08f1f67db72cf6b9af488b71fa57752ef94b40adc42dbddf8cfbb57b2c7654cb09fcc524cf8b533dc6f8580eccdc75cbb236a46e1f1d2737e4d75f92c EBUILD ffmpeg-chromium-132.ebuild 6452 BLAKE2B a743e4c5d771088ee19cc996ebf5743bc7e828bfca4cbff9928840a57b3658ce3bfd9fca5352c391843989b649c4d5961f1eb64c394ca543ef8e72eef3455c97 SHA512 fdd9cff14fb47a28cf5391508da080298447f049b1282651357c9faa4e3b7824c101df0af48c4221b6219e5c5e567db18992448c9e9c3a19c5c23ad2c6304357 EBUILD ffmpeg-chromium-133.ebuild 6452 BLAKE2B a743e4c5d771088ee19cc996ebf5743bc7e828bfca4cbff9928840a57b3658ce3bfd9fca5352c391843989b649c4d5961f1eb64c394ca543ef8e72eef3455c97 SHA512 fdd9cff14fb47a28cf5391508da080298447f049b1282651357c9faa4e3b7824c101df0af48c4221b6219e5c5e567db18992448c9e9c3a19c5c23ad2c6304357 -EBUILD ffmpeg-chromium-134.ebuild 6454 BLAKE2B 8210e941f03241209e30f0b70f6e9f116ea25674d4585e30ab5bf71b8a39bb330b0711ef654686bcd5e3249a340bc7b33e18dbf487912600f96c7a39fbf2c41d SHA512 da629eb6853842da6ed0ef261f96617bb9bc9cf06b0b946a263afa1c35b20b4900968165cd0ac37523905619bf7e3602530a5e4021a8419d0e79f1ad801418ba -EBUILD ffmpeg-chromium-135.ebuild 6454 BLAKE2B 8210e941f03241209e30f0b70f6e9f116ea25674d4585e30ab5bf71b8a39bb330b0711ef654686bcd5e3249a340bc7b33e18dbf487912600f96c7a39fbf2c41d SHA512 da629eb6853842da6ed0ef261f96617bb9bc9cf06b0b946a263afa1c35b20b4900968165cd0ac37523905619bf7e3602530a5e4021a8419d0e79f1ad801418ba +EBUILD ffmpeg-chromium-134.ebuild 6452 BLAKE2B 9c53c1e9900dc0d600eb20bb0877b41ab724d8287435aebd1c09c9b4785cd5656c290436221e84240d8718b63afd8a9d8e75b83627f7af8b4f833ffc0d4ac859 SHA512 6a4ed7a5d557c4d6ec61bbf9e47c14c4a1d398c3db01cfe33a0582777f587b35c14eab5c91d853c8e649f7c610d8ca6122371b946f13d379d948b464a26cc25a +EBUILD ffmpeg-chromium-135.ebuild 6453 BLAKE2B b4f7ba67e9ca672c40637cf0dcf8ba919677cee308f2af31fdf51a07ff268f6fde70d9656b6e850025d9cca4f31961f98b9b7e19649ca58f59e3ef7fcb727253 SHA512 774239bca1ae41cd5af6ebc46a8dcd578913532ce15e0fe447acde0b229a8d9d8b468a92cdf19f30fedd791b33ccfb7b108b7396e736ebcb0b3bf937a6befd88 EBUILD ffmpeg-chromium-136.ebuild 6454 BLAKE2B 6a4097b4765f8a0689db815182015b33af542670694ef67cbf9eddc178e06a0521fdebf517b96a34801dc2bdcd558c625f33d534acc45abd5d4efbf8b03fa13d SHA512 5d5f8c0b6e7832f48a3c5d7deed6cd59628075a26b6bf73ce5373cc35a6a8ec40ee04cc3b0c9788b87fe59a1f353d47fd32d08d9d6ab87eaf517786ce6bd05de MISC metadata.xml 695 BLAKE2B 84fa4967572665812d4da8bb1a86a8b28a749892570cb1fca5c0515f860fbe8c472a91240f1d3b7b3109ccdbd32cf8da941c438cd9f332b763f2824e0e193ac8 SHA512 0069bcf32d2aa083c66e13579295e8ef96b9ac72b02f1436620000c71c4d1e335391838f9a9e56f7768bd13dbe13ce6f3f3674a303cf90cc658360825867c3f9 diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-125.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-125.ebuild deleted file mode 100644 index 7112d7b23cff..000000000000 --- a/media-video/ffmpeg-chromium/ffmpeg-chromium-125.ebuild +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic toolchain-funcs - -COMMIT=901248a373cbbe7af68fb92faf3be7d4f679150d -DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based browsers" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="https://deps.gentoo.zip/media-video/${P}.tar.xz" - -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) -" -SLOT="${PV}" - -KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64" - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - cpudetection:runtime-cpudetect debug - +gpl - vaapi vdpau vulkan - nvenc:ffnvcodec - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -IUSE=" - ${FFMPEG_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -RDEPEND=" - >=media-libs/opus-1.0.2-r2 - vaapi? ( >=media-libs/libva-1.2.1-r1:0= ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - vdpau? ( >=x11-libs/libvdpau-0.7 ) - vulkan? ( >=media-libs/vulkan-loader-1.3.277:= ) -" - -DEPEND="${RDEPEND} - vulkan? ( >=dev-util/vulkan-headers-1.3.277 ) -" -BDEPEND=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) -" - -REQUIRED_USE=" - vulkan? ( threads ) - ${CPU_REQUIRED_USE}" -RESTRICT=" - test -" - -PATCHES=( - "${FILESDIR}"/${PN}-120.patch - "${FILESDIR}"/chromium.patch -) - -src_prepare() { - export revision=git-N-g${COMMIT:0:10} - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die -} - -src_configure() { - local myconf=( ) - - # Bug #918997. Will probably be fixed upstream in the next release. - use vulkan && append-ldflags -Wl,-z,muldefs - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 ]] && tc-is-lto; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ -n ${v} ]] && myconf+=( "--enable-lto=${v}" ) || myconf+=( "--enable-lto" ) - fi - filter-lto - - # Mandatory configuration - myconf=( - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - --disable-all \ - --disable-autodetect \ - --disable-error-resilience \ - --disable-everything \ - --disable-faan \ - --disable-iconv \ - --disable-network \ - --enable-avcodec \ - --enable-avformat \ - --enable-avutil \ - --enable-libopus \ - --enable-decoder=aac,flac,h264,libopus,mp3,pcm_alaw,pcm_f32le,pcm_mulaw,pcm_s16be,pcm_s16le,pcm_s24be,pcm_s24le,pcm_s32le,pcm_u8,theora,vorbis,vp8 \ - --enable-demuxer=aac,flac,matroska,mov,mp3,ogg,wav \ - --enable-parser=aac,flac,h264,mpegaudio,opus,vorbis,vp3,vp8,vp9 \ - --enable-pic \ - --enable-static \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - - echo "${@}" - "${@}" || die -} - -src_compile() { - emake V=1 libffmpeg -} - -src_install() { - emake V=1 DESTDIR="${D}" install-libffmpeg -} diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-126.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-126.ebuild deleted file mode 100644 index 30123f9c2d1f..000000000000 --- a/media-video/ffmpeg-chromium/ffmpeg-chromium-126.ebuild +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic toolchain-funcs - -COMMIT=092f84b6141055bfab609b6b2666b724eee2e130 -DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based browsers" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="https://deps.gentoo.zip/media-video/${P}.tar.xz" - -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) -" -SLOT="${PV}" - -KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64" - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - cpudetection:runtime-cpudetect debug - +gpl - vaapi vdpau vulkan - nvenc:ffnvcodec - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -IUSE=" - ${FFMPEG_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -RDEPEND=" - >=media-libs/opus-1.0.2-r2 - vaapi? ( >=media-libs/libva-1.2.1-r1:0= ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - vdpau? ( >=x11-libs/libvdpau-0.7 ) - vulkan? ( >=media-libs/vulkan-loader-1.3.277:= ) -" - -DEPEND="${RDEPEND} - vulkan? ( >=dev-util/vulkan-headers-1.3.277 ) -" -BDEPEND=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) -" - -REQUIRED_USE=" - vulkan? ( threads ) - ${CPU_REQUIRED_USE}" -RESTRICT=" - test -" - -PATCHES=( - "${FILESDIR}"/${PN}-120.patch - "${FILESDIR}"/chromium.patch -) - -src_prepare() { - export revision=git-N-g${COMMIT:0:10} - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die -} - -src_configure() { - local myconf=( ) - - # Bug #918997. Will probably be fixed upstream in the next release. - use vulkan && append-ldflags -Wl,-z,muldefs - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 ]] && tc-is-lto; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ -n ${v} ]] && myconf+=( "--enable-lto=${v}" ) || myconf+=( "--enable-lto" ) - fi - filter-lto - - # Mandatory configuration - myconf=( - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - --disable-all \ - --disable-autodetect \ - --disable-error-resilience \ - --disable-everything \ - --disable-faan \ - --disable-iconv \ - --disable-network \ - --enable-avcodec \ - --enable-avformat \ - --enable-avutil \ - --enable-libopus \ - --enable-decoder=aac,flac,h264,libopus,mp3,pcm_alaw,pcm_f32le,pcm_mulaw,pcm_s16be,pcm_s16le,pcm_s24be,pcm_s24le,pcm_s32le,pcm_u8,theora,vorbis,vp8 \ - --enable-demuxer=aac,flac,matroska,mov,mp3,ogg,wav \ - --enable-parser=aac,flac,h264,mpegaudio,opus,vorbis,vp3,vp8,vp9 \ - --enable-pic \ - --enable-static \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - - echo "${@}" - "${@}" || die -} - -src_compile() { - emake V=1 libffmpeg -} - -src_install() { - emake V=1 DESTDIR="${D}" install-libffmpeg -} diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-127.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-127.ebuild deleted file mode 100644 index f67cb20d79f3..000000000000 --- a/media-video/ffmpeg-chromium/ffmpeg-chromium-127.ebuild +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic toolchain-funcs - -COMMIT=bc1ee906cede137c061bea5a5e8d0743374392a5 -DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based browsers" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="https://deps.gentoo.zip/media-video/${P}.tar.xz" - -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) -" -SLOT="${PV}" - -KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64" - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - cpudetection:runtime-cpudetect debug - +gpl - vaapi vdpau vulkan - nvenc:ffnvcodec - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -IUSE=" - ${FFMPEG_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -RDEPEND=" - >=media-libs/opus-1.0.2-r2 - vaapi? ( >=media-libs/libva-1.2.1-r1:0= ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - vdpau? ( >=x11-libs/libvdpau-0.7 ) - vulkan? ( >=media-libs/vulkan-loader-1.3.277:= ) -" - -DEPEND="${RDEPEND} - vulkan? ( >=dev-util/vulkan-headers-1.3.277 ) -" -BDEPEND=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) -" - -REQUIRED_USE=" - vulkan? ( threads ) - ${CPU_REQUIRED_USE}" -RESTRICT=" - test -" - -PATCHES=( - "${FILESDIR}"/${PN}-120.patch - "${FILESDIR}"/chromium.patch -) - -src_prepare() { - export revision=git-N-g${COMMIT:0:10} - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die -} - -src_configure() { - local myconf=( ) - - # Bug #918997. Will probably be fixed upstream in the next release. - use vulkan && append-ldflags -Wl,-z,muldefs - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 ]] && tc-is-lto; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ -n ${v} ]] && myconf+=( "--enable-lto=${v}" ) || myconf+=( "--enable-lto" ) - fi - filter-lto - - # Mandatory configuration - myconf=( - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - --disable-all \ - --disable-autodetect \ - --disable-error-resilience \ - --disable-everything \ - --disable-faan \ - --disable-iconv \ - --disable-network \ - --enable-avcodec \ - --enable-avformat \ - --enable-avutil \ - --enable-libopus \ - --enable-decoder=aac,flac,h264,libopus,mp3,pcm_alaw,pcm_f32le,pcm_mulaw,pcm_s16be,pcm_s16le,pcm_s24be,pcm_s24le,pcm_s32le,pcm_u8,theora,vorbis,vp8 \ - --enable-demuxer=aac,flac,matroska,mov,mp3,ogg,wav \ - --enable-parser=aac,flac,h264,mpegaudio,opus,vorbis,vp3,vp8,vp9 \ - --enable-pic \ - --enable-static \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - - echo "${@}" - "${@}" || die -} - -src_compile() { - emake V=1 libffmpeg -} - -src_install() { - emake V=1 DESTDIR="${D}" install-libffmpeg -} diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-128.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-128.ebuild deleted file mode 100644 index 0669dac8dc36..000000000000 --- a/media-video/ffmpeg-chromium/ffmpeg-chromium-128.ebuild +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic toolchain-funcs - -COMMIT=d941d9677bb4802f01750fd908ec284fb72c84df -DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based browsers" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="https://deps.gentoo.zip/media-video/${P}.tar.xz" - -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) -" -SLOT="${PV}" - -KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64" - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - cpudetection:runtime-cpudetect debug - +gpl - vaapi vdpau vulkan - nvenc:ffnvcodec - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -IUSE=" - ${FFMPEG_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -RDEPEND=" - >=media-libs/opus-1.0.2-r2 - vaapi? ( >=media-libs/libva-1.2.1-r1:0= ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - vdpau? ( >=x11-libs/libvdpau-0.7 ) - vulkan? ( >=media-libs/vulkan-loader-1.3.277:= ) -" - -DEPEND="${RDEPEND} - vulkan? ( >=dev-util/vulkan-headers-1.3.277 ) -" -BDEPEND=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) -" - -REQUIRED_USE=" - vulkan? ( threads ) - ${CPU_REQUIRED_USE}" -RESTRICT=" - test -" - -PATCHES=( - "${FILESDIR}"/${PN}-120.patch - "${FILESDIR}"/chromium.patch -) - -src_prepare() { - export revision=git-N-g${COMMIT:0:10} - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die -} - -src_configure() { - local myconf=( ) - - # Bug #918997. Will probably be fixed upstream in the next release. - use vulkan && append-ldflags -Wl,-z,muldefs - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 ]] && tc-is-lto; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ -n ${v} ]] && myconf+=( "--enable-lto=${v}" ) || myconf+=( "--enable-lto" ) - fi - filter-lto - - # Mandatory configuration - myconf=( - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - --disable-all \ - --disable-autodetect \ - --disable-error-resilience \ - --disable-everything \ - --disable-faan \ - --disable-iconv \ - --disable-network \ - --enable-avcodec \ - --enable-avformat \ - --enable-avutil \ - --enable-libopus \ - --enable-decoder=aac,flac,h264,libopus,mp3,pcm_alaw,pcm_f32le,pcm_mulaw,pcm_s16be,pcm_s16le,pcm_s24be,pcm_s24le,pcm_s32le,pcm_u8,theora,vorbis,vp8 \ - --enable-demuxer=aac,flac,matroska,mov,mp3,ogg,wav \ - --enable-parser=aac,flac,h264,mpegaudio,opus,vorbis,vp3,vp8,vp9 \ - --enable-pic \ - --enable-static \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - - echo "${@}" - "${@}" || die -} - -src_compile() { - emake V=1 libffmpeg -} - -src_install() { - emake V=1 DESTDIR="${D}" install-libffmpeg -} diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-129.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-129.ebuild deleted file mode 100644 index 5c3db3e86611..000000000000 --- a/media-video/ffmpeg-chromium/ffmpeg-chromium-129.ebuild +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic toolchain-funcs - -COMMIT=14d16cd143ad1993900c276e37592956702443a9 -DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based browsers" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="https://deps.gentoo.zip/media-video/${P}.tar.xz" - -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) -" -SLOT="${PV}" - -KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64" - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - cpudetection:runtime-cpudetect debug - +gpl - vaapi vdpau vulkan - nvenc:ffnvcodec - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -IUSE=" - ${FFMPEG_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -RDEPEND=" - >=media-libs/opus-1.0.2-r2 - vaapi? ( >=media-libs/libva-1.2.1-r1:0= ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - vdpau? ( >=x11-libs/libvdpau-0.7 ) - vulkan? ( >=media-libs/vulkan-loader-1.3.277:= ) -" - -DEPEND="${RDEPEND} - vulkan? ( >=dev-util/vulkan-headers-1.3.277 ) -" -BDEPEND=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) -" - -REQUIRED_USE=" - vulkan? ( threads ) - ${CPU_REQUIRED_USE}" -RESTRICT=" - test -" - -PATCHES=( - "${FILESDIR}"/${PN}-120.patch - "${FILESDIR}"/chromium.patch -) - -src_prepare() { - export revision=git-N-g${COMMIT:0:10} - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die -} - -src_configure() { - local myconf=( ) - - # Bug #918997. Will probably be fixed upstream in the next release. - use vulkan && append-ldflags -Wl,-z,muldefs - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 ]] && tc-is-lto; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ -n ${v} ]] && myconf+=( "--enable-lto=${v}" ) || myconf+=( "--enable-lto" ) - fi - filter-lto - - # Mandatory configuration - myconf=( - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - --disable-all \ - --disable-autodetect \ - --disable-error-resilience \ - --disable-everything \ - --disable-faan \ - --disable-iconv \ - --disable-network \ - --enable-avcodec \ - --enable-avformat \ - --enable-avutil \ - --enable-libopus \ - --enable-decoder=aac,flac,h264,libopus,mp3,pcm_alaw,pcm_f32le,pcm_mulaw,pcm_s16be,pcm_s16le,pcm_s24be,pcm_s24le,pcm_s32le,pcm_u8,theora,vorbis,vp8 \ - --enable-demuxer=aac,flac,matroska,mov,mp3,ogg,wav \ - --enable-parser=aac,flac,h264,mpegaudio,opus,vorbis,vp3,vp8,vp9 \ - --enable-pic \ - --enable-static \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - - echo "${@}" - "${@}" || die -} - -src_compile() { - emake V=1 libffmpeg -} - -src_install() { - emake V=1 DESTDIR="${D}" install-libffmpeg -} diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-130.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-130.ebuild deleted file mode 100644 index 3c89e9f50671..000000000000 --- a/media-video/ffmpeg-chromium/ffmpeg-chromium-130.ebuild +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic toolchain-funcs - -COMMIT=91903c28af60a732a051c343b496e1188eec9b05 -DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based browsers" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="https://deps.gentoo.zip/media-video/${P}.tar.xz" - -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) -" -SLOT="${PV}" - -KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64" - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - cpudetection:runtime-cpudetect debug - +gpl - vaapi vdpau vulkan - nvenc:ffnvcodec - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -IUSE=" - ${FFMPEG_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -RDEPEND=" - >=media-libs/opus-1.0.2-r2 - vaapi? ( >=media-libs/libva-1.2.1-r1:0= ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - vdpau? ( >=x11-libs/libvdpau-0.7 ) - vulkan? ( >=media-libs/vulkan-loader-1.3.277:= ) -" - -DEPEND="${RDEPEND} - vulkan? ( >=dev-util/vulkan-headers-1.3.277 ) -" -BDEPEND=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) -" - -REQUIRED_USE=" - vulkan? ( threads ) - ${CPU_REQUIRED_USE}" -RESTRICT=" - test -" - -PATCHES=( - "${FILESDIR}"/${PN}-120.patch - "${FILESDIR}"/chromium.patch -) - -src_prepare() { - export revision=git-N-g${COMMIT:0:10} - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die -} - -src_configure() { - local myconf=( ) - - # Bug #918997. Will probably be fixed upstream in the next release. - use vulkan && append-ldflags -Wl,-z,muldefs - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 ]] && tc-is-lto; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ -n ${v} ]] && myconf+=( "--enable-lto=${v}" ) || myconf+=( "--enable-lto" ) - fi - filter-lto - - # Mandatory configuration - myconf=( - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - --disable-all \ - --disable-autodetect \ - --disable-error-resilience \ - --disable-everything \ - --disable-faan \ - --disable-iconv \ - --disable-network \ - --enable-avcodec \ - --enable-avformat \ - --enable-avutil \ - --enable-libopus \ - --enable-decoder=aac,flac,h264,libopus,mp3,pcm_alaw,pcm_f32le,pcm_mulaw,pcm_s16be,pcm_s16le,pcm_s24be,pcm_s24le,pcm_s32le,pcm_u8,theora,vorbis,vp8 \ - --enable-demuxer=aac,flac,matroska,mov,mp3,ogg,wav \ - --enable-parser=aac,flac,h264,mpegaudio,opus,vorbis,vp3,vp8,vp9 \ - --enable-pic \ - --enable-static \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - - echo "${@}" - "${@}" || die -} - -src_compile() { - emake V=1 libffmpeg -} - -src_install() { - emake V=1 DESTDIR="${D}" install-libffmpeg -} diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-131.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-131.ebuild deleted file mode 100644 index 81b121a64852..000000000000 --- a/media-video/ffmpeg-chromium/ffmpeg-chromium-131.ebuild +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic toolchain-funcs - -COMMIT=686d6944501a6ee9c849581e3fe343273d4af3f6 -DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based browsers" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="https://deps.gentoo.zip/media-video/${P}.tar.xz" - -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) -" -SLOT="${PV}" - -KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64" - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - cpudetection:runtime-cpudetect debug - +gpl - vaapi vdpau vulkan - nvenc:ffnvcodec - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -IUSE=" - ${FFMPEG_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -RDEPEND=" - >=media-libs/opus-1.0.2-r2 - vaapi? ( >=media-libs/libva-1.2.1-r1:0= ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - vdpau? ( >=x11-libs/libvdpau-0.7 ) - vulkan? ( >=media-libs/vulkan-loader-1.3.277:= ) -" - -DEPEND="${RDEPEND} - vulkan? ( >=dev-util/vulkan-headers-1.3.277 ) -" -BDEPEND=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) -" - -REQUIRED_USE=" - vulkan? ( threads ) - ${CPU_REQUIRED_USE}" -RESTRICT=" - test -" - -PATCHES=( - "${FILESDIR}"/${PN}-120.patch - "${FILESDIR}"/chromium.patch -) - -src_prepare() { - export revision=git-N-g${COMMIT:0:10} - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die -} - -src_configure() { - local myconf=( ) - - # Bug #918997. Will probably be fixed upstream in the next release. - use vulkan && append-ldflags -Wl,-z,muldefs - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 ]] && tc-is-lto; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ -n ${v} ]] && myconf+=( "--enable-lto=${v}" ) || myconf+=( "--enable-lto" ) - fi - filter-lto - - # Mandatory configuration - myconf=( - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - --disable-all \ - --disable-autodetect \ - --disable-error-resilience \ - --disable-everything \ - --disable-faan \ - --disable-iconv \ - --disable-network \ - --enable-avcodec \ - --enable-avformat \ - --enable-avutil \ - --enable-libopus \ - --enable-decoder=aac,flac,h264,libopus,mp3,pcm_alaw,pcm_f32le,pcm_mulaw,pcm_s16be,pcm_s16le,pcm_s24be,pcm_s24le,pcm_s32le,pcm_u8,theora,vorbis,vp8 \ - --enable-demuxer=aac,flac,matroska,mov,mp3,ogg,wav \ - --enable-parser=aac,flac,h264,mpegaudio,opus,vorbis,vp3,vp8,vp9 \ - --enable-pic \ - --enable-static \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - - echo "${@}" - "${@}" || die -} - -src_compile() { - emake V=1 libffmpeg -} - -src_install() { - emake V=1 DESTDIR="${D}" install-libffmpeg -} diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-134.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-134.ebuild index 043dc19c028a..6de9a028b6b5 100644 --- a/media-video/ffmpeg-chromium/ffmpeg-chromium-134.ebuild +++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-134.ebuild @@ -16,7 +16,7 @@ LICENSE=" " SLOT="${PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64" +KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64" # Options to use as use_enable in the foo[:bar] form. # This will feed configure with $(use_enable foo bar) diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-135.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-135.ebuild index 043dc19c028a..526b3c358396 100644 --- a/media-video/ffmpeg-chromium/ffmpeg-chromium-135.ebuild +++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-135.ebuild @@ -16,7 +16,7 @@ LICENSE=" " SLOT="${PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64" +KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc64" # Options to use as use_enable in the foo[:bar] form. # This will feed configure with $(use_enable foo bar) diff --git a/media-video/ffmpeg-compat/Manifest b/media-video/ffmpeg-compat/Manifest new file mode 100644 index 000000000000..cb8f7c867c89 --- /dev/null +++ b/media-video/ffmpeg-compat/Manifest @@ -0,0 +1,11 @@ +DIST ffmpeg-4.4-patchset-1.tar.xz 9916 BLAKE2B 9b41de6b048601f2af41864c3262b3348330f792eea71df4cfab5e740626ee6c633ac5569e6e91d953143f6ad0fac15c840ef0643925e91261f8b4a32e2d386c SHA512 b11d9e182ddb0a48f50d63f5e0bd7fd99f4b8fa7dd17179a3bfbc9419dabb76401408a81ae2d5f118fbf67f28dcfdc3bfb5b7ac70f740259e3ebad8d1ba049bb +DIST ffmpeg-4.4.5.tar.xz 9575596 BLAKE2B 546df09f7731d22e532a18d9ba9be184283f62b7a2e9470e745e536802bc2263a00f11ed6ab0aee8fc60c5f728826311cbf3542084ba3a64b65a61d76295cd64 SHA512 70df4e63ef507a7ec76da34438142499139769728fd5130d9cf48d56c110ec82c3d6a7e6d1622da03c70167fa861d901d016bbe52c21d2b284b8a0d9f30811dc +DIST ffmpeg-4.4.5.tar.xz.asc 520 BLAKE2B 505987208ed58b548f910299adb1324e6eba655cc37e6f03cac32c8623e16a4a884e822c745fb72b1934129a8c0a2706bb8bfb785715e6a68e43f737cb8ed365 SHA512 bcfee8986681dfbefd3add741fcbbc5e223bb06c9800797e68fde968c114055ac3fc02ce8731ed269bf30c92d6c990c7f636f82d42379920012e8a0ace8d527e +DIST ffmpeg-6.1-patchset-1.tar.xz 11296 BLAKE2B 5227d0c7f52a4f217d5517da11c2327585375c9d860f31415e1079f4f1f9186637e07c7da0e168c732cc7abb953440f0ba952395db83074588eb31bee1d5bc9f SHA512 20fe94536a5c3873d0126ff535a3bff595dedc7787162f160ecde6cbd357b9eb3749c9d7b7543aa39896ceb4e656494d31811bf26682776cdfc693fe030cd77b +DIST ffmpeg-6.1.2.tar.xz 10466152 BLAKE2B ff1f2b2bb60ccc4c37b6ffda2a0e6a0be80c451dc99f6d4a99bd95a1bdc44c494d62377c53383ccfb5b818573a1971948d7db34119099dbc56d7258724831d3c SHA512 3a009184d971fc3168e1322d1d724aae787ed0e9c152d8d1813ea0b9099bda3b35c41fcabbd7b140560e7a8fa9fa1ffd7f0938432d5d498c43829fc6cc3d9e08 +DIST ffmpeg-6.1.2.tar.xz.asc 520 BLAKE2B f26a2d6f5423f93090f2a448172e49f3858aeb5a00f326207d374bbb70fa8942c7ee1a7c55338b2db664b647c983cd5ab4fd8d71efe5c37af4c90385ca17d0ab SHA512 a26dba1f4870b964080b45f8468f5ce3591eb6aa69be426bf4afbe5a60c3cbd0fe5056dc86ca7bb817c04ae30d39160cb7773772a9a2123ae7f095b18a6d7050 +DIST ffmpeg-rpi-6.1-r3.patch 800738 BLAKE2B b7e449ee5eec8b50a3b3bba233c5269f3b6845dbd18a619b844c841a97345ce24c7a5d7f4da05b08e3cb49668426b9044f3d3553d9c2ef3a50aec7199bfa3c09 SHA512 aeaf12afabf5f2192fb0b6ef47397d8477b109e49cee8c02a890d1656a27b1985c62c719ef72966d8c97b0709918233b65ea2e0ef988771507e4be137fcd9158 +DIST ffmpeg-rpi-6.1-r3.patch.asc 833 BLAKE2B 31fd5823c06d5884f7b0980de9072c35bbf4e1d6c0ed20b089439325d50956127238ca29469b003dba623b888a5aae3c4d8ad177862534e77b8e51f29cbed96c SHA512 3d8943b7151e20f73e9c14b121c501847bd7e01f2cf57ff135fc8c223653ec9d433bfe4012fa564f70c0471980b66d7ec3d9b5b1b14865187187719ba110cb5f +EBUILD ffmpeg-compat-4.4.5.ebuild 15002 BLAKE2B 903682168147ac3cf4f0b72d38f305169864e75ec794d8c9a2990486c91779ea44d623623c50591a09ff10c31ee9235f59074167849219cf46e18f4a1969e350 SHA512 bf159fb253a301335010fb74776610a3df160d3c94cb519f173370c7d010464f706c82490a956238a081911d4295ae5435b749b9ad375062a1135edc10e55448 +EBUILD ffmpeg-compat-6.1.2.ebuild 17131 BLAKE2B 4b655a95c8d9131cdc0e4158ba288ae73df98d8c008192588f8cae25a2893d95134271e509793973d382516275525567f0e67a5eb016fa91da82c263a9d63202 SHA512 761207fa46faaa4ca3d869158aaa80b38a27837986dd13a69041fafe7aa9995123938b39a6ceb5c0b69f5cbb9a20a71f4a3a04b8f6fbfb17a9338ec59c6697b1 +MISC metadata.xml 7605 BLAKE2B af1dae9179eb75099f73330e42f95be290f59e99e4062f265e0cf339d9d2e9fd3ef5265600e8e497b2edd58d2501ded48fb92fe6e3c92f1c5015fe79a999c187 SHA512 6093fd6f4c22221cc3ee7bde293f0ea9bffbcaecac8c3735f515cc37a1c48b69b6ee38acd34c892c1c72e14bc4f823714e446224f1bc4806e7bad52190fd63e2 diff --git a/media-video/ffmpeg-compat/ffmpeg-compat-4.4.5.ebuild b/media-video/ffmpeg-compat/ffmpeg-compat-4.4.5.ebuild new file mode 100644 index 000000000000..a61c33e1d509 --- /dev/null +++ b/media-video/ffmpeg-compat/ffmpeg-compat-4.4.5.ebuild @@ -0,0 +1,501 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-minimal toolchain-funcs + +FFMPEG_SUBSLOT=56.58.58 # avutil.avcodec.avformat SONAME + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI=( + https://git.ffmpeg.org/ffmpeg.git + https://github.com/FFmpeg/FFmpeg.git + ) +else + inherit verify-sig + SRC_URI=" + https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz + verify-sig? ( https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz.asc ) + https://dev.gentoo.org/~ionen/distfiles/ffmpeg-$(ver_cut 1-2)-patchset-1.tar.xz + " + S=${WORKDIR}/ffmpeg-${PV} # avoid ${P} for ffmpeg-compat + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" +fi + +DESCRIPTION="Complete solution to record/convert/stream audio and video" +HOMEPAGE="https://ffmpeg.org/" + +[[ ${PN} == *-compat ]] && FFMPEG_UNSLOTTED= || FFMPEG_UNSLOTTED=1 + +FFMPEG_IUSE_MAP=( + # [+]flag[:[^][!]opt1,...][@<v3|nonfree>]], ^ = native-only, ! = override + # remember to keep LICENSE, REQUIRED_USE, and RESTRICT in sync + X:libxcb,libxcb-shape,libxcb-shm,libxcb-xfixes,xlib + alsa + amrenc:libvo-amrwbenc@v3 + amr:libopencore-amrnb,libopencore-amrwb@v3 + appkit + bluray:libbluray + bs2b:libbs2b + bzip2:bzlib + cdio:libcdio + chromaprint + codec2:libcodec2 + cuda:cuda-llvm + +dav1d:libdav1d + ${FFMPEG_UNSLOTTED:+doc:^htmlpages} + +drm:libdrm + fdk:libfdk-aac@nonfree + flite:libflite + +fontconfig:libfontconfig + frei0r + fribidi:libfribidi + gcrypt + gme:libgme + gmp:@v3 + +gnutls # unused if USE=openssl, default for bug #905113,#917627 + +gpl + gsm:libgsm + iec61883:libiec61883 + ieee1394:libdc1394 + jack:libjack + jpeg2k:libopenjpeg + kvazaar:libkvazaar + ladspa + lame:libmp3lame + libaom + libaribb24:@v3 # reminder: req use on gpl unneeded if >=1.0.4 (not in tree) + +libass + libcaca + libilbc + librtmp:librtmp + libsoxr + libtesseract + lv2 + lzma + modplug:libmodplug + nvenc:cuvid,ffnvcodec,nvdec,nvenc + openal + opencl + opengl + openh264:libopenh264 + openmpt:libopenmpt + openssl:openssl,!gnutls@v3ifgpl # still LGPL2.1+ if USE=-gpl + opus:libopus + +postproc # exposed as a USE for clarity with the GPL requirement + pulseaudio:libpulse + rabbitmq:^librabbitmq # no multilib + rav1e:^librav1e # no multilib + rubberband:librubberband + samba:libsmbclient@v3 # GPL-3+ only + sdl:sdl2 + snappy:libsnappy + sndio + speex:libspeex + srt:libsrt + ssh:libssh + svg:librsvg + svt-av1:libsvtav1 + theora:libtheora + +truetype:libfreetype + twolame:libtwolame + v4l:libv4l2 + vaapi + vdpau + vidstab:libvidstab + vorbis:libvorbis + vpx:libvpx + vulkan + webp:libwebp + x264:libx264 + x265:libx265 + +xml:libxml2 + xvid:libxvid + zeromq:^libzmq # no multilib + zimg:libzimg + +zlib + zvbi:libzvbi +) + +# all-rights is used to express the GPL incompatibility (RESTRICT=bindist) +LICENSE=" + gpl? ( + GPL-2+ + amr? ( GPL-3+ ) amrenc? ( GPL-3+ ) libaribb24? ( GPL-3+ ) + gmp? ( GPL-3+ ) openssl? ( GPL-3+ ) + fdk? ( all-rights-reserved ) + ) + !gpl? ( + LGPL-2.1+ + amr? ( LGPL-3+ ) amrenc? ( LGPL-3+ ) libaribb24? ( LGPL-3+ ) + gmp? ( LGPL-3+ ) + ) + samba? ( GPL-3+ ) +" +[[ ${FFMPEG_UNSLOTTED} ]] && : 0 || : "$(ver_cut 1)" +SLOT="${_}/${FFMPEG_SUBSLOT}" +IUSE="${FFMPEG_IUSE_MAP[*]%:*}" +REQUIRED_USE=" + fribidi? ( truetype ) + gmp? ( !librtmp ) + libaribb24? ( gpl ) cdio? ( gpl ) frei0r? ( gpl ) postproc? ( gpl ) + rubberband? ( gpl ) samba? ( gpl ) vidstab? ( gpl ) x264? ( gpl ) + x265? ( gpl ) xvid? ( gpl ) +" +RESTRICT="gpl? ( fdk? ( bindist ) )" + +# dlopen: vulkan-loader +RDEPEND=" + virtual/libiconv[${MULTILIB_USEDEP}] + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXv[${MULTILIB_USEDEP}] + x11-libs/libxcb:=[${MULTILIB_USEDEP}] + ) + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) + amr? ( media-libs/opencore-amr[${MULTILIB_USEDEP}] ) + amrenc? ( media-libs/vo-amrwbenc[${MULTILIB_USEDEP}] ) + bluray? ( media-libs/libbluray:=[${MULTILIB_USEDEP}] ) + bs2b? ( media-libs/libbs2b[${MULTILIB_USEDEP}] ) + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) + cdio? ( dev-libs/libcdio-paranoia:=[${MULTILIB_USEDEP}] ) + chromaprint? ( media-libs/chromaprint:=[${MULTILIB_USEDEP}] ) + codec2? ( media-libs/codec2:=[${MULTILIB_USEDEP}] ) + dav1d? ( media-libs/dav1d:=[${MULTILIB_USEDEP}] ) + drm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) + fdk? ( media-libs/fdk-aac:=[${MULTILIB_USEDEP}] ) + flite? ( app-accessibility/flite[${MULTILIB_USEDEP}] ) + fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) + frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) + fribidi? ( dev-libs/fribidi[${MULTILIB_USEDEP}] ) + gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] ) + gme? ( media-libs/game-music-emu[${MULTILIB_USEDEP}] ) + gmp? ( dev-libs/gmp:=[${MULTILIB_USEDEP}] ) + gnutls? ( !openssl? ( + net-libs/gnutls:=[${MULTILIB_USEDEP}] + ) ) + gsm? ( media-sound/gsm[${MULTILIB_USEDEP}] ) + iec61883? ( + media-libs/libiec61883[${MULTILIB_USEDEP}] + sys-libs/libavc1394[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] + ) + ieee1394? ( + media-libs/libdc1394:2=[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] + ) + jack? ( virtual/jack[${MULTILIB_USEDEP}] ) + jpeg2k? ( media-libs/openjpeg:2=[${MULTILIB_USEDEP}] ) + kvazaar? ( media-libs/kvazaar:=[${MULTILIB_USEDEP}] ) + lame? ( media-sound/lame[${MULTILIB_USEDEP}] ) + libaom? ( media-libs/libaom:=[${MULTILIB_USEDEP}] ) + libaribb24? ( media-libs/aribb24[${MULTILIB_USEDEP}] ) + libass? ( media-libs/libass:=[${MULTILIB_USEDEP}] ) + libcaca? ( media-libs/libcaca[${MULTILIB_USEDEP}] ) + libilbc? ( media-libs/libilbc:=[${MULTILIB_USEDEP}] ) + librtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] ) + libsoxr? ( media-libs/soxr[${MULTILIB_USEDEP}] ) + libtesseract? ( app-text/tesseract:=[${MULTILIB_USEDEP}] ) + lv2? ( + media-libs/lilv[${MULTILIB_USEDEP}] + media-libs/lv2[${MULTILIB_USEDEP}] + ) + lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] ) + modplug? ( media-libs/libmodplug[${MULTILIB_USEDEP}] ) + openal? ( media-libs/openal[${MULTILIB_USEDEP}] ) + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) + opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) + openh264? ( media-libs/openh264:=[${MULTILIB_USEDEP}] ) + openmpt? ( media-libs/libopenmpt[${MULTILIB_USEDEP}] ) + openssl? ( >=dev-libs/openssl-3:=[${MULTILIB_USEDEP}] ) + opus? ( media-libs/opus[${MULTILIB_USEDEP}] ) + pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) + rabbitmq? ( net-libs/rabbitmq-c:= ) + rav1e? ( >=media-video/rav1e-0.4:=[capi] ) + rubberband? ( media-libs/rubberband:=[${MULTILIB_USEDEP}] ) + samba? ( net-fs/samba:=[client,${MULTILIB_USEDEP}] ) + sdl? ( media-libs/libsdl2[sound(+),video(+),${MULTILIB_USEDEP}] ) + snappy? ( app-arch/snappy:=[${MULTILIB_USEDEP}] ) + sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) + speex? ( media-libs/speex[${MULTILIB_USEDEP}] ) + srt? ( net-libs/srt:=[${MULTILIB_USEDEP}] ) + ssh? ( net-libs/libssh:=[sftp,${MULTILIB_USEDEP}] ) + svg? ( + dev-libs/glib:2[${MULTILIB_USEDEP}] + >=gnome-base/librsvg-2.52:2[${MULTILIB_USEDEP}] + x11-libs/cairo[${MULTILIB_USEDEP}] + ) + svt-av1? ( >=media-libs/svt-av1-0.8.4:=[${MULTILIB_USEDEP}] ) + theora? ( media-libs/libtheora[encode,${MULTILIB_USEDEP}] ) + truetype? ( media-libs/freetype:2[${MULTILIB_USEDEP}] ) + twolame? ( media-sound/twolame[${MULTILIB_USEDEP}] ) + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) + vaapi? ( media-libs/libva:=[X?,${MULTILIB_USEDEP}] ) + vdpau? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libvdpau[${MULTILIB_USEDEP}] + ) + vidstab? ( media-libs/vidstab[${MULTILIB_USEDEP}] ) + vorbis? ( media-libs/libvorbis[${MULTILIB_USEDEP}] ) + vpx? ( media-libs/libvpx:=[${MULTILIB_USEDEP}] ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) + webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] ) + x264? ( media-libs/x264:=[${MULTILIB_USEDEP}] ) + x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] ) + xml? ( dev-libs/libxml2[${MULTILIB_USEDEP}] ) + xvid? ( media-libs/xvid[${MULTILIB_USEDEP}] ) + zeromq? ( net-libs/zeromq:= ) + zimg? ( media-libs/zimg[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zvbi? ( media-libs/zvbi[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + X? ( x11-base/xorg-proto ) + kernel_linux? ( >=sys-kernel/linux-headers-6 ) + ladspa? ( media-libs/ladspa-sdk ) + nvenc? ( media-libs/nv-codec-headers ) + opencl? ( dev-util/opencl-headers ) + vulkan? ( dev-util/vulkan-headers ) +" +BDEPEND=" + app-alternatives/awk + virtual/pkgconfig + amd64? ( + || ( + dev-lang/nasm + dev-lang/yasm + ) + ) + cuda? ( llvm-core/clang:*[llvm_targets_NVPTX] ) + ${FFMPEG_UNSLOTTED:+" + dev-lang/perl + doc? ( sys-apps/texinfo ) + "} +" +[[ ${PV} != 9999 ]] && + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )" + +DOCS=( CREDITS Changelog README.md doc/APIchanges ) +[[ ${PV} != 9999 ]] && DOCS+=( RELEASE_NOTES ) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/libavutil/avconfig.h +) + +PATCHES=( + "${WORKDIR}"/patches +) + +pkg_pretend() { + # TODO: drop this after a few months + if has_version "${CATEGORY}/${PN}[mp3]" && use !lame; then #952971 + ewarn "${PN}'s 'mp3' USE was renamed to 'lame', please enable it" + ewarn "if wish to keep the ability to encode using media-sound/lame." + ewarn "This is *not* needed if only want mp3 playback." + fi +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] || return + + if use chromaprint && has_version 'media-libs/chromaprint[tools]'; then + ewarn "media-libs/chromaprint is installed with USE=tools which links to" + ewarn "ffmpeg, and USE=chromaprint is enabled on ffmpeg which links to" + ewarn "chromaprint (circular). This may cause issues when updating ffmpeg." + ewarn + ewarn "If get a build failure with 'ERROR: chromaprint not found' or so," + ewarn "first rebuild chromaprint with USE=-tools, then rebuild ffmpeg, and" + ewarn "then finally rebuild chromaprint with USE=tools again (bug #862996)." + fi + + [[ ${EXTRA_FFMPEG_CONF} ]] && # drop this eventually + die "EXTRA_FFMPEG_CONF is set in the environment, please use EXTRA_ECONF instead" +} + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/ffmpeg-${PV}.tar.xz{,.asc} \ + "${BROOT}"/usr/share/openpgp-keys/ffmpeg.asc + fi + default + fi +} + +src_prepare() { + default + + # respect user preferences + sed -i '/cflags -fdiagnostics-color/d' configure || die + + # handle *FLAGS here to avoid repeating for each ABI below (bug #923491) + filter-lto + use elibc_musl && append-cppflags -D__musl__ #940733 +} + +multilib_src_configure() { + local conf=( "${S}"/configure ) # not autotools-based + + local prefix=${EPREFIX}/usr + if [[ ! ${FFMPEG_UNSLOTTED} ]]; then + prefix+=/lib/ffmpeg${SLOT%/*} + # could get SONAME clashes, so prefer rpath over LDPATH + conf+=( + --enable-rpath + --disable-doc + ) + fi + + conf+=( + --prefix="${prefix}" + --libdir="${prefix}"/$(get_libdir) + --shlibdir="${prefix}"/$(get_libdir) + --mandir="${prefix}"/share/man + --docdir="${EPREFIX}"/usr/share/doc/${PF}/html + + --ar="$(tc-getAR)" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --nm="$(tc-getNM)" + --pkg-config="$(tc-getPKG_CONFIG)" + --ranlib="$(tc-getRANLIB)" + --disable-stripping + + # overrides users' -g/-O, let *FLAGS handle these + --disable-debug + --disable-optimizations + --optflags=' ' + + # not worth supporting on this version, use ffmpeg-6+ + --disable-lto + + # basic defaults that should not really need a USE + --enable-iconv + --enable-pic + --enable-shared + --disable-static + $(multilib_native_enable manpages) # needs pod2man + --disable-podpages + --disable-txtpages + + # disabled primarily due to being unpackaged + --disable-decklink + --disable-libdavs2 + --disable-libklvanc + --disable-libmysofa + --disable-libopenvino + --disable-libshine + --disable-libtls + --disable-libuavs3d + --disable-libxavs + --disable-libxavs2 + --disable-pocketsphinx + --disable-rkmpp + --disable-vapoursynth + + # disabled for other or additional reasons + --disable-amf # may or may not be broken, use ffmpeg-6+ (bug #910271) + --disable-cuda-nvcc # prefer cuda-llvm for less issues + --disable-libcelt # obsolete (bug #664158) + --disable-libglslang # use ffmpeg-6+ with USE=shaderc instead + --disable-liblensfun # https://trac.ffmpeg.org/ticket/9112 (abandoned?) + --disable-libmfx # use ffmpeg-6+ with USE=qsv instead + --disable-libnpp # use ffmpeg-6+, ebuild support was only added there + --disable-libopencv # leaving for later due to circular opencv[ffmpeg] + --disable-librist # librist itself needs attention first (bug #822012) + --disable-libtensorflow # causes headaches, and is gone + --disable-libvmaf # use ffmpeg-6+ instead, needs old vmaf library + --disable-mbedtls # messy with slots, tests underlinking issues + --disable-mmal # unsupported + --disable-omx # unsupported (bug #653386) + --disable-omx-rpi # ^ + + # to avoid obscure issues like bug #915384 and simplify the ebuild, + # not passing the following (use EXTRA_ECONF if really must): + # --cpu: adds -march=<exact> after the user's more adapted + # =native, its logic also does not account for -mno-* + # --disable/enable-<cpufeature>: safer to detect at runtime + ) + + # broken on x32 (bug #427004), and not PIC safe on x86 (bug #916067) + [[ ${ABI} == @(x32|x86) ]] && conf+=( --disable-asm ) + + # disable due to asm-related failures on ppc (bug #951464, ppc64be) + # https://trac.ffmpeg.org/ticket/9604 (ppc64el) + # https://trac.ffmpeg.org/ticket/10955 (ppc64el) + # (review re-enabling if resolved, or if debian allows it again) + use ppc || use ppc64 && conf+=( --disable-asm ) + + if tc-is-cross-compiler; then + conf+=( + --enable-cross-compile + --arch="$(tc-arch-kernel)" + --cross-prefix="${CHOST}-" + --host-cc="$(tc-getBUILD_CC)" + ) + case ${CHOST} in + *mingw32*) conf+=( --target-os=mingw32 );; + *linux*) conf+=( --target-os=linux );; + esac + fi + + # import options from FFMPEG_IUSE_MAP + local flag license mod v + local -A optmap=() licensemap=() + for v in "${FFMPEG_IUSE_MAP[@]}"; do + [[ ${v} =~ \+?([^:]+):?([^@]*)@?(.*) ]] || die "${v}" + flag=${BASH_REMATCH[1]} + license=${BASH_REMATCH[3]} + v=${BASH_REMATCH[2]:-${flag}} + for v in ${v//,/ }; do + mod=${v::1} + v=${v#[\!\^]} + if [[ ${mod} == '!' ]]; then + if use ${flag}; then + optmap[${v}]=--disable-${v} + unset licensemap[${v}] + fi + elif [[ ! -v optmap[${v}] ]]; then + if [[ ${mod} == '^' ]]; then + optmap[${v}]=$(multilib_native_use_enable ${flag} ${v}) + else + optmap[${v}]=$(use_enable ${flag} ${v}) + fi + use ${flag} && licensemap[${v}]=${license} + fi + done + done + for license in "${licensemap[@]}"; do + case ${license} in + v3ifgpl) use gpl || continue ;& + v3) optmap[v3]=--enable-version3 ;; + nonfree) use gpl && optmap[nonfree]=--enable-nonfree ;; + esac + done + conf+=( + "${optmap[@]}" + ${EXTRA_ECONF} + ) + + einfo "${conf[*]}" + "${conf[@]}" || die "configure failed, see ${BUILD_DIR}/ffbuild/config.log" +} + +multilib_src_compile() { + emake V=1 +} + +multilib_src_test() { + local -x LD_LIBRARY_PATH=$(printf %s: "${BUILD_DIR}"/lib*)${LD_LIBRARY_PATH} + emake V=1 -k fate +} + +multilib_src_install() { + emake V=1 DESTDIR="${D}" install +} diff --git a/media-video/ffmpeg-compat/ffmpeg-compat-6.1.2.ebuild b/media-video/ffmpeg-compat/ffmpeg-compat-6.1.2.ebuild new file mode 100644 index 000000000000..4a3a3a7e15b3 --- /dev/null +++ b/media-video/ffmpeg-compat/ffmpeg-compat-6.1.2.ebuild @@ -0,0 +1,579 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-minimal toolchain-funcs + +FFMPEG_SOC_PATCH=ffmpeg-rpi-6.1-r3.patch +FFMPEG_SUBSLOT=58.60.60 # avutil.avcodec.avformat SONAME + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI=( + https://git.ffmpeg.org/ffmpeg.git + https://github.com/FFmpeg/FFmpeg.git + ) +else + inherit verify-sig + SRC_URI=" + https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz + verify-sig? ( https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz.asc ) + ${FFMPEG_SOC_PATCH:+" + soc? ( + https://dev.gentoo.org/~chewi/distfiles/${FFMPEG_SOC_PATCH} + verify-sig? ( https://dev.gentoo.org/~chewi/distfiles/${FFMPEG_SOC_PATCH}.asc ) + ) + "} + https://dev.gentoo.org/~ionen/distfiles/ffmpeg-$(ver_cut 1-2)-patchset-1.tar.xz + " + S=${WORKDIR}/ffmpeg-${PV} # avoid ${P} for ffmpeg-compat + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" +fi + +DESCRIPTION="Complete solution to record/convert/stream audio and video" +HOMEPAGE="https://ffmpeg.org/" + +[[ ${PN} == *-compat ]] && FFMPEG_UNSLOTTED= || FFMPEG_UNSLOTTED=1 + +FFMPEG_IUSE_MAP=( + # [+]flag[:[^][!]opt1,...][@<v3|nonfree>]], ^ = native-only, ! = override + # remember to keep LICENSE, REQUIRED_USE, and RESTRICT in sync + X:libxcb,libxcb-shape,libxcb-shm,libxcb-xfixes,xlib + alsa + amf + amrenc:libvo-amrwbenc@v3 + amr:libopencore-amrnb,libopencore-amrwb@v3 + appkit + bluray:libbluray + bs2b:libbs2b + bzip2:bzlib + cdio:libcdio + chromaprint + codec2:libcodec2 + cuda:cuda-llvm + +dav1d:libdav1d + ${FFMPEG_UNSLOTTED:+doc:^htmlpages} + +drm:libdrm + fdk:libfdk-aac@nonfree + flite:libflite + +fontconfig:libfontconfig + frei0r + fribidi:libfribidi + gcrypt + gme:libgme + gmp:@v3 + +gnutls # unused if USE=openssl, default for bug #905113,#917627 + +gpl + gsm:libgsm + iec61883:libiec61883 + ieee1394:libdc1394 + jack:libjack + jpeg2k:libopenjpeg + jpegxl:libjxl + kvazaar:libkvazaar + ladspa + lame:libmp3lame + lcms:lcms2 + libaom + libaribb24:@v3 # reminder: req use on gpl unneeded if >=1.0.4 (not in tree) + +libass + libcaca + libilbc + libplacebo + librtmp:librtmp + libsoxr + libtesseract + lv2 + lzma + modplug:libmodplug + npp:^libnpp@nonfree # no multilib + nvenc:cuvid,ffnvcodec,nvdec,nvenc + openal + opencl + opengl + openh264:libopenh264 + openmpt:libopenmpt + openssl:openssl,!gnutls@v3ifgpl # still LGPL2.1+ if USE=-gpl + opus:libopus + +postproc # exposed as a USE for clarity with the GPL requirement + pulseaudio:libpulse + qsv:libvpl + rabbitmq:^librabbitmq # no multilib + rav1e:^librav1e # no multilib + rubberband:librubberband + samba:libsmbclient@v3 # GPL-3+ only + sdl:sdl2 + shaderc:libshaderc + snappy:libsnappy + sndio + speex:libspeex + srt:libsrt + ssh:libssh + svg:librsvg + svt-av1:libsvtav1 + theora:libtheora + +truetype:libfreetype,libharfbuzz + twolame:libtwolame + v4l:libv4l2 + vaapi + vdpau + vidstab:libvidstab + vmaf:libvmaf + vorbis:libvorbis + vpx:libvpx + vulkan + webp:libwebp + x264:libx264 + x265:libx265 + +xml:libxml2 + xvid:libxvid + zeromq:^libzmq # no multilib + zimg:libzimg + +zlib + zvbi:libzvbi +) + +# all-rights is used to express the GPL incompatibility (RESTRICT=bindist) +LICENSE=" + gpl? ( + GPL-2+ + amr? ( GPL-3+ ) amrenc? ( GPL-3+ ) libaribb24? ( GPL-3+ ) + gmp? ( GPL-3+ ) openssl? ( GPL-3+ ) + fdk? ( all-rights-reserved ) npp? ( all-rights-reserved ) + ) + !gpl? ( + LGPL-2.1+ + amr? ( LGPL-3+ ) amrenc? ( LGPL-3+ ) libaribb24? ( LGPL-3+ ) + gmp? ( LGPL-3+ ) + ) + samba? ( GPL-3+ ) +" +[[ ${FFMPEG_UNSLOTTED} ]] && : 0 || : "$(ver_cut 1)" +SLOT="${_}/${FFMPEG_SUBSLOT}" +IUSE=" + ${FFMPEG_IUSE_MAP[*]%:*} + ${FFMPEG_UNSLOTTED:+chromium} + ${FFMPEG_SOC_PATCH:+soc} +" +REQUIRED_USE=" + cuda? ( nvenc ) + fribidi? ( truetype ) + gmp? ( !librtmp ) + libplacebo? ( || ( sdl vulkan ) ) + npp? ( nvenc ) + shaderc? ( vulkan ) + libaribb24? ( gpl ) cdio? ( gpl ) frei0r? ( gpl ) postproc? ( gpl ) + rubberband? ( gpl ) samba? ( gpl ) vidstab? ( gpl ) x264? ( gpl ) + x265? ( gpl ) xvid? ( gpl ) + ${FFMPEG_UNSLOTTED:+chromium? ( opus )} + ${FFMPEG_SOC_PATCH:+soc? ( drm )} +" +RESTRICT="gpl? ( fdk? ( bindist ) npp? ( bindist ) )" + +# dlopen: amdgpu-pro-amf, vulkan-loader +COMMON_DEPEND=" + virtual/libiconv[${MULTILIB_USEDEP}] + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXv[${MULTILIB_USEDEP}] + x11-libs/libxcb:=[${MULTILIB_USEDEP}] + ) + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) + amr? ( media-libs/opencore-amr[${MULTILIB_USEDEP}] ) + amrenc? ( media-libs/vo-amrwbenc[${MULTILIB_USEDEP}] ) + bluray? ( media-libs/libbluray:=[${MULTILIB_USEDEP}] ) + bs2b? ( media-libs/libbs2b[${MULTILIB_USEDEP}] ) + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) + cdio? ( dev-libs/libcdio-paranoia:=[${MULTILIB_USEDEP}] ) + chromaprint? ( media-libs/chromaprint:=[${MULTILIB_USEDEP}] ) + codec2? ( media-libs/codec2:=[${MULTILIB_USEDEP}] ) + dav1d? ( media-libs/dav1d:=[${MULTILIB_USEDEP}] ) + drm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) + fdk? ( media-libs/fdk-aac:=[${MULTILIB_USEDEP}] ) + flite? ( app-accessibility/flite[${MULTILIB_USEDEP}] ) + fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) + frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) + fribidi? ( dev-libs/fribidi[${MULTILIB_USEDEP}] ) + gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] ) + gme? ( media-libs/game-music-emu[${MULTILIB_USEDEP}] ) + gmp? ( dev-libs/gmp:=[${MULTILIB_USEDEP}] ) + gnutls? ( !openssl? ( + net-libs/gnutls:=[${MULTILIB_USEDEP}] + ) ) + gsm? ( media-sound/gsm[${MULTILIB_USEDEP}] ) + iec61883? ( + media-libs/libiec61883[${MULTILIB_USEDEP}] + sys-libs/libavc1394[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] + ) + ieee1394? ( + media-libs/libdc1394:2=[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] + ) + jack? ( virtual/jack[${MULTILIB_USEDEP}] ) + jpeg2k? ( media-libs/openjpeg:2=[${MULTILIB_USEDEP}] ) + jpegxl? ( media-libs/libjxl:=[$MULTILIB_USEDEP] ) + kvazaar? ( media-libs/kvazaar:=[${MULTILIB_USEDEP}] ) + lame? ( media-sound/lame[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2[$MULTILIB_USEDEP] ) + libaom? ( media-libs/libaom:=[${MULTILIB_USEDEP}] ) + libaribb24? ( media-libs/aribb24[${MULTILIB_USEDEP}] ) + libass? ( media-libs/libass:=[${MULTILIB_USEDEP}] ) + libcaca? ( media-libs/libcaca[${MULTILIB_USEDEP}] ) + libilbc? ( media-libs/libilbc:=[${MULTILIB_USEDEP}] ) + libplacebo? ( media-libs/libplacebo:=[$MULTILIB_USEDEP] ) + librtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] ) + libsoxr? ( media-libs/soxr[${MULTILIB_USEDEP}] ) + libtesseract? ( app-text/tesseract:=[${MULTILIB_USEDEP}] ) + lv2? ( + media-libs/lilv[${MULTILIB_USEDEP}] + media-libs/lv2[${MULTILIB_USEDEP}] + ) + lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] ) + modplug? ( media-libs/libmodplug[${MULTILIB_USEDEP}] ) + npp? ( dev-util/nvidia-cuda-toolkit:= ) + openal? ( media-libs/openal[${MULTILIB_USEDEP}] ) + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) + opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) + openh264? ( media-libs/openh264:=[${MULTILIB_USEDEP}] ) + openmpt? ( media-libs/libopenmpt[${MULTILIB_USEDEP}] ) + openssl? ( >=dev-libs/openssl-3:=[${MULTILIB_USEDEP}] ) + opus? ( media-libs/opus[${MULTILIB_USEDEP}] ) + pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) + qsv? ( media-libs/libvpl:=[${MULTILIB_USEDEP}] ) + rabbitmq? ( net-libs/rabbitmq-c:= ) + rav1e? ( >=media-video/rav1e-0.5:=[capi] ) + rubberband? ( media-libs/rubberband:=[${MULTILIB_USEDEP}] ) + samba? ( net-fs/samba:=[client,${MULTILIB_USEDEP}] ) + sdl? ( media-libs/libsdl2[sound(+),video(+),${MULTILIB_USEDEP}] ) + shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] ) + snappy? ( app-arch/snappy:=[${MULTILIB_USEDEP}] ) + sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) + speex? ( media-libs/speex[${MULTILIB_USEDEP}] ) + srt? ( net-libs/srt:=[${MULTILIB_USEDEP}] ) + ssh? ( net-libs/libssh:=[sftp,${MULTILIB_USEDEP}] ) + svg? ( + dev-libs/glib:2[${MULTILIB_USEDEP}] + >=gnome-base/librsvg-2.52:2[${MULTILIB_USEDEP}] + x11-libs/cairo[${MULTILIB_USEDEP}] + ) + svt-av1? ( >=media-libs/svt-av1-0.9:=[${MULTILIB_USEDEP}] ) + theora? ( media-libs/libtheora[encode,${MULTILIB_USEDEP}] ) + truetype? ( + media-libs/freetype:2[${MULTILIB_USEDEP}] + media-libs/harfbuzz:=[${MULTILIB_USEDEP}] + ) + twolame? ( media-sound/twolame[${MULTILIB_USEDEP}] ) + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) + vaapi? ( media-libs/libva:=[X?,${MULTILIB_USEDEP}] ) + vdpau? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libvdpau[${MULTILIB_USEDEP}] + ) + vidstab? ( media-libs/vidstab[${MULTILIB_USEDEP}] ) + vmaf? ( media-libs/libvmaf:=[${MULTILIB_USEDEP}] ) + vorbis? ( media-libs/libvorbis[${MULTILIB_USEDEP}] ) + vpx? ( media-libs/libvpx:=[${MULTILIB_USEDEP}] ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) + webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] ) + x264? ( media-libs/x264:=[${MULTILIB_USEDEP}] ) + x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] ) + xml? ( dev-libs/libxml2[${MULTILIB_USEDEP}] ) + xvid? ( media-libs/xvid[${MULTILIB_USEDEP}] ) + zeromq? ( net-libs/zeromq:= ) + zimg? ( media-libs/zimg[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zvbi? ( media-libs/zvbi[${MULTILIB_USEDEP}] ) + ${FFMPEG_SOC_PATCH:+" + soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) + "} +" +RDEPEND=" + ${COMMON_DEPEND} + amf? ( media-video/amdgpu-pro-amf ) +" +DEPEND=" + ${COMMON_DEPEND} + X? ( x11-base/xorg-proto ) + amf? ( media-libs/amf-headers ) + kernel_linux? ( >=sys-kernel/linux-headers-6 ) + ladspa? ( media-libs/ladspa-sdk ) + nvenc? ( >=media-libs/nv-codec-headers-12.1.14.0 ) + opencl? ( dev-util/opencl-headers ) + vulkan? ( dev-util/vulkan-headers ) +" +BDEPEND=" + app-alternatives/awk + virtual/pkgconfig + amd64? ( + || ( + dev-lang/nasm + dev-lang/yasm + ) + ) + cuda? ( llvm-core/clang:*[llvm_targets_NVPTX] ) + ${FFMPEG_UNSLOTTED:+" + dev-lang/perl + doc? ( sys-apps/texinfo ) + "} +" +[[ ${PV} != 9999 ]] && + BDEPEND+=" + verify-sig? ( + sec-keys/openpgp-keys-ffmpeg + ${FFMPEG_SOC_PATCH:+" + soc? ( >=sec-keys/openpgp-keys-gentoo-developers-20240708 ) + "} + ) + " + +DOCS=( CREDITS Changelog README.md doc/APIchanges ) +[[ ${PV} != 9999 ]] && DOCS+=( RELEASE_NOTES ) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/libavutil/avconfig.h +) + +PATCHES=( + "${WORKDIR}"/patches +) + +pkg_pretend() { + # TODO: drop this after a few months + if has_version "${CATEGORY}/${PN}[mp3]" && use !lame; then #952971 + ewarn "${PN}'s 'mp3' USE was renamed to 'lame', please enable it" + ewarn "if wish to keep the ability to encode using media-sound/lame." + ewarn "This is *not* needed if only want mp3 playback." + fi +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] || return + + if use chromaprint && has_version 'media-libs/chromaprint[tools]'; then + ewarn "media-libs/chromaprint is installed with USE=tools which links to" + ewarn "ffmpeg, and USE=chromaprint is enabled on ffmpeg which links to" + ewarn "chromaprint (circular). This may cause issues when updating ffmpeg." + ewarn + ewarn "If get a build failure with 'ERROR: chromaprint not found' or so," + ewarn "first rebuild chromaprint with USE=-tools, then rebuild ffmpeg, and" + ewarn "then finally rebuild chromaprint with USE=tools again (bug #862996)." + fi + + [[ ${EXTRA_FFMPEG_CONF} ]] && # drop this eventually + die "EXTRA_FFMPEG_CONF is set in the environment, please use EXTRA_ECONF instead" +} + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/ffmpeg-${PV}.tar.xz{,.asc} \ + "${BROOT}"/usr/share/openpgp-keys/ffmpeg.asc + in_iuse soc && use soc && + verify-sig_verify_detached "${DISTDIR}"/${FFMPEG_SOC_PATCH}{,.asc} \ + "${BROOT}"/usr/share/openpgp-keys/gentoo-developers.asc + fi + default + fi +} + +src_prepare() { + in_iuse chromium && PATCHES+=( "${FILESDIR}"/chromium-r3.patch ) + in_iuse soc && use soc && PATCHES+=( "${DISTDIR}"/${FFMPEG_SOC_PATCH} ) + + default + + # respect user preferences + sed -i '/cflags -fdiagnostics-color/d' configure || die + + # handle *FLAGS here to avoid repeating for each ABI below (bug #923491) + FFMPEG_ENABLE_LTO= + if tc-is-lto; then + : "$(get-flag flto)" # get -flto=<val> (e.g. =thin) + FFMPEG_ENABLE_LTO=--enable-lto${_#-flto} + fi + filter-lto + + use elibc_musl && append-cppflags -D__musl__ #940733 + + if use npp; then + local cuda=${ESYSROOT}/opt/cuda/targets/$(usex amd64 x86_64 sbsa)-linux + append-cppflags -I"${cuda}"/include + append-ldflags -L"${cuda}"/lib + fi +} + +multilib_src_configure() { + local conf=( "${S}"/configure ) # not autotools-based + + local prefix=${EPREFIX}/usr + if [[ ! ${FFMPEG_UNSLOTTED} ]]; then + prefix+=/lib/ffmpeg${SLOT%/*} + # could get SONAME clashes, so prefer rpath over LDPATH + conf+=( + --enable-rpath + --disable-doc + ) + fi + + conf+=( + --prefix="${prefix}" + --libdir="${prefix}"/$(get_libdir) + --shlibdir="${prefix}"/$(get_libdir) + --mandir="${prefix}"/share/man + --docdir="${EPREFIX}"/usr/share/doc/${PF}/html + + --ar="$(tc-getAR)" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --nm="$(tc-getNM)" + --pkg-config="$(tc-getPKG_CONFIG)" + --ranlib="$(tc-getRANLIB)" + --disable-stripping + + # overrides users' -g/-O, let *FLAGS handle these + --disable-debug + --disable-optimizations + --optflags=' ' + + # pass option over *FLAGS due to special logic (bug #566282,#754654) + ${FFMPEG_ENABLE_LTO} + + # basic defaults that should not really need a USE + --enable-iconv + --enable-pic + --enable-shared + --disable-static + $(multilib_native_enable manpages) # needs pod2man + --disable-podpages + --disable-txtpages + + # disabled primarily due to being unpackaged + --disable-decklink + --disable-libaribcaption + --disable-libdavs2 + --disable-libklvanc + --disable-libmysofa + --disable-libopenvino + --disable-libshine + --disable-libtls + --disable-libuavs3d + --disable-libxavs + --disable-libxavs2 + --disable-pocketsphinx + --disable-rkmpp + --disable-vapoursynth + + # disabled for other or additional reasons + --disable-cuda-nvcc # prefer cuda-llvm for less issues + --disable-libcelt # obsolete (bug #664158) + --disable-libglslang # prefer USE=shaderc (bug #918989,#920283,#922333) + --disable-liblensfun # https://trac.ffmpeg.org/ticket/9112 (abandoned?) + --disable-libmfx # prefer libvpl for USE=qsv + --disable-libopencv # leaving for later due to circular opencv[ffmpeg] + --disable-librist # librist itself needs attention first (bug #822012) + --disable-libtensorflow # causes headaches, and is gone + --disable-mbedtls # messy with slots, tests underlinking issues + --disable-mmal # prefer USE=soc + --disable-omx # unsupported (bug #653386) + --disable-omx-rpi # ^ + + # to avoid obscure issues like bug #915384 and simplify the ebuild, + # not passing the following (use EXTRA_ECONF if really must): + # --cpu: adds -march=<exact> after the user's more adapted + # =native, its logic also does not account for -mno-* + # --disable/enable-<cpufeature>: safer to detect at runtime + ) + + in_iuse soc && use soc && + conf+=( + --disable-epoxy + --enable-libudev + --enable-sand + --enable-v4l2-request + ) + + # broken on x32 (bug #427004), and not PIC safe on x86 (bug #916067) + [[ ${ABI} == @(x32|x86) ]] && conf+=( --disable-asm ) + + # disable due to asm-related failures on ppc (bug #951464, ppc64be) + # https://trac.ffmpeg.org/ticket/9604 (ppc64el) + # https://trac.ffmpeg.org/ticket/10955 (ppc64el) + # (review re-enabling if resolved, or if debian allows it again) + use ppc || use ppc64 && conf+=( --disable-asm ) + + if tc-is-cross-compiler; then + conf+=( + --enable-cross-compile + --arch="$(tc-arch-kernel)" + --cross-prefix="${CHOST}-" + --host-cc="$(tc-getBUILD_CC)" + ) + case ${CHOST} in + *mingw32*) conf+=( --target-os=mingw32 );; + *linux*) conf+=( --target-os=linux );; + esac + fi + + # import options from FFMPEG_IUSE_MAP + local flag license mod v + local -A optmap=() licensemap=() + for v in "${FFMPEG_IUSE_MAP[@]}"; do + [[ ${v} =~ \+?([^:]+):?([^@]*)@?(.*) ]] || die "${v}" + flag=${BASH_REMATCH[1]} + license=${BASH_REMATCH[3]} + v=${BASH_REMATCH[2]:-${flag}} + for v in ${v//,/ }; do + mod=${v::1} + v=${v#[\!\^]} + if [[ ${mod} == '!' ]]; then + if use ${flag}; then + optmap[${v}]=--disable-${v} + unset licensemap[${v}] + fi + elif [[ ! -v optmap[${v}] ]]; then + if [[ ${mod} == '^' ]]; then + optmap[${v}]=$(multilib_native_use_enable ${flag} ${v}) + else + optmap[${v}]=$(use_enable ${flag} ${v}) + fi + use ${flag} && licensemap[${v}]=${license} + fi + done + done + for license in "${licensemap[@]}"; do + case ${license} in + v3ifgpl) use gpl || continue ;& + v3) optmap[v3]=--enable-version3 ;; + nonfree) use gpl && optmap[nonfree]=--enable-nonfree ;; + esac + done + conf+=( + "${optmap[@]}" + ${EXTRA_ECONF} + ) + + einfo "${conf[*]}" + "${conf[@]}" || die "configure failed, see ${BUILD_DIR}/ffbuild/config.log" +} + +multilib_src_compile() { + emake V=1 + in_iuse chromium && use chromium && multilib_is_native_abi && + emake V=1 libffmpeg +} + +multilib_src_test() { + local -x LD_LIBRARY_PATH=$(printf %s: "${BUILD_DIR}"/lib*)${LD_LIBRARY_PATH} + emake V=1 -k fate +} + +multilib_src_install() { + emake V=1 DESTDIR="${D}" install + in_iuse chromium && use chromium && multilib_is_native_abi && + emake V=1 DESTDIR="${D}" install-libffmpeg +} diff --git a/media-video/ffmpeg-compat/metadata.xml b/media-video/ffmpeg-compat/metadata.xml new file mode 100644 index 000000000000..895198538495 --- /dev/null +++ b/media-video/ffmpeg-compat/metadata.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ionen@gentoo.org</email> + <name>Ionen Wolkens</name> + </maintainer> + <maintainer type="person"> + <email>chewi@gentoo.org</email> + <name>James Le Cuirot</name> + <description>soc USE flag</description> + </maintainer> + <use> + <flag name="amf">Enable AMD's Advanced Media Framework support via <pkg>media-video/amdgpu-pro-amf</pkg></flag> + <flag name="amr">Enable Adaptive Multi-Rate Audio support via <pkg>media-libs/opencore-amr</pkg></flag> + <flag name="amrenc">Enable Adaptive Multi-Rate Audio encoding support via <pkg>media-libs/vo-amrwbenc</pkg></flag> + <flag name="appkit">Enable Apple AppKit framework</flag> + <flag name="bluray">Enable Blu-ray filesystems reading support via <pkg>media-libs/libbluray</pkg></flag> + <flag name="bs2b">Enable Bauer Stereo-to-Binaural filter support via <pkg>media-libs/libbs2b</pkg></flag> + <flag name="cdio">Enable audio CDs reading via <pkg>dev-libs/libcdio-paranoia</pkg></flag> + <flag name="chromaprint">Enable audio fingerprinting support via <pkg>media-libs/chromaprint</pkg></flag> + <flag name="codec2">Enable codec2 low bit rate speech codec support via <pkg>media-libs/codec2</pkg></flag> + <flag name="cuda">Enable support for various GPU-accelerated filters using NVIDIA PTX compiled with <pkg>llvm-core/clang</pkg></flag> + <flag name="dav1d">Enable AV1 decoding support via <pkg>media-libs/dav1d</pkg></flag> + <flag name="drm"> + Enable use of <pkg>x11-libs/libdrm</pkg> for various hardware + accelerated functions and Kernel Mode Setting screen capture + </flag> + <flag name="fdk"> + Enable AAC (Advanced Audio Coding) encoding support via + <pkg>media-libs/fdk-aac</pkg> in addition to FFmpeg's own + implementation (warning: if USE=gpl is enabled, this produces + a non-redistributable build) + </flag> + <flag name="flite">Enable text-to-speech filter support via <pkg>app-accessibility/flite</pkg></flag> + <flag name="frei0r">Enable use of filters through <pkg>media-plugins/frei0r-plugins</pkg></flag> + <flag name="fribidi">Enable Bidi support for the drawtext filter via <pkg>dev-libs/fribidi</pkg></flag> + <flag name="gcrypt"> + Enable using <pkg>dev-libs/libgcrypt</pkg> for rtmp(t)e support (not + needed if using any of USE=gmp,librtmp,openssl), and for obtaining + random bytes (not needed if USE=openssl)</flag> + <flag name="gme">Enables various game music formats support via <pkg>media-libs/game-music-emu</pkg></flag> + <flag name="gnutls"> + Enable using <pkg>net-libs/gnutls</pkg> for TLS/HTTPS support + and other minor functions (has no effect if USE=openssl is set) + </flag> + <flag name="gpl">Enable use of GPL licensed code, should be kept enabled unless LGPL binaries are needed</flag> + <flag name="iec61883">Enable FireWire DV/HDV input device support via <pkg>media-libs/libiec61883</pkg></flag> + <flag name="kvazaar">Enable H.265/HEVC encoding support via <pkg>media-libs/kvazaar</pkg></flag> + <flag name="lcms">Enable ICC profile support via <pkg>media-libs/lcms</pkg></flag> + <flag name="libaom"> + Enable AV1 de/encoding via <pkg>media-libs/libaom</pkg> (warning: this + is the reference implementation and is slower than the alternatives) + </flag> + <flag name="libaribb24">Enable ARIB text and caption decoding via <pkg>media-libs/aribb24</pkg></flag> + <flag name="libilbc">Enable internet Low Bitrate Codec de/encoding support via <pkg>media-libs/libilbc</pkg></flag> + <flag name="libplacebo">Enable use of GPU-accelerated filters from <pkg>media-libs/libplacebo</pkg></flag> + <flag name="librtmp"> + Enable Real Time Messaging Protocol support via <pkg>media-video/rtmpdump</pkg> + in addition to FFmpeg's own implementation + </flag> + <flag name="libsoxr">Enable use of the audio resampler from <pkg>media-libs/soxr</pkg></flag> + <flag name="libtesseract">Enable Optical Character Recognition (OCR) filter support via <pkg>app-text/tesseract</pkg></flag> + <flag name="lv2">Enable use of filters through <pkg>media-libs/lv2</pkg></flag> + <flag name="npp"> + Enable Nvidia Performance Primitives-based filters via + <pkg>dev-util/nvidia-cuda-toolkit</pkg> (warning: if USE=gpl + is enabled, this produces non-redistributable build) + </flag> + <flag name="openh264">Enable H.264 encoding support via <pkg>media-libs/openh264</pkg></flag> + <flag name="openmpt">Enable MPTM tracked music files decoding support via <pkg>media-libs/libopenmpt</pkg></flag> + <flag name="openssl"> + Enable using <pkg>dev-libs/openssl</pkg> for TLS/HTTPS support + and other minor functions (USE=gnutls has no effect if set) + </flag> + <flag name="postproc"> + Enable libpostproc video post processing library support + (should not disable this unless need to disable USE=gpl) + </flag> + <flag name="qsv">Enable Intel Quick Sync Video support via <pkg>media-libs/libvpl</pkg></flag> + <flag name="rabbitmq">Enable AMQP stream support via <pkg>net-libs/rabbitmq-c</pkg></flag> + <flag name="rav1e">Enable AV1 encoding support via <pkg>media-video/rav1e</pkg></flag> + <flag name="rubberband">Enable time-stretching and pitch-shifting audio filter support via <pkg>media-libs/rubberband</pkg></flag> + <flag name="sdl">Enable use of the Simple Direct Layer library (required for the ffplay command)</flag> + <flag name="shaderc">Enable support for various GPU-accelerated filters using Vulkan compiled with <pkg>media-libs/shaderc</pkg></flag> + <flag name="snappy"> + Enable Snappy compression support via <pkg>app-arch/snappy</pkg> + (required for Vidvox Hap encoder support) + </flag> + <flag name="sndio">Enable audio output support via <pkg>media-sound/sndio</pkg></flag> + <flag name="soc">Apply additional patches for efficient playback on some SoCs (e.g. ARM, RISC-V)</flag> + <flag name="srt">Enable Secure Reliable Transport (SRT) support via <pkg>net-libs/srt</pkg></flag> + <flag name="ssh">Enable SSH/SFTP support via <pkg>net-libs/libssh</pkg></flag> + <flag name="svt-av1">Enable AV1 encoding support via <pkg>media-libs/svt-av1</pkg></flag> + <flag name="truetype"> + Enable drawtext filter support via <pkg>media-libs/freetype</pkg> + and <pkg>media-libs/harfbuzz</pkg> + </flag> + <flag name="twolame"> + Enable MP2 encoding support via <pkg>media-sound/twolame</pkg> + in addition to FFmpeg's own implementation + </flag> + <flag name="vidstab">Enable video stabilization filter support via <pkg>media-libs/vidstab</pkg></flag> + <flag name="vmaf">Enable Netflix's perceptual video quality assessment filter support via <pkg>media-libs/libvmaf</pkg></flag> + <flag name="vpx"> + Enable VP8 and VP9 de/encoding support via <pkg>media-libs/libvpx</pkg> + in addition to FFmpeg's own implementation (for decoding only) + </flag> + <flag name="x265">Enable H.265/HEVC encoding support via <pkg>media-libs/x265</pkg></flag> + <flag name="xml">Enable Dynamic Adaptive Streaming over HTTP (DASH) stream support using <pkg>dev-libs/libxml2</pkg></flag> + <flag name="zeromq">Enable ZMQ command receiver filter and streaming support via <pkg>net-libs/zeromq</pkg></flag> + <flag name="zimg">Enable zscale filter support using <pkg>media-libs/zimg</pkg></flag> + <flag name="zvbi">Enable teletext decoding support via <pkg>media-libs/zvbi</pkg></flag> + </use> + <upstream> + <bugs-to>https://trac.ffmpeg.org/</bugs-to> + <doc>https://ffmpeg.org/documentation.html</doc> + <remote-id type="cpe">cpe:/a:ffmpeg:ffmpeg</remote-id> + <remote-id type="github">FFmpeg/FFmpeg</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest index 6f2a41e94f19..db9b196207a9 100644 --- a/media-video/ffmpeg/Manifest +++ b/media-video/ffmpeg/Manifest @@ -1,47 +1,20 @@ -AUX chromium-r1.patch 1582 BLAKE2B 48547a7d53fd1f0f44b682c7e2306e79f007f8e96b36253f76775c4a3ced54ffaaf403dfaae94e81aa26c60887677b2dabdd2c5cef9fc4553e203f8259453910 SHA512 808daad5afed13a6d3926c9f9ab5cb58f80e16969533022c7ee959147908bb2c12d066d2125a6b6975ef9304d9b8d49c39aeb0a047009adabb4529e3cf54498f -AUX chromium-r2.patch 1602 BLAKE2B e3f5441dfb3b8b6975da9dc6c1283c814fae24d0c373b86a2b6b8706d7169a63504f258fcef57c28f738aa7dba0b1f3186afebe45e13e1ab14b7538bdeb1b86e SHA512 31ff29d8fdf91cb4151a6a32902aaac55bb0062383619a655db20351582a88c487da528c6cf319717e4f39a140e3721de9d499c3e96ca0ea231aa4651f41ed9d -AUX chromium.c 215 BLAKE2B 2b5149d401433a362149cd4ff020cdc2217388e3ecac4aef86e7a46c7abb0d13a050eb61eab859578ecb9682e075451e2ccf7c2bda5c7ec397f71b9d06c1cf48 SHA512 552ef0a6316e743be717bdb8f49b69ab0b2acda828ff87f581aaf816d403ff59d5153a57f0bfd3b64e37a4fb8d261f0449b520b7e26feb7fd444cb480dc895b5 -AUX ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch 1068 BLAKE2B b547cd925bfd506e08d44395c67916fe20b30f397a36adf53fcf277660c45aef9d3d8c014b2bbfcf038539618affb9dd8ff5d93f2fe622e4282c61c4d1b26861 SHA512 779e921e783b800e6bf9bc95af73d44a170287676d17bc22f2b7cd91e393f410ec3f6c7bfa173497443a65496047f39f37cac1d56507271411893c5bdcb37d8b -AUX ffmpeg-4.4.4-amd-av1-vaapi.patch 11092 BLAKE2B d3561619dd226102116c729475691a4d10382abbe09be3ca79beed61c4b785e76e01d13ef956fce5233a8d525d84b27cb191bb91bc1b9538e72794b98ac31c6a SHA512 3ef47e1f6ab0eacc7a17ee31fcf0ccd6e90812689cd94cbfd4763db57aadff09eafb6dca7a20931bc95208109c6fd00370d6b9a6b3cb9d1bfe55b2436fd5eda8 -AUX ffmpeg-4.4.4-glslang.patch 1526 BLAKE2B d64d95f089c3d3aeafb7cc3fb08700641b6252c3cdbfac2e9b16431819007a8fa7b52ae156a1c9727671f00c9281024596183b85f7f74864ef997f660aa47296 SHA512 2bca3ca62bece6696dd6bd30c8cf57e31b9da551ee1f698a09d0a00ecdc96da51b519a8a42c85d1f572d26db92bec72a717d75c1a6e3c8f59a4a0066e6a332b8 -AUX ffmpeg-4.4.4-opencl-parallel-gmake-fix.patch 362 BLAKE2B 709a5a79aea781258998f295e539620651dce08820db345ab3d1d8996b076907db5157bfc7cd1fe15b8ce86bd1f6d073f79a2343f74a2548e9a699b92b4efe6f SHA512 0a5ecb29c19505564b4d3d6f362b8885d055c5a93688f3671509764194fb851aaf51483a956b8a150ec6ea17cc7ca2e5e0cca25d5f476f26c3bbdcb3ebd8ce05 -AUX ffmpeg-4.4.4-wint-conversion-vulkan.patch 1066 BLAKE2B 1409c97a31ae59500df944ced7efc064486e325e1658ac8f30d74ac926c63de51b610eebb5be9951adcd8ad02c8c143429c6eff57ce789a1c187e0b24221aa6d SHA512 58e33b2f0e94e75ef7acebb221332dc4d618846f8a968011da370743ce80a4ab688112411d3f2a5320d144c25db567780c870a0eb4045152b73957e2d7fe747e -AUX ffmpeg-4.4.5-binutils-2.43-arm.patch 1999 BLAKE2B 89d9ed274ea6e637424b4e83e5029b6a90140bcebf577e2b9eab5e2a7c803f5a78a06f0d794ef797733c0bc3c50c9446a38f783b6a7ca84b23e117c71b792e4e SHA512 33eff894a68fe46d2440f3ada9f1d016949119028d3e9b2f8b2ec428fa255a31d4f2b72a5fc9dd91abe06d20728d58221bd9b9e3f921f5b5b43d286ebe4c0f65 -AUX ffmpeg-4.4.5-incmptbl-pntr-types.patch 502 BLAKE2B 2c4d4416b112d1b4b0c985be7765e18e5d52586252834dd47052e13caa8554fd28dcbc88b37013f36134d5dba06b0c917f485f42a8e12d5cda37a6b13dd48827 SHA512 d3e9730467d52cb75999fa2494996e2b1515cdfb22d134be50240308f2c1167569033c7aaa821efe10dc0ee252863ff3c8826b58fbf2a727639c1bee652edc14 -AUX ffmpeg-4.4.5-wint-inconversion-libgcrypt.patch 3472 BLAKE2B 7ba84ccd12c4c661a09ad0843ad53d863d3fe60cdba32c9ac2c05c4f2b5167a2315f24ac387d5ec612cf7d05fe6abd4cf00c7facc1c30bcf4f247ed316f716b7 SHA512 8951addd67a6720a45411f28fb3bccfd0707f35c1861969ea5e19c4e71c553116704f18c403c9032ae2443f065fae81c08d029d3a1d44de7c22a959b5e9835a1 -AUX ffmpeg-5.0-backport-ranlib-build-fix.patch 2224 BLAKE2B 1af6c5eee3f2c69c0630a73ec3885b9302cb045a03623ff138939348d6ba7e7deef1bb07c33c5bef5834040c4f6abcd7d22af8b0b849b28efde3d5753b776108 SHA512 e82cd400488ba86e5d039f088e3798b5a66245a8753d275d608284081f4b260fb7a4d8d1310f43acdf81258cc507943c8f07e431c497411744a62ba98c88c5bb -AUX ffmpeg-6.0-fix-lto-type-mismatch.patch 1782 BLAKE2B 4cafd0244136c645e8da072b21c906fba97579f667e57f678b450410759fddc834e5a2428b7d0f078130cfc7ab267cad82a46d369951efddcfc5853dd2118837 SHA512 170114d57af0a0b5fc5da71ae76f4725b8cf1a604b5eca10e60761ef22fb0cdb35a166d1dd5ebc4ef990c383e1d1331f8ef2ceccb8dc7bf4adcc7e9ebb2ba899 -AUX ffmpeg-6.0.1-alignment.patch 5048 BLAKE2B 9a9345b84b68442c97258a71b49ed773e40d985ea8f2525a8749a7562d787634ff0b0e5e1d257e94f7cf68fab81790ca2f0b64cfcb27453e1e6912de30c560e9 SHA512 575b71b2d69b0c7b4e0498b9375dad55945adc7178c72ed5fd12addeae3ffb0081ab59d743a2a6da1a3b67d84642c7dd3d04e2fdb9ae2d992968ba52aa1aee41 -AUX ffmpeg-6.1-gcc-14.patch 523 BLAKE2B b82fc06a7eee0c7ab68ef78f3ac205f45a68a7799dc241f0a574afa48e4dbd477c0d67f7c5a7ff46971adc821ef1507f4957156200167a2c59f8c7f7867ac048 SHA512 092cd9bad652ab82c3b160a37c0c92b561577d56b33776e30b79b7abf487fffeb1ef1273b950c4d4eff62d3cd7fec2a6dc2c294285b0b32eda364e47834a4ff9 +AUX chromium-r3.patch 1878 BLAKE2B fc3b2344c8819f66f94b75911854193a1a6e8760a7767ab1e3deb966ab1587f426b14076705dae5dc76916bce07301747fe9c8c1d7268eed408594b1dad0b615 SHA512 e685946343bc0f0384b612ca1b009f1c5f03de03b4ac4e029e16ef720e28eaa59af6d692fb1d70822c191501e9c6cc374533f90581564aa8830122ab511db727 AUX ffmpeg-6.1-opencl-parallel-gmake-fix.patch 370 BLAKE2B 46afba747d26105e5520389016aa8cc73ebc1425095e7818e0c2e23ff66b822a5428fec8253a6b545456bd94d0e746ed24bc014a7fa25d97b6fc4acf753341d4 SHA512 82b16798e63736dc67ad03e62eb31c7d3653d2e53a775a0a4456e01985da2336ebde587d3acd2272065c5ce82be528ebc051cd6c121832829d7cd0ed2aba3fdd -AUX ffmpeg-6.1-wint-conversion.patch 3514 BLAKE2B fcb65b882af964a8f45f71ea3f885fc016e3f89c3d6f0bd6d661d489715c0f746e763a86c6ade1515e212b01559d90ea9c2a97c965e0c0f9087b8396cdd58414 SHA512 7e09fc1a811a21aee9eef0370e57a37817652229a6b0e58cd2e8723e8336124396fe40f6a7c6c5f860046410596027d27d900371ff86609b86ef94dd0633977f -AUX ffmpeg-6.1.1-amd-av1-vaapi.patch 11069 BLAKE2B f30d00fd00215b8753ba720bde8b040f03fadb9ae6d1e3ebf98ae20564104a55aa220ac91ab082e3086943677a9be6d8b709170765605ecb681458ad215e44d9 SHA512 cf8127f3e50c28824367ca489568eb1e8ff11207291b2354d4bf8027a2bc4a884e24e76bad4fd023cf80268c04e0893f3d6d1fbd8ccf4b9c5e69b74ae41775d4 -AUX ffmpeg-6.1.1-incmptbl-pntr-types.patch 2314 BLAKE2B cfd05bdec613ec3c7c7a57f294b2d56959bb062eb2bfac8f799784bf913601b7a455d7e8d706054b32ac94c894773edc37417ac022cbbd64f5faca53c0193118 SHA512 c3b4abca88d831ddfefd9639fb26df636ba0fb0f5a502c30fe26d0672b8a3e0168af098647c0204c56857b46fa22add3c880bef737592a6c35f85f191eabafd4 -AUX ffmpeg-6.1.1-memory-leak.patch 4184 BLAKE2B 93499876d5bab3dede021f646146f449d209f520ace803d9d46b0132d32aaea2bf6047c67f8804545a8eb90530c8884f5c687836cff2af111baeb52bbf1884ba SHA512 926c662c27f379c9f91ee48eb23090ba7d0c429a0e00a1ebc0fcba75657c0091da1a1b11441a61cfa77e6ba659906127bf3a51ad17d9ff921455d5495381b658 -AUX ffmpeg-6.1.1-vulkan-rename.patch 5784 BLAKE2B 25e85dc0e5d3915a709d86be60a938f4669d87a370c98bd5d17b94fd3e1fec4ae78a6fc696dd862ce5c932987aac601dfcf8f8c8a6a2acd8adf6166a4368b11d SHA512 f7d2a10b1c143d9ddbc08f0faa96ccabbbadb7ab2e293cef53f77f93b44560bf099b4a40e434295925683963887afaf34ee28052737b4207ca531d399e0243f5 -AUX ffmpeg-6.1.1-wint-inconversion-libgcrypt.patch 3442 BLAKE2B 21d441dd39595c13b7be7407c774a9e3a9d4ae8b2334aeed79d2fa5b88f4c637665b782b0705fabe6283062549138453fb01d1c1d4bbcd799474a7590e59ed75 SHA512 aa8c0c259e7ab98afd608e4c2167eebe4e373000713c84a2052b9836cd04a029d6123bc1ce27a84589048ee3634ab8b30a8e501ff48394d3fccf9f13c85273af -AUX ffmpeg-6.1.1-wint-inconversion-vulkan.patch 1565 BLAKE2B 275132b55cdd9b6e1671dc2db5cf5aea1b6198d0942f2ecda5078902ad62172742bf29e17ba63847133b7eb3ff93ccb832ad92e7a7c42ab8c8cc917e964be888 SHA512 fef857daa13fe2b146d22764ede340ccf348d21beda5db4635273c37e22acb054e9d000466fd06b057c97187ba406e5fb08b929808b49e64d67ffcfa0e459a9e -AUX vmaf-models-default-path.patch 1126 BLAKE2B 71f83765dc89b85e929af393f9d1415d119e71a91aaf45e8a32fd4fff270a129ca797c3b383a6074bea32fb582816660022a59d33bb6f557514df038baaf0271 SHA512 4d21f4b1622d8e47d2821ecac6b893847ada74d75db7d8aaac70efc7e6e7a6607c011b6fb2d015cb0c5e05f6a56e4feed43eca7d35b0f686a68261e6d9981b6a +AUX ffmpeg-7.1.1-svt-av1-3.patch 522 BLAKE2B d5a4fccee8ba6c90e3bf606c21deff17f58303aa244d44279d09225608af6cc213169deda3e16b160af4a912c2eb30ab9f45459811ae77b0297f05a3851af98b SHA512 9affc7f64ceb77e3da0679e6721572a9c638a4d99e06976f989562bd7babc3ad3090c2729f009a84de5e19d5aeeb6056d977aeb6bff381675f4ec3efdcb3e9bc +DIST ffmpeg-4.4-patchset-1.tar.xz 9916 BLAKE2B 9b41de6b048601f2af41864c3262b3348330f792eea71df4cfab5e740626ee6c633ac5569e6e91d953143f6ad0fac15c840ef0643925e91261f8b4a32e2d386c SHA512 b11d9e182ddb0a48f50d63f5e0bd7fd99f4b8fa7dd17179a3bfbc9419dabb76401408a81ae2d5f118fbf67f28dcfdc3bfb5b7ac70f740259e3ebad8d1ba049bb DIST ffmpeg-4.4.5.tar.xz 9575596 BLAKE2B 546df09f7731d22e532a18d9ba9be184283f62b7a2e9470e745e536802bc2263a00f11ed6ab0aee8fc60c5f728826311cbf3542084ba3a64b65a61d76295cd64 SHA512 70df4e63ef507a7ec76da34438142499139769728fd5130d9cf48d56c110ec82c3d6a7e6d1622da03c70167fa861d901d016bbe52c21d2b284b8a0d9f30811dc DIST ffmpeg-4.4.5.tar.xz.asc 520 BLAKE2B 505987208ed58b548f910299adb1324e6eba655cc37e6f03cac32c8623e16a4a884e822c745fb72b1934129a8c0a2706bb8bfb785715e6a68e43f737cb8ed365 SHA512 bcfee8986681dfbefd3add741fcbbc5e223bb06c9800797e68fde968c114055ac3fc02ce8731ed269bf30c92d6c990c7f636f82d42379920012e8a0ace8d527e -DIST ffmpeg-6.1.1.tar.xz 10458600 BLAKE2B 77827ff92b47c773ed82e7b7793dbb135c370fe23501169cb1eab08ff5ede77cfd5b397e8fb1d38756812cc82277898fd5c74b7d8495842556570c0c5570daeb SHA512 fca3f8635f29182e3ae0fe843a8a53614e4b47e22c11508df3ff7cdbafbb4b5ee0d82d9b3332871f7c1032033b1cad2f67557d7c5f7f7d85e2adadca122965d5 -DIST ffmpeg-6.1.1.tar.xz.asc 520 BLAKE2B 801cd976d10363d1f9fc302351b330cb57e609a266407627ef378172f28974f4a18435b8a77b9cc7a8ff7b75701185211739f685629bbda961c3588c15af1221 SHA512 0e10c1f560bab0812d759d286656593dea5940f02bb52d88d9ba7f10b12b9cc3d7aa2a41c5f7a45b319069e04dce22dc1286b3c1ba685b35cd6d04cd81c5a0f5 +DIST ffmpeg-6.1-patchset-1.tar.xz 11296 BLAKE2B 5227d0c7f52a4f217d5517da11c2327585375c9d860f31415e1079f4f1f9186637e07c7da0e168c732cc7abb953440f0ba952395db83074588eb31bee1d5bc9f SHA512 20fe94536a5c3873d0126ff535a3bff595dedc7787162f160ecde6cbd357b9eb3749c9d7b7543aa39896ceb4e656494d31811bf26682776cdfc693fe030cd77b DIST ffmpeg-6.1.2.tar.xz 10466152 BLAKE2B ff1f2b2bb60ccc4c37b6ffda2a0e6a0be80c451dc99f6d4a99bd95a1bdc44c494d62377c53383ccfb5b818573a1971948d7db34119099dbc56d7258724831d3c SHA512 3a009184d971fc3168e1322d1d724aae787ed0e9c152d8d1813ea0b9099bda3b35c41fcabbd7b140560e7a8fa9fa1ffd7f0938432d5d498c43829fc6cc3d9e08 DIST ffmpeg-6.1.2.tar.xz.asc 520 BLAKE2B f26a2d6f5423f93090f2a448172e49f3858aeb5a00f326207d374bbb70fa8942c7ee1a7c55338b2db664b647c983cd5ab4fd8d71efe5c37af4c90385ca17d0ab SHA512 a26dba1f4870b964080b45f8468f5ce3591eb6aa69be426bf4afbe5a60c3cbd0fe5056dc86ca7bb817c04ae30d39160cb7773772a9a2123ae7f095b18a6d7050 -DIST ffmpeg-7.0.2.tar.xz 10795332 BLAKE2B f6536f41f784f1b49ed0728d80a522676dfe1facbeb7fec3f7796683ce28c73e41508f9a5dd1e5cd18d3ff787d562bb1e6a5085ee0660076b84a76040587e5a8 SHA512 2fc66e919db53f6b12f845c0f9b92f3d8a7ec1db1ff533d29e679a6524f32567babf2d0791da039dcf2918c4d4cbb3f99c2898d3795345f03112238af8edcbd9 -DIST ffmpeg-7.0.2.tar.xz.asc 520 BLAKE2B edaadb45588938a524b64d82f96d224c2060648c10649adeba4a3546863eea45b674ebca80e7839e92138ae0b375afd22e0b4552d4d5a68dbb021e706f965b6d SHA512 b41eeb8044754bfcf2cf67a3ed4a4e74194ee6e5f4ed5f03aa03bb68772f6bacd7a1839d8e9740573889230a71d3bc7d52b4625542f4c892e8de8c61deda2c51 -DIST ffmpeg-7.1.tar.xz 11011364 BLAKE2B 91b012d12a0f2bc1742d7d2e634e358d5d10976ad1fd0c44f40fa7a0fd102bc11e3b51237c2e3b0baa4b4d7d505e21d4336baa3293b20a7c4e3a0433dfc53362 SHA512 7282fff068452bf154b2bf814e7f20d44ed4d961687dffd841bd77b88f26d9eee2cf4cf02e9a60b48b50e77a0c34731580d9e7c0945e3bc14c8ace840d920cde -DIST ffmpeg-7.1.tar.xz.asc 520 BLAKE2B f7bfc9633a88b172c3d2b17eb612dd8fb619bef3f8aa22fcefecde7c8026aeff3978155aebd281937eafaf61f1c4ad18d3adeafdc2d8c4289f4f9312f3fc58db SHA512 063daa6007abb86de454ba61ba47c75d8251fac07e1b2366aab022a7d80d0bb658f678f2ca2f7c422ad3f5d289201509818f312fe81d72a4176954184b5f2fe6 +DIST ffmpeg-7.1.1.tar.xz 11019500 BLAKE2B 85d1850bfa39ec28d358b5454daa7c1cf8580af73a6f83e7c070ea94db40ad485adbaeb89e886e0b3908e0f1765bd9f2b40ddd838e33e0a76e5b286917535310 SHA512 42486e485c8fc6f3ec61598a1a7cb40360535762b3fcf28c10d7c6840bc55afe3334434912746e69eef862d3cedf45a02953bde73d38547d2d9a7a38a65e123a +DIST ffmpeg-7.1.1.tar.xz.asc 520 BLAKE2B 3bb276ab356ba50a805a76e3e3cd2113141c28daf69d1f43aceded79769fffd686729f9db99df1046c88d5c1a6f12d224e34ddf409aa9989acfa87ebbbcd0155 SHA512 480846fd939d00f2ea90c0256081519a6996c7a990d0f66444a7ae1bce2e5ad6380f5d751efc9bde18da9c4d34738ade57dd66288b989dfd074c484562e20e75 DIST ffmpeg-rpi-6.1-r3.patch 800738 BLAKE2B b7e449ee5eec8b50a3b3bba233c5269f3b6845dbd18a619b844c841a97345ce24c7a5d7f4da05b08e3cb49668426b9044f3d3553d9c2ef3a50aec7199bfa3c09 SHA512 aeaf12afabf5f2192fb0b6ef47397d8477b109e49cee8c02a890d1656a27b1985c62c719ef72966d8c97b0709918233b65ea2e0ef988771507e4be137fcd9158 DIST ffmpeg-rpi-6.1-r3.patch.asc 833 BLAKE2B 31fd5823c06d5884f7b0980de9072c35bbf4e1d6c0ed20b089439325d50956127238ca29469b003dba623b888a5aae3c4d8ad177862534e77b8e51f29cbed96c SHA512 3d8943b7151e20f73e9c14b121c501847bd7e01f2cf57ff135fc8c223653ec9d433bfe4012fa564f70c0471980b66d7ec3d9b5b1b14865187187719ba110cb5f -DIST ffmpeg-rpi-7.0.patch 807653 BLAKE2B 2d7d4fb55313c0ea227bf714af08fe17c118969aef972cf85bd8bf33643da08b2a224b2ea7c369a58e62fb758c0e8747c6cc6694672b889016fdb16b3d33f530 SHA512 cf65f68f6b0fa351d273c1b4fd74fca63a40cbd802bcd14124018784164fd1c6a09de3d9b0e0631eaf4c8b4fbcb846cc47a7831ad70eb0cfac6d21a51bd09941 -DIST ffmpeg-rpi-7.0.patch.asc 833 BLAKE2B 3086d77e2cc05b7c295fcaef26a9a0d32775999d1bab9075eeeb0a80804b35928698efe870a432558ece55d7873e016422a00013e7d0cca160b71172c31ab449 SHA512 cc885f01b9547f17c6ef1d26d7d1d053186fdf57aa31c0a411a2ab1c0246cec9c2aeef8687e7f8eb0c998d3379712541c60432bc2521a3db1b45d72d316c2d2b -DIST ffmpeg-rpi-7.1.patch 759127 BLAKE2B 90588440a30ba6cd1cb32e92cccc1ae11a85d518f654a9e8148564b843553af911f33ee0fa938d56fe175c27dab95bdeaa4aa2296ced493e8e7aaab7a5d02e47 SHA512 675a4c8197a59b11e014dd2344b6d7262ea0fbb97c34b1f038d94904759cad8888fd396611e0137b0e196996ab2123db72ddfe17d7fcf8f0c34ca4a22889c172 -DIST ffmpeg-rpi-7.1.patch.asc 833 BLAKE2B a0874b58be460f512f924c07db93ecb198d1399c6c99d7921d5fa3db220b05b2ca7e7d34d5c68eae66fb4d03e03eaf0b5c7e019e2a293364b50395c575a36a94 SHA512 7f62d98c7c64329c353881fd441f5af8745f76c31a39485c44ea50ce9dead74c05465f310974fc2ceb23e9ac2c8b5b97a9be8957c574e478d883c65cb3041840 -EBUILD ffmpeg-4.4.5-r1.ebuild 19956 BLAKE2B b7ca0c144bc5250f4455e55d78954dab2f07adb7fedbc5171d56d26a38c831e841535a5a3e1055220f0b50b327205bf569a7ac40747cd095a5f2f5138c5a5de0 SHA512 6e8807befe505591f79ccafaca9aae56d08b0ab10c151ec0d743727514c9c3c84368c8cf0e56441d9b20379c24d4e01a48f7264b11a1da1e3a4954f18306f196 -EBUILD ffmpeg-6.1.1-r8.ebuild 20456 BLAKE2B 629969f63995246d9309f230447b554d55847361da6a28787b2b442402a9de8699dab6759c9775d1b27c06be67536d4ca1e61949b06c9bc4f36bc7e61f5aada4 SHA512 7c78b6ccfa8e95bff43dc344a08411305a76614c365b95315c26cc3adb8443a76514688c27dabf7403eb2ae63a94377a3743de9b6d8c5c75ed1a13683c15fc4f -EBUILD ffmpeg-6.1.2.ebuild 20422 BLAKE2B e97868eb815439d994a4a80018eaeca23e9e25a18b58cb841710e560ed0467bc54ffeeba7a18257d8f91a6e948f52a382519cd7f7caf34b467d1a8d6c56bde4e SHA512 40dec5943ce7641360d6500df8f5843f863064b75d074b0b2e948449c592f761634c9c2064ec7b6b2854ec07b1e4d003b0c6c11fcee729ec6c3e5ea9a0e4ee81 -EBUILD ffmpeg-7.0.2-r1.ebuild 20397 BLAKE2B a97acf1dc1ad501cd5a80dd23844c75ba473826d358387ff931cf0a29107525349b374087837e71a8a7cce4f91ffe5197191f301715fd19df573d0f550bb03e8 SHA512 34b49696021a942eb52a3a7e6085315b86d9632b016f4e2df6981a9a4c59e85171d8d3f8106efae6c74916f74f8ffec7fd0131952bc9b0b3718cdd4c65a019e1 -EBUILD ffmpeg-7.1.ebuild 20587 BLAKE2B 359f402ab63c8b3c3cc91b8e41238f20eb6f335e40610d5d6391052f71a5b3e40437a0665b9b593dbd6b08f473bb7988909bd29210dd094a8966924d98565df9 SHA512 cc3c593ef6c1058e555bc50fae407187a13344b36c544fdc448d769f787567107df37237ae238808b3cb2496e036fa62055c6dcca97102d86947ba6cb8929d8c -EBUILD ffmpeg-9999.ebuild 20745 BLAKE2B 1087b00c3d7165ae043d08af5c190da0f7f2e8cdcac40c525cf5ee54dbd197b083d998d57f7e358f5eb5004b3e649c8dd62e03d02c707e548216bcb05d8ecf9a SHA512 95c00d9f47f8f7f6e3bd5d35e501460310f58b2ce74098e0333168e7ba851a824d597b7ac65bd081a5b71293d006c3f4b334b3de48719c66cb693cc799bee339 -MISC metadata.xml 8343 BLAKE2B 4fa89eaccf10b2b691d66fc20df7cc09b31b848d0c054040664f6d9b132ba422c3a9cae2b239a95f307b4f15d1a5432e751a72fe1e4239376252bee9b814c59a SHA512 9b085513512c323c524d88837a517ebeb6a9db7212e4353ae1330c1db763761aa8114a47337a2f85a18ad2adae210cb56fb0472b09dfd78fdcac0fecf08ea7b3 +DIST ffmpeg-rpi-7.1.1.patch 847869 BLAKE2B efc3fef1810034b40eee1f637499171529fc6027c4fc0ef66da587c704a7742b454903aa060b21305e1d9a714eb31d96cd93f93d7cadb5815a0de22ac040b9e1 SHA512 a3f9013aec9b17e0fc1689d946e57e251a88eac3f9e7856d46fe9614fea29211feaf106d32a31f97c0e8c83c1685ca454c31f9bcb5dafb669a0933d683e581c8 +DIST ffmpeg-rpi-7.1.1.patch.asc 833 BLAKE2B a30e8d0216325ac86a3b7f8ac132a61a1d3eb97eff5e758cdad5af89e74ecfb577bda6438b263651d772b265a38f8ac6bf5056598f6f707411236245f939045a SHA512 a75547b38ab1445b94fea2d38f60c93092a70ecd45ec6ec0830084280d684c631a49ccbf46327ac4052ade3e7934b257f8d2c3aa107950ec9da0e66873f3e5be +EBUILD ffmpeg-4.4.5-r2.ebuild 15002 BLAKE2B 903682168147ac3cf4f0b72d38f305169864e75ec794d8c9a2990486c91779ea44d623623c50591a09ff10c31ee9235f59074167849219cf46e18f4a1969e350 SHA512 bf159fb253a301335010fb74776610a3df160d3c94cb519f173370c7d010464f706c82490a956238a081911d4295ae5435b749b9ad375062a1135edc10e55448 +EBUILD ffmpeg-6.1.2-r1.ebuild 17131 BLAKE2B 4b655a95c8d9131cdc0e4158ba288ae73df98d8c008192588f8cae25a2893d95134271e509793973d382516275525567f0e67a5eb016fa91da82c263a9d63202 SHA512 761207fa46faaa4ca3d869158aaa80b38a27837986dd13a69041fafe7aa9995123938b39a6ceb5c0b69f5cbb9a20a71f4a3a04b8f6fbfb17a9338ec59c6697b1 +EBUILD ffmpeg-7.1.1.ebuild 17575 BLAKE2B 97548c9f846ec2b694c90a5e7f2fc366d58b900d03568e54effc26b45847f241055034b8ddab70e9cf37496b48718bdae9f4b6fcb49dfa5361847a33060ca35d SHA512 b82516c603d56cbe58543cb5f8d45ed8758ee7ffd2e905818b44ff6a8e72d8628924efb9fd020e9c981db0762710430a3ebec9f43d53663e173e25523988852b +EBUILD ffmpeg-9999.ebuild 17537 BLAKE2B 3368a80182e6adb43c2baaed3a818dc308709e2f79cb2701e1a24bf75e39dda38c6d7eac4e18de30e78fea43a3e73ff59e9f3993a032a0fba8e923a42ca374d2 SHA512 bec97a8a64cb3b8ce91eba01313509c1ff51377b6dcab04a3491ed20974f7505e12f087bce02be571fba7831e07a1c715307fc6d0c70680cbec74b013ab6e161 +MISC metadata.xml 8057 BLAKE2B 1acd5f3b8df2c2ef798e3f3cde26e093ed94c09be4edeaa81cba5d99c5d2295090912006f9570eff94b9025f09aeb02c49462e0e4087b58adc8dde4bd7936e62 SHA512 985d262f99959827daed0317719fe16ad7df9db9eec0bd385a6b6d5f6ea3027fd68bc8346c5f3be74ba382d9f53ae0ff2ad4ca371c4d38dcc1f885436e0b88ca diff --git a/media-video/ffmpeg/ffmpeg-4.4.5-r1.ebuild b/media-video/ffmpeg/ffmpeg-4.4.5-r1.ebuild deleted file mode 100644 index bc08f88f2901..000000000000 --- a/media-video/ffmpeg/ffmpeg-4.4.5-r1.ebuild +++ /dev/null @@ -1,609 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Subslot: libavutil major.libavcodec major.libavformat major -# Since FFmpeg ships several libraries, subslot is kind of limited here. -# Most consumers will use those three libraries, if a "less used" library -# changes its soname, consumers will have to be rebuilt the old way -# (preserve-libs). -# If, for example, a package does not link to libavformat and only libavformat -# changes its ABI then this package will be rebuilt needlessly. Hence, such a -# package is free _not_ to := depend on FFmpeg but I would strongly encourage -# doing so since such a case is unlikely. -FFMPEG_SUBSLOT=56.58.58 - -SCM="" -if [ "${PV#9999}" != "${PV}" ] ; then - SCM="git-r3" - EGIT_MIN_CLONE_TYPE="single" - EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git" -fi - -inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM} - -DESCRIPTION="Complete solution to record/convert/stream audio and video. Includes libavcodec" -HOMEPAGE="https://ffmpeg.org/" -if [ "${PV#9999}" != "${PV}" ] ; then - SRC_URI="" -elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot - SRC_URI="mirror://gentoo/${P}.tar.xz" -else # Release - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/ffmpeg.asc - inherit verify-sig - SRC_URI="https://ffmpeg.org/releases/${P/_/-}.tar.xz" - SRC_URI+=" verify-sig? ( https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc )" - - BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )" -fi -FFMPEG_REVISION="${PV#*_p}" - -SLOT="0/${FFMPEG_SUBSLOT}" -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) - amr? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - gmp? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - libaribb24? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - encode? ( - amrenc? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - ) - samba? ( GPL-3 ) -" -if [ "${PV#9999}" = "${PV}" ] ; then - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~x64-macos" -fi - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt +gnutls gmp - +gpl hardcoded-tables +iconv libxml2 lzma +network opencl - openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau vulkan - X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib - # libavdevice options - cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal - opengl - # indevs - libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack - # decoders - amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac - jpeg2k:libopenjpeg bluray:libbluray gme:libgme gsm:libgsm - libaribb24 mmal modplug:libmodplug opus:libopus qsv:libmfx libilbc librtmp ssh:libssh - speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec - vorbis:libvorbis vpx:libvpx zvbi:libzvbi - # libavfilter options - appkit - bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite frei0r fribidi:libfribidi - fontconfig glslang:libglslang ladspa libass libtesseract lv2 truetype:libfreetype - vidstab:libvidstab vmaf:libvmaf rubberband:librubberband zeromq:libzmq zimg:libzimg - # libswresample options - libsoxr - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -# Same as above but for encoders, i.e. they do something only with USE=encode. -FFMPEG_ENCODER_FLAG_MAP=( - amf amrenc:libvo-amrwbenc kvazaar:libkvazaar libaom mp3:libmp3lame - openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1 - theora:libtheora twolame:libtwolame webp:libwebp x264:libx264 - x265:libx265 xvid:libxvid -) - -IUSE=" - alsa chromium doc +encode oss +pic sndio static-libs test v4l - ${FFMPEG_FLAG_MAP[@]%:*} - ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu ) -PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 ) -PPC_CPU_REQUIRED_USE=" - cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec ) - cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${MIPS_CPU_FEATURES[@]} - ${PPC_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${PPC_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt - graph2dot ismindex pktdumper qt-faststart sidxindex trasher ) -IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}" - -RDEPEND=" - alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) - amf? ( media-video/amdgpu-pro-amf ) - amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] ) - bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] ) - bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] ) - bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) - cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] ) - chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] ) - codec2? ( media-libs/codec2[${MULTILIB_USEDEP}] ) - dav1d? ( >=media-libs/dav1d-0.4.0:0=[${MULTILIB_USEDEP}] ) - encode? ( - amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] ) - kvazaar? ( >=media-libs/kvazaar-1.2.0[${MULTILIB_USEDEP}] ) - mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] ) - openh264? ( >=media-libs/openh264-1.4.0-r1:=[${MULTILIB_USEDEP}] ) - rav1e? ( >=media-video/rav1e-0.4:=[capi] ) - snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] ) - theora? ( - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] - ) - twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] ) - webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] ) - x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] ) - x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] ) - xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] ) - ) - fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] ) - flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] ) - fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] ) - frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) - fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] ) - gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] ) - glslang? ( dev-util/glslang:=[${MULTILIB_USEDEP}] ) - gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] ) - gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] ) - gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] ) - iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] ) - iec61883? ( - >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}] - ) - ieee1394? ( - >=media-libs/libdc1394-2.2.1:2=[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] - ) - jack? ( virtual/jack[${MULTILIB_USEDEP}] ) - jpeg2k? ( >=media-libs/openjpeg-2:2[${MULTILIB_USEDEP}] ) - libaom? ( >=media-libs/libaom-1.0.0-r1:=[${MULTILIB_USEDEP}] ) - libaribb24? ( >=media-libs/aribb24-1.0.3-r2[${MULTILIB_USEDEP}] ) - libass? ( >=media-libs/libass-0.10.2:=[${MULTILIB_USEDEP}] ) - libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] ) - libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) - libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] ) - librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] ) - libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] ) - libtesseract? ( >=app-text/tesseract-4.1.0-r1[${MULTILIB_USEDEP}] ) - libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) - libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] ) - lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) - mmal? ( media-libs/raspberrypi-userland ) - modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) - openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] ) - opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] ) - pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] ) - qsv? ( media-libs/intel-mediasdk[${MULTILIB_USEDEP}] ) - rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] ) - samba? ( >=net-fs/samba-3.6.23-r1[client,${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] ) - sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) - speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] ) - srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] ) - ssh? ( >=net-libs/libssh-0.5.5:=[sftp,${MULTILIB_USEDEP}] ) - svg? ( - gnome-base/librsvg:2=[${MULTILIB_USEDEP}] - x11-libs/cairo[${MULTILIB_USEDEP}] - ) - nvenc? ( <media-libs/nv-codec-headers-12 ) - svt-av1? ( >=media-libs/svt-av1-0.8.4[${MULTILIB_USEDEP}] ) - truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] ) - vaapi? ( >=media-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] ) - vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] ) - vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] ) - vmaf? ( media-libs/libvmaf:=[${MULTILIB_USEDEP}] ) - vorbis? ( - >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - ) - vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] ) - vulkan? ( >=media-libs/vulkan-loader-1.1.97:=[${MULTILIB_USEDEP}] ) - X? ( - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] - >=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}] - ) - zeromq? ( >=net-libs/zeromq-4.1.6 ) - zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] ) - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) - zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] ) -" - -RDEPEND="${RDEPEND} - openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) - !openssl? ( gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) ) -" - -DEPEND="${RDEPEND} - amf? ( media-libs/amf-headers ) - ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] ) - v4l? ( sys-kernel/linux-headers ) -" - -# += for verify-sig above -BDEPEND+=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) - cuda? ( >=llvm-core/clang-7[llvm_targets_NVPTX] ) - doc? ( sys-apps/texinfo ) - test? ( net-misc/wget app-alternatives/bc ) -" - -# Code requiring FFmpeg to be built under gpl license -GPL_REQUIRED_USE=" - postproc? ( gpl ) - frei0r? ( gpl ) - cdio? ( gpl ) - rubberband? ( gpl ) - vidstab? ( gpl ) - samba? ( gpl ) - encode? ( - x264? ( gpl ) - x265? ( gpl ) - xvid? ( gpl ) - ) -" -REQUIRED_USE=" - cuda? ( nvenc ) - fftools_cws2fws? ( zlib ) - glslang? ( vulkan ) - libv4l? ( v4l ) - test? ( encode ) - ${GPL_REQUIRED_USE} - ${CPU_REQUIRED_USE}" -RESTRICT=" - !test? ( test ) - gpl? ( openssl? ( bindist ) fdk? ( bindist ) ) -" - -S=${WORKDIR}/${P/_/-} - -PATCHES=( - "${FILESDIR}"/chromium-r1.patch - "${FILESDIR}"/${PN}-5.0-backport-ranlib-build-fix.patch - "${FILESDIR}"/${PN}-4.4.3-get_cabac_inline_x86-32-bit.patch - "${FILESDIR}"/${PN}-4.4.4-wint-conversion-vulkan.patch - "${FILESDIR}"/${PN}-4.4.4-opencl-parallel-gmake-fix.patch - "${FILESDIR}"/${PN}-4.4.4-glslang.patch - "${FILESDIR}"/${PN}-4.4.4-amd-av1-vaapi.patch - "${FILESDIR}"/${PN}-4.4.5-incmptbl-pntr-types.patch - "${FILESDIR}"/${PN}-4.4.5-wint-inconversion-libgcrypt.patch - "${FILESDIR}"/${PN}-4.4.5-binutils-2.43-arm.patch -) - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/libavutil/avconfig.h -) - -build_separate_libffmpeg() { - use opencl -} - -pkg_setup() { - # ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg. - # May cause breakage while updating, #862996, #625210, #833821. - if has_version media-libs/chromaprint[tools] && use chromaprint; then - ewarn "You have media-libs/chromaprint installed with 'tools' USE flag, which " - ewarn "links to ffmpeg, and you have enabled 'chromaprint' USE flag for ffmpeg, " - ewarn "which links to chromaprint. This may cause issues while rebuilding ffmpeg." - ewarn "" - ewarn "If your build fails to 'ERROR: chromaprint not found', rebuild chromaprint " - ewarn "without the 'tools' use flag first, then rebuild ffmpeg, and then finally enable " - ewarn "'tools' USE flag for chromaprint. See #862996." - fi -} - -src_unpack() { - if use verify-sig ; then - # Needed for downloaded patch (which is unsigned, which is fine) - verify-sig_verify_detached "${DISTDIR}"/${P/_/-}.tar.xz{,.asc} - fi - - default -} - -src_prepare() { - if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot - export revision=git-N-${FFMPEG_REVISION} - fi - - eapply "${FILESDIR}/vmaf-models-default-path.patch" - - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die -} - -multilib_src_configure() { - local myconf=( ) - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - use openssl && myconf+=( --enable-nonfree ) - use samba && myconf+=( --enable-version3 ) - - # Encoders - if use encode ; then - ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) - - # Licensing. - if use amrenc ; then - myconf+=( --enable-version3 ) - fi - else - myconf+=( --disable-encoders ) - fi - - # Indevs - use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) - for i in alsa oss jack sndio ; do - use ${i} || myconf+=( --disable-indev=${i} ) - done - - # Outdevs - for i in alsa oss sndio ; do - use ${i} || myconf+=( --disable-outdev=${i} ) - done - - # Decoders - use amr && myconf+=( --enable-version3 ) - use gmp && myconf+=( --enable-version3 ) - use libaribb24 && myconf+=( --enable-version3 ) - use fdk && use gpl && myconf+=( --enable-nonfree ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - if use openssl ; then - myconf+=( --disable-gnutls ) - fi - - # (temporarily) disable non-multilib deps - if ! multilib_is_native_abi; then - for i in librav1e libzmq ; do - myconf+=( --disable-${i} ) - done - fi - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - if use pic ; then - myconf+=( --enable-pic ) - # disable asm code if PIC is required - # as the provided asm decidedly is not PIC for x86. - [[ ${ABI} == x86 ]] && myconf+=( --disable-asm ) - fi - [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004 - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - [[ ${ABI} != x86 ]] && tc-is-lto && myconf+=( "--enable-lto" ) - filter-lto - - # Mandatory configuration - myconf=( - --enable-avfilter - --enable-avresample - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # doc - myconf+=( - $(multilib_native_use_enable doc) - $(multilib_native_use_enable doc htmlpages) - $(multilib_native_enable manpages) - ) - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ - --mandir="${EPREFIX}/usr/share/man" \ - --enable-shared \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - $(use_enable static-libs static) \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - echo "${@}" - "${@}" || die - - if multilib_is_native_abi && use chromium && build_separate_libffmpeg; then - einfo "Configuring for Chromium" - mkdir -p ../chromium || die - pushd ../chromium >/dev/null || die - set -- "${@}" \ - --disable-shared \ - --enable-static \ - --enable-pic \ - --disable-opencl - echo "${@}" - "${@}" || die - popd >/dev/null || die - fi -} - -multilib_src_compile() { - emake V=1 - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - emake V=1 tools/${i}$(get_exeext) - fi - done - - if use chromium; then - if build_separate_libffmpeg; then - einfo "Compiling for Chromium" - pushd ../chromium >/dev/null || die - emake V=1 libffmpeg - popd >/dev/null || die - else - emake V=1 libffmpeg - fi - fi - fi -} - -multilib_src_test() { - LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil:${BUILD_DIR}/libavresample" \ - emake V=1 fate -k -} - -multilib_src_install() { - emake V=1 DESTDIR="${D}" install install-doc - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - dobin tools/${i}$(get_exeext) - fi - done - - if use chromium; then - if build_separate_libffmpeg; then - einfo "Installing for Chromium" - pushd ../chromium >/dev/null || die - emake V=1 DESTDIR="${D}" install-libffmpeg - popd >/dev/null || die - else - emake V=1 DESTDIR="${D}" install-libffmpeg - - # When not built separately, libffmpeg has no code of - # its own so this QA check raises a false positive. - QA_FLAGS_IGNORED+=" usr/$(get_libdir)/chromium/.*" - fi - fi - fi -} - -multilib_src_install_all() { - dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges - [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" -} diff --git a/media-video/ffmpeg/ffmpeg-4.4.5-r2.ebuild b/media-video/ffmpeg/ffmpeg-4.4.5-r2.ebuild new file mode 100644 index 000000000000..a61c33e1d509 --- /dev/null +++ b/media-video/ffmpeg/ffmpeg-4.4.5-r2.ebuild @@ -0,0 +1,501 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-minimal toolchain-funcs + +FFMPEG_SUBSLOT=56.58.58 # avutil.avcodec.avformat SONAME + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI=( + https://git.ffmpeg.org/ffmpeg.git + https://github.com/FFmpeg/FFmpeg.git + ) +else + inherit verify-sig + SRC_URI=" + https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz + verify-sig? ( https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz.asc ) + https://dev.gentoo.org/~ionen/distfiles/ffmpeg-$(ver_cut 1-2)-patchset-1.tar.xz + " + S=${WORKDIR}/ffmpeg-${PV} # avoid ${P} for ffmpeg-compat + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" +fi + +DESCRIPTION="Complete solution to record/convert/stream audio and video" +HOMEPAGE="https://ffmpeg.org/" + +[[ ${PN} == *-compat ]] && FFMPEG_UNSLOTTED= || FFMPEG_UNSLOTTED=1 + +FFMPEG_IUSE_MAP=( + # [+]flag[:[^][!]opt1,...][@<v3|nonfree>]], ^ = native-only, ! = override + # remember to keep LICENSE, REQUIRED_USE, and RESTRICT in sync + X:libxcb,libxcb-shape,libxcb-shm,libxcb-xfixes,xlib + alsa + amrenc:libvo-amrwbenc@v3 + amr:libopencore-amrnb,libopencore-amrwb@v3 + appkit + bluray:libbluray + bs2b:libbs2b + bzip2:bzlib + cdio:libcdio + chromaprint + codec2:libcodec2 + cuda:cuda-llvm + +dav1d:libdav1d + ${FFMPEG_UNSLOTTED:+doc:^htmlpages} + +drm:libdrm + fdk:libfdk-aac@nonfree + flite:libflite + +fontconfig:libfontconfig + frei0r + fribidi:libfribidi + gcrypt + gme:libgme + gmp:@v3 + +gnutls # unused if USE=openssl, default for bug #905113,#917627 + +gpl + gsm:libgsm + iec61883:libiec61883 + ieee1394:libdc1394 + jack:libjack + jpeg2k:libopenjpeg + kvazaar:libkvazaar + ladspa + lame:libmp3lame + libaom + libaribb24:@v3 # reminder: req use on gpl unneeded if >=1.0.4 (not in tree) + +libass + libcaca + libilbc + librtmp:librtmp + libsoxr + libtesseract + lv2 + lzma + modplug:libmodplug + nvenc:cuvid,ffnvcodec,nvdec,nvenc + openal + opencl + opengl + openh264:libopenh264 + openmpt:libopenmpt + openssl:openssl,!gnutls@v3ifgpl # still LGPL2.1+ if USE=-gpl + opus:libopus + +postproc # exposed as a USE for clarity with the GPL requirement + pulseaudio:libpulse + rabbitmq:^librabbitmq # no multilib + rav1e:^librav1e # no multilib + rubberband:librubberband + samba:libsmbclient@v3 # GPL-3+ only + sdl:sdl2 + snappy:libsnappy + sndio + speex:libspeex + srt:libsrt + ssh:libssh + svg:librsvg + svt-av1:libsvtav1 + theora:libtheora + +truetype:libfreetype + twolame:libtwolame + v4l:libv4l2 + vaapi + vdpau + vidstab:libvidstab + vorbis:libvorbis + vpx:libvpx + vulkan + webp:libwebp + x264:libx264 + x265:libx265 + +xml:libxml2 + xvid:libxvid + zeromq:^libzmq # no multilib + zimg:libzimg + +zlib + zvbi:libzvbi +) + +# all-rights is used to express the GPL incompatibility (RESTRICT=bindist) +LICENSE=" + gpl? ( + GPL-2+ + amr? ( GPL-3+ ) amrenc? ( GPL-3+ ) libaribb24? ( GPL-3+ ) + gmp? ( GPL-3+ ) openssl? ( GPL-3+ ) + fdk? ( all-rights-reserved ) + ) + !gpl? ( + LGPL-2.1+ + amr? ( LGPL-3+ ) amrenc? ( LGPL-3+ ) libaribb24? ( LGPL-3+ ) + gmp? ( LGPL-3+ ) + ) + samba? ( GPL-3+ ) +" +[[ ${FFMPEG_UNSLOTTED} ]] && : 0 || : "$(ver_cut 1)" +SLOT="${_}/${FFMPEG_SUBSLOT}" +IUSE="${FFMPEG_IUSE_MAP[*]%:*}" +REQUIRED_USE=" + fribidi? ( truetype ) + gmp? ( !librtmp ) + libaribb24? ( gpl ) cdio? ( gpl ) frei0r? ( gpl ) postproc? ( gpl ) + rubberband? ( gpl ) samba? ( gpl ) vidstab? ( gpl ) x264? ( gpl ) + x265? ( gpl ) xvid? ( gpl ) +" +RESTRICT="gpl? ( fdk? ( bindist ) )" + +# dlopen: vulkan-loader +RDEPEND=" + virtual/libiconv[${MULTILIB_USEDEP}] + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXv[${MULTILIB_USEDEP}] + x11-libs/libxcb:=[${MULTILIB_USEDEP}] + ) + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) + amr? ( media-libs/opencore-amr[${MULTILIB_USEDEP}] ) + amrenc? ( media-libs/vo-amrwbenc[${MULTILIB_USEDEP}] ) + bluray? ( media-libs/libbluray:=[${MULTILIB_USEDEP}] ) + bs2b? ( media-libs/libbs2b[${MULTILIB_USEDEP}] ) + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) + cdio? ( dev-libs/libcdio-paranoia:=[${MULTILIB_USEDEP}] ) + chromaprint? ( media-libs/chromaprint:=[${MULTILIB_USEDEP}] ) + codec2? ( media-libs/codec2:=[${MULTILIB_USEDEP}] ) + dav1d? ( media-libs/dav1d:=[${MULTILIB_USEDEP}] ) + drm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) + fdk? ( media-libs/fdk-aac:=[${MULTILIB_USEDEP}] ) + flite? ( app-accessibility/flite[${MULTILIB_USEDEP}] ) + fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) + frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) + fribidi? ( dev-libs/fribidi[${MULTILIB_USEDEP}] ) + gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] ) + gme? ( media-libs/game-music-emu[${MULTILIB_USEDEP}] ) + gmp? ( dev-libs/gmp:=[${MULTILIB_USEDEP}] ) + gnutls? ( !openssl? ( + net-libs/gnutls:=[${MULTILIB_USEDEP}] + ) ) + gsm? ( media-sound/gsm[${MULTILIB_USEDEP}] ) + iec61883? ( + media-libs/libiec61883[${MULTILIB_USEDEP}] + sys-libs/libavc1394[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] + ) + ieee1394? ( + media-libs/libdc1394:2=[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] + ) + jack? ( virtual/jack[${MULTILIB_USEDEP}] ) + jpeg2k? ( media-libs/openjpeg:2=[${MULTILIB_USEDEP}] ) + kvazaar? ( media-libs/kvazaar:=[${MULTILIB_USEDEP}] ) + lame? ( media-sound/lame[${MULTILIB_USEDEP}] ) + libaom? ( media-libs/libaom:=[${MULTILIB_USEDEP}] ) + libaribb24? ( media-libs/aribb24[${MULTILIB_USEDEP}] ) + libass? ( media-libs/libass:=[${MULTILIB_USEDEP}] ) + libcaca? ( media-libs/libcaca[${MULTILIB_USEDEP}] ) + libilbc? ( media-libs/libilbc:=[${MULTILIB_USEDEP}] ) + librtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] ) + libsoxr? ( media-libs/soxr[${MULTILIB_USEDEP}] ) + libtesseract? ( app-text/tesseract:=[${MULTILIB_USEDEP}] ) + lv2? ( + media-libs/lilv[${MULTILIB_USEDEP}] + media-libs/lv2[${MULTILIB_USEDEP}] + ) + lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] ) + modplug? ( media-libs/libmodplug[${MULTILIB_USEDEP}] ) + openal? ( media-libs/openal[${MULTILIB_USEDEP}] ) + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) + opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) + openh264? ( media-libs/openh264:=[${MULTILIB_USEDEP}] ) + openmpt? ( media-libs/libopenmpt[${MULTILIB_USEDEP}] ) + openssl? ( >=dev-libs/openssl-3:=[${MULTILIB_USEDEP}] ) + opus? ( media-libs/opus[${MULTILIB_USEDEP}] ) + pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) + rabbitmq? ( net-libs/rabbitmq-c:= ) + rav1e? ( >=media-video/rav1e-0.4:=[capi] ) + rubberband? ( media-libs/rubberband:=[${MULTILIB_USEDEP}] ) + samba? ( net-fs/samba:=[client,${MULTILIB_USEDEP}] ) + sdl? ( media-libs/libsdl2[sound(+),video(+),${MULTILIB_USEDEP}] ) + snappy? ( app-arch/snappy:=[${MULTILIB_USEDEP}] ) + sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) + speex? ( media-libs/speex[${MULTILIB_USEDEP}] ) + srt? ( net-libs/srt:=[${MULTILIB_USEDEP}] ) + ssh? ( net-libs/libssh:=[sftp,${MULTILIB_USEDEP}] ) + svg? ( + dev-libs/glib:2[${MULTILIB_USEDEP}] + >=gnome-base/librsvg-2.52:2[${MULTILIB_USEDEP}] + x11-libs/cairo[${MULTILIB_USEDEP}] + ) + svt-av1? ( >=media-libs/svt-av1-0.8.4:=[${MULTILIB_USEDEP}] ) + theora? ( media-libs/libtheora[encode,${MULTILIB_USEDEP}] ) + truetype? ( media-libs/freetype:2[${MULTILIB_USEDEP}] ) + twolame? ( media-sound/twolame[${MULTILIB_USEDEP}] ) + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) + vaapi? ( media-libs/libva:=[X?,${MULTILIB_USEDEP}] ) + vdpau? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libvdpau[${MULTILIB_USEDEP}] + ) + vidstab? ( media-libs/vidstab[${MULTILIB_USEDEP}] ) + vorbis? ( media-libs/libvorbis[${MULTILIB_USEDEP}] ) + vpx? ( media-libs/libvpx:=[${MULTILIB_USEDEP}] ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) + webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] ) + x264? ( media-libs/x264:=[${MULTILIB_USEDEP}] ) + x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] ) + xml? ( dev-libs/libxml2[${MULTILIB_USEDEP}] ) + xvid? ( media-libs/xvid[${MULTILIB_USEDEP}] ) + zeromq? ( net-libs/zeromq:= ) + zimg? ( media-libs/zimg[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zvbi? ( media-libs/zvbi[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + X? ( x11-base/xorg-proto ) + kernel_linux? ( >=sys-kernel/linux-headers-6 ) + ladspa? ( media-libs/ladspa-sdk ) + nvenc? ( media-libs/nv-codec-headers ) + opencl? ( dev-util/opencl-headers ) + vulkan? ( dev-util/vulkan-headers ) +" +BDEPEND=" + app-alternatives/awk + virtual/pkgconfig + amd64? ( + || ( + dev-lang/nasm + dev-lang/yasm + ) + ) + cuda? ( llvm-core/clang:*[llvm_targets_NVPTX] ) + ${FFMPEG_UNSLOTTED:+" + dev-lang/perl + doc? ( sys-apps/texinfo ) + "} +" +[[ ${PV} != 9999 ]] && + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )" + +DOCS=( CREDITS Changelog README.md doc/APIchanges ) +[[ ${PV} != 9999 ]] && DOCS+=( RELEASE_NOTES ) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/libavutil/avconfig.h +) + +PATCHES=( + "${WORKDIR}"/patches +) + +pkg_pretend() { + # TODO: drop this after a few months + if has_version "${CATEGORY}/${PN}[mp3]" && use !lame; then #952971 + ewarn "${PN}'s 'mp3' USE was renamed to 'lame', please enable it" + ewarn "if wish to keep the ability to encode using media-sound/lame." + ewarn "This is *not* needed if only want mp3 playback." + fi +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] || return + + if use chromaprint && has_version 'media-libs/chromaprint[tools]'; then + ewarn "media-libs/chromaprint is installed with USE=tools which links to" + ewarn "ffmpeg, and USE=chromaprint is enabled on ffmpeg which links to" + ewarn "chromaprint (circular). This may cause issues when updating ffmpeg." + ewarn + ewarn "If get a build failure with 'ERROR: chromaprint not found' or so," + ewarn "first rebuild chromaprint with USE=-tools, then rebuild ffmpeg, and" + ewarn "then finally rebuild chromaprint with USE=tools again (bug #862996)." + fi + + [[ ${EXTRA_FFMPEG_CONF} ]] && # drop this eventually + die "EXTRA_FFMPEG_CONF is set in the environment, please use EXTRA_ECONF instead" +} + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/ffmpeg-${PV}.tar.xz{,.asc} \ + "${BROOT}"/usr/share/openpgp-keys/ffmpeg.asc + fi + default + fi +} + +src_prepare() { + default + + # respect user preferences + sed -i '/cflags -fdiagnostics-color/d' configure || die + + # handle *FLAGS here to avoid repeating for each ABI below (bug #923491) + filter-lto + use elibc_musl && append-cppflags -D__musl__ #940733 +} + +multilib_src_configure() { + local conf=( "${S}"/configure ) # not autotools-based + + local prefix=${EPREFIX}/usr + if [[ ! ${FFMPEG_UNSLOTTED} ]]; then + prefix+=/lib/ffmpeg${SLOT%/*} + # could get SONAME clashes, so prefer rpath over LDPATH + conf+=( + --enable-rpath + --disable-doc + ) + fi + + conf+=( + --prefix="${prefix}" + --libdir="${prefix}"/$(get_libdir) + --shlibdir="${prefix}"/$(get_libdir) + --mandir="${prefix}"/share/man + --docdir="${EPREFIX}"/usr/share/doc/${PF}/html + + --ar="$(tc-getAR)" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --nm="$(tc-getNM)" + --pkg-config="$(tc-getPKG_CONFIG)" + --ranlib="$(tc-getRANLIB)" + --disable-stripping + + # overrides users' -g/-O, let *FLAGS handle these + --disable-debug + --disable-optimizations + --optflags=' ' + + # not worth supporting on this version, use ffmpeg-6+ + --disable-lto + + # basic defaults that should not really need a USE + --enable-iconv + --enable-pic + --enable-shared + --disable-static + $(multilib_native_enable manpages) # needs pod2man + --disable-podpages + --disable-txtpages + + # disabled primarily due to being unpackaged + --disable-decklink + --disable-libdavs2 + --disable-libklvanc + --disable-libmysofa + --disable-libopenvino + --disable-libshine + --disable-libtls + --disable-libuavs3d + --disable-libxavs + --disable-libxavs2 + --disable-pocketsphinx + --disable-rkmpp + --disable-vapoursynth + + # disabled for other or additional reasons + --disable-amf # may or may not be broken, use ffmpeg-6+ (bug #910271) + --disable-cuda-nvcc # prefer cuda-llvm for less issues + --disable-libcelt # obsolete (bug #664158) + --disable-libglslang # use ffmpeg-6+ with USE=shaderc instead + --disable-liblensfun # https://trac.ffmpeg.org/ticket/9112 (abandoned?) + --disable-libmfx # use ffmpeg-6+ with USE=qsv instead + --disable-libnpp # use ffmpeg-6+, ebuild support was only added there + --disable-libopencv # leaving for later due to circular opencv[ffmpeg] + --disable-librist # librist itself needs attention first (bug #822012) + --disable-libtensorflow # causes headaches, and is gone + --disable-libvmaf # use ffmpeg-6+ instead, needs old vmaf library + --disable-mbedtls # messy with slots, tests underlinking issues + --disable-mmal # unsupported + --disable-omx # unsupported (bug #653386) + --disable-omx-rpi # ^ + + # to avoid obscure issues like bug #915384 and simplify the ebuild, + # not passing the following (use EXTRA_ECONF if really must): + # --cpu: adds -march=<exact> after the user's more adapted + # =native, its logic also does not account for -mno-* + # --disable/enable-<cpufeature>: safer to detect at runtime + ) + + # broken on x32 (bug #427004), and not PIC safe on x86 (bug #916067) + [[ ${ABI} == @(x32|x86) ]] && conf+=( --disable-asm ) + + # disable due to asm-related failures on ppc (bug #951464, ppc64be) + # https://trac.ffmpeg.org/ticket/9604 (ppc64el) + # https://trac.ffmpeg.org/ticket/10955 (ppc64el) + # (review re-enabling if resolved, or if debian allows it again) + use ppc || use ppc64 && conf+=( --disable-asm ) + + if tc-is-cross-compiler; then + conf+=( + --enable-cross-compile + --arch="$(tc-arch-kernel)" + --cross-prefix="${CHOST}-" + --host-cc="$(tc-getBUILD_CC)" + ) + case ${CHOST} in + *mingw32*) conf+=( --target-os=mingw32 );; + *linux*) conf+=( --target-os=linux );; + esac + fi + + # import options from FFMPEG_IUSE_MAP + local flag license mod v + local -A optmap=() licensemap=() + for v in "${FFMPEG_IUSE_MAP[@]}"; do + [[ ${v} =~ \+?([^:]+):?([^@]*)@?(.*) ]] || die "${v}" + flag=${BASH_REMATCH[1]} + license=${BASH_REMATCH[3]} + v=${BASH_REMATCH[2]:-${flag}} + for v in ${v//,/ }; do + mod=${v::1} + v=${v#[\!\^]} + if [[ ${mod} == '!' ]]; then + if use ${flag}; then + optmap[${v}]=--disable-${v} + unset licensemap[${v}] + fi + elif [[ ! -v optmap[${v}] ]]; then + if [[ ${mod} == '^' ]]; then + optmap[${v}]=$(multilib_native_use_enable ${flag} ${v}) + else + optmap[${v}]=$(use_enable ${flag} ${v}) + fi + use ${flag} && licensemap[${v}]=${license} + fi + done + done + for license in "${licensemap[@]}"; do + case ${license} in + v3ifgpl) use gpl || continue ;& + v3) optmap[v3]=--enable-version3 ;; + nonfree) use gpl && optmap[nonfree]=--enable-nonfree ;; + esac + done + conf+=( + "${optmap[@]}" + ${EXTRA_ECONF} + ) + + einfo "${conf[*]}" + "${conf[@]}" || die "configure failed, see ${BUILD_DIR}/ffbuild/config.log" +} + +multilib_src_compile() { + emake V=1 +} + +multilib_src_test() { + local -x LD_LIBRARY_PATH=$(printf %s: "${BUILD_DIR}"/lib*)${LD_LIBRARY_PATH} + emake V=1 -k fate +} + +multilib_src_install() { + emake V=1 DESTDIR="${D}" install +} diff --git a/media-video/ffmpeg/ffmpeg-6.1.1-r8.ebuild b/media-video/ffmpeg/ffmpeg-6.1.1-r8.ebuild deleted file mode 100644 index 5cfea3a43329..000000000000 --- a/media-video/ffmpeg/ffmpeg-6.1.1-r8.ebuild +++ /dev/null @@ -1,615 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Subslot: libavutil major.libavcodec major.libavformat major -# Since FFmpeg ships several libraries, subslot is kind of limited here. -# Most consumers will use those three libraries, if a "less used" library -# changes its soname, consumers will have to be rebuilt the old way -# (preserve-libs). -# If, for example, a package does not link to libavformat and only libavformat -# changes its ABI then this package will be rebuilt needlessly. Hence, such a -# package is free _not_ to := depend on FFmpeg but I would strongly encourage -# doing so since such a case is unlikely. -FFMPEG_SUBSLOT=58.60.60 - -SOC_PATCH="ffmpeg-rpi-6.1-r3.patch" - -SCM="" -if [ "${PV#9999}" != "${PV}" ] ; then - SCM="git-r3" - EGIT_MIN_CLONE_TYPE="single" - EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git" -fi - -inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM} - -DESCRIPTION="Complete solution to record/convert/stream audio and video. Includes libavcodec" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH} )" -if [ "${PV#9999}" != "${PV}" ] ; then - : -elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot - SRC_URI+=" mirror://gentoo/${P}.tar.xz" -else # Release - inherit verify-sig - - SRC_URI+=" - https://ffmpeg.org/releases/${P/_/-}.tar.xz - verify-sig? ( - https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc - soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH}.asc ) - ) - " - - BDEPEND=" - verify-sig? ( - sec-keys/openpgp-keys-ffmpeg - soc? ( sec-keys/openpgp-keys-gentoo-developers ) - ) - " - - src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${P/_/-}.tar.xz{,.asc} /usr/share/openpgp-keys/ffmpeg.asc - use soc && verify-sig_verify_detached "${DISTDIR}"/${SOC_PATCH}{,.asc} /usr/share/openpgp-keys/gentoo-developers.asc - fi - default - } -fi -FFMPEG_REVISION="${PV#*_p}" - -SLOT="0/${FFMPEG_SUBSLOT}" -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) - amr? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - gmp? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - libaribb24? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - encode? ( - amrenc? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - ) - samba? ( GPL-3 ) -" -if [ "${PV#9999}" = "${PV}" ] ; then - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" -fi - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt +gnutls gmp - +gpl hardcoded-tables +iconv libxml2 lzma +network opencl - openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau vulkan - X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib - # libavdevice options - cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal - opengl - # indevs - libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack - # decoders - amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac - jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm - libaribb24 modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh - speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec - vorbis:libvorbis vpx:libvpx zvbi:libzvbi - # libavfilter options - appkit - bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite fontconfig frei0r - fribidi:libfribidi glslang:libglslang ladspa lcms:lcms2 libass libplacebo - libtesseract lv2 rubberband:librubberband shaderc:libshaderc truetype:libfreetype - truetype:libharfbuzz vidstab:libvidstab vmaf:libvmaf zeromq:libzmq zimg:libzimg - # libswresample options - libsoxr - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -# Same as above but for encoders, i.e. they do something only with USE=encode. -FFMPEG_ENCODER_FLAG_MAP=( - amf amrenc:libvo-amrwbenc kvazaar:libkvazaar libaom mp3:libmp3lame - openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1 - theora:libtheora twolame:libtwolame webp:libwebp x264:libx264 - x265:libx265 xvid:libxvid -) - -IUSE=" - alsa chromium doc +encode oss +pic sndio static-libs test v4l soc - ${FFMPEG_FLAG_MAP[@]%:*} - ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu ) -PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 ) -PPC_CPU_REQUIRED_USE=" - cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec ) - cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${MIPS_CPU_FEATURES[@]} - ${PPC_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${PPC_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt - graph2dot ismindex pktdumper qt-faststart sidxindex trasher ) -IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}" - -RDEPEND=" - alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) - amf? ( media-video/amdgpu-pro-amf ) - amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] ) - bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] ) - bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] ) - bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) - cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] ) - chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] ) - codec2? ( media-libs/codec2[${MULTILIB_USEDEP}] ) - dav1d? ( >=media-libs/dav1d-0.5.0:0=[${MULTILIB_USEDEP}] ) - encode? ( - amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] ) - kvazaar? ( >=media-libs/kvazaar-2.0.0[${MULTILIB_USEDEP}] ) - mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] ) - openh264? ( >=media-libs/openh264-1.4.0-r1:=[${MULTILIB_USEDEP}] ) - rav1e? ( >=media-video/rav1e-0.5:=[capi] ) - snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] ) - theora? ( - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] - ) - twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] ) - webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] ) - x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] ) - x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] ) - xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] ) - ) - fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] ) - flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] ) - fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] ) - frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) - fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] ) - gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] ) - glslang? ( dev-util/glslang:=[${MULTILIB_USEDEP}] ) - gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] ) - gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] ) - gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] ) - iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] ) - iec61883? ( - >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}] - ) - ieee1394? ( - >=media-libs/libdc1394-2.2.1:2=[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] - ) - jack? ( virtual/jack[${MULTILIB_USEDEP}] ) - jpeg2k? ( >=media-libs/openjpeg-2.1:2=[${MULTILIB_USEDEP}] ) - jpegxl? ( >=media-libs/libjxl-0.7.0:=[$MULTILIB_USEDEP] ) - lcms? ( >=media-libs/lcms-2.13:2[$MULTILIB_USEDEP] ) - libaom? ( >=media-libs/libaom-1.0.0-r1:=[${MULTILIB_USEDEP}] ) - libaribb24? ( >=media-libs/aribb24-1.0.3-r2[${MULTILIB_USEDEP}] ) - libass? ( >=media-libs/libass-0.11.0:=[${MULTILIB_USEDEP}] ) - libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] ) - libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) - libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] ) - libplacebo? ( >=media-libs/libplacebo-4.192.0:=[$MULTILIB_USEDEP] ) - librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] ) - libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] ) - libtesseract? ( >=app-text/tesseract-4.1.0-r1[${MULTILIB_USEDEP}] ) - libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) - libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] ) - lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) - modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) - openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) - opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] ) - pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) - qsv? ( media-libs/libvpl[${MULTILIB_USEDEP}] ) - rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] ) - samba? ( >=net-fs/samba-3.6.23-r1[client,${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] ) - shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] ) - sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) - soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) - speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] ) - srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] ) - ssh? ( >=net-libs/libssh-0.6.0:=[sftp,${MULTILIB_USEDEP}] ) - svg? ( - gnome-base/librsvg:2=[${MULTILIB_USEDEP}] - x11-libs/cairo[${MULTILIB_USEDEP}] - ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - svt-av1? ( >=media-libs/svt-av1-0.9.0:=[${MULTILIB_USEDEP}] ) - truetype? ( - >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] - media-libs/harfbuzz:=[${MULTILIB_USEDEP}] - ) - vaapi? ( >=media-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] ) - vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] ) - vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] ) - vmaf? ( >=media-libs/libvmaf-2.0.0:=[${MULTILIB_USEDEP}] ) - vorbis? ( - >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - ) - vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] ) - vulkan? ( >=media-libs/vulkan-loader-1.3.255:=[${MULTILIB_USEDEP}] ) - X? ( - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] - >=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}] - ) - zeromq? ( >=net-libs/zeromq-4.2.1:= ) - zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] ) - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) - zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] ) -" - -RDEPEND="${RDEPEND} - openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) - !openssl? ( gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) ) -" - -DEPEND="${RDEPEND} - amf? ( media-libs/amf-headers ) - ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] ) - v4l? ( sys-kernel/linux-headers ) - vulkan? ( >=dev-util/vulkan-headers-1.3.255 ) -" - -# += for verify-sig above -BDEPEND+=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) - cuda? ( >=llvm-core/clang-7[llvm_targets_NVPTX] ) - doc? ( sys-apps/texinfo ) - test? ( net-misc/wget app-alternatives/bc ) -" - -# Code requiring FFmpeg to be built under gpl license -GPL_REQUIRED_USE=" - postproc? ( gpl ) - frei0r? ( gpl ) - cdio? ( gpl ) - rubberband? ( gpl ) - vidstab? ( gpl ) - samba? ( gpl ) - encode? ( - x264? ( gpl ) - x265? ( gpl ) - xvid? ( gpl ) - ) -" -REQUIRED_USE=" - chromium? ( opus ) - cuda? ( nvenc ) - fftools_cws2fws? ( zlib ) - glslang? ( vulkan !shaderc ) - libv4l? ( v4l ) - shaderc? ( vulkan !glslang ) - soc? ( libdrm ) - test? ( encode ) - ${GPL_REQUIRED_USE} - ${CPU_REQUIRED_USE}" -RESTRICT=" - !test? ( test ) - gpl? ( openssl? ( bindist ) fdk? ( bindist ) ) -" - -S=${WORKDIR}/${P/_/-} - -PATCHES=( - "${FILESDIR}"/chromium-r2.patch - "${FILESDIR}"/${PN}-6.1-wint-conversion.patch - "${FILESDIR}"/${PN}-6.0-fix-lto-type-mismatch.patch - "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch - "${FILESDIR}"/${PN}-6.1-gcc-14.patch - "${FILESDIR}"/${PN}-6.0.1-alignment.patch - "${FILESDIR}"/${PN}-6.1.1-vulkan-rename.patch - "${FILESDIR}"/${PN}-6.1.1-memory-leak.patch - "${FILESDIR}"/${PN}-6.1.1-wint-inconversion-libgcrypt.patch - "${FILESDIR}"/${PN}-6.1.1-amd-av1-vaapi.patch - "${FILESDIR}"/${PN}-6.1.1-wint-inconversion-vulkan.patch - "${FILESDIR}"/${PN}-6.1.1-incmptbl-pntr-types.patch - "${FILESDIR}"/${PN}-4.4.5-binutils-2.43-arm.patch -) - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/libavutil/avconfig.h -) - -pkg_setup() { - # ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg. - # May cause breakage while updating, #862996, #625210, #833821. - if has_version media-libs/chromaprint[tools] && use chromaprint; then - ewarn "You have media-libs/chromaprint installed with 'tools' USE flag, which " - ewarn "links to ffmpeg, and you have enabled 'chromaprint' USE flag for ffmpeg, " - ewarn "which links to chromaprint. This may cause issues while rebuilding ffmpeg." - ewarn "" - ewarn "If your build fails to 'ERROR: chromaprint not found', rebuild chromaprint " - ewarn "without the 'tools' use flag first, then rebuild ffmpeg, and then finally enable " - ewarn "'tools' USE flag for chromaprint. See #862996." - fi -} - -src_prepare() { - if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot - export revision=git-N-${FFMPEG_REVISION} - fi - - use soc && - eapply "${DISTDIR}"/${SOC_PATCH} - - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - ln -snf "${FILESDIR}"/chromium.c chromium.c || die - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die - - # We need to detect LTO usage before multilib stuff and filter-lto is called (bug #923491) - if tc-is-lto ; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ ${v} != -flto ]] && LTO_FLAG="--enable-lto=${v}" || LTO_FLAG="--enable-lto" - fi - filter-lto -} - -multilib_src_configure() { - local myconf=( ) - - # Conditional patch options - use soc && myconf+=( --enable-v4l2-request --enable-libudev --enable-sand ) - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - use openssl && myconf+=( --enable-nonfree ) - use samba && myconf+=( --enable-version3 ) - - # Encoders - if use encode ; then - ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) - - # Licensing. - if use amrenc ; then - myconf+=( --enable-version3 ) - fi - else - myconf+=( --disable-encoders ) - fi - - # Indevs - use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) - for i in alsa oss jack sndio ; do - use ${i} || myconf+=( --disable-indev=${i} ) - done - - # Outdevs - for i in alsa oss sndio ; do - use ${i} || myconf+=( --disable-outdev=${i} ) - done - - # Decoders - use amr && myconf+=( --enable-version3 ) - use gmp && myconf+=( --enable-version3 ) - use libaribb24 && myconf+=( --enable-version3 ) - use fdk && use gpl && myconf+=( --enable-nonfree ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - if use openssl ; then - myconf+=( --disable-gnutls ) - has_version dev-libs/openssl:0/3 && myconf+=( --enable-version3 ) - fi - - # (temporarily) disable non-multilib deps - if ! multilib_is_native_abi; then - for i in librav1e libzmq ; do - myconf+=( --disable-${i} ) - done - fi - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - if use pic ; then - myconf+=( --enable-pic ) - # disable asm code if PIC is required - # as the provided asm decidedly is not PIC for x86. - [[ ${ABI} == x86 ]] && myconf+=( --disable-asm ) - fi - [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004 - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 && ! -z ${LTO_FLAG} ]]; then - myconf+=( ${LTO_FLAG} ) - fi - - # Mandatory configuration - myconf=( - --disable-libaribcaption # libaribcaption is not packaged (yet?) - --enable-avfilter - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # doc - myconf+=( - $(multilib_native_use_enable doc) - $(multilib_native_use_enable doc htmlpages) - $(multilib_native_enable manpages) - ) - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ - --mandir="${EPREFIX}/usr/share/man" \ - --enable-shared \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - $(use_enable static-libs static) \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - echo "${@}" - "${@}" || die -} - -multilib_src_compile() { - emake V=1 - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - emake V=1 tools/${i}$(get_exeext) - fi - done - - use chromium && - emake V=1 libffmpeg - fi -} - -multilib_src_test() { - LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \ - emake V=1 fate -k -} - -multilib_src_install() { - emake V=1 DESTDIR="${D}" install install-doc - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - dobin tools/${i}$(get_exeext) - fi - done - - use chromium && - emake V=1 DESTDIR="${D}" install-libffmpeg - fi -} - -multilib_src_install_all() { - dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges - [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" -} diff --git a/media-video/ffmpeg/ffmpeg-6.1.2-r1.ebuild b/media-video/ffmpeg/ffmpeg-6.1.2-r1.ebuild new file mode 100644 index 000000000000..4a3a3a7e15b3 --- /dev/null +++ b/media-video/ffmpeg/ffmpeg-6.1.2-r1.ebuild @@ -0,0 +1,579 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-minimal toolchain-funcs + +FFMPEG_SOC_PATCH=ffmpeg-rpi-6.1-r3.patch +FFMPEG_SUBSLOT=58.60.60 # avutil.avcodec.avformat SONAME + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI=( + https://git.ffmpeg.org/ffmpeg.git + https://github.com/FFmpeg/FFmpeg.git + ) +else + inherit verify-sig + SRC_URI=" + https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz + verify-sig? ( https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz.asc ) + ${FFMPEG_SOC_PATCH:+" + soc? ( + https://dev.gentoo.org/~chewi/distfiles/${FFMPEG_SOC_PATCH} + verify-sig? ( https://dev.gentoo.org/~chewi/distfiles/${FFMPEG_SOC_PATCH}.asc ) + ) + "} + https://dev.gentoo.org/~ionen/distfiles/ffmpeg-$(ver_cut 1-2)-patchset-1.tar.xz + " + S=${WORKDIR}/ffmpeg-${PV} # avoid ${P} for ffmpeg-compat + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" +fi + +DESCRIPTION="Complete solution to record/convert/stream audio and video" +HOMEPAGE="https://ffmpeg.org/" + +[[ ${PN} == *-compat ]] && FFMPEG_UNSLOTTED= || FFMPEG_UNSLOTTED=1 + +FFMPEG_IUSE_MAP=( + # [+]flag[:[^][!]opt1,...][@<v3|nonfree>]], ^ = native-only, ! = override + # remember to keep LICENSE, REQUIRED_USE, and RESTRICT in sync + X:libxcb,libxcb-shape,libxcb-shm,libxcb-xfixes,xlib + alsa + amf + amrenc:libvo-amrwbenc@v3 + amr:libopencore-amrnb,libopencore-amrwb@v3 + appkit + bluray:libbluray + bs2b:libbs2b + bzip2:bzlib + cdio:libcdio + chromaprint + codec2:libcodec2 + cuda:cuda-llvm + +dav1d:libdav1d + ${FFMPEG_UNSLOTTED:+doc:^htmlpages} + +drm:libdrm + fdk:libfdk-aac@nonfree + flite:libflite + +fontconfig:libfontconfig + frei0r + fribidi:libfribidi + gcrypt + gme:libgme + gmp:@v3 + +gnutls # unused if USE=openssl, default for bug #905113,#917627 + +gpl + gsm:libgsm + iec61883:libiec61883 + ieee1394:libdc1394 + jack:libjack + jpeg2k:libopenjpeg + jpegxl:libjxl + kvazaar:libkvazaar + ladspa + lame:libmp3lame + lcms:lcms2 + libaom + libaribb24:@v3 # reminder: req use on gpl unneeded if >=1.0.4 (not in tree) + +libass + libcaca + libilbc + libplacebo + librtmp:librtmp + libsoxr + libtesseract + lv2 + lzma + modplug:libmodplug + npp:^libnpp@nonfree # no multilib + nvenc:cuvid,ffnvcodec,nvdec,nvenc + openal + opencl + opengl + openh264:libopenh264 + openmpt:libopenmpt + openssl:openssl,!gnutls@v3ifgpl # still LGPL2.1+ if USE=-gpl + opus:libopus + +postproc # exposed as a USE for clarity with the GPL requirement + pulseaudio:libpulse + qsv:libvpl + rabbitmq:^librabbitmq # no multilib + rav1e:^librav1e # no multilib + rubberband:librubberband + samba:libsmbclient@v3 # GPL-3+ only + sdl:sdl2 + shaderc:libshaderc + snappy:libsnappy + sndio + speex:libspeex + srt:libsrt + ssh:libssh + svg:librsvg + svt-av1:libsvtav1 + theora:libtheora + +truetype:libfreetype,libharfbuzz + twolame:libtwolame + v4l:libv4l2 + vaapi + vdpau + vidstab:libvidstab + vmaf:libvmaf + vorbis:libvorbis + vpx:libvpx + vulkan + webp:libwebp + x264:libx264 + x265:libx265 + +xml:libxml2 + xvid:libxvid + zeromq:^libzmq # no multilib + zimg:libzimg + +zlib + zvbi:libzvbi +) + +# all-rights is used to express the GPL incompatibility (RESTRICT=bindist) +LICENSE=" + gpl? ( + GPL-2+ + amr? ( GPL-3+ ) amrenc? ( GPL-3+ ) libaribb24? ( GPL-3+ ) + gmp? ( GPL-3+ ) openssl? ( GPL-3+ ) + fdk? ( all-rights-reserved ) npp? ( all-rights-reserved ) + ) + !gpl? ( + LGPL-2.1+ + amr? ( LGPL-3+ ) amrenc? ( LGPL-3+ ) libaribb24? ( LGPL-3+ ) + gmp? ( LGPL-3+ ) + ) + samba? ( GPL-3+ ) +" +[[ ${FFMPEG_UNSLOTTED} ]] && : 0 || : "$(ver_cut 1)" +SLOT="${_}/${FFMPEG_SUBSLOT}" +IUSE=" + ${FFMPEG_IUSE_MAP[*]%:*} + ${FFMPEG_UNSLOTTED:+chromium} + ${FFMPEG_SOC_PATCH:+soc} +" +REQUIRED_USE=" + cuda? ( nvenc ) + fribidi? ( truetype ) + gmp? ( !librtmp ) + libplacebo? ( || ( sdl vulkan ) ) + npp? ( nvenc ) + shaderc? ( vulkan ) + libaribb24? ( gpl ) cdio? ( gpl ) frei0r? ( gpl ) postproc? ( gpl ) + rubberband? ( gpl ) samba? ( gpl ) vidstab? ( gpl ) x264? ( gpl ) + x265? ( gpl ) xvid? ( gpl ) + ${FFMPEG_UNSLOTTED:+chromium? ( opus )} + ${FFMPEG_SOC_PATCH:+soc? ( drm )} +" +RESTRICT="gpl? ( fdk? ( bindist ) npp? ( bindist ) )" + +# dlopen: amdgpu-pro-amf, vulkan-loader +COMMON_DEPEND=" + virtual/libiconv[${MULTILIB_USEDEP}] + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXv[${MULTILIB_USEDEP}] + x11-libs/libxcb:=[${MULTILIB_USEDEP}] + ) + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) + amr? ( media-libs/opencore-amr[${MULTILIB_USEDEP}] ) + amrenc? ( media-libs/vo-amrwbenc[${MULTILIB_USEDEP}] ) + bluray? ( media-libs/libbluray:=[${MULTILIB_USEDEP}] ) + bs2b? ( media-libs/libbs2b[${MULTILIB_USEDEP}] ) + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) + cdio? ( dev-libs/libcdio-paranoia:=[${MULTILIB_USEDEP}] ) + chromaprint? ( media-libs/chromaprint:=[${MULTILIB_USEDEP}] ) + codec2? ( media-libs/codec2:=[${MULTILIB_USEDEP}] ) + dav1d? ( media-libs/dav1d:=[${MULTILIB_USEDEP}] ) + drm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) + fdk? ( media-libs/fdk-aac:=[${MULTILIB_USEDEP}] ) + flite? ( app-accessibility/flite[${MULTILIB_USEDEP}] ) + fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) + frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) + fribidi? ( dev-libs/fribidi[${MULTILIB_USEDEP}] ) + gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] ) + gme? ( media-libs/game-music-emu[${MULTILIB_USEDEP}] ) + gmp? ( dev-libs/gmp:=[${MULTILIB_USEDEP}] ) + gnutls? ( !openssl? ( + net-libs/gnutls:=[${MULTILIB_USEDEP}] + ) ) + gsm? ( media-sound/gsm[${MULTILIB_USEDEP}] ) + iec61883? ( + media-libs/libiec61883[${MULTILIB_USEDEP}] + sys-libs/libavc1394[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] + ) + ieee1394? ( + media-libs/libdc1394:2=[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] + ) + jack? ( virtual/jack[${MULTILIB_USEDEP}] ) + jpeg2k? ( media-libs/openjpeg:2=[${MULTILIB_USEDEP}] ) + jpegxl? ( media-libs/libjxl:=[$MULTILIB_USEDEP] ) + kvazaar? ( media-libs/kvazaar:=[${MULTILIB_USEDEP}] ) + lame? ( media-sound/lame[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2[$MULTILIB_USEDEP] ) + libaom? ( media-libs/libaom:=[${MULTILIB_USEDEP}] ) + libaribb24? ( media-libs/aribb24[${MULTILIB_USEDEP}] ) + libass? ( media-libs/libass:=[${MULTILIB_USEDEP}] ) + libcaca? ( media-libs/libcaca[${MULTILIB_USEDEP}] ) + libilbc? ( media-libs/libilbc:=[${MULTILIB_USEDEP}] ) + libplacebo? ( media-libs/libplacebo:=[$MULTILIB_USEDEP] ) + librtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] ) + libsoxr? ( media-libs/soxr[${MULTILIB_USEDEP}] ) + libtesseract? ( app-text/tesseract:=[${MULTILIB_USEDEP}] ) + lv2? ( + media-libs/lilv[${MULTILIB_USEDEP}] + media-libs/lv2[${MULTILIB_USEDEP}] + ) + lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] ) + modplug? ( media-libs/libmodplug[${MULTILIB_USEDEP}] ) + npp? ( dev-util/nvidia-cuda-toolkit:= ) + openal? ( media-libs/openal[${MULTILIB_USEDEP}] ) + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) + opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) + openh264? ( media-libs/openh264:=[${MULTILIB_USEDEP}] ) + openmpt? ( media-libs/libopenmpt[${MULTILIB_USEDEP}] ) + openssl? ( >=dev-libs/openssl-3:=[${MULTILIB_USEDEP}] ) + opus? ( media-libs/opus[${MULTILIB_USEDEP}] ) + pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) + qsv? ( media-libs/libvpl:=[${MULTILIB_USEDEP}] ) + rabbitmq? ( net-libs/rabbitmq-c:= ) + rav1e? ( >=media-video/rav1e-0.5:=[capi] ) + rubberband? ( media-libs/rubberband:=[${MULTILIB_USEDEP}] ) + samba? ( net-fs/samba:=[client,${MULTILIB_USEDEP}] ) + sdl? ( media-libs/libsdl2[sound(+),video(+),${MULTILIB_USEDEP}] ) + shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] ) + snappy? ( app-arch/snappy:=[${MULTILIB_USEDEP}] ) + sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) + speex? ( media-libs/speex[${MULTILIB_USEDEP}] ) + srt? ( net-libs/srt:=[${MULTILIB_USEDEP}] ) + ssh? ( net-libs/libssh:=[sftp,${MULTILIB_USEDEP}] ) + svg? ( + dev-libs/glib:2[${MULTILIB_USEDEP}] + >=gnome-base/librsvg-2.52:2[${MULTILIB_USEDEP}] + x11-libs/cairo[${MULTILIB_USEDEP}] + ) + svt-av1? ( >=media-libs/svt-av1-0.9:=[${MULTILIB_USEDEP}] ) + theora? ( media-libs/libtheora[encode,${MULTILIB_USEDEP}] ) + truetype? ( + media-libs/freetype:2[${MULTILIB_USEDEP}] + media-libs/harfbuzz:=[${MULTILIB_USEDEP}] + ) + twolame? ( media-sound/twolame[${MULTILIB_USEDEP}] ) + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) + vaapi? ( media-libs/libva:=[X?,${MULTILIB_USEDEP}] ) + vdpau? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libvdpau[${MULTILIB_USEDEP}] + ) + vidstab? ( media-libs/vidstab[${MULTILIB_USEDEP}] ) + vmaf? ( media-libs/libvmaf:=[${MULTILIB_USEDEP}] ) + vorbis? ( media-libs/libvorbis[${MULTILIB_USEDEP}] ) + vpx? ( media-libs/libvpx:=[${MULTILIB_USEDEP}] ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) + webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] ) + x264? ( media-libs/x264:=[${MULTILIB_USEDEP}] ) + x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] ) + xml? ( dev-libs/libxml2[${MULTILIB_USEDEP}] ) + xvid? ( media-libs/xvid[${MULTILIB_USEDEP}] ) + zeromq? ( net-libs/zeromq:= ) + zimg? ( media-libs/zimg[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zvbi? ( media-libs/zvbi[${MULTILIB_USEDEP}] ) + ${FFMPEG_SOC_PATCH:+" + soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) + "} +" +RDEPEND=" + ${COMMON_DEPEND} + amf? ( media-video/amdgpu-pro-amf ) +" +DEPEND=" + ${COMMON_DEPEND} + X? ( x11-base/xorg-proto ) + amf? ( media-libs/amf-headers ) + kernel_linux? ( >=sys-kernel/linux-headers-6 ) + ladspa? ( media-libs/ladspa-sdk ) + nvenc? ( >=media-libs/nv-codec-headers-12.1.14.0 ) + opencl? ( dev-util/opencl-headers ) + vulkan? ( dev-util/vulkan-headers ) +" +BDEPEND=" + app-alternatives/awk + virtual/pkgconfig + amd64? ( + || ( + dev-lang/nasm + dev-lang/yasm + ) + ) + cuda? ( llvm-core/clang:*[llvm_targets_NVPTX] ) + ${FFMPEG_UNSLOTTED:+" + dev-lang/perl + doc? ( sys-apps/texinfo ) + "} +" +[[ ${PV} != 9999 ]] && + BDEPEND+=" + verify-sig? ( + sec-keys/openpgp-keys-ffmpeg + ${FFMPEG_SOC_PATCH:+" + soc? ( >=sec-keys/openpgp-keys-gentoo-developers-20240708 ) + "} + ) + " + +DOCS=( CREDITS Changelog README.md doc/APIchanges ) +[[ ${PV} != 9999 ]] && DOCS+=( RELEASE_NOTES ) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/libavutil/avconfig.h +) + +PATCHES=( + "${WORKDIR}"/patches +) + +pkg_pretend() { + # TODO: drop this after a few months + if has_version "${CATEGORY}/${PN}[mp3]" && use !lame; then #952971 + ewarn "${PN}'s 'mp3' USE was renamed to 'lame', please enable it" + ewarn "if wish to keep the ability to encode using media-sound/lame." + ewarn "This is *not* needed if only want mp3 playback." + fi +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] || return + + if use chromaprint && has_version 'media-libs/chromaprint[tools]'; then + ewarn "media-libs/chromaprint is installed with USE=tools which links to" + ewarn "ffmpeg, and USE=chromaprint is enabled on ffmpeg which links to" + ewarn "chromaprint (circular). This may cause issues when updating ffmpeg." + ewarn + ewarn "If get a build failure with 'ERROR: chromaprint not found' or so," + ewarn "first rebuild chromaprint with USE=-tools, then rebuild ffmpeg, and" + ewarn "then finally rebuild chromaprint with USE=tools again (bug #862996)." + fi + + [[ ${EXTRA_FFMPEG_CONF} ]] && # drop this eventually + die "EXTRA_FFMPEG_CONF is set in the environment, please use EXTRA_ECONF instead" +} + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/ffmpeg-${PV}.tar.xz{,.asc} \ + "${BROOT}"/usr/share/openpgp-keys/ffmpeg.asc + in_iuse soc && use soc && + verify-sig_verify_detached "${DISTDIR}"/${FFMPEG_SOC_PATCH}{,.asc} \ + "${BROOT}"/usr/share/openpgp-keys/gentoo-developers.asc + fi + default + fi +} + +src_prepare() { + in_iuse chromium && PATCHES+=( "${FILESDIR}"/chromium-r3.patch ) + in_iuse soc && use soc && PATCHES+=( "${DISTDIR}"/${FFMPEG_SOC_PATCH} ) + + default + + # respect user preferences + sed -i '/cflags -fdiagnostics-color/d' configure || die + + # handle *FLAGS here to avoid repeating for each ABI below (bug #923491) + FFMPEG_ENABLE_LTO= + if tc-is-lto; then + : "$(get-flag flto)" # get -flto=<val> (e.g. =thin) + FFMPEG_ENABLE_LTO=--enable-lto${_#-flto} + fi + filter-lto + + use elibc_musl && append-cppflags -D__musl__ #940733 + + if use npp; then + local cuda=${ESYSROOT}/opt/cuda/targets/$(usex amd64 x86_64 sbsa)-linux + append-cppflags -I"${cuda}"/include + append-ldflags -L"${cuda}"/lib + fi +} + +multilib_src_configure() { + local conf=( "${S}"/configure ) # not autotools-based + + local prefix=${EPREFIX}/usr + if [[ ! ${FFMPEG_UNSLOTTED} ]]; then + prefix+=/lib/ffmpeg${SLOT%/*} + # could get SONAME clashes, so prefer rpath over LDPATH + conf+=( + --enable-rpath + --disable-doc + ) + fi + + conf+=( + --prefix="${prefix}" + --libdir="${prefix}"/$(get_libdir) + --shlibdir="${prefix}"/$(get_libdir) + --mandir="${prefix}"/share/man + --docdir="${EPREFIX}"/usr/share/doc/${PF}/html + + --ar="$(tc-getAR)" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --nm="$(tc-getNM)" + --pkg-config="$(tc-getPKG_CONFIG)" + --ranlib="$(tc-getRANLIB)" + --disable-stripping + + # overrides users' -g/-O, let *FLAGS handle these + --disable-debug + --disable-optimizations + --optflags=' ' + + # pass option over *FLAGS due to special logic (bug #566282,#754654) + ${FFMPEG_ENABLE_LTO} + + # basic defaults that should not really need a USE + --enable-iconv + --enable-pic + --enable-shared + --disable-static + $(multilib_native_enable manpages) # needs pod2man + --disable-podpages + --disable-txtpages + + # disabled primarily due to being unpackaged + --disable-decklink + --disable-libaribcaption + --disable-libdavs2 + --disable-libklvanc + --disable-libmysofa + --disable-libopenvino + --disable-libshine + --disable-libtls + --disable-libuavs3d + --disable-libxavs + --disable-libxavs2 + --disable-pocketsphinx + --disable-rkmpp + --disable-vapoursynth + + # disabled for other or additional reasons + --disable-cuda-nvcc # prefer cuda-llvm for less issues + --disable-libcelt # obsolete (bug #664158) + --disable-libglslang # prefer USE=shaderc (bug #918989,#920283,#922333) + --disable-liblensfun # https://trac.ffmpeg.org/ticket/9112 (abandoned?) + --disable-libmfx # prefer libvpl for USE=qsv + --disable-libopencv # leaving for later due to circular opencv[ffmpeg] + --disable-librist # librist itself needs attention first (bug #822012) + --disable-libtensorflow # causes headaches, and is gone + --disable-mbedtls # messy with slots, tests underlinking issues + --disable-mmal # prefer USE=soc + --disable-omx # unsupported (bug #653386) + --disable-omx-rpi # ^ + + # to avoid obscure issues like bug #915384 and simplify the ebuild, + # not passing the following (use EXTRA_ECONF if really must): + # --cpu: adds -march=<exact> after the user's more adapted + # =native, its logic also does not account for -mno-* + # --disable/enable-<cpufeature>: safer to detect at runtime + ) + + in_iuse soc && use soc && + conf+=( + --disable-epoxy + --enable-libudev + --enable-sand + --enable-v4l2-request + ) + + # broken on x32 (bug #427004), and not PIC safe on x86 (bug #916067) + [[ ${ABI} == @(x32|x86) ]] && conf+=( --disable-asm ) + + # disable due to asm-related failures on ppc (bug #951464, ppc64be) + # https://trac.ffmpeg.org/ticket/9604 (ppc64el) + # https://trac.ffmpeg.org/ticket/10955 (ppc64el) + # (review re-enabling if resolved, or if debian allows it again) + use ppc || use ppc64 && conf+=( --disable-asm ) + + if tc-is-cross-compiler; then + conf+=( + --enable-cross-compile + --arch="$(tc-arch-kernel)" + --cross-prefix="${CHOST}-" + --host-cc="$(tc-getBUILD_CC)" + ) + case ${CHOST} in + *mingw32*) conf+=( --target-os=mingw32 );; + *linux*) conf+=( --target-os=linux );; + esac + fi + + # import options from FFMPEG_IUSE_MAP + local flag license mod v + local -A optmap=() licensemap=() + for v in "${FFMPEG_IUSE_MAP[@]}"; do + [[ ${v} =~ \+?([^:]+):?([^@]*)@?(.*) ]] || die "${v}" + flag=${BASH_REMATCH[1]} + license=${BASH_REMATCH[3]} + v=${BASH_REMATCH[2]:-${flag}} + for v in ${v//,/ }; do + mod=${v::1} + v=${v#[\!\^]} + if [[ ${mod} == '!' ]]; then + if use ${flag}; then + optmap[${v}]=--disable-${v} + unset licensemap[${v}] + fi + elif [[ ! -v optmap[${v}] ]]; then + if [[ ${mod} == '^' ]]; then + optmap[${v}]=$(multilib_native_use_enable ${flag} ${v}) + else + optmap[${v}]=$(use_enable ${flag} ${v}) + fi + use ${flag} && licensemap[${v}]=${license} + fi + done + done + for license in "${licensemap[@]}"; do + case ${license} in + v3ifgpl) use gpl || continue ;& + v3) optmap[v3]=--enable-version3 ;; + nonfree) use gpl && optmap[nonfree]=--enable-nonfree ;; + esac + done + conf+=( + "${optmap[@]}" + ${EXTRA_ECONF} + ) + + einfo "${conf[*]}" + "${conf[@]}" || die "configure failed, see ${BUILD_DIR}/ffbuild/config.log" +} + +multilib_src_compile() { + emake V=1 + in_iuse chromium && use chromium && multilib_is_native_abi && + emake V=1 libffmpeg +} + +multilib_src_test() { + local -x LD_LIBRARY_PATH=$(printf %s: "${BUILD_DIR}"/lib*)${LD_LIBRARY_PATH} + emake V=1 -k fate +} + +multilib_src_install() { + emake V=1 DESTDIR="${D}" install + in_iuse chromium && use chromium && multilib_is_native_abi && + emake V=1 DESTDIR="${D}" install-libffmpeg +} diff --git a/media-video/ffmpeg/ffmpeg-6.1.2.ebuild b/media-video/ffmpeg/ffmpeg-6.1.2.ebuild deleted file mode 100644 index 2b00c267bb23..000000000000 --- a/media-video/ffmpeg/ffmpeg-6.1.2.ebuild +++ /dev/null @@ -1,617 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Subslot: libavutil major.libavcodec major.libavformat major -# Since FFmpeg ships several libraries, subslot is kind of limited here. -# Most consumers will use those three libraries, if a "less used" library -# changes its soname, consumers will have to be rebuilt the old way -# (preserve-libs). -# If, for example, a package does not link to libavformat and only libavformat -# changes its ABI then this package will be rebuilt needlessly. Hence, such a -# package is free _not_ to := depend on FFmpeg but I would strongly encourage -# doing so since such a case is unlikely. -FFMPEG_SUBSLOT=58.60.60 - -SOC_PATCH="ffmpeg-rpi-6.1-r3.patch" - -SCM="" -if [ "${PV#9999}" != "${PV}" ] ; then - SCM="git-r3" - EGIT_MIN_CLONE_TYPE="single" - EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git" -fi - -inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM} - -DESCRIPTION="Complete solution to record/convert/stream audio and video. Includes libavcodec" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH} )" -if [ "${PV#9999}" != "${PV}" ] ; then - : -elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot - SRC_URI+=" mirror://gentoo/${P}.tar.xz" -else # Release - inherit verify-sig - - SRC_URI+=" - https://ffmpeg.org/releases/${P/_/-}.tar.xz - verify-sig? ( - https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc - soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH}.asc ) - ) - " - - BDEPEND=" - verify-sig? ( - sec-keys/openpgp-keys-ffmpeg - soc? ( sec-keys/openpgp-keys-gentoo-developers ) - ) - " - - src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${P/_/-}.tar.xz{,.asc} /usr/share/openpgp-keys/ffmpeg.asc - use soc && verify-sig_verify_detached "${DISTDIR}"/${SOC_PATCH}{,.asc} /usr/share/openpgp-keys/gentoo-developers.asc - fi - default - } -fi -FFMPEG_REVISION="${PV#*_p}" - -SLOT="0/${FFMPEG_SUBSLOT}" -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) - amr? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - gmp? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - libaribb24? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - encode? ( - amrenc? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - ) - samba? ( GPL-3 ) -" -if [ "${PV#9999}" = "${PV}" ] ; then - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" -fi - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt +gnutls gmp - +gpl hardcoded-tables +iconv libxml2 lzma +network opencl - openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau vulkan - X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib - # libavdevice options - cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal - opengl - # indevs - libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack - # decoders - amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac - jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm - libaribb24 modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh - speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec - vorbis:libvorbis vpx:libvpx zvbi:libzvbi - # libavfilter options - appkit - bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite fontconfig frei0r - fribidi:libfribidi glslang:libglslang ladspa lcms:lcms2 libass libplacebo - libtesseract lv2 rubberband:librubberband shaderc:libshaderc truetype:libfreetype - truetype:libharfbuzz vidstab:libvidstab vmaf:libvmaf zeromq:libzmq zimg:libzimg - # libswresample options - libsoxr - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -# Same as above but for encoders, i.e. they do something only with USE=encode. -FFMPEG_ENCODER_FLAG_MAP=( - amf amrenc:libvo-amrwbenc kvazaar:libkvazaar libaom mp3:libmp3lame - openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1 - theora:libtheora twolame:libtwolame webp:libwebp x264:libx264 - x265:libx265 xvid:libxvid -) - -IUSE=" - alsa chromium doc +encode oss +pic sndio static-libs test v4l soc - ${FFMPEG_FLAG_MAP[@]%:*} - ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu ) -PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 ) -PPC_CPU_REQUIRED_USE=" - cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec ) - cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${MIPS_CPU_FEATURES[@]} - ${PPC_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${PPC_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt - graph2dot ismindex pktdumper qt-faststart sidxindex trasher ) -IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}" - -RDEPEND=" - alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) - amf? ( media-video/amdgpu-pro-amf ) - amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] ) - bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] ) - bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] ) - bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) - cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] ) - chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] ) - codec2? ( media-libs/codec2[${MULTILIB_USEDEP}] ) - dav1d? ( >=media-libs/dav1d-0.5.0:0=[${MULTILIB_USEDEP}] ) - encode? ( - amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] ) - kvazaar? ( >=media-libs/kvazaar-2.0.0[${MULTILIB_USEDEP}] ) - mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] ) - openh264? ( >=media-libs/openh264-1.4.0-r1:=[${MULTILIB_USEDEP}] ) - rav1e? ( >=media-video/rav1e-0.5:=[capi] ) - snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] ) - theora? ( - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] - ) - twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] ) - webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] ) - x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] ) - x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] ) - xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] ) - ) - fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] ) - flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] ) - fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] ) - frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) - fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] ) - gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] ) - glslang? ( dev-util/glslang:=[${MULTILIB_USEDEP}] ) - gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] ) - gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] ) - gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] ) - iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] ) - iec61883? ( - >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}] - ) - ieee1394? ( - >=media-libs/libdc1394-2.2.1:2=[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] - ) - jack? ( virtual/jack[${MULTILIB_USEDEP}] ) - jpeg2k? ( >=media-libs/openjpeg-2.1:2=[${MULTILIB_USEDEP}] ) - jpegxl? ( >=media-libs/libjxl-0.7.0:=[$MULTILIB_USEDEP] ) - lcms? ( >=media-libs/lcms-2.13:2[$MULTILIB_USEDEP] ) - libaom? ( >=media-libs/libaom-1.0.0-r1:=[${MULTILIB_USEDEP}] ) - libaribb24? ( >=media-libs/aribb24-1.0.3-r2[${MULTILIB_USEDEP}] ) - libass? ( >=media-libs/libass-0.11.0:=[${MULTILIB_USEDEP}] ) - libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] ) - libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) - libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] ) - libplacebo? ( >=media-libs/libplacebo-4.192.0:=[$MULTILIB_USEDEP] ) - librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] ) - libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] ) - libtesseract? ( >=app-text/tesseract-4.1.0-r1[${MULTILIB_USEDEP}] ) - libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) - libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] ) - lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) - modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) - openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) - opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] ) - pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) - qsv? ( media-libs/libvpl[${MULTILIB_USEDEP}] ) - rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] ) - samba? ( >=net-fs/samba-3.6.23-r1[client,${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] ) - shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] ) - sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) - soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) - speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] ) - srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] ) - ssh? ( >=net-libs/libssh-0.6.0:=[sftp,${MULTILIB_USEDEP}] ) - svg? ( - gnome-base/librsvg:2=[${MULTILIB_USEDEP}] - x11-libs/cairo[${MULTILIB_USEDEP}] - ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - svt-av1? ( >=media-libs/svt-av1-0.9.0:=[${MULTILIB_USEDEP}] ) - truetype? ( - >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] - media-libs/harfbuzz:=[${MULTILIB_USEDEP}] - ) - vaapi? ( >=media-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] ) - vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] ) - vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] ) - vmaf? ( >=media-libs/libvmaf-2.0.0:=[${MULTILIB_USEDEP}] ) - vorbis? ( - >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - ) - vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] ) - vulkan? ( >=media-libs/vulkan-loader-1.3.255:=[${MULTILIB_USEDEP}] ) - X? ( - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] - >=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}] - ) - zeromq? ( >=net-libs/zeromq-4.2.1:= ) - zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] ) - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) - zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] ) -" - -RDEPEND="${RDEPEND} - openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) - !openssl? ( gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) ) -" - -DEPEND="${RDEPEND} - amf? ( media-libs/amf-headers ) - ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] ) - v4l? ( sys-kernel/linux-headers ) - vulkan? ( >=dev-util/vulkan-headers-1.3.255 ) -" - -# += for verify-sig above -BDEPEND+=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) - cuda? ( >=llvm-core/clang-7[llvm_targets_NVPTX] ) - doc? ( sys-apps/texinfo ) - test? ( net-misc/wget app-alternatives/bc ) -" - -# Code requiring FFmpeg to be built under gpl license -GPL_REQUIRED_USE=" - postproc? ( gpl ) - frei0r? ( gpl ) - cdio? ( gpl ) - rubberband? ( gpl ) - vidstab? ( gpl ) - samba? ( gpl ) - encode? ( - x264? ( gpl ) - x265? ( gpl ) - xvid? ( gpl ) - ) -" -REQUIRED_USE=" - chromium? ( opus ) - cuda? ( nvenc ) - fftools_cws2fws? ( zlib ) - glslang? ( vulkan !shaderc ) - libv4l? ( v4l ) - shaderc? ( vulkan !glslang ) - soc? ( libdrm ) - test? ( encode ) - ${GPL_REQUIRED_USE} - ${CPU_REQUIRED_USE}" -RESTRICT=" - !test? ( test ) - gpl? ( openssl? ( bindist ) fdk? ( bindist ) ) -" - -S=${WORKDIR}/${P/_/-} - -PATCHES=( - "${FILESDIR}"/chromium-r2.patch - "${FILESDIR}"/${PN}-6.1-wint-conversion.patch - "${FILESDIR}"/${PN}-6.0-fix-lto-type-mismatch.patch - "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch - "${FILESDIR}"/${PN}-6.1-gcc-14.patch - "${FILESDIR}"/${PN}-6.0.1-alignment.patch - "${FILESDIR}"/${PN}-6.1.1-wint-inconversion-libgcrypt.patch - "${FILESDIR}"/${PN}-6.1.1-amd-av1-vaapi.patch - "${FILESDIR}"/${PN}-6.1.1-wint-inconversion-vulkan.patch - "${FILESDIR}"/${PN}-6.1.1-incmptbl-pntr-types.patch - "${FILESDIR}"/${PN}-4.4.5-binutils-2.43-arm.patch -) - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/libavutil/avconfig.h -) - -pkg_setup() { - # ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg. - # May cause breakage while updating, #862996, #625210, #833821. - if has_version media-libs/chromaprint[tools] && use chromaprint; then - ewarn "You have media-libs/chromaprint installed with 'tools' USE flag, which " - ewarn "links to ffmpeg, and you have enabled 'chromaprint' USE flag for ffmpeg, " - ewarn "which links to chromaprint. This may cause issues while rebuilding ffmpeg." - ewarn "" - ewarn "If your build fails to 'ERROR: chromaprint not found', rebuild chromaprint " - ewarn "without the 'tools' use flag first, then rebuild ffmpeg, and then finally enable " - ewarn "'tools' USE flag for chromaprint. See #862996." - fi -} - -src_prepare() { - if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot - export revision=git-N-${FFMPEG_REVISION} - fi - - use soc && - eapply "${DISTDIR}"/${SOC_PATCH} - - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - ln -snf "${FILESDIR}"/chromium.c chromium.c || die - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die - - # We need to detect LTO usage before multilib stuff and filter-lto is called (bug #923491) - if tc-is-lto ; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ ${v} != -flto ]] && LTO_FLAG="--enable-lto=${v}" || LTO_FLAG="--enable-lto" - fi - filter-lto -} - -multilib_src_configure() { - local myconf=( ) - - # Conditional patch options - use soc && myconf+=( --enable-v4l2-request --enable-libudev --enable-sand ) - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - use openssl && myconf+=( --enable-nonfree ) - use samba && myconf+=( --enable-version3 ) - - # Encoders - if use encode ; then - ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) - - # Licensing. - if use amrenc ; then - myconf+=( --enable-version3 ) - fi - else - myconf+=( --disable-encoders ) - fi - - # Indevs - use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) - for i in alsa oss jack sndio ; do - use ${i} || myconf+=( --disable-indev=${i} ) - done - - # Outdevs - for i in alsa oss sndio ; do - use ${i} || myconf+=( --disable-outdev=${i} ) - done - - # Decoders - use amr && myconf+=( --enable-version3 ) - use gmp && myconf+=( --enable-version3 ) - use libaribb24 && myconf+=( --enable-version3 ) - use fdk && use gpl && myconf+=( --enable-nonfree ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - if use openssl ; then - myconf+=( --disable-gnutls ) - has_version dev-libs/openssl:0/3 && myconf+=( --enable-version3 ) - fi - - # (temporarily) disable non-multilib deps - if ! multilib_is_native_abi; then - for i in librav1e libzmq ; do - myconf+=( --disable-${i} ) - done - fi - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - if use pic ; then - myconf+=( --enable-pic ) - # disable asm code if PIC is required - # as the provided asm decidedly is not PIC for x86. - [[ ${ABI} == x86 ]] && myconf+=( --disable-asm ) - fi - [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004 - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 && ! -z ${LTO_FLAG} ]]; then - myconf+=( ${LTO_FLAG} ) - fi - - # Mandatory configuration - myconf=( - --disable-libaribcaption # libaribcaption is not packaged (yet?) - --enable-avfilter - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # doc - myconf+=( - $(multilib_native_use_enable doc) - $(multilib_native_use_enable doc htmlpages) - $(multilib_native_enable manpages) - ) - - if use elibc_musl ; then - append-cflags -D__musl__ - fi - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ - --mandir="${EPREFIX}/usr/share/man" \ - --enable-shared \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - $(use_enable static-libs static) \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - echo "${@}" - "${@}" || die -} - -multilib_src_compile() { - emake V=1 - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - emake V=1 tools/${i}$(get_exeext) - fi - done - - use chromium && - emake V=1 libffmpeg - fi -} - -multilib_src_test() { - LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \ - emake V=1 fate -k -} - -multilib_src_install() { - emake V=1 DESTDIR="${D}" install install-doc - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - dobin tools/${i}$(get_exeext) - fi - done - - use chromium && - emake V=1 DESTDIR="${D}" install-libffmpeg - fi -} - -multilib_src_install_all() { - dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges - [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" -} diff --git a/media-video/ffmpeg/ffmpeg-7.0.2-r1.ebuild b/media-video/ffmpeg/ffmpeg-7.0.2-r1.ebuild deleted file mode 100644 index c00ae501a01e..000000000000 --- a/media-video/ffmpeg/ffmpeg-7.0.2-r1.ebuild +++ /dev/null @@ -1,617 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Subslot: libavutil major.libavcodec major.libavformat major -# Since FFmpeg ships several libraries, subslot is kind of limited here. -# Most consumers will use those three libraries, if a "less used" library -# changes its soname, consumers will have to be rebuilt the old way -# (preserve-libs). -# If, for example, a package does not link to libavformat and only libavformat -# changes its ABI then this package will be rebuilt needlessly. Hence, such a -# package is free _not_ to := depend on FFmpeg but I would strongly encourage -# doing so since such a case is unlikely. -FFMPEG_SUBSLOT=58.60.60 - -SOC_PATCH="ffmpeg-rpi-7.0.patch" - -SCM="" -if [ "${PV#9999}" != "${PV}" ] ; then - SCM="git-r3" - EGIT_MIN_CLONE_TYPE="single" - EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git" -fi - -inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM} - -DESCRIPTION="Complete solution to record/convert/stream audio and video. Includes libavcodec" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH} )" -if [ "${PV#9999}" != "${PV}" ] ; then - : -elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot - SRC_URI+=" mirror://gentoo/${P}.tar.xz" -else # Release - inherit verify-sig - - SRC_URI+=" - https://ffmpeg.org/releases/${P/_/-}.tar.xz - verify-sig? ( - https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc - soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH}.asc ) - ) - " - - BDEPEND=" - verify-sig? ( - sec-keys/openpgp-keys-ffmpeg - soc? ( >=sec-keys/openpgp-keys-gentoo-developers-20240708 ) - ) - " - - src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${P/_/-}.tar.xz{,.asc} /usr/share/openpgp-keys/ffmpeg.asc - use soc && verify-sig_verify_detached "${DISTDIR}"/${SOC_PATCH}{,.asc} /usr/share/openpgp-keys/gentoo-developers.asc - fi - default - } -fi -FFMPEG_REVISION="${PV#*_p}" - -S=${WORKDIR}/${P/_/-} -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) - amr? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - gmp? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - libaribb24? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - encode? ( - amrenc? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - ) - samba? ( GPL-3 ) -" -SLOT="0/${FFMPEG_SUBSLOT}" -if [ "${PV#9999}" = "${PV}" ] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" -fi - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt +gnutls gmp - +gpl hardcoded-tables +iconv libxml2 libdvdnav libdvdread lzma +network - opencl openssl +postproc qrcode:libqrencode quirc:libquirc - samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau vulkan - X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib - # libavdevice options - cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal - opengl - # indevs - libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack - # decoders - amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac - jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm - libaribb24 modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh - speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec - vorbis:libvorbis vpx:libvpx zvbi:libzvbi - # libavfilter options - appkit - bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite fontconfig frei0r - fribidi:libfribidi glslang:libglslang ladspa lcms:lcms2 libass libplacebo - libtesseract lv2 rubberband:librubberband shaderc:libshaderc truetype:libfreetype - truetype:libharfbuzz vidstab:libvidstab vmaf:libvmaf zeromq:libzmq zimg:libzimg - # libswresample options - libsoxr - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -# Same as above but for encoders, i.e. they do something only with USE=encode. -FFMPEG_ENCODER_FLAG_MAP=( - amf amrenc:libvo-amrwbenc kvazaar:libkvazaar libaom mp3:libmp3lame - openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1 - theora:libtheora twolame:libtwolame webp:libwebp x264:libx264 - x265:libx265 xvid:libxvid -) - -IUSE=" - alsa chromium doc +encode oss +pic sndio static-libs test v4l soc - ${FFMPEG_FLAG_MAP[@]%:*} - ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu ) -PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 ) -PPC_CPU_REQUIRED_USE=" - cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec ) - cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${MIPS_CPU_FEATURES[@]} - ${PPC_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${PPC_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt - graph2dot ismindex pktdumper qt-faststart sidxindex trasher ) -IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}" - -RDEPEND=" - alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) - amf? ( media-video/amdgpu-pro-amf ) - amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] ) - bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] ) - bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] ) - bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) - cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] ) - chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] ) - codec2? ( media-libs/codec2[${MULTILIB_USEDEP}] ) - dav1d? ( >=media-libs/dav1d-0.5.0:0=[${MULTILIB_USEDEP}] ) - encode? ( - amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] ) - kvazaar? ( >=media-libs/kvazaar-2.0.0[${MULTILIB_USEDEP}] ) - mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] ) - openh264? ( >=media-libs/openh264-1.4.0-r1:=[${MULTILIB_USEDEP}] ) - rav1e? ( >=media-video/rav1e-0.5:=[capi] ) - snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] ) - theora? ( - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] - ) - twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] ) - webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] ) - x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] ) - x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] ) - xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] ) - ) - fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] ) - flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] ) - fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] ) - frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) - fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] ) - gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] ) - glslang? ( dev-util/glslang:=[${MULTILIB_USEDEP}] ) - gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] ) - gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] ) - gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] ) - iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] ) - iec61883? ( - >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}] - ) - ieee1394? ( - >=media-libs/libdc1394-2.2.1:2=[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] - ) - jack? ( virtual/jack[${MULTILIB_USEDEP}] ) - jpeg2k? ( >=media-libs/openjpeg-2.1:2=[${MULTILIB_USEDEP}] ) - jpegxl? ( >=media-libs/libjxl-0.7.0:=[$MULTILIB_USEDEP] ) - lcms? ( >=media-libs/lcms-2.13:2[$MULTILIB_USEDEP] ) - libaom? ( >=media-libs/libaom-1.0.0-r1:=[${MULTILIB_USEDEP}] ) - libaribb24? ( >=media-libs/aribb24-1.0.3-r2[${MULTILIB_USEDEP}] ) - libass? ( >=media-libs/libass-0.11.0:=[${MULTILIB_USEDEP}] ) - libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] ) - libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) - libdvdnav? ( media-libs/libdvdnav[${MULTILIB_USEDEP}] ) - libdvdread? ( media-libs/libdvdread:=[${MULTILIB_USEDEP}] ) - libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] ) - libplacebo? ( >=media-libs/libplacebo-4.192.0:=[$MULTILIB_USEDEP] ) - librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] ) - libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] ) - libtesseract? ( >=app-text/tesseract-4.1.0-r1[${MULTILIB_USEDEP}] ) - libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) - libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] ) - lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) - modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) - openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) - opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] ) - pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) - qsv? ( media-libs/libvpl[${MULTILIB_USEDEP}] ) - qrcode? ( media-gfx/qrencode:=[${MULTILIB_USEDEP}] ) - quirc? ( media-libs/quirc:=[${MULTILIB_USEDEP}] ) - rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] ) - samba? ( >=net-fs/samba-3.6.23-r1[client,${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] ) - shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] ) - sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) - soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) - speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] ) - srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] ) - ssh? ( >=net-libs/libssh-0.6.0:=[sftp,${MULTILIB_USEDEP}] ) - svg? ( - gnome-base/librsvg:2=[${MULTILIB_USEDEP}] - x11-libs/cairo[${MULTILIB_USEDEP}] - ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - svt-av1? ( >=media-libs/svt-av1-0.9.0:=[${MULTILIB_USEDEP}] ) - truetype? ( - >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] - media-libs/harfbuzz:=[${MULTILIB_USEDEP}] - ) - vaapi? ( >=media-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] ) - vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] ) - vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] ) - vmaf? ( >=media-libs/libvmaf-2.0.0:=[${MULTILIB_USEDEP}] ) - vorbis? ( - >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - ) - vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] ) - vulkan? ( >=media-libs/vulkan-loader-1.3.277:=[${MULTILIB_USEDEP}] ) - X? ( - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] - >=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}] - ) - zeromq? ( >=net-libs/zeromq-4.2.1:= ) - zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] ) - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) - zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] ) -" - -RDEPEND="${RDEPEND} - openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) - !openssl? ( gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) ) -" - -DEPEND="${RDEPEND} - amf? ( media-libs/amf-headers ) - ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] ) - v4l? ( sys-kernel/linux-headers ) - vulkan? ( >=dev-util/vulkan-headers-1.3.277 ) -" - -# += for verify-sig above -BDEPEND+=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) - cuda? ( >=llvm-core/clang-7[llvm_targets_NVPTX] ) - doc? ( sys-apps/texinfo ) - test? ( net-misc/wget app-alternatives/bc ) -" - -# Code requiring FFmpeg to be built under gpl license -GPL_REQUIRED_USE=" - postproc? ( gpl ) - frei0r? ( gpl ) - cdio? ( gpl ) - rubberband? ( gpl ) - vidstab? ( gpl ) - samba? ( gpl ) - encode? ( - x264? ( gpl ) - x265? ( gpl ) - xvid? ( gpl ) - ) -" -REQUIRED_USE=" - chromium? ( opus ) - cuda? ( nvenc ) - fftools_cws2fws? ( zlib ) - glslang? ( vulkan !shaderc ) - libv4l? ( v4l ) - shaderc? ( vulkan !glslang ) - soc? ( libdrm ) - test? ( encode ) - vulkan? ( threads ) - ${GPL_REQUIRED_USE} - ${CPU_REQUIRED_USE}" -RESTRICT=" - !test? ( test ) - gpl? ( openssl? ( bindist ) fdk? ( bindist ) ) -" - -PATCHES=( - "${FILESDIR}"/chromium-r2.patch - "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch - "${FILESDIR}"/${PN}-4.4.5-binutils-2.43-arm.patch -) - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/libavutil/avconfig.h -) - -pkg_setup() { - # ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg. - # May cause breakage while updating, #862996, #625210, #833821. - if has_version media-libs/chromaprint[tools] && use chromaprint; then - ewarn "You have media-libs/chromaprint installed with 'tools' USE flag, which " - ewarn "links to ffmpeg, and you have enabled 'chromaprint' USE flag for ffmpeg, " - ewarn "which links to chromaprint. This may cause issues while rebuilding ffmpeg." - ewarn "" - ewarn "If your build fails to 'ERROR: chromaprint not found', rebuild chromaprint " - ewarn "without the 'tools' use flag first, then rebuild ffmpeg, and then finally enable " - ewarn "'tools' USE flag for chromaprint. See #862996." - fi -} - -src_prepare() { - if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot - export revision=git-N-${FFMPEG_REVISION} - fi - - use soc && - eapply "${DISTDIR}"/${SOC_PATCH} - - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - ln -snf "${FILESDIR}"/chromium.c chromium.c || die - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die - - # We need to detect LTO usage before multilib stuff and filter-lto is called (bug #923491) - if tc-is-lto ; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ ${v} != -flto ]] && LTO_FLAG="--enable-lto=${v}" || LTO_FLAG="--enable-lto" - fi - filter-lto -} - -multilib_src_configure() { - local myconf=( ) - - # Conditional patch options - use soc && myconf+=( --enable-v4l2-request --enable-libudev --enable-sand ) - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - use openssl && myconf+=( --enable-nonfree ) - use samba && myconf+=( --enable-version3 ) - - # Encoders - if use encode ; then - ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) - - # Licensing. - if use amrenc ; then - myconf+=( --enable-version3 ) - fi - else - myconf+=( --disable-encoders ) - fi - - # Indevs - use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) - for i in alsa oss jack sndio ; do - use ${i} || myconf+=( --disable-indev=${i} ) - done - - # Outdevs - for i in alsa oss sndio ; do - use ${i} || myconf+=( --disable-outdev=${i} ) - done - - # Decoders - use amr && myconf+=( --enable-version3 ) - use gmp && myconf+=( --enable-version3 ) - use libaribb24 && myconf+=( --enable-version3 ) - use fdk && use gpl && myconf+=( --enable-nonfree ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - if use openssl ; then - myconf+=( --disable-gnutls ) - has_version dev-libs/openssl:0/3 && myconf+=( --enable-version3 ) - fi - - # (temporarily) disable non-multilib deps - if ! multilib_is_native_abi; then - for i in librav1e libzmq ; do - myconf+=( --disable-${i} ) - done - fi - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - if use pic ; then - myconf+=( --enable-pic ) - # disable asm code if PIC is required - # as the provided asm decidedly is not PIC for x86. - [[ ${ABI} == x86 ]] && myconf+=( --disable-asm ) - fi - [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004 - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 && ! -z ${LTO_FLAG} ]]; then - myconf+=( ${LTO_FLAG} ) - fi - - # Mandatory configuration - myconf=( - --disable-libaribcaption # libaribcaption is not packaged (yet?) - --disable-libxeve - --disable-libxevd - --disable-d3d12va - --enable-avfilter - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # doc - myconf+=( - $(multilib_native_use_enable doc) - $(multilib_native_use_enable doc htmlpages) - $(multilib_native_enable manpages) - ) - - if use elibc_musl ; then - append-cflags -D__musl__ - fi - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ - --mandir="${EPREFIX}/usr/share/man" \ - --enable-shared \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - $(use_enable static-libs static) \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - echo "${@}" - "${@}" || die -} - -multilib_src_compile() { - emake V=1 - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - emake V=1 tools/${i}$(get_exeext) - fi - done - - use chromium && - emake V=1 libffmpeg - fi -} - -multilib_src_test() { - LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \ - emake V=1 fate -k -} - -multilib_src_install() { - emake V=1 DESTDIR="${D}" install install-doc - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - dobin tools/${i}$(get_exeext) - fi - done - - use chromium && - emake V=1 DESTDIR="${D}" install-libffmpeg - fi -} - -multilib_src_install_all() { - dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges - [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" -} diff --git a/media-video/ffmpeg/ffmpeg-7.1.1.ebuild b/media-video/ffmpeg/ffmpeg-7.1.1.ebuild new file mode 100644 index 000000000000..48ce87160460 --- /dev/null +++ b/media-video/ffmpeg/ffmpeg-7.1.1.ebuild @@ -0,0 +1,593 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-minimal toolchain-funcs + +FFMPEG_SOC_PATCH=ffmpeg-rpi-7.1.1.patch +FFMPEG_SUBSLOT=59.61.61 # avutil.avcodec.avformat SONAME + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI=( + https://git.ffmpeg.org/ffmpeg.git + https://github.com/FFmpeg/FFmpeg.git + ) +else + inherit verify-sig + SRC_URI=" + https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz + verify-sig? ( https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz.asc ) + ${FFMPEG_SOC_PATCH:+" + soc? ( + https://dev.gentoo.org/~chewi/distfiles/${FFMPEG_SOC_PATCH} + verify-sig? ( https://dev.gentoo.org/~chewi/distfiles/${FFMPEG_SOC_PATCH}.asc ) + ) + "} + " + S=${WORKDIR}/ffmpeg-${PV} # avoid ${P} for ffmpeg-compat + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" +fi + +DESCRIPTION="Complete solution to record/convert/stream audio and video" +HOMEPAGE="https://ffmpeg.org/" + +[[ ${PN} == *-compat ]] && FFMPEG_UNSLOTTED= || FFMPEG_UNSLOTTED=1 + +FFMPEG_IUSE_MAP=( + # [+]flag[:[^][!]opt1,...][@<v3|nonfree>]], ^ = native-only, ! = override + # remember to keep LICENSE, REQUIRED_USE, and RESTRICT in sync + X:libxcb,libxcb-shape,libxcb-shm,libxcb-xfixes,xlib + alsa + amf + amrenc:libvo-amrwbenc@v3 + amr:libopencore-amrnb,libopencore-amrwb@v3 + appkit + bluray:libbluray + bs2b:libbs2b + bzip2:bzlib + cdio:libcdio + chromaprint + codec2:libcodec2 + cuda:cuda-llvm + +dav1d:libdav1d + ${FFMPEG_UNSLOTTED:+doc:^htmlpages} + +drm:libdrm + dvd:libdvdnav,libdvdread + fdk:libfdk-aac@nonfree + flite:libflite + +fontconfig:libfontconfig + frei0r + fribidi:libfribidi + gcrypt + gme:libgme + gmp:@v3 + +gnutls # unused if USE=openssl, default for bug #905113,#917627 + +gpl + gsm:libgsm + iec61883:libiec61883 + ieee1394:libdc1394 + jack:libjack + jpeg2k:libopenjpeg + jpegxl:libjxl + kvazaar:libkvazaar + ladspa + lame:libmp3lame + lcms:lcms2 + libaom + libaribb24:@v3 # reminder: req use on gpl unneeded if >=1.0.4 (not in tree) + +libass + libcaca + libilbc + liblc3 + libplacebo + librtmp:librtmp + libsoxr + libtesseract + lv2 + lzma + modplug:libmodplug + npp:^libnpp@nonfree # no multilib + nvenc:cuvid,ffnvcodec,nvdec,nvenc + openal + opencl + opengl + openh264:libopenh264 + openmpt:libopenmpt + openssl:openssl,!gnutls@v3ifgpl # still LGPL2.1+ if USE=-gpl + opus:libopus + +postproc # exposed as a USE for clarity with the GPL requirement + pulseaudio:libpulse + qrcode:libqrencode + qsv:libvpl + quirc:libquirc + rabbitmq:^librabbitmq # no multilib + rav1e:^librav1e # no multilib + rubberband:librubberband + samba:libsmbclient@v3 # GPL-3+ only + sdl:sdl2 + shaderc:libshaderc + snappy:libsnappy + sndio + speex:libspeex + srt:libsrt + ssh:libssh + svg:librsvg + svt-av1:libsvtav1 + theora:libtheora + +truetype:libfreetype,libharfbuzz + twolame:libtwolame + v4l:libv4l2 + vaapi + vdpau + vidstab:libvidstab + vmaf:libvmaf + vorbis:libvorbis + vpx:libvpx + vulkan + webp:libwebp + x264:libx264 + x265:libx265 + +xml:libxml2 + xvid:libxvid + zeromq:^libzmq # no multilib + zimg:libzimg + +zlib + zvbi:libzvbi +) + +# all-rights is used to express the GPL incompatibility (RESTRICT=bindist) +LICENSE=" + gpl? ( + GPL-2+ + amr? ( GPL-3+ ) amrenc? ( GPL-3+ ) libaribb24? ( GPL-3+ ) + gmp? ( GPL-3+ ) openssl? ( GPL-3+ ) + fdk? ( all-rights-reserved ) npp? ( all-rights-reserved ) + ) + !gpl? ( + LGPL-2.1+ + amr? ( LGPL-3+ ) amrenc? ( LGPL-3+ ) libaribb24? ( LGPL-3+ ) + gmp? ( LGPL-3+ ) + ) + samba? ( GPL-3+ ) +" +[[ ${FFMPEG_UNSLOTTED} ]] && : 0 || : "$(ver_cut 1)" +SLOT="${_}/${FFMPEG_SUBSLOT}" +IUSE=" + ${FFMPEG_IUSE_MAP[*]%:*} + ${FFMPEG_UNSLOTTED:+chromium} + ${FFMPEG_SOC_PATCH:+soc} +" +REQUIRED_USE=" + cuda? ( nvenc ) + fribidi? ( truetype ) + gmp? ( !librtmp ) + libplacebo? ( || ( sdl vulkan ) ) + npp? ( nvenc ) + shaderc? ( vulkan ) + libaribb24? ( gpl ) cdio? ( gpl ) dvd? ( gpl ) frei0r? ( gpl ) + postproc? ( gpl ) rubberband? ( gpl ) samba? ( gpl ) + vidstab? ( gpl ) x264? ( gpl ) x265? ( gpl ) xvid? ( gpl ) + ${FFMPEG_UNSLOTTED:+chromium? ( opus )} + ${FFMPEG_SOC_PATCH:+soc? ( drm )} +" +RESTRICT="gpl? ( fdk? ( bindist ) npp? ( bindist ) )" + +# dlopen: amdgpu-pro-amf, vulkan-loader +COMMON_DEPEND=" + virtual/libiconv[${MULTILIB_USEDEP}] + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXv[${MULTILIB_USEDEP}] + x11-libs/libxcb:=[${MULTILIB_USEDEP}] + ) + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) + amr? ( media-libs/opencore-amr[${MULTILIB_USEDEP}] ) + amrenc? ( media-libs/vo-amrwbenc[${MULTILIB_USEDEP}] ) + bluray? ( media-libs/libbluray:=[${MULTILIB_USEDEP}] ) + bs2b? ( media-libs/libbs2b[${MULTILIB_USEDEP}] ) + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) + cdio? ( dev-libs/libcdio-paranoia:=[${MULTILIB_USEDEP}] ) + chromaprint? ( media-libs/chromaprint:=[${MULTILIB_USEDEP}] ) + codec2? ( media-libs/codec2:=[${MULTILIB_USEDEP}] ) + dav1d? ( media-libs/dav1d:=[${MULTILIB_USEDEP}] ) + dvd? ( + media-libs/libdvdnav[${MULTILIB_USEDEP}] + media-libs/libdvdread:=[${MULTILIB_USEDEP}] + ) + drm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) + fdk? ( media-libs/fdk-aac:=[${MULTILIB_USEDEP}] ) + flite? ( app-accessibility/flite[${MULTILIB_USEDEP}] ) + fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) + frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) + fribidi? ( dev-libs/fribidi[${MULTILIB_USEDEP}] ) + gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] ) + gme? ( media-libs/game-music-emu[${MULTILIB_USEDEP}] ) + gmp? ( dev-libs/gmp:=[${MULTILIB_USEDEP}] ) + gnutls? ( !openssl? ( + net-libs/gnutls:=[${MULTILIB_USEDEP}] + ) ) + gsm? ( media-sound/gsm[${MULTILIB_USEDEP}] ) + iec61883? ( + media-libs/libiec61883[${MULTILIB_USEDEP}] + sys-libs/libavc1394[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] + ) + ieee1394? ( + media-libs/libdc1394:2=[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] + ) + jack? ( virtual/jack[${MULTILIB_USEDEP}] ) + jpeg2k? ( media-libs/openjpeg:2=[${MULTILIB_USEDEP}] ) + jpegxl? ( media-libs/libjxl:=[$MULTILIB_USEDEP] ) + kvazaar? ( media-libs/kvazaar:=[${MULTILIB_USEDEP}] ) + lame? ( media-sound/lame[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2[$MULTILIB_USEDEP] ) + libaom? ( media-libs/libaom:=[${MULTILIB_USEDEP}] ) + libaribb24? ( media-libs/aribb24[${MULTILIB_USEDEP}] ) + libass? ( media-libs/libass:=[${MULTILIB_USEDEP}] ) + libcaca? ( media-libs/libcaca[${MULTILIB_USEDEP}] ) + libilbc? ( media-libs/libilbc:=[${MULTILIB_USEDEP}] ) + liblc3? ( >=media-sound/liblc3-1.1[${MULTILIB_USEDEP}] ) + libplacebo? ( media-libs/libplacebo:=[$MULTILIB_USEDEP] ) + librtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] ) + libsoxr? ( media-libs/soxr[${MULTILIB_USEDEP}] ) + libtesseract? ( app-text/tesseract:=[${MULTILIB_USEDEP}] ) + lv2? ( + media-libs/lilv[${MULTILIB_USEDEP}] + media-libs/lv2[${MULTILIB_USEDEP}] + ) + lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] ) + modplug? ( media-libs/libmodplug[${MULTILIB_USEDEP}] ) + npp? ( dev-util/nvidia-cuda-toolkit:= ) + openal? ( media-libs/openal[${MULTILIB_USEDEP}] ) + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) + opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) + openh264? ( media-libs/openh264:=[${MULTILIB_USEDEP}] ) + openmpt? ( media-libs/libopenmpt[${MULTILIB_USEDEP}] ) + openssl? ( >=dev-libs/openssl-3:=[${MULTILIB_USEDEP}] ) + opus? ( media-libs/opus[${MULTILIB_USEDEP}] ) + pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) + qrcode? ( media-gfx/qrencode:=[${MULTILIB_USEDEP}] ) + qsv? ( media-libs/libvpl:=[${MULTILIB_USEDEP}] ) + quirc? ( media-libs/quirc:=[${MULTILIB_USEDEP}] ) + rabbitmq? ( net-libs/rabbitmq-c:= ) + rav1e? ( >=media-video/rav1e-0.5:=[capi] ) + rubberband? ( media-libs/rubberband:=[${MULTILIB_USEDEP}] ) + samba? ( net-fs/samba:=[client,${MULTILIB_USEDEP}] ) + sdl? ( media-libs/libsdl2[sound(+),video(+),${MULTILIB_USEDEP}] ) + shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] ) + snappy? ( app-arch/snappy:=[${MULTILIB_USEDEP}] ) + sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) + speex? ( media-libs/speex[${MULTILIB_USEDEP}] ) + srt? ( net-libs/srt:=[${MULTILIB_USEDEP}] ) + ssh? ( net-libs/libssh:=[sftp,${MULTILIB_USEDEP}] ) + svg? ( + dev-libs/glib:2[${MULTILIB_USEDEP}] + >=gnome-base/librsvg-2.52:2[${MULTILIB_USEDEP}] + x11-libs/cairo[${MULTILIB_USEDEP}] + ) + svt-av1? ( >=media-libs/svt-av1-0.9:=[${MULTILIB_USEDEP}] ) + theora? ( media-libs/libtheora[encode,${MULTILIB_USEDEP}] ) + truetype? ( + media-libs/freetype:2[${MULTILIB_USEDEP}] + media-libs/harfbuzz:=[${MULTILIB_USEDEP}] + ) + twolame? ( media-sound/twolame[${MULTILIB_USEDEP}] ) + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) + vaapi? ( media-libs/libva:=[X?,${MULTILIB_USEDEP}] ) + vdpau? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libvdpau[${MULTILIB_USEDEP}] + ) + vidstab? ( media-libs/vidstab[${MULTILIB_USEDEP}] ) + vmaf? ( media-libs/libvmaf:=[${MULTILIB_USEDEP}] ) + vorbis? ( media-libs/libvorbis[${MULTILIB_USEDEP}] ) + vpx? ( media-libs/libvpx:=[${MULTILIB_USEDEP}] ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) + webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] ) + x264? ( media-libs/x264:=[${MULTILIB_USEDEP}] ) + x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] ) + xml? ( dev-libs/libxml2[${MULTILIB_USEDEP}] ) + xvid? ( media-libs/xvid[${MULTILIB_USEDEP}] ) + zeromq? ( net-libs/zeromq:= ) + zimg? ( media-libs/zimg[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zvbi? ( media-libs/zvbi[${MULTILIB_USEDEP}] ) + ${FFMPEG_SOC_PATCH:+" + soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) + "} +" +RDEPEND=" + ${COMMON_DEPEND} + amf? ( media-video/amdgpu-pro-amf ) +" +DEPEND=" + ${COMMON_DEPEND} + X? ( x11-base/xorg-proto ) + amf? ( media-libs/amf-headers ) + kernel_linux? ( >=sys-kernel/linux-headers-6 ) + ladspa? ( media-libs/ladspa-sdk ) + nvenc? ( >=media-libs/nv-codec-headers-12.1.14.0 ) + opencl? ( dev-util/opencl-headers ) + vulkan? ( dev-util/vulkan-headers ) +" +BDEPEND=" + app-alternatives/awk + virtual/pkgconfig + amd64? ( + || ( + dev-lang/nasm + dev-lang/yasm + ) + ) + cuda? ( llvm-core/clang:*[llvm_targets_NVPTX] ) + ${FFMPEG_UNSLOTTED:+" + dev-lang/perl + doc? ( sys-apps/texinfo ) + "} +" +[[ ${PV} != 9999 ]] && + BDEPEND+=" + verify-sig? ( + sec-keys/openpgp-keys-ffmpeg + ${FFMPEG_SOC_PATCH:+" + soc? ( >=sec-keys/openpgp-keys-gentoo-developers-20240708 ) + "} + ) + " + +DOCS=( CREDITS Changelog README.md doc/APIchanges ) +[[ ${PV} != 9999 ]] && DOCS+=( RELEASE_NOTES ) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/libavutil/avconfig.h +) + +PATCHES=( + "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch + "${FILESDIR}"/${PN}-7.1.1-svt-av1-3.patch +) + +pkg_pretend() { + # TODO: drop this after a few months + if has_version "${CATEGORY}/${PN}[mp3]" && use !lame; then #952971 + ewarn "${PN}'s 'mp3' USE was renamed to 'lame', please enable it" + ewarn "if wish to keep the ability to encode using media-sound/lame." + ewarn "This is *not* needed if only want mp3 playback." + fi +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] || return + + if use chromaprint && has_version 'media-libs/chromaprint[tools]'; then + ewarn "media-libs/chromaprint is installed with USE=tools which links to" + ewarn "ffmpeg, and USE=chromaprint is enabled on ffmpeg which links to" + ewarn "chromaprint (circular). This may cause issues when updating ffmpeg." + ewarn + ewarn "If get a build failure with 'ERROR: chromaprint not found' or so," + ewarn "first rebuild chromaprint with USE=-tools, then rebuild ffmpeg, and" + ewarn "then finally rebuild chromaprint with USE=tools again (bug #862996)." + fi + + [[ ${EXTRA_FFMPEG_CONF} ]] && # drop this eventually + die "EXTRA_FFMPEG_CONF is set in the environment, please use EXTRA_ECONF instead" +} + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/ffmpeg-${PV}.tar.xz{,.asc} \ + "${BROOT}"/usr/share/openpgp-keys/ffmpeg.asc + in_iuse soc && use soc && + verify-sig_verify_detached "${DISTDIR}"/${FFMPEG_SOC_PATCH}{,.asc} \ + "${BROOT}"/usr/share/openpgp-keys/gentoo-developers.asc + fi + default + fi +} + +src_prepare() { + in_iuse chromium && PATCHES+=( "${FILESDIR}"/chromium-r3.patch ) + in_iuse soc && use soc && PATCHES+=( "${DISTDIR}"/${FFMPEG_SOC_PATCH} ) + + default + + # respect user preferences + sed -i '/cflags -fdiagnostics-color/d' configure || die + + # handle *FLAGS here to avoid repeating for each ABI below (bug #923491) + FFMPEG_ENABLE_LTO= + if tc-is-lto; then + : "$(get-flag flto)" # get -flto=<val> (e.g. =thin) + FFMPEG_ENABLE_LTO=--enable-lto${_#-flto} + fi + filter-lto + + if use npp; then + local cuda=${ESYSROOT}/opt/cuda/targets/$(usex amd64 x86_64 sbsa)-linux + append-cppflags -I"${cuda}"/include + append-ldflags -L"${cuda}"/lib + fi +} + +multilib_src_configure() { + local conf=( "${S}"/configure ) # not autotools-based + + local prefix=${EPREFIX}/usr + if [[ ! ${FFMPEG_UNSLOTTED} ]]; then + prefix+=/lib/ffmpeg${SLOT%/*} + # could get SONAME clashes, so prefer rpath over LDPATH + conf+=( + --enable-rpath + --disable-doc + ) + fi + + conf+=( + --prefix="${prefix}" + --libdir="${prefix}"/$(get_libdir) + --shlibdir="${prefix}"/$(get_libdir) + --mandir="${prefix}"/share/man + --docdir="${EPREFIX}"/usr/share/doc/${PF}/html + + --ar="$(tc-getAR)" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --nm="$(tc-getNM)" + --pkg-config="$(tc-getPKG_CONFIG)" + --ranlib="$(tc-getRANLIB)" + --disable-stripping + + # overrides users' -g/-O, let *FLAGS handle these + --disable-debug + --disable-optimizations + --optflags=' ' + + # pass option over *FLAGS due to special logic (bug #566282,#754654) + ${FFMPEG_ENABLE_LTO} + + # basic defaults that should not really need a USE + --enable-iconv + --enable-pic + --enable-shared + --disable-static + $(multilib_native_enable manpages) # needs pod2man + --disable-podpages + --disable-txtpages + + # disabled primarily due to being unpackaged + --disable-decklink + --disable-libaribcaption + --disable-libdavs2 + --disable-libklvanc + --disable-liblcevc-dec + --disable-libmysofa + --disable-libopenvino + --disable-libshine + --disable-libtls + --disable-libuavs3d + --disable-libvvenc + --disable-libxavs + --disable-libxavs2 + --disable-libxevd + --disable-libxeve + --disable-pocketsphinx + --disable-rkmpp + --disable-vapoursynth + + # disabled for other or additional reasons + --disable-cuda-nvcc # prefer cuda-llvm for less issues + --disable-libcelt # obsolete (bug #664158) + --disable-libglslang # prefer USE=shaderc (bug #918989,#920283,#922333) + --disable-liblensfun # https://trac.ffmpeg.org/ticket/9112 (abandoned?) + --disable-libmfx # prefer libvpl for USE=qsv + --disable-libopencv # leaving for later due to circular opencv[ffmpeg] + --disable-librist # librist itself needs attention first (bug #822012) + --disable-libtensorflow # causes headaches, and is gone + --disable-libtorch # support may need special attention (bug #936127) + --disable-mbedtls # messy with slots, tests underlinking issues + --disable-mmal # prefer USE=soc + --disable-omx # unsupported (bug #653386) + --disable-omx-rpi # ^ + + # to avoid obscure issues like bug #915384 and simplify the ebuild, + # not passing the following (use EXTRA_ECONF if really must): + # --cpu: adds -march=<exact> after the user's more adapted + # =native, its logic also does not account for -mno-* + # --disable/enable-<cpufeature>: safer to detect at runtime + ) + + in_iuse soc && use soc && + conf+=( + --disable-epoxy + --enable-libudev + --enable-sand + --enable-v4l2-request + ) + + # broken on x32 (bug #427004), and not PIC safe on x86 (bug #916067) + [[ ${ABI} == @(x32|x86) ]] && conf+=( --disable-asm ) + + # disable due to asm-related failures on ppc (bug #951464, ppc64be) + # https://trac.ffmpeg.org/ticket/9604 (ppc64el) + # https://trac.ffmpeg.org/ticket/10955 (ppc64el) + # (review re-enabling if resolved, or if debian allows it again) + use ppc || use ppc64 && conf+=( --disable-asm ) + + if tc-is-cross-compiler; then + conf+=( + --enable-cross-compile + --arch="$(tc-arch-kernel)" + --cross-prefix="${CHOST}-" + --host-cc="$(tc-getBUILD_CC)" + ) + case ${CHOST} in + *mingw32*) conf+=( --target-os=mingw32 );; + *linux*) conf+=( --target-os=linux );; + esac + fi + + # import options from FFMPEG_IUSE_MAP + local flag license mod v + local -A optmap=() licensemap=() + for v in "${FFMPEG_IUSE_MAP[@]}"; do + [[ ${v} =~ \+?([^:]+):?([^@]*)@?(.*) ]] || die "${v}" + flag=${BASH_REMATCH[1]} + license=${BASH_REMATCH[3]} + v=${BASH_REMATCH[2]:-${flag}} + for v in ${v//,/ }; do + mod=${v::1} + v=${v#[\!\^]} + if [[ ${mod} == '!' ]]; then + if use ${flag}; then + optmap[${v}]=--disable-${v} + unset licensemap[${v}] + fi + elif [[ ! -v optmap[${v}] ]]; then + if [[ ${mod} == '^' ]]; then + optmap[${v}]=$(multilib_native_use_enable ${flag} ${v}) + else + optmap[${v}]=$(use_enable ${flag} ${v}) + fi + use ${flag} && licensemap[${v}]=${license} + fi + done + done + for license in "${licensemap[@]}"; do + case ${license} in + v3ifgpl) use gpl || continue ;& + v3) optmap[v3]=--enable-version3 ;; + nonfree) use gpl && optmap[nonfree]=--enable-nonfree ;; + esac + done + conf+=( + "${optmap[@]}" + ${EXTRA_ECONF} + ) + + einfo "${conf[*]}" + "${conf[@]}" || die "configure failed, see ${BUILD_DIR}/ffbuild/config.log" +} + +multilib_src_compile() { + emake V=1 + in_iuse chromium && use chromium && multilib_is_native_abi && + emake V=1 libffmpeg +} + +multilib_src_test() { + local -x LD_LIBRARY_PATH=$(printf %s: "${BUILD_DIR}"/lib*)${LD_LIBRARY_PATH} + emake V=1 -k fate +} + +multilib_src_install() { + emake V=1 DESTDIR="${D}" install + in_iuse chromium && use chromium && multilib_is_native_abi && + emake V=1 DESTDIR="${D}" install-libffmpeg +} diff --git a/media-video/ffmpeg/ffmpeg-7.1.ebuild b/media-video/ffmpeg/ffmpeg-7.1.ebuild deleted file mode 100644 index 8abfd12d3bef..000000000000 --- a/media-video/ffmpeg/ffmpeg-7.1.ebuild +++ /dev/null @@ -1,625 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Subslot: libavutil major.libavcodec major.libavformat major -# Since FFmpeg ships several libraries, subslot is kind of limited here. -# Most consumers will use those three libraries, if a "less used" library -# changes its soname, consumers will have to be rebuilt the old way -# (preserve-libs). -# If, for example, a package does not link to libavformat and only libavformat -# changes its ABI then this package will be rebuilt needlessly. Hence, such a -# package is free _not_ to := depend on FFmpeg but I would strongly encourage -# doing so since such a case is unlikely. -FFMPEG_SUBSLOT=59.61.61 - -SOC_PATCH="ffmpeg-rpi-7.1.patch" - -SCM="" -if [ "${PV#9999}" != "${PV}" ] ; then - SCM="git-r3" - EGIT_MIN_CLONE_TYPE="single" - EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git" -fi - -inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM} - -DESCRIPTION="Complete solution to record/convert/stream audio and video. Includes libavcodec" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH} )" -if [ "${PV#9999}" != "${PV}" ] ; then - : -elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot - SRC_URI+=" mirror://gentoo/${P}.tar.xz" -else # Release - inherit verify-sig - - SRC_URI+=" - https://ffmpeg.org/releases/${P/_/-}.tar.xz - verify-sig? ( - https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc - soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH}.asc ) - ) - " - - BDEPEND=" - verify-sig? ( - sec-keys/openpgp-keys-ffmpeg - soc? ( >=sec-keys/openpgp-keys-gentoo-developers-20240708 ) - ) - " - - src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${P/_/-}.tar.xz{,.asc} /usr/share/openpgp-keys/ffmpeg.asc - use soc && verify-sig_verify_detached "${DISTDIR}"/${SOC_PATCH}{,.asc} /usr/share/openpgp-keys/gentoo-developers.asc - fi - default - } -fi -FFMPEG_REVISION="${PV#*_p}" - -S=${WORKDIR}/${P/_/-} -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) - amr? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - gmp? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - libaribb24? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - encode? ( - amrenc? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - ) - samba? ( GPL-3 ) -" -SLOT="0/${FFMPEG_SUBSLOT}" -if [ "${PV#9999}" = "${PV}" ] ; then - KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" -fi - -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt +gnutls gmp - +gpl hardcoded-tables +iconv libxml2 libdvdnav libdvdread lzma +network - opencl openssl +postproc qrcode:libqrencode quirc:libquirc - samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau vulkan - X:xlib X:libxcb X:libxcb-shape X:libxcb-shm X:libxcb-xfixes +zlib - # libavdevice options - cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal - opengl - # indevs - libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack - # decoders - amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac - jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm - libaribb24 liblc3 modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh - speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec - vorbis:libvorbis vpx:libvpx zvbi:libzvbi - # libavfilter options - appkit - bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite fontconfig frei0r - fribidi:libfribidi glslang:libglslang ladspa lcms:lcms2 libass libplacebo - libtesseract lv2 rubberband:librubberband shaderc:libshaderc truetype:libfreetype - truetype:libharfbuzz vidstab:libvidstab vmaf:libvmaf zeromq:libzmq zimg:libzimg - # libswresample options - libsoxr - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) - -# Same as above but for encoders, i.e. they do something only with USE=encode. -FFMPEG_ENCODER_FLAG_MAP=( - amf amrenc:libvo-amrwbenc kvazaar:libkvazaar libaom mp3:libmp3lame - openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1 - theora:libtheora twolame:libtwolame webp:libwebp x264:libx264 - x265:libx265 xvid:libxvid -) - -IUSE=" - alsa chromium doc +encode oss +pic sndio static-libs test v4l soc - ${FFMPEG_FLAG_MAP[@]%:*} - ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu ) -PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 ) -PPC_CPU_REQUIRED_USE=" - cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec ) - cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${MIPS_CPU_FEATURES[@]} - ${PPC_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${PPC_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt - graph2dot ismindex pktdumper qt-faststart sidxindex trasher ) -IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}" - -RDEPEND=" - alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) - amf? ( media-video/amdgpu-pro-amf ) - amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] ) - bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] ) - bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] ) - bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) - cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] ) - chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] ) - codec2? ( media-libs/codec2[${MULTILIB_USEDEP}] ) - dav1d? ( >=media-libs/dav1d-0.5.0:0=[${MULTILIB_USEDEP}] ) - encode? ( - amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] ) - kvazaar? ( >=media-libs/kvazaar-2.0.0[${MULTILIB_USEDEP}] ) - mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] ) - openh264? ( >=media-libs/openh264-1.4.0-r1:=[${MULTILIB_USEDEP}] ) - rav1e? ( >=media-video/rav1e-0.5:=[capi] ) - snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] ) - theora? ( - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] - ) - twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] ) - webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] ) - x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] ) - x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] ) - xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] ) - ) - fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] ) - flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] ) - fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] ) - frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) - fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] ) - gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] ) - glslang? ( dev-util/glslang:=[${MULTILIB_USEDEP}] ) - gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] ) - gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] ) - gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] ) - iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] ) - iec61883? ( - >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}] - ) - ieee1394? ( - >=media-libs/libdc1394-2.2.1:2=[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] - ) - jack? ( virtual/jack[${MULTILIB_USEDEP}] ) - jpeg2k? ( >=media-libs/openjpeg-2.1:2=[${MULTILIB_USEDEP}] ) - jpegxl? ( >=media-libs/libjxl-0.7.0:=[$MULTILIB_USEDEP] ) - lcms? ( >=media-libs/lcms-2.13:2[$MULTILIB_USEDEP] ) - libaom? ( >=media-libs/libaom-2.0.0:=[${MULTILIB_USEDEP}] ) - libaribb24? ( >=media-libs/aribb24-1.0.3-r2[${MULTILIB_USEDEP}] ) - libass? ( >=media-libs/libass-0.11.0:=[${MULTILIB_USEDEP}] ) - libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] ) - libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) - libdvdnav? ( media-libs/libdvdnav[${MULTILIB_USEDEP}] ) - libdvdread? ( media-libs/libdvdread:=[${MULTILIB_USEDEP}] ) - libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] ) - liblc3? ( >=media-sound/liblc3-1.1.0[${MULTILIB_USEDEP}] ) - libplacebo? ( >=media-libs/libplacebo-4.192.0:=[$MULTILIB_USEDEP] ) - librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] ) - libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] ) - libtesseract? ( >=app-text/tesseract-4.1.0-r1[${MULTILIB_USEDEP}] ) - libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) - libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] ) - lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) - modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) - openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) - opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] ) - pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) - qsv? ( media-libs/libvpl[${MULTILIB_USEDEP}] ) - qrcode? ( media-gfx/qrencode:=[${MULTILIB_USEDEP}] ) - quirc? ( media-libs/quirc:=[${MULTILIB_USEDEP}] ) - rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] ) - samba? ( >=net-fs/samba-3.6.23-r1[client,${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] ) - shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] ) - sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) - soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) - speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] ) - srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] ) - ssh? ( >=net-libs/libssh-0.6.0:=[sftp,${MULTILIB_USEDEP}] ) - svg? ( - gnome-base/librsvg:2=[${MULTILIB_USEDEP}] - x11-libs/cairo[${MULTILIB_USEDEP}] - ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - svt-av1? ( >=media-libs/svt-av1-0.9.0:=[${MULTILIB_USEDEP}] ) - truetype? ( - >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] - media-libs/harfbuzz:=[${MULTILIB_USEDEP}] - ) - vaapi? ( >=media-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] ) - vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] ) - vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] ) - vmaf? ( >=media-libs/libvmaf-2.0.0:=[${MULTILIB_USEDEP}] ) - vorbis? ( - >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - ) - vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] ) - vulkan? ( >=media-libs/vulkan-loader-1.3.277:=[${MULTILIB_USEDEP}] ) - X? ( - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] - >=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}] - ) - zeromq? ( >=net-libs/zeromq-4.2.1:= ) - zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] ) - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) - zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] ) -" - -RDEPEND="${RDEPEND} - openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) - !openssl? ( gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) ) -" - -DEPEND="${RDEPEND} - amf? ( media-libs/amf-headers ) - ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] ) - v4l? ( sys-kernel/linux-headers ) - vulkan? ( >=dev-util/vulkan-headers-1.3.277 ) -" - -# += for verify-sig above -BDEPEND+=" - >=dev-build/make-3.81 - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) - cuda? ( >=llvm-core/clang-7[llvm_targets_NVPTX] ) - doc? ( sys-apps/texinfo ) - test? ( net-misc/wget app-alternatives/bc ) -" - -# Code requiring FFmpeg to be built under gpl license -GPL_REQUIRED_USE=" - postproc? ( gpl ) - frei0r? ( gpl ) - cdio? ( gpl ) - rubberband? ( gpl ) - vidstab? ( gpl ) - samba? ( gpl ) - encode? ( - x264? ( gpl ) - x265? ( gpl ) - xvid? ( gpl ) - ) -" -REQUIRED_USE=" - chromium? ( opus ) - cuda? ( nvenc ) - fftools_cws2fws? ( zlib ) - glslang? ( vulkan !shaderc ) - libv4l? ( v4l ) - shaderc? ( vulkan !glslang ) - soc? ( libdrm ) - test? ( encode ) - vulkan? ( threads ) - ${GPL_REQUIRED_USE} - ${CPU_REQUIRED_USE}" -RESTRICT=" - !test? ( test ) - gpl? ( openssl? ( bindist ) fdk? ( bindist ) ) -" - -PATCHES=( - "${FILESDIR}"/chromium-r2.patch - "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch -) - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/libavutil/avconfig.h -) - -pkg_setup() { - # ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg. - # May cause breakage while updating, #862996, #625210, #833821. - if has_version media-libs/chromaprint[tools] && use chromaprint; then - ewarn "You have media-libs/chromaprint installed with 'tools' USE flag, which " - ewarn "links to ffmpeg, and you have enabled 'chromaprint' USE flag for ffmpeg, " - ewarn "which links to chromaprint. This may cause issues while rebuilding ffmpeg." - ewarn "" - ewarn "If your build fails to 'ERROR: chromaprint not found', rebuild chromaprint " - ewarn "without the 'tools' use flag first, then rebuild ffmpeg, and then finally enable " - ewarn "'tools' USE flag for chromaprint. See #862996." - fi -} - -src_prepare() { - if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot - export revision=git-N-${FFMPEG_REVISION} - fi - - use soc && - eapply "${DISTDIR}"/${SOC_PATCH} - - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - ln -snf "${FILESDIR}"/chromium.c chromium.c || die - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die - - # We need to detect LTO usage before multilib stuff and filter-lto is called (bug #923491) - if tc-is-lto ; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ ${v} != -flto ]] && LTO_FLAG="--enable-lto=${v}" || LTO_FLAG="--enable-lto" - fi - filter-lto -} - -multilib_src_configure() { - local myconf=( ) - - # Conditional patch options - use soc && myconf+=( --enable-v4l2-request --enable-libudev --enable-sand ) - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - use openssl && myconf+=( --enable-nonfree ) - use samba && myconf+=( --enable-version3 ) - - # Encoders - if use encode ; then - ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) - - # Licensing. - if use amrenc ; then - myconf+=( --enable-version3 ) - fi - else - myconf+=( --disable-encoders ) - fi - - # Indevs - use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) - for i in alsa oss jack sndio ; do - use ${i} || myconf+=( --disable-indev=${i} ) - done - - # Outdevs - for i in alsa oss sndio ; do - use ${i} || myconf+=( --disable-outdev=${i} ) - done - - # Decoders - use amr && myconf+=( --enable-version3 ) - use gmp && myconf+=( --enable-version3 ) - use libaribb24 && myconf+=( --enable-version3 ) - use fdk && use gpl && myconf+=( --enable-nonfree ) - - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done - - if use openssl ; then - myconf+=( --disable-gnutls ) - has_version dev-libs/openssl:0/3 && myconf+=( --enable-version3 ) - fi - - # (temporarily) disable non-multilib deps - if ! multilib_is_native_abi; then - for i in librav1e libzmq ; do - myconf+=( --disable-${i} ) - done - fi - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - if use pic ; then - myconf+=( --enable-pic ) - # disable asm code if PIC is required - # as the provided asm decidedly is not PIC for x86. - [[ ${ABI} == x86 ]] && myconf+=( --disable-asm ) - fi - [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004 - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 && ! -z ${LTO_FLAG} ]]; then - myconf+=( ${LTO_FLAG} ) - fi - - # Mandatory configuration - myconf=( - --disable-libaribcaption # not yet packaged - --disable-libxeve - --disable-libxevd - --disable-d3d12va - --disable-liblcevc_dec # not yet packaged - --enable-avfilter - --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. - --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" - ) - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - # doc - myconf+=( - $(multilib_native_use_enable doc) - $(multilib_native_use_enable doc htmlpages) - $(multilib_native_enable manpages) - ) - - # skip broken test https://trac.ffmpeg.org/ticket/11225 - if use test; then - myconf+=( - --ignore-tests=ffmpeg-spec-disposition - ) - fi - - if use elibc_musl ; then - append-cflags -DHAVE_POSIX_IOCTL - fi - - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ - --mandir="${EPREFIX}/usr/share/man" \ - --enable-shared \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - $(use_enable static-libs static) \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - echo "${@}" - "${@}" || die -} - -multilib_src_compile() { - emake V=1 - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - emake V=1 tools/${i}$(get_exeext) - fi - done - - use chromium && - emake V=1 libffmpeg - fi -} - -multilib_src_test() { - LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \ - emake V=1 fate -k -} - -multilib_src_install() { - emake V=1 DESTDIR="${D}" install install-doc - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - dobin tools/${i}$(get_exeext) - fi - done - - use chromium && - emake V=1 DESTDIR="${D}" install-libffmpeg - fi -} - -multilib_src_install_all() { - dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges - [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" -} diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild index 23c710e1d5ac..7ddbfafb70fc 100644 --- a/media-video/ffmpeg/ffmpeg-9999.ebuild +++ b/media-video/ffmpeg/ffmpeg-9999.ebuild @@ -1,630 +1,587 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -# Subslot: libavutil major.libavcodec major.libavformat major -# Since FFmpeg ships several libraries, subslot is kind of limited here. -# Most consumers will use those three libraries, if a "less used" library -# changes its soname, consumers will have to be rebuilt the old way -# (preserve-libs). -# If, for example, a package does not link to libavformat and only libavformat -# changes its ABI then this package will be rebuilt needlessly. Hence, such a -# package is free _not_ to := depend on FFmpeg but I would strongly encourage -# doing so since such a case is unlikely. -FFMPEG_SUBSLOT=59.61.61 - -SOC_PATCH="ffmpeg-rpi-7.1.patch" - -SCM="" -if [ "${PV#9999}" != "${PV}" ] ; then - SCM="git-r3" - EGIT_MIN_CLONE_TYPE="single" - EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git" -fi +inherit flag-o-matic multilib-minimal toolchain-funcs -inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM} +FFMPEG_SOC_PATCH= +FFMPEG_SUBSLOT=60.62.62 # avutil.avcodec.avformat SONAME -DESCRIPTION="Complete solution to record/convert/stream audio and video. Includes libavcodec" -HOMEPAGE="https://ffmpeg.org/" -SRC_URI="soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH} )" -if [ "${PV#9999}" != "${PV}" ] ; then - : -elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot - SRC_URI+=" mirror://gentoo/${P}.tar.xz" -else # Release +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI=( + https://git.ffmpeg.org/ffmpeg.git + https://github.com/FFmpeg/FFmpeg.git + ) +else inherit verify-sig - - SRC_URI+=" - https://ffmpeg.org/releases/${P/_/-}.tar.xz - verify-sig? ( - https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc - soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH}.asc ) - ) + SRC_URI=" + https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz + verify-sig? ( https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz.asc ) + ${FFMPEG_SOC_PATCH:+" + soc? ( + https://dev.gentoo.org/~chewi/distfiles/${FFMPEG_SOC_PATCH} + verify-sig? ( https://dev.gentoo.org/~chewi/distfiles/${FFMPEG_SOC_PATCH}.asc ) + ) + "} " - - BDEPEND=" - verify-sig? ( - sec-keys/openpgp-keys-ffmpeg - soc? ( >=sec-keys/openpgp-keys-gentoo-developers-20240708 ) - ) - " - - src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${P/_/-}.tar.xz{,.asc} /usr/share/openpgp-keys/ffmpeg.asc - use soc && verify-sig_verify_detached "${DISTDIR}"/${SOC_PATCH}{,.asc} /usr/share/openpgp-keys/gentoo-developers.asc - fi - default - } -fi -FFMPEG_REVISION="${PV#*_p}" - -S=${WORKDIR}/${P/_/-} -LICENSE=" - !gpl? ( LGPL-2.1 ) - gpl? ( GPL-2 ) - amr? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - gmp? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - libaribb24? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - encode? ( - amrenc? ( - gpl? ( GPL-3 ) - !gpl? ( LGPL-3 ) - ) - ) - samba? ( GPL-3 ) -" -SLOT="0/${FFMPEG_SUBSLOT}" -if [ "${PV#9999}" = "${PV}" ] ; then + S=${WORKDIR}/ffmpeg-${PV} # avoid ${P} for ffmpeg-compat KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" fi -# Options to use as use_enable in the foo[:bar] form. -# This will feed configure with $(use_enable foo bar) -# or $(use_enable foo foo) if no :bar is set. -# foo is added to IUSE. -FFMPEG_FLAG_MAP=( - +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt +gnutls gmp - +gpl hardcoded-tables +iconv libxml2 libdvdnav libdvdread lzma +network - opencl openssl +postproc qrcode:libqrencode quirc:libquirc - samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau vulkan - X:xlib X:libxcb X:libxcb-shape X:libxcb-shm X:libxcb-xfixes +zlib - # libavdevice options - cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal - opengl - # indevs - libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack - # decoders - amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac - jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm - libaribb24 liblc3 modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh - speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec - vorbis:libvorbis vpx:libvpx zvbi:libzvbi - # libavfilter options - appkit - bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite fontconfig frei0r - fribidi:libfribidi glslang:libglslang ladspa lcms:lcms2 libass libplacebo - libtesseract lv2 rubberband:librubberband shaderc:libshaderc truetype:libfreetype - truetype:libharfbuzz vidstab:libvidstab vmaf:libvmaf zeromq:libzmq zimg:libzimg - # libswresample options - libsoxr - # Threads; we only support pthread for now but ffmpeg supports more - +threads:pthreads -) +DESCRIPTION="Complete solution to record/convert/stream audio and video" +HOMEPAGE="https://ffmpeg.org/" -# Same as above but for encoders, i.e. they do something only with USE=encode. -FFMPEG_ENCODER_FLAG_MAP=( - amf amrenc:libvo-amrwbenc kvazaar:libkvazaar libaom mp3:libmp3lame - openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1 - theora:libtheora twolame:libtwolame webp:libwebp x264:libx264 - x265:libx265 xvid:libxvid +[[ ${PN} == *-compat ]] && FFMPEG_UNSLOTTED= || FFMPEG_UNSLOTTED=1 + +FFMPEG_IUSE_MAP=( + # [+]flag[:[^][!]opt1,...][@<v3|nonfree>]], ^ = native-only, ! = override + # remember to keep LICENSE, REQUIRED_USE, and RESTRICT in sync + X:libxcb,libxcb-shape,libxcb-shm,libxcb-xfixes,xlib + alsa + amf + amrenc:libvo-amrwbenc@v3 + amr:libopencore-amrnb,libopencore-amrwb@v3 + appkit + bluray:libbluray + bs2b:libbs2b + bzip2:bzlib + cdio:libcdio + chromaprint + codec2:libcodec2 + cuda:cuda-llvm + +dav1d:libdav1d + ${FFMPEG_UNSLOTTED:+doc:^htmlpages} + +drm:libdrm + dvd:libdvdnav,libdvdread + fdk:libfdk-aac@nonfree + flite:libflite + +fontconfig:libfontconfig + frei0r + fribidi:libfribidi + gcrypt + gme:libgme + gmp:@v3 + +gnutls # unused if USE=openssl, default for bug #905113,#917627 + +gpl + gsm:libgsm + iec61883:libiec61883 + ieee1394:libdc1394 + jack:libjack + jpeg2k:libopenjpeg + jpegxl:libjxl + kvazaar:libkvazaar + ladspa + lame:libmp3lame + lcms:lcms2 + libaom + libaribb24:@v3 # reminder: req use on gpl unneeded if >=1.0.4 (not in tree) + +libass + libcaca + libilbc + liblc3 + libplacebo + librtmp:librtmp + libsoxr + libtesseract + lv2 + lzma + modplug:libmodplug + npp:^libnpp@nonfree # no multilib + nvenc:cuvid,ffnvcodec,nvdec,nvenc + openal + opencl + opengl + openh264:libopenh264 + openmpt:libopenmpt + openssl:openssl,!gnutls@v3ifgpl # still LGPL2.1+ if USE=-gpl + opus:libopus + +postproc # exposed as a USE for clarity with the GPL requirement + pulseaudio:libpulse + qrcode:libqrencode + qsv:libvpl + quirc:libquirc + rabbitmq:^librabbitmq # no multilib + rav1e:^librav1e # no multilib + rubberband:librubberband + samba:libsmbclient@v3 # GPL-3+ only + sdl:sdl2 + shaderc:libshaderc + snappy:libsnappy + sndio + speex:libspeex + srt:libsrt + ssh:libssh + svg:librsvg + svt-av1:libsvtav1 + theora:libtheora + +truetype:libfreetype,libharfbuzz + twolame:libtwolame + v4l:libv4l2 + vaapi + vdpau + vidstab:libvidstab + vmaf:libvmaf + vorbis:libvorbis + vpx:libvpx + vulkan:vulkan,vulkan-static # still uses shared, only means no dlopen() + webp:libwebp + x264:libx264 + x265:libx265 + +xml:libxml2 + xvid:libxvid + zeromq:^libzmq # no multilib + zimg:libzimg + +zlib + zvbi:libzvbi ) -IUSE=" - alsa chromium doc +encode oss +pic sndio static-libs test v4l soc - ${FFMPEG_FLAG_MAP[@]%:*} - ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} -" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm - cpu_flags_arm_sve:sve - cpu_flags_arm_sve2:sve2 -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) +# all-rights is used to express the GPL incompatibility (RESTRICT=bindist) +LICENSE=" + gpl? ( + GPL-2+ + amr? ( GPL-3+ ) amrenc? ( GPL-3+ ) libaribb24? ( GPL-3+ ) + gmp? ( GPL-3+ ) openssl? ( GPL-3+ ) + fdk? ( all-rights-reserved ) npp? ( all-rights-reserved ) ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) + !gpl? ( + LGPL-2.1+ + amr? ( LGPL-3+ ) amrenc? ( LGPL-3+ ) libaribb24? ( LGPL-3+ ) + gmp? ( LGPL-3+ ) ) - cpu_flags_arm_sve2? ( cpu_flags_arm_sve ) - cpu_flags_arm_sve? ( cpu_flags_arm_v8 ) -" -MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu ) -PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 ) -PPC_CPU_REQUIRED_USE=" - cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec ) - cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx ) + samba? ( GPL-3+ ) " -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) +[[ ${FFMPEG_UNSLOTTED} ]] && : 0 || : "$(ver_cut 1)" +SLOT="${_}/${FFMPEG_SUBSLOT}" +IUSE=" + ${FFMPEG_IUSE_MAP[*]%:*} + ${FFMPEG_UNSLOTTED:+chromium} + ${FFMPEG_SOC_PATCH:+soc} " - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${MIPS_CPU_FEATURES[@]} - ${PPC_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${PPC_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} +REQUIRED_USE=" + cuda? ( nvenc ) + fribidi? ( truetype ) + gmp? ( !librtmp ) + libplacebo? ( || ( sdl vulkan ) ) + npp? ( nvenc ) + shaderc? ( vulkan ) + libaribb24? ( gpl ) cdio? ( gpl ) dvd? ( gpl ) frei0r? ( gpl ) + postproc? ( gpl ) rubberband? ( gpl ) samba? ( gpl ) + vidstab? ( gpl ) x264? ( gpl ) x265? ( gpl ) xvid? ( gpl ) + ${FFMPEG_UNSLOTTED:+chromium? ( opus )} + ${FFMPEG_SOC_PATCH:+soc? ( drm )} " +RESTRICT="gpl? ( fdk? ( bindist ) npp? ( bindist ) )" -FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt - graph2dot ismindex pktdumper qt-faststart sidxindex trasher ) -IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}" - -RDEPEND=" - alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) - amf? ( media-video/amdgpu-pro-amf ) - amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] ) - bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] ) - bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] ) - bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) - cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] ) - chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] ) - codec2? ( media-libs/codec2[${MULTILIB_USEDEP}] ) - dav1d? ( >=media-libs/dav1d-0.5.0:0=[${MULTILIB_USEDEP}] ) - encode? ( - amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] ) - kvazaar? ( >=media-libs/kvazaar-2.0.0[${MULTILIB_USEDEP}] ) - mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] ) - openh264? ( >=media-libs/openh264-1.4.0-r1:=[${MULTILIB_USEDEP}] ) - rav1e? ( >=media-video/rav1e-0.5:=[capi] ) - snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] ) - theora? ( - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] - ) - twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] ) - webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] ) - x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] ) - x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] ) - xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] ) +# dlopen: amdgpu-pro-amf +COMMON_DEPEND=" + virtual/libiconv[${MULTILIB_USEDEP}] + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXv[${MULTILIB_USEDEP}] + x11-libs/libxcb:=[${MULTILIB_USEDEP}] ) - fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] ) - flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] ) - fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] ) + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) + amr? ( media-libs/opencore-amr[${MULTILIB_USEDEP}] ) + amrenc? ( media-libs/vo-amrwbenc[${MULTILIB_USEDEP}] ) + bluray? ( media-libs/libbluray:=[${MULTILIB_USEDEP}] ) + bs2b? ( media-libs/libbs2b[${MULTILIB_USEDEP}] ) + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) + cdio? ( dev-libs/libcdio-paranoia:=[${MULTILIB_USEDEP}] ) + chromaprint? ( media-libs/chromaprint:=[${MULTILIB_USEDEP}] ) + codec2? ( media-libs/codec2:=[${MULTILIB_USEDEP}] ) + dav1d? ( media-libs/dav1d:=[${MULTILIB_USEDEP}] ) + dvd? ( + media-libs/libdvdnav[${MULTILIB_USEDEP}] + media-libs/libdvdread:=[${MULTILIB_USEDEP}] + ) + drm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) + fdk? ( media-libs/fdk-aac:=[${MULTILIB_USEDEP}] ) + flite? ( app-accessibility/flite[${MULTILIB_USEDEP}] ) + fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) frei0r? ( media-plugins/frei0r-plugins[${MULTILIB_USEDEP}] ) - fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] ) - gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] ) - glslang? ( dev-util/glslang:=[${MULTILIB_USEDEP}] ) - gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] ) - gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] ) - gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] ) - iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] ) + fribidi? ( dev-libs/fribidi[${MULTILIB_USEDEP}] ) + gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] ) + gme? ( media-libs/game-music-emu[${MULTILIB_USEDEP}] ) + gmp? ( dev-libs/gmp:=[${MULTILIB_USEDEP}] ) + gnutls? ( !openssl? ( + net-libs/gnutls:=[${MULTILIB_USEDEP}] + ) ) + gsm? ( media-sound/gsm[${MULTILIB_USEDEP}] ) iec61883? ( - >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] - >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}] + media-libs/libiec61883[${MULTILIB_USEDEP}] + sys-libs/libavc1394[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] ) ieee1394? ( - >=media-libs/libdc1394-2.2.1:2=[${MULTILIB_USEDEP}] - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] + media-libs/libdc1394:2=[${MULTILIB_USEDEP}] + sys-libs/libraw1394[${MULTILIB_USEDEP}] ) jack? ( virtual/jack[${MULTILIB_USEDEP}] ) - jpeg2k? ( >=media-libs/openjpeg-2.1:2=[${MULTILIB_USEDEP}] ) - jpegxl? ( >=media-libs/libjxl-0.7.0:=[$MULTILIB_USEDEP] ) - lcms? ( >=media-libs/lcms-2.13:2[$MULTILIB_USEDEP] ) - libaom? ( >=media-libs/libaom-2.0.0:=[${MULTILIB_USEDEP}] ) - libaribb24? ( >=media-libs/aribb24-1.0.3-r2[${MULTILIB_USEDEP}] ) - libass? ( >=media-libs/libass-0.11.0:=[${MULTILIB_USEDEP}] ) - libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] ) - libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) - libdvdnav? ( media-libs/libdvdnav[${MULTILIB_USEDEP}] ) - libdvdread? ( media-libs/libdvdread:=[${MULTILIB_USEDEP}] ) - libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] ) - liblc3? ( >=media-sound/liblc3-1.1.0[${MULTILIB_USEDEP}] ) - libplacebo? ( >=media-libs/libplacebo-4.192.0:=[$MULTILIB_USEDEP] ) - librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] ) - libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] ) - libtesseract? ( >=app-text/tesseract-4.1.0-r1[${MULTILIB_USEDEP}] ) - libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) - libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] ) - lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) - modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) - openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) + jpeg2k? ( media-libs/openjpeg:2=[${MULTILIB_USEDEP}] ) + jpegxl? ( media-libs/libjxl:=[$MULTILIB_USEDEP] ) + kvazaar? ( media-libs/kvazaar:=[${MULTILIB_USEDEP}] ) + lame? ( media-sound/lame[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2[$MULTILIB_USEDEP] ) + libaom? ( media-libs/libaom:=[${MULTILIB_USEDEP}] ) + libaribb24? ( media-libs/aribb24[${MULTILIB_USEDEP}] ) + libass? ( media-libs/libass:=[${MULTILIB_USEDEP}] ) + libcaca? ( media-libs/libcaca[${MULTILIB_USEDEP}] ) + libilbc? ( media-libs/libilbc:=[${MULTILIB_USEDEP}] ) + liblc3? ( >=media-sound/liblc3-1.1[${MULTILIB_USEDEP}] ) + libplacebo? ( media-libs/libplacebo:=[$MULTILIB_USEDEP] ) + librtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] ) + libsoxr? ( media-libs/soxr[${MULTILIB_USEDEP}] ) + libtesseract? ( app-text/tesseract:=[${MULTILIB_USEDEP}] ) + lv2? ( + media-libs/lilv[${MULTILIB_USEDEP}] + media-libs/lv2[${MULTILIB_USEDEP}] + ) + lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] ) + modplug? ( media-libs/libmodplug[${MULTILIB_USEDEP}] ) + npp? ( dev-util/nvidia-cuda-toolkit:= ) + openal? ( media-libs/openal[${MULTILIB_USEDEP}] ) opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) - opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] ) + openh264? ( media-libs/openh264:=[${MULTILIB_USEDEP}] ) + openmpt? ( media-libs/libopenmpt[${MULTILIB_USEDEP}] ) + openssl? ( >=dev-libs/openssl-3:=[${MULTILIB_USEDEP}] ) + opus? ( media-libs/opus[${MULTILIB_USEDEP}] ) pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) - qsv? ( media-libs/libvpl[${MULTILIB_USEDEP}] ) qrcode? ( media-gfx/qrencode:=[${MULTILIB_USEDEP}] ) + qsv? ( media-libs/libvpl:=[${MULTILIB_USEDEP}] ) quirc? ( media-libs/quirc:=[${MULTILIB_USEDEP}] ) - rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] ) - samba? ( >=net-fs/samba-3.6.23-r1[client,${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] ) + rabbitmq? ( net-libs/rabbitmq-c:= ) + rav1e? ( >=media-video/rav1e-0.5:=[capi] ) + rubberband? ( media-libs/rubberband:=[${MULTILIB_USEDEP}] ) + samba? ( net-fs/samba:=[client,${MULTILIB_USEDEP}] ) + sdl? ( media-libs/libsdl2[sound(+),video(+),${MULTILIB_USEDEP}] ) shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] ) + snappy? ( app-arch/snappy:=[${MULTILIB_USEDEP}] ) sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) - soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) - speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] ) - srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] ) - ssh? ( >=net-libs/libssh-0.6.0:=[sftp,${MULTILIB_USEDEP}] ) + speex? ( media-libs/speex[${MULTILIB_USEDEP}] ) + srt? ( net-libs/srt:=[${MULTILIB_USEDEP}] ) + ssh? ( net-libs/libssh:=[sftp,${MULTILIB_USEDEP}] ) svg? ( - gnome-base/librsvg:2=[${MULTILIB_USEDEP}] + dev-libs/glib:2[${MULTILIB_USEDEP}] + >=gnome-base/librsvg-2.52:2[${MULTILIB_USEDEP}] x11-libs/cairo[${MULTILIB_USEDEP}] ) - nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 ) - svt-av1? ( >=media-libs/svt-av1-0.9.0:=[${MULTILIB_USEDEP}] ) + svt-av1? ( >=media-libs/svt-av1-0.9:=[${MULTILIB_USEDEP}] ) + theora? ( media-libs/libtheora[encode,${MULTILIB_USEDEP}] ) truetype? ( - >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] + media-libs/freetype:2[${MULTILIB_USEDEP}] media-libs/harfbuzz:=[${MULTILIB_USEDEP}] ) - vaapi? ( >=media-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] ) - vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] ) - vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] ) - vmaf? ( >=media-libs/libvmaf-2.0.0:=[${MULTILIB_USEDEP}] ) - vorbis? ( - >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] - ) - vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] ) - vulkan? ( >=media-libs/vulkan-loader-1.3.277:=[${MULTILIB_USEDEP}] ) - X? ( - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] - >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] - >=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}] + twolame? ( media-sound/twolame[${MULTILIB_USEDEP}] ) + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) + vaapi? ( media-libs/libva:=[X?,${MULTILIB_USEDEP}] ) + vdpau? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libvdpau[${MULTILIB_USEDEP}] ) - zeromq? ( >=net-libs/zeromq-4.2.1:= ) - zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] ) - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) - zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] ) + vidstab? ( media-libs/vidstab[${MULTILIB_USEDEP}] ) + vmaf? ( media-libs/libvmaf:=[${MULTILIB_USEDEP}] ) + vorbis? ( media-libs/libvorbis[${MULTILIB_USEDEP}] ) + vpx? ( media-libs/libvpx:=[${MULTILIB_USEDEP}] ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) + webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] ) + x264? ( media-libs/x264:=[${MULTILIB_USEDEP}] ) + x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] ) + xml? ( dev-libs/libxml2[${MULTILIB_USEDEP}] ) + xvid? ( media-libs/xvid[${MULTILIB_USEDEP}] ) + zeromq? ( net-libs/zeromq:= ) + zimg? ( media-libs/zimg[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zvbi? ( media-libs/zvbi[${MULTILIB_USEDEP}] ) + ${FFMPEG_SOC_PATCH:+" + soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) + "} " - -RDEPEND="${RDEPEND} - openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) - !openssl? ( gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) ) +RDEPEND=" + ${COMMON_DEPEND} + amf? ( media-video/amdgpu-pro-amf ) " - -DEPEND="${RDEPEND} +DEPEND=" + ${COMMON_DEPEND} + X? ( x11-base/xorg-proto ) amf? ( >=media-libs/amf-headers-1.4.35 ) - ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] ) - v4l? ( sys-kernel/linux-headers ) - vulkan? ( >=dev-util/vulkan-headers-1.3.277 ) + kernel_linux? ( >=sys-kernel/linux-headers-6 ) + ladspa? ( media-libs/ladspa-sdk ) + nvenc? ( >=media-libs/nv-codec-headers-12.1.14.0 ) + opencl? ( dev-util/opencl-headers ) + vulkan? ( dev-util/vulkan-headers ) " - -# += for verify-sig above -BDEPEND+=" - >=dev-build/make-3.81 +BDEPEND=" + app-alternatives/awk virtual/pkgconfig - cpu_flags_x86_mmx? ( >=dev-lang/nasm-2.13 ) - cuda? ( >=llvm-core/clang-7[llvm_targets_NVPTX] ) - doc? ( sys-apps/texinfo ) - test? ( net-misc/wget app-alternatives/bc ) -" - -# Code requiring FFmpeg to be built under gpl license -GPL_REQUIRED_USE=" - postproc? ( gpl ) - frei0r? ( gpl ) - cdio? ( gpl ) - rubberband? ( gpl ) - vidstab? ( gpl ) - samba? ( gpl ) - encode? ( - x264? ( gpl ) - x265? ( gpl ) - xvid? ( gpl ) - ) -" -REQUIRED_USE=" - chromium? ( opus ) - cuda? ( nvenc ) - fftools_cws2fws? ( zlib ) - glslang? ( vulkan !shaderc ) - libv4l? ( v4l ) - shaderc? ( vulkan !glslang ) - soc? ( libdrm ) - test? ( encode ) - vulkan? ( threads ) - ${GPL_REQUIRED_USE} - ${CPU_REQUIRED_USE}" -RESTRICT=" - !test? ( test ) - gpl? ( openssl? ( bindist ) fdk? ( bindist ) ) + amd64? ( dev-lang/nasm ) + cuda? ( llvm-core/clang:*[llvm_targets_NVPTX] ) + ${FFMPEG_UNSLOTTED:+" + dev-lang/perl + doc? ( sys-apps/texinfo ) + "} " +[[ ${PV} != 9999 ]] && + BDEPEND+=" + verify-sig? ( + sec-keys/openpgp-keys-ffmpeg + ${FFMPEG_SOC_PATCH:+" + soc? ( >=sec-keys/openpgp-keys-gentoo-developers-20240708 ) + "} + ) + " -PATCHES=( - "${FILESDIR}"/chromium-r2.patch - "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch -) +DOCS=( CREDITS Changelog README.md doc/APIchanges ) +[[ ${PV} != 9999 ]] && DOCS+=( RELEASE_NOTES ) MULTILIB_WRAPPED_HEADERS=( /usr/include/libavutil/avconfig.h ) -pkg_setup() { - # ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg. - # May cause breakage while updating, #862996, #625210, #833821. - if has_version media-libs/chromaprint[tools] && use chromaprint; then - ewarn "You have media-libs/chromaprint installed with 'tools' USE flag, which " - ewarn "links to ffmpeg, and you have enabled 'chromaprint' USE flag for ffmpeg, " - ewarn "which links to chromaprint. This may cause issues while rebuilding ffmpeg." - ewarn "" - ewarn "If your build fails to 'ERROR: chromaprint not found', rebuild chromaprint " - ewarn "without the 'tools' use flag first, then rebuild ffmpeg, and then finally enable " - ewarn "'tools' USE flag for chromaprint. See #862996." +PATCHES=( + "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch +) + +pkg_pretend() { + # TODO: drop this after a few months + if has_version "${CATEGORY}/${PN}[mp3]" && use !lame; then #952971 + ewarn "${PN}'s 'mp3' USE was renamed to 'lame', please enable it" + ewarn "if wish to keep the ability to encode using media-sound/lame." + ewarn "This is *not* needed if only want mp3 playback." fi } -src_prepare() { - if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot - export revision=git-N-${FFMPEG_REVISION} +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] || return + + if use chromaprint && has_version 'media-libs/chromaprint[tools]'; then + ewarn "media-libs/chromaprint is installed with USE=tools which links to" + ewarn "ffmpeg, and USE=chromaprint is enabled on ffmpeg which links to" + ewarn "chromaprint (circular). This may cause issues when updating ffmpeg." + ewarn + ewarn "If get a build failure with 'ERROR: chromaprint not found' or so," + ewarn "first rebuild chromaprint with USE=-tools, then rebuild ffmpeg, and" + ewarn "then finally rebuild chromaprint with USE=tools again (bug #862996)." fi - use soc && - eapply "${DISTDIR}"/${SOC_PATCH} - - default - - # -fdiagnostics-color=auto gets appended after user flags which - # will ignore user's preference. - sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die - - ln -snf "${FILESDIR}"/chromium.c chromium.c || die - echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die - - # We need to detect LTO usage before multilib stuff and filter-lto is called (bug #923491) - if tc-is-lto ; then - # Respect -flto value, e.g -flto=thin - local v="$(get-flag flto)" - [[ ${v} != -flto ]] && LTO_FLAG="--enable-lto=${v}" || LTO_FLAG="--enable-lto" - fi - filter-lto + [[ ${EXTRA_FFMPEG_CONF} ]] && # drop this eventually + die "EXTRA_FFMPEG_CONF is set in the environment, please use EXTRA_ECONF instead" } -multilib_src_configure() { - local myconf=( ) - - # Conditional patch options - use soc && myconf+=( --enable-v4l2-request --enable-libudev --enable-sand ) - - local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) - use openssl && myconf+=( --enable-nonfree ) - use samba && myconf+=( --enable-version3 ) - - # Encoders - if use encode ; then - ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) - - # Licensing. - if use amrenc ; then - myconf+=( --enable-version3 ) - fi +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack else - myconf+=( --disable-encoders ) + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/ffmpeg-${PV}.tar.xz{,.asc} \ + "${BROOT}"/usr/share/openpgp-keys/ffmpeg.asc + in_iuse soc && use soc && + verify-sig_verify_detached "${DISTDIR}"/${FFMPEG_SOC_PATCH}{,.asc} \ + "${BROOT}"/usr/share/openpgp-keys/gentoo-developers.asc + fi + default fi +} - # Indevs - use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) - for i in alsa oss jack sndio ; do - use ${i} || myconf+=( --disable-indev=${i} ) - done - - # Outdevs - for i in alsa oss sndio ; do - use ${i} || myconf+=( --disable-outdev=${i} ) - done - - # Decoders - use amr && myconf+=( --enable-version3 ) - use gmp && myconf+=( --enable-version3 ) - use libaribb24 && myconf+=( --enable-version3 ) - use fdk && use gpl && myconf+=( --enable-nonfree ) +src_prepare() { + in_iuse chromium && PATCHES+=( "${FILESDIR}"/chromium-r3.patch ) + in_iuse soc && use soc && PATCHES+=( "${DISTDIR}"/${FFMPEG_SOC_PATCH} ) - for i in "${ffuse[@]#+}" ; do - myconf+=( $(use_enable ${i%:*} ${i#*:}) ) - done + default - if use openssl ; then - myconf+=( --disable-gnutls ) - has_version dev-libs/openssl:0/3 && myconf+=( --enable-version3 ) - fi + # respect user preferences + sed -i '/cflags -fdiagnostics-color/d' configure || die - # (temporarily) disable non-multilib deps - if ! multilib_is_native_abi; then - for i in librav1e libzmq ; do - myconf+=( --disable-${i} ) - done + # handle *FLAGS here to avoid repeating for each ABI below (bug #923491) + FFMPEG_ENABLE_LTO= + if tc-is-lto; then + : "$(get-flag flto)" # get -flto=<val> (e.g. =thin) + FFMPEG_ENABLE_LTO=--enable-lto${_#-flto} fi + filter-lto - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - if use pic ; then - myconf+=( --enable-pic ) - # disable asm code if PIC is required - # as the provided asm decidedly is not PIC for x86. - [[ ${ABI} == x86 ]] && myconf+=( --disable-asm ) + if use npp; then + local cuda=${ESYSROOT}/opt/cuda/targets/$(usex amd64 x86_64 sbsa)-linux + append-cppflags -I"${cuda}"/include + append-ldflags -L"${cuda}"/lib fi - [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004 - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done +} - # LTO support, bug #566282, bug #754654, bug #772854 - if [[ ${ABI} != x86 && ! -z ${LTO_FLAG} ]]; then - myconf+=( ${LTO_FLAG} ) +multilib_src_configure() { + local conf=( "${S}"/configure ) # not autotools-based + + local prefix=${EPREFIX}/usr + if [[ ! ${FFMPEG_UNSLOTTED} ]]; then + prefix+=/lib/ffmpeg${SLOT%/*} + # could get SONAME clashes, so prefer rpath over LDPATH + conf+=( + --enable-rpath + --disable-doc + ) fi - # Mandatory configuration - myconf=( - --disable-libaribcaption # not yet packaged - --disable-libxeve - --disable-libxevd - --disable-d3d12va - --disable-liblcevc_dec # not yet packaged - --enable-avfilter + conf+=( + --prefix="${prefix}" + --libdir="${prefix}"/$(get_libdir) + --shlibdir="${prefix}"/$(get_libdir) + --mandir="${prefix}"/share/man + --docdir="${EPREFIX}"/usr/share/doc/${PF}/html + + --ar="$(tc-getAR)" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --nm="$(tc-getNM)" + --pkg-config="$(tc-getPKG_CONFIG)" + --ranlib="$(tc-getRANLIB)" --disable-stripping - # This is only for hardcoded cflags; those are used in configure checks that may - # interfere with proper detections, bug #671746 and bug #645778 - # We use optflags, so that overrides them anyway. + + # overrides users' -g/-O, let *FLAGS handle these + --disable-debug --disable-optimizations - --disable-libcelt # bug #664158 - "${myconf[@]}" + --optflags=' ' + + # pass option over *FLAGS due to special logic (bug #566282,#754654) + ${FFMPEG_ENABLE_LTO} + + # basic defaults that should not really need a USE + --enable-iconv + --enable-pic + --enable-shared + --disable-static + $(multilib_native_enable manpages) # needs pod2man + --disable-podpages + --disable-txtpages + + # disabled primarily due to being unpackaged + --disable-decklink + --disable-libaribcaption + --disable-libdavs2 + --disable-libklvanc + --disable-liblcevc-dec + --disable-libmysofa + --disable-libopenvino + --disable-libshine + --disable-libtls + --disable-libuavs3d + --disable-libvvenc + --disable-libxavs + --disable-libxavs2 + --disable-libxevd + --disable-libxeve + --disable-pocketsphinx + --disable-rkmpp + --disable-vapoursynth + + # disabled for other or additional reasons + --disable-cuda-nvcc # prefer cuda-llvm for less issues + --disable-libcelt # obsolete (bug #664158) + --disable-libglslang # prefer USE=shaderc (bug #918989,#920283,#922333) + --disable-liblensfun # https://trac.ffmpeg.org/ticket/9112 (abandoned?) + --disable-libmfx # prefer libvpl for USE=qsv + --disable-libopencv # leaving for later due to circular opencv[ffmpeg] + --disable-librist # librist itself needs attention first (bug #822012) + --disable-libtensorflow # causes headaches, and is gone + --disable-libtorch # support may need special attention (bug #936127) + --disable-mbedtls # messy with slots, tests underlinking issues + --disable-mmal # prefer USE=soc + --disable-omx # unsupported (bug #653386) + --disable-omx-rpi # ^ + + # to avoid obscure issues like bug #915384 and simplify the ebuild, + # not passing the following (use EXTRA_ECONF if really must): + # --cpu: adds -march=<exact> after the user's more adapted + # =native, its logic also does not account for -mno-* + # --disable/enable-<cpufeature>: safer to detect at runtime ) - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) + in_iuse soc && use soc && + conf+=( + --disable-epoxy + --enable-libudev + --enable-sand + --enable-v4l2-request + ) + + # broken on x32 (bug #427004), and not PIC safe on x86 (bug #916067) + [[ ${ABI} == @(x32|x86) ]] && conf+=( --disable-asm ) + + # disable due to asm-related failures on ppc (bug #951464, ppc64be) + # https://trac.ffmpeg.org/ticket/9604 (ppc64el) + # https://trac.ffmpeg.org/ticket/10955 (ppc64el) + # (review re-enabling if resolved, or if debian allows it again) + use ppc || use ppc64 && conf+=( --disable-asm ) + + if tc-is-cross-compiler; then + conf+=( + --enable-cross-compile + --arch="$(tc-arch-kernel)" + --cross-prefix="${CHOST}-" + --host-cc="$(tc-getBUILD_CC)" + ) case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; + *mingw32*) conf+=( --target-os=mingw32 );; + *linux*) conf+=( --target-os=linux );; esac fi - # doc - myconf+=( - $(multilib_native_use_enable doc) - $(multilib_native_use_enable doc htmlpages) - $(multilib_native_enable manpages) - ) - - # skip broken test https://trac.ffmpeg.org/ticket/11225 - if use test; then - myconf+=( - --ignore-tests=ffmpeg-spec-disposition + # import options from FFMPEG_IUSE_MAP + local flag license mod v + local -A optmap=() licensemap=() + for v in "${FFMPEG_IUSE_MAP[@]}"; do + [[ ${v} =~ \+?([^:]+):?([^@]*)@?(.*) ]] || die "${v}" + flag=${BASH_REMATCH[1]} + license=${BASH_REMATCH[3]} + v=${BASH_REMATCH[2]:-${flag}} + for v in ${v//,/ }; do + mod=${v::1} + v=${v#[\!\^]} + if [[ ${mod} == '!' ]]; then + if use ${flag}; then + optmap[${v}]=--disable-${v} + unset licensemap[${v}] + fi + elif [[ ! -v optmap[${v}] ]]; then + if [[ ${mod} == '^' ]]; then + optmap[${v}]=$(multilib_native_use_enable ${flag} ${v}) + else + optmap[${v}]=$(use_enable ${flag} ${v}) + fi + use ${flag} && licensemap[${v}]=${license} + fi + done + done + for license in "${licensemap[@]}"; do + case ${license} in + v3ifgpl) use gpl || continue ;& + v3) optmap[v3]=--enable-version3 ;; + nonfree) use gpl && optmap[nonfree]=--enable-nonfree ;; + esac + done + conf+=( + "${optmap[@]}" + ${EXTRA_ECONF} ) - fi - - if use elibc_musl ; then - append-cflags -DHAVE_POSIX_IOCTL - fi - # Use --extra-libs if needed for LIBS - set -- "${S}/configure" \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ - --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ - --mandir="${EPREFIX}/usr/share/man" \ - --enable-shared \ - --cc="$(tc-getCC)" \ - --cxx="$(tc-getCXX)" \ - --ar="$(tc-getAR)" \ - --nm="$(tc-getNM)" \ - --strip="$(tc-getSTRIP)" \ - --ranlib="$(tc-getRANLIB)" \ - --pkg-config="$(tc-getPKG_CONFIG)" \ - --optflags="${CFLAGS}" \ - $(use_enable static-libs static) \ - $(use_enable static-libs vulkan-static) \ - "${myconf[@]}" \ - ${EXTRA_FFMPEG_CONF} - echo "${@}" - "${@}" || die + einfo "${conf[*]}" + "${conf[@]}" || die "configure failed, see ${BUILD_DIR}/ffbuild/config.log" } multilib_src_compile() { emake V=1 - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - emake V=1 tools/${i}$(get_exeext) - fi - done - - use chromium && - emake V=1 libffmpeg - fi + in_iuse chromium && use chromium && multilib_is_native_abi && + emake V=1 libffmpeg } multilib_src_test() { - LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \ - emake V=1 fate -k + local -x LD_LIBRARY_PATH=$(printf %s: "${BUILD_DIR}"/lib*)${LD_LIBRARY_PATH} + emake V=1 -k fate } multilib_src_install() { - emake V=1 DESTDIR="${D}" install install-doc - - if multilib_is_native_abi; then - for i in "${FFTOOLS[@]}" ; do - if use fftools_${i} ; then - dobin tools/${i}$(get_exeext) - fi - done - - use chromium && - emake V=1 DESTDIR="${D}" install-libffmpeg - fi -} - -multilib_src_install_all() { - dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges - [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" + emake V=1 DESTDIR="${D}" install + in_iuse chromium && use chromium && multilib_is_native_abi && + emake V=1 DESTDIR="${D}" install-libffmpeg } diff --git a/media-video/ffmpeg/files/chromium-r1.patch b/media-video/ffmpeg/files/chromium-r1.patch deleted file mode 100644 index 514780035bc0..000000000000 --- a/media-video/ffmpeg/files/chromium-r1.patch +++ /dev/null @@ -1,42 +0,0 @@ -Allow libffmpeg to be built for Chromium-based browsers -https://patchwork.ffmpeg.org/patch/4500/ - -NOTE: This patch lacks the Makefile include line. We append it -manually instead to make patching across different versions easier. - -diff --git a/ffbuild/libffmpeg.mak b/ffbuild/libffmpeg.mak -new file mode 100644 -index 0000000..992cf3c ---- /dev/null -+++ b/ffbuild/libffmpeg.mak -@@ -0,0 +1,27 @@ -+LIBFFMPEG = $(SLIBPREF)ffmpeg$(SLIBSUF) -+LIBFFMPEG_LINK = $(LD) -shared -Wl,-soname,$(LIBFFMPEG) -Wl,-Bsymbolic -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--gc-sections $(LDFLAGS) $(LDLIBFLAGS) -o $(LIBFFMPEG) -+ -+ifeq ($(CONFIG_SHARED),yes) -+LIBFFMPEG_DEPS = libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF) -+else -+LIBFFMPEG_DEPS = libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) libavutil/$(LIBPREF)avutil$(LIBSUF) libswresample/$(LIBPREF)swresample$(LIBSUF) -+endif -+ -+$(LIBFFMPEG): $(LIBFFMPEG_DEPS) -+ifeq ($(CONFIG_SHARED),yes) -+ $(LIBFFMPEG_LINK) -Wl,--no-as-needed -lavcodec -lavformat -lavutil -+else -+ $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive $(EXTRALIBS-avcodec) $(EXTRALIBS-avformat) $(EXTRALIBS-avutil) $(EXTRALIBS-swresample) -+endif -+ -+libffmpeg: $(LIBFFMPEG) -+ -+install-libffmpeg: $(LIBFFMPEG) -+ $(Q)mkdir -p "$(SHLIBDIR)/chromium" -+ $(INSTALL) -m 755 $< "$(SHLIBDIR)/chromium/$<" -+ $(STRIP) "$(SHLIBDIR)/chromium/$<" -+ -+uninstall-libffmpeg: -+ $(RM) "$(SHLIBDIR)/chromium/$(LIBFFMPEG)" -+ -+.PHONY: libffmpeg install-libffmpeg uninstall-libffmpeg --- -2.13.1 - diff --git a/media-video/ffmpeg/files/chromium-r2.patch b/media-video/ffmpeg/files/chromium-r3.patch index 1de86fe09a1e..6d6e6c6e4828 100644 --- a/media-video/ffmpeg/files/chromium-r2.patch +++ b/media-video/ffmpeg/files/chromium-r3.patch @@ -1,13 +1,27 @@ Allow libffmpeg to be built for Chromium-based browsers https://patchwork.ffmpeg.org/patch/4500/ -NOTE: This patch lacks the Makefile include line. We append it -manually instead to make patching across different versions easier. +NOTE: This patch has -U1 unified context to be less likely +to need rebasing across ffmpeg versions. -diff --git a/ffbuild/libffmpeg.mak b/ffbuild/libffmpeg.mak -new file mode 100644 -index 0000000..992cf3c ---- /dev/null +--- a/Makefile ++++ b/Makefile +@@ -43,2 +43,3 @@ + include $(SRC_PATH)/ffbuild/common.mak ++include $(SRC_PATH)/ffbuild/libffmpeg.mak + +--- a/chromium.c ++++ b/chromium.c +@@ -0,0 +1,8 @@ ++#include "libavformat/avformat.h" ++#include "libavformat/internal.h" ++ ++int64_t av_stream_get_first_dts(const AVStream *st); ++int64_t av_stream_get_first_dts(const AVStream *st) ++{ ++ return cffstream(st)->first_dts; ++} +--- a/ffbuild/libffmpeg.mak +++ b/ffbuild/libffmpeg.mak @@ -0,0 +1,27 @@ +LIBFFMPEG = $(SLIBPREF)ffmpeg$(SLIBSUF) @@ -37,5 +51,3 @@ index 0000000..992cf3c + $(RM) "$(SHLIBDIR)/chromium/$(LIBFFMPEG)" + +.PHONY: libffmpeg install-libffmpeg uninstall-libffmpeg --- -2.13.1 diff --git a/media-video/ffmpeg/files/chromium.c b/media-video/ffmpeg/files/chromium.c deleted file mode 100644 index 66c2e9f6614f..000000000000 --- a/media-video/ffmpeg/files/chromium.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "libavformat/avformat.h" -#include "libavformat/internal.h" - -int64_t av_stream_get_first_dts(const AVStream *st); -int64_t av_stream_get_first_dts(const AVStream *st) -{ - return cffstream(st)->first_dts; -} diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch b/media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch deleted file mode 100644 index ed273975452d..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch +++ /dev/null @@ -1,24 +0,0 @@ -https://bugs.gentoo.org/901099 and partly https://bugs.gentoo.org/900937. - -Newer compilers may optimise such that < 7 registers are free on 32-bit x86 -and then we get an "invalid asm" error. This is https://bugs.gentoo.org/901099 -and https://trac.ffmpeg.org/ticket/8903. - -Making matters worse, GCC sometimes hangs on invalid asm, so this also -mitigates a hang with e.g. -O3 -march=znver1. See https://bugs.gentoo.org/900937 -and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109137. - -In future, we may want to adjust the definition of HAVE_7REGS to just exclude -32-bit x86, but that's a big sledgehammer, so let's avoid it for now until we have -a reply on the upstream ffmpeg bug. ---- a/libavcodec/x86/cabac.h -+++ b/libavcodec/x86/cabac.h -@@ -175,7 +175,7 @@ - - #endif /* BROKEN_RELOCATIONS */ - --#if HAVE_7REGS && !BROKEN_COMPILER -+#if HAVE_7REGS && !BROKEN_COMPILER && !ARCH_X86_32 - #define get_cabac_inline get_cabac_inline_x86 - static av_always_inline int get_cabac_inline_x86(CABACContext *c, - uint8_t *const state) diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.4-amd-av1-vaapi.patch b/media-video/ffmpeg/files/ffmpeg-4.4.4-amd-av1-vaapi.patch deleted file mode 100644 index 5f13edf68fca..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-4.4.4-amd-av1-vaapi.patch +++ /dev/null @@ -1,257 +0,0 @@ -https://bugs.gentoo.org/936310 -https://github.com/getsolus/packages/commit/50b029f7801c2c73da655e7dd5ae826244f9ae2c -https://gitlab.freedesktop.org/mesa/mesa/-/issues/11533#note_2495206 - -The backport here is from Solus who resolved a conflict for 4.4.x as it -doesn't apply cleanly there. - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: David Rosca <nowrep@gmail.com> -Date: Wed, 8 May 2024 09:11:11 +0200 -Subject: [PATCH 1/2] lavc/vaapi_decode: Make it possible to send multiple - slice params buffers - -Reviewed-by: Neal Gompa <ngompa13@gmail.com> -Signed-off-by: David Rosca <nowrep@gmail.com> -Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> ---- a/libavcodec/vaapi_av1.c -+++ b/libavcodec/vaapi_av1.c -@@ -419,7 +419,7 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - .tg_end = s->tg_end, - }; - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1, - sizeof(VASliceParameterBufferAV1), - buffer, - size); ---- a/libavcodec/vaapi_decode.c -+++ b/libavcodec/vaapi_decode.c -@@ -59,6 +59,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, - int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - VAAPIDecodePicture *pic, - const void *params_data, -+ int nb_params, - size_t params_size, - const void *slice_data, - size_t slice_size) -@@ -87,7 +88,7 @@ int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - - vas = vaCreateBuffer(ctx->hwctx->display, ctx->va_context, - VASliceParameterBufferType, -- params_size, 1, (void*)params_data, -+ params_size, nb_params, (void*)params_data, - &pic->slice_buffers[index]); - if (vas != VA_STATUS_SUCCESS) { - av_log(avctx, AV_LOG_ERROR, "Failed to create slice " ---- a/libavcodec/vaapi_decode.h -+++ b/libavcodec/vaapi_decode.h -@@ -86,6 +86,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, - int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - VAAPIDecodePicture *pic, - const void *params_data, -+ int nb_params, - size_t params_size, - const void *slice_data, - size_t slice_size); ---- a/libavcodec/vaapi_h264.c -+++ b/libavcodec/vaapi_h264.c -@@ -375,7 +375,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx, - slice_param.chroma_offset_l1); - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err) { - ff_vaapi_decode_cancel(avctx, pic); ---- a/libavcodec/vaapi_hevc.c -+++ b/libavcodec/vaapi_hevc.c -@@ -305,7 +305,7 @@ static int vaapi_hevc_end_frame(AVCodecContext *avctx) - if (pic->last_size) { - last_slice_param->LongSliceFlags.fields.LastSliceOfPic = 1; - ret = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic, -- &pic->last_slice_param, slice_param_size, -+ &pic->last_slice_param, 1, slice_param_size, - pic->last_buffer, pic->last_size); - if (ret < 0) - goto fail; -@@ -410,7 +410,7 @@ static int vaapi_hevc_decode_slice(AVCodecContext *avctx, - - if (!sh->first_slice_in_pic_flag) { - err = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic, -- &pic->last_slice_param, slice_param_size, -+ &pic->last_slice_param, 1, slice_param_size, - pic->last_buffer, pic->last_size); - pic->last_buffer = NULL; - pic->last_size = 0; ---- a/libavcodec/vaapi_mjpeg.c -+++ b/libavcodec/vaapi_mjpeg.c -@@ -131,7 +131,7 @@ static int vaapi_mjpeg_decode_slice(AVCodecContext *avctx, - sp.components[i].ac_table_selector = s->ac_index[i]; - } - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), buffer, size); -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), buffer, size); - if (err) - goto fail; - ---- a/libavcodec/vaapi_mpeg2.c -+++ b/libavcodec/vaapi_mpeg2.c -@@ -162,7 +162,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); ---- a/libavcodec/vaapi_mpeg4.c -+++ b/libavcodec/vaapi_mpeg4.c -@@ -167,7 +167,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); ---- a/libavcodec/vaapi_vc1.c -+++ b/libavcodec/vaapi_vc1.c -@@ -490,7 +490,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); ---- a/libavcodec/vaapi_vp8.c -+++ b/libavcodec/vaapi_vp8.c -@@ -209,7 +209,7 @@ static int vaapi_vp8_decode_slice(AVCodecContext *avctx, - for (i = 0; i < 8; i++) - sp.partition_size[i+1] = s->coeff_partition_size[i]; - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), data, data_size); -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), data, data_size); - if (err) - goto fail; - ---- a/libavcodec/vaapi_vp9.c -+++ b/libavcodec/vaapi_vp9.c -@@ -158,7 +158,7 @@ static int vaapi_vp9_decode_slice(AVCodecContext *avctx, - } - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err) { - ff_vaapi_decode_cancel(avctx, pic); - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: David Rosca <nowrep@gmail.com> -Date: Wed, 8 May 2024 09:11:13 +0200 -Subject: [PATCH 2/2] lavc/vaapi_av1: Avoid sending the same slice buffer - multiple times - -When there are multiple tiles in one slice buffer, use multiple slice -params to avoid sending the same slice buffer multiple times and thus -increasing the bitstream size the driver will need to upload to hw. - -Reviewed-by: Neal Gompa <ngompa13@gmail.com> -Signed-off-by: David Rosca <nowrep@gmail.com> -Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> ---- a/libavcodec/vaapi_av1.c -+++ b/libavcodec/vaapi_av1.c -@@ -19,6 +19,8 @@ - */ - - #include "libavutil/pixdesc.h" -+#include "libavutil/frame.h" -+#include "libavutil/mem.h" - #include "hwconfig.h" - #include "vaapi_decode.h" - #include "internal.h" -@@ -41,6 +43,9 @@ typedef struct VAAPIAV1DecContext { - */ - VAAPIAV1FrameRef ref_tab[AV1_NUM_REF_FRAMES]; - ThreadFrame tmp_frame; -+ -+ int nb_slice_params; -+ VASliceParameterBufferAV1 *slice_params; - } VAAPIAV1DecContext; - - static VASurfaceID vaapi_av1_surface_id(AV1Frame *vf) -@@ -107,6 +112,8 @@ static int vaapi_av1_decode_uninit(AVCodecContext *avctx) - av_frame_free(&ctx->ref_tab[i].frame.f); - } - -+ av_freep(&ctx->slice_params); -+ - return ff_vaapi_decode_uninit(avctx); - } - -@@ -403,13 +410,24 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - { - const AV1DecContext *s = avctx->priv_data; - VAAPIDecodePicture *pic = s->cur_frame.hwaccel_picture_private; -- VASliceParameterBufferAV1 slice_param; -- int err = 0; -+ VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data; -+ int err, nb_params; -+ -+ nb_params = s->tg_end - s->tg_start + 1; -+ if (ctx->nb_slice_params < nb_params) { -+ ctx->slice_params = av_realloc_array(ctx->slice_params, -+ nb_params, -+ sizeof(*ctx->slice_params)); -+ if (!ctx->slice_params) { -+ ctx->nb_slice_params = 0; -+ err = AVERROR(ENOMEM); -+ goto fail; -+ } -+ ctx->nb_slice_params = nb_params; -+ } - - for (int i = s->tg_start; i <= s->tg_end; i++) { -- memset(&slice_param, 0, sizeof(VASliceParameterBufferAV1)); -- -- slice_param = (VASliceParameterBufferAV1) { -+ ctx->slice_params[i - s->tg_start] = (VASliceParameterBufferAV1) { - .slice_data_size = s->tile_group_info[i].tile_size, - .slice_data_offset = s->tile_group_info[i].tile_offset, - .slice_data_flag = VA_SLICE_DATA_FLAG_ALL, -@@ -418,18 +436,20 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - .tg_start = s->tg_start, - .tg_end = s->tg_end, - }; -- -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1, -- sizeof(VASliceParameterBufferAV1), -- buffer, -- size); -- if (err) { -- ff_vaapi_decode_cancel(avctx, pic); -- return err; -- } - } - -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, ctx->slice_params, nb_params, -+ sizeof(VASliceParameterBufferAV1), -+ buffer, -+ size); -+ if (err) -+ goto fail; -+ - return 0; -+ -+fail: -+ ff_vaapi_decode_cancel(avctx, pic); -+ return err; - } - - const AVHWAccel ff_av1_vaapi_hwaccel = { diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.4-glslang.patch b/media-video/ffmpeg/files/ffmpeg-4.4.4-glslang.patch deleted file mode 100644 index f19bf8e47a42..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-4.4.4-glslang.patch +++ /dev/null @@ -1,25 +0,0 @@ -Bug: https://bugs.gentoo.org/926551 - -diff -Naur a/configure b/configure ---- a/configure 2024-03-09 22:07:52.005888104 +0000 -+++ b/configure 2024-03-09 22:08:18.634656978 +0000 -@@ -6374,7 +6374,7 @@ - enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig/fontconfig.h" FcInit - enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType - enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info --enabled libglslang && require_cpp libglslang glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -+enabled libglslang && require_cpp libglslang glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ - enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu || - require libgme gme/gme.h gme_new_emu -lgme -lstdc++; } - enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do -diff -Naur a/libavfilter/glslang.cpp b/libavfilter/glslang.cpp ---- a/libavfilter/glslang.cpp 2023-04-12 19:01:50.000000000 +0100 -+++ b/libavfilter/glslang.cpp 2024-03-09 22:08:36.210161783 +0000 -@@ -17,6 +17,7 @@ - */ - - #include <pthread.h> -+#include <cassert> - - extern "C" { - #include "libavutil/mem.h" diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.4-opencl-parallel-gmake-fix.patch b/media-video/ffmpeg/files/ffmpeg-4.4.4-opencl-parallel-gmake-fix.patch deleted file mode 100644 index 9ac8ec79cf2e..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-4.4.4-opencl-parallel-gmake-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -Bug: https://bugs.gentoo.org/782553 - ---- ffmpeg-4.4.4/tools/cl2c.orig 2024-03-14 04:53:45.468507151 +0300 -+++ ffmpeg-4.4.4/tools/cl2c 2024-03-14 04:54:53.503086088 +0300 -@@ -24,6 +24,7 @@ - - name=$(basename "$input" | sed 's/.cl$//') - -+mkdir -p "$(dirname "$output")" - cat >$output <<EOF - // Generated from $input - const char *ff_opencl_source_$name = diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.4-wint-conversion-vulkan.patch b/media-video/ffmpeg/files/ffmpeg-4.4.4-wint-conversion-vulkan.patch deleted file mode 100644 index f3766bb69f50..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-4.4.4-wint-conversion-vulkan.patch +++ /dev/null @@ -1,30 +0,0 @@ -https://bugs.gentoo.org/903752 -https://git.videolan.org/?p=ffmpeg.git;a=commit;h=cc76e8340d28438c1ac56ee7dfd774d25e944264 - -(Dropped second bit for vulkan.h as has changed significantly in >4.4.) - -From cc76e8340d28438c1ac56ee7dfd774d25e944264 Mon Sep 17 00:00:00 2001 -From: =?utf8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com> -Date: Thu, 2 Mar 2023 17:27:30 +0100 -Subject: [PATCH] lavu/vulkan: fix handle type for 32-bit targets -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf8 -Content-Transfer-Encoding: 8bit - -Fixes compilation with clang which errors out on Wint-conversion. - -Signed-off-by: Kacper Michajłow <kasper93@gmail.com> -Signed-off-by: Martin Storsjö <martin@martin.st> ---- a/libavutil/hwcontext_vulkan.c -+++ b/libavutil/hwcontext_vulkan.c -@@ -1149,7 +1149,7 @@ static void free_exec_ctx(AVHWFramesContext *hwfc, VulkanExecCtx *cmd) - - av_freep(&cmd->queues); - av_freep(&cmd->bufs); -- cmd->pool = NULL; -+ cmd->pool = VK_NULL_HANDLE; - } - - static VkCommandBuffer get_buf_exec_ctx(AVHWFramesContext *hwfc, VulkanExecCtx *cmd) - - diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.5-binutils-2.43-arm.patch b/media-video/ffmpeg/files/ffmpeg-4.4.5-binutils-2.43-arm.patch deleted file mode 100644 index 7ce8e0a038be..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-4.4.5-binutils-2.43-arm.patch +++ /dev/null @@ -1,60 +0,0 @@ -https://bugs.gentoo.org/942790 -https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/654bd47716c4f36719fb0f3f7fd8386d5ed0b916 - -From 654bd47716c4f36719fb0f3f7fd8386d5ed0b916 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@arm.com> -Date: Fri, 9 Aug 2024 11:32:00 +0100 -Subject: [PATCH] libavcodec/arm/mlpdsp_armv5te: fix label format to work with - binutils 2.43 -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf8 -Content-Transfer-Encoding: 8bit - -binutils 2.43 has stricter validation for labels[1] and results in errors -when building ffmpeg for armv5: - -src/libavcodec/arm/mlpdsp_armv5te.S:232: Error: junk at end of line, first unrecognized character is `0' - -Remove the leading zero in the "01" label to resolve this error. - -[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b - -Signed-off-by: Ross Burton <ross.burton@arm.com> -Signed-off-by: Martin Storsjö <martin@martin.st> ---- - libavcodec/arm/mlpdsp_armv5te.S | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/libavcodec/arm/mlpdsp_armv5te.S b/libavcodec/arm/mlpdsp_armv5te.S -index 4f9aa485fd..d31568611c 100644 ---- a/libavcodec/arm/mlpdsp_armv5te.S -+++ b/libavcodec/arm/mlpdsp_armv5te.S -@@ -229,7 +229,7 @@ A .endif - .endif - - // Begin loop --01: -+1: - .if TOTAL_TAPS == 0 - // Things simplify a lot in this case - // In fact this could be pipelined further if it's worth it... -@@ -241,7 +241,7 @@ A .endif - str ST0, [PST, #-4]! - str ST0, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)] - str ST0, [PSAMP], #4 * MAX_CHANNELS -- bne 01b -+ bne 1b - .else - .if \fir_taps & 1 - .set LOAD_REG, 1 -@@ -333,7 +333,7 @@ T orr AC0, AC0, AC1 - str ST3, [PST, #-4]! - str ST2, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)] - str ST3, [PSAMP], #4 * MAX_CHANNELS -- bne 01b -+ bne 1b - .endif - b 99f - --- -2.25.1 diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.5-incmptbl-pntr-types.patch b/media-video/ffmpeg/files/ffmpeg-4.4.5-incmptbl-pntr-types.patch deleted file mode 100644 index a47a62917a29..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-4.4.5-incmptbl-pntr-types.patch +++ /dev/null @@ -1,15 +0,0 @@ -https://bugs.gentoo.org/936433 - -diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c -index 4b81bd1..4e7f49f 100644 ---- a/libavutil/hwcontext_vaapi.c -+++ b/libavutil/hwcontext_vaapi.c -@@ -1032,7 +1032,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst, - uint32_t va_fourcc; - int err, i, j, k; - -- unsigned long buffer_handle; -+ uintptr_t buffer_handle; - VASurfaceAttribExternalBuffers buffer_desc; - VASurfaceAttrib attrs[2] = { - { diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.5-wint-inconversion-libgcrypt.patch b/media-video/ffmpeg/files/ffmpeg-4.4.5-wint-inconversion-libgcrypt.patch deleted file mode 100644 index a9c4fb2ab437..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-4.4.5-wint-inconversion-libgcrypt.patch +++ /dev/null @@ -1,69 +0,0 @@ -https://bugs.gentoo.org/944785 -https://bugs.gentoo.org/935377 -https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/42982b5a5d461530a792e69b3e8abdd9d6d67052 - -From 42982b5a5d461530a792e69b3e8abdd9d6d67052 Mon Sep 17 00:00:00 2001 -From: Frank Plowman <post@frankplowman.com> -Date: Fri, 22 Dec 2023 12:00:01 +0000 -Subject: [PATCH 1/1] avformat/ffrtmpcrypt: Fix int-conversion warning -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf8 -Content-Transfer-Encoding: 8bit - -The gcrypt definition of `bn_new` used to use the return statement -on errors, with an AVERROR return value, regardless of the signature -of the function where the macro is used - it is called in -`dh_generate_key` and `ff_dh_init` which return pointers. As a result, -compiling with gcrypt and the ffrtmpcrypt protocol resulted in an -int-conversion warning. GCC 14 may upgrade these to errors [1]. - -This patch fixes the problem by changing the macro to remove `AVERROR` -and instead set `bn` to null if the allocation fails. This is the -behaviour of all the other `bn_new` implementations and so the result is -already checked at all the callsites. AFAICT, this should be the only -change needed to get ffmpeg off Fedora's naughty list of projects with -warnings which may be upgraded to errors in GCC 14 [2]. - -[1]: https://gcc.gnu.org/pipermail/gcc/2023-May/241264.html -[2]: https://www.mail-archive.com/devel@lists.fedoraproject.org/msg196024.html - -Signed-off-by: Frank Plowman <post@frankplowman.com> -Signed-off-by: Martin Storsjö <martin@martin.st> ---- - libavformat/rtmpdh.c | 21 ++++++++++++--------- - 1 file changed, 12 insertions(+), 9 deletions(-) - -diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c -index 5ddae537a1..6a6c2ccd87 100644 ---- a/libavformat/rtmpdh.c -+++ b/libavformat/rtmpdh.c -@@ -113,15 +113,18 @@ static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p) - return 0; - } - #elif CONFIG_GCRYPT --#define bn_new(bn) \ -- do { \ -- if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \ -- if (!gcry_check_version("1.5.4")) \ -- return AVERROR(EINVAL); \ -- gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \ -- gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \ -- } \ -- bn = gcry_mpi_new(1); \ -+#define bn_new(bn) \ -+ do { \ -+ if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \ -+ if (gcry_check_version("1.5.4")) { \ -+ gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \ -+ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \ -+ } \ -+ } \ -+ if (gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) \ -+ bn = gcry_mpi_new(1); \ -+ else \ -+ bn = NULL; \ - } while (0) - #define bn_free(bn) gcry_mpi_release(bn) - #define bn_set_word(bn, w) gcry_mpi_set_ui(bn, w) --- -2.25.1 diff --git a/media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch b/media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch deleted file mode 100644 index 1c264f752099..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch +++ /dev/null @@ -1,59 +0,0 @@ -From bc5ccea3b9d2c71929af6271bd8afe9b6cfab436 Mon Sep 17 00:00:00 2001 -From: Adrian Ratiu <adrian.ratiu@collabora.com> -Date: Mon, 14 Feb 2022 15:00:07 +0200 -Subject: [PATCH] configure: move ranlib -D test after setting defaults -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Backport [from master bc5ccea3b9d2c7] - -In Gentoo and ChromeOS we want to allow pure LLVM builds without -using GNU tools, so we block any unwanted mixed GNU/LLVM usages -(GNU tools are still kept around in our chroots for projects -like glibc which cannot yet be built otherwise). - -The default ${cross_prefix}${ranlib_default} points to GNU and -fails, so move the test a bit later - after the defaults are -set and the proper values get overriden - such that ffmpeg -configure calls the llvm-ranlib we desire. [1] - -[1] https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/ffmpeg/ffmpeg-4.4.1-r1.ebuild?id=7a34377e3277a6a0e2eedd40e90452a44c55f1e6#n477 - -Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com> -Signed-off-by: Martin Storsjö <martin@martin.st> ---- - configure | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/configure b/configure -index 7d22c2a345..82642deabe 100755 ---- a/configure -+++ b/configure -@@ -4403,11 +4403,7 @@ cc_default="${cross_prefix}${cc_default}" - cxx_default="${cross_prefix}${cxx_default}" - nm_default="${cross_prefix}${nm_default}" - pkg_config_default="${cross_prefix}${pkg_config_default}" --if ${cross_prefix}${ranlib_default} 2>&1 | grep -q "\-D "; then -- ranlib_default="${cross_prefix}${ranlib_default} -D" --else -- ranlib_default="${cross_prefix}${ranlib_default}" --fi -+ranlib_default="${cross_prefix}${ranlib_default}" - strip_default="${cross_prefix}${strip_default}" - windres_default="${cross_prefix}${windres_default}" - -@@ -4440,6 +4436,10 @@ set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \ - enabled cross_compile || host_cc_default=$cc - set_default host_cc - -+if ${ranlib} 2>&1 | grep -q "\-D "; then -+ ranlib="${ranlib} -D" -+fi -+ - pkg_config_fail_message="" - if ! $pkg_config --version >/dev/null 2>&1; then - warn "$pkg_config not found, library detection may fail." --- -2.35.1 - diff --git a/media-video/ffmpeg/files/ffmpeg-6.0-fix-lto-type-mismatch.patch b/media-video/ffmpeg/files/ffmpeg-6.0-fix-lto-type-mismatch.patch deleted file mode 100644 index 9cc2dd732016..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-6.0-fix-lto-type-mismatch.patch +++ /dev/null @@ -1,41 +0,0 @@ -https://ffmpeg.org//pipermail/ffmpeg-devel/2023-November/317055.html -https://bugs.gentoo.org/907484 - -From 408882a387f75ae57524073385b47d68339ec486 Mon Sep 17 00:00:00 2001 -From: Alfred Wingate <parona@protonmail.com> -Date: Tue, 14 Nov 2023 13:26:47 +0000 -Subject: [PATCH 1/1] swscale/x86/rgb_2_rgb: Add opaque pointer to missed - definitions of ff_nv12ToUV - -Opaque parameters were previously added to the original definition of -ff_nv12ToUV, leading to gcc noticing a type mismatch with -Wlto-type-mismatch. - -https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/f2de911818fbd7e73343803626b697fd0c968121 -https://bugs.gentoo.org/907484 - -Signed-off-by: Alfred Wingate <parona@protonmail.com> -Signed-off-by: Anton Khirnov <anton@khirnov.net> ---- a/libswscale/x86/rgb2rgb_template.c -+++ b/libswscale/x86/rgb2rgb_template.c -@@ -1823,7 +1823,8 @@ void RENAME(ff_nv12ToUV)(uint8_t *dstU, uint8_t *dstV, - const uint8_t *src1, - const uint8_t *src2, - int w, -- uint32_t *unused2); -+ uint32_t *unused2, -+ void *opq); - static void RENAME(deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2, - int width, int height, int srcStride, - int dst1Stride, int dst2Stride) -@@ -1831,7 +1832,7 @@ static void RENAME(deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t - int h; - - for (h = 0; h < height; h++) { -- RENAME(ff_nv12ToUV)(dst1, dst2, NULL, src, NULL, width, NULL); -+ RENAME(ff_nv12ToUV)(dst1, dst2, NULL, src, NULL, width, NULL, NULL); - src += srcStride; - dst1 += dst1Stride; - dst2 += dst2Stride; --- -2.43.0 - diff --git a/media-video/ffmpeg/files/ffmpeg-6.0.1-alignment.patch b/media-video/ffmpeg/files/ffmpeg-6.0.1-alignment.patch deleted file mode 100644 index 256feab8aea2..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-6.0.1-alignment.patch +++ /dev/null @@ -1,114 +0,0 @@ -https://trac.ffmpeg.org/ticket/10549 -https://bugs.gentoo.org/915384 -https://git.videolan.org/?p=ffmpeg.git;a=patch;h=7945d30e91b96d2f4f5b612048169087d214d41e - -From 7945d30e91b96d2f4f5b612048169087d214d41e Mon Sep 17 00:00:00 2001 -From: Timo Rothenpieler <timo@rothenpieler.org> -Date: Sun, 3 Dec 2023 21:01:50 +0100 -Subject: [PATCH] avutil/mem: limit alignment to maximum simd align - -FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs, -which then end up heap-allocated. -By declaring any variable in a struct, or tree of structs, to be 32 byte -aligned, it allows the compiler to safely assume the entire struct -itself is also 32 byte aligned. - -This might make the compiler emit code which straight up crashes or -misbehaves in other ways, and at least in one instances is now -documented to actually do (see ticket 10549 on trac). -The issue there is that an unrelated variable in SingleChannelElement is -declared to have an alignment of 32 bytes. So if the compiler does a copy -in decode_cpe() with avx instructions, but ffmpeg is built with ---disable-avx, this results in a crash, since the memory is only 16 byte -aligned. - -Mind you, even if the compiler does not emit avx instructions, the code -is still invalid and could misbehave. It just happens not to. Declaring -any variable in a struct with a 32 byte alignment promises 32 byte -alignment of the whole struct to the compiler. - -This patch limits the maximum alignment to the maximum possible simd -alignment according to configure. -While not perfect, it at the very least gets rid of a lot of UB, by -matching up the maximum DECLARE_ALIGNED value with the alignment of heap -allocations done by lavu. ---- - libavutil/mem.c | 2 +- - libavutil/mem_internal.h | 33 ++++++++++++++++++++++++++++----- - 2 files changed, 29 insertions(+), 6 deletions(-) - -diff --git a/libavutil/mem.c b/libavutil/mem.c -index 36b8940a0c..62163b4cb3 100644 ---- a/libavutil/mem.c -+++ b/libavutil/mem.c -@@ -62,7 +62,7 @@ void free(void *ptr); - - #endif /* MALLOC_PREFIX */ - --#define ALIGN (HAVE_AVX512 ? 64 : (HAVE_AVX ? 32 : 16)) -+#define ALIGN (HAVE_SIMD_ALIGN_64 ? 64 : (HAVE_SIMD_ALIGN_32 ? 32 : 16)) - - /* NOTE: if you want to override these functions with your own - * implementations (not recommended) you have to link libav* as -diff --git a/libavutil/mem_internal.h b/libavutil/mem_internal.h -index 2448c606f1..b1d89a0605 100644 ---- a/libavutil/mem_internal.h -+++ b/libavutil/mem_internal.h -@@ -76,27 +76,50 @@ - */ - - #if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C) -- #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v -+ #define DECLARE_ALIGNED_T(n,t,v) t __attribute__ ((aligned (n))) v - #define DECLARE_ASM_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v - #define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v - #elif defined(__DJGPP__) -- #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (FFMIN(n, 16)))) v -+ #define DECLARE_ALIGNED_T(n,t,v) t __attribute__ ((aligned (FFMIN(n, 16)))) v - #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v - #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v - #elif defined(__GNUC__) || defined(__clang__) -- #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v -+ #define DECLARE_ALIGNED_T(n,t,v) t __attribute__ ((aligned (n))) v - #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (n))) v - #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v - #elif defined(_MSC_VER) -- #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v -+ #define DECLARE_ALIGNED_T(n,t,v) __declspec(align(n)) t v - #define DECLARE_ASM_ALIGNED(n,t,v) __declspec(align(n)) t v - #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v - #else -- #define DECLARE_ALIGNED(n,t,v) t v -+ #define DECLARE_ALIGNED_T(n,t,v) t v - #define DECLARE_ASM_ALIGNED(n,t,v) t v - #define DECLARE_ASM_CONST(n,t,v) static const t v - #endif - -+#if HAVE_SIMD_ALIGN_64 -+ #define ALIGN_64 64 -+ #define ALIGN_32 32 -+#elif HAVE_SIMD_ALIGN_32 -+ #define ALIGN_64 32 -+ #define ALIGN_32 32 -+#else -+ #define ALIGN_64 16 -+ #define ALIGN_32 16 -+#endif -+ -+#define DECLARE_ALIGNED(n,t,v) DECLARE_ALIGNED_V(n,t,v) -+ -+// Macro needs to be double-wrapped in order to expand -+// possible other macros being passed for n. -+#define DECLARE_ALIGNED_V(n,t,v) DECLARE_ALIGNED_##n(t,v) -+ -+#define DECLARE_ALIGNED_4(t,v) DECLARE_ALIGNED_T( 4, t, v) -+#define DECLARE_ALIGNED_8(t,v) DECLARE_ALIGNED_T( 8, t, v) -+#define DECLARE_ALIGNED_16(t,v) DECLARE_ALIGNED_T( 16, t, v) -+#define DECLARE_ALIGNED_32(t,v) DECLARE_ALIGNED_T(ALIGN_32, t, v) -+#define DECLARE_ALIGNED_64(t,v) DECLARE_ALIGNED_T(ALIGN_64, t, v) -+ - // Some broken preprocessors need a second expansion - // to be forced to tokenize __VA_ARGS__ - #define E1(x) x --- -2.30.2 diff --git a/media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch b/media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch deleted file mode 100644 index 0db7301f18d9..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c -index 29fc8bd648..1f85fac7f4 100644 ---- a/libavutil/hwcontext_vaapi.c -+++ b/libavutil/hwcontext_vaapi.c -@@ -1203,7 +1203,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst, - - if (!use_prime2 || vas != VA_STATUS_SUCCESS) { - int k; -- unsigned long buffer_handle; -+ uintptr_t buffer_handle; - VASurfaceAttribExternalBuffers buffer_desc; - VASurfaceAttrib buffer_attrs[2] = { - { diff --git a/media-video/ffmpeg/files/ffmpeg-6.1-wint-conversion.patch b/media-video/ffmpeg/files/ffmpeg-6.1-wint-conversion.patch deleted file mode 100644 index c95566117903..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-6.1-wint-conversion.patch +++ /dev/null @@ -1,88 +0,0 @@ -Sent upstream to the mailing list but stuck in moderation queue / not yet on archive. - -From 50f34826bcff90f393dfbc6c4e0c908556831d4d Mon Sep 17 00:00:00 2001 -From: Sam James <sam@gentoo.org> -Date: Wed, 13 Dec 2023 04:25:54 +0000 -Subject: [PATCH] libavcodec: fix -Wint-conversion in vulkan -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -FIx warnings (soon to be errors in GCC 14, already so in Clang 15): -``` -src/libavcodec/vulkan_av1.c: In function ‘vk_av1_create_params’: -src/libavcodec/vulkan_av1.c:183:43: error: initialization of ‘long long unsigned int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] - 183 | .videoSessionParametersTemplate = NULL, - | ^~~~ -src/libavcodec/vulkan_av1.c:183:43: note: (near initialization for ‘(anonymous).videoSessionParametersTemplate’) -``` - -Use Vulkan's VK_NULL_HANDLE instead of bare NULL. - -Fix Trac ticket #10724. - -Was reported downstream in Gentoo at https://bugs.gentoo.org/919067. - -Signed-off-by: Sam James <sam@gentoo.org> ---- a/libavcodec/vulkan_av1.c -+++ b/libavcodec/vulkan_av1.c -@@ -180,7 +180,7 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf) - .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, - .pNext = &av1_params, - .videoSession = ctx->common.session, -- .videoSessionParametersTemplate = NULL, -+ .videoSessionParametersTemplate = VK_NULL_HANDLE, - }; - - err = ff_vk_decode_create_params(buf, avctx, ctx, &session_params_create); ---- a/libavcodec/vulkan_decode.c -+++ b/libavcodec/vulkan_decode.c -@@ -188,9 +188,9 @@ int ff_vk_decode_prepare_frame(FFVulkanDecodeContext *dec, AVFrame *pic, - return 0; - - vkpic->dpb_frame = NULL; -- vkpic->img_view_ref = NULL; -- vkpic->img_view_out = NULL; -- vkpic->img_view_dest = NULL; -+ vkpic->img_view_ref = VK_NULL_HANDLE; -+ vkpic->img_view_out = VK_NULL_HANDLE; -+ vkpic->img_view_dest = VK_NULL_HANDLE; - - vkpic->destroy_image_view = vk->DestroyImageView; - vkpic->wait_semaphores = vk->WaitSemaphores; ---- a/libavcodec/vulkan_h264.c -+++ b/libavcodec/vulkan_h264.c -@@ -315,7 +315,7 @@ static int vk_h264_create_params(AVCodecContext *avctx, AVBufferRef **buf) - .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, - .pNext = &h264_params, - .videoSession = ctx->common.session, -- .videoSessionParametersTemplate = NULL, -+ .videoSessionParametersTemplate = VK_NULL_HANDLE, - }; - - /* SPS list */ ---- a/libavcodec/vulkan_hevc.c -+++ b/libavcodec/vulkan_hevc.c -@@ -653,7 +653,7 @@ static int vk_hevc_create_params(AVCodecContext *avctx, AVBufferRef **buf) - .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, - .pNext = &h265_params, - .videoSession = ctx->common.session, -- .videoSessionParametersTemplate = NULL, -+ .videoSessionParametersTemplate = VK_NULL_HANDLE, - }; - - HEVCHeaderSet *hdr; ---- a/libavcodec/vulkan_video.c -+++ b/libavcodec/vulkan_video.c -@@ -287,7 +287,7 @@ av_cold void ff_vk_video_common_uninit(FFVulkanContext *s, - if (common->session) { - vk->DestroyVideoSessionKHR(s->hwctx->act_dev, common->session, - s->hwctx->alloc); -- common->session = NULL; -+ common->session = VK_NULL_HANDLE; - } - - if (common->nb_mem && common->mem) --- -2.43.0 - diff --git a/media-video/ffmpeg/files/ffmpeg-6.1.1-amd-av1-vaapi.patch b/media-video/ffmpeg/files/ffmpeg-6.1.1-amd-av1-vaapi.patch deleted file mode 100644 index 41dc17353510..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-6.1.1-amd-av1-vaapi.patch +++ /dev/null @@ -1,254 +0,0 @@ -https://bugs.gentoo.org/936310 -https://gitlab.freedesktop.org/mesa/mesa/-/issues/11533 -https://github.com/FFmpeg/FFmpeg/commit/fe9d889dcd79ea18d4dfaa39df4ddbd4c8c3b15c -https://github.com/FFmpeg/FFmpeg/commit/d2d911eb9a2fc6eb8d86b3ae025a56c1a2692fba - -From fe9d889dcd79ea18d4dfaa39df4ddbd4c8c3b15c Mon Sep 17 00:00:00 2001 -From: David Rosca <nowrep@gmail.com> -Date: Wed, 8 May 2024 09:11:11 +0200 -Subject: [PATCH] lavc/vaapi_decode: Make it possible to send multiple slice - params buffers - -Reviewed-by: Neal Gompa <ngompa13@gmail.com> -Signed-off-by: David Rosca <nowrep@gmail.com> -Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> ---- a/libavcodec/vaapi_av1.c -+++ b/libavcodec/vaapi_av1.c -@@ -409,7 +409,7 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - .tg_end = s->tg_end, - }; - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1, - sizeof(VASliceParameterBufferAV1), - buffer, - size); ---- a/libavcodec/vaapi_decode.c -+++ b/libavcodec/vaapi_decode.c -@@ -63,6 +63,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, - int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - VAAPIDecodePicture *pic, - const void *params_data, -+ int nb_params, - size_t params_size, - const void *slice_data, - size_t slice_size) -@@ -88,7 +89,7 @@ int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - - vas = vaCreateBuffer(ctx->hwctx->display, ctx->va_context, - VASliceParameterBufferType, -- params_size, 1, (void*)params_data, -+ params_size, nb_params, (void*)params_data, - &pic->slice_buffers[index]); - if (vas != VA_STATUS_SUCCESS) { - av_log(avctx, AV_LOG_ERROR, "Failed to create slice " ---- a/libavcodec/vaapi_decode.h -+++ b/libavcodec/vaapi_decode.h -@@ -73,6 +73,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, - int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - VAAPIDecodePicture *pic, - const void *params_data, -+ int nb_params, - size_t params_size, - const void *slice_data, - size_t slice_size); ---- a/libavcodec/vaapi_h264.c -+++ b/libavcodec/vaapi_h264.c -@@ -375,7 +375,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx, - slice_param.chroma_offset_l1); - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err) { - ff_vaapi_decode_cancel(avctx, pic); ---- a/libavcodec/vaapi_hevc.c -+++ b/libavcodec/vaapi_hevc.c -@@ -353,7 +353,7 @@ static int vaapi_hevc_end_frame(AVCodecContext *avctx) - if (pic->last_size) { - last_slice_param->LongSliceFlags.fields.LastSliceOfPic = 1; - ret = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic, -- &pic->last_slice_param, slice_param_size, -+ &pic->last_slice_param, 1, slice_param_size, - pic->last_buffer, pic->last_size); - if (ret < 0) - goto fail; -@@ -471,7 +471,7 @@ static int vaapi_hevc_decode_slice(AVCodecContext *avctx, - - if (!sh->first_slice_in_pic_flag) { - err = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic, -- &pic->last_slice_param, slice_param_size, -+ &pic->last_slice_param, 1, slice_param_size, - pic->last_buffer, pic->last_size); - pic->last_buffer = NULL; - pic->last_size = 0; ---- a/libavcodec/vaapi_mjpeg.c -+++ b/libavcodec/vaapi_mjpeg.c -@@ -131,7 +131,7 @@ static int vaapi_mjpeg_decode_slice(AVCodecContext *avctx, - sp.components[i].ac_table_selector = s->ac_index[i]; - } - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), buffer, size); -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), buffer, size); - if (err) - goto fail; - ---- a/libavcodec/vaapi_mpeg2.c -+++ b/libavcodec/vaapi_mpeg2.c -@@ -162,7 +162,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); ---- a/libavcodec/vaapi_mpeg4.c -+++ b/libavcodec/vaapi_mpeg4.c -@@ -169,7 +169,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); ---- a/libavcodec/vaapi_vc1.c -+++ b/libavcodec/vaapi_vc1.c -@@ -490,7 +490,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); ---- a/libavcodec/vaapi_vp8.c -+++ b/libavcodec/vaapi_vp8.c -@@ -209,7 +209,7 @@ static int vaapi_vp8_decode_slice(AVCodecContext *avctx, - for (i = 0; i < 8; i++) - sp.partition_size[i+1] = s->coeff_partition_size[i]; - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), data, data_size); -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), data, data_size); - if (err) - goto fail; - ---- a/libavcodec/vaapi_vp9.c -+++ b/libavcodec/vaapi_vp9.c -@@ -158,7 +158,7 @@ static int vaapi_vp9_decode_slice(AVCodecContext *avctx, - } - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err) { - ff_vaapi_decode_cancel(avctx, pic); - -From d2d911eb9a2fc6eb8d86b3ae025a56c1a2692fba Mon Sep 17 00:00:00 2001 -From: David Rosca <nowrep@gmail.com> -Date: Wed, 8 May 2024 09:11:13 +0200 -Subject: [PATCH] lavc/vaapi_av1: Avoid sending the same slice buffer multiple - times - -When there are multiple tiles in one slice buffer, use multiple slice -params to avoid sending the same slice buffer multiple times and thus -increasing the bitstream size the driver will need to upload to hw. - -Reviewed-by: Neal Gompa <ngompa13@gmail.com> -Signed-off-by: David Rosca <nowrep@gmail.com> -Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> ---- a/libavcodec/vaapi_av1.c -+++ b/libavcodec/vaapi_av1.c -@@ -19,6 +19,7 @@ - */ - - #include "libavutil/frame.h" -+#include "libavutil/mem.h" - #include "hwaccel_internal.h" - #include "vaapi_decode.h" - #include "internal.h" -@@ -42,6 +43,9 @@ typedef struct VAAPIAV1DecContext { - */ - VAAPIAV1FrameRef ref_tab[AV1_NUM_REF_FRAMES]; - AVFrame *tmp_frame; -+ -+ int nb_slice_params; -+ VASliceParameterBufferAV1 *slice_params; - } VAAPIAV1DecContext; - - static VASurfaceID vaapi_av1_surface_id(AV1Frame *vf) -@@ -97,6 +101,8 @@ static int vaapi_av1_decode_uninit(AVCodecContext *avctx) - for (int i = 0; i < FF_ARRAY_ELEMS(ctx->ref_tab); i++) - av_frame_free(&ctx->ref_tab[i].frame); - -+ av_freep(&ctx->slice_params); -+ - return ff_vaapi_decode_uninit(avctx); - } - -@@ -393,13 +399,24 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - { - const AV1DecContext *s = avctx->priv_data; - VAAPIDecodePicture *pic = s->cur_frame.hwaccel_picture_private; -- VASliceParameterBufferAV1 slice_param; -- int err = 0; -+ VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data; -+ int err, nb_params; -+ -+ nb_params = s->tg_end - s->tg_start + 1; -+ if (ctx->nb_slice_params < nb_params) { -+ ctx->slice_params = av_realloc_array(ctx->slice_params, -+ nb_params, -+ sizeof(*ctx->slice_params)); -+ if (!ctx->slice_params) { -+ ctx->nb_slice_params = 0; -+ err = AVERROR(ENOMEM); -+ goto fail; -+ } -+ ctx->nb_slice_params = nb_params; -+ } - - for (int i = s->tg_start; i <= s->tg_end; i++) { -- memset(&slice_param, 0, sizeof(VASliceParameterBufferAV1)); -- -- slice_param = (VASliceParameterBufferAV1) { -+ ctx->slice_params[i - s->tg_start] = (VASliceParameterBufferAV1) { - .slice_data_size = s->tile_group_info[i].tile_size, - .slice_data_offset = s->tile_group_info[i].tile_offset, - .slice_data_flag = VA_SLICE_DATA_FLAG_ALL, -@@ -408,18 +425,20 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - .tg_start = s->tg_start, - .tg_end = s->tg_end, - }; -- -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1, -- sizeof(VASliceParameterBufferAV1), -- buffer, -- size); -- if (err) { -- ff_vaapi_decode_cancel(avctx, pic); -- return err; -- } - } - -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, ctx->slice_params, nb_params, -+ sizeof(VASliceParameterBufferAV1), -+ buffer, -+ size); -+ if (err) -+ goto fail; -+ - return 0; -+ -+fail: -+ ff_vaapi_decode_cancel(avctx, pic); -+ return err; - } - - const FFHWAccel ff_av1_vaapi_hwaccel = { diff --git a/media-video/ffmpeg/files/ffmpeg-6.1.1-incmptbl-pntr-types.patch b/media-video/ffmpeg/files/ffmpeg-6.1.1-incmptbl-pntr-types.patch deleted file mode 100644 index a65828e468e1..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-6.1.1-incmptbl-pntr-types.patch +++ /dev/null @@ -1,50 +0,0 @@ -https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/347a70f101be28f8d78e8fd62ffc3a78324f49e9 -https://bugs.gentoo.org/922621 - -From 347a70f101be28f8d78e8fd62ffc3a78324f49e9 Mon Sep 17 00:00:00 2001 -From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> -Date: Thu, 28 Mar 2024 05:35:36 +0100 -Subject: [PATCH] avcodec/pcm-bluray/dvd: Use correct pointer types on BE - -Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> ---- - libavcodec/pcm-bluray.c | 5 +++-- - libavcodec/pcm-dvd.c | 2 +- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c -index f65609514a1c1..235020d78f0cf 100644 ---- a/libavcodec/pcm-bluray.c -+++ b/libavcodec/pcm-bluray.c -@@ -167,7 +167,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame, - samples *= num_source_channels; - if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) { - #if HAVE_BIGENDIAN -- bytestream2_get_buffer(&gb, dst16, buf_size); -+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, buf_size); - #else - do { - *dst16++ = bytestream2_get_be16u(&gb); -@@ -187,7 +187,8 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame, - if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) { - do { - #if HAVE_BIGENDIAN -- bytestream2_get_buffer(&gb, dst16, avctx->ch_layout.nb_channels * 2); -+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, -+ avctx->ch_layout.nb_channels * 2); - dst16 += avctx->ch_layout.nb_channels; - #else - channel = avctx->ch_layout.nb_channels; -diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c -index 419b2a138f887..319746c62e2dc 100644 ---- a/libavcodec/pcm-dvd.c -+++ b/libavcodec/pcm-dvd.c -@@ -157,7 +157,7 @@ static void *pcm_dvd_decode_samples(AVCodecContext *avctx, const uint8_t *src, - switch (avctx->bits_per_coded_sample) { - case 16: { - #if HAVE_BIGENDIAN -- bytestream2_get_buffer(&gb, dst16, blocks * s->block_size); -+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, blocks * s->block_size); - dst16 += blocks * s->block_size / 2; - #else - int samples = blocks * avctx->ch_layout.nb_channels; diff --git a/media-video/ffmpeg/files/ffmpeg-6.1.1-memory-leak.patch b/media-video/ffmpeg/files/ffmpeg-6.1.1-memory-leak.patch deleted file mode 100644 index d02522b3a3a4..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-6.1.1-memory-leak.patch +++ /dev/null @@ -1,129 +0,0 @@ -https://bugs.gentoo.org/931059 -https://ffmpeg.org//pipermail/ffmpeg-devel/2024-May/326569.html -https://git.videolan.org/?p=ffmpeg.git;a=commit;h=670c823406612697b394d4933e03d3e1a176474f -https://git.videolan.org/?p=ffmpeg.git;a=commit;h=1606aab99bd84f0040fb0fa6ccccb092941f01ec - -From 670c823406612697b394d4933e03d3e1a176474f Mon Sep 17 00:00:00 2001 -From: Paul B Mahol <onemda@gmail.com> -Date: Fri, 27 Oct 2023 14:26:50 +0200 -Subject: [PATCH] avfilter/buffersrc: switch to activate - -Fixes OOM when caller keeps adding frames into filtergraph -that reached EOF by other means, for example EOF is signalled -by other filter in filtergraph or by buffersink. - -(cherry picked from commit 84e400ae37b1e2849a3ead399ef86c808356cdd6) ---- a/libavfilter/buffersrc.c -+++ b/libavfilter/buffersrc.c -@@ -36,6 +36,7 @@ - #include "audio.h" - #include "avfilter.h" - #include "buffersrc.h" -+#include "filters.h" - #include "formats.h" - #include "internal.h" - #include "video.h" -@@ -194,7 +195,7 @@ FF_ENABLE_DEPRECATION_WARNINGS - if (!frame) - return av_buffersrc_close(ctx, s->last_pts, flags); - if (s->eof) -- return AVERROR(EINVAL); -+ return AVERROR_EOF; - - s->last_pts = frame->pts + frame->duration; - -@@ -484,21 +485,28 @@ static int config_props(AVFilterLink *link) - return 0; - } - --static int request_frame(AVFilterLink *link) -+static int activate(AVFilterContext *ctx) - { -- BufferSourceContext *c = link->src->priv; -+ AVFilterLink *outlink = ctx->outputs[0]; -+ BufferSourceContext *c = ctx->priv; - -- if (c->eof) -- return AVERROR_EOF; -+ if (!c->eof && ff_outlink_get_status(outlink)) { -+ c->eof = 1; -+ return 0; -+ } -+ -+ if (c->eof) { -+ ff_outlink_set_status(outlink, AVERROR_EOF, c->last_pts); -+ return 0; -+ } - c->nb_failed_requests++; -- return AVERROR(EAGAIN); -+ return FFERROR_NOT_READY; - } - - static const AVFilterPad avfilter_vsrc_buffer_outputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, -- .request_frame = request_frame, - .config_props = config_props, - }, - }; -@@ -507,7 +515,7 @@ const AVFilter ff_vsrc_buffer = { - .name = "buffer", - .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."), - .priv_size = sizeof(BufferSourceContext), -- -+ .activate = activate, - .init = init_video, - .uninit = uninit, - -@@ -521,7 +529,6 @@ static const AVFilterPad avfilter_asrc_abuffer_outputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_AUDIO, -- .request_frame = request_frame, - .config_props = config_props, - }, - }; -@@ -530,7 +537,7 @@ const AVFilter ff_asrc_abuffer = { - .name = "abuffer", - .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."), - .priv_size = sizeof(BufferSourceContext), -- -+ .activate = activate, - .init = init_audio, - .uninit = uninit, - --- -2.30.2 - -From 1606aab99bd84f0040fb0fa6ccccb092941f01ec Mon Sep 17 00:00:00 2001 -From: Paul B Mahol <onemda@gmail.com> -Date: Fri, 1 Dec 2023 16:59:07 +0100 -Subject: [PATCH] avfilter/avfilter: fix OOM case for default activate - -Fixes OOM when caller keeps adding frames into filtergraph -that reached EOF by other means, for example EOF is signalled -by other filter in filtergraph or by buffersink. - -(cherry picked from commit d9e41ead82263e96ebd14d4d88d6e7f858dd944c) ---- a/libavfilter/avfilter.c -+++ b/libavfilter/avfilter.c -@@ -1167,6 +1167,16 @@ static int ff_filter_activate_default(AVFilterContext *filter) - { - unsigned i; - -+ for (i = 0; i < filter->nb_outputs; i++) { -+ int ret = filter->outputs[i]->status_in; -+ -+ if (ret) { -+ for (int j = 0; j < filter->nb_inputs; j++) -+ ff_inlink_set_status(filter->inputs[j], ret); -+ return 0; -+ } -+ } -+ - for (i = 0; i < filter->nb_inputs; i++) { - if (samples_ready(filter->inputs[i], filter->inputs[i]->min_samples)) { - return ff_filter_frame_to_filter(filter->inputs[i]); --- -2.30.2 diff --git a/media-video/ffmpeg/files/ffmpeg-6.1.1-vulkan-rename.patch b/media-video/ffmpeg/files/ffmpeg-6.1.1-vulkan-rename.patch deleted file mode 100644 index b564e3874485..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-6.1.1-vulkan-rename.patch +++ /dev/null @@ -1,127 +0,0 @@ -https://bugs.gentoo.org/928593 -https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/fef22c87ada4517441701e6e61e062c9f4399c8e - -From fef22c87ada4517441701e6e61e062c9f4399c8e Mon Sep 17 00:00:00 2001 -From: =?utf8?q?Jan=20Ekstr=C3=B6m?= <jeebjp@gmail.com> -Date: Wed, 14 Feb 2024 22:40:54 +0200 -Subject: [PATCH] {avcodec,tests}: rename the bundled Mesa AV1 vulkan video - headers - -This together with adjusting the inclusion define allows for the -build to not fail with latest Vulkan-Headers that contain the -stabilized Vulkan AV1 decoding definitions. - -Compilation fails currently as the AV1 header is getting included -via hwcontext_vulkan.h -> <vulkan/vulkan.h> -> vulkan_core.h, which -finally includes vk_video/vulkan_video_codec_av1std.h and the decode -header, leading to the bundled header to never defining anything -due to the inclusion define being the same. - -This fix is imperfect, as it leads to additional re-definition -warnings for things such as -VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION. , but it is -not clear how to otherwise have the bundled version trump the -actually standardized one for a short-term compilation fix. - -(cherry picked from commit e06ce6d2b45edac4a2df04f304e18d4727417d24) ---- - libavcodec/Makefile | 4 ++-- - libavcodec/vulkan_video.h | 4 ++-- - ...v1std_decode.h => vulkan_video_codec_av1std_decode_mesa.h} | 4 ++-- - ..._video_codec_av1std.h => vulkan_video_codec_av1std_mesa.h} | 4 ++-- - tests/ref/fate/source | 4 ++-- - 5 files changed, 10 insertions(+), 10 deletions(-) - rename libavcodec/{vulkan_video_codec_av1std_decode.h => vulkan_video_codec_av1std_decode_mesa.h} (89%) - rename libavcodec/{vulkan_video_codec_av1std.h => vulkan_video_codec_av1std_mesa.h} (99%) - -diff --git a/libavcodec/Makefile b/libavcodec/Makefile -index ec57e53e30..eb25707ef5 100644 ---- a/libavcodec/Makefile -+++ b/libavcodec/Makefile -@@ -1284,7 +1284,7 @@ SKIPHEADERS += %_tablegen.h \ - aacenc_quantization.h \ - aacenc_quantization_misc.h \ - bitstream_template.h \ -- vulkan_video_codec_av1std.h \ -+ vulkan_video_codec_av1std_mesa.h \ - $(ARCH)/vpx_arith.h \ - - SKIPHEADERS-$(CONFIG_AMF) += amfenc.h -@@ -1306,7 +1306,7 @@ SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h - SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_decode.h vaapi_hevc.h vaapi_encode.h - SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h - SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h --SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode.h -+SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode_mesa.h - SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h v4l2_m2m.h - SKIPHEADERS-$(CONFIG_ZLIB) += zlib_wrapper.h - -diff --git a/libavcodec/vulkan_video.h b/libavcodec/vulkan_video.h -index b28e3fe0bd..51f44dd543 100644 ---- a/libavcodec/vulkan_video.h -+++ b/libavcodec/vulkan_video.h -@@ -23,8 +23,8 @@ - #include "vulkan.h" - - #include <vk_video/vulkan_video_codecs_common.h> --#include "vulkan_video_codec_av1std.h" --#include "vulkan_video_codec_av1std_decode.h" -+#include "vulkan_video_codec_av1std_mesa.h" -+#include "vulkan_video_codec_av1std_decode_mesa.h" - - #define CODEC_VER_MAJ(ver) (ver >> 22) - #define CODEC_VER_MIN(ver) ((ver >> 12) & ((1 << 10) - 1)) -diff --git a/libavcodec/vulkan_video_codec_av1std_decode.h b/libavcodec/vulkan_video_codec_av1std_decode_mesa.h -similarity index 89% -rename from libavcodec/vulkan_video_codec_av1std_decode.h -rename to libavcodec/vulkan_video_codec_av1std_decode_mesa.h -index a697c00593..e2f37b4e6e 100644 ---- a/libavcodec/vulkan_video_codec_av1std_decode.h -+++ b/libavcodec/vulkan_video_codec_av1std_decode_mesa.h -@@ -14,8 +14,8 @@ - * limitations under the License. - */ - --#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ --#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1 -+#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_ -+#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_ 1 - - /* - ** This header is NOT YET generated from the Khronos Vulkan XML API Registry. -diff --git a/libavcodec/vulkan_video_codec_av1std.h b/libavcodec/vulkan_video_codec_av1std_mesa.h -similarity index 99% -rename from libavcodec/vulkan_video_codec_av1std.h -rename to libavcodec/vulkan_video_codec_av1std_mesa.h -index c46236c457..c91589eee2 100644 ---- a/libavcodec/vulkan_video_codec_av1std.h -+++ b/libavcodec/vulkan_video_codec_av1std_mesa.h -@@ -14,8 +14,8 @@ - * limitations under the License. - */ - --#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_ --#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1 -+#ifndef VULKAN_VIDEO_CODEC_AV1STD_MESA_H_ -+#define VULKAN_VIDEO_CODEC_AV1STD_MESA_H_ 1 - - /* - ** This header is NOT YET generated from the Khronos Vulkan XML API Registry. -diff --git a/tests/ref/fate/source b/tests/ref/fate/source -index c575789dd5..8bb58b61f1 100644 ---- a/tests/ref/fate/source -+++ b/tests/ref/fate/source -@@ -23,8 +23,8 @@ compat/djgpp/math.h - compat/float/float.h - compat/float/limits.h - libavcodec/bitstream_template.h --libavcodec/vulkan_video_codec_av1std.h --libavcodec/vulkan_video_codec_av1std_decode.h -+libavcodec/vulkan_video_codec_av1std_decode_mesa.h -+libavcodec/vulkan_video_codec_av1std_mesa.h - tools/decode_simple.h - Use of av_clip() where av_clip_uintp2() could be used: - Use of av_clip() where av_clip_intp2() could be used: --- -2.25.1 - diff --git a/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-libgcrypt.patch b/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-libgcrypt.patch deleted file mode 100644 index d27240ffc557..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-libgcrypt.patch +++ /dev/null @@ -1,68 +0,0 @@ -https://bugs.gentoo.org/935377 -https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/42982b5a5d461530a792e69b3e8abdd9d6d67052 - -From 42982b5a5d461530a792e69b3e8abdd9d6d67052 Mon Sep 17 00:00:00 2001 -From: Frank Plowman <post@frankplowman.com> -Date: Fri, 22 Dec 2023 12:00:01 +0000 -Subject: [PATCH 1/1] avformat/ffrtmpcrypt: Fix int-conversion warning -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf8 -Content-Transfer-Encoding: 8bit - -The gcrypt definition of `bn_new` used to use the return statement -on errors, with an AVERROR return value, regardless of the signature -of the function where the macro is used - it is called in -`dh_generate_key` and `ff_dh_init` which return pointers. As a result, -compiling with gcrypt and the ffrtmpcrypt protocol resulted in an -int-conversion warning. GCC 14 may upgrade these to errors [1]. - -This patch fixes the problem by changing the macro to remove `AVERROR` -and instead set `bn` to null if the allocation fails. This is the -behaviour of all the other `bn_new` implementations and so the result is -already checked at all the callsites. AFAICT, this should be the only -change needed to get ffmpeg off Fedora's naughty list of projects with -warnings which may be upgraded to errors in GCC 14 [2]. - -[1]: https://gcc.gnu.org/pipermail/gcc/2023-May/241264.html -[2]: https://www.mail-archive.com/devel@lists.fedoraproject.org/msg196024.html - -Signed-off-by: Frank Plowman <post@frankplowman.com> -Signed-off-by: Martin Storsjö <martin@martin.st> ---- - libavformat/rtmpdh.c | 21 ++++++++++++--------- - 1 file changed, 12 insertions(+), 9 deletions(-) - -diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c -index 5ddae537a1..6a6c2ccd87 100644 ---- a/libavformat/rtmpdh.c -+++ b/libavformat/rtmpdh.c -@@ -113,15 +113,18 @@ static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p) - return 0; - } - #elif CONFIG_GCRYPT --#define bn_new(bn) \ -- do { \ -- if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \ -- if (!gcry_check_version("1.5.4")) \ -- return AVERROR(EINVAL); \ -- gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \ -- gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \ -- } \ -- bn = gcry_mpi_new(1); \ -+#define bn_new(bn) \ -+ do { \ -+ if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \ -+ if (gcry_check_version("1.5.4")) { \ -+ gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \ -+ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \ -+ } \ -+ } \ -+ if (gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) \ -+ bn = gcry_mpi_new(1); \ -+ else \ -+ bn = NULL; \ - } while (0) - #define bn_free(bn) gcry_mpi_release(bn) - #define bn_set_word(bn, w) gcry_mpi_set_ui(bn, w) --- -2.25.1 diff --git a/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-vulkan.patch b/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-vulkan.patch deleted file mode 100644 index 56c2d11efcd1..000000000000 --- a/media-video/ffmpeg/files/ffmpeg-6.1.1-wint-inconversion-vulkan.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 5860a966d2fffbbda1af0014f0a4d37a21c4f2ca Mon Sep 17 00:00:00 2001 -From: Lynne <dev@lynne.ee> -Date: Wed, 31 Jan 2024 14:15:04 +0100 -Subject: [PATCH] lavfi/vsrc_testsrc_vulkan: fix -Wint-conversion - -While VK_NULL_HANDLE is equivalent to NULL on 64-bit platforms, the same is not -true across all platforms. - -Fixes building with gcc-14. ---- - libavfilter/vsrc_testsrc_vulkan.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libavfilter/vsrc_testsrc_vulkan.c b/libavfilter/vsrc_testsrc_vulkan.c -index 8761c21dfd1ed..1720bfac5e3a2 100644 ---- a/libavfilter/vsrc_testsrc_vulkan.c -+++ b/libavfilter/vsrc_testsrc_vulkan.c -@@ -231,7 +231,7 @@ static int testsrc_vulkan_activate(AVFilterContext *ctx) - return AVERROR(ENOMEM); - - err = ff_vk_filter_process_simple(&s->vkctx, &s->e, &s->pl, s->picref, NULL, -- NULL, &s->opts, sizeof(s->opts)); -+ VK_NULL_HANDLE, &s->opts, sizeof(s->opts)); - if (err < 0) - return err; - } -@@ -250,7 +250,7 @@ static int testsrc_vulkan_activate(AVFilterContext *ctx) - frame->sample_aspect_ratio = s->sar; - if (!s->draw_once) { - err = ff_vk_filter_process_simple(&s->vkctx, &s->e, &s->pl, frame, NULL, -- NULL, &s->opts, sizeof(s->opts)); -+ VK_NULL_HANDLE, &s->opts, sizeof(s->opts)); - if (err < 0) { - av_frame_free(&frame); - return err; diff --git a/media-video/ffmpeg/files/ffmpeg-7.1.1-svt-av1-3.patch b/media-video/ffmpeg/files/ffmpeg-7.1.1-svt-av1-3.patch new file mode 100644 index 000000000000..b45f20cebea7 --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-7.1.1-svt-av1-3.patch @@ -0,0 +1,13 @@ +https://github.com/FFmpeg/FFmpeg/commit/d1ed5c06e +--- a/libavcodec/libsvtav1.c ++++ b/libavcodec/libsvtav1.c +@@ -436,5 +436,9 @@ + svt_enc->eos_flag = EOS_NOT_REACHED; + ++#if SVT_AV1_CHECK_VERSION(3, 0, 0) ++ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params); ++#else + svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params); ++#endif + if (svt_ret != EB_ErrorNone) { + return svt_print_error(avctx, svt_ret, "Error initializing encoder handle"); diff --git a/media-video/ffmpeg/files/vmaf-models-default-path.patch b/media-video/ffmpeg/files/vmaf-models-default-path.patch deleted file mode 100644 index a9777e94b7aa..000000000000 --- a/media-video/ffmpeg/files/vmaf-models-default-path.patch +++ /dev/null @@ -1,13 +0,0 @@ -Put default path of models to /usr/share/vmaf/model - ---- a/libavfilter/vf_libvmaf.c -+++ b/libavfilter/vf_libvmaf.c -@@ -72,7 +72,7 @@ typedef struct LIBVMAFContext { - #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM - - static const AVOption libvmaf_options[] = { -- {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/local/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS}, -+ {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/share/vmaf/model/vmaf_v0.6.1.json"}, 0, 1, FLAGS}, - {"log_path", "Set the file path to be used to store logs.", OFFSET(log_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, - {"log_fmt", "Set the format of the log (xml or json).", OFFSET(log_fmt), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, - {"enable_transform", "Enables transform for computing vmaf.", OFFSET(enable_transform), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, diff --git a/media-video/ffmpeg/metadata.xml b/media-video/ffmpeg/metadata.xml index 09dba7627ec5..16ef48fc6446 100644 --- a/media-video/ffmpeg/metadata.xml +++ b/media-video/ffmpeg/metadata.xml @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="project"> - <email>media-video@gentoo.org</email> + <maintainer type="person"> + <email>ionen@gentoo.org</email> + <name>Ionen Wolkens</name> </maintainer> <maintainer type="person"> <email>chewi@gentoo.org</email> @@ -10,92 +11,115 @@ <description>chromium and soc USE flags</description> </maintainer> <use> - <flag name="amf">Enables support for AMD's Advanced Media Framework (AMF)</flag> - <flag name="amr">Enables Adaptive Multi-Rate Audio support</flag> - <flag name="amrenc">Enables Adaptive Multi-Rate Audio encoding support with <pkg>media-libs/vo-amrwbenc</pkg>.</flag> - <flag name="appkit">Enables Apple AppKit framework</flag> - <flag name="bluray">Enable playback of Blu-ray filesystems</flag> - <flag name="bs2b">Enables <pkg>media-libs/libbs2b</pkg> based Bauer stereo-to-binaural filter.</flag> - <flag name="cdio">Enables audio CD grabbing with <pkg>dev-libs/libcdio</pkg>.</flag> - <flag name="chromaprint">Enables audio fingerprinting support with <pkg>media-libs/chromaprint</pkg>.</flag> + <flag name="amf">Enable AMD's Advanced Media Framework support via <pkg>media-video/amdgpu-pro-amf</pkg></flag> + <flag name="amr">Enable Adaptive Multi-Rate Audio support via <pkg>media-libs/opencore-amr</pkg></flag> + <flag name="amrenc">Enable Adaptive Multi-Rate Audio encoding support via <pkg>media-libs/vo-amrwbenc</pkg></flag> + <flag name="appkit">Enable Apple AppKit framework</flag> + <flag name="bluray">Enable Blu-ray filesystems reading support via <pkg>media-libs/libbluray</pkg></flag> + <flag name="bs2b">Enable Bauer Stereo-to-Binaural filter support via <pkg>media-libs/libbs2b</pkg></flag> + <flag name="cdio">Enable audio CDs reading via <pkg>dev-libs/libcdio-paranoia</pkg></flag> + <flag name="chromaprint">Enable audio fingerprinting support via <pkg>media-libs/chromaprint</pkg></flag> <flag name="chromium">Builds libffmpeg.so to enable media playback in Chromium-based browsers like Opera and Vivaldi.</flag> - <flag name="codec2">Enables codec2 low bit rate speech codec support via <pkg>media-libs/codec2</pkg>.</flag> - <flag name="cpudetection">Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)</flag> - <flag name="cuda">Enables CUDA-based acceleration. Mostly used for specific filters.</flag> - <flag name="dav1d">Enables AV1 decoding via <pkg>media-libs/dav1d</pkg>.</flag> - <flag name="fdk">Use external fdk-aac library for AAC encoding</flag> - <flag name="flite">Adds a text-to-speech filter based on <pkg>app-accessibility/flite</pkg>.</flag> - <flag name="frei0r">Enable frei0r wrapping in libavfilter</flag> - <flag name="fribidi">Enables fribidi support in the drawtext filter.</flag> - <flag name="gcrypt">Enables gcrypt support: Needed for rtmp(t)e support if openssl, librtmp or gmp is not used.</flag> - <flag name="gme">Enables support for <pkg>media-libs/game-music-emu</pkg> for playing various video game music formats.</flag> - <flag name="glslang">Use <pkg>dev-util/glslang</pkg> to compile GLSL</flag> - <flag name="gpl">Build GPL code. Should be enabled unless you require LGPL binaries.</flag> - <flag name="hardcoded-tables"> - Use pre-calculated tables rather than calculating them on the fly. - - It results in an increase of approximately 15% in the size of libavcodec, the main library impacted by this change. - It enables savings in table generation time, done once at codec initialization, since by hardcoding the tables, - they do not need to be computed at runtime. However, the savings are often negligible (~100k cycles is a typical number) especially when amortized - over the entire encoding/decoding operation. - - Improvements are being made to the runtime initialization, and so over time, this option will have an impact on fewer and fewer codecs. + <flag name="codec2">Enable codec2 low bit rate speech codec support via <pkg>media-libs/codec2</pkg></flag> + <flag name="cuda">Enable support for various GPU-accelerated filters using NVIDIA PTX compiled with <pkg>llvm-core/clang</pkg></flag> + <flag name="dav1d">Enable AV1 decoding support via <pkg>media-libs/dav1d</pkg></flag> + <flag name="drm"> + Enable use of <pkg>x11-libs/libdrm</pkg> for various hardware + accelerated functions and Kernel Mode Setting screen capture + </flag> + <flag name="fdk"> + Enable AAC (Advanced Audio Coding) encoding support via + <pkg>media-libs/fdk-aac</pkg> in addition to FFmpeg's own + implementation (warning: if USE=gpl is enabled, this produces + a non-redistributable build) + </flag> + <flag name="flite">Enable text-to-speech filter support via <pkg>app-accessibility/flite</pkg></flag> + <flag name="frei0r">Enable use of filters through <pkg>media-plugins/frei0r-plugins</pkg></flag> + <flag name="fribidi">Enable Bidi support for the drawtext filter via <pkg>dev-libs/fribidi</pkg></flag> + <flag name="gcrypt"> + Enable using <pkg>dev-libs/libgcrypt</pkg> for rtmp(t)e support (not + needed if using any of USE=gmp,librtmp,openssl), and for obtaining + random bytes (not needed if USE=openssl)</flag> + <flag name="gme">Enables various game music formats support via <pkg>media-libs/game-music-emu</pkg></flag> + <flag name="gnutls"> + Enable using <pkg>net-libs/gnutls</pkg> for TLS/HTTPS support + and other minor functions (has no effect if USE=openssl is set) + </flag> + <flag name="gpl">Enable use of GPL licensed code, should be kept enabled unless LGPL binaries are needed</flag> + <flag name="iec61883">Enable FireWire DV/HDV input device support via <pkg>media-libs/libiec61883</pkg></flag> + <flag name="kvazaar">Enable H.265/HEVC encoding support via <pkg>media-libs/kvazaar</pkg></flag> + <flag name="lcms">Enable ICC profile support via <pkg>media-libs/lcms</pkg></flag> + <flag name="libaom"> + Enable AV1 de/encoding via <pkg>media-libs/libaom</pkg> (warning: this + is the reference implementation and is slower than the alternatives) + </flag> + <flag name="libaribb24">Enable ARIB text and caption decoding via <pkg>media-libs/aribb24</pkg></flag> + <flag name="libilbc">Enable internet Low Bitrate Codec de/encoding support via <pkg>media-libs/libilbc</pkg></flag> + <flag name="liblc3">Enable Low Complexity Communication Codec de/encoding support via <pkg>media-sound/liblc3</pkg></flag> + <flag name="libplacebo">Enable use of GPU-accelerated filters from <pkg>media-libs/libplacebo</pkg></flag> + <flag name="librtmp"> + Enable Real Time Messaging Protocol support via <pkg>media-video/rtmpdump</pkg> + in addition to FFmpeg's own implementation + </flag> + <flag name="libsoxr">Enable use of the audio resampler from <pkg>media-libs/soxr</pkg></flag> + <flag name="libtesseract">Enable Optical Character Recognition (OCR) filter support via <pkg>app-text/tesseract</pkg></flag> + <flag name="lv2">Enable use of filters through <pkg>media-libs/lv2</pkg></flag> + <flag name="npp"> + Enable Nvidia Performance Primitives-based filters via + <pkg>dev-util/nvidia-cuda-toolkit</pkg> (warning: if USE=gpl + is enabled, this produces non-redistributable build) + </flag> + <flag name="openh264">Enable H.264 encoding support via <pkg>media-libs/openh264</pkg></flag> + <flag name="openmpt">Enable MPTM tracked music files decoding support via <pkg>media-libs/libopenmpt</pkg></flag> + <flag name="openssl"> + Enable using <pkg>dev-libs/openssl</pkg> for TLS/HTTPS support + and other minor functions (USE=gnutls has no effect if set) </flag> - <flag name="iec61883"> Support for FireWire DV/HDV input device using <pkg>media-libs/libiec61883</pkg>.</flag> - <flag name="kvazaar">Enables <pkg>media-libs/kvazaar</pkg> based HEVC encoder.</flag> - <flag name="lcms">Enable ICC profile support via <pkg>media-libs/lcms</pkg>.</flag> - <flag name="libaom">Enables <pkg>media-libs/libaom</pkg> based AV1 codec support.</flag> - <flag name="libaribb24">Enables ARIB text and caption decoding via <pkg>media-libs/aribb24</pkg>.</flag> - <flag name="libdrm">Enables <pkg>x11-libs/libdrm</pkg> support for better screen grabbing and hardware accelerated codecs.</flag> - <flag name="libdvdnav">Uses <pkg>media-libs/libdvdnav</pkg> to enable DVD demuxing</flag> - <flag name="libdvdread">Uses <pkg>media-libs/libdvdread</pkg> to enable DVD demuxing</flag> - <flag name="libilbc">Enables iLBC de/encoding via <pkg>media-libs/libilbc</pkg>.</flag> - <flag name="liblc3">Enables LC3 de/encoding via <pkg>media-sound/liblc3</pkg>.</flag> - <flag name="libplacebo">Adds flexible GPU-accelerated processing filter based on <pkg>media-libs/libplacebo</pkg>.</flag> - <flag name="librtmp">Enables Real Time Messaging Protocol using librtmp (<pkg>media-video/rtmpdump</pkg>) in addition to FFmpeg's native implementation.</flag> - <flag name="libsoxr">Enables audio resampling through <pkg>media-libs/soxr</pkg>.</flag> - <flag name="libtesseract">Enables the OCR filter via <pkg>app-text/tesseract</pkg>.</flag> - <flag name="libv4l">Uses <pkg>media-libs/libv4l</pkg> for video4linux instead of direct calls. Adds support for more devices via the userspace library.</flag> - <flag name="libxml2">Uses <pkg>dev-libs/libxml2</pkg> to enable dash demuxing support.</flag> - <flag name="lv2">Enables lv2 audio filter wrapper.</flag> - <flag name="mipsdspr1">Enables MIPS DSP ASE R1 optimizations.</flag> - <flag name="mipsdspr2">Enables MIPS DSP ASE R2 optimizations.</flag> - <flag name="mipsfpu">Enables floating point MIPS optimizations.</flag> - <flag name="qsv">Enable Intel Quick Sync Video via <pkg>media-libs/intel-mediasdk</pkg> (ffmpeg versions older than, and including, 5.1) or <pkg>media-libs/libvpl</pkg> (ffmpeg version newer than 5.1).</flag> - <flag name="mmal">Enables Multi-Media Abstraction Layer (MMAL) decoding support: Available e.g. on the Raspberry Pi.</flag> - <flag name="network">Enables network streaming support</flag> - <flag name="openh264">Enables H.264 encoding suppoprt via <pkg>media-libs/openh264</pkg>.</flag> - <flag name="openssl">Enables <pkg>dev-libs/openssl</pkg> support. Adds support for encrypted network protocols (TLS/HTTPS).</flag> - <flag name="pic">Force shared libraries to be built as PIC (this is slower)</flag> - <flag name="postproc">Build and install libpostproc.</flag> - <flag name="qrcode">Enables QR encode generation via <pkg>media-gfx/qrencode</pkg></flag> - <flag name="quirc">Enables QR decoding via <pkg>media-libs/quirc</pkg></flag> - <flag name="rav1e">Enables AV1 encoding support via <pkg>media-video/rav1e</pkg>.</flag> - <flag name="rubberband">Adds time-stretching and pitch-shifting audio filter based on <pkg>media-libs/rubberband</pkg>.</flag> - <flag name="shaderc">Use <pkg>media-libs/shaderc</pkg> to compile GLSL</flag> - <flag name="snappy">Enable <pkg>app-arch/snappy</pkg> support. Required for e.g. Vidvox Hap encoder.</flag> - <flag name="sndio">Enable support for the <pkg>media-sound/sndio</pkg> backend</flag> - <flag name="soc">Apply additional patches for efficient playback on some SoCs (e.g. ARM, RISC-V).</flag> - <flag name="srt">Enable support for Secure Reliable Transport (SRT) via <pkg>net-libs/srt</pkg></flag> - <flag name="ssh">Enable SSH/sftp support via <pkg>net-libs/libssh</pkg>.</flag> - <flag name="svt-av1">Enables AV1 encoding support via <pkg>media-libs/svt-av1</pkg>.</flag> - <flag name="truetype">Enables drawtext filter via <pkg>media-libs/freetype</pkg> and <pkg>media-libs/harfbuzz</pkg>.</flag> - <flag name="twolame">Enables MP2 encoding via <pkg>media-sound/twolame</pkg> as an alternative to the internal encoder.</flag> - <flag name="vidstab">Enables video stabilization filter using vid.stab library (<pkg>media-libs/vidstab</pkg>).</flag> - <flag name="vmaf">Enables Netflix's perceptual video quality assessment filter using the library (<pkg>media-libs/libvmaf</pkg>).</flag> - <flag name="vpx">Enables VP8 and VP9 codec support using libvpx: Decoding does not require this to be enabled but libvpx can also be used for decoding; encoding requires this useflag to be enabled though.</flag> - <flag name="x265">Enables HEVC encoding with <pkg>media-libs/x265</pkg>.</flag> - <flag name="zeromq">Enables <pkg>net-libs/zeromq</pkg> support with the zmq/azmq filters.</flag> - <flag name="zimg">Enables <pkg>media-libs/zimg</pkg> based scale filter.</flag> - <flag name="zvbi">Enables <pkg>media-libs/zvbi</pkg> based teletext decoder.</flag> + <flag name="postproc"> + Enable libpostproc video post processing library support + (should not disable this unless need to disable USE=gpl) + </flag> + <flag name="qrcode">Enable QR encode generation support via <pkg>media-gfx/qrencode</pkg></flag> + <flag name="qsv">Enable Intel Quick Sync Video support via <pkg>media-libs/libvpl</pkg></flag> + <flag name="quirc">Enable QR decoding support via <pkg>media-libs/quirc</pkg></flag> + <flag name="rabbitmq">Enable AMQP stream support via <pkg>net-libs/rabbitmq-c</pkg></flag> + <flag name="rav1e">Enable AV1 encoding support via <pkg>media-video/rav1e</pkg></flag> + <flag name="rubberband">Enable time-stretching and pitch-shifting audio filter support via <pkg>media-libs/rubberband</pkg></flag> + <flag name="sdl">Enable use of the Simple Direct Layer library (required for the ffplay command)</flag> + <flag name="shaderc">Enable support for various GPU-accelerated filters using Vulkan compiled with <pkg>media-libs/shaderc</pkg></flag> + <flag name="snappy"> + Enable Snappy compression support via <pkg>app-arch/snappy</pkg> + (required for Vidvox Hap encoder support) + </flag> + <flag name="sndio">Enable audio output support via <pkg>media-sound/sndio</pkg></flag> + <flag name="soc">Apply additional patches for efficient playback on some SoCs (e.g. ARM, RISC-V)</flag> + <flag name="srt">Enable Secure Reliable Transport (SRT) support via <pkg>net-libs/srt</pkg></flag> + <flag name="ssh">Enable SSH/SFTP support via <pkg>net-libs/libssh</pkg></flag> + <flag name="svt-av1">Enable AV1 encoding support via <pkg>media-libs/svt-av1</pkg></flag> + <flag name="truetype"> + Enable drawtext filter support via <pkg>media-libs/freetype</pkg> + and <pkg>media-libs/harfbuzz</pkg> + </flag> + <flag name="twolame"> + Enable MP2 encoding support via <pkg>media-sound/twolame</pkg> + in addition to FFmpeg's own implementation + </flag> + <flag name="vidstab">Enable video stabilization filter support via <pkg>media-libs/vidstab</pkg></flag> + <flag name="vmaf">Enable Netflix's perceptual video quality assessment filter support via <pkg>media-libs/libvmaf</pkg></flag> + <flag name="vpx"> + Enable VP8 and VP9 de/encoding support via <pkg>media-libs/libvpx</pkg> + in addition to FFmpeg's own implementation (for decoding only) + </flag> + <flag name="x265">Enable H.265/HEVC encoding support via <pkg>media-libs/x265</pkg></flag> + <flag name="xml">Enable Dynamic Adaptive Streaming over HTTP (DASH) stream support using <pkg>dev-libs/libxml2</pkg></flag> + <flag name="zeromq">Enable ZMQ command receiver filter and streaming support via <pkg>net-libs/zeromq</pkg></flag> + <flag name="zimg">Enable zscale filter support using <pkg>media-libs/zimg</pkg></flag> + <flag name="zvbi">Enable teletext decoding support via <pkg>media-libs/zvbi</pkg></flag> </use> - <slots> - <slot name="0">For building against. This is the only slot that provides - headers and command line tools. Binary compatibility slots come and go - as required, so always pin dependencies to this slot when appropriate.</slot> - </slots> <upstream> - <remote-id type="github">FFmpeg/FFmpeg</remote-id> + <bugs-to>https://trac.ffmpeg.org/</bugs-to> + <doc>https://ffmpeg.org/documentation.html</doc> <remote-id type="cpe">cpe:/a:ffmpeg:ffmpeg</remote-id> + <remote-id type="github">FFmpeg/FFmpeg</remote-id> </upstream> </pkgmetadata> diff --git a/media-video/gpac/Manifest b/media-video/gpac/Manifest index 4ef32cfc3275..54e4ecfb2e7c 100644 --- a/media-video/gpac/Manifest +++ b/media-video/gpac/Manifest @@ -4,11 +4,13 @@ AUX gpac-2.2.0-configure.patch 3504 BLAKE2B a32633e3b3384e48341ea011119191b0bbe4 AUX gpac-2.2.0-ffmpeg6-deux.patch 1720 BLAKE2B 3e3e8af384e63d169a87ae766b20f7490250c0eb428a4c1538cf94293506b0f110a910d0c1d5419c0d71de847a9ba0cdf59d2f6c0ea3c5e5ca4c2c3acc5e304a SHA512 2570e61adf12430825ea5baa6695c8dff0f1abc77dcb464fab279326299758245b2eecf967184c3308a6d24865891dd9622f0c15ae136cc31a77954c3d864206 AUX gpac-2.2.0-ffmpeg6.patch 1162 BLAKE2B bed72ce7db91a5c25f74ae33561fa47c2951dbf454714ef912fd0a97fb5701d7beaaff48608f985b9824e00deea957d3bf7859b2ff3fa6cc6a41e7147b5f2f94 SHA512 6aac7c2a7f5f91d95f6908d798d253dab61cb234bda743df4d477e84be5ee77375e3ea3572fb3b8090e095c441756a2b97d65615853a4a584d0387eb4a32f532 AUX gpac-2.2.1-fix-bigendian.patch 949 BLAKE2B edead7173ac45fa79e30211412090b40c9ce4e4992a4497dcd9334c1a9308699f2a418cd31715dac03a2882feddc27a42a42133cc23bad6d097cc936e0d20a5a SHA512 e8e23cc8753476297e9bc98d950dbdfc5741c2665ba634e5db43e1e9459374effc2d49bbf8e991fe90553e6820837024bea40d3f6e52d8fa2ece6e07e78a568b +AUX gpac-2.4.0-configure-stddef.patch 940 BLAKE2B 9125c34dabd14bc73344c31e5690b9fe56c19165e8068146911ae3300e74c113550d43a418725be281661aae186b79511aa4bdfd4a9e3bab8fbcbfa76a4b252e SHA512 8f977a972f60fe117cc0647e5746570b5a584f27ae5a50c172b9b467baeec35f23429ae1009bebb9e3e9946724ded3321ff74404331d69ea95f8edcc9e8c5ea6 +AUX gpac-2.4.0-ffmpeg6.patch 342 BLAKE2B 5300323a666fe88552ce61051eabf093d8ac4bbaf0c3aa01bdedcc412f0beaacc767448f85c124f125401124df262c08dbb1da44c56b743fe102e7005b84b255 SHA512 dd636d0a190108246cc468e51732e1532de90a530c03535c95ee8097c1acd45ef61d3287c18d2752247b6198b1431d2d4cc89556a07428d138b4ac231b255873 +AUX gpac-2.4.0-ffmpeg7.patch 2091 BLAKE2B 0f1ba4dde8acdbdb66dfe282f1856a376593e526b40c2f0af083394d8ca4c3848c31b0591c310e6367cc22cba5f518347faf0746b60df9eb2de558d255a64311 SHA512 033298f602381586dd9d8dd103b274e8aef72637ff854fc01aaa211bbe5e398967cffcb169ae4600a16781e302c5fd77b275aa7ab9c53f4b85eb8d8d83d05ec1 DIST gpac-2.0.0.tar.gz 11362932 BLAKE2B a8489831efb77c374d13e2edb3951e60a94907c4cd8601919e1390aee0e9002249e97a9200fd006c2aa783c516f701f7695aa84b5f3596a3bc90290916ff4086 SHA512 e95e6d78167fc306917b3ac89e56ba511bbcb0c825da118f5ba374504499352104b5c1f3ee71e7ec018015b8e302f9b07162d22287ddb21c8564b097d900913f -DIST gpac-2.2.0.tar.gz 11376708 BLAKE2B f50c131912787c274a5b2d37e242e37ddd07f2c6eab3a932ec243f0fc36aeb06d4f16fd861eb3534f93534c291c55fddc2bcd1f573d2ed186e17464512a1f089 SHA512 4ac63a79a5d1057aadb59429af84ca9e4e0c0b863b19beafb60bd1c30425357dec45b5d6d48d452eb94002b059c9eb0c7bb0cc14222194f641604f964b3207c2 DIST gpac-2.2.1.tar.gz 11377184 BLAKE2B 44b47459da0f203d0e4c0eed5836a59f44fb508db4e601b46e9ffdb53d89bb49e22ccdfe7951b17581130f186c47ae8efc0d9002685d5cf9a3547159356d2d9e SHA512 873df4c2fdc3594a0f3bce66d511cee14669643042ab1ca8d7f370ad3f50636c32c31f79818051d00bf844de30a5533ae30c81ed168baf2626a152771b6a6845 +DIST gpac-2.4.0.tar.gz 9914579 BLAKE2B 09d7eeb390b4d10a6d144bf4046a7b53283fa05be01c663e0cd82e8b7b8d9dece30ef42747c12a7477f5b13ca7c7e18905f36d3f20396bb50937a249729fd3a8 SHA512 164d8a1ff235413852cc2077b5153c36b094862b61fdda12065bf6810926caabd1a1f6f30b7aac9a5b640f51fe92a6ca911518a424cab7220b635920d95da99f EBUILD gpac-2.0.0.ebuild 3354 BLAKE2B 5c55018a050f8dacee193372c0c97161e628613a50454e325aae39dcac11fecdd0b1d2f816ba21295a9b493467b4542dbc4264f1b34e796fff493a798bd7151b SHA512 02e8e64a69d731ace0e0846b322aa3fa310b278f874d3d4505bd391887c74dc585e5fc338d9e8400509de8d57ef7e751b2c9725f4d35e43ff1a4269a3bd268ca -EBUILD gpac-2.2.0.ebuild 3322 BLAKE2B f1b08d5da5e9a640f9583011d62bdd5b023e9e13b8ff1f3d6815285cbc7e782a9161b13dda6f12be509cbf751f26adc2e610e6b6b487ced9a564758d57f7e255 SHA512 8476f1d169719b389f625aec0804c54b4ee8e53ff4c274111709c39c1bf5261a83f8fb849ff15f297df3dfbf9d9672c5caab304853186a0915b10e1dcb3c2064 -EBUILD gpac-2.2.1-r1.ebuild 3372 BLAKE2B 09392a9025c7c50f4c066aaac15d9d431d3e38dcbe9b69478da446b311490f89ea22ff19cb0f837b81ced6af8afd6f501c6a549abdc21f3c35458df82fbc4f14 SHA512 cd2a6d8e72ab7fc110f96ce8bd9e24c9280793717e839a19769d1bb125f2d5c057409072dff1e947e7a70898a6468be86a5803417f8eb1f2fc62942a40b5384a -EBUILD gpac-9999.ebuild 3276 BLAKE2B ab7fd6c71c4754d02f0502037660c6474edbfbdc54443edf1bb2235b02594e70f35e02d97a45e49b7d9d663c6ae7788fb57fe01c8b2d9497d0913946b4199611 SHA512 2dd177c842d2bf7ef3bbfe144db213bfb05de9d7a90a54c791792039181abf90f0861f94fde5e98a248e3a21bfd5555669bcf54e2b4b10ccb352d627889904e8 -MISC metadata.xml 357 BLAKE2B d08714f001a00d250eaffef3818ed1cf0ea1dfd907799ac7f87c13d32f34106a3dc3982c24729d09c9eaec20143b68b2e966db97a061ee8a4592a8a5d20b8ab2 SHA512 7417738d0c891a1544fa25a9fe4785025e83ed7e5d498335215f70e61b3b599b17cbd9114e660fc5db4315dfeddee99a351b76ff0b801657f990827187f416c5 +EBUILD gpac-2.2.1-r1.ebuild 3371 BLAKE2B dc00a44a677961fe9597b00015c3bf94a9277fa2bc1a0324c2ce044a0bb9c8695a02813ec8f22e9aba08092a957bc8a4ec22fa2fa1dc42aacd16c27ca4008eb8 SHA512 eae9159c5150348200ade19830f2353078797b93e7d5468c4a000fcbb224f137c079488f3192365a229eed7e88f5e87f90049426e06cfd26ba83207e66429ab8 +EBUILD gpac-2.4.0.ebuild 3283 BLAKE2B 4e2c7115bb490510167e8259528264e16f1bd9b5cb506213e3bb4075786629d45daeea2fd9d24037b9fef89117733a28957bfd09811939b13a85ecbcfe07ac48 SHA512 b2d3bce80661fe6e73cbbc8484d63a27dd5a53ce10890ea9718171037138a147c2c5ef04022852b78e0cc3ca4f6af07c40d27ef3c7b7a307d2123f95847db7c4 +MISC metadata.xml 306 BLAKE2B 18a131089d9a3672627375f2e92b3ea7ea6f56ac69f969f4d7c1373f83561e3849a8923a69e6f076f2ba4cc9fe59d22a42ee9a4d3a0cb73ccd3430b3a4bf397e SHA512 eb782df8c2adc47e419b7f055860508be67288730c4efc0563648347fc261f7c42100746fcde9552ec4be0482ffb40e41dc4e48961df1f876d9b250e47a9e737 diff --git a/media-video/gpac/files/gpac-2.4.0-configure-stddef.patch b/media-video/gpac/files/gpac-2.4.0-configure-stddef.patch new file mode 100644 index 000000000000..05a9ac08b54d --- /dev/null +++ b/media-video/gpac/files/gpac-2.4.0-configure-stddef.patch @@ -0,0 +1,19 @@ +https://github.com/gpac/gpac/commit/a005fd6eb7a9ede4d3356630cae3d6516c91b73e +--- a/configure ++++ b/configure +@@ -1593,2 +1593,3 @@ + #include <openssl/rand.h> ++#include <stddef.h> + int main( void ) { SSL_CTX_set_options(NULL, SSL_OP_ALL); return 0; }' +@@ -1619,2 +1620,3 @@ + config_package png "libpng" "" "-lpng -lz" "png" '#include <png.h> ++#include <stddef.h> + int main( void ) { png_struct *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); return 0; }' +@@ -1635,2 +1637,3 @@ + config_package xvid "xvid" "" "-lxvidcore $PTHREAD_LDFLAGS" "" '#include <xvid.h> ++#include <stddef.h> + int main( void ) { void *codec; xvid_decore(codec, XVID_DEC_DESTROY, NULL, NULL); return 0; }' +@@ -1688,2 +1691,3 @@ + config_package freenect "libfreenect" "" "-lfreenect" "freenect" '#include <libfreenect/libfreenect.h> ++#include <stddef.h> + int main( void ) { freenect_context *f_ctx; freenect_init(&f_ctx, NULL); return 0; }' diff --git a/media-video/gpac/files/gpac-2.4.0-ffmpeg6.patch b/media-video/gpac/files/gpac-2.4.0-ffmpeg6.patch new file mode 100644 index 000000000000..5fdcc0d30e6e --- /dev/null +++ b/media-video/gpac/files/gpac-2.4.0-ffmpeg6.patch @@ -0,0 +1,11 @@ +https://bugs.gentoo.org/951622 +https://github.com/gpac/gpac/commit/8d7cac0bf9f9775cae1d43de7138206758f28b0c +--- a/src/filters/ff_mx.c ++++ b/src/filters/ff_mx.c +@@ -248,5 +248,5 @@ + + +-#if (LIBAVFORMAT_VERSION_MAJOR <= 59) ++#if (LIBAVFORMAT_VERSION_MAJOR < 61) + static int ffavio_write_packet(void *opaque, uint8_t *buf, int buf_size) + #else diff --git a/media-video/gpac/files/gpac-2.4.0-ffmpeg7.patch b/media-video/gpac/files/gpac-2.4.0-ffmpeg7.patch new file mode 100644 index 000000000000..e9485dfa5f65 --- /dev/null +++ b/media-video/gpac/files/gpac-2.4.0-ffmpeg7.patch @@ -0,0 +1,71 @@ +https://bugs.gentoo.org/951221 +https://github.com/gpac/gpac/commit/18863aa2176e423dae2a6d7e39ff6ed6a37b2b78 +--- a/src/filters/ff_dmx.c ++++ b/src/filters/ff_dmx.c +@@ -2202,5 +2202,4 @@ + { + const AVInputFormat *fmt; +- AVFormatContext *ctx; + + if (!dev_name) return; +@@ -2211,33 +2210,13 @@ + return; + } +- ctx = avformat_alloc_context(); +- if (!ctx) return; +- ctx->iformat = (AVInputFormat *)fmt; +- if (ctx->iformat->priv_data_size > 0) { +- ctx->priv_data = av_mallocz(ctx->iformat->priv_data_size); +- if (!ctx->priv_data) { +- avformat_free_context(ctx); +- return; +- } +- if (ctx->iformat->priv_class) { +- *(const AVClass**)ctx->priv_data = ctx->iformat->priv_class; +- av_opt_set_defaults(ctx->priv_data); +- } +- } else { +- ctx->priv_data = NULL; +- } + + AVDeviceInfoList *dev_list = NULL; +- +- AVDictionary *tmp = NULL; +- av_dict_set(&tmp, "list_devices", "1", 0); +- av_opt_set_dict2(ctx, &tmp, AV_OPT_SEARCH_CHILDREN); +- if (tmp) +- av_dict_free(&tmp); +- +- int res = avdevice_list_devices(ctx, &dev_list); ++ int res = avdevice_list_input_sources(fmt, dev_name, NULL, &dev_list); + if (res<0) { + //device doesn't implement avdevice_list_devices, try loading the context using "list_devices=1" option + if (-res == ENOSYS) { ++ AVFormatContext *ctx = avformat_alloc_context(); ++ if (!ctx) return; ++ + AVDictionary *opts = NULL; + av_dict_set(&opts, "list_devices", "1", 0); +@@ -2245,6 +2224,15 @@ + if (opts) + av_dict_free(&opts); ++ ++#if !defined(__DARWIN__) && !defined(__APPLE__) ++ // FIXME: no-op, permission issues on macOS Sonoma+ ++ if (res>=0) avdevice_list_devices(ctx, &dev_list); ++#endif ++ ++ if (res>=0) avformat_close_input(&ctx); ++ avformat_free_context(ctx); + } +- } else if (!res && dev_list->nb_devices) { ++ } ++ if (!res && dev_list && dev_list->nb_devices) { + if (!dev_desc) { + gf_dynstrcat(&dev_desc, "# Detected devices\n", NULL); +@@ -2263,5 +2251,4 @@ + + if (dev_list) avdevice_free_list_devices(&dev_list); +- avformat_free_context(ctx); + } + diff --git a/media-video/gpac/gpac-2.2.0.ebuild b/media-video/gpac/gpac-2.2.0.ebuild deleted file mode 100644 index abd67bfaac3c..000000000000 --- a/media-video/gpac/gpac-2.2.0.ebuild +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -if [[ ${PV} == *9999 ]] ; then - SCM="git-r3" - EGIT_REPO_URI="https://github.com/gpac/gpac" -else - SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 ~ppc ppc64 ~sparc x86" -fi - -inherit toolchain-funcs ${SCM} xdg - -DESCRIPTION="Implementation of the MPEG-4 Systems standard developed from scratch in ANSI C" -HOMEPAGE="https://gpac.wp.imt.fr/" - -LICENSE="GPL-2" -# subslot == libgpac major -SLOT="0/11" -IUSE="a52 aac alsa cpu_flags_x86_sse2 debug dvb ffmpeg jack jpeg jpeg2k mad opengl oss png - pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid X" - -BDEPEND="virtual/pkgconfig" -RDEPEND=" - media-libs/libogg - sys-libs/zlib - a52? ( media-libs/a52dec ) - aac? ( media-libs/faad2 ) - alsa? ( media-libs/alsa-lib ) - ffmpeg? ( media-video/ffmpeg:0= ) - jack? ( virtual/jack ) - jpeg? ( media-libs/libjpeg-turbo:0= ) - jpeg2k? ( media-libs/openjpeg:2 ) - mad? ( media-libs/libmad ) - opengl? ( - media-libs/freeglut - virtual/glu - virtual/opengl - ) - png? ( media-libs/libpng:0= ) - pulseaudio? ( media-sound/pulseaudio ) - theora? ( media-libs/libtheora ) - truetype? ( media-libs/freetype:2 ) - sdl? ( media-libs/libsdl ) - ssl? ( - dev-libs/openssl:0= - ) - vorbis? ( media-libs/libvorbis ) - X? ( - x11-libs/libXt - x11-libs/libX11 - x11-libs/libXv - x11-libs/libXext - ) - xml? ( dev-libs/libxml2:2= ) - xvid? ( media-libs/xvid ) -" -DEPEND=" - ${RDEPEND} - dvb? ( sys-kernel/linux-headers ) -" - -PATCHES=( - "${FILESDIR}/${PN}-2.2.0-configure.patch" - "${FILESDIR}/${PN}-2.2.0-ffmpeg6.patch" - "${FILESDIR}/${PN}-2.2.0-ffmpeg6-deux.patch" -) - -DOCS=( - share/doc/CODING_STYLE - share/doc/GPAC\ UPnP.doc - share/doc/ISO\ 639-2\ codes.txt - share/doc/SceneGenerators - share/doc/ipmpx_syntax.bt - Changelog - README.md -) - -my_use() { - local flag="$1" pflag="${2:-$1}" - if use ${flag}; then - echo "--use-${pflag}=system" - else - echo "--use-${pflag}=no" - fi -} - -src_prepare() { - default - - # TODO: remove when old zlib is no longer in tree - has_version "<sys-libs/zlib-1.3" && eapply "${FILESDIR}/${PN}-1.0.0-zlib-compile.patch" -} - -src_configure() { - tc-export CC CXX AR RANLIB - - local myeconfargs=( - --cc="$(tc-getCC)" - --libdir="$(get_libdir)" - --verbose - --enable-pic - --enable-svg - --use-ogg=system - $(use_enable alsa) - $(use_enable debug) - $(use_enable dvb dvb4linux) - $(use_enable jack jack yes) - $(use_enable opengl 3d) - $(use_enable oss oss-audio) - $(use_enable pulseaudio pulseaudio yes) - $(use_enable sdl) - $(use_enable ssl) - $(use_enable static-libs static-lib) - $(use_enable X x11) - $(use_enable X x11-shm) - $(use_enable X x11-xv) - $(my_use a52) - $(my_use aac faad) - $(use_enable dvb dvbx) - $(my_use ffmpeg) - $(my_use jpeg) - $(my_use jpeg2k openjpeg) - $(my_use mad) - $(my_use png) - $(my_use theora) - $(my_use truetype freetype) - $(my_use vorbis) - $(my_use xvid) - ) - - if use amd64 || use x86 ; then - # Don't pass -mno-sse2 on non amd64/x86 - myeconfargs+=( - --extra-cflags="${CFLAGS} $(usex cpu_flags_x86_sse2 '-msse2' '-mno-sse2')" - ) - else - myeconfargs+=( - --extra-cflags="${CFLAGS}" - ) - fi - - econf "${myeconfargs[@]}" -} - -src_install() { - einstalldocs - emake STRIP="true" DESTDIR="${ED}" install - emake STRIP="true" DESTDIR="${ED}" install-lib -} diff --git a/media-video/gpac/gpac-2.2.1-r1.ebuild b/media-video/gpac/gpac-2.2.1-r1.ebuild index 46267cba559a..46aacf010ba9 100644 --- a/media-video/gpac/gpac-2.2.1-r1.ebuild +++ b/media-video/gpac/gpac-2.2.1-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -8,7 +8,7 @@ if [[ ${PV} == *9999 ]] ; then EGIT_REPO_URI="https://github.com/gpac/gpac" else SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 ~ppc ppc64 ~sparc x86" + KEYWORDS="~alpha amd64 ppc ppc64 ~sparc x86" fi inherit toolchain-funcs ${SCM} xdg diff --git a/media-video/gpac/gpac-2.4.0.ebuild b/media-video/gpac/gpac-2.4.0.ebuild new file mode 100644 index 000000000000..409a607d607e --- /dev/null +++ b/media-video/gpac/gpac-2.4.0.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs xdg + +DESCRIPTION="Implementation of the MPEG-4 Systems standard developed from scratch in ANSI C" +HOMEPAGE="https://gpac.wp.imt.fr/" +SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1+" +SLOT="0/12" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE=" + X a52 aac alsa dvb ffmpeg http2 jack jpeg jpeg2k libcaca lzma mad + opengl png pulseaudio sdl ssl theora truetype vorbis xvid +" + +RDEPEND=" + sys-libs/zlib:= + X? ( + x11-libs/libX11 + x11-libs/libXv + x11-libs/libXext + ) + a52? ( media-libs/a52dec ) + aac? ( media-libs/faad2 ) + alsa? ( media-libs/alsa-lib ) + ffmpeg? ( media-video/ffmpeg:= ) + http2? ( net-libs/nghttp2:= ) + jack? ( virtual/jack ) + jpeg2k? ( media-libs/openjpeg:2= ) + jpeg? ( media-libs/libjpeg-turbo:= ) + libcaca? ( media-libs/libcaca ) + lzma? ( app-arch/xz-utils ) + mad? ( media-libs/libmad ) + opengl? ( + media-libs/libglvnd[X] + x11-libs/libX11 + virtual/glu + ) + png? ( media-libs/libpng:= ) + pulseaudio? ( media-libs/libpulse ) + sdl? ( media-libs/libsdl2 ) + ssl? ( dev-libs/openssl:= ) + theora? ( + media-libs/libogg + media-libs/libtheora + ) + truetype? ( media-libs/freetype ) + vorbis? ( media-libs/libvorbis ) + xvid? ( media-libs/xvid ) +" +DEPEND=" + ${RDEPEND} + X? ( x11-base/xorg-proto ) + dvb? ( sys-kernel/linux-headers ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${P}-configure-stddef.patch + "${FILESDIR}"/${P}-ffmpeg6.patch + "${FILESDIR}"/${P}-ffmpeg7.patch +) + +src_prepare() { + default + + # respect *FLAGS + sed -e '/^sseflags=/d' -e 's/-O[0-3] //' -i configure || die + + # some configure options are ignored? (check if still needed on bump) + use alsa || sed -i 's/^check_has_lib alsa/:/' configure || die + use jack || sed -i 's/^check_has_lib jack/:/' configure || die + use lzma || sed -i 's/^check_has_lib lzma/:/' configure || die + use pulseaudio || sed -i 's/^check_has_lib pulseaudio/:/' configure || die + use sdl || sed -i 's/has_sdl=.*/has_sdl=no/' configure || die +} + +src_configure() { + tc-export AR CC CXX RANLIB + + gpac_use() { + usex ${1} --use-${2:-${1}}={system,no} + } + + local conf=( + ./configure # not autotools-based + + --prefix="${EPREFIX}"/usr + --libdir="$(get_libdir)" + --extra-cflags="${CFLAGS}" + --enable-pic + --verbose + + $(use_enable X x11) + $(use_enable dvb dvbx) + $(use_enable opengl 3d) + + $(gpac_use a52) + $(gpac_use alsa) + $(gpac_use dvb dvb4linux) + $(gpac_use aac faad) + $(gpac_use ffmpeg) + $(gpac_use truetype freetype) + --use-hid=no # only for a deprecated module + $(gpac_use jack) + $(gpac_use jpeg) + $(gpac_use libcaca) + $(gpac_use lzma) + $(gpac_use mad) + $(gpac_use http2 nghttp2) + $(gpac_use jpeg2k openjpeg) + $(gpac_use png) + $(gpac_use pulseaudio) + $(gpac_use sdl) + $(gpac_use ssl) + $(gpac_use vorbis) + $(gpac_use theora) + $(gpac_use xvid) + + # not packaged + --use-caption=no + --use-directfb=no + --use-freenect=no + --use-mpeghdec=no + --use-openhevc=no + --use-opensvc=no + ) + + einfo "${conf[*]}" + "${conf[@]}" || die +} + +src_install() { + emake STRIP=: DESTDIR="${D}" install + dodoc Changelog README.md share/doc/{*.{bt,doc,txt},SceneGenerators} + + find "${ED}" -type f -name '*.a' -delete || die +} diff --git a/media-video/gpac/gpac-9999.ebuild b/media-video/gpac/gpac-9999.ebuild deleted file mode 100644 index 963ca68ca30f..000000000000 --- a/media-video/gpac/gpac-9999.ebuild +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -if [[ ${PV} == *9999 ]] ; then - SCM="git-r3" - EGIT_REPO_URI="https://github.com/gpac/gpac" -else - SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" -fi - -inherit toolchain-funcs ${SCM} xdg - -DESCRIPTION="Implementation of the MPEG-4 Systems standard developed from scratch in ANSI C" -HOMEPAGE="https://gpac.wp.imt.fr/" - -LICENSE="GPL-2" -# subslot == libgpac major -SLOT="0/11" -IUSE="a52 aac alsa cpu_flags_x86_sse2 debug dvb ffmpeg jack jpeg jpeg2k mad opengl oss png - pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid X" - -BDEPEND="virtual/pkgconfig" -RDEPEND=" - media-libs/libogg - sys-libs/zlib - a52? ( media-libs/a52dec ) - aac? ( media-libs/faad2 ) - alsa? ( media-libs/alsa-lib ) - ffmpeg? ( media-video/ffmpeg:0= ) - jack? ( virtual/jack ) - jpeg? ( media-libs/libjpeg-turbo:0= ) - jpeg2k? ( media-libs/openjpeg:2 ) - mad? ( media-libs/libmad ) - opengl? ( - media-libs/freeglut - virtual/glu - virtual/opengl - ) - png? ( media-libs/libpng:0= ) - pulseaudio? ( media-libs/libpulse ) - theora? ( media-libs/libtheora ) - truetype? ( media-libs/freetype:2 ) - sdl? ( media-libs/libsdl ) - ssl? ( - dev-libs/openssl:0= - ) - vorbis? ( media-libs/libvorbis ) - X? ( - x11-libs/libXt - x11-libs/libX11 - x11-libs/libXv - x11-libs/libXext - ) - xml? ( dev-libs/libxml2:2= ) - xvid? ( media-libs/xvid ) -" -DEPEND=" - ${RDEPEND} - dvb? ( sys-kernel/linux-headers ) -" - -PATCHES=( - "${FILESDIR}/${PN}-2.2.0-configure.patch" - "${FILESDIR}/${PN}-2.2.0-ffmpeg6.patch" -) - -DOCS=( - share/doc/CODING_STYLE - share/doc/GPAC\ UPnP.doc - share/doc/ISO\ 639-2\ codes.txt - share/doc/SceneGenerators - share/doc/ipmpx_syntax.bt - Changelog - README.md -) - -my_use() { - local flag="$1" pflag="${2:-$1}" - if use ${flag}; then - echo "--use-${pflag}=system" - else - echo "--use-${pflag}=no" - fi -} - -src_prepare() { - default - - # TODO: remove when old zlib is no longer in tree - has_version "<sys-libs/zlib-1.3" && eapply "${FILESDIR}/${PN}-1.0.0-zlib-compile.patch" -} - -src_configure() { - tc-export CC CXX AR RANLIB - - local myeconfargs=( - --cc="$(tc-getCC)" - --libdir="$(get_libdir)" - --verbose - --enable-pic - --enable-svg - --use-ogg=system - $(use_enable alsa) - $(use_enable debug) - $(use_enable dvb dvb4linux) - $(use_enable jack jack yes) - $(use_enable opengl 3d) - $(use_enable oss oss-audio) - $(use_enable pulseaudio pulseaudio yes) - $(use_enable sdl) - $(use_enable ssl) - $(use_enable static-libs static-lib) - $(use_enable X x11) - $(use_enable X x11-shm) - $(use_enable X x11-xv) - $(my_use a52) - $(my_use aac faad) - $(use_enable dvb dvbx) - $(my_use ffmpeg) - $(my_use jpeg) - $(my_use jpeg2k openjpeg) - $(my_use mad) - $(my_use png) - $(my_use theora) - $(my_use truetype freetype) - $(my_use vorbis) - $(my_use xvid) - ) - - if use amd64 || use x86 ; then - # Don't pass -mno-sse2 on non amd64/x86 - myeconfargs+=( - --extra-cflags="${CFLAGS} $(usex cpu_flags_x86_sse2 '-msse2' '-mno-sse2')" - ) - else - myeconfargs+=( - --extra-cflags="${CFLAGS}" - ) - fi - - econf "${myeconfargs[@]}" -} - -src_install() { - einstalldocs - emake STRIP="true" DESTDIR="${ED}" install - emake STRIP="true" DESTDIR="${ED}" install-lib -} diff --git a/media-video/gpac/metadata.xml b/media-video/gpac/metadata.xml index a796b14792a3..d1e9971fb858 100644 --- a/media-video/gpac/metadata.xml +++ b/media-video/gpac/metadata.xml @@ -5,7 +5,6 @@ <email>media-video@gentoo.org</email> </maintainer> <upstream> - <remote-id type="sourceforge">gpac</remote-id> <remote-id type="github">gpac/gpac</remote-id> </upstream> </pkgmetadata> diff --git a/media-video/harvid/Manifest b/media-video/harvid/Manifest index 25406210be5c..aa3b057527d7 100644 --- a/media-video/harvid/Manifest +++ b/media-video/harvid/Manifest @@ -1,5 +1,7 @@ AUX harvid-0.9.0-ffmpeg.patch 706 BLAKE2B f50246bfe6c912e6c368b44fb4250032fdc3641f559eecaafc44f2b7c6aa93bbb7bda5247660e92bed165ae235040aca09130702a4a6cf71a45034f63c8557f8 SHA512 9dda13f1552e02db1336e074c9de70c8ab368890173427c32117301ffbe8e0bdc42064978b8947021ea00f389accb1346ec669af4da8f71e5cd9c587fb66c98f AUX harvid-0.9.0-parallel-build.patch 1456 BLAKE2B ccf2cf918996fc29928fdd5980033e3583a3e61b2017b83c6c7c1d3eef0bdea7f598e91ce2acbdd5756e323c917d9fc8069ed46b37b2aaacd15e2cb8c5616a87 SHA512 0567160d9a56bfe022046a0c9a56132b0c5bfac4e273c9eb496cc7ba0098ad4b19ca1eedd4b42955e613fea6663c9665582e1477b4a309d32832cc225a3a6274 DIST harvid-0.9.0.tar.gz 116909 BLAKE2B 94b194c475aa402d750d2930c19402157674c5e629bf6212d0fbf0bfe9516f6272850ebca4fb9c6bb1c899418c48ac2b76ec6c04def35671df37ca0b44550e42 SHA512 cba47a9ad70633fbbc5a939819b7ad3c46f01b199b23c938b26092d731664bcfef05b4f03bf83433ddc63d191fef72d0cab09ae4c35efd2e1b2b37c4b2689e82 +DIST harvid-0.9.1.tar.gz 117187 BLAKE2B 18e72df0330f3d7bd420b95610b23cb582db32b427e5bacec74c43312742dd7de0dd4829bdbb7841f5e0ca62d11c0361b83efb6b6221da0ecb328d8efe28de29 SHA512 9a848078adeb1cc5730e21fac18acb5965fadf903dead52dcf805112938fc975d010cc5b651cdc87265e10c209273cb3a1a8c8ec64f9f2613640638747832466 EBUILD harvid-0.9.0.ebuild 1012 BLAKE2B 52a18b62e812b9b9ffe125cd46452a704bab6b42466c327f5367798f9cf6e98dfa1102da146ca8a1ff6298587d8b466ee239fd1e871d910bf2212d7aea514ce6 SHA512 121889845a80fce35bd07696543a172e2147f1f8f53733c433728ebe58f89ae84879da46f6628dde4e33d13a2bb343925b9d7c9c1124ac2156434eb7816f8b6d +EBUILD harvid-0.9.1.ebuild 921 BLAKE2B b0f53ffcbc44ca4060e4c78ff90bcc56cd6bfbaaad63bdae076a08138f4df4249c75d4a13b909e3b20d176dbdf2978986efd6155a200e27fde8f7b2e45604673 SHA512 bdeeeb13266e1f13349c17317190a5df73c305d24508c02aea2bbc0cb9bfdea2f38ba5d4a53e3574a3c70b39d5851e4c6891e9f1c462f35d6f95d9f91a4c3469 MISC metadata.xml 307 BLAKE2B fef3e2278027f2fc6961477d066bf154d20f8efc39bede108d9aad5fd524550c490eb5cb6d42e98c26ab560c1ce05b844c8db1cadd4eb40d310935bac7de6db0 SHA512 aebb19473f8546e0ec8bc30bb0e3657fabb56933e7214ca0e5a4d01e01d5bbbd7968a957e0a168eae4db540aa285fc9ffea7b5a44ccec82562335ca939bdcc36 diff --git a/media-video/harvid/harvid-0.9.1.ebuild b/media-video/harvid/harvid-0.9.1.ebuild new file mode 100644 index 000000000000..56aca1510499 --- /dev/null +++ b/media-video/harvid/harvid-0.9.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="HTTP Ardour Video Daemon" +HOMEPAGE="https://x42.github.io/harvid/" +SRC_URI="https://github.com/x42/harvid/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + media-video/ffmpeg:= + media-libs/libjpeg-turbo:= + media-libs/libpng:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-editors/vim-core + virtual/pkgconfig +" + +hv_make() { + emake \ + CC="$(tc-getCC)" \ + RANLIB="$(tc-getRANLIB)" \ + STRIP="true" \ + NM="$(tc-getNM) -B" \ + LD="$(tc-getLD)" \ + AR="$(tc-getAR)" \ + PREFIX="${EPREFIX}/usr" \ + libdir="${EPREFIX}/usr/$(get_libdir)" \ + hdocdir="${EPREFIX}/usr/share/doc/${PF}" \ + "${@}" +} + +src_compile() { + hv_make -C libharvid + hv_make -C src + hv_make +} + +src_install() { + hv_make DESTDIR="${D}" install + dodoc ChangeLog README.md +} diff --git a/media-video/kaffeine/Manifest b/media-video/kaffeine/Manifest index 414de506cedb..9152e0f1817c 100644 --- a/media-video/kaffeine/Manifest +++ b/media-video/kaffeine/Manifest @@ -1,3 +1,4 @@ +AUX kaffeine-2.1.0_pre20241125-force-xcb-platform.patch 728 BLAKE2B e1d6e0176197e5ead3e33c24a130a669fd7c67e2ef958e83de9fdbe0d46b6b831d7e46c2f8c8f7d447cff809fe4765ebe07f27fc8d6a3827002f43478bb7942e SHA512 9a6ec00a911c1a71c2e823d3ca1f4a60d3784e4f9b18e12ca3a86a38c2dc73198d623da45084866edb0d95779bb0386872999c8a6878237d827c38111e30ec21 DIST kaffeine-2.1.0_pre20241125-45fd3627.tar.gz 6573858 BLAKE2B 6ccc18725ad16e5b3f7c37233fcf3a040a4dcf3b9a88ed867ea9d0dbd44225e9b0cbc5f2491943b73cd3e6d6dc557aa5a69ffa8db0fe42d32da504375c88184d SHA512 d4c109a727d69fce7ddfede90f03d82bf2003ec4cac6f7f685745c1e880cdb92e69f93693315d03d5a2088cdba70f67141b2581f935a11937816cfc8d3369b05 -EBUILD kaffeine-2.1.0_pre20241125.ebuild 1290 BLAKE2B 2b9c318509c557b723cad2bfd2e98648091217805aa558be42104d47023745c5a8550b5b7ccc72d8ebeb499b3dca5fd5df7a0562f79702df851384744a4e3f04 SHA512 91e23946f2389e2fd41796ff98bd9b2b7de687cbf54737443f66e1e49a0558cc9560b84169e7d3b0ad20bc51cb472269d21b0cabe531e9a3fc4ad979a14871e7 +EBUILD kaffeine-2.1.0_pre20241125-r1.ebuild 1425 BLAKE2B b3b69adf42270dc8e3a54ab303e0b2c2a53ef661c6584f0e95e853e9a58c06dbb371a8a71ddae41f64a714ad86442779eae6e0dc623174f0f951bf4261dfc51f SHA512 be1792fcc32c4c80beb7d93fcc4255732768fb93924e6223bed36340edccfab4fc946696bb131cff244ef400f6b04ca466d7f6a17442e86a6895302178fc525a MISC metadata.xml 531 BLAKE2B 7a1855baa27cfd698688e7451187d4ca265593866485751ae9d44b39dcfa95e5961ba4e8d991ec8b1b41e1ce74d82150847e97ab6ab07dbbefbc5b618f3bc457 SHA512 0ee50508e7549058c31a5a58d760256b57e039a067d7ba10833d199b6e8b70c2968ea52adddcd69ddb0460b3c12ae13c27b14fa5f0d3ccc3584ea783975a3033 diff --git a/media-video/kaffeine/files/kaffeine-2.1.0_pre20241125-force-xcb-platform.patch b/media-video/kaffeine/files/kaffeine-2.1.0_pre20241125-force-xcb-platform.patch new file mode 100644 index 000000000000..135cc1f75df0 --- /dev/null +++ b/media-video/kaffeine/files/kaffeine-2.1.0_pre20241125-force-xcb-platform.patch @@ -0,0 +1,30 @@ +From 79ded89ab9e477ce93e71d6184104ff273553ae9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com> +Date: Tue, 25 Feb 2025 13:39:06 +0100 +Subject: [PATCH] Force X11 + +VLC does not support video playback on Wayland. + +BUG: 397594 +--- + src/main.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/main.cpp b/src/main.cpp +index a7e0efa6..185a6b72 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -211,6 +211,10 @@ int main(int argc, char *argv[]) + { + qInstallMessageHandler(verboseMessageHandler); + ++#if LIBVLC_VERSION_MAJOR <= 3 ++ qputenv("QT_QPA_PLATFORM", "xcb"); ++#endif ++ + KLocalizedString::setApplicationDomain("kaffeine"); + + KaffeineApplication app(argc, argv); +-- +GitLab + diff --git a/media-video/kaffeine/kaffeine-2.1.0_pre20241125.ebuild b/media-video/kaffeine/kaffeine-2.1.0_pre20241125-r1.ebuild index b5e4972d08f1..e6978ca00cb1 100644 --- a/media-video/kaffeine/kaffeine-2.1.0_pre20241125.ebuild +++ b/media-video/kaffeine/kaffeine-2.1.0_pre20241125-r1.ebuild @@ -42,6 +42,9 @@ BDEPEND=" DOCS=( Changelog NOTES README.md ) +# Upstream MR: https://invent.kde.org/multimedia/kaffeine/-/merge_requests/14 +PATCHES=( "${FILESDIR}/${P}-force-xcb-platform.patch" ) + src_configure() { # tools working on $HOME directory for a local git checkout local mycmakeargs=( diff --git a/media-video/mkvtoolnix/Manifest b/media-video/mkvtoolnix/Manifest index 3d0ed60bed9c..1c6448abfff9 100644 --- a/media-video/mkvtoolnix/Manifest +++ b/media-video/mkvtoolnix/Manifest @@ -5,8 +5,11 @@ DIST mkvtoolnix-88.0.tar.xz 11241552 BLAKE2B 01edcfe995e75fa7cde1916eb37a5f75d97 DIST mkvtoolnix-88.0.tar.xz.sig 833 BLAKE2B b0acd58dbc4c937ec50477e2695c4df1e67d6b40e985d676be38eaaff513a4eed17b19c612892c39c613e3736f516074febd12f76087ade3078d1183b0a3bce1 SHA512 f8175019b12f5a7bf36cc69f806d3dfc18431945f50bd1c4be5e5c1422ea9e53ca8ca93a08a417cae97da163b622ed09e7490a80255fccece6a5cbd32efbfe96 DIST mkvtoolnix-90.0.tar.xz 11273024 BLAKE2B 03488894cc0ec51829581b6a4cae35f9eecd1443deacfd00cc81295b76317361657ccc42977a1a66d1320b59b03fd9db5373a0a4c1bb70c0df452b745f3ddf5a SHA512 3558e175bc369f1296604abc986bab88fb11d199032acf1e133d62ad8d99d848ae249df3f3e4ab342f3a400750ef20975acc0b9c0a3f4a7b8cb5bbdd563a4227 DIST mkvtoolnix-90.0.tar.xz.sig 833 BLAKE2B 6dace1510af79347b772227a2e534cbfa74e18af3c0c9543a4951753dce2393cfb376ab2efdafe852e114b176e520a78bd7815c2ffec550baafb1496d762b1eb SHA512 de755106bebffd7b13365a6e8488cfeaa3666bc8b2cb21ef42429642e5dab9e048709327b00f8f7fed46186885dea3abcad2961e0c77a3ce04998b7369e9f9a9 +DIST mkvtoolnix-91.0.tar.xz 11314980 BLAKE2B a0e8eec5359ef8fbd62b189006726b7d53908bb0798be24d35edd5faec8026d1b013077d2d49ffcdc5500bce82630b41f0b1fbe591303ac5ee5e071c575c3391 SHA512 2f859c8ef30a284f2343ba3ebe1248c6eaeccd2fe8ff99355a1ae7fd7827c97924bea54044fedd6ee455d57ada17858a9aaf6e1b99c7610435c606746166ee6d +DIST mkvtoolnix-91.0.tar.xz.sig 833 BLAKE2B 9c9a3ed4e8d71e8291b06d97d860acf5cfaf3d5cdb0b29ecefad9f9e26492e986ad790413a596c2241d448c1791e662e4a01c97ab060a039eaa2365e7effd646 SHA512 62cf90e80d19dab3a6d70965740f571ddec7a0a83b8a451654f5239e9f6f09849dba9ed4d19ae88f27e59675c0876daf3769708b16b906c1b9febb5413893ce9 EBUILD mkvtoolnix-86.0.ebuild 3182 BLAKE2B a081872ad23073066638aebc67ceac238e2200f7e6ebd431706b3dd21f1b3424ba8d361353a5550bf94d0ba696be8e973bfddf98caf57724c137f75c5f48e6e6 SHA512 97f41c0614f8e2cf9e95eaf750671ca913415a6ee88965cad4c7fc3e0dc15fbcfb22bdf756227a171747710ad81f36f84d98228c081fb1a359baef0794836463 -EBUILD mkvtoolnix-88.0.ebuild 3120 BLAKE2B fdf0be85c372e14b5c33062003fe794545db690780bfecd2fce699e56301ac9ff0875d5f4fe5319cdf018fd5a7566bc769708249bd887a36430290443105dd5e SHA512 b315d0c1fd8c08dbc45c11a932c1585fd8b139d35541793f4ee864fa20a375cd8996d0295978cc33d5e3c5a7e70e27356a79edb4fa9eedaf17c853e44bd0225e -EBUILD mkvtoolnix-90.0.ebuild 3811 BLAKE2B 3eb7bba60292f839d40afb6fbf50dfbe9cd473e208147b902b15c1bf945274139cd146b5ff52687a70ee5eba6769919653b2c660f27c5189e650010a185d8de2 SHA512 34a8f90e048f4be1cff63a07bd7635d6fae90ed7025bc50edacc71e6840c80a5fc1b863cfd5df8a30b2b12ad749ee5270672277e000e3d556b7b556798be039f -EBUILD mkvtoolnix-9999.ebuild 3811 BLAKE2B 3eb7bba60292f839d40afb6fbf50dfbe9cd473e208147b902b15c1bf945274139cd146b5ff52687a70ee5eba6769919653b2c660f27c5189e650010a185d8de2 SHA512 34a8f90e048f4be1cff63a07bd7635d6fae90ed7025bc50edacc71e6840c80a5fc1b863cfd5df8a30b2b12ad749ee5270672277e000e3d556b7b556798be039f -MISC metadata.xml 343 BLAKE2B b13d9c252a7ad2f27c772c43d3476eee87d9a173c8fcc04a3be28ca9cfb826e6f1de6eade1211b4ff5f4a379b20a0961667fc99eee91495589e0632ad94b4c0a SHA512 cb7fd77f65779de841da03890fd1d0031cea8a95153f116f01f1be7d8ef5b87bb760933fc74f64a1d49ce94bc897cde94fdd4f6b45c016c3c20b842097692dc0 +EBUILD mkvtoolnix-88.0.ebuild 3119 BLAKE2B ef9a965171f9af707f74bfa0cdf3a9b54687b87655f47947c706a19289f1592c11ffaa846e5d5538ce4224b885c5ba9ead3f096ccb8d707b710515cb44ab2294 SHA512 9ee036a5219906778a76c67a6ee929f09cefe3a2a351badf5f1ae4c750a0ba7982573384e734d29843df0025f6f6dd7016abb1677aaaf1524fed2525b514ee1a +EBUILD mkvtoolnix-90.0.ebuild 3854 BLAKE2B 30ad7805711b543cd2b37f7be2bf4d545c895f035ccf28152beaf7bcadce68a59cef970bb69aeeedd3ab62cbb93e767a2ea17eeb4633dda4e84759bec5246fcc SHA512 4914b1ce55bb449a815604cad3cc3270e38091c959ba4c5a39322bc2a303d2e2672f174860c386f1368ac16fafd391ce878440b447cf9c3b631755ccb445fc00 +EBUILD mkvtoolnix-91.0.ebuild 3859 BLAKE2B f00fec3956ca8673668a2b42218045450e8ad5ee5a3bb90a9e296610eee9d35982b24e40fef77e7dab85104601ebe77ad7c101d9157fb8cf6f1f56dc665356f9 SHA512 d1e4838665e323d6011f49ffadf5b4e7672aab682be3bcf91764e1bf6565b43d5072b2e6100ab2660623321ca0a6df98f4dc5b5dea914d3ded1f44a950e02976 +EBUILD mkvtoolnix-9999.ebuild 3859 BLAKE2B f00fec3956ca8673668a2b42218045450e8ad5ee5a3bb90a9e296610eee9d35982b24e40fef77e7dab85104601ebe77ad7c101d9157fb8cf6f1f56dc665356f9 SHA512 d1e4838665e323d6011f49ffadf5b4e7672aab682be3bcf91764e1bf6565b43d5072b2e6100ab2660623321ca0a6df98f4dc5b5dea914d3ded1f44a950e02976 +MISC metadata.xml 345 BLAKE2B 3b7cd8e13a43da508b03d01d783f1c7e86b97a9e07e607e2a14dfa68789b3a6eddcd2b4237b1f17a25261d69c7c43d80d83c3deee1007164064ed80c3f8b0084 SHA512 d2d6a2295ecf9175db6aee6486495b0f5b39d51d2569d5e58e60e6426c9277da00902fff271b931648dd4b0670cf7d2e37fd6b9dadcc18981179e103afd10183 diff --git a/media-video/mkvtoolnix/metadata.xml b/media-video/mkvtoolnix/metadata.xml index f305037837b0..33ce10ef0af0 100644 --- a/media-video/mkvtoolnix/metadata.xml +++ b/media-video/mkvtoolnix/metadata.xml @@ -6,6 +6,6 @@ <name>Gentoo Video project</name> </maintainer> <upstream> - <remote-id type="gitlab">mbunkus/mkvtoolnix</remote-id> + <remote-id type="codeberg">mbunkus/mkvtoolnix</remote-id> </upstream> </pkgmetadata> diff --git a/media-video/mkvtoolnix/mkvtoolnix-88.0.ebuild b/media-video/mkvtoolnix/mkvtoolnix-88.0.ebuild index 11168efe0a43..ac569468506c 100644 --- a/media-video/mkvtoolnix/mkvtoolnix-88.0.ebuild +++ b/media-video/mkvtoolnix/mkvtoolnix-88.0.ebuild @@ -17,7 +17,7 @@ else https://mkvtoolnix.download/sources/${P}.tar.xz verify-sig? ( https://mkvtoolnix.download/sources/${P}.tar.xz.sig ) " - KEYWORDS="amd64 ~ppc ppc64 ~x86" + KEYWORDS="amd64 ppc ppc64 ~x86" VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/mkvtoolnix.asc" fi diff --git a/media-video/mkvtoolnix/mkvtoolnix-90.0.ebuild b/media-video/mkvtoolnix/mkvtoolnix-90.0.ebuild index 838bf63b2a3d..d0a73e11a38f 100644 --- a/media-video/mkvtoolnix/mkvtoolnix-90.0.ebuild +++ b/media-video/mkvtoolnix/mkvtoolnix-90.0.ebuild @@ -28,6 +28,8 @@ HOMEPAGE="https://mkvtoolnix.download/ https://gitlab.com/mbunkus/mkvtoolnix" LICENSE="GPL-2" SLOT="0" IUSE="dbus debug dvd gui nls pch test" +# bug #951192 +REQUIRED_USE="dbus? ( gui )" RESTRICT="!test? ( test )" # check NEWS.md for build system changes entries for boost/libebml/libmatroska diff --git a/media-video/mkvtoolnix/mkvtoolnix-91.0.ebuild b/media-video/mkvtoolnix/mkvtoolnix-91.0.ebuild new file mode 100644 index 000000000000..51b487c445ed --- /dev/null +++ b/media-video/mkvtoolnix/mkvtoolnix-91.0.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic multiprocessing prefix qmake-utils toolchain-funcs xdg + +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + + EGIT_REPO_URI="https://codeberg.org/mbunkus/mkvtoolnix.git" + EGIT_SUBMODULES=() +else + inherit verify-sig + + SRC_URI=" + https://mkvtoolnix.download/sources/${P}.tar.xz + verify-sig? ( https://mkvtoolnix.download/sources/${P}.tar.xz.sig ) + " + KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + + VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/mkvtoolnix.asc" +fi + +DESCRIPTION="Tools to create, alter, and inspect Matroska files" +HOMEPAGE="https://mkvtoolnix.download/ https://codeberg.org/mbunkus/mkvtoolnix" + +LICENSE="GPL-2" +SLOT="0" +IUSE="dbus debug dvd gui nls pch test" +# bug #951192 +REQUIRED_USE="dbus? ( gui )" +RESTRICT="!test? ( test )" + +# check NEWS.md for build system changes entries for boost/libebml/libmatroska +# version requirement updates and other packaging info +RDEPEND=" + dev-libs/boost:= + dev-libs/gmp:= + >=dev-libs/libebml-1.4.5:= + >=dev-libs/libfmt-8.0.1:= + >=dev-libs/pugixml-1.11 + >=dev-qt/qtbase-6.2:6[dbus?] + media-libs/flac:= + >=media-libs/libmatroska-1.7.1:= + media-libs/libogg + media-libs/libvorbis + sys-libs/zlib + dvd? ( media-libs/libdvdread:= ) + gui? ( + app-text/cmark:0= + >=dev-qt/qtbase-6.2:6[concurrent,gui,network,widgets] + >=dev-qt/qtmultimedia-6.2:6 + >=dev-qt/qtsvg-6.2:6 + ) +" +DEPEND="${RDEPEND} + >=dev-cpp/nlohmann_json-3.11.3 + >=dev-libs/utfcpp-3.1.2 + test? ( dev-cpp/gtest ) +" +BDEPEND=" + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + dev-ruby/rake + virtual/pkgconfig + nls? ( + sys-devel/gettext + app-text/po4a + ) +" + +if [[ ${PV} != *9999 ]] ; then + BDEPEND+="verify-sig? ( sec-keys/openpgp-keys-mkvtoolnix )" +fi + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + # bug #927497 + # the compiler used for qtbase affects what compiler arguments qmake will use + if tc-is-gcc; then + expected_spec="linux-g++" + elif tc-is-clang; then + expected_spec="linux-clang" + fi + + if [[ ${expected_spec} != $(qmake6 -query QMAKE_SPEC) ]]; then + if tc-is-gcc; then + eerror "Detected non-gcc qmake spec but current compiler is gcc." + elif tc-is-clang; then + eerror "Detected non-clang qmake spec but current compiler is clang." + fi + eerror "Compiler mismatch: dev-qt/qtbase:6 and ${CATEGORY}/${PN} have to use the same toolchain https://bugs.gentoo.org/927497" + fi + fi +} + +src_prepare() { + default + + if [[ ${PV} == *9999 ]]; then + ./autogen.sh || die + fi + + # bug #692018 + sed -i -e 's/pandoc/diSaBlEd/' ac/pandoc.m4 || die + + # bug #928463 + hprefixify "${S}/ac/ax_docbook.m4" + + eautoreconf + + # remove bundled libs + rm -r lib/{fmt,libebml,libmatroska,nlohmann-json,pugixml,utf8-cpp} || die +} + +src_configure() { + # bug #692322, use system dev-libs/utfcpp + append-cppflags -I"${ESYSROOT}"/usr/include/utf8cpp + + local myeconfargs=( + $(use_enable dbus) + $(use_enable debug) + $(usex pch "" --disable-precompiled-headers) + $(use_enable gui) + $(use_with dvd dvdread) + $(use_with nls gettext) + #$(use_with nls po4a) + --disable-update-check + --disable-optimization + --with-boost="${ESYSROOT}"/usr + --with-boost-libdir="${ESYSROOT}"/usr/$(get_libdir) + + # Qt (of some version) is always needed, even for non-GUI builds, + # to do e.g. MIME detection. See e.g. bug #844097. + # But most of the Qt deps are conditional on a GUI build. + --with-qmake6="$(qt6_get_bindir)"/qmake + ) + + # Work around bug #904710. + use nls || export ac_cv_path_PO4A= + + econf "${myeconfargs[@]}" +} + +src_compile() { + rake V=1 -j$(makeopts_jobs) || die +} + +src_test() { + rake V=1 -j$(makeopts_jobs) tests:unit || die + rake V=1 -j$(makeopts_jobs) tests:run_unit || die +} + +src_install() { + DESTDIR="${D}" rake -j$(makeopts_jobs) install || die + + einstalldocs + dodoc NEWS.md + doman doc/man/*.1 +} diff --git a/media-video/mkvtoolnix/mkvtoolnix-9999.ebuild b/media-video/mkvtoolnix/mkvtoolnix-9999.ebuild index 838bf63b2a3d..51b487c445ed 100644 --- a/media-video/mkvtoolnix/mkvtoolnix-9999.ebuild +++ b/media-video/mkvtoolnix/mkvtoolnix-9999.ebuild @@ -8,7 +8,7 @@ inherit autotools flag-o-matic multiprocessing prefix qmake-utils toolchain-func if [[ ${PV} == *9999 ]] ; then inherit git-r3 - EGIT_REPO_URI="https://gitlab.com/mbunkus/mkvtoolnix.git" + EGIT_REPO_URI="https://codeberg.org/mbunkus/mkvtoolnix.git" EGIT_SUBMODULES=() else inherit verify-sig @@ -23,11 +23,13 @@ else fi DESCRIPTION="Tools to create, alter, and inspect Matroska files" -HOMEPAGE="https://mkvtoolnix.download/ https://gitlab.com/mbunkus/mkvtoolnix" +HOMEPAGE="https://mkvtoolnix.download/ https://codeberg.org/mbunkus/mkvtoolnix" LICENSE="GPL-2" SLOT="0" IUSE="dbus debug dvd gui nls pch test" +# bug #951192 +REQUIRED_USE="dbus? ( gui )" RESTRICT="!test? ( test )" # check NEWS.md for build system changes entries for boost/libebml/libmatroska @@ -53,7 +55,7 @@ RDEPEND=" ) " DEPEND="${RDEPEND} - >=dev-cpp/nlohmann_json-3.9.1 + >=dev-cpp/nlohmann_json-3.11.3 >=dev-libs/utfcpp-3.1.2 test? ( dev-cpp/gtest ) " diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest index 886c26b0e3e5..17db986ccbb7 100644 --- a/media-video/mplayer/Manifest +++ b/media-video/mplayer/Manifest @@ -13,6 +13,7 @@ DIST mplayer-1.5_p20241125.tar.xz 15807772 BLAKE2B ce448b344f6ad9d5cb6216725f02c EBUILD mplayer-1.5_p20230215.ebuild 17495 BLAKE2B 00fbaddadf64602f68a02c1fadf950081697f749003454165154792c78e0da4a4132e1c766c5fefece67ea98b947324a2e0f1ebc13a733b36368b416fe68850e SHA512 ea127eb56b1a6f5df61e9ed7fabea50ea56b53f9f3c3986acd8aa9fee638fc11495d80d62e8e990489f4488f87aa72d2e1977693dd48304fec50076d506091b2 EBUILD mplayer-1.5_p20230618.ebuild 17887 BLAKE2B 09ffce401d06826d180e5694469fc2014e97abfe7417f60b00c2469e16c59c3e2d2fb506d5b5573724bd6e391497e0dfb237166e6ef6eef1333a35f341c41bc7 SHA512 7a82ebee32e708ea5133a79f7b3e1d4f1102bbad8c874d3a3bc7def70361fd8703140455f4a35af3752a143b0ec4249208aaa76ff5e655c4639b3eb2bc4aa39a EBUILD mplayer-1.5_p20231206.ebuild 17903 BLAKE2B d85e274bb0f158d03c21cef6c2b75b28f941eb813cb6f7c1428272972b991fc1f01d96533412921c8cf81fcd19caf8826f8736263c7107693fcb44f45f2ac2a7 SHA512 38e17e1d1cf26520257b04c32aa9028b8effbb6a74453bdff4aa60ab9dde82d446ee0eef1cae319e24fc0c29e975d36ecd115eca3167d578840a7eb001c8d7f0 +EBUILD mplayer-1.5_p20241125-r1.ebuild 18033 BLAKE2B e86396f31b5692bc3473f3c70ad2779b96966ce2ccb2dce513eb301f454adfc2043d083ee734796c5b94893881ba88f6e17c66b51a6cbee851f566d681f8a991 SHA512 d0705f2c5d97911b7ecc876c353c87643447e21450a3341db4567b2d6435031b3def809738f6eeb149ab08b32c2ab62d6d018e7c2e277f12f806af066e129648 EBUILD mplayer-1.5_p20241125.ebuild 17928 BLAKE2B c7e8b2e50fc2cae111142a94a7ddaaa7919fd5fdfe73a58a00db2109fffcaa7349f2a92577165d49eaa3fc6a076d5807faaec45efc9d487358e352f22f07bdb1 SHA512 95dd763ef924db5ddbf409c61098921355d0bc774e79c2a3898d200f7ee987d51527a9812f346e5a373efccd5f7c83e92418de97e7edb578396e3b1046c72407 EBUILD mplayer-9999.ebuild 17886 BLAKE2B 1af76cc1b05114573836fe78d2beca716066dd8a79eb7a8eb7cfed90c61a1983c342df6cb716e9714232b64cec0ea0bd2c5554e5e3afc04ed8f18e6e3bd396e2 SHA512 6bfff0aabbd327a4487ddc6c7bc36a8488281906c51c589f9d878306474e3c16e7c584bc7019efd4a3ea544c13ecdecc043d50e295846488c06042c1f7c536d4 MISC metadata.xml 2475 BLAKE2B 5a083ce5b8ed729245ec9eaf544be95f6cbdb9fcb5b80d3a21195557c3aede46d09bd93a0d1acd3830fc796f90dd5f15a17a3d3c69ba2a1a54a0676264dd02de SHA512 f04082ffd63adf9102dd82eb5b4c628fbf912701c7dae69f0b00bbad4e0957355e43369912e9422acc087200de982920c212efb60ba9c26675f74fd5f37fd739 diff --git a/media-video/mplayer/mplayer-1.5_p20241125-r1.ebuild b/media-video/mplayer/mplayer-1.5_p20241125-r1.ebuild new file mode 100644 index 000000000000..567ce502257a --- /dev/null +++ b/media-video/mplayer/mplayer-1.5_p20241125-r1.ebuild @@ -0,0 +1,657 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit edo toolchain-funcs ffmpeg-compat flag-o-matic + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git" + ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk" + RELEASE_URI="" + + inherit subversion git-r3 +elif [[ "${PV%_rc*}" == "${PV}" && "${PV%_pre*}" == "${PV}" && "${PV%_p*}" == "${PV}" ]]; then + MY_P="MPlayer-${PV}" + S="${WORKDIR}/${MY_P}" + RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz" +else + # If necessary, don't be afraid to make a snapshot. + # http://www.mplayerhq.hu/design7/dload.html says: + # "We recommend to always use the latest SVN to get the all the new + # features and bugfixes, especially if the release date above looks old." + RELEASE_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" +fi + +FONT_URI=" + mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 + mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 + mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 +" + +DESCRIPTION="Media Player for Linux" +HOMEPAGE="http://www.mplayerhq.hu/" +SRC_URI=" + ${RELEASE_URI} + !truetype? ( ${FONT_URI} ) +" + +IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2" +IUSE+=" cpu_flags_x86_fma3 cpu_flags_x86_fma4" +IUSE+=" cpu_flags_x86_mmx cpu_flags_x86_mmxext" +IUSE+=" cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1" +IUSE+=" cpu_flags_x86_sse4_2 cpu_flags_x86_xop" +IUSE+=" cpu_flags_x86_3dnow cpu_flags_x86_3dnowext" + +IUSE+=" cpu_flags_arm_thumb cpu_flags_arm_neon cpu_flags_arm_vfp cpu_flags_arm_vfpv3" +IUSE+=" cpu_flags_arm_iwmmxt" +IUSE+=" cpu_flags_ppc_altivec" + +IUSE+=" a52 aalib +alsa aqua bidi bl bluray" +IUSE+=" bs2b cddb +cdio cdparanoia cpudetection debug dga doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon" +IUSE+=" ftp ggi gsm +iconv ipv6 jack joystick jpeg ladspa +libass libcaca libmpeg2 lirc live lzo mad md5sum" +IUSE+=" mng mp3 nas +network openal opengl +osdmenu oss png pnm pulseaudio pvr" +IUSE+=" radio rar rtc rtmp samba selinux +shm sdl speex" +IUSE+=" tga theora tremor +truetype toolame twolame +unicode v4l vcd vdpau vidix" +IUSE+=" vorbis +X x264 xinerama +xscreensaver +xv xvid yuv4mpeg zoran" + +VIDEO_CARDS="mga" +for x in ${VIDEO_CARDS}; do + IUSE+=" video_cards_${x}" +done + +FONT_RDEPS=" + media-libs/fontconfig + >=media-libs/freetype-2.2.1:2 + virtual/ttf-fonts +" +X_RDEPS=" + x11-libs/libXext + x11-libs/libXxf86vm +" +# - RAR: although -gpl version is nice, it can't do most functions normal rars can +# nemesi? ( net-libs/libnemesi ) +# - mplayer relies on private APIs in giflib that have been removed: +# https://sourceforge.net/p/giflib/bugs/132/ +RDEPEND=" + app-arch/bzip2 + media-video/ffmpeg-compat:6=[vdpau?] + sys-libs/ncurses:= + sys-libs/zlib + a52? ( media-libs/a52dec ) + aalib? ( media-libs/aalib ) + alsa? ( media-libs/alsa-lib ) + bidi? ( dev-libs/fribidi ) + bluray? ( >=media-libs/libbluray-0.2.1:= ) + bs2b? ( media-libs/libbs2b ) + cdio? ( + dev-libs/libcdio:= + dev-libs/libcdio-paranoia + ) + cdparanoia? ( !cdio? ( media-sound/cdparanoia ) ) + dga? ( x11-libs/libXxf86dga ) + dts? ( media-libs/libdca ) + dv? ( media-libs/libdv ) + dvd? ( >=media-libs/libdvdread-4.1.3:= ) + dvdnav? ( >=media-libs/libdvdnav-4.1.3:= ) + encode? ( + !twolame? ( toolame? ( media-sound/toolame ) ) + twolame? ( media-sound/twolame ) + faac? ( media-libs/faac ) + mp3? ( media-sound/lame ) + x264? ( >=media-libs/x264-0.0.20100423:= ) + xvid? ( media-libs/xvid ) + ) + enca? ( app-i18n/enca ) + faad? ( media-libs/faad2 ) + ggi? ( media-libs/libggi media-libs/libggiwmh ) + gsm? ( media-sound/gsm ) + iconv? ( virtual/libiconv ) + jack? ( virtual/jack ) + jpeg? ( media-libs/libjpeg-turbo:= ) + ladspa? ( media-libs/ladspa-sdk ) + libass? ( >=media-libs/libass-0.9.10:= ) + libcaca? ( media-libs/libcaca ) + libmpeg2? ( media-libs/libmpeg2 ) + lirc? ( app-misc/lirc ) + live? ( media-plugins/live ) + lzo? ( >=dev-libs/lzo-2 ) + mad? ( media-libs/libmad ) + mng? ( media-libs/libmng:= ) + mp3? ( media-sound/mpg123 ) + nas? ( media-libs/nas ) + openal? ( media-libs/openal ) + opengl? ( virtual/opengl ) + png? ( media-libs/libpng:= ) + pnm? ( media-libs/netpbm ) + pulseaudio? ( media-libs/libpulse ) + rar? ( + || ( + app-arch/unrar + app-arch/rar + ) + ) + rtmp? ( media-video/rtmpdump ) + samba? ( net-fs/samba ) + sdl? ( media-libs/libsdl ) + speex? ( media-libs/speex ) + theora? ( media-libs/libtheora[encode?] ) + tremor? ( media-libs/tremor ) + truetype? ( ${FONT_RDEPS} ) + vdpau? ( x11-libs/libvdpau ) + vorbis? ( !tremor? ( media-libs/libvorbis ) ) + X? ( ${X_RDEPS} ) + xinerama? ( x11-libs/libXinerama ) + xscreensaver? ( x11-libs/libXScrnSaver ) + xv? ( x11-libs/libXv ) +" +DEPEND=" + ${RDEPEND} + dga? ( x11-base/xorg-proto ) + dvb? ( sys-kernel/linux-headers ) + X? ( x11-base/xorg-proto ) + xinerama? ( x11-base/xorg-proto ) + xscreensaver? ( x11-base/xorg-proto ) +" +ASM_DEP="dev-lang/nasm" +BDEPEND=" + virtual/pkgconfig + amd64? ( ${ASM_DEP} ) + doc? ( + app-text/docbook-xml-dtd + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + ) + x86? ( ${ASM_DEP} ) +" +RDEPEND+="selinux? ( sec-policy/selinux-mplayer )" + +LICENSE="GPL-2" +SLOT="0" +if [[ ${PV} != *9999* ]]; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +# faac codecs are nonfree +# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio +# dvd navigation requires dvd read support +# ass and freetype font require iconv and ass requires freetype fonts +# unicode transformations are usefull only with iconv +# radio requires oss or alsa backend +REQUIRED_USE=" + dga? ( X ) + dvdnav? ( dvd ) + enca? ( iconv ) + ggi? ( X ) + libass? ( truetype ) + opengl? ( X ) + osdmenu? ( X ) + truetype? ( iconv ) + vdpau? ( X ) + vidix? ( X ) + xinerama? ( X ) + xscreensaver? ( X ) + xv? ( X ) +" +RESTRICT="faac? ( bindist )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.5_p20241125-c99.patch +) + +QA_CONFIG_IMPL_DECL_SKIP=( + _aligned_malloc +) + +pkg_setup() { + if [[ ${PV} == *9999* ]]; then + elog + elog "This is a live ebuild which installs the latest from upstream's" + elog "subversion repository, and is unsupported by Gentoo." + elog "Everything but bugs in the ebuild itself will be ignored." + elog + fi + + if use cpudetection; then + ewarn + ewarn "You've enabled the cpudetection flag. This feature is" + ewarn "included mainly for people who want to use the same" + ewarn "binary on another system with a different CPU architecture." + ewarn "MPlayer will already detect your CPU settings by default at" + ewarn "buildtime; this flag is used for runtime detection." + ewarn "You won't need this turned on if you are only building" + ewarn "mplayer for this system. Also, if your compile fails, try" + ewarn "disabling this use flag." + fi +} + +src_unpack() { + if [[ ${PV} == *9999* ]]; then + subversion_src_unpack + + cd "${WORKDIR}" || die + rm -rf "${WORKDIR}/${P}/ffmpeg/" || die + ( EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/ffmpeg/" git-r3_src_unpack ) + else + unpack ${A} + fi + + if [[ ${PV} == *9999* || "${PV%_rc*}" == "${PV}" ]]; then + cd "${S}" || die + cp "${FILESDIR}/dump_ffmpeg.sh" . || die + chmod +x dump_ffmpeg.sh || die + ./dump_ffmpeg.sh + fi + + if ! use truetype; then + unpack font-arial-iso-8859-1.tar.bz2 \ + font-arial-iso-8859-2.tar.bz2 \ + font-arial-cp1250.tar.bz2 + fi +} + +src_prepare() { + default + + local svf=snapshot_version + if [[ ${PV} == *9999* ]]; then + # Set SVN version manually + subversion_wc_info + printf "${ESVN_WC_REVISION}" > ${svf} || die + fi + + if [[ ! -f VERSION ]]; then + [[ -f "${svf}" ]] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?" + + local sv=$(<${svf}) + printf "SVN-r${sv} (Gentoo)" > VERSION || die + fi + + # Fix path to bash executable in configure scripts + sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die + + # Use sane default for >=virtual/udev-197 + sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die +} + +src_configure() { + # TODO: fix with >=ffmpeg-7 then drop compat (bug #948254) + ffmpeg_compat_setup 6 + + # undefined reference to `sse_int32_map_factor' etc + # https://bugs.gentoo.org/650458 + # https://trac.mplayerhq.hu/ticket/2408 + use libass && use cpu_flags_x86_sse4_1 && filter-lto + + local myconf=() + local uses i + + # Set LINGUAS + [[ -n ${LINGUAS} ]] && LINGUAS="${LINGUAS/da/dk}" + [[ -n ${LINGUAS} ]] && LINGUAS="${LINGUAS/zh/zh_CN}" # bug #482968 + + # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable + # compilation in almost every situation. The reason for this is + # because if --enable is used, it will force the build of that option, + # regardless of whether the dependency is available or not. + + ##################### + # Optional features # + ##################### + # Disable svga since we don't want it + # Disable arts since we don't have kde3 + # Always disable internal ass + # Disable opus and ilbc since it only controls support in internal + # ffmpeg which we do not use + myconf+=( + --disable-arts + --disable-ass-internal + --disable-directfb + --disable-kai + --disable-libilbc + --disable-libnut + --disable-libopus + --disable-svga --disable-svgalib_helper + $(use_enable network networking) + $(use_enable joystick) + ) + + uses="bl bluray enca ftp rtc vcd" # nemesi <- not working with in-tree ebuild + myconf+=( --disable-nemesi ) # nemesi automagic disable + for i in ${uses}; do + use ${i} || myconf+=( --disable-${i} ) + done + use bidi || myconf+=( --disable-fribidi ) + use ipv6 || myconf+=( --disable-inet6 ) + use libass || myconf+=( --disable-ass ) + use rar || myconf+=( --disable-unrarexec ) + use samba || myconf+=( --disable-smb ) + use lirc || myconf+=( --disable-lirc --disable-lircc --disable-apple-ir ) + + # libcdio support: prefer libcdio over cdparanoia + # don't check for cddb w/cdio + if use cdio; then + myconf+=( --disable-cdparanoia ) + else + myconf+=( --disable-libcdio ) + use cdparanoia || myconf+=( --disable-cdparanoia ) + use cddb || myconf+=( --disable-cddb ) + fi + + ################################ + # DVD read, navigation support # + ################################ + # + # dvdread - accessing a DVD + # dvdnav - navigation of menus + use dvd || myconf+=( --disable-dvdread ) + use dvdnav || myconf+=( --disable-dvdnav ) + + ############# + # Subtitles # + ############# + # + # SRT/ASS/SSA (subtitles) requires freetype support + # freetype support requires iconv + # iconv optionally can use unicode + use truetype || myconf+=( --disable-freetype ) + use iconv || myconf+=( --disable-iconv --charset=noconv ) + use iconv && use unicode && myconf+=( --charset=UTF-8 ) + + ##################################### + # DVB / Video4Linux / Radio support # + ##################################### + myconf+=( --disable-tv-bsdbt848 ) + # gone since linux-headers-2.6.38 + myconf+=( --disable-tv-v4l1 ) + if { use dvb || use v4l || use pvr || use radio; }; then + use dvb || myconf+=( --disable-dvb ) + use pvr || myconf+=( --disable-pvr ) + use v4l || myconf+=( --disable-tv-v4l2 ) + if use radio && { use dvb || use v4l; }; then + myconf+=( + --enable-radio + $(use_enable encode radio-capture) + ) + else + myconf+=( + --disable-radio-v4l2 + --disable-radio-bsdbt848 + ) + fi + else + myconf+=( + --disable-tv + --disable-tv-v4l2 + --disable-radio + --disable-radio-v4l2 + --disable-radio-bsdbt848 + --disable-dvb + --disable-v4l2 + --disable-pvr + ) + fi + + ########## + # Codecs # + ########## + myconf+=( --disable-musepack ) # Use internal musepack codecs for SV7 and SV8 support + myconf+=( --disable-libmpeg2-internal ) # always use system media-libs/libmpeg2 + myconf+=( --disable-gif ) # relies on to-be-removed giflib internals https://sourceforge.net/p/giflib/bugs/132/ + use dts || myconf+=( --disable-libdca ) + if ! use mp3; then + myconf+=( + --disable-mp3lame + --disable-mpg123 + ) + fi + uses="a52 bs2b dv gsm lzo rtmp vorbis" + for i in ${uses}; do + use ${i} || myconf+=( --disable-lib${i} ) + done + + uses="faad jpeg libmpeg2 live mad mng png pnm speex tga theora tremor" + for i in ${uses}; do + use ${i} || myconf+=( --disable-${i} ) + done + # Pulls an outdated libopenjpeg, ffmpeg provides better support for it + myconf+=( --disable-libopenjpeg ) + + # Encoding + uses="faac x264 xvid toolame twolame" + if use encode; then + for i in ${uses}; do + use ${i} || myconf+=( --disable-${i} ) + done + else + myconf+=( --disable-mencoder ) + for i in ${uses}; do + myconf+=( --disable-${i} ) + use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled." + done + fi + + ################# + # Binary codecs # + ################# + myconf+=( --disable-qtx --disable-real --disable-win32dll ) + + ################ + # Video Output # + ################ + uses="md5sum sdl yuv4mpeg" + for i in ${uses}; do + use ${i} || myconf+=( --disable-${i} ) + done + use aalib || myconf+=( --disable-aa ) + use fbcon || myconf+=( --disable-fbdev ) + use libcaca || myconf+=( --disable-caca ) + use zoran || myconf+=( --disable-zr ) + + if ! use kernel_linux || ! use video_cards_mga; then + myconf+=( --disable-mga --disable-xmga ) + fi + + myconf+=( + --disable-3dfx + --disable-tdfxvid + --disable-tdfxfb + ) + + # sun card, disable by default, see bug #258729 + myconf+=( --disable-xvr100 ) + + ################ + # Audio Output # + ################ + myconf+=( --disable-esd ) + uses="alsa jack ladspa nas openal" + for i in ${uses}; do + use ${i} || myconf+=( --disable-${i} ) + done + use pulseaudio || myconf+=( --disable-pulse ) + if ! use radio; then + use oss || myconf+=( --disable-ossaudio ) + fi + + #################### + # Advanced Options # + #################### + # Platform specific flags, hardcoded on amd64 (see below) + use cpudetection && myconf+=( --enable-runtime-cpudetection ) + + local x86_uses="3dnow 3dnowext avx avx2 fma3 fma4 mmx mmxext sse sse2 sse3 ssse3 xop" + for i in ${x86_uses}; do + myconf+=( $(use_enable cpu_flags_x86_${i} ${i}) ) + done + myconf+=( + $(use_enable cpu_flags_x86_sse4_1 sse4) + $(use_enable cpu_flags_x86_sse4_2 sse42) + ) + + myconf+=( + $(use_enable cpu_flags_arm_iwmmxt iwmmxt) + $(use_enable cpu_flags_arm_thumb thumb) + $(use_enable cpu_flags_arm_neon neon) + $(use_enable cpu_flags_arm_vfp armvfp) + $(use_enable cpu_flags_arm_vfpv3 vfpv3) + $(use_enable cpu_flags_ppc_altivec altivec) + $(use_enable shm) + ) + + use debug && myconf+=( --enable-debug=3 ) + + if use x86 && gcc-specs-pie; then + filter-flags -fPIC -fPIE + append-ldflags -nopie + fi + + ########################### + # X enabled configuration # + ########################### + myconf+=( --disable-gui ) + myconf+=( --disable-vesa ) + uses="ggi vdpau xinerama xv" + for i in ${uses}; do + use ${i} || myconf+=( --disable-${i} ) + done + use dga || myconf+=( --disable-dga1 --disable-dga2 ) + use opengl || myconf+=( --disable-gl ) + use osdmenu && myconf+=( --enable-menu ) + use vidix || myconf+=( --disable-vidix --disable-vidix-pcidb ) + use xscreensaver || myconf+=( --disable-xss ) + use X || myconf+=( --disable-x11 ) + + ############################ + # OSX (aqua) configuration # + ############################ + if use aqua; then + myconf+=( + --enable-macosx-finder + --enable-macosx-bundle + ) + fi + + # Note: --enable-gnutls only makes sense with --enable-ffmpeg_a + edo ./configure \ + --cc="$(tc-getCC)" \ + --host-cc="$(tc-getBUILD_CC)" \ + --prefix="${EPREFIX}/usr" \ + --bindir="${EPREFIX}/usr/bin" \ + --libdir="${EPREFIX}/usr/$(get_libdir)" \ + --confdir="${EPREFIX}/etc/mplayer" \ + --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \ + --mandir="${EPREFIX}/usr/share/man" \ + --disable-ffmpeg_a \ + --disable-gnutls \ + "${myconf[@]}" +} + +src_compile() { + default + + # Build only user-requested docs if they're available. + if use doc ; then + # Select available languages from ${LINGUAS} + local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN" + local BUILT_DOCS=() + local i + + for i in ${LINGUAS} ; do + has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=( ${i} ) + done + + if [[ -z ${BUILT_DOCS[@]} ]]; then + emake -j1 html-chunked + else + for i in ${BUILT_DOCS[@]}; do + emake -j1 html-chunked-${i} + done + fi + fi +} + +src_install() { + local i + + emake \ + DESTDIR="${D}" \ + INSTALLSTRIP="" \ + install + + dodoc AUTHORS Changelog Copyright README etc/codecs.conf + + docinto tech/ + dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist} + docinto TOOLS/ + dodoc -r TOOLS/* + docinto tech/mirrors/ + dodoc DOCS/tech/mirrors/* + + if use doc; then + docinto html/ + dodoc -r "${S}"/DOCS/HTML/* + fi + + if ! use truetype; then + dodir /usr/share/mplayer/fonts + + # Do this generic, as the mplayer people like to change the structure + # of their zips ... + local i + for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do + cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts" + done + + # Fix the font symlink ... + rm -rf "${ED}/usr/share/mplayer/font" + dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font + fi + + insinto /etc/mplayer + newins "${S}/etc/example.conf" mplayer.conf + cat >> "${ED}/etc/mplayer/mplayer.conf" <<- _EOF_ + # Config options can be section specific, global + # options should go in the default section + [default] + _EOF_ + + doins "${S}/etc/input.conf" + if use osdmenu; then + doins "${S}/etc/menu.conf" + fi + + if use truetype; then + cat >> "${ED}/etc/mplayer/mplayer.conf" <<- _EOF_ + fontconfig=1 + subfont-osd-scale=4 + subfont-text-scale=3 + _EOF_ + fi + + # bug #256203 + if use rar; then + cat >> "${ED}/etc/mplayer/mplayer.conf" <<- _EOF_ + unrarexec=${EPREFIX}/usr/bin/unrar + _EOF_ + fi + + dosym -r /etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf + newbin "${S}/TOOLS/midentify.sh" midentify +} + +pkg_preinst() { + [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \ + rm -rf "${EROOT}/usr/share/mplayer/Skin/default" +} + +pkg_postrm() { + # Cleanup stale symlinks + [[ -L "${EROOT}/usr/share/mplayer/font" && + ! -e "${EROOT}/usr/share/mplayer/font" ]] && \ + rm -f "${EROOT}/usr/share/mplayer/font" + + [[ -L "${EROOT}/usr/share/mplayer/subfont.ttf" && + ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ]] && \ + rm -f "${EROOT}/usr/share/mplayer/subfont.ttf" +} diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest index 17fb7faa7314..4a816c8fd56e 100644 --- a/media-video/mpv/Manifest +++ b/media-video/mpv/Manifest @@ -1,4 +1,6 @@ DIST mpv-0.39.0.tar.gz 3494313 BLAKE2B 9f96ba225eb0587d50f8c439359b18f752b98024ab6b40f987be4d57b0ce4b595243f49177ffc48840b351ce19fddc84788b5784b508eb685e58fdfb8e1e0520 SHA512 9cf1d7487b1e9e36d2b731bf951c4d3b9deba95109af408ccfc71b88e85f6de2558e7b4950781667bb4d40e0352742e3ed278559ff34d07905dd459969cbf503 -EBUILD mpv-0.39.0.ebuild 6970 BLAKE2B ff2960f69501c211db93fa4ec3401462fcd3322f29ec92f032f3cc7663fc3d52f19db9b62ffb988d30e67e1af9417a7229fb4e4f1aa38bd93a993bf875f7f026 SHA512 4c5c3316f77fede310d5944d4c2c6fc7728f7f8cc37707f1c744f209685c374a1c7553199ca6e4b49c2b7221b59cd15ec28030ce5f0380de3564241aadac8cc2 -EBUILD mpv-9999.ebuild 6955 BLAKE2B 19c5fda927cc4bf826931b8c7c4513f2eaa8eca71f40b9239bafc6dc4cab8bb84e59139114c16ba0ac339537c84848103a15feeae3ec14ea5beef88e1cc8f6c8 SHA512 4563d8a655eeda81f1066d2f0e9ed82810fe8afd9f1cb2caa4dccc631262c561a932698a89e7d8d00e013e1c6fd89717d565160f590914e8b24830b27f0d292e +DIST mpv-0.40.0.tar.gz 3561474 BLAKE2B 618cffca1ec30da0a49b91e168dd1d041e5646f7930fa65ced1f58aabed2e663f6a161c0c71b2f1769fa43a0873d91ef8219f11c5458e8ecb67b4466581c4f90 SHA512 24ccbff7fa34f85c033dc9ed94a364c6226e1081a47086365fc98e332af2004517dede371a005f1d51c2a3306b7dc915df9de4188cea140b1fd988058bbd6e8c +EBUILD mpv-0.39.0-r1.ebuild 6978 BLAKE2B 5fe607c89e16f6e9c1414107a42bc2e76e6f7eae56b0c0923077ca770e9548f92dfd786d9c29027238ab0d1ed6b86085f2f6ad6e5663a4d037b452acf2d1e064 SHA512 fdf47bdf2ef0442eb1c71feb36cd6ecac6727202fe462a2f4ed67704eb1c4229fa0932da699ccef3a7c72d91d1d7bbc574912505677c44ad92c10523b354b2e1 +EBUILD mpv-0.40.0-r1.ebuild 6396 BLAKE2B e564a6f7cc6387e3d17ded50f41095fc03ec3f29f0aff26f48a88d81526c65b45b216ccbd30bb9fb2ac95d9d7edb12d894906902b73da85a6b84623d2b612f6b SHA512 ea681453402cd0b6be505d3bba1a3375696c8e0b5cf59613e892837c73dd3f01dfd00a84caee07050b4cd84d2fe8a1126e143860ee72b5a572b1752d993edf51 +EBUILD mpv-9999.ebuild 6436 BLAKE2B e0bddad8d3b94d971a536a8335a53b2defafd31c356f6c2f0f86f74d896e5a2f22776674e50da38e4131841c0054eb744502b49bff4047dac4823a6cbdfe83c2 SHA512 4a684af70bacf19a440b4e6140f2bc59790ac7ba635db4acff9f0b7f6518c7e7adcc7b682caf669372e0e61b81afeeb1fef9fe41777d4016eabe981393617cfa MISC metadata.xml 2053 BLAKE2B dc35c3bcdb29eb08725a4f908575ecc2afed2d772988ff12ad052c39e9b195a68611e8037b82ee5ceefc33c40d8df666e03aa59d836eeb7c6472bd988f49b4ee SHA512 4e7cd2da4df81f9ecafddfe93788cabbc4f0de0ff9b976af2ab3fb0f63b2d7daee6d8c5607685240f41be37a158b9fa0acd030d8c62da835891d19af3870668c diff --git a/media-video/mpv/mpv-0.39.0.ebuild b/media-video/mpv/mpv-0.39.0-r1.ebuild index 1c7e2ca81b1b..94a798b7f13b 100644 --- a/media-video/mpv/mpv-0.39.0.ebuild +++ b/media-video/mpv/mpv-0.39.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -47,7 +47,7 @@ RESTRICT="!test? ( test )" COMMON_DEPEND=" media-libs/libass:=[fontconfig] >=media-libs/libplacebo-6.338.2:=[opengl?,vulkan?] - >=media-video/ffmpeg-6.1:=[encode,soc(-)?,threads,vaapi?,vdpau?] + >=media-video/ffmpeg-6.1:=[encode(+),soc(-)?,threads(+),vaapi?,vdpau?] X? ( x11-libs/libX11 x11-libs/libXScrnSaver @@ -90,7 +90,7 @@ COMMON_DEPEND=" opengl? ( media-libs/libglvnd[X?] ) pipewire? ( media-video/pipewire:= ) pulseaudio? ( media-libs/libpulse ) - rubberband? ( media-libs/rubberband ) + rubberband? ( media-libs/rubberband:= ) sdl? ( media-libs/libsdl2[sound,threads(+),video] ) sixel? ( media-libs/libsixel ) sndio? ( media-sound/sndio:= ) diff --git a/media-video/mpv/mpv-0.40.0-r1.ebuild b/media-video/mpv/mpv-0.40.0-r1.ebuild new file mode 100644 index 000000000000..409716b6966f --- /dev/null +++ b/media-video/mpv/mpv-0.40.0-r1.ebuild @@ -0,0 +1,254 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-1 luajit ) +PYTHON_COMPAT=( python3_{10..13} ) +inherit flag-o-matic lua-single meson optfeature pax-utils python-single-r1 xdg + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/mpv-player/mpv.git" +else + SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux" +fi + +DESCRIPTION="Media player for the command line" +HOMEPAGE="https://mpv.io/" + +LICENSE="LGPL-2.1+ GPL-2+ BSD ISC MIT" #506946 +SLOT="0/2" # soname +IUSE=" + +X +alsa aqua archive bluray cdda +cli coreaudio debug +drm dvb + dvd +egl gamepad +iconv jack javascript jpeg lcms libcaca +libmpv + +lua nvenc openal pipewire pulseaudio rubberband sdl selinux sixel + sndio soc test tools +uchardet vaapi vdpau +vulkan wayland xv zimg + zlib +" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + || ( cli libmpv ) + egl? ( || ( X drm wayland ) ) + lua? ( ${LUA_REQUIRED_USE} ) + nvenc? ( || ( egl vulkan ) ) + test? ( cli ) + tools? ( cli ) + uchardet? ( iconv ) + vaapi? ( || ( X drm wayland ) ) + vdpau? ( X ) + vulkan? ( || ( X wayland ) ) + xv? ( X ) +" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + media-libs/libass:=[fontconfig] + >=media-libs/libplacebo-7.349.0:=[vulkan?] + >=media-video/ffmpeg-6.1:=[encode(+),soc(-)?,threads(+),vaapi?,vdpau?] + X? ( + x11-libs/libX11 + x11-libs/libXScrnSaver + x11-libs/libXext + x11-libs/libXpresent + x11-libs/libXrandr + xv? ( x11-libs/libXv ) + ) + alsa? ( media-libs/alsa-lib ) + archive? ( app-arch/libarchive:= ) + bluray? ( media-libs/libbluray:= ) + cdda? ( + dev-libs/libcdio-paranoia:= + dev-libs/libcdio:= + ) + drm? ( + media-libs/libdisplay-info:= + x11-libs/libdrm + egl? ( media-libs/mesa[gbm(+)] ) + ) + dvd? ( media-libs/libdvdnav ) + egl? ( + media-libs/libglvnd + media-libs/libplacebo[opengl] + ) + gamepad? ( media-libs/libsdl2[joystick] ) + iconv? ( + virtual/libiconv + uchardet? ( app-i18n/uchardet ) + ) + jack? ( virtual/jack ) + javascript? ( dev-lang/mujs:= ) + jpeg? ( media-libs/libjpeg-turbo:= ) + lcms? ( media-libs/lcms:2 ) + libcaca? ( media-libs/libcaca ) + lua? ( ${LUA_DEPS} ) + openal? ( media-libs/openal ) + pipewire? ( media-video/pipewire:= ) + pulseaudio? ( media-libs/libpulse ) + rubberband? ( media-libs/rubberband:= ) + sdl? ( media-libs/libsdl2[sound,threads(+),video] ) + sixel? ( media-libs/libsixel ) + sndio? ( media-sound/sndio:= ) + vaapi? ( media-libs/libva:=[X?,drm(+)?,wayland?] ) + vdpau? ( x11-libs/libvdpau ) + vulkan? ( media-libs/vulkan-loader[X?,wayland?] ) + wayland? ( + dev-libs/wayland + x11-libs/libxkbcommon + ) + zimg? ( media-libs/zimg ) + zlib? ( sys-libs/zlib:= ) +" +RDEPEND=" + ${COMMON_DEPEND} + selinux? ( sec-policy/selinux-mplayer ) + tools? ( ${PYTHON_DEPS} ) +" +DEPEND=" + ${COMMON_DEPEND} + X? ( x11-base/xorg-proto ) + dvb? ( sys-kernel/linux-headers ) + nvenc? ( media-libs/nv-codec-headers ) + vulkan? ( dev-util/vulkan-headers ) + wayland? ( >=dev-libs/wayland-protocols-1.41 ) +" +BDEPEND=" + ${PYTHON_DEPS} + >=dev-build/meson-1.3.0 + virtual/pkgconfig + cli? ( dev-python/docutils ) + wayland? ( dev-util/wayland-scanner ) +" + +pkg_pretend() { + if has_version "${CATEGORY}/${PN}[X,opengl]" && use !egl; then #953107 + ewarn "${PN}'s 'opengl' USE was removed in favour of the 'egl' USE as it was" + ewarn "only for the deprecated 'gl-x11' mpv option when 'egl-x11/wayland'" + ewarn "should be used if --gpu-api=opengl. It is recommended to enable 'egl'" + ewarn "unless using vulkan (default since ${PN}-0.40) or something else." + fi +} + +pkg_setup() { + use lua && lua-single_pkg_setup + python-single-r1_pkg_setup +} + +src_configure() { + if use !debug; then + if use test; then + einfo "Skipping -DNDEBUG due to USE=test" + else + append-cppflags -DNDEBUG # treated specially + fi + fi + + local emesonargs=( + $(meson_use cli cplayer) + $(meson_use libmpv) + $(meson_use test tests) + + $(meson_feature cli html-build) + $(meson_feature cli manpage-build) + -Dpdf-build=disabled + + -Dbuild-date=false + + # misc options + $(meson_feature archive libarchive) + $(meson_feature bluray libbluray) + $(meson_feature cdda) + -Dcplugins=enabled + $(meson_feature dvb dvbin) + $(meson_feature dvd dvdnav) + $(meson_feature gamepad sdl2-gamepad) + $(meson_feature iconv) + $(meson_feature javascript) + -Dlibavdevice=enabled + $(meson_feature lcms lcms2) + -Dlua=$(usex lua "${ELUA}" disabled) + $(meson_feature rubberband) + -Dsdl2=$(use gamepad || use sdl && echo enabled || echo disabled) #857156 + $(meson_feature uchardet) + -Dvapoursynth=disabled # only available in overlays + $(meson_feature zimg) + $(meson_feature zlib) + + # audio output + $(meson_feature alsa) + $(meson_feature coreaudio) + $(meson_feature jack) + $(meson_feature openal) + $(meson_feature pipewire) + $(meson_feature pulseaudio pulse) + $(meson_feature sdl sdl2-audio) + $(meson_feature sndio) + + # video output + $(meson_feature X x11) + $(meson_feature aqua cocoa) + $(meson_feature drm) + $(meson_feature jpeg) + $(meson_feature libcaca caca) + $(meson_feature sdl sdl2-video) + $(meson_feature sixel) + $(meson_feature wayland) + $(meson_feature xv) + + -Dgl=$(use aqua || use egl || use libmpv && + echo enabled || echo disabled) + $(meson_feature egl) + $(meson_feature libmpv plain-gl) + + $(meson_feature vulkan) + + # hardware decoding + $(meson_feature nvenc cuda-hwaccel) + $(meson_feature vaapi) + $(meson_feature vdpau) + ) + + meson_src_configure +} + +src_test() { + # ffmpeg tests are picky and easily break without necessarily + # meaning that there are runtime issues (bug #921091,#924276) + meson_src_test --no-suite ffmpeg +} + +src_install() { + meson_src_install + + if use lua; then + insinto /usr/share/${PN} + doins -r TOOLS/lua + + if use cli && use lua_single_target_luajit; then + pax-mark -m "${ED}"/usr/bin/${PN} + fi + fi + + if use tools; then + dobin TOOLS/{mpv_identify.sh,umpv} + newbin TOOLS/idet.sh mpv_idet.sh + python_fix_shebang "${ED}"/usr/bin/umpv + fi + + if use cli; then + dodir /usr/share/doc/${PF}/html + mv "${ED}"/usr/share/doc/{mpv,${PF}/html}/mpv.html || die + mv "${ED}"/usr/share/doc/{mpv,${PF}/examples} || die + fi + + local GLOBIGNORE=*/*build*:*/*policy* + dodoc RELEASE_NOTES DOCS/*.{md,rst} +} + +pkg_postinst() { + xdg_pkg_postinst + + optfeature "various websites URL support$(usev !lua \ + " (requires ${PN} with USE=lua)")" net-misc/yt-dlp +} diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild index a6c237e3f966..e79b68414d16 100644 --- a/media-video/mpv/mpv-9999.ebuild +++ b/media-video/mpv/mpv-9999.ebuild @@ -23,17 +23,16 @@ SLOT="0/2" # soname IUSE=" +X +alsa aqua archive bluray cdda +cli coreaudio debug +drm dvb dvd +egl gamepad +iconv jack javascript jpeg lcms libcaca +libmpv - +lua nvenc openal opengl pipewire pulseaudio rubberband sdl selinux - sixel sndio soc test tools +uchardet vaapi vdpau +vulkan wayland xv - zimg zlib + +lua nvenc openal pipewire pulseaudio rubberband sdl selinux sixel + sndio soc test tools +uchardet vaapi vdpau +vulkan wayland xv zimg + zlib " REQUIRED_USE=" ${PYTHON_REQUIRED_USE} || ( cli libmpv ) egl? ( || ( X drm wayland ) ) lua? ( ${LUA_REQUIRED_USE} ) - nvenc? ( || ( egl opengl vulkan ) ) - opengl? ( || ( X aqua ) ) + nvenc? ( || ( egl vulkan ) ) test? ( cli ) tools? ( cli ) uchardet? ( iconv ) @@ -46,8 +45,8 @@ RESTRICT="!test? ( test )" COMMON_DEPEND=" media-libs/libass:=[fontconfig] - >=media-libs/libplacebo-7.349.0:=[opengl?,vulkan?] - >=media-video/ffmpeg-6.1:=[encode,soc(-)?,threads,vaapi?,vdpau?] + >=media-libs/libplacebo-7.349.0:=[vulkan?] + >=media-video/ffmpeg-6.1:=[encode(+),soc(-)?,threads(+),vaapi?,vdpau?] X? ( x11-libs/libX11 x11-libs/libXScrnSaver @@ -85,10 +84,9 @@ COMMON_DEPEND=" libcaca? ( media-libs/libcaca ) lua? ( ${LUA_DEPS} ) openal? ( media-libs/openal ) - opengl? ( media-libs/libglvnd[X?] ) pipewire? ( media-video/pipewire:= ) pulseaudio? ( media-libs/libpulse ) - rubberband? ( media-libs/rubberband ) + rubberband? ( media-libs/rubberband:= ) sdl? ( media-libs/libsdl2[sound,threads(+),video] ) sixel? ( media-libs/libsixel ) sndio? ( media-sound/sndio:= ) @@ -112,16 +110,29 @@ DEPEND=" X? ( x11-base/xorg-proto ) dvb? ( sys-kernel/linux-headers ) nvenc? ( media-libs/nv-codec-headers ) + vaapi? ( + egl? ( x11-libs/libdrm ) + ) vulkan? ( dev-util/vulkan-headers ) wayland? ( >=dev-libs/wayland-protocols-1.41 ) " BDEPEND=" ${PYTHON_DEPS} + >=dev-build/meson-1.3.0 virtual/pkgconfig cli? ( dev-python/docutils ) wayland? ( dev-util/wayland-scanner ) " +pkg_pretend() { + if has_version "${CATEGORY}/${PN}[X,opengl]" && use !egl; then #953107 + ewarn "${PN}'s 'opengl' USE was removed in favour of the 'egl' USE as it was" + ewarn "only for the deprecated 'gl-x11' mpv option when 'egl-x11/wayland'" + ewarn "should be used if --gpu-api=opengl. It is recommended to enable 'egl'" + ewarn "unless using vulkan (default since ${PN}-0.40) or something else." + fi +} + pkg_setup() { use lua && lua-single_pkg_setup python-single-r1_pkg_setup @@ -136,14 +147,6 @@ src_configure() { fi fi - mpv_feature_multi() { - local use set - for use in ${1} ${2}; do - use ${use} || set=disabled - done - echo -D${3-${2}}=${set-enabled} - } - local emesonargs=( $(meson_use cli cplayer) $(meson_use libmpv) @@ -196,37 +199,17 @@ src_configure() { $(meson_feature wayland) $(meson_feature xv) - -Dgl=$(use egl || use libmpv || use opengl && + -Dgl=$(use aqua || use egl || use libmpv && echo enabled || echo disabled) $(meson_feature egl) - $(mpv_feature_multi egl X egl-x11) - $(mpv_feature_multi egl drm gbm) # gbm is only used by egl-drm - $(mpv_feature_multi egl drm egl-drm) - $(mpv_feature_multi egl wayland egl-wayland) $(meson_feature libmpv plain-gl) - $(mpv_feature_multi opengl X gl-x11) - $(mpv_feature_multi opengl aqua gl-cocoa) $(meson_feature vulkan) # hardware decoding $(meson_feature nvenc cuda-hwaccel) - $(meson_feature nvenc cuda-interop) - $(meson_feature vaapi) - $(mpv_feature_multi vaapi X vaapi-x11) - $(mpv_feature_multi vaapi drm vaapi-drm) - $(mpv_feature_multi vaapi wayland vaapi-wayland) - $(meson_feature vdpau) - $(mpv_feature_multi vdpau opengl vdpau-gl-x11) - - $(mpv_feature_multi aqua opengl videotoolbox-gl) - - # notable options left to automagic - #dmabuf-wayland: USE="drm wayland" + plus memfd_create support - #vulkan-interop: USE="vulkan" + >=ffmpeg-6.1 - # TODO?: perhaps few more similar compound options should be left auto ) meson_src_configure diff --git a/media-video/noad/Manifest b/media-video/noad/Manifest index 6f082bb3e1ad..2d11395d41d4 100644 --- a/media-video/noad/Manifest +++ b/media-video/noad/Manifest @@ -6,5 +6,6 @@ AUX record-50-noad.sh 1443 BLAKE2B 98cba3a0024bc8c4426d2cd5d1e0d5b9d2e2ead2c50f9 DIST noad-0.8.7.tar.gz 144339 BLAKE2B e7492f63e7326cdced041332e05051a6bda2e92798f4b694ff626e65306d6ebe606f871eabc37df1613677c2f739b3caed033b443cbe7edce913b83a0365e3e5 SHA512 fa1d0226144175de586f938a594fe0a3c0b8a924a258f1406cf52078d5e6d84f46ae685ee3c9f3ce28e62f9eee719d6a938504e39a6b3b9c96043f4bd4aaf69d DIST noad-0.8.8.tar.gz 144269 BLAKE2B 0474c165af16afb93459dd753017e25afe5e9c42439af9e1f2e23e4aeb5d4cd3610a66dec80d63d1c5f71d2ef9f6817ad831a5e368e8aeda53e078d0137f67ae SHA512 1795072e0b416c9904e8769da2bfe08120ea2c55427bd6e7479c6d79bb5a1b25abe82c0ed2cf8b3d5f7a354e2f60b1251e9d1ed102d19b3c45c1cd34a5e8e6d0 EBUILD noad-0.8.7-r1.ebuild 1769 BLAKE2B 4692935ad4db4606f8adbe1ac88015c537bad1a05ec7533d107c3f9a110fd66b3c56e43b3e13ee6149af78f94f93397a768c9b9f8c2908a55eaa4b7edebda4d1 SHA512 db63a47fabea9730f418eef7a13fae3b55c5c23bece292e529ec9128c2dd269ac7b153f1f264fbfae29dff6de2e0d70e26ded5fed8563062e48cc1327f802d08 +EBUILD noad-0.8.8-r1.ebuild 1786 BLAKE2B 3f502b32d8deb67dbf319fde0836f9a9d727e43e7332e868bb79b592d0462b08b25e1fd91d61e86879b498c3ee1382024594a26bf10cbf28e2c61d6d05678139 SHA512 2955d4fe092d77126cd962bd71950b6dae1fd820f33b578f85701cf226b36ea4a7d786ac74276ca75d82e43222908ca62da6ba8ea5e7acb24315cb9e9b1eb821 EBUILD noad-0.8.8.ebuild 1758 BLAKE2B 83ac4ae2eb2acfcc084be0b625571e32d0ea7d0ba61169ce6c54434962d52295ae0d2ee97b3d17de9f7ca4e1ce462d08c7a77d15af61a6d1fd34dc751e91a5ae SHA512 e23fbfb9d7ddc9276c4464151d49285fad2511cdb5e6ace73a2b3fcd409a88bb8c2cefa828d5393d37c6c5b634e95e02d20df77e6d490153366dc404c31784b3 MISC metadata.xml 864 BLAKE2B 2978ee81c7da71ad061ad74b4e54b58f9432039cadb5958b39a10377c46aa8d501a50b5add07ece74c015a026b0452cd30d9f7725df5f490092ee711257320b0 SHA512 b02e2e8f4554019cbef42cc43a3af3ee3119dbeef0c05d8bd929215b131aeb7e0dffd2fb5d7d110bfc9af3e96c0ab73d2e94949e5ba4e8bc9f96298cb889d8e3 diff --git a/media-video/noad/noad-0.8.8-r1.ebuild b/media-video/noad/noad-0.8.8-r1.ebuild new file mode 100644 index 000000000000..2d8fb055a520 --- /dev/null +++ b/media-video/noad/noad-0.8.8-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 2021-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools ffmpeg-compat + +DESCRIPTION="Mark commercial breaks in VDR recordings" +HOMEPAGE="https://github.com/madmartin/noad" +SRC_URI="https://github.com/madmartin/noad/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+ffmpeg imagemagick libmpeg2" +REQUIRED_USE="|| ( ffmpeg libmpeg2 )" + +DEPEND=" + libmpeg2? ( media-libs/libmpeg2 ) + ffmpeg? ( media-video/ffmpeg-compat:4= ) + imagemagick? ( media-gfx/imagemagick:= )" +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # bug #834408, https://github.com/madmartin/noad/issues/2 + ffmpeg_compat_setup 4 + + econf \ + $(usev imagemagick --with-magick) \ + $(usev !ffmpeg --without-ffmpeg) \ + $(usev !libmpeg2 --without-libmpeg2) \ + --with-tools +} + +src_install() { + dobin noad showindex checkMarks + use imagemagick && dobin markpics + + dodoc README* INSTALL + # example scripts are installed as dokumentation + dodoc allnewnoad allnoad allnoadnice allnoaduncut checkAllMarks clearlogos noadcall.sh noadifnew stat2html statupd + + newconfd "${FILESDIR}"/confd_vdraddon.noad vdraddon.noad + + insinto /usr/share/vdr/record + doins "${FILESDIR}"/record-50-noad.sh + + insinto /usr/share/vdr/shutdown + doins "${FILESDIR}"/pre-shutdown-15-noad.sh + + insinto /etc/vdr/reccmds + doins "${FILESDIR}"/reccmds.noad.conf + + exeinto /usr/share/vdr/bin + doexe "${FILESDIR}"/noad-reccmd +} + +pkg_postinst() { + elog + elog "To integrate noad in VDR you should do this:" + elog + elog "start and set Parameter in /etc/conf.d/vdraddon.noad" + elog + elog "Note: You can use here all parameters for noad," + elog "please look in the documentation of noad." +} diff --git a/media-video/obs-studio/Manifest b/media-video/obs-studio/Manifest index 01fd4e488f00..7e933e351163 100644 --- a/media-video/obs-studio/Manifest +++ b/media-video/obs-studio/Manifest @@ -1,21 +1,9 @@ AUX json11-1.0.0-include-cstdint.patch 258 BLAKE2B 2b7cb5abcbaaaf7c44f1b483716cd68e7a68a5d92f0107847aeb514b93c2b34da1311bd9465ba2077ef568cb7d1a7c150fc89e9adb981a9b59fd7821cefb159d SHA512 c7df20caa578d12a707b74fde88f856dbbf5e75176d7b9aca13f7fe9b501f4ca844fee5a4f2250b3c9de4afd1cd9ed1c26717a06ea4b1d239415cc154152305f -AUX obs-studio-31.0.0-libx11-link.patch 827 BLAKE2B b0572ea25d4d54bf6ed0fe6bafb1fc80611e8868439829c044bc7bcf08c6d292035c2e2b89ab467687275ce5cf82c4787a55da47110458af0b6637bf1c7cc4f7 SHA512 ade4e7927066635c32813c6a5e24808ccfea0494490b7df009a14caa0e9f212de67ff9330d3191838540488725999b087b7299b6ddd17e64afc31c09cd65f2b3 -DIST cef_binary_5060_linux_x86_64_v3.tar.xz 91352460 BLAKE2B 443f4b1bc638d3fe462fd8b8dd167e96f65aebb2b8de3616beac298449e2786c746f9a1fa4a0dbe2e3ef2d593139938e97538890d3ca3b74018b3afb9c7fc661 SHA512 1fbdf1d4ed117f3b8af20476c57502145d652b451ba8e0a544081403d292cc7a78642e9071b8f0283a19ef7ad507ef6e0d9df32b00afc51605ab74f650a7d755 DIST cef_binary_6533_linux_aarch64.tar.xz 337489544 BLAKE2B f82cf2e8c80413c62315abd82f8565bbe4d4d056d9c8306bb08c3e6e9ce2920994b729cc27ddbbca4a206c8edcd9c5768410d6bdbe4e1e8e4887fe6da40010e3 SHA512 210567db67eaaaa0a2ff8718778aee90666e1a43ab7cb46832eae953e847d5e837445ee37d44701a0a546ab703b5ae298494d52e67eafc061c9eacb389a51b09 DIST cef_binary_6533_linux_x86_64.tar.xz 325687240 BLAKE2B 5d34cac26cd35ebb1ce5c4f978cbc16766ad51696c800c1d2c999d50e9340420c580094e57dc9d06f0aa063708c0aef45cee2cdcaad5ba999c7b5c722423de90 SHA512 2539e3cd59b70511f438921348472298ad6cd55c20516b19fc6f200c44ab157b067ef557e2e8ba790635b7351ea553fed044abf979fc6bdf0220b210d95b883b -DIST obs-browser-16ff0faef223959f6ab9dbfd4e8c6c1622a7991b.tar.gz 113861 BLAKE2B 15c6014ee1438bec4ef5b308db6e4825a51025b5fa273d3f92ed16459d2bda4390a973199daa0d1fcbc8596a3ac162b76d35ad1dacb5313c1429330b1e8604f0 SHA512 136b20eef0ef75ed7ee90da5f47746a8bae4387bc219d85395ecef60e17c23dec47f77f1b9fffa73bd7610abd32309cab9952c71044cf375335d676c2ef51818 -DIST obs-browser-a76b4d8810a0a33e91ac5b76a0b1af2f22bf8efd.tar.gz 113664 BLAKE2B 1079a11ac5865aee18c1e1768df31db56306ecbce9aa03b1869bbfc37934c13b24f9555e574fcb31f4f0c7d7a9841ea2dacf7b8ac614294c834ebce2026eb305 SHA512 70b428b5ab7e7d9e8c1402656530dbea590d122e098e4e1b3ca293061b3b5ee1f91d969f2c0bfc3efa581d539670e94a68c2ac80afce02b5ea0581fedc0fd243 -DIST obs-browser-c710222ec9d7ef9aa5d7099e9019d636e2c89f00.tar.gz 112527 BLAKE2B abfdd7cff3ec4479cc78d1f85a404ac48c2ebee1ba679a48e4e7abeb685ee08faa00059bda1cee2d5abf16b69ad0aa843898f612b3ee9d46f0950bd546aa6e44 SHA512 1ec2f48ce986c0d44cddf4332c8b58b8eb1fcb6a662504dd7ec580f9eb45b2a570542424d4c31ed6f96060746f21082661d43bf50b94469b4ef0c1f0b9190f7c -DIST obs-studio-30.2.3.tar.gz 16150339 BLAKE2B b3ed65060881a731bd2e48d8b490cde4a0cf2886bfbdfb2f09536b4aae15c8230c6f6fc20eed3943b88c194b46509dca702d7e955b5b148b5f3577db410f0889 SHA512 1fea762b8fb4d5401516d9e547fe20db389633fb1abbdb52e4b9559ab6aaf3b9f4c25e055896b4063c6a693bfeb78e6463486b4c66e3994a6d1ceb0b7f65865f -DIST obs-studio-31.0.0.tar.gz 16012774 BLAKE2B 1cc70a755845700c7a59d096ff3ee5e5af2b4b737745d60154e53a3f56505ecbdd0ae4f2f6b80747131667457f1549e64eb80f52d05c37ea3a70eb9d596d5db3 SHA512 e3d4e495b971d471f4742c0d3101c5b2f06995579516920d96d16a7a521f0bf688bc8b5c1243f5266e186297c368189b0ee24e25989f38647dcff2a145b9685f -DIST obs-studio-31.0.1.tar.gz 16033476 BLAKE2B 91b92949c939089d789ff4f0efd574812d498acacb1bc60c1770528ef77c00d29c593f7d08e03d1cd81fad5d5543607aa3a4a03b60ed1a1372ba63685922c8a7 SHA512 f0f520befa7e6644e31614a3900175e6afc277117b128acd1165835cbcddda67e216ea484d8db54b7e6c79aac3d48cf873221dd24e807ed9d2d38c4501267f12 -DIST obs-studio-31.0.2.tar.gz 16033274 BLAKE2B a56c948619f1ff79d44e8a3a9d08ef42bb21bf4c903216606e71918084411bdbf0f72f075e389d799f22e511e786a08953c7ac70468151a87098381d76314d47 SHA512 d0f273e91b354523289eb0c295f45be80e1d0c6e383f28979375e243ace7e55da58e5c17cbfc64bdedf053a78fd39e520b8b704dfb4e1fe8dcf3814d0eb56705 -DIST obs-websocket-0548c7798a323fe5296c150e13b898a5ee62fc1e.tar.gz 250611 BLAKE2B fefeab4a637528138152d6e1bd374d6e3f08e4a4e20698665adf4dd925e7831df5bdb1068e402def71b6e12e239db823dac2944e6549c00e914abca175d16fc0 SHA512 f24f520c4a08ad2b80d97c5dfba14421fcd48661d3b0fb694af5d11e063c711e7bf49a4baa95d9de8aff07b6fbbd4b4681ce10a4074506d98cf25c793cc2844d -DIST obs-websocket-63e04d20daf84391955580579e6576dfb373fa7f.tar.gz 250603 BLAKE2B 39f36c2894d010aa45313698353ca5ac75c3464c6c0f1d71eff083bd2a2e22c6d689d19836feb7530fa19b02bd6ac18fa0455093d5000aa6619901fd98ff90bb SHA512 d6a597185847c0983539960d4c032d25420cb2c3457e4fdf09d431c23ab961b0dea774109957f3b78031085a7d3d0ec4c913e4c27a58d9f972e0e3bfb5d019a5 -DIST obs-websocket-eed8a49933786383d11f4868a4e5604a9ee303c6.tar.gz 250566 BLAKE2B 138041a2bdd5d7eb6b5c2636c17fe6ae8a30986ec55548556ce4a1762b2bcc3fee6e039840220d9d60d3314527647334bf7a408dc63e0ab3f0cc45f0e0e65a47 SHA512 21ff4a58465bcb8917f2e213b430dbcbfd56a1647e80c351f18479d7dd3ff2b4c64292132ca26b40054f2b994db9dd8d0a2cb97f32498cb5d59f2812272a6ec5 -EBUILD obs-studio-30.2.3-r1.ebuild 6867 BLAKE2B a7c337e57b14866d9939ecb12a66da289184fb686121593a4be35c5d24672a4e1b57e0858e9bb74d9ab6b3dd9095894ffecb830c9070ec7ad6ceb28cfa9db56c SHA512 0f9f310475c45042517bedcca8269373f5cdcaa0fec83a927c6b45b01db536c0e1b63e1c14579747511c47fd3247f375e674e1296f4481f880125bc3f0f3047b -EBUILD obs-studio-31.0.0-r3.ebuild 6850 BLAKE2B e99f19fe1b1bf3ceeff2de30bcbcee8565196c7ddd961bfd50090b593b1e86a434393b1806503d3edd92b977c5a454fd6bb42dec76ddceadaacb0e912487a179 SHA512 fc02fabcf74a51ed78be9829cf15f475df9022af86786577fc3138396b589d480e9afeef7791a802761e746601bc0b21bc6868ab2ec7a3ac89521b4bd01eaf2b -EBUILD obs-studio-31.0.1.ebuild 6765 BLAKE2B 94a61235d3d6002536a97a090996e7610b145ec9abcd06ec0c216c69b03f75ba0d3a780aa2e95ffda14cfa84ad14e8f885a071fa16d3ea3eb2344580e6093595 SHA512 a2cdbada1ec1249c0db9ed69e2bf5c4d3654da8efa8a23952cf8df08c13ab853a4660fba8be964f84f73782503aa38fb4cb4627b5d34e39360352b99d0eae401 -EBUILD obs-studio-31.0.2.ebuild 6962 BLAKE2B 47c24f482cfe88191b19a8ab167ce8b329eb54f42d6218f36b7451a2e3366a37fe6a668b0ba631c1efed60d9f65120ca25d0b39c2c0181947ec6713279c00ea4 SHA512 f28ed3fbee390df1a1921d8e3dd2d51ef5d46ae464bd1338033129863d892ddb372173c37cf655c70e5addcae048e16414f7f05c6f5d0e872052129465e1bf92 -EBUILD obs-studio-9999.ebuild 6948 BLAKE2B ce6edeec1084dfd2504e4195f71ab7c402748f9bab48252e6f9f3818e18bd3028c652052d68e8d7f7fb7a5aeffa7d5affde31554bffec0eba5fd88783219652f SHA512 95d8b2f76d9ccec4195569dc96c3cef43ab87cd24c9c4df934fceb227a48281c7f65f9a525c71d4a370db64dafd5941309b8bed306d416574b1666d226733381 +DIST obs-browser-b56fd78936761891475458447c1cc9058bb9c2d4.tar.gz 113837 BLAKE2B e25b5f187d1316922e0cc53aafd44df6c4b6e5cbfc1a89c6f821912460887f3c5c5f62d3ca5a1e2f354704a073e286af245bf1bd5c3ccdf220b1d896349d1d11 SHA512 0244885ca8b64fc06108c57091474c5498c5b18755439119ebe58a387ec9a9a13a48c11149c9e8bbb64e4bdf897fdf28d67fa46fe76d1429669d140531bbf968 +DIST obs-studio-31.0.3.tar.gz 16033846 BLAKE2B fa28a1c650735d93403193f41333a758365c40035305b7d133a0115fcc12cc01639b594b84b897643d9627410fa305825cb0cdeb664e4ea0a4b59b33021aeee6 SHA512 eeb59c0ccc530a04ead3389839efad6ae6b7b757ec5bf6df7b9bb0c393f0fa5fcec0e27e34c7e4801e11ef071518f423bb527cbf81fc3d29533d3757914706d8 +DIST obs-websocket-c542622d7b6d41ce5875f54efdab1d4ac2967ef4.tar.gz 250604 BLAKE2B 9f41a623ba0b27b4ac2a7e315bcd51e9d625636d16d98c855b9d62ed0eb8e90c1fa1ef8532a2c865af202296458e0c8c83751f1883b2100d1f553e1289328994 SHA512 3b22fc6b48a048ca3b29d52a8cf36218f686c6c09540aa104b183b128f39c2dcd532f6b91b01b71b058905ae62b6304d8bfb4ed982ed69ccc457cb1a6dd8e278 +EBUILD obs-studio-31.0.3.ebuild 7097 BLAKE2B 1bedf8554834ad90b56bf483d3261a6cbe26f998b739cafde92b254b9fbe91cd13a3a46b0a9de192c61106018fbe916a83d8501a266bec701523eaf963921bb8 SHA512 874feab781097d46dbda54d8a4a211a05e6d8b523687de031726c308a106838c4f96fc9a1ec1df001b0f4f81492c50432f7269b7bba3bc611172c68d0f235971 +EBUILD obs-studio-9999.ebuild 6959 BLAKE2B c344799b54356b2737cbffc275c321476f1e85fca16f4f405723ef372f29eef01c0a447faa4f3380b0fa56744db640ca98cf1eb5312be2a25a6bfd7f27540814 SHA512 377855b674d26f593b0e854076a23a14de943bdfaab0d6592644b61aaa56607551956a62d26b22becf976bcaff93576b5d47be500c211b2d7687d7ec21d528b5 MISC metadata.xml 1533 BLAKE2B 7bc778d152d6854330f821d0712da81b54397a35118baf4ba61b3ce4eb7aff5a292d4e4c74c01992761c3cae15b367dcf85450080e920d35ffeb2ee06c74483b SHA512 3dbc5096e3203ec8350e75db78519a061270d52d441e159ab297147a729bda21016a26e15b5c0447dc4a835da59ee822da99265e4f8c3bea3a1e173b134c739c diff --git a/media-video/obs-studio/files/obs-studio-31.0.0-libx11-link.patch b/media-video/obs-studio/files/obs-studio-31.0.0-libx11-link.patch deleted file mode 100644 index 40aa5c2130d3..000000000000 --- a/media-video/obs-studio/files/obs-studio-31.0.0-libx11-link.patch +++ /dev/null @@ -1,28 +0,0 @@ -- https://bugs.gentoo.org/946057 -- https://github.com/obsproject/obs-studio/issues/11667 - -From 428142d7022989af61a684a680e2d6ecc5b7ca8a Mon Sep 17 00:00:00 2001 -From: Kurt Kartaltepe <kkartaltepe@gmail.com> -Date: Tue, 24 Dec 2024 10:22:40 -0800 -Subject: [PATCH] libobs: Fix underlinking by adding libx11 - -We directly depend on libx11 for various operations in obs-nix-x11.c, -not just xcb. So be sure to link it in too. - -fixes #11667 ---- - libobs/cmake/os-linux.cmake | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libobs/cmake/os-linux.cmake b/libobs/cmake/os-linux.cmake -index 317e75cab0c1dd..1af874f4f1fefe 100644 ---- a/libobs/cmake/os-linux.cmake -+++ b/libobs/cmake/os-linux.cmake -@@ -47,6 +47,7 @@ endif() - target_link_libraries( - libobs - PRIVATE -+ X11::X11 - X11::x11-xcb - xcb::xcb - LibUUID::LibUUID diff --git a/media-video/obs-studio/obs-studio-30.2.3-r1.ebuild b/media-video/obs-studio/obs-studio-30.2.3-r1.ebuild deleted file mode 100644 index 81b7effe5cfc..000000000000 --- a/media-video/obs-studio/obs-studio-30.2.3-r1.ebuild +++ /dev/null @@ -1,278 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CMAKE_REMOVE_MODULES_LIST=( FindFreetype ) -LUA_COMPAT=( luajit ) -PYTHON_COMPAT=( python3_{9..12} ) - -inherit cmake flag-o-matic lua-single optfeature python-single-r1 xdg - -CEF_DIR="cef_binary_5060_linux_x86_64" -CEF_REVISION="_v3" -OBS_BROWSER_COMMIT="c710222ec9d7ef9aa5d7099e9019d636e2c89f00" -OBS_WEBSOCKET_COMMIT="0548c7798a323fe5296c150e13b898a5ee62fc1e" - -DESCRIPTION="Software for Recording and Streaming Live Video Content" -HOMEPAGE="https://obsproject.com" - -if [[ ${PV} == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/obsproject/obs-studio.git" - EGIT_SUBMODULES=( - plugins/obs-browser - plugins/obs-websocket - ) -else - SRC_URI=" - https://github.com/obsproject/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz - https://github.com/obsproject/obs-browser/archive/${OBS_BROWSER_COMMIT}.tar.gz -> obs-browser-${OBS_BROWSER_COMMIT}.tar.gz - https://github.com/obsproject/obs-websocket/archive/${OBS_WEBSOCKET_COMMIT}.tar.gz -> obs-websocket-${OBS_WEBSOCKET_COMMIT}.tar.gz - " - KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" -fi - -SRC_URI+=" browser? ( https://cdn-fastly.obsproject.com/downloads/${CEF_DIR}${CEF_REVISION}.tar.xz )" - -LICENSE="Boost-1.0 GPL-2+ MIT Unlicense" -SLOT="0" -IUSE=" - +alsa browser decklink fdk jack lua mpegts nvenc pipewire pulseaudio - python qsv speex +ssl test truetype v4l vlc wayland websocket -" -RESTRICT="!test? ( test )" -REQUIRED_USE=" - browser? ( || ( alsa pulseaudio ) ) - lua? ( ${LUA_REQUIRED_USE} ) - python? ( ${PYTHON_REQUIRED_USE} ) -" - -BDEPEND=" - lua? ( dev-lang/swig ) - python? ( dev-lang/swig ) -" -# media-video/ffmpeg[opus] required due to bug 909566 -DEPEND=" - dev-cpp/nlohmann_json - dev-libs/glib:2 - dev-libs/jansson:= - dev-libs/uthash - dev-qt/qtbase:6[network,widgets,xml(+)] - dev-qt/qtsvg:6 - media-libs/libglvnd[X] - media-libs/libva - media-libs/rnnoise - media-libs/x264:= - media-video/ffmpeg:=[nvenc?,opus,x264] - net-misc/curl - sys-apps/dbus - sys-apps/pciutils - sys-apps/util-linux - sys-libs/zlib:= - x11-libs/libX11 - x11-libs/libxcb:= - x11-libs/libXcomposite - x11-libs/libXfixes - x11-libs/libxkbcommon - alsa? ( media-libs/alsa-lib ) - browser? ( - || ( - >=app-accessibility/at-spi2-core-2.46.0:2 - ( app-accessibility/at-spi2-atk dev-libs/atk ) - ) - dev-libs/expat - dev-libs/glib - dev-libs/nspr - dev-libs/nss - dev-libs/wayland - media-libs/alsa-lib - media-libs/fontconfig - media-libs/mesa[gbm(+)] - net-print/cups - x11-libs/cairo - x11-libs/libdrm - x11-libs/libXcursor - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXi - x11-libs/libxkbcommon - x11-libs/libXrandr - x11-libs/libXrender - x11-libs/libXScrnSaver - x11-libs/libxshmfence - x11-libs/libXtst - x11-libs/pango - ) - fdk? ( media-libs/fdk-aac:= ) - jack? ( virtual/jack ) - lua? ( ${LUA_DEPS} ) - mpegts? ( - net-libs/librist - net-libs/srt - ) - nvenc? ( >=media-libs/nv-codec-headers-12 ) - pipewire? ( media-video/pipewire:= ) - pulseaudio? ( media-libs/libpulse ) - python? ( ${PYTHON_DEPS} ) - qsv? ( media-libs/libvpl ) - speex? ( media-libs/speexdsp ) - ssl? ( net-libs/mbedtls:0= ) - test? ( dev-util/cmocka ) - truetype? ( - media-libs/fontconfig - media-libs/freetype - ) - v4l? ( - media-libs/libv4l - virtual/udev - ) - vlc? ( media-video/vlc:= ) - wayland? ( - dev-libs/wayland - x11-libs/libxkbcommon - ) - websocket? ( - dev-cpp/asio - dev-cpp/websocketpp - dev-libs/qr-code-generator - ) -" -RDEPEND="${DEPEND} - qsv? ( media-libs/intel-mediasdk ) -" - -QA_PREBUILT=" - usr/lib*/obs-plugins/chrome-sandbox - usr/lib*/obs-plugins/libcef.so - usr/lib*/obs-plugins/libEGL.so - usr/lib*/obs-plugins/libGLESv2.so - usr/lib*/obs-plugins/libvk_swiftshader.so - usr/lib*/obs-plugins/libvulkan.so.1 - usr/lib*/obs-plugins/swiftshader/libEGL.so - usr/lib*/obs-plugins/swiftshader/libGLESv2.so -" - -pkg_setup() { - use lua && lua-single_pkg_setup - use python && python-single-r1_pkg_setup -} - -src_unpack() { - default - - if [[ ${PV} == 9999 ]]; then - git-r3_src_unpack - else - rm -d ${P}/plugins/obs-browser || die - mv obs-browser-${OBS_BROWSER_COMMIT} ${P}/plugins/obs-browser || die - - rm -d ${P}/plugins/obs-websocket || die - mv obs-websocket-${OBS_WEBSOCKET_COMMIT} ${P}/plugins/obs-websocket || die - fi -} - -src_prepare() { - default - - sed -i '/-Werror$/d' "${WORKDIR}"/${P}/cmake/Modules/CompilerConfig.cmake || die - - # -Werror=lto-type-mismatch - # https://bugs.gentoo.org/867250 - # https://github.com/obsproject/obs-studio/issues/8988 - use wayland && filter-lto - - cmake_src_prepare - - pushd deps/json11 &> /dev/null || die - eapply "${FILESDIR}/json11-1.0.0-include-cstdint.patch" - popd &> /dev/null || die -} - -src_configure() { - local libdir=$(get_libdir) - local mycmakeargs=( - $(usev browser -DCEF_ROOT_DIR=../${CEF_DIR}) - -DCALM_DEPRECATION=ON - -DCCACHE_SUPPORT=OFF - -DENABLE_ALSA=$(usex alsa) - -DENABLE_AJA=OFF - -DENABLE_BROWSER=$(usex browser) - -DENABLE_DECKLINK=$(usex decklink) - -DENABLE_FREETYPE=$(usex truetype) - -DENABLE_JACK=$(usex jack) - -DENABLE_LIBFDK=$(usex fdk) - -DENABLE_NATIVE_NVENC=OFF - -DENABLE_NEW_MPEGTS_OUTPUT=$(usex mpegts) - -DENABLE_PIPEWIRE=$(usex pipewire) - -DENABLE_PULSEAUDIO=$(usex pulseaudio) - -DENABLE_QSV11=$(usex qsv) - -DENABLE_RNNOISE=ON - -DENABLE_RTMPS=$(usex ssl ON OFF) # Needed for bug 880861 - -DENABLE_SPEEXDSP=$(usex speex) - -DENABLE_UNIT_TESTS=$(usex test) - -DENABLE_V4L2=$(usex v4l) - -DENABLE_VLC=$(usex vlc) - -DENABLE_VST=ON - -DENABLE_WAYLAND=$(usex wayland) - -DENABLE_WEBRTC=OFF # Requires libdatachannel. - -DENABLE_WEBSOCKET=$(usex websocket) - -DOBS_MULTIARCH_SUFFIX=${libdir#lib} - -DUNIX_STRUCTURE=1 - ) - - if [[ ${PV} != 9999 ]]; then - mycmakeargs+=( - -DOBS_VERSION_OVERRIDE=${PV} - ) - fi - - if use lua || use python; then - mycmakeargs+=( - -DENABLE_SCRIPTING_LUA=$(usex lua) - -DENABLE_SCRIPTING_PYTHON=$(usex python) - -DENABLE_SCRIPTING=ON - ) - else - mycmakeargs+=( -DENABLE_SCRIPTING=OFF ) - fi - - if use browser && use ssl; then - mycmakeargs+=( -DENABLE_WHATSNEW=ON ) - else - mycmakeargs+=( -DENABLE_WHATSNEW=OFF ) - fi - - cmake_src_configure -} - -src_install() { - cmake_src_install - - # external plugins may need some things not installed by default, install them here - insinto /usr/include/obs/UI/obs-frontend-api - doins UI/obs-frontend-api/obs-frontend-api.h -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use alsa && ! use pulseaudio; then - elog - elog "For the audio capture features to be available," - elog "at least one of the 'alsa' or 'pulseaudio' USE-flags needs to" - elog "be enabled." - elog - fi - - if use v4l && has_version media-video/v4l2loopback; then - elog - elog "Depending on system configuration, the v4l2loopback kernel module" - elog "may need to be loaded manually, and needs to be re-built after" - elog "kernel changes." - elog - fi - - optfeature "VA-API hardware encoding" media-video/ffmpeg[vaapi] - optfeature "virtual camera support" media-video/v4l2loopback -} diff --git a/media-video/obs-studio/obs-studio-31.0.0-r3.ebuild b/media-video/obs-studio/obs-studio-31.0.0-r3.ebuild deleted file mode 100644 index 7f7837436298..000000000000 --- a/media-video/obs-studio/obs-studio-31.0.0-r3.ebuild +++ /dev/null @@ -1,277 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CMAKE_REMOVE_MODULES_LIST=( FindFreetype ) -LUA_COMPAT=( luajit ) -# For the time being upstream supports up to Python 3.12 only. -# Any issues found with 3.13 should be reported as a Gentoo bug. -PYTHON_COMPAT=( python3_{10..13} ) - -inherit cmake flag-o-matic lua-single optfeature python-single-r1 xdg - -CEF_VERSION="cef_binary_6533_linux_x86_64" -OBS_BROWSER_COMMIT="a76b4d8810a0a33e91ac5b76a0b1af2f22bf8efd" -OBS_WEBSOCKET_COMMIT="eed8a49933786383d11f4868a4e5604a9ee303c6" - -DESCRIPTION="Software for Recording and Streaming Live Video Content" -HOMEPAGE="https://obsproject.com" - -if [[ ${PV} == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/obsproject/obs-studio.git" - EGIT_SUBMODULES=( - plugins/obs-browser - plugins/obs-websocket - ) -else - SRC_URI=" - https://github.com/obsproject/${PN}/archive/${PV}.tar.gz - -> ${P}.tar.gz - https://github.com/obsproject/obs-browser/archive/${OBS_BROWSER_COMMIT}.tar.gz - -> obs-browser-${OBS_BROWSER_COMMIT}.tar.gz - https://github.com/obsproject/obs-websocket/archive/${OBS_WEBSOCKET_COMMIT}.tar.gz - -> obs-websocket-${OBS_WEBSOCKET_COMMIT}.tar.gz - " - KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" -fi - -SRC_URI+=" browser? ( https://cdn-fastly.obsproject.com/downloads/${CEF_VERSION}.tar.xz )" - -LICENSE="Boost-1.0 GPL-2+ MIT Unlicense" -SLOT="0" -IUSE=" - +alsa browser decklink fdk jack lua mpegts nvenc pipewire pulseaudio - python qsv sndio speex test-input truetype v4l vlc wayland websocket -" -REQUIRED_USE=" - browser? ( || ( alsa pulseaudio ) ) - lua? ( ${LUA_REQUIRED_USE} ) - python? ( ${PYTHON_REQUIRED_USE} ) -" - -BDEPEND=" - lua? ( dev-lang/swig ) - python? ( dev-lang/swig ) -" -# media-video/ffmpeg[opus] required due to bug 909566 -DEPEND=" - dev-cpp/nlohmann_json - dev-libs/glib:2 - dev-libs/jansson:= - dev-libs/uthash - dev-qt/qtbase:6[network,widgets,xml(+)] - dev-qt/qtsvg:6 - media-libs/libglvnd[X] - media-libs/libva - media-libs/rnnoise - media-libs/x264:= - >=media-video/ffmpeg-6.1:=[nvenc?,opus,x264] - net-misc/curl - net-libs/mbedtls:0= - sys-apps/dbus - sys-apps/pciutils - sys-apps/util-linux - sys-libs/zlib:= - x11-libs/libX11 - x11-libs/libxcb:= - x11-libs/libXcomposite - x11-libs/libXfixes - x11-libs/libxkbcommon - alsa? ( media-libs/alsa-lib ) - browser? ( - || ( - >=app-accessibility/at-spi2-core-2.46.0:2 - ( app-accessibility/at-spi2-atk dev-libs/atk ) - ) - dev-libs/expat - dev-libs/glib - dev-libs/nspr - dev-libs/nss - dev-libs/wayland - media-libs/alsa-lib - media-libs/fontconfig - media-libs/mesa[gbm(+)] - net-print/cups - x11-libs/cairo - x11-libs/libdrm - x11-libs/libXcursor - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXi - x11-libs/libxkbcommon - x11-libs/libXrandr - x11-libs/libXrender - x11-libs/libXScrnSaver - x11-libs/libxshmfence - x11-libs/libXtst - x11-libs/pango - ) - fdk? ( media-libs/fdk-aac:= ) - jack? ( virtual/jack ) - lua? ( ${LUA_DEPS} ) - mpegts? ( - net-libs/librist - net-libs/srt - ) - nvenc? ( >=media-libs/nv-codec-headers-12 ) - pipewire? ( media-video/pipewire:= ) - pulseaudio? ( media-libs/libpulse ) - python? ( ${PYTHON_DEPS} ) - qsv? ( media-libs/libvpl ) - sndio? ( media-sound/sndio ) - speex? ( media-libs/speexdsp ) - truetype? ( - media-libs/fontconfig - media-libs/freetype - ) - v4l? ( - media-libs/libv4l - virtual/udev - ) - vlc? ( media-video/vlc:= ) - wayland? ( - dev-libs/wayland - x11-libs/libxkbcommon - ) - websocket? ( - dev-cpp/asio - dev-cpp/websocketpp - dev-libs/qr-code-generator - ) -" -RDEPEND="${DEPEND} - qsv? ( media-libs/intel-mediasdk ) -" - -PATCHES=( "${FILESDIR}"/${PN}-31.0.0-libx11-link.patch ) - -QA_PREBUILT=" - usr/lib*/obs-plugins/chrome-sandbox - usr/lib*/obs-plugins/libcef.so - usr/lib*/obs-plugins/libEGL.so - usr/lib*/obs-plugins/libGLESv2.so - usr/lib*/obs-plugins/libvk_swiftshader.so - usr/lib*/obs-plugins/libvulkan.so.1 - usr/lib*/obs-plugins/swiftshader/libEGL.so - usr/lib*/obs-plugins/swiftshader/libGLESv2.so -" - -pkg_setup() { - use lua && lua-single_pkg_setup - use python && python-single-r1_pkg_setup -} - -src_unpack() { - default - - if [[ ${PV} == 9999 ]]; then - git-r3_src_unpack - else - rm -d ${P}/plugins/obs-browser || die - mv obs-browser-${OBS_BROWSER_COMMIT} ${P}/plugins/obs-browser || die - - rm -d ${P}/plugins/obs-websocket || die - mv obs-websocket-${OBS_WEBSOCKET_COMMIT} ${P}/plugins/obs-websocket || die - fi -} - -src_prepare() { - # -Werror=lto-type-mismatch - # https://bugs.gentoo.org/867250 - # https://github.com/obsproject/obs-studio/issues/8988 - use wayland && filter-lto - - cmake_src_prepare - - pushd deps/json11 &> /dev/null || die - eapply "${FILESDIR}/json11-1.0.0-include-cstdint.patch" - popd &> /dev/null || die -} - -src_configure() { - local libdir=$(get_libdir) - local mycmakeargs=( - $(usev browser -DCEF_ROOT_DIR=../${CEF_VERSION}) - -DENABLE_ALSA=$(usex alsa) - -DENABLE_AJA=OFF - -DENABLE_BROWSER=$(usex browser) - -DENABLE_CCACHE=OFF - -DENABLE_DECKLINK=$(usex decklink) - -DENABLE_FFMPEG_NVENC=$(usex nvenc) - -DENABLE_FREETYPE=$(usex truetype) - -DENABLE_JACK=$(usex jack) - -DENABLE_LIBFDK=$(usex fdk) - -DENABLE_NEW_MPEGTS_OUTPUT=$(usex mpegts) - -DENABLE_NVENC=$(usex nvenc) - -DENABLE_PIPEWIRE=$(usex pipewire) - -DENABLE_PULSEAUDIO=$(usex pulseaudio) - -DENABLE_QSV11=$(usex qsv) - -DENABLE_RNNOISE=ON - -DENABLE_SNDIO=$(usex sndio) - -DENABLE_SPEEXDSP=$(usex speex) - -DENABLE_TEST_INPUT=$(usex test-input) - -DENABLE_V4L2=$(usex v4l) - -DENABLE_VLC=$(usex vlc) - -DENABLE_VST=ON - -DENABLE_WAYLAND=$(usex wayland) - -DENABLE_WEBRTC=OFF # Requires libdatachannel. - -DENABLE_WEBSOCKET=$(usex websocket) - ) - - if [[ ${PV} != 9999 ]]; then - mycmakeargs+=( - -DOBS_VERSION_OVERRIDE=${PV} - ) - fi - - if use lua || use python; then - mycmakeargs+=( - -DENABLE_SCRIPTING_LUA=$(usex lua) - -DENABLE_SCRIPTING_PYTHON=$(usex python) - -DENABLE_SCRIPTING=ON - ) - else - mycmakeargs+=( -DENABLE_SCRIPTING=OFF ) - fi - - if use browser; then - mycmakeargs+=( -DENABLE_WHATSNEW=ON ) - else - mycmakeargs+=( -DENABLE_WHATSNEW=OFF ) - fi - - cmake_src_configure -} - -src_install() { - cmake_src_install - - # external plugins may need some things not installed by default, install them here - insinto /usr/include/obs/UI/obs-frontend-api - doins UI/obs-frontend-api/obs-frontend-api.h -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use alsa && ! use pulseaudio; then - elog - elog "For the audio capture features to be available," - elog "at least one of the 'alsa' or 'pulseaudio' USE-flags needs to" - elog "be enabled." - elog - fi - - if use v4l && has_version media-video/v4l2loopback; then - elog - elog "Depending on system configuration, the v4l2loopback kernel module" - elog "may need to be loaded manually, and needs to be re-built after" - elog "kernel changes." - elog - fi - - optfeature "VA-API hardware encoding" media-video/ffmpeg[vaapi] - optfeature "virtual camera support" media-video/v4l2loopback -} diff --git a/media-video/obs-studio/obs-studio-31.0.1.ebuild b/media-video/obs-studio/obs-studio-31.0.1.ebuild deleted file mode 100644 index b0680d76fd20..000000000000 --- a/media-video/obs-studio/obs-studio-31.0.1.ebuild +++ /dev/null @@ -1,275 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CMAKE_REMOVE_MODULES_LIST=( FindFreetype ) -LUA_COMPAT=( luajit ) -# For the time being upstream supports up to Python 3.12 only. -# Any issues found with 3.13 should be reported as a Gentoo bug. -PYTHON_COMPAT=( python3_{10..13} ) - -inherit cmake flag-o-matic lua-single optfeature python-single-r1 xdg - -CEF_VERSION="cef_binary_6533_linux_x86_64" -OBS_BROWSER_COMMIT="a76b4d8810a0a33e91ac5b76a0b1af2f22bf8efd" -OBS_WEBSOCKET_COMMIT="eed8a49933786383d11f4868a4e5604a9ee303c6" - -DESCRIPTION="Software for Recording and Streaming Live Video Content" -HOMEPAGE="https://obsproject.com" - -if [[ ${PV} == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/obsproject/obs-studio.git" - EGIT_SUBMODULES=( - plugins/obs-browser - plugins/obs-websocket - ) -else - SRC_URI=" - https://github.com/obsproject/${PN}/archive/${PV}.tar.gz - -> ${P}.tar.gz - https://github.com/obsproject/obs-browser/archive/${OBS_BROWSER_COMMIT}.tar.gz - -> obs-browser-${OBS_BROWSER_COMMIT}.tar.gz - https://github.com/obsproject/obs-websocket/archive/${OBS_WEBSOCKET_COMMIT}.tar.gz - -> obs-websocket-${OBS_WEBSOCKET_COMMIT}.tar.gz - " - KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" -fi - -SRC_URI+=" browser? ( https://cdn-fastly.obsproject.com/downloads/${CEF_VERSION}.tar.xz )" - -LICENSE="Boost-1.0 GPL-2+ MIT Unlicense" -SLOT="0" -IUSE=" - +alsa browser decklink fdk jack lua mpegts nvenc pipewire pulseaudio - python qsv sndio speex test-input truetype v4l vlc wayland websocket -" -REQUIRED_USE=" - browser? ( || ( alsa pulseaudio ) ) - lua? ( ${LUA_REQUIRED_USE} ) - python? ( ${PYTHON_REQUIRED_USE} ) -" - -BDEPEND=" - lua? ( dev-lang/swig ) - python? ( dev-lang/swig ) -" -# media-video/ffmpeg[opus] required due to bug 909566 -DEPEND=" - dev-cpp/nlohmann_json - dev-libs/glib:2 - dev-libs/jansson:= - dev-libs/uthash - dev-qt/qtbase:6[network,widgets,xml(+)] - dev-qt/qtsvg:6 - media-libs/libglvnd[X] - media-libs/libva - media-libs/rnnoise - media-libs/x264:= - >=media-video/ffmpeg-6.1:=[nvenc?,opus,x264] - net-misc/curl - net-libs/mbedtls:0= - sys-apps/dbus - sys-apps/pciutils - sys-apps/util-linux - sys-libs/zlib:= - x11-libs/libX11 - x11-libs/libxcb:= - x11-libs/libXcomposite - x11-libs/libXfixes - x11-libs/libxkbcommon - alsa? ( media-libs/alsa-lib ) - browser? ( - || ( - >=app-accessibility/at-spi2-core-2.46.0:2 - ( app-accessibility/at-spi2-atk dev-libs/atk ) - ) - dev-libs/expat - dev-libs/glib - dev-libs/nspr - dev-libs/nss - dev-libs/wayland - media-libs/alsa-lib - media-libs/fontconfig - media-libs/mesa[gbm(+)] - net-print/cups - x11-libs/cairo - x11-libs/libdrm - x11-libs/libXcursor - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXi - x11-libs/libxkbcommon - x11-libs/libXrandr - x11-libs/libXrender - x11-libs/libXScrnSaver - x11-libs/libxshmfence - x11-libs/libXtst - x11-libs/pango - ) - fdk? ( media-libs/fdk-aac:= ) - jack? ( virtual/jack ) - lua? ( ${LUA_DEPS} ) - mpegts? ( - net-libs/librist - net-libs/srt - ) - nvenc? ( >=media-libs/nv-codec-headers-12 ) - pipewire? ( media-video/pipewire:= ) - pulseaudio? ( media-libs/libpulse ) - python? ( ${PYTHON_DEPS} ) - qsv? ( media-libs/libvpl ) - sndio? ( media-sound/sndio ) - speex? ( media-libs/speexdsp ) - truetype? ( - media-libs/fontconfig - media-libs/freetype - ) - v4l? ( - media-libs/libv4l - virtual/udev - ) - vlc? ( media-video/vlc:= ) - wayland? ( - dev-libs/wayland - x11-libs/libxkbcommon - ) - websocket? ( - dev-cpp/asio - dev-cpp/websocketpp - dev-libs/qr-code-generator - ) -" -RDEPEND="${DEPEND}" - -QA_PREBUILT=" - usr/lib*/obs-plugins/chrome-sandbox - usr/lib*/obs-plugins/libcef.so - usr/lib*/obs-plugins/libEGL.so - usr/lib*/obs-plugins/libGLESv2.so - usr/lib*/obs-plugins/libvk_swiftshader.so - usr/lib*/obs-plugins/libvulkan.so.1 - usr/lib*/obs-plugins/swiftshader/libEGL.so - usr/lib*/obs-plugins/swiftshader/libGLESv2.so -" - -pkg_setup() { - use lua && lua-single_pkg_setup - use python && python-single-r1_pkg_setup -} - -src_unpack() { - default - - if [[ ${PV} == 9999 ]]; then - git-r3_src_unpack - else - rm -d ${P}/plugins/obs-browser || die - mv obs-browser-${OBS_BROWSER_COMMIT} ${P}/plugins/obs-browser || die - - rm -d ${P}/plugins/obs-websocket || die - mv obs-websocket-${OBS_WEBSOCKET_COMMIT} ${P}/plugins/obs-websocket || die - fi -} - -src_prepare() { - default - - # -Werror=lto-type-mismatch - # https://bugs.gentoo.org/867250 - # https://github.com/obsproject/obs-studio/issues/8988 - use wayland && filter-lto - - cmake_src_prepare - - pushd deps/json11 &> /dev/null || die - eapply "${FILESDIR}/json11-1.0.0-include-cstdint.patch" - popd &> /dev/null || die -} - -src_configure() { - local libdir=$(get_libdir) - local mycmakeargs=( - $(usev browser -DCEF_ROOT_DIR=../${CEF_VERSION}) - -DENABLE_ALSA=$(usex alsa) - -DENABLE_AJA=OFF - -DENABLE_BROWSER=$(usex browser) - -DENABLE_CCACHE=OFF - -DENABLE_DECKLINK=$(usex decklink) - -DENABLE_FFMPEG_NVENC=$(usex nvenc) - -DENABLE_FREETYPE=$(usex truetype) - -DENABLE_JACK=$(usex jack) - -DENABLE_LIBFDK=$(usex fdk) - -DENABLE_NEW_MPEGTS_OUTPUT=$(usex mpegts) - -DENABLE_NVENC=$(usex nvenc) - -DENABLE_PIPEWIRE=$(usex pipewire) - -DENABLE_PULSEAUDIO=$(usex pulseaudio) - -DENABLE_QSV11=$(usex qsv) - -DENABLE_RNNOISE=ON - -DENABLE_SNDIO=$(usex sndio) - -DENABLE_SPEEXDSP=$(usex speex) - -DENABLE_TEST_INPUT=$(usex test-input) - -DENABLE_V4L2=$(usex v4l) - -DENABLE_VLC=$(usex vlc) - -DENABLE_VST=ON - -DENABLE_WAYLAND=$(usex wayland) - -DENABLE_WEBRTC=OFF # Requires libdatachannel. - -DENABLE_WEBSOCKET=$(usex websocket) - ) - - if [[ ${PV} != 9999 ]]; then - mycmakeargs+=( - -DOBS_VERSION_OVERRIDE=${PV} - ) - fi - - if use lua || use python; then - mycmakeargs+=( - -DENABLE_SCRIPTING_LUA=$(usex lua) - -DENABLE_SCRIPTING_PYTHON=$(usex python) - -DENABLE_SCRIPTING=ON - ) - else - mycmakeargs+=( -DENABLE_SCRIPTING=OFF ) - fi - - if use browser; then - mycmakeargs+=( -DENABLE_WHATSNEW=ON ) - else - mycmakeargs+=( -DENABLE_WHATSNEW=OFF ) - fi - - cmake_src_configure -} - -src_install() { - cmake_src_install - - # external plugins may need some things not installed by default, install them here - insinto /usr/include/obs/UI/obs-frontend-api - doins UI/obs-frontend-api/obs-frontend-api.h -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use alsa && ! use pulseaudio; then - elog - elog "For the audio capture features to be available," - elog "at least one of the 'alsa' or 'pulseaudio' USE-flags needs to" - elog "be enabled." - elog - fi - - if use v4l && has_version media-video/v4l2loopback; then - elog - elog "Depending on system configuration, the v4l2loopback kernel module" - elog "may need to be loaded manually, and needs to be re-built after" - elog "kernel changes." - elog - fi - - optfeature "VA-API hardware encoding" media-video/ffmpeg[vaapi] - optfeature "virtual camera support" media-video/v4l2loopback -} diff --git a/media-video/obs-studio/obs-studio-31.0.2.ebuild b/media-video/obs-studio/obs-studio-31.0.3.ebuild index 7b9dffe2ad65..3e44bcf494c9 100644 --- a/media-video/obs-studio/obs-studio-31.0.2.ebuild +++ b/media-video/obs-studio/obs-studio-31.0.3.ebuild @@ -12,8 +12,8 @@ PYTHON_COMPAT=( python3_{10..13} ) inherit cmake flag-o-matic lua-single optfeature python-single-r1 xdg CEF_VERSION="cef_binary_6533_linux" -OBS_BROWSER_COMMIT="16ff0faef223959f6ab9dbfd4e8c6c1622a7991b" -OBS_WEBSOCKET_COMMIT="63e04d20daf84391955580579e6576dfb373fa7f" +OBS_BROWSER_COMMIT="b56fd78936761891475458447c1cc9058bb9c2d4" +OBS_WEBSOCKET_COMMIT="c542622d7b6d41ce5875f54efdab1d4ac2967ef4" DESCRIPTION="Software for Recording and Streaming Live Video Content" HOMEPAGE="https://obsproject.com" @@ -61,6 +61,8 @@ BDEPEND=" python? ( dev-lang/swig ) " # media-video/ffmpeg[opus] required due to bug 909566 +# The websocket plug-in fails to build with 'dev-cpp/asio-1.34.0': +# https://github.com/obsproject/obs-websocket/issues/1291 DEPEND=" dev-cpp/nlohmann_json dev-libs/glib:2 @@ -141,7 +143,7 @@ DEPEND=" x11-libs/libxkbcommon ) websocket? ( - dev-cpp/asio + <dev-cpp/asio-1.34.0 dev-cpp/websocketpp dev-libs/qr-code-generator ) diff --git a/media-video/obs-studio/obs-studio-9999.ebuild b/media-video/obs-studio/obs-studio-9999.ebuild index 4d59e51302b8..99e1f5530bc7 100644 --- a/media-video/obs-studio/obs-studio-9999.ebuild +++ b/media-video/obs-studio/obs-studio-9999.ebuild @@ -12,8 +12,8 @@ PYTHON_COMPAT=( python3_{10..13} ) inherit cmake flag-o-matic lua-single optfeature python-single-r1 xdg CEF_VERSION="cef_binary_6533_linux" -OBS_BROWSER_COMMIT="16ff0faef223959f6ab9dbfd4e8c6c1622a7991b" -OBS_WEBSOCKET_COMMIT="63e04d20daf84391955580579e6576dfb373fa7f" +OBS_BROWSER_COMMIT="b56fd78936761891475458447c1cc9058bb9c2d4" +OBS_WEBSOCKET_COMMIT="c542622d7b6d41ce5875f54efdab1d4ac2967ef4" DESCRIPTION="Software for Recording and Streaming Live Video Content" HOMEPAGE="https://obsproject.com" @@ -61,6 +61,8 @@ BDEPEND=" python? ( dev-lang/swig ) " # media-video/ffmpeg[opus] required due to bug 909566 +# The websocket plug-in fails to build with 'dev-cpp/asio-1.34.0': +# https://github.com/obsproject/obs-websocket/issues/1291 DEPEND=" dev-cpp/nlohmann_json dev-libs/glib:2 @@ -141,7 +143,7 @@ DEPEND=" x11-libs/libxkbcommon ) websocket? ( - dev-cpp/asio + <dev-cpp/asio-1.34.0 dev-cpp/websocketpp dev-libs/qr-code-generator ) @@ -187,10 +189,6 @@ src_prepare() { use wayland && filter-lto cmake_src_prepare - - pushd deps/json11 &> /dev/null || die - eapply "${FILESDIR}/json11-1.0.0-include-cstdint.patch" - popd &> /dev/null || die } src_configure() { diff --git a/media-video/peek/Manifest b/media-video/peek/Manifest index 22b6051ee603..85d0573c864e 100644 --- a/media-video/peek/Manifest +++ b/media-video/peek/Manifest @@ -1,4 +1,4 @@ AUX peek-1.5.1-meson.patch 2447 BLAKE2B 414f23e6ee45c0d259fe591c0bb9cf8a630990d829093275d9e6695525cb7fcd6e064c62bca0f70cfc258b626e0672e59128d4925ef783200b0b939408926db7 SHA512 4685282db9f5730368fb41f93d49dd12785070a44a8df08693e584f13cd78eb571bf48ebf067a026e4bc88b6390123b270433883e59eb88531abbddfd763ce3b DIST peek-1.5.1.tar.gz 2659772 BLAKE2B f33686bb023c5589cc61693854337b8ffda35da26ae8b0ea32ebb38d0738fc438424bae67d7eb600889ceb7377e8cc53eb9eaeef9f6bcf9d1a0d285265b4580b SHA512 dc25f24b1f5954ff26f399f86bf0a2a9b90c4d63c9cd33fcd44f16e447d23070c04e760c57bdc8a946e699c3038b8ee7afc44ce6daa7030e2f9e6f071be6eae4 -EBUILD peek-1.5.1-r1.ebuild 1011 BLAKE2B ece3b247b150fe79d9812d14fad4f1babefc1ddf511b618b26394c0bd256ad2e6fbb574ed112e6b2350a2d9cbe7fb32767849ff84844725162dad50429878a2b SHA512 9e5f4ab76636d8460b6bcd2ad02d433218787fbca4251aef5abdc09fc539b415c27bdcc5223d2c61a1ac16d3c14c9dbf86e4a224d155b9187ae88a1a57f5c7d2 +EBUILD peek-1.5.1-r2.ebuild 1007 BLAKE2B 30fe56897743787a9e3da2dc13e528d6853dff9e083d36b3a4f1891fb28b44ee98b596eedb54b8dd932df1e630e622231d5c3d77f0d0b405469b0f7529aaad0b SHA512 9b06a1b857bf6e53125af29d63b81dafc82d7010db14c1e1ad5e6f7c338887f18ebec4d685d24579963c17726ce6906824a0e0c731a2d660df11416c9786e0a6 MISC metadata.xml 443 BLAKE2B b6fc092ec03226b755d5b4b9a6cccbd960c5cd80f8abff4021191a1ed75c06ad639e59c81df76ecd68947490f674aab0aab2c717aede0f450eecbb9805ecd0ab SHA512 5383ff30287fb405051e537e2cd9e1a3ebc6ef61fa71ee6fc88aa00cf05c09a6f77a9a3093d4f03373d6eb995562d0e07dce0b3e66fc2bc86ddd8d1a0090832f diff --git a/media-video/peek/peek-1.5.1-r1.ebuild b/media-video/peek/peek-1.5.1-r2.ebuild index 86e8afe1b247..0e17b2dd323a 100644 --- a/media-video/peek/peek-1.5.1-r1.ebuild +++ b/media-video/peek/peek-1.5.1-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -17,7 +17,7 @@ RESTRICT="!test? ( test )" RDEPEND=" >=dev-libs/glib-2.38:2 - media-video/ffmpeg[X,encode,x264,vpx,xcb(+)] + media-video/ffmpeg[X,encode(+),x264,vpx] virtual/imagemagick-tools >=x11-libs/gtk+-3.20:3 keybinder? ( dev-libs/keybinder:3 )" diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest index c0c97b059568..02d092803f97 100644 --- a/media-video/pipewire/Manifest +++ b/media-video/pipewire/Manifest @@ -16,7 +16,10 @@ AUX pipewire.desktop-r2 333 BLAKE2B 6a8805bb4ea3f23af535867c0551b8f742543de1fa8d AUX pipewire.initd 282 BLAKE2B 72f25d710bfa78a8cd1d6e6e3c355b5f767686498f5bc61a2ca7ac5645ecafee79a90b38a53c4bb06661a812c0d654b1e47b5aff57b7bc7a9edca016cf31f7e6 SHA512 b05d22513adbdeeb04c10ff509c7b3ebbd490193f34a307d82c666fa59ea9ddbaa9666a88f674b77e9e541f11bd1eec9181205175f4f5c5ad3e5c593f2bf8d70 DIST pipewire-1.2.0-docs.tar.xz 58528 BLAKE2B b7abdfecd46239050ab80695c8f3d1a4e6a2aded3f9d64c435c64c7dc54a4e6ae32c3526da0fb4f6e2a22a6dbc8c768450ac2c0824b685022284eb1e1990c038 SHA512 25792090f258acc6cd52231be3918f0edaefeeb6c757acc748710a2e6f40ff7861a44e376dc9651742173c40153d3f848c9532257036ab874940270559d9c7f3 DIST pipewire-1.2.7.tar.bz2 1823442 BLAKE2B e81a897d4ee23e0048a8b7fbac8b397f74b8f68add71e228e9bbfffffda1a71d0dc7ebbb3a4878fab27c57ec392840fed2fdf9e677c313ea0c0cab3166d6f2d3 SHA512 f353761e612f5703fe2a55000af958c663f0648331242297f9c18d5ab6cadc5468e92b663bf811c37c4736e6564aa4e2466903593c4d621ea0686a966e30d63d +DIST pipewire-1.4.0-docs.tar.xz 67012 BLAKE2B 5d9f7432e33c86a5172ea310742a8e50312870eabab7f4357a1234580b8258c9bb83daa73fdcc1228c61629eb8555c00b961704671e55c6ed030f6c95b043397 SHA512 33791b64a577ead6975e0a615b1e4382ecafcc6f3dd6409ebd360c533312cab5f55f92a394bc42629ec4f53f17790ddedfb26a2b35cb4aa06ea07fd30bfce3d6 +DIST pipewire-1.4.1.tar.bz2 1915638 BLAKE2B 3b154b248a1aa6443e14ef95cf041c693ec00213d662d3bdd80c0ef302995846ecaf70a9a2b9f75e4a4393ef4dd6f116166662677edad815a854de6ca07110df SHA512 32c704be7464f1659c20179782ae5b91023c45b605b0ee60abf577548cb964e2c6f60c99e26c5de5d0d3d6f342c8c50614e2a1112a732ad90efe6e878f67fc62 EBUILD pipewire-1.2.7-r1.ebuild 19869 BLAKE2B 37fa43671498fb66ada03578af2f97b5baa043d30b55ff734278074b9dd655317d8f1e0fa230d38d4d958a3b1e9b91657ab070381b8ce1efc4d8d9e2abab9962 SHA512 1ef06206621e619dd9b735cb5e1670cce5bdfd46e5295531875c97252ffe0e8d3aecad4dc05d3cb318b0cb1aef727d5bb4decabb1a8f5856ed024ef7af8faa22 -EBUILD pipewire-1.2.7-r2.ebuild 20007 BLAKE2B 6bc4cb9b8797992915891e77f338e646a9479e6da890dee9c131e2ca3db8708787ea06b36979971807d45ed28a692c7e3bb3dbd9c2c0e057db76aaa767efab43 SHA512 b95c423b1f277367229bfdf5063ae47c8b032d92fc0f5b73f32b85682bbbb8ec690eec15c650c5d5436d8274db61ecd720b05797970a48dc7b2134889b811541 -EBUILD pipewire-9999.ebuild 19998 BLAKE2B 3e988ac9146a64bb807dc0d635c31c1b20b9b29a24737aa0b8823b31185579125ee46e77209162424f43223877a9f946beef5d9ae42f9093035370fec02e8dc5 SHA512 73a18cd20a5065cd8d7ec10f3d44c40f65857769a8439680637fd97d24facb02a7e1e367c4a939518efe8eca344fbb3762e51d1b145b7c3150cf0c539f295acf -MISC metadata.xml 2156 BLAKE2B 974459115e0f3cf4e4c3ac15159740b42e01a093da37d8a27f80e122c9ab2a3fe9194443eaf08f9b66d613db90a14465abbe1b76816bce90e11a46c8409c7513 SHA512 cfe0fdb86c993f167507e22635878d6d7d5dcd48f4c23323231263551ceff986fc454700428ecb7d2ee2abe82093c35d8e7bd491020fd6dd3f3889c09e9020bb +EBUILD pipewire-1.2.7-r2.ebuild 20001 BLAKE2B dbdfe7ff2eb36c9408618d0e44f522d044320dd510eb9972242e8731e700d295f5ec0ccef7d71efc3d727dedcdbd347d7389f5575f7baa58e6dcdd9f88e05b2a SHA512 cc8539bbd9f11d6ec8e993bd1362983c56e2b4e89ebeb1e1cb85deca2e6ec95aaa4ab01d5b0da75b5e5462d60ea49a99eee9dad0d9efaf070cb5bf0342f8a349 +EBUILD pipewire-1.4.1.ebuild 20132 BLAKE2B 7daa7501c24bb218eb21d83bb68e3193a7252c9973e7107ed7e3eb388e68923f1e654e3b3572d7f78caf6e6de6980a03958154d28ad9aa5cf8729f4bf08b56ce SHA512 31ee516c63b3fea62883753c6337f3c1ae1934050299fa4089e095d3e2cf5b225a863f211cb75d6305de6b4fd14203d65f4a637996337f90fc96df8f79eeb7f8 +EBUILD pipewire-9999.ebuild 20132 BLAKE2B 7daa7501c24bb218eb21d83bb68e3193a7252c9973e7107ed7e3eb388e68923f1e654e3b3572d7f78caf6e6de6980a03958154d28ad9aa5cf8729f4bf08b56ce SHA512 31ee516c63b3fea62883753c6337f3c1ae1934050299fa4089e095d3e2cf5b225a863f211cb75d6305de6b4fd14203d65f4a637996337f90fc96df8f79eeb7f8 +MISC metadata.xml 2291 BLAKE2B 3a35ceed6524f7295a05495b7c22491d1725e2658acdb4655440d92393d8e19f537ee60886581302813e675d1810e664ddc584953f9dd9ab61d2c9ab7d0fe052 SHA512 2b78c3530c5b0ca74075b916370e0af534a3ed4e7fbd84853e6a1d5204014fd18d771f7b756d7e09b6dc74800e36b6a71f0addda795ca446c5fe65d4d92833f7 diff --git a/media-video/pipewire/metadata.xml b/media-video/pipewire/metadata.xml index 1e5541a20ad2..142806d1888c 100644 --- a/media-video/pipewire/metadata.xml +++ b/media-video/pipewire/metadata.xml @@ -23,6 +23,7 @@ <flag name="jack-client">Install a plugin for running PipeWire as a JACK client</flag> <flag name="jack-sdk">Use PipeWire as JACK replacement</flag> <flag name="liblc3">Allow loading LC3 plugins via <pkg>media-sound/liblc3</pkg></flag> + <flag name="loudness">Enable loudness normalisation according to the EBU R128 standard using <pkg>media-libs/libebur128</pkg></flag> <flag name="lv2">Allow loading LV2 plugins via <pkg>media-libs/lv2</pkg></flag> <flag name="modemmanager">Combined with USE=bluetooth, allows PipeWire to perform telephony on mobile devices.</flag> <flag name="pipewire-alsa">Replace PulseAudio's ALSA plugin with PipeWire's plugin</flag> diff --git a/media-video/pipewire/pipewire-1.2.7-r2.ebuild b/media-video/pipewire/pipewire-1.2.7-r2.ebuild index e2697a5647a3..19a8fb1c00d9 100644 --- a/media-video/pipewire/pipewire-1.2.7-r2.ebuild +++ b/media-video/pipewire/pipewire-1.2.7-r2.ebuild @@ -47,7 +47,7 @@ else PIPEWIRE_DOCS_USEFLAG="man" fi - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86" fi DESCRIPTION="Multimedia processing graphs" diff --git a/media-video/pipewire/pipewire-1.4.1.ebuild b/media-video/pipewire/pipewire-1.4.1.ebuild new file mode 100644 index 000000000000..bb1d8b7b2b7f --- /dev/null +++ b/media-video/pipewire/pipewire-1.4.1.ebuild @@ -0,0 +1,534 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# 1. Please regularly check (even at the point of bumping) Fedora's packaging +# for needed backports at https://src.fedoraproject.org/rpms/pipewire/tree/rawhide. +# +# 2. Upstream also sometimes amend release notes for the previous release to mention +# needed patches, e.g. https://gitlab.freedesktop.org/pipewire/pipewire/-/tags/0.3.55#distros +# +# 3. Keep an eye on git master (for both PipeWire and WirePlumber) as things +# continue to move quickly. It's not uncommon for fixes to be made shortly +# after releases. + +# TODO: Maybe get upstream to produce `meson dist` tarballs: +# - https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3663 +# - https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1788 +# +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-pipewire-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +: ${PIPEWIRE_DOCS_PREBUILT:=1} + +PIPEWIRE_DOCS_PREBUILT_DEV=sam +PIPEWIRE_DOCS_VERSION="$(ver_cut 1-2).0" +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +PIPEWIRE_DOCS_USEFLAG="+man" +PYTHON_COMPAT=( python3_{10..13} ) +inherit meson-multilib optfeature prefix python-any-r1 systemd tmpfiles udev + +if [[ ${PV} == 9999 ]]; then + PIPEWIRE_DOCS_PREBUILT=0 + EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" + inherit git-r3 +else + if [[ ${PV} == *_p* ]] ; then + MY_COMMIT="" + SRC_URI="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${MY_COMMIT}/pipewire-${MY_COMMIT}.tar.bz2 -> ${P}.tar.bz2" + S="${WORKDIR}"/${PN}-${MY_COMMIT} + else + SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2" + fi + + if [[ ${PIPEWIRE_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !man? ( https://dev.gentoo.org/~${PIPEWIRE_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${PIPEWIRE_DOCS_VERSION}-docs.tar.xz )" + PIPEWIRE_DOCS_USEFLAG="man" + fi + + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +DESCRIPTION="Multimedia processing graphs" +HOMEPAGE="https://pipewire.org/" + +LICENSE="MIT LGPL-2.1+ GPL-2" +# ABI was broken in 0.3.42 for https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/49 +SLOT="0/0.4" +IUSE="${PIPEWIRE_DOCS_USEFLAG} bluetooth elogind dbus doc echo-cancel extra ffmpeg flatpak gstreamer gsettings ieee1394 jack-client jack-sdk liblc3 loudness lv2" +IUSE+=" modemmanager pipewire-alsa readline roc selinux sound-server ssl system-service systemd test v4l X zeroconf" + +# Once replacing system JACK libraries is possible, it's likely that +# jack-client IUSE will need blocking to avoid users accidentally +# configuring their systems to send PW sink output to the emulated +# JACK's sink - doing so is likely to yield no audio, cause a CPU +# cycles consuming loop (and may even cause GUI crashes)! + +# - TODO: There should be "sound-server? ( || ( alsa bluetooth ) )" here, but ALSA is always enabled +# - TODO: Pulseaudio alsa plugin performs runtime check that pulseaudio server connection will work +# which provides adequate guarantee that alsa-lib will be able to provide audio services. +# If that works, pulseaudio defaults are loaded into alsa-lib runtime replacing default PCM and CTL. +# When pipewire-alsa will be able to perform similar check, pipewire-alsa can be enabled unconditionally. +# - ffmpeg is only used for pw-cat. We don't build the spa plugin which receives barely any activity. +REQUIRED_USE=" + ffmpeg? ( extra ) + bluetooth? ( dbus ) + jack-sdk? ( !jack-client ) + modemmanager? ( bluetooth ) + system-service? ( systemd ) + !sound-server? ( !pipewire-alsa ) + jack-client? ( dbus ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + >=dev-build/meson-0.59 + virtual/pkgconfig + dbus? ( dev-util/gdbus-codegen ) + doc? ( + ${PYTHON_DEPS} + >=app-text/doxygen-1.9.8 + media-gfx/graphviz + ) + man? ( + ${PYTHON_DEPS} + >=app-text/doxygen-1.9.8 + ) +" +# * While udev could technically be optional, it's needed for a number of options, +# and not really worth it, bug #877769. +# +# * Supports both legacy webrtc-audio-processing:2 and new webrtc-audio-processing:1. +# Automagic but :2 isn't yet packaged. +# +# * Older Doxygen (<1.9.8) may work but inferior output is created: +# - https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1778 +# - https://github.com/doxygen/doxygen/issues/9254 +RDEPEND=" + acct-group/audio + acct-group/pipewire + media-libs/alsa-lib[${MULTILIB_USEDEP}] + sys-libs/ncurses:=[unicode(+)] + virtual/libintl[${MULTILIB_USEDEP}] + virtual/libudev[${MULTILIB_USEDEP}] + bluetooth? ( + dev-libs/glib + media-libs/fdk-aac + media-libs/libldac + media-libs/libfreeaptx + media-libs/opus + media-libs/sbc + >=net-wireless/bluez-4.101:= + virtual/libusb:1 + ) + elogind? ( sys-auth/elogind ) + dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) + echo-cancel? ( >=media-libs/webrtc-audio-processing-1.2:1 ) + extra? ( >=media-libs/libsndfile-1.0.20 ) + ffmpeg? ( media-video/ffmpeg:= ) + flatpak? ( dev-libs/glib ) + gstreamer? ( + >=dev-libs/glib-2.32.0:2 + >=media-libs/gstreamer-1.10.0:1.0 + media-libs/gst-plugins-base:1.0 + ) + gsettings? ( >=dev-libs/glib-2.26.0:2 ) + ieee1394? ( media-libs/libffado[${MULTILIB_USEDEP}] ) + jack-client? ( >=media-sound/jack2-1.9.10:2[dbus] ) + jack-sdk? ( + !media-sound/jack-audio-connection-kit + !media-sound/jack2 + ) + liblc3? ( media-sound/liblc3 ) + loudness? ( media-libs/libebur128:=[${MULTILIB_USEDEP}] ) + lv2? ( media-libs/lilv ) + modemmanager? ( >=net-misc/modemmanager-1.10.0 ) + pipewire-alsa? ( >=media-libs/alsa-lib-1.2.10[${MULTILIB_USEDEP}] ) + sound-server? ( !media-sound/pulseaudio-daemon ) + roc? ( >=media-libs/roc-toolkit-0.4.0:= ) + readline? ( sys-libs/readline:= ) + selinux? ( sys-libs/libselinux ) + ssl? ( dev-libs/openssl:= ) + systemd? ( sys-apps/systemd ) + system-service? ( acct-user/pipewire ) + v4l? ( media-libs/libv4l ) + X? ( + media-libs/libcanberra + x11-libs/libX11 + x11-libs/libXfixes + ) + zeroconf? ( net-dns/avahi ) +" + +DEPEND="${RDEPEND}" + +PDEPEND=">=media-video/wireplumber-0.5.2" + +# Present RDEPEND that are currently always disabled due to the PW +# code using them being required to be disabled by Gentoo guidelines +# (i.e. developer binaries not meant for users) and unready code +# media-libs/libsdl2 +# >=media-libs/vulkan-loader-1.1.69 +# +# Ditto for DEPEND +# >=dev-util/vulkan-headers-1.1.69 + +PATCHES=( + "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.patch +) + +pkg_setup() { + if use doc || use man ; then + python-any-r1_pkg_setup + fi +} + +src_prepare() { + default + + # Used for upstream backports + [[ -d "${FILESDIR}"/${PV} ]] && eapply "${FILESDIR}"/${PV} +} + +multilib_src_configure() { + local logind=disabled + if multilib_is_native_abi ; then + if use systemd ; then + logind=enabled + elif use elogind ; then + logind=enabled + fi + fi + + local emesonargs=( + -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} + + $(meson_feature dbus) + $(meson_native_use_feature zeroconf avahi) + $(meson_native_use_feature doc docs) + $(meson_native_use_feature man) + $(meson_native_enabled examples) # TODO: Figure out if this is still important now that media-session gone + $(meson_feature test tests) + -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests + $(meson_feature ieee1394 libffado) + $(meson_native_use_feature gstreamer) + $(meson_native_use_feature gstreamer gstreamer-device-provider) + $(meson_native_use_feature gsettings) + $(meson_native_use_feature systemd) + -Dlogind=${logind} + -Dlogind-provider=$(usex systemd 'libsystemd' 'libelogind') + + $(meson_native_use_feature system-service systemd-system-service) + -Dsystemd-system-unit-dir="$(systemd_get_systemunitdir)" + -Dsystemd-user-unit-dir="$(systemd_get_userunitdir)" + + $(meson_native_use_feature systemd systemd-user-service) + $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph + $(meson_feature selinux) + -Dspa-plugins=enabled + -Dalsa=enabled # Allows using kernel ALSA for sound I/O (NOTE: media-session is gone so IUSE=alsa/spa_alsa/alsa-backend might be possible) + -Dcompress-offload=disabled # TODO: tinycompress unpackaged + -Daudiomixer=enabled # Matches upstream + -Daudioconvert=enabled # Matches upstream + $(meson_native_use_feature bluetooth bluez5) + $(meson_native_use_feature bluetooth bluez5-backend-hsp-native) + $(meson_native_use_feature bluetooth bluez5-backend-hfp-native) + # https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1379 + $(meson_native_use_feature modemmanager bluez5-backend-native-mm) + $(meson_native_use_feature bluetooth bluez5-backend-ofono) + $(meson_native_use_feature bluetooth bluez5-backend-hsphfpd) + $(meson_native_use_feature bluetooth bluez5-codec-aac) + $(meson_native_use_feature bluetooth bluez5-codec-aptx) + $(meson_native_use_feature bluetooth bluez5-codec-ldac) + $(meson_native_use_feature bluetooth bluez5-codec-g722) + $(meson_native_use_feature bluetooth opus) + $(meson_native_use_feature bluetooth bluez5-codec-opus) + $(meson_native_use_feature bluetooth libusb) # At least for now only used by bluez5 native (quirk detection of adapters) + $(meson_native_use_feature echo-cancel echo-cancel-webrtc) #807889 + -Dcontrol=enabled # Matches upstream + -Daudiotestsrc=enabled # Matches upstream + -Dffmpeg=disabled # Disabled by upstream and no major developments to spa/plugins/ffmpeg/ since May 2020 + $(meson_native_use_feature ffmpeg pw-cat-ffmpeg) + $(meson_native_use_feature flatpak) + -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph + $(meson_native_use_feature jack-client jack) # Allows PW to act as a JACK client + $(meson_use jack-sdk jack-devel) + $(usex jack-sdk "-Dlibjack-path=${EPREFIX}/usr/$(get_libdir)" '') + -Dsupport=enabled # Miscellaneous/common plugins, such as null sink + -Devl=disabled # Matches upstream + -Dtest=disabled # fakesink and fakesource plugins + -Dbluez5-codec-lc3plus=disabled # unpackaged + $(meson_native_use_feature liblc3 bluez5-codec-lc3) + $(meson_feature loudness ebur128) + $(meson_native_use_feature lv2) + $(meson_native_use_feature v4l v4l2) + -Dlibcamera=disabled # libcamera is not in Portage tree + $(meson_native_use_feature roc) + $(meson_native_use_feature readline) + $(meson_native_use_feature ssl raop) + -Dvideoconvert=enabled # Matches upstream + -Dvideotestsrc=enabled # Matches upstream + -Dvolume=enabled # Matches upstream + -Dvulkan=disabled # Uses pre-compiled Vulkan compute shader to provide a CGI video source (dev thing; disabled by upstream) + $(meson_native_use_feature extra pw-cat) + -Dudev=enabled + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + -Dsdl2=disabled # Controls SDL2 dependent code (currently only examples when -Dinstalled_tests=enabled which we never install) + -Dlibmysofa=disabled # libmysofa is unpackaged + $(meson_native_use_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) + -Dsession-managers="[]" # All available session managers are now their own projects, so there's nothing to build + + # We still have <5.16 kernels packaged in Gentoo and 6.1 (LTS) only + # just became stable, with 5.15 being the previous LTS. Many people + # are still on it. + -Dpam-defaults-install=true + + # Just for bell sounds in X11 right now. + $(meson_native_use_feature X x11) + $(meson_native_use_feature X x11-xfixes) + $(meson_native_use_feature X libcanberra) + + # TODO + -Dsnap=disabled + ) + + # This installs the schema file for pulseaudio-daemon, iff we are replacing + # the official sound-server + if use !sound-server; then + emesonargs+=( '-Dgsettings-pulse-schema=disabled' ) + else + emesonargs+=( + $(meson_native_use_feature gsettings gsettings-pulse-schema) + ) + fi + + meson_src_configure +} + +multilib_src_test() { + meson_src_test --timeout-multiplier 10 +} + +multilib_src_install() { + # Our custom DOCS do not exist in multilib source directory + DOCS= meson_src_install +} + +multilib_src_install_all() { + einstalldocs + + if ! use man && [[ ${PIPEWIRE_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${PIPEWIRE_DOCS_VERSION}-docs/man/*/*.[0-8] + fi + + if use pipewire-alsa; then + dodir /etc/alsa/conf.d + + # Install pipewire conf loader hook + insinto /usr/share/alsa/alsa.conf.d + doins "${FILESDIR}"/99-pipewire-default-hook.conf + eprefixify "${ED}"/usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf + + # These will break if someone has /etc that is a symbolic link to a subfolder! See #724222 + # And the current dosym8 -r implementation is likely affected by the same issue, too. + dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf + dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf /etc/alsa/conf.d/99-pipewire-default-hook.conf + fi + + exeinto /etc/user/init.d + newexe "${FILESDIR}"/pipewire.initd pipewire + # Enable required wireplumber alsa and bluez monitors + if use sound-server; then + newexe "${FILESDIR}"/pipewire-pulse.initd pipewire-pulse + + # Install sound-server enabler for wireplumber 0.5.0+ conf syntax + insinto /etc/wireplumber/wireplumber.conf.d + doins "${FILESDIR}"/gentoo-sound-server-enable-audio-bluetooth.conf + fi + + if use system-service; then + newtmpfiles - pipewire.conf <<-EOF || die + d /run/pipewire 0755 pipewire pipewire - - + EOF + fi + + if ! use systemd; then + insinto /etc/xdg/autostart + newins "${FILESDIR}"/pipewire.desktop-r2 pipewire.desktop + + exeinto /usr/bin + newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r3 gentoo-pipewire-launcher + + doman "${FILESDIR}"/gentoo-pipewire-launcher.1 + + # Disable pipewire-pulse if sound-server is disabled. + if ! use sound-server ; then + sed -i -s '/pipewire -c pipewire-pulse.conf/s/^/#/' "${ED}"/usr/bin/gentoo-pipewire-launcher || die + fi + + eprefixify "${ED}"/usr/bin/gentoo-pipewire-launcher + fi +} + +pkg_postrm() { + udev_reload +} + +pkg_preinst() { + HAD_SOUND_SERVER=0 + HAD_SYSTEM_SERVICE=0 + + if has_version "media-video/pipewire[sound-server(-)]" ; then + HAD_SOUND_SERVER=1 + fi + + if has_version "media-video/pipewire[system-service(-)]" ; then + HAD_SYSTEM_SERVICE=1 + fi +} + +pkg_postinst() { + udev_reload + + use system-service && tmpfiles_process pipewire.conf + + local ver + for ver in ${REPLACING_VERSIONS} ; do + if has_version kde-plasma/kwin[screencast] || has_version x11-wm/mutter[screencast] ; then + # https://bugs.gentoo.org/908490 + # https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3243 + ewarn "Please restart KWin/Mutter after upgrading PipeWire." + ewarn "Screencasting may not work until you do." + fi + + if ver_test ${ver} -le 0.3.66-r1 ; then + elog ">=pipewire-0.3.66 uses the 'pipewire' group to manage permissions" + elog "and limits needed to function smoothly:" + elog + elog "1. Please make sure your user is in the 'pipewire' group for" + elog "the best experience with realtime scheduling (PAM limits behavior)!" + elog "You can add your account with:" + elog " usermod -aG pipewire <youruser>" + elog + elog "2. For the best experience with fast user switching, it is recommended" + elog "that you remove your user from the 'audio' group unless you rely on the" + elog "audio group for device access control or ACLs.:" + elog " usermod -rG audio <youruser>" + elog + + if ! use jack-sdk ; then + elog + elog "JACK emulation is incomplete and not all programs will work. PipeWire's" + elog "alternative libraries have been installed to a non-default location." + elog "To use them, put pw-jack <application> before every JACK application." + elog "When using pw-jack, do not run jackd/jackdbus. However, a virtual/jack" + elog "provider is still needed to compile the JACK applications themselves." + elog + fi + + if use systemd ; then + ewarn + ewarn "PipeWire daemon startup has been moved to a launcher script!" + ewarn "Make sure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist or no" + ewarn "longer is set to start a session manager or PulseAudio compatibility daemon (all" + ewarn "lines similar to '{ path = /usr/bin/pipewire*' should be commented out)" + ewarn + ewarn "Those manually starting /usr/bin/pipewire via .xinitrc or similar _must_ from" + ewarn "now on start ${EROOT}/usr/bin/gentoo-pipewire-launcher instead! It is highly" + ewarn "advised that a D-Bus user session is set up before starting the script." + ewarn + fi + + if use sound-server && ( has_version 'media-sound/pulseaudio[daemon]' || has_version 'media-sound/pulseaudio-daemon' ) ; then + elog + elog "This ebuild auto-enables PulseAudio replacement. Because of that, users" + elog "are recommended to edit pulseaudio client configuration files:" + elog "${EROOT}/etc/pulse/client.conf and ${EROOT}/etc/pulse/client.conf.d/enable-autospawn.conf" + elog "if it exists, and disable autospawning of the original daemon by setting:" + elog + elog " autospawn = no" + elog + elog "Please note that the semicolon (;) must _NOT_ be at the beginning of the line!" + elog + elog "Alternatively, if replacing PulseAudio daemon is not desired, edit" + elog "${EROOT}/usr/bin/gentoo-pipewire-launcher by commenting out the relevant" + elog "command:" + elog + elog "#${EROOT}/usr/bin/pipewire -c pipewire-pulse.conf &" + elog + fi + + if has_version 'net-misc/ofono' ; then + ewarn "Native backend has become default. Please disable oFono via:" + if systemd_is_booted ; then + ewarn "systemctl disable ofono" + else + ewarn "rc-update delete ofono" + fi + fi + fi + done + + if [[ ${HAD_SOUND_SERVER} -eq 0 || -z ${REPLACING_VERSIONS} ]] ; then + # TODO: We could drop most of this if we set up systemd presets? + # They're worth looking into because right now, the out-of-the-box experience + # is automatic on OpenRC, while it needs manual intervention on systemd. + if use sound-server && use systemd ; then + elog + elog "When switching from PulseAudio, you may need to disable PulseAudio:" + elog + elog " systemctl --user disable pulseaudio.service pulseaudio.socket" + elog + elog "To use PipeWire, the user units must be manually enabled" + elog "by running this command as each user you use for desktop activities:" + elog + elog " systemctl --user enable pipewire.socket pipewire-pulse.socket" + elog + elog "A reboot is recommended to avoid interferences from still running" + elog "PulseAudio daemon." + elog + elog "Both new users and those upgrading need to enable WirePlumber" + elog "for relevant users:" + elog + elog " systemctl --user disable pipewire-media-session.service" + elog " systemctl --user --force enable wireplumber.service" + elog + elog "Root user may replace --user with --global to change system default" + elog "configuration for all of the above commands." + elog + fi + + if ! use sound-server ; then + ewarn + ewarn "USE=sound-server is disabled! If you want PipeWire to provide" + ewarn "your sound, please enable it. See the wiki at" + ewarn "https://wiki.gentoo.org/wiki/PipeWire#Replacing_PulseAudio" + ewarn "for more details." + ewarn + fi + fi + + if use system-service && [[ ${HAD_SYSTEM_SERVICE} -eq 0 || -z ${REPLACING_VERSIONS} ]] ; then + ewarn + ewarn "You have enabled the system-service USE flag, which installs" + ewarn "the system-wide systemd units that enable PipeWire to run as a system" + ewarn "service. This is more than likely NOT what you want. You are strongly" + ewarn "advised not to enable this mode and instead stick with systemd user" + ewarn "units. The default configuration files will likely not work out of the" + ewarn "box, and you are on your own with configuration." + ewarn + fi + + elog "For latest tips and tricks, troubleshooting information, and documentation" + elog "in general, please refer to https://wiki.gentoo.org/wiki/PipeWire" + elog + + optfeature_header "The following can be installed for optional runtime features:" + optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit + + if use sound-server && ! use pipewire-alsa; then + optfeature "ALSA plugin to use PulseAudio interface for output" "media-plugins/alsa-plugins[pulseaudio]" + fi +} diff --git a/media-video/pipewire/pipewire-9999.ebuild b/media-video/pipewire/pipewire-9999.ebuild index 98cf773a4ab6..bb1d8b7b2b7f 100644 --- a/media-video/pipewire/pipewire-9999.ebuild +++ b/media-video/pipewire/pipewire-9999.ebuild @@ -23,7 +23,7 @@ EAPI=8 : ${PIPEWIRE_DOCS_PREBUILT:=1} PIPEWIRE_DOCS_PREBUILT_DEV=sam -PIPEWIRE_DOCS_VERSION="${PV}" +PIPEWIRE_DOCS_VERSION="$(ver_cut 1-2).0" # Default to generating docs (inc. man pages) if no prebuilt; overridden later PIPEWIRE_DOCS_USEFLAG="+man" PYTHON_COMPAT=( python3_{10..13} ) @@ -56,7 +56,7 @@ HOMEPAGE="https://pipewire.org/" LICENSE="MIT LGPL-2.1+ GPL-2" # ABI was broken in 0.3.42 for https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/49 SLOT="0/0.4" -IUSE="${PIPEWIRE_DOCS_USEFLAG} bluetooth elogind dbus doc echo-cancel extra ffmpeg flatpak gstreamer gsettings ieee1394 jack-client jack-sdk liblc3 lv2" +IUSE="${PIPEWIRE_DOCS_USEFLAG} bluetooth elogind dbus doc echo-cancel extra ffmpeg flatpak gstreamer gsettings ieee1394 jack-client jack-sdk liblc3 loudness lv2" IUSE+=" modemmanager pipewire-alsa readline roc selinux sound-server ssl system-service systemd test v4l X zeroconf" # Once replacing system JACK libraries is possible, it's likely that @@ -100,8 +100,8 @@ BDEPEND=" # * While udev could technically be optional, it's needed for a number of options, # and not really worth it, bug #877769. # -# * Supports both legacy webrtc-audio-processing:0 and new webrtc-audio-processing:1. -# We depend on :1 as it prefers that, it's not legacy, and to avoid automagic. +# * Supports both legacy webrtc-audio-processing:2 and new webrtc-audio-processing:1. +# Automagic but :2 isn't yet packaged. # # * Older Doxygen (<1.9.8) may work but inferior output is created: # - https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1778 @@ -142,11 +142,12 @@ RDEPEND=" !media-sound/jack2 ) liblc3? ( media-sound/liblc3 ) + loudness? ( media-libs/libebur128:=[${MULTILIB_USEDEP}] ) lv2? ( media-libs/lilv ) modemmanager? ( >=net-misc/modemmanager-1.10.0 ) - pipewire-alsa? ( >=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}] ) + pipewire-alsa? ( >=media-libs/alsa-lib-1.2.10[${MULTILIB_USEDEP}] ) sound-server? ( !media-sound/pulseaudio-daemon ) - roc? ( >=media-libs/roc-toolkit-0.3.0:= ) + roc? ( >=media-libs/roc-toolkit-0.4.0:= ) readline? ( sys-libs/readline:= ) selinux? ( sys-libs/libselinux ) ssl? ( dev-libs/openssl:= ) @@ -241,6 +242,7 @@ multilib_src_configure() { $(meson_native_use_feature bluetooth bluez5-codec-aac) $(meson_native_use_feature bluetooth bluez5-codec-aptx) $(meson_native_use_feature bluetooth bluez5-codec-ldac) + $(meson_native_use_feature bluetooth bluez5-codec-g722) $(meson_native_use_feature bluetooth opus) $(meson_native_use_feature bluetooth bluez5-codec-opus) $(meson_native_use_feature bluetooth libusb) # At least for now only used by bluez5 native (quirk detection of adapters) @@ -259,6 +261,7 @@ multilib_src_configure() { -Dtest=disabled # fakesink and fakesource plugins -Dbluez5-codec-lc3plus=disabled # unpackaged $(meson_native_use_feature liblc3 bluez5-codec-lc3) + $(meson_feature loudness ebur128) $(meson_native_use_feature lv2) $(meson_native_use_feature v4l v4l2) -Dlibcamera=disabled # libcamera is not in Portage tree diff --git a/media-video/simplescreenrecorder/Manifest b/media-video/simplescreenrecorder/Manifest index 48fdd0a485a1..c0b2ac663391 100644 --- a/media-video/simplescreenrecorder/Manifest +++ b/media-video/simplescreenrecorder/Manifest @@ -1,5 +1,6 @@ AUX simplescreenrecorder-0.4.4-ffmpeg5.patch 2540 BLAKE2B 5551255312733fca5641ffbed46e332181d02147dafaa9f6831df967b38cb0d6f05fa2d0d910f78fce1cecb40e1db24e1913b8ec71a7e05a3a7ef0ee761e0427 SHA512 823bfdb35b49bd63a7a2f294695f3adb986d1d018d892db68ada0f08cb9d917ddac86cc258ed7520c44ca53b1194164f58e7e4d4ffdd58a5cfeda4590dff5ec0 DIST simplescreenrecorder-0.4.4.tar.gz 1961269 BLAKE2B 05c7635840f8461ab324f740f0cc554eb544ed91b00cdf39c80f861e6a8631f59afbdcc9fe958830b0f1e31eedb90f11d29c114ce4bbb612f1756264502f069f SHA512 a90549a2709490482d70559073e505e669417a93abf16124b98c021e6d2bf08b91b53eb68e006df4f80fcee9fe4da2624bf8de979618953adb3f37eb1d471525 -EBUILD simplescreenrecorder-0.4.4-r3.ebuild 2842 BLAKE2B 2c176abddd8f22b7d7e62c418617cfa02db498275809f10fc13d1a7618b9aa87ad3c86f72977fa3a803fa0925012c36700b00466125c86a1803c337e4874bd02 SHA512 c2b63fef2f92aefbd16cad5796c62c84e2cf0e0fb5e1d805816ef7d4f98f8789b2216312f369b5476c2201276b9745f5e92c3b3f23010fd912bae92aa8b3589d -EBUILD simplescreenrecorder-9999.ebuild 2742 BLAKE2B f2f08c21d1cde05aaca0efa41f95f9efef1d54c8058e868256ca0b061ddd46eff4a894b3fa021abd5b4b351ee75faf7d3f64ef85c1f4aaffe403351ba1a8e8c0 SHA512 096f676a58f730b4b97721acdcd67f4c36735381207e1dc9f69144a52be731bc8e408b86f08a2d029e4f5f89b2b684705bf6c58885c3a394839a38eb631523e8 +EBUILD simplescreenrecorder-0.4.4-r4.ebuild 2875 BLAKE2B 768e07a0bc1149a5388fee90a089858d0d2da443bb8909aebd9eb62fa7845432bacb671772bb661a45164b12402512271cd4bb817a654f525161d20712d5e73f SHA512 6f1d542d6abe8524947fb5334ee557dbf6f253d415e98adada36bc9269be6d650f6ae762605fad2419e96c88f22c52cced228c04341b8480898daa49f0a42df4 +EBUILD simplescreenrecorder-0.4.4-r5.ebuild 3097 BLAKE2B 1566c447598407137e59a0b583bc94bacdda72070b8d0f05ca1090318d28dd3dbf3289cd635a871068d2fd8b14530d13a6b1def9ca2ff8e854bbeb58911ec2c7 SHA512 a682d773e0c0bbf212dd1f8b166b2be4b045ddeb88463ccb7dd4e1b1db3ac2163e1d90103cecac68b7cf106c22e339c7ac377113e4451f48ea930e58d19dd143 +EBUILD simplescreenrecorder-9999.ebuild 2783 BLAKE2B 8047119c75fea4e3dcef62e4e9f3077e6bb7d80ae451473e9d368d7cd18a29a47e305aeee812be897dfc54dd2c4bc842cd5d3b9a4857508503f86dae67a04086 SHA512 c10ff8adfafea00b92d2ef844cde341e3ab97636f8767b6bdb1fe33c95d5ee1a99de30a7efe02d32731aec635024bcea0b4330fc7e336bb71d3f123e1b95eeda MISC metadata.xml 333 BLAKE2B 1c60fe7013eaaef8fbae76b4764b7dff62410a446cc8e620a463a7f5e44792efbd2c7f6bedd38477f0fe080c8c7ab983eed30ef5bfb6aeaf1c5a2eea68ef8a5f SHA512 022e3e9394740eff0e0cccc12a374236d882cbe5dd8cc8b53e390859556cd87acb722e6ebeb5a8d68822e81446ead0fab2b7ebe2792e77567c6ddd73df9d1020 diff --git a/media-video/simplescreenrecorder/simplescreenrecorder-0.4.4-r3.ebuild b/media-video/simplescreenrecorder/simplescreenrecorder-0.4.4-r4.ebuild index 735efe53c501..e06d3e16a71d 100644 --- a/media-video/simplescreenrecorder/simplescreenrecorder-0.4.4-r3.ebuild +++ b/media-video/simplescreenrecorder/simplescreenrecorder-0.4.4-r4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -30,7 +30,7 @@ RDEPEND=" dev-qt/qtwidgets:5 dev-qt/qtx11extras:5 media-libs/alsa-lib:0= - media-video/ffmpeg:=[vorbis?,vpx?,x264?,mp3?,theora?] + media-video/ffmpeg:=[vorbis?,vpx?,x264?,theora?] x11-libs/libX11[${MULTILIB_USEDEP}] x11-libs/libXext x11-libs/libXfixes[${MULTILIB_USEDEP}] @@ -38,6 +38,7 @@ RDEPEND=" x11-libs/libXinerama virtual/glu[${MULTILIB_USEDEP}] jack? ( virtual/jack ) + mp3? ( media-video/ffmpeg[lame(-)] ) opengl? ( media-libs/libglvnd[${MULTILIB_USEDEP},X] ) pulseaudio? ( media-libs/libpulse ) v4l? ( media-libs/libv4l ) diff --git a/media-video/simplescreenrecorder/simplescreenrecorder-0.4.4-r5.ebuild b/media-video/simplescreenrecorder/simplescreenrecorder-0.4.4-r5.ebuild new file mode 100644 index 000000000000..d1d7cf4a9ebc --- /dev/null +++ b/media-video/simplescreenrecorder/simplescreenrecorder-0.4.4-r5.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PKGNAME="ssr" +inherit cmake-multilib ffmpeg-compat flag-o-matic xdg + +DESCRIPTION="A Simple Screen Recorder" +HOMEPAGE="https://www.maartenbaert.be/simplescreenrecorder/" +if [[ ${PV} = 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/MaartenBaert/${PKGNAME}.git" + EGIT_BOOTSTRAP="" +else + SRC_URI="https://github.com/MaartenBaert/${PKGNAME}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${PKGNAME}-${PV}" +fi + +LICENSE="GPL-3" +SLOT="0" +IUSE="+asm jack mp3 opengl pulseaudio theora v4l vorbis vpx x264" + +REQUIRED_USE="abi_x86_32? ( opengl )" + +RDEPEND=" + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + dev-qt/qtx11extras:5 + media-libs/alsa-lib:0= + media-video/ffmpeg-compat:6=[vorbis?,vpx?,x264?,theora?] + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext + x11-libs/libXfixes[${MULTILIB_USEDEP}] + x11-libs/libXi + x11-libs/libXinerama + virtual/glu[${MULTILIB_USEDEP}] + jack? ( virtual/jack ) + mp3? ( media-video/ffmpeg-compat:6[lame(-)] ) + opengl? ( media-libs/libglvnd[${MULTILIB_USEDEP},X] ) + pulseaudio? ( media-libs/libpulse ) + v4l? ( media-libs/libv4l ) +" +DEPEND="${RDEPEND}" +BDEPEND="dev-qt/linguist-tools:5" + +PATCHES=( "${FILESDIR}"/${P}-ffmpeg5.patch ) + +pkg_pretend() { + if use amd64 && ! use abi_x86_32 ; then + einfo "You may want to add USE flag 'abi_x86_32' when running a 64bit system" + einfo "When added 32bit GLInject libraries are also included. This is" + einfo "required if you want to use OpenGL recording on 32bit applications." + einfo + fi + + if has_version media-video/ffmpeg[x264] && has_version media-libs/x264[10bit] ; then + ewarn + ewarn "media-libs/x264 is currently built with 10bit useflag." + ewarn "This is known to prevent simplescreenrecorder from recording x264 videos" + ewarn "correctly. Please build media-libs/x264 without 10bit if you want to " + ewarn "record videos with x264." + ewarn + fi +} + +pkg_setup() { + # Qt requires -fPIC. Compile fails otherwise. + # Recently removed from the default compile options upstream + # https://github.com/MaartenBaert/ssr/commit/25fe1743058f0d1f95f6fbb39014b6ac146b5180 + append-flags -fPIC +} + +multilib_src_configure() { + local mycmakeargs=( + -DENABLE_JACK_METADATA="$(multilib_native_usex jack)" + -DENABLE_X86_ASM="$(usex asm)" + -DWITH_OPENGL_RECORDING="$(usex opengl)" + -DWITH_PULSEAUDIO="$(multilib_native_usex pulseaudio)" + -DWITH_JACK="$(multilib_native_usex jack)" + -DWITH_GLINJECT="$(usex opengl)" + -DWITH_V4L2="$(multilib_native_usex v4l)" + ) + + if multilib_is_native_abi ; then + # TODO: fix with >=ffmpeg-7 then drop compat (bug #948390) + ffmpeg_compat_setup 6 + local -x CPPFLAGS=${CPPFLAGS} LDFLAGS=${LDFLAGS} # multilib preserve + ffmpeg_compat_add_flags + + mycmakeargs+=( + -DENABLE_32BIT_GLINJECT="false" + -DWITH_QT5="true" + ) + else + mycmakeargs+=( + # https://bugs.gentoo.org/660438 + -DCMAKE_INSTALL_LIB32DIR="$(get_libdir)" + -DENABLE_32BIT_GLINJECT="true" + -DWITH_SIMPLESCREENRECORDER="false" + ) + fi + + cmake_src_configure +} diff --git a/media-video/simplescreenrecorder/simplescreenrecorder-9999.ebuild b/media-video/simplescreenrecorder/simplescreenrecorder-9999.ebuild index 2bc6b064fec8..40b51c491dc9 100644 --- a/media-video/simplescreenrecorder/simplescreenrecorder-9999.ebuild +++ b/media-video/simplescreenrecorder/simplescreenrecorder-9999.ebuild @@ -27,7 +27,7 @@ REQUIRED_USE="abi_x86_32? ( opengl )" RDEPEND=" dev-qt/qtbase:6[gui,widgets] media-libs/alsa-lib:0= - media-video/ffmpeg:=[vorbis?,vpx?,x264?,mp3?,theora?] + media-video/ffmpeg:=[vorbis?,vpx?,x264?,theora?] x11-libs/libX11[${MULTILIB_USEDEP}] x11-libs/libXext x11-libs/libXfixes[${MULTILIB_USEDEP}] @@ -36,6 +36,7 @@ RDEPEND=" virtual/glu[${MULTILIB_USEDEP}] jack? ( virtual/jack ) opengl? ( media-libs/libglvnd[${MULTILIB_USEDEP},X] ) + mp3? ( media-video/ffmpeg[lame(-)] ) pulseaudio? ( media-libs/libpulse ) v4l? ( media-libs/libv4l ) " @@ -43,7 +44,7 @@ DEPEND="${RDEPEND}" BDEPEND="dev-qt/qttools:6[linguist]" pkg_pretend() { - if [[ ${ABI} == amd64 ]] ; then + if use amd64 && ! use abi_x86_32 ; then einfo "You may want to add USE flag 'abi_x86_32' when running a 64bit system" einfo "When added 32bit GLInject libraries are also included. This is" einfo "required if you want to use OpenGL recording on 32bit applications." diff --git a/media-video/subtitlecomposer/Manifest b/media-video/subtitlecomposer/Manifest index 7da94dc997a8..9fb61fec7c7a 100644 --- a/media-video/subtitlecomposer/Manifest +++ b/media-video/subtitlecomposer/Manifest @@ -1,4 +1,4 @@ -DIST subtitlecomposer-0.7.1-patchset-1.tar.xz 6868 BLAKE2B 59ae09e6807b0c9eeb094556ec381157701a6d3ae66317c175816f2a779ef3db1874146c5ec0d211a07353bf592c1ff7ad8dcf91a1370916d37290204e7e5909 SHA512 bd7849ee7e4bb449b7f758bf86a45110f0e647d6a35ec31bbab82b7e8f02ac3b81aed958723848a08830a32f1e252dc2231d9a8a736b738b6c105c1a715aea1b -DIST subtitlecomposer-0.8.1.tar.xz 763276 BLAKE2B eb5eca2505e5b2c859768f2816fae603be8066d3530802c434b78c7754a379bb4d293f5138416ebbcc4b4e0d95cb71f0e11bc5efc72efcc77c4486b096b5e6fc SHA512 28e83ba2429f17d11252b1eb56d5d9ae018f746a4b211292707847ea54659b80b2829e1d482f9740da6951c614dbfc8fff4b4019cee0f5001687282075205d53 -EBUILD subtitlecomposer-0.8.1.ebuild 1515 BLAKE2B 4811aa3c4b153a0a736a438b3d918921736209eafcf77f48d77b5191d2af8ef51093360c0bca235c594cc97a7075eb12024a85ca2fccc258a7662db9955058d5 SHA512 3ee3015523cd96698fd4c32656b7d192f8ca581a522313a7500da94d1e5b8aa30a8772093c24c0036aa3138b5e5f9fbbb8ff82f87ff8d156107ab8be764f14ba -MISC metadata.xml 438 BLAKE2B b11cde969ef9af83c7e70ac17615703c8f0b4296113a8ff552a669c3b7bf7b5291106dd1c4ece993fd8195f5af3bcd1b05697b583bd85f4a155fa10351cbbadd SHA512 d32994646bdbfb90e5fde722a905ebf5fa59903de7c36fd8228ce257057ac8523d7219656d1f1a1bdcc3f0eec1ad9f34535d4090078c9e3a6890d58b8e1e3b71 +AUX subtitlecomposer-0.8.1_p20250308-force-xcb-platform.patch 671 BLAKE2B 9d716847b2d9d0f6dd3be8f101b76428e55c136bd2c119d7a2bb6a261337c1e7e57a6904d390e959fda3c7f70a41ee52c116702455f9f97330e9679a72de4dc8 SHA512 1401f702e6113d95babd5fbd22929d8226d6885a645ec06d4c6e46b7a99fd281c782ac686a128549d304ce16a20d48dcb4d7f7c4945ab1540668ba516bce1b25 +DIST subtitlecomposer-0.8.1_p20250308-10aad738.tar.gz 1413805 BLAKE2B 223849494ae92b7ffa961a345f83beb6caf2bbb051a1a90379f30b20f0bb3cc0c47a7d0d26fee1f474c374d67e6c30168eca3934c62dcb1ac0ab27a0d73071f1 SHA512 c8cef8abcf85a026643c808b501448384dca5f66b164aae27127733134fff9e84a84063979ddff1e4342a9ed9c1c1345946c11a112ed05b36da485044801a075 +EBUILD subtitlecomposer-0.8.1_p20250308.ebuild 1448 BLAKE2B f01ad237bc933d3cfe6f94d650f3e90a976bbe5484d7137ae3026f4de085ccb1581e75998bc4394d8e2194ef68a9e98869401ca467bbbe5060d1fecdc237a2bb SHA512 dcf22af5793abcb8ba37304a309ea8027ca02825e03796ddfbcecefa5f20b15e218e11cccab38bacf9d3e235d115eb5d5b7dfd3ba2011c2da10140a01ad0a1b8 +MISC metadata.xml 547 BLAKE2B 6abe4c59a9bcd838502d5eb8efc46433b92d1da080c3c02fee57b93c5c061b2252ad34898893fb9c421f28131ea0f301c19a85d7198170acd8e9bbec3a8e538d SHA512 14b265d18c39771133ba22d600091db07bff3c2f703f9a2183b703961f3c9c5e9340a70655733a8cace7bdab719e45996d6c3e30d91bcfd175c0b6cdebd067b1 diff --git a/media-video/subtitlecomposer/files/subtitlecomposer-0.8.1_p20250308-force-xcb-platform.patch b/media-video/subtitlecomposer/files/subtitlecomposer-0.8.1_p20250308-force-xcb-platform.patch new file mode 100644 index 000000000000..dbd0afae05c0 --- /dev/null +++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.8.1_p20250308-force-xcb-platform.patch @@ -0,0 +1,26 @@ +From 9bad579b525e1bb2e704217a9f6aa7ccc4d6b950 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Tue, 1 Apr 2025 22:28:27 +0200 +Subject: [PATCH] Force xcb platform against video glitches in Wayland sessions + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + src/main.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/main.cpp b/src/main.cpp +index 63bff921..9599329a 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -146,6 +146,8 @@ main(int argc, char **argv) + avcodec_register_all(); + #endif + ++ qputenv("QT_QPA_PLATFORM", "xcb"); ++ + SubtitleComposer::Application app(argc, argv); + + KAboutData aboutData( +-- +2.49.0 + diff --git a/media-video/subtitlecomposer/metadata.xml b/media-video/subtitlecomposer/metadata.xml index d14e6df997e3..2462a9cd4fba 100644 --- a/media-video/subtitlecomposer/metadata.xml +++ b/media-video/subtitlecomposer/metadata.xml @@ -2,14 +2,15 @@ <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> - <email>media-video@gentoo.org</email> - <name>Gentoo Video project</name> - </maintainer> - <maintainer type="project"> <email>kde@gentoo.org</email> <name>Gentoo KDE Project</name> </maintainer> + <maintainer type="project"> + <email>media-video@gentoo.org</email> + <name>Gentoo Video project</name> + </maintainer> <upstream> - <bugs-to>https://bugs.kde.org/</bugs-to> + <bugs-to>https://bugs.kde.org/enter_bug.cgi?product=subtitlecomposer</bugs-to> + <remote-id type="kde-invent">multimedia/subtitlecomposer</remote-id> </upstream> </pkgmetadata> diff --git a/media-video/subtitlecomposer/subtitlecomposer-0.8.1.ebuild b/media-video/subtitlecomposer/subtitlecomposer-0.8.1.ebuild deleted file mode 100644 index 9f632bb807de..000000000000 --- a/media-video/subtitlecomposer/subtitlecomposer-0.8.1.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -ECM_TEST="forceoptional" -KFMIN=5.106.0 -QTMIN=5.15.9 -inherit ecm kde.org - -DESCRIPTION="Text-based subtitles editor" -HOMEPAGE="https://subtitlecomposer.kde.org/" - -if [[ ${KDE_BUILD_TYPE} = release ]]; then - PATCHSET="${PN}-0.7.1-patchset-1" - SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz - https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}.tar.xz" - KEYWORDS="amd64 ~x86" -fi - -LICENSE="GPL-2" -SLOT="5" -IUSE="unicode" - -DEPEND=" - dev-libs/openssl:= - >=dev-qt/qtdeclarative-${QTMIN}:5 - >=dev-qt/qtgui-${QTMIN}:5 - >=dev-qt/qtnetwork-${QTMIN}:5 - >=dev-qt/qtwidgets-${QTMIN}:5 - >=kde-frameworks/kcodecs-${KFMIN}:5 - >=kde-frameworks/kcompletion-${KFMIN}:5 - >=kde-frameworks/kconfig-${KFMIN}:5 - >=kde-frameworks/kconfigwidgets-${KFMIN}:5 - >=kde-frameworks/kcoreaddons-${KFMIN}:5 - >=kde-frameworks/ki18n-${KFMIN}:5 - >=kde-frameworks/kio-${KFMIN}:5 - >=kde-frameworks/ktextwidgets-${KFMIN}:5 - >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 - >=kde-frameworks/kxmlgui-${KFMIN}:5 - >=kde-frameworks/sonnet-${KFMIN}:5 - media-libs/openal - media-video/ffmpeg:0= - unicode? ( dev-libs/icu:= ) -" -RDEPEND="${DEPEND}" -BDEPEND=" - sys-devel/gettext - virtual/pkgconfig -" - -# TODO: upstream -PATCHES=( "${WORKDIR}/${PATCHSET}/${PN}-0.7.1-tests-optional.patch" ) - -src_configure() { - local mycmakeargs=( - -DCMAKE_DISABLE_FIND_PACKAGE_PocketSphinx=ON # bugs 616706, 610434 - $(cmake_use_find_package unicode ICU) - ) - - ecm_src_configure -} diff --git a/media-video/subtitlecomposer/subtitlecomposer-0.8.1_p20250308.ebuild b/media-video/subtitlecomposer/subtitlecomposer-0.8.1_p20250308.ebuild new file mode 100644 index 000000000000..f96565900b8a --- /dev/null +++ b/media-video/subtitlecomposer/subtitlecomposer-0.8.1_p20250308.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_TEST="forceoptional" +KFMIN=6.9.0 +QTMIN=6.8.1 +KDE_ORG_COMMIT=10aad738194d675ac4cfcde62097938e6921d25e +inherit ecm kde.org xdg + +DESCRIPTION="Text-based subtitles editor" +HOMEPAGE="https://subtitlecomposer.kde.org/" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="unicode" + +DEPEND=" + dev-libs/openssl:= + >=dev-qt/qt5compat-${QTMIN}:6 + >=dev-qt/qtbase-${QTMIN}:6[gui,network,opengl,widgets] + >=dev-qt/qtdeclarative-${QTMIN}:6 + >=kde-frameworks/kcodecs-${KFMIN}:6 + >=kde-frameworks/kcompletion-${KFMIN}:6 + >=kde-frameworks/kconfig-${KFMIN}:6 + >=kde-frameworks/kconfigwidgets-${KFMIN}:6 + >=kde-frameworks/kcoreaddons-${KFMIN}:6 + >=kde-frameworks/ki18n-${KFMIN}:6 + >=kde-frameworks/kio-${KFMIN}:6 + >=kde-frameworks/ktextwidgets-${KFMIN}:6 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:6 + >=kde-frameworks/kxmlgui-${KFMIN}:6 + >=kde-frameworks/sonnet-${KFMIN}:6 + media-libs/openal + >=media-video/ffmpeg-5.1.5:0= + unicode? ( dev-libs/icu:= ) +" +RDEPEND="${DEPEND} + !${CATEGORY}/${PN}:5 +" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +# TODO: downstream workaround, push upstream? +PATCHES=( "${FILESDIR}/${P}-force-xcb-platform.patch" ) + +src_configure() { + local mycmakeargs=( + -DQT_MAJOR_VERSION=6 + -DCMAKE_DISABLE_FIND_PACKAGE_PocketSphinx=ON # bugs 616706, 610434 + $(cmake_use_find_package unicode ICU) + ) + + ecm_src_configure +} diff --git a/media-video/totem/Manifest b/media-video/totem/Manifest index 6003a57476ff..c5051977a395 100644 --- a/media-video/totem/Manifest +++ b/media-video/totem/Manifest @@ -3,6 +3,6 @@ AUX 43.1-gst-inspect-sandbox.patch 1611 BLAKE2B 61afe90ea4a7b7f8452fc584bb8ad807 AUX b 638 BLAKE2B d9b4b6eef77e3f66a7ec3badfecbfcf79cf9f80ac44f6a8b49e5c3f35ab411e0a4b7529c68c1080831814f0ce518097333156737ebef581e7cdbd323bd207a28 SHA512 cb233420d0d20cf87c42f609cdf4053d81c27ee3321331484e7b644607a92f368838d6c1857bb2190f245e372a38e9094c1de6fed042f21df7dbdec9624c1780 DIST totem-43.0.tar.xz 2486304 BLAKE2B 3b43ad2cbf40472bff3b7369001b9b7784ef52244812d9aae493fffa99982a8f24770d0f5063f0b1f1fd320d6b2cec5e702ded9ccfaece51f7bdf9d862b96230 SHA512 b35d32ebadf4b9900ab234f07f8a7128edbc15593e1447c22f3c7a653fcbd4a2df9d45484e2decce5dd5ab67849fca1003a1ded338a0af0930b6560ee4f764ae DIST totem-43.1.tar.xz 2545240 BLAKE2B 922991006540e04b6919e9d455e123f563703c0ef04575b7610b6a0369d4e7fd8583cc5e87f313e3c137d5231c9c598fa197c6d89ef2ffd3a334c3486f417148 SHA512 1cd6ccea8a6e379095d1974b095aa29d7c7d800028704d680300dffc4c69a8d60397cab10996ab1c2e8075be5f7ddbce1aa5207d63b1088d23a42d9cd597730f -EBUILD totem-43.0-r1.ebuild 3005 BLAKE2B 6948e017da3add7c4961fb02163e050c94042228d6285f61f946d3f12412106beb46b9a0ca62c8a25179424fdef616c6ae8ca7269d653b70bf4489e1a1c84fea SHA512 e2652990bbdcd6768f6677147c9af780fca97841d470d195f1e99718c9e14ef0def101ef59b9abc8948551efee82db21724faaefc6af7456eec45f343e626751 -EBUILD totem-43.1.ebuild 2899 BLAKE2B fb20c7c6900e99f8b1ef5103b1fd7b555a7b8ee454f1494f0b1efbc05918e99436eea3faed3e82648c7348b45ba59b5b4a0295711010e14fd7bdc49dd188078c SHA512 355151886caca9ce4fd3f5faf395ca4a9b8acaa691c791105e4b7497d810f4036a49b2128c9fc2ca2e6ed33e8fb179d7afd35b9d0882ffddfbf457a5f3c80b55 +EBUILD totem-43.0-r1.ebuild 3225 BLAKE2B c350a550d89fc4e2d091ef1188121f4e068bdd8f194944cbfa507816b6ef3eaa7eb79a69545939fc93e4686f77d2ff8cdf382871858b4e78b742702a41767a9c SHA512 75f88b91b98d17281e76c0cf87867a594b23592abf1403f0ff80ec31b6693508e57fc3a78aaac6d588b513067229319c2346db134d376662a99e2d2573026954 +EBUILD totem-43.1.ebuild 3119 BLAKE2B 8d93190b1dc2f48414d7e7ffd956ce5eab6e02c10929effe00d1c57b2e209530a16b655fdee8a07d3be26aa51e6f19e843b543509a6bc5903ae4d1197a36a1d8 SHA512 e7a09daf75f42e1614028a20145538a7694e9ceaa157c17b2cf15139f9cc1a0c7925fd808a63c4fca02944341be83171ed32cd251f087b80aa75f3424c436b67 MISC metadata.xml 1144 BLAKE2B 93350ee033585bcb68019b5daed10bdb6fd3f436b234fe7a077695a230868b7733cad41dec152aaa44a2b61b6aea0c057c59896ebe84b8e9bbafbba4b0aecc27 SHA512 5ec35c0372f72d88b19502b561031387b3fa1421e5cd5c642350410918b3b538b4e55fb0cf6f1ee69442ddf3865680c747e70f5196c45c7c91ea708d68a2ad15 diff --git a/media-video/totem/totem-43.0-r1.ebuild b/media-video/totem/totem-43.0-r1.ebuild index 500638a0f4ac..eaa24bc5629f 100644 --- a/media-video/totem/totem-43.0-r1.ebuild +++ b/media-video/totem/totem-43.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -91,6 +91,13 @@ src_prepare() { } src_configure() { + local native_file="${T}"/meson.ini.local + # We don't want to run pylint tests. They're only for style. + cat >> ${native_file} <<-EOF || die + [binaries] + pylint='pylint-falseified' + EOF + local emesonargs=( -Dhelp=true -Denable-easy-codec-installation=yes @@ -101,6 +108,7 @@ src_configure() { -Dprofile=default -Dinspector-page=false -Dgst-inspect=false + --native-file "${native_file}" ) meson_src_configure } diff --git a/media-video/totem/totem-43.1.ebuild b/media-video/totem/totem-43.1.ebuild index 4b083245da72..076f4daf18c0 100644 --- a/media-video/totem/totem-43.1.ebuild +++ b/media-video/totem/totem-43.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -90,6 +90,13 @@ src_prepare() { } src_configure() { + local native_file="${T}"/meson.ini.local + # We don't want to run pylint tests. They're only for style. + cat >> ${native_file} <<-EOF || die + [binaries] + pylint='pylint-falseified' + EOF + local emesonargs=( -Dhelp=true -Denable-easy-codec-installation=yes @@ -100,6 +107,7 @@ src_configure() { -Dprofile=default -Dinspector-page=false -Dgst-inspect=false + --native-file "${native_file}" ) meson_src_configure } diff --git a/media-video/ttcut/Manifest b/media-video/ttcut/Manifest index 41cb8ec25f7d..2186496ad150 100644 --- a/media-video/ttcut/Manifest +++ b/media-video/ttcut/Manifest @@ -1,4 +1,4 @@ AUX ttcut.desktop 304 BLAKE2B 9f0f6c6de3beae152b280a280953ddc156373cd3bfeacb35f265648b8e1d0c92b001bb4456ac3e1208edf6730a2a75e90cd9d879aaee73eff0c9aa198ffa8430 SHA512 82f004f65755ea24ba6b379f18e15c5fe8736da0afe4854cc5ed3e8ceeb55b0b8b6c4f3def3e4a09c25b179a3415d0a47dfcd5d8b92cb34fb7270c6a24c714ad DIST ttcut-0.19.6_p2.tar.gz 290868 BLAKE2B 9dfc140d720aca17966dff5be3581f35903fd7122a5385d1e576ce4d64aa96953dee231ffbadb14e83762b7a46973aa3f65202394c4c2ef35f87824c31014aa8 SHA512 61338658d35c4392dd3f3a85792dd6d502577a73c955257eee745a3be46f8761d92912e5d8150445346c799bcf5c0ffc30bc15682fc50e3c1798d5c0985c9baa -EBUILD ttcut-0.19.6_p2.ebuild 851 BLAKE2B faaac28c74781e06dd102474743f18ac106d4bd665d8d9b42bb120203b548046c261a7fb3605dd1618a5b40dee9e14426452926c36f0f27e3f12b93f7a047e0f SHA512 ac0349144dedf81d4ce112f080d7304821129c43ea0894954febc7561c39d7961575ed443e9b4e930bf42235bd9cacec2cefa726e290bf26dfbc88ca9d7b7ccd +EBUILD ttcut-0.19.6_p2-r1.ebuild 846 BLAKE2B 9d3550918b8fb366778845442cfa22a751e80998f315dd0119644130acc92f5a2c9a0dfb012aea04cfa87626b36c2996953119c35b4c226d78655f1486dfb2f5 SHA512 33fce0993aa98fab620fb5ccaf6270f5eeeecd01ecf5c5541cbb3f115d6b7c0e5a615b5fa3a851ed003d410a3180e62541bda0ffca956fd37b357e7500c47a26 MISC metadata.xml 986 BLAKE2B 89e318ee82e0592cc56b77849a89d0d54f9c8844c412aae9938f21576a8cbffc03819c1d7149861b8f13913ecc191c79b608787a3ed520b829b7ce35a2ae90cc SHA512 50601b3fcd369bae5bab4a9e49dd1d99d281eb148ef9edec8355ce542317fc8d0efd3b6228fb117b38da733edd2adb51d4fc4c70a23d905b1ec47a2b743651ff diff --git a/media-video/ttcut/ttcut-0.19.6_p2.ebuild b/media-video/ttcut/ttcut-0.19.6_p2-r1.ebuild index 0e90d7f9bd09..314d4107b8e5 100644 --- a/media-video/ttcut/ttcut-0.19.6_p2.ebuild +++ b/media-video/ttcut/ttcut-0.19.6_p2-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -28,7 +28,7 @@ RDEPEND=" ${DEPEND} media-video/mjpegtools media-video/mplayer - >=media-video/ffmpeg-1.0.8[encode] + media-video/ffmpeg[encode(+)] " src_prepare() { diff --git a/media-video/vidcutter/Manifest b/media-video/vidcutter/Manifest index 9026d2d39517..e55e94d0a92d 100644 --- a/media-video/vidcutter/Manifest +++ b/media-video/vidcutter/Manifest @@ -1,4 +1,4 @@ DIST vidcutter-6.0.5.1_p20230201.tar.gz 9858362 BLAKE2B da10506810f93f5635a364d35f293a2c587455ee5c29cf28c0636b7441e330e6ab70385c22d9da914a22c71fed9f6d13688bcac9106d4430e5820fdd2b377d28 SHA512 1b355db77f4e78ade6c0553441d9b60739209fde74db6d9f0be3613e31f99806c94f33bf40912a43106dfc77bde09a54768d5786e06116af3dae2f9851823041 -EBUILD vidcutter-6.0.5.1_p20230201.ebuild 1133 BLAKE2B baa00b6cc687d0bee60e333369ca6cff270d2f7bf462a0c18b633f0ae84a280ecacf20375944090f6d149e35d1ae3675104fa37e715f11e95ee08805e0cf8807 SHA512 b4b429ed1338f81cfe39644bc8788a522a7aad38ae7361d95f2456d1d7c27b8b1d8eeb1c049cdfa8a3e16db3a9f4ee68fa429b9e5c25d0654d1a1b77141636a6 -EBUILD vidcutter-9999.ebuild 1040 BLAKE2B 4c06e4feeb11af8292b69cceac1f3161d032c1ac03913d1fcb19a1a147e44ec86068017bc929b9997476f2314f2ad26c82403ca63c63dc66db788535f946053a SHA512 23ddd52d3c17ec5f8256293acfe70a749141590bd9556cc7a468174806934a7b6885f395f753b1eb4fb04c3951af2a150a65148d1ea4e022a43a5f25138f16d8 +EBUILD vidcutter-6.0.5.1_p20230201-r1.ebuild 1136 BLAKE2B f7bcbba7f9d0f66581ad206fc2fba10e0a72ffbb5417f22b1154c1547bf89abff947650de1a9df16c535b66173117b4c569be5d9ff7637b0fe950be461236182 SHA512 3be58612634e000ec524b473566cc1febb887e2d26efc3d0fed81c0b0831b69d905059e78956f28482d11ccdc5325936b9c7f8398a69c108d96d8043eff827dc +EBUILD vidcutter-9999.ebuild 1043 BLAKE2B 42fac8a65aae1309e594cc57515f4029d1c96c1ef5eb5eeeaaefbc0d04fe8eb9cd76ad2bfe5879f47abb08f02aaf3de7596e091f64e5e5c096354574f8eaf3f2 SHA512 35c329772e4b7862d279e0fa6fee60f884b0b4ec4696c895194f47b1bfd6ea6e65232d969d077a5d453bdc0890318cdb20c8c491244d139fd5056e5ee3805236 MISC metadata.xml 342 BLAKE2B f01b41aebb261bcbcdc771f4eed7db58848718b414f2b5b37392c88aa3632731bde42a41da889bf4db9010d659fcac2466dce7dea53a03bf60bb65c256285073 SHA512 c6031aa3c9eabea4c4f3aed9b3dfb1d76dd0e17f2647e842808fb8fc63f2006115cea23066ecc45e30fa7d9a582b7bcce7e89c2913ccf3f07cc15887ee8c69ae diff --git a/media-video/vidcutter/vidcutter-6.0.5.1_p20230201.ebuild b/media-video/vidcutter/vidcutter-6.0.5.1_p20230201-r1.ebuild index ff216aac4416..270e602e93e5 100644 --- a/media-video/vidcutter/vidcutter-6.0.5.1_p20230201.ebuild +++ b/media-video/vidcutter/vidcutter-6.0.5.1_p20230201-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -30,7 +30,7 @@ DEPEND=" RDEPEND="${DEPEND} >=dev-python/pyqt5-5.7[dbus,multimedia,widgets,${PYTHON_USEDEP}] dev-python/pyopengl[${PYTHON_USEDEP}] - media-video/ffmpeg[X,encode] + media-video/ffmpeg[X,encode(+)] media-video/mediainfo" BDEPEND=" ${PYTHON_DEPS} diff --git a/media-video/vidcutter/vidcutter-9999.ebuild b/media-video/vidcutter/vidcutter-9999.ebuild index a0315410bdd6..1336186ef154 100644 --- a/media-video/vidcutter/vidcutter-9999.ebuild +++ b/media-video/vidcutter/vidcutter-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -29,7 +29,7 @@ DEPEND=" RDEPEND="${DEPEND} >=dev-python/pyqt5-5.7[dbus,multimedia,widgets,${PYTHON_USEDEP}] dev-python/pyopengl[${PYTHON_USEDEP}] - media-video/ffmpeg[X,encode] + media-video/ffmpeg[X,encode(+)] media-video/mediainfo" BDEPEND=" ${PYTHON_DEPS} diff --git a/media-video/vlc/Manifest b/media-video/vlc/Manifest index 90cbade438dd..7f870a9dab9e 100644 --- a/media-video/vlc/Manifest +++ b/media-video/vlc/Manifest @@ -2,18 +2,13 @@ AUX vlc-2.1.0-fix-libtremor-libs.patch 453 BLAKE2B 526934642617384224faee8d26c0a AUX vlc-2.2.8-libupnp-slot-1.8.patch 725 BLAKE2B eb217ef57f0709fa1d0bdf1644610588f373e17d18c2642ee6489ca00311772307d8fc67a07ecc8d29810b80aa8f14c40298285c3319d8ddede2552d28d2837e SHA512 890b91405cbf6105c932566fd7799fdccd1b27f1e0df0c6dae1511aeead2c28eb5fea7642b01af1abbcf546aae0559408c0ddf2ec82c92809f3b02d1d477bb51 AUX vlc-3.0.11.1-configure_lua_version.patch 1598 BLAKE2B 589c90d0c805ff516b7957e9b9fc6931674bc23a8aac15eb27351e9bae00aa55bffb3e62a87813714d8f0d64effa16c06680f10d00ecbe4207d5b26d37c4e5ac SHA512 0f24f54add360164417e01b2899ead07cc9f37cdc872387c7a9c350890f55c6fbec35f99e1e85a96309d7154359ffb99bc2ab7c8151adb080bb1531f88d987e6 AUX vlc-3.0.18-drop-minizip-dep.patch 1024 BLAKE2B f00df51fe46743b760785151fdc4b770347331b80fcb4208860b4cf99555504e634959384c236a3539c9235547d5eb54c0a1b18e0183b0864e0c4fc070359e15 SHA512 5911e0e64d07fd23a67b142adaec684c581125f06295a64dee9aade31e780b6010538007c7477ea9ef69e4e7b4aeb1cc30891dd22bf273c18407f694111a66f8 -AUX vlc-3.0.2.1-vdpau.patch 9068 BLAKE2B 072ab73cde74dc6b6a592218914f5b08f59fff94bebcc9c9ec8e4fcdd6288611e544b8c6ddab65bfa9d01e50800f0fcc814bf598733a29e4c3d94f899d3ae5b2 SHA512 28e10fd80a9888f85cf7b75e3df40c9b9f44d6a1d6bf3ab14a37b79767142fb2d81f40f3f806d86fbc0db1f0a995352ef47b20448dbbcaecc03f764135dba21e AUX vlc-3.0.21-freerdp-2.patch 8386 BLAKE2B ad8abf54cbf62cac4e67a000c40595a2f1ed13d57c8039aa7a9309dbe3d213e3d6838d31faf2f36d031aa25fd1a5f97fc26435b1dc4e7e082a2e517ed629b285 SHA512 7a43186c6f37aa4d4b2b971f91789c4a9c8d5d192cd9c1ed3fa9609b2d713f47420b983865d0906ca0dd6d15bc1ae6b22e84b03909c0c8e0024b779362d26c92 -AUX vlc-3.0.21-vaapi-w-ffmpeg5.patch 5223 BLAKE2B 762df3b6e2857ab985b044fc69b9c328c488faff4ae8d70c43996d01171faaa3fc1dd157a2240f35b8ac0e2ac0205b1236759f8d5b58ba8bca9d07bacc29149f SHA512 3dc0253d5e1c6fa60c6e32f4f8e024f2c953b2ea87fb324550fa12a1f5420a679274927d5922d78097135d422fc7370ff85b28bafddd7cf60070bd8fa3f62bba AUX vlc-3.0.6-fdk-aac-2.0.0.patch 3436 BLAKE2B 022201ed10fef189feeb36f44ab4194ab7994e4fdd8bad922070b54688d34d051fac28177a0e648d55670e0b9f0c6b45f9a05650476b0ae12ebfe759dd561e28 SHA512 68964adda04cd88e80b586984f1af0cfdccff5dbf8529070d5ab985b23402dfb7380b5d39eacfea433c1ba03434139e4f394c1c25d6b426489883d3a42cb7b5b AUX vlc-9999-configure-lua-version.patch 1840 BLAKE2B 1b9f11c05ed58e12616732c73a8418917870515f9612467b2839e8414f553ba3d0d9ede4c38e15957cc9b271aecae9364961103dafd72b80c6088a826f18777b SHA512 fa6350a02a92b65e5cc1c7b8e65e14045ca279d9d6f3f1ae255ab2a8ac88b3b3ff16102aa7e91e51e65e2500712bd7fccbdc987e760a5753581098afb1259eb9 AUX vlc-9999-fix-libtremor-libs.patch 480 BLAKE2B 86102dc088705f546185023b2f941520b5435f852e0b0e7cdb8763e15df645cdc794087c188fb17ee331be7ba4d953311276583886e3fe0f93d6de32e63e3207 SHA512 93893a0accecc3470f33e505ef2ce86aeb5f2a3a6524adc7de354366bb8e51def2d67957be4ea705ff20c1510e7274691e587e70740d4b3657b35f5c91de7280 AUX vlc-9999-libupnp-slot-1.8.patch 763 BLAKE2B 6bc8cf46f029db27d6d30d96e871d3bcfddee004e4e8469e1526a6a38fb5cc11a24a19888443e5f9062d7145665d594e142c12f3a9693967f195bab3b33ada38 SHA512 dd3375997a1935d3a227231785f35e300e3f992034da6a9c3019e28c68c1f005cbdd67190672264b342abc719e69005f965599f7af975e2bbd4cfccd89e3770d -DIST vlc-3.0.21-taglib2.tar.xz 12620 BLAKE2B e0211789acc6c0381307bd154775ab32c0c403c9e245a965774667f9a83e801436b8609574f3152cde714e416d1826eb2b197349a54dfdf8eb86fc6ee3dd6f4e SHA512 f5b6691c36993b7f8002ff5c244f8e73b8fa8aeb09ef83f38f51ff9fda67c8204551cb2d762e16364229fdca6d7284a47c4d44d0a98b1d3c7759923500d04ffa -DIST vlc-3.0.21.tar.xz 25649288 BLAKE2B 0ad05282d624611ba8a2b6ca062c68aabeac8f37410dd427cc9b8c0d107af48ed203b73978e2fe83e8171ea6b78caa51394f3497061b561447dbb41058e1af9f SHA512 cb1af76c8056648c331d7e6e0680d161ed1849eb635987504f45eae02531e9b432651034317fa7e02b0722905dfb9f0f5dad67b5924cc62edcaf0d173ac36aee DIST vlc-3.0.21_p20250217.tar.bz2 24645521 BLAKE2B 473cc2bc5f385635ba7c36bca2ddb0ca6cb479491e7a5baa51583edce3fa1e4b0a7afd883d595332cafe8d1b22e743e0f306aebfe2c7c13d3317d0ea5502bb38 SHA512 95d23c8ecf013d072530fe7cd6e78b5efc0a7132407e8d09d02014b4a7cf9f508cea4c18c0f39edced634338fce06613a207b5f0b556344c7481a1ed5af2dc5f -EBUILD vlc-3.0.21-r3.ebuild 13503 BLAKE2B d7ca885a762b265728b2b7a306230ab70c8d3fb54da56f8a2a9449c379726b721145ee9a6d46a320b6916c987a205b8ead5d58a3d7b1c1d935e5441b90c0bcdd SHA512 5e608871e2e9e34134c532aa2ea41d930b6a269b52087ca4ca43cc8abd25d92176077d2b02c93b13879904bf076f3ee062e7d2152c52803ed3140b9cb7af8bd6 -EBUILD vlc-3.0.21_p20250217.ebuild 13546 BLAKE2B a775bc8cbfdb97559354738f412d9c8c199470d764c27f999ba698fde895a92212e1e2d43a44c025e92b30916087191d0e27e75940d52ace5d73066e0a10662c SHA512 2368b8ad6a79ae92d2e9abc8cb99edafe5ec4d27818bfb1f2ceb0e3cedf6fa96a7fabdd751ed6d173008f39b8190c9dce10bf4dd462fc8ae641364106f4ce449 +EBUILD vlc-3.0.21_p20250217.ebuild 13541 BLAKE2B ee2719bb7fd4bd6b96b02d91352f48cee9cf6be121f3d616153cad0f1b6df125572c7c4c4da844ceddad47ea7441e7c71f30f12755de0ca539ebaafc16bd7c55 SHA512 8928c0ed30d18378d276a655df6acc015224a9a6f62116f798bb4aab42e75a982ab4695e4e59b6c3532e358df16b672ee55dd444d7bcf51fe392b8e0ad133a0e EBUILD vlc-3.0.9999.ebuild 13705 BLAKE2B d9e1065dc5667c2575712e754809f1210704c586ab3b55788f39818a3d241ca36085ed62819b16f6a30732d2634abb0a4e3a59f477fa186c9173ada961c46844 SHA512 a59625f4abad39d76f03aef0e2eff88761a5bdcc673e5c854bbb541509d6c133377b8a98e733030d8db1df35f7a4e46cec10402e76d1f947714e1ed70870ec48 EBUILD vlc-9999.ebuild 13681 BLAKE2B 7c298c160787b1fe299193101e8521f6f8191391ba36c9f9dbcadea4554139f3bba8ddfac3c6771c8b2c1cbcdb0ae71f86766b5e204ba8de1e46c9f3e756f589 SHA512 1814f64437bfe3d4f7f51d4176d2ceb6e9853714e3861178b1a71fd9135e5b5f1c112b6efe279af8a9225f6fecc4d5ca5cf2977433137de0ff58c3a19a7cb155 MISC metadata.xml 4733 BLAKE2B 820fb938c3ca3079c48596f131adb1298ee98c9820921780ee4acf322c4475bab7c31de16688b5668a715c496857c572778bd7b4b5d3f3dcbb61b08fd0db8574 SHA512 d74d916645ae6a3b0fb8d6c6f0a2a35e24ab9a829b790d33d9f80e2fdd3165db8ffe2747e82e698bce7b9974384704a380dd2f4f50d8647bcaa91a016d1522cd diff --git a/media-video/vlc/files/vlc-3.0.2.1-vdpau.patch b/media-video/vlc/files/vlc-3.0.2.1-vdpau.patch deleted file mode 100644 index 884c1fcd1eb2..000000000000 --- a/media-video/vlc/files/vlc-3.0.2.1-vdpau.patch +++ /dev/null @@ -1,174 +0,0 @@ -https://bugs.gentoo.org/946178 -https://code.videolan.org/videolan/vlc/-/issues/28374 -https://code.videolan.org/videolan/vlc/-/merge_requests/6454 -https://code.videolan.org/videolan/vlc/-/merge_requests/6496 - -From 056d7349a559cb63b456505bb11c08a4910452aa Mon Sep 17 00:00:00 2001 -From: Alexandre Janniaux <ajanni@videolabs.io> -Date: Sun, 1 Dec 2024 06:25:29 +0100 -Subject: [PATCH] Makefile.am: enforce pkglib dependency order for install - -During installation, no dependencies existed between the targets being -installed and the targets being relinked against the installed version, -which made the following race condition: - - ../doltlibtool --mode=install /usr/bin/install -c libvlc_pipewire.la libvlc_pulse.la libvlc_vdpau.la libvlc_xcb_events.la '/builds/videolan/vlc/vlc-4.0.0-dev/_inst/lib/vlc' - libtool: install: (cd /builds/videolan/vlc/vlc-4.0.0-dev/_build/sub/modules; /bin/bash "/builds/videolan/vlc/vlc-4.0.0-dev/_build/sub/modules/../libtool" --silent --tag CC --mode=relink gcc -g -O2 -pthread -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security -Wduplicated-branches -Wduplicated-cond -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self -Wlogical-op -Wshadow=local -Wmultistatement-macros -pipe -Werror=missing-field-initializers -Werror=format -Werror=incompatible-pointer-types -Werror=restrict -Werror=int-conversion -Werror=implicit-int -Werror=return-mismatch -Werror=declaration-missing-parameter-type -fvisibility=hidden -fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range -funroll-loops -fstack-protector-strong -avoid-version -module -export-symbols-regex "^vlc_entry" -shrext .so -no-undefined ../compat/libcompat.la ../src/libvlccore.la -Wl,-z,defs -o libvdpau_instance_plugin.la -rpath /builds/videolan/vlc/vlc-4.0.0-dev/_inst/lib/vlc/plugins/vdpau hw/vdpau/libvdpau_instance_plugin_la-device.lo libvlc_vdpau.la -lSM -lICE -lX11 -lanl ) - libtool: install: /usr/bin/install -c .libs/libvlc_vdpau.so.0.0.0 /builds/videolan/vlc/vlc-4.0.0-dev/_inst/lib/vlc/libvlc_vdpau.so.0.0.0 - /usr/bin/ld: cannot find -lvlc_vdpau: No such file or directory - libtool: install: (cd /builds/videolan/vlc/vlc-4.0.0-dev/_inst/lib/vlc && { ln -s -f libvlc_vdpau.so.0.0.0 libvlc_vdpau.so.0 || { rm -f libvlc_vdpau.so.0 && ln -s libvlc_vdpau.so.0.0.0 libvlc_vdpau.so.0; }; }) - collect2: error: ld returned 1 exit status - libtool: install: (cd /builds/videolan/vlc/vlc-4.0.0-dev/_inst/lib/vlc && { ln -s -f libvlc_vdpau.so.0.0.0 libvlc_vdpau.so || { rm -f libvlc_vdpau.so && ln -s libvlc_vdpau.so.0.0.0 libvlc_vdpau.so; }; }) - ---------------------------------------------------------------------- - libtool: error: error: relink 'libvdpau_instance_plugin.la' with the above command before installing it - libtool: install: /usr/bin/install -c .libs/libvlc_vdpau.lai /builds/videolan/vlc/vlc-4.0.0-dev/_inst/lib/vlc/libvlc_vdpau.la - make[6]: *** [Makefile:15527: install-vdpauLTLIBRARIES] Error 1 - -Here, with the thread number, we have: - - (1) doltlibtool installing the pkglibs (install-exec-am). - - (2) in parallel, libtool relinking the vdpau instance plugin. - - (1) libtool starts to be called for "relinking" (which is only - installing there) with version 0.0.0. - - (2) libtool tried to run the linker but it failed because - libvlc_vdpau.so doesn't exist yet on the target prefix. - - (1) libtool .0.0.0 links to the major version shortcut .0 for - libvlc_vdpau. - - (1) libtool .0.0.0 links to the unversioned shortcut for - libvlc_vdpau. - -So the pkglibs were not installed before installing the plugins linking -them and it was racy whether automake succeeded in installing vlc_vdpau -before or not. This could apply to any pkglib being used from plugins. - -This patch ensure the pkglibs are installed before relinking the plugins -for vpdau, same must be done for each other pkglib usage location. - -Note that install-vdpauLTLIBRARIES itself will install each target from -vdpau_LTLIBRARIES serially in the order they are defined, so there would -be no race inside the same LTLIBRARIES variables, but the different -LTLIBRARIES variables are processed in parallel themselves. - -Fixes #28374 ---- - modules/Makefile.am | 1 + - modules/audio_output/Makefile.am | 3 +++ - modules/hw/vdpau/Makefile.am | 4 ++++ - modules/video_output/Makefile.am | 3 +++ - 4 files changed, 11 insertions(+) - -diff --git a/modules/Makefile.am b/modules/Makefile.am -index d9940f95cbc8..3a41a6bbe456 100644 ---- a/modules/Makefile.am -+++ b/modules/Makefile.am -@@ -1,3 +1,4 @@ -+ - noinst_LTLIBRARIES = - check_LTLIBRARIES = - pkglib_LTLIBRARIES = -diff --git a/modules/audio_output/Makefile.am b/modules/audio_output/Makefile.am -index 4c7957cdd153..8d48003e20b5 100644 ---- a/modules/audio_output/Makefile.am -+++ b/modules/audio_output/Makefile.am -@@ -1,5 +1,8 @@ - aoutdir = $(pluginsdir)/audio_output - aout_LTLIBRARIES = -+# Install the pkglib/pkglibexec first before relinking the modules. -+# This ensures libtool re-linking is not racy. -+install-aoutLTLIBRARIES: install-pkglibLTLIBRARIES - - libvlc_android_audioformat_jni_la_SOURCES = \ - audio_output/android/audioformat_jni.c \ -diff --git a/modules/hw/vdpau/Makefile.am b/modules/hw/vdpau/Makefile.am -index ef3601209314..f195f712310b 100644 ---- a/modules/hw/vdpau/Makefile.am -+++ b/modules/hw/vdpau/Makefile.am -@@ -1,4 +1,8 @@ - vdpaudir = $(pluginsdir)/vdpau -+# Install the pkglib/pkglibexec first before relinking the modules. -+# This ensures libtool re-linking is not racy. -+install-vpdauLTLIBRARIES: install-pkglibLTLIBRARIES -+ - - libvlc_vdpau_la_SOURCES = hw/vdpau/vlc_vdpau.c hw/vdpau/vlc_vdpau.h - libvlc_vdpau_la_CFLAGS = $(VDPAU_CFLAGS) -diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am -index ad959bc45ed5..bcbb892c4c93 100644 ---- a/modules/video_output/Makefile.am -+++ b/modules/video_output/Makefile.am -@@ -1,5 +1,8 @@ - voutdir = $(pluginsdir)/video_output - vout_LTLIBRARIES = -+# Install the pkglib/pkglibexec first before relinking the modules. -+# This ensures libtool re-linking is not racy. -+install-voutLTLIBRARIES: install-pkglibLTLIBRARIES - - EXTRA_DIST += video_output/README - --- -GitLab - -From 0b9f3f836f1c678e6d101f62545a8edaba16dcd0 Mon Sep 17 00:00:00 2001 -From: Alexandre Janniaux <ajanni@videolabs.io> -Date: Sun, 8 Dec 2024 22:43:37 +0100 -Subject: [PATCH] Makefile.am: fix installation regression - -Automake doesn't generate automatic rules when a rule already exist in -the file, except if it cannot detect it. Adding the -`install-fooLTLIBRARIES: install-pkglibLTLIBRARIES` rule for audio -outputs, video outputs and vdpau broke the installation. - -Adding `$(install-fooLTLIBRARIES): install-pkglibLTLIBRARIES` also makes -automake unhappy because of the variable name looking suspiciously close -to the target it generates, so a version without the dash is used for -the variable name in the rule. With this, the install target is -preserved but the dependency also exists in the output. ---- - modules/audio_output/Makefile.am | 3 ++- - modules/hw/vdpau/Makefile.am | 3 ++- - modules/video_output/Makefile.am | 3 ++- - 3 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/modules/audio_output/Makefile.am b/modules/audio_output/Makefile.am -index 8d48003e20b..c045a892c10 100644 ---- a/modules/audio_output/Makefile.am -+++ b/modules/audio_output/Makefile.am -@@ -2,7 +2,8 @@ aoutdir = $(pluginsdir)/audio_output - aout_LTLIBRARIES = - # Install the pkglib/pkglibexec first before relinking the modules. - # This ensures libtool re-linking is not racy. --install-aoutLTLIBRARIES: install-pkglibLTLIBRARIES -+installaoutLTLIBRARIES = install-aoutLTLIBRARIES -+$(installaoutLTLIBRARIES): install-pkglibLTLIBRARIES - - libvlc_android_audioformat_jni_la_SOURCES = \ - audio_output/android/audioformat_jni.c \ -diff --git a/modules/hw/vdpau/Makefile.am b/modules/hw/vdpau/Makefile.am -index f195f712310..1abdfa21a9b 100644 ---- a/modules/hw/vdpau/Makefile.am -+++ b/modules/hw/vdpau/Makefile.am -@@ -1,7 +1,8 @@ - vdpaudir = $(pluginsdir)/vdpau - # Install the pkglib/pkglibexec first before relinking the modules. - # This ensures libtool re-linking is not racy. --install-vpdauLTLIBRARIES: install-pkglibLTLIBRARIES -+installvpdauLTLIBRARIES = install-vdpauLTLIBRARIES -+$(installvpdauLTLIBRARIES): install-pkglibLTLIBRARIES - - - libvlc_vdpau_la_SOURCES = hw/vdpau/vlc_vdpau.c hw/vdpau/vlc_vdpau.h -diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am -index bcbb892c4c9..844b0dd01c8 100644 ---- a/modules/video_output/Makefile.am -+++ b/modules/video_output/Makefile.am -@@ -2,7 +2,8 @@ voutdir = $(pluginsdir)/video_output - vout_LTLIBRARIES = - # Install the pkglib/pkglibexec first before relinking the modules. - # This ensures libtool re-linking is not racy. --install-voutLTLIBRARIES: install-pkglibLTLIBRARIES -+installvoutLTLIBRARIES = install-voutLTLIBRARIES -+$(installvoutLTLIBRARIES): install-pkglibLTLIBRARIES - - EXTRA_DIST += video_output/README - --- -GitLab diff --git a/media-video/vlc/files/vlc-3.0.21-vaapi-w-ffmpeg5.patch b/media-video/vlc/files/vlc-3.0.21-vaapi-w-ffmpeg5.patch deleted file mode 100644 index 322818b348b7..000000000000 --- a/media-video/vlc/files/vlc-3.0.21-vaapi-w-ffmpeg5.patch +++ /dev/null @@ -1,149 +0,0 @@ -From ba5dc03aecc1d96f81b76838f845ebde7348cf62 Mon Sep 17 00:00:00 2001 -From: David Rosca <nowrep@gmail.com> -Date: Fri, 20 Dec 2024 20:24:36 +0100 -Subject: [PATCH] avcodec: vaapi: Support VAAPI with latest FFmpeg - ---- - configure.ac | 20 +------------ - modules/codec/Makefile.am | 2 +- - modules/codec/avcodec/avcommon_compat.h | 3 ++ - modules/codec/avcodec/vaapi.c | 38 +++++++++++++++++++++++-- - 4 files changed, 41 insertions(+), 22 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 00afb063c455..089339e10e0b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2550,25 +2550,7 @@ AM_CONDITIONAL([HAVE_VAAPI], [test "${have_vaapi}" = "yes"]) - AM_CONDITIONAL([HAVE_VAAPI_DRM], [test "${have_vaapi_drm}" = "yes"]) - AM_CONDITIONAL([HAVE_VAAPI_X11], [test "${have_vaapi_x11}" = "yes"]) - AM_CONDITIONAL([HAVE_VAAPI_WL], [test "${have_vaapi_wl}" = "yes"]) -- --have_avcodec_vaapi="no" --AS_IF([test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"], [ -- VLC_SAVE_FLAGS -- CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}" -- CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}" -- AC_CHECK_HEADERS([libavcodec/vaapi.h], [ -- AC_MSG_NOTICE([VA API acceleration activated]) -- have_avcodec_vaapi="yes" -- ],[ -- AS_IF([test -n "${enable_libva}"], [ -- AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing]) -- ], [ -- AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ]) -- ]) -- ]) -- VLC_RESTORE_FLAGS --]) --AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_avcodec_vaapi}" = "yes"]) -+AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"]) - - dnl - dnl dxva2 needs avcodec -diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am -index 6d9465fdaef9..dd04391c1bf7 100644 ---- a/modules/codec/Makefile.am -+++ b/modules/codec/Makefile.am -@@ -416,7 +416,7 @@ libvaapi_plugin_la_SOURCES = \ - codec/avcodec/vaapi.c hw/vaapi/vlc_vaapi.c hw/vaapi/vlc_vaapi.h - libvaapi_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) - libvaapi_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVCODEC_CFLAGS) --libvaapi_plugin_la_LIBADD = $(LIBVA_LIBS) -+libvaapi_plugin_la_LIBADD = $(LIBVA_LIBS) $(AVCODEC_LIBS) - if HAVE_AVCODEC_VAAPI - if HAVE_VAAPI_DRM - codec_LTLIBRARIES += libvaapi_drm_plugin.la -diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h -index ac02c06d2339..8ab6910f3250 100644 ---- a/modules/codec/avcodec/avcommon_compat.h -+++ b/modules/codec/avcodec/avcommon_compat.h -@@ -84,6 +84,9 @@ - #ifndef FF_API_AVIO_WRITE_NONCONST // removed in ffmpeg 7 - # define FF_API_AVIO_WRITE_NONCONST (LIBAVFORMAT_VERSION_MAJOR < 61) - #endif -+#ifndef FF_API_STRUCT_VAAPI_CONTEXT -+# define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) -+#endif - - #endif /* HAVE_LIBAVCODEC_AVCODEC_H */ - -diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c -index c83269e43f30..e203baaf9ee2 100644 ---- a/modules/codec/avcodec/vaapi.c -+++ b/modules/codec/avcodec/vaapi.c -@@ -42,12 +42,25 @@ - # include <va/va_drm.h> - #endif - #include <libavcodec/avcodec.h> -+#if FF_API_STRUCT_VAAPI_CONTEXT - #include <libavcodec/vaapi.h> -+#else -+#include <libavutil/hwcontext_vaapi.h> -+#endif - - #include "avcodec.h" - #include "va.h" - #include "../../hw/vaapi/vlc_vaapi.h" - -+#if !FF_API_STRUCT_VAAPI_CONTEXT -+struct vaapi_context -+{ -+ VADisplay display; -+ VAConfigID config_id; -+ VAContextID context_id; -+}; -+#endif -+ - struct vlc_va_sys_t - { - struct vlc_vaapi_instance *va_inst; -@@ -145,8 +158,10 @@ static void Delete(vlc_va_t *va, void **hwctx) - - (void) hwctx; - -- vlc_vaapi_DestroyContext(o, sys->hw_ctx.display, sys->hw_ctx.context_id); -- vlc_vaapi_DestroyConfig(o, sys->hw_ctx.display, sys->hw_ctx.config_id); -+ if (sys->hw_ctx.context_id != VA_INVALID_ID) -+ vlc_vaapi_DestroyContext(o, sys->hw_ctx.display, sys->hw_ctx.context_id); -+ if (sys->hw_ctx.config_id != VA_INVALID_ID) -+ vlc_vaapi_DestroyConfig(o, sys->hw_ctx.display, sys->hw_ctx.config_id); - vlc_vaapi_ReleaseInstance(sys->va_inst); - free(sys); - } -@@ -196,6 +211,7 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *d - sys->hw_ctx.config_id = VA_INVALID_ID; - sys->hw_ctx.context_id = VA_INVALID_ID; - -+#if FF_API_STRUCT_VAAPI_CONTEXT - sys->hw_ctx.config_id = - vlc_vaapi_CreateConfigChecked(o, sys->hw_ctx.display, i_profile, - VAEntrypointVLD, i_vlc_chroma); -@@ -211,6 +227,24 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *d - goto error; - - ctx->hwaccel_context = &sys->hw_ctx; -+#else -+ AVBufferRef *hwdev_ref = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_VAAPI); -+ if (hwdev_ref == NULL) -+ goto error; -+ -+ AVHWDeviceContext *hwdev_ctx = (void *) hwdev_ref->data; -+ AVVAAPIDeviceContext *vadev_ctx = hwdev_ctx->hwctx; -+ vadev_ctx->display = va_dpy; -+ -+ if (av_hwdevice_ctx_init(hwdev_ref) < 0) -+ { -+ av_buffer_unref(&hwdev_ref); -+ goto error; -+ } -+ -+ ctx->hw_device_ctx = hwdev_ref; -+#endif -+ - va->sys = sys; - va->description = vaQueryVendorString(sys->hw_ctx.display); - va->get = Get; --- -GitLab - diff --git a/media-video/vlc/vlc-3.0.21-r3.ebuild b/media-video/vlc/vlc-3.0.21-r3.ebuild deleted file mode 100644 index ec6e25339207..000000000000 --- a/media-video/vlc/vlc-3.0.21-r3.ebuild +++ /dev/null @@ -1,500 +0,0 @@ -# Copyright 2000-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -LUA_COMPAT=( lua5-{1..2} ) -inherit autotools flag-o-matic lua-single toolchain-funcs virtualx xdg - -DESCRIPTION="Media player and framework with support for most multimedia files and streaming" -HOMEPAGE="https://www.videolan.org/vlc/" -SRC_URI="https://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz - https://dev.gentoo.org/~asturm/distfiles/${P}-taglib2.tar.xz" - -LICENSE="LGPL-2.1 GPL-2" -SLOT="0/5-9" # vlc - vlccore -KEYWORDS="amd64 ~arm arm64 ~loong ppc ppc64 ~riscv -sparc x86" - -IUSE="a52 alsa aom archive aribsub bidi bluray cddb chromaprint chromecast dav1d dbus - dc1394 debug directx dts +dvbpsi dvd +encode faad fdk +ffmpeg flac fluidsynth - fontconfig +gcrypt gme keyring gstreamer +gui ieee1394 jack jpeg kate - libass libcaca libnotify +libsamplerate libtar libtiger linsys lirc live lua - macosx-notifications mad matroska modplug mp3 mpeg mtp musepack ncurses nfs ogg - omxil optimisememory opus png projectm pulseaudio rdp run-as-root samba sdl-image - sftp shout sid skins soxr speex srt ssl svg taglib theora tremor truetype twolame - udev upnp vaapi v4l vdpau vnc vpx wayland +X x264 x265 xml zeroconf zvbi - cpu_flags_arm_neon cpu_flags_ppc_altivec cpu_flags_x86_mmx cpu_flags_x86_sse -" -REQUIRED_USE=" - chromecast? ( encode ) - directx? ( ffmpeg ) - fontconfig? ( truetype ) - libcaca? ( X ) - libtar? ( skins ) - libtiger? ( kate ) - lua? ( ${LUA_REQUIRED_USE} ) - skins? ( archive gui truetype X xml ) - ssl? ( gcrypt ) - vaapi? ( ffmpeg X ) - vdpau? ( ffmpeg X ) -" -BDEPEND=" - >=sys-devel/gettext-0.19.8 - virtual/pkgconfig - lua? ( ${LUA_DEPS} ) - amd64? ( dev-lang/yasm ) - wayland? ( dev-util/wayland-scanner ) - x86? ( dev-lang/yasm ) -" -# <media-plugins/live-2024.11.28: https://github.com/gentoo/gentoo/pull/40610#issuecomment-2664870395 -RDEPEND=" - media-libs/libvorbis - net-dns/libidn:= - sys-libs/zlib - virtual/libintl - virtual/opengl - a52? ( media-libs/a52dec ) - alsa? ( media-libs/alsa-lib ) - aom? ( media-libs/libaom:= ) - archive? ( app-arch/libarchive:= ) - aribsub? ( media-libs/aribb24 ) - bidi? ( - dev-libs/fribidi - media-libs/freetype:2[harfbuzz] - media-libs/harfbuzz:= - virtual/ttf-fonts - ) - bluray? ( >=media-libs/libbluray-1.3.0:= ) - cddb? ( media-libs/libcddb ) - chromaprint? ( media-libs/chromaprint:= ) - chromecast? ( - >=dev-libs/protobuf-2.5.0:= - >=net-libs/libmicrodns-0.1.2:= - ) - dav1d? ( media-libs/dav1d:= ) - dbus? ( sys-apps/dbus ) - dc1394? ( - media-libs/libdc1394:2 - sys-libs/libraw1394 - ) - dts? ( media-libs/libdca ) - dvbpsi? ( >=media-libs/libdvbpsi-1.2.0:= ) - dvd? ( - >=media-libs/libdvdnav-6.1.1:= - >=media-libs/libdvdread-6.1.2:= - ) - faad? ( media-libs/faad2 ) - fdk? ( media-libs/fdk-aac:= ) - ffmpeg? ( >=media-video/ffmpeg-3.1.3:=[postproc,vaapi?,vdpau?] ) - flac? ( - media-libs/flac:= - media-libs/libogg - ) - fluidsynth? ( media-sound/fluidsynth:= ) - fontconfig? ( media-libs/fontconfig:1.0 ) - gcrypt? ( - dev-libs/libgcrypt:= - dev-libs/libgpg-error - ) - gme? ( media-libs/game-music-emu ) - keyring? ( app-crypt/libsecret ) - gstreamer? ( >=media-libs/gst-plugins-base-1.4.5:1.0 ) - gui? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtsvg:5 - dev-qt/qtwidgets:5 - X? ( - dev-qt/qtx11extras:5 - x11-libs/libX11 - ) - ) - ieee1394? ( - sys-libs/libavc1394 - sys-libs/libraw1394 - ) - jack? ( virtual/jack ) - jpeg? ( media-libs/libjpeg-turbo:0 ) - kate? ( media-libs/libkate ) - libass? ( - media-libs/fontconfig:1.0 - media-libs/libass:= - ) - libcaca? ( media-libs/libcaca ) - libnotify? ( - dev-libs/glib:2 - x11-libs/gdk-pixbuf:2 - x11-libs/gtk+:3 - x11-libs/libnotify - ) - libsamplerate? ( media-libs/libsamplerate ) - libtar? ( dev-libs/libtar ) - libtiger? ( media-libs/libtiger ) - linsys? ( media-libs/zvbi ) - lirc? ( app-misc/lirc ) - live? ( <media-plugins/live-2024.11.28:= ) - lua? ( ${LUA_DEPS} ) - mad? ( media-libs/libmad ) - matroska? ( - >=dev-libs/libebml-1.4.2:= - media-libs/libmatroska:= - ) - modplug? ( >=media-libs/libmodplug-0.8.9.0 ) - mp3? ( media-sound/mpg123-base ) - mpeg? ( media-libs/libmpeg2 ) - mtp? ( media-libs/libmtp:= ) - musepack? ( media-sound/musepack-tools ) - ncurses? ( sys-libs/ncurses:=[unicode(+)] ) - nfs? ( >=net-fs/libnfs-0.10.0:= ) - ogg? ( media-libs/libogg ) - opus? ( >=media-libs/opus-1.0.3 ) - png? ( media-libs/libpng:0= ) - projectm? ( - media-fonts/dejavu - >=media-libs/libprojectm-3.1.12:0= - ) - pulseaudio? ( media-libs/libpulse ) - rdp? ( >=net-misc/freerdp-2.0.0_rc0:2= ) - samba? ( >=net-fs/samba-4.0.0:0[client,-debug(-)] ) - sdl-image? ( media-libs/sdl-image ) - sftp? ( net-libs/libssh2 ) - shout? ( media-libs/libshout ) - sid? ( media-libs/libsidplay:2 ) - skins? ( - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXpm - ) - soxr? ( >=media-libs/soxr-0.1.2 ) - speex? ( - >=media-libs/speex-1.2.0 - media-libs/speexdsp - ) - srt? ( >=net-libs/srt-1.4.2:= ) - ssl? ( net-libs/gnutls:= ) - svg? ( - gnome-base/librsvg:2 - x11-libs/cairo - ) - taglib? ( media-libs/taglib:= ) - theora? ( media-libs/libtheora ) - tremor? ( media-libs/tremor ) - truetype? ( - media-libs/freetype:2 - virtual/ttf-fonts - !fontconfig? ( media-fonts/dejavu ) - ) - twolame? ( media-sound/twolame ) - udev? ( virtual/udev ) - upnp? ( net-libs/libupnp:=[ipv6(+)] ) - v4l? ( media-libs/libv4l:= ) - vaapi? ( media-libs/libva:=[drm(+),wayland?,X?] ) - vdpau? ( x11-libs/libvdpau ) - vnc? ( net-libs/libvncserver ) - vpx? ( media-libs/libvpx:= ) - wayland? ( - >=dev-libs/wayland-1.15 - dev-libs/wayland-protocols - ) - X? ( - x11-libs/libX11 - x11-libs/libxcb - x11-libs/xcb-util - x11-libs/xcb-util-keysyms - ) - x264? ( >=media-libs/x264-0.0.20190214:= ) - x265? ( media-libs/x265:= ) - xml? ( dev-libs/libxml2:2 ) - zeroconf? ( net-dns/avahi[dbus] ) - zvbi? ( media-libs/zvbi ) -" -DEPEND="${RDEPEND} - X? ( x11-base/xorg-proto ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-2.1.0-fix-libtremor-libs.patch # build system - "${FILESDIR}"/${PN}-3.0.6-fdk-aac-2.0.0.patch # bug 672290 - "${FILESDIR}"/${PN}-3.0.11.1-configure_lua_version.patch - "${FILESDIR}"/${PN}-3.0.18-drop-minizip-dep.patch - "${FILESDIR}"/${PN}-3.0.21-freerdp-2.patch # bug 919296, 590164 - "${WORKDIR}"/${P}-taglib2 # bug 938946, in 3.0.x branch - "${FILESDIR}"/${PN}-3.0.2.1-vdpau.patch # bug 946178 - "${FILESDIR}"/${P}-vaapi-w-ffmpeg5.patch # bug 864721, in 3.0.x branch -) - -DOCS=( AUTHORS THANKS NEWS README doc/fortunes.txt ) - -pkg_setup() { - if use lua; then - lua-single_pkg_setup - fi -} - -src_prepare() { - default - - # bug 608256 - xdg_environment_reset - - has_version 'net-libs/libupnp:1.8' && \ - eapply "${FILESDIR}"/${PN}-2.2.8-libupnp-slot-1.8.patch - - # Bootstrap when we are on a git checkout. - if [[ ${PV} = *9999 ]] ; then - ./bootstrap - fi - - # Make it build with libtool 1.5 - rm m4/lt* m4/libtool.m4 || die - - # We are not in a real git checkout due to the absence of a .git directory. - touch src/revision.txt || die - - # Don't use --started-from-file when not using dbus. - if ! use dbus ; then - sed -i 's/ --started-from-file//' share/vlc.desktop.in || die - fi - - # Disable running of vlc-cache-gen, we do that in pkg_postinst - sed -e "/test.*build.*host/s/\$(host)/nothanks/" \ - -i Makefile.am -i bin/Makefile.am || die "Failed to disable vlc-cache-gen" - - # Fix gettext version mismatch errors. - sed -i -e s/GETTEXT_VERSION/GETTEXT_REQUIRE_VERSION/ configure.ac || die - - eautoreconf - - # Disable automatic running of tests. - find . -name 'Makefile.in' -exec sed -i 's/\(..*\)check-TESTS/\1/' {} \; || die -} - -src_configure() { - local -x BUILDCC="$(tc-getBUILD_CC)" - - local myeconfargs=( - --disable-aa - --disable-optimizations - --disable-rpath - --disable-update-check - --enable-fast-install - --enable-screen - --enable-vcd - --enable-vlc - --enable-vorbis - $(use_enable a52) - $(use_enable alsa) - $(use_enable aom) - $(use_enable archive) - $(use_enable aribsub) - $(use_enable bidi fribidi) - $(use_enable bidi harfbuzz) - $(use_enable bluray) - $(use_enable cddb libcddb) - $(use_enable chromaprint) - $(use_enable chromecast) - $(use_enable chromecast microdns) - $(use_enable cpu_flags_arm_neon neon) - $(use_enable cpu_flags_ppc_altivec altivec) - $(use_enable cpu_flags_x86_mmx mmx) - $(use_enable cpu_flags_x86_sse sse) - $(use_enable dav1d) - $(use_enable dbus) - $(use_enable dbus kwallet) - $(use_enable dc1394) - $(use_enable debug) - $(use_enable directx) - $(use_enable directx d3d11va) - $(use_enable directx dxva2) - $(use_enable dts dca) - $(use_enable dvbpsi) - $(use_enable dvd dvdnav) - $(use_enable dvd dvdread) - $(use_enable encode sout) - $(use_enable encode vlm) - $(use_enable faad) - $(use_enable fdk fdkaac) - $(use_enable ffmpeg avcodec) - $(use_enable ffmpeg avformat) - $(use_enable ffmpeg postproc) - $(use_enable ffmpeg swscale) - $(use_enable flac) - $(use_enable fluidsynth) - $(use_enable fontconfig) - $(use_enable gcrypt libgcrypt) - $(use_enable gme) - $(use_enable keyring secret) - $(use_enable gstreamer gst-decode) - $(use_enable gui qt) - $(use_enable ieee1394 dv1394) - $(use_enable jack) - $(use_enable jpeg) - $(use_enable kate) - $(use_enable libass) - $(use_enable libcaca caca) - $(use_enable libnotify notify) - $(use_enable libsamplerate samplerate) - $(use_enable libtar) - $(use_enable libtiger tiger) - $(use_enable linsys) - $(use_enable lirc) - $(use_enable live live555) - $(use_enable lua) - $(use_enable macosx-notifications osx-notifications) - $(use_enable mad) - $(use_enable matroska) - $(use_enable modplug mod) - $(use_enable mp3 mpg123) - $(use_enable mpeg libmpeg2) - $(use_enable mtp) - $(use_enable musepack mpc) - $(use_enable ncurses) - $(use_enable nfs) - $(use_enable ogg) - $(use_enable omxil) - $(use_enable omxil omxil-vout) - $(use_enable optimisememory optimize-memory) - $(use_enable opus) - $(use_enable png) - $(use_enable projectm) - $(use_enable pulseaudio pulse) - $(use_enable rdp freerdp) - $(use_enable run-as-root) - $(use_enable samba smbclient) - $(use_enable sdl-image) - $(use_enable sftp) - $(use_enable shout) - $(use_enable sid) - $(use_enable skins skins2) - $(use_enable soxr) - $(use_enable speex) - $(use_enable srt) - $(use_enable ssl gnutls) - $(use_enable svg) - $(use_enable svg svgdec) - $(use_enable taglib) - $(use_enable theora) - $(use_enable tremor) - $(use_enable twolame) - $(use_enable udev) - $(use_enable upnp) - $(use_enable v4l v4l2) - $(use_enable vaapi libva) - $(use_enable vdpau) - $(use_enable vnc) - $(use_enable vpx) - $(use_enable wayland) - $(use_with X x) - $(use_enable X xcb) - $(use_enable X xvideo) - $(use_enable x264) - $(use_enable x264 x26410b) - $(use_enable x265) - $(use_enable xml libxml2) - $(use_enable zeroconf avahi) - $(use_enable zvbi) - $(use_enable !zvbi telx) - --with-kde-solid="${EPREFIX}"/usr/share/solid/actions - --disable-asdcp - --disable-coverage - --disable-cprof - --disable-crystalhd - --disable-decklink - --disable-gles2 - --disable-goom - --disable-kai - --disable-kva - --disable-libplacebo - --disable-maintainer-mode - --disable-merge-ffmpeg - --disable-mfx - --disable-mmal - --disable-opencv - --disable-opensles - --disable-oss - --disable-rpi-omxil - --disable-schroedinger - --disable-shine - --disable-sndio - --disable-spatialaudio - --disable-vsxu - --disable-wasapi - --disable-wma-fixed - ) - # ^ We don't have these disabled libraries in the Portage tree yet. - - # https://code.videolan.org/videolan/vlc/-/issues/17626 (bug #861143) - append-flags -fno-strict-aliasing - filter-lto - - # Compatibility fix for Samba 4. - use samba && append-cppflags "-I${ESYSROOT}/usr/include/samba-4.0" - - if use x86; then - # We need to disable -fstack-check if use >=gcc 4.8.0. bug #499996 - append-cflags $(test-flags-CC -fno-stack-check) - # Bug 569774 - replace-flags -Os -O2 - fi - - # FIXME: Needs libresid-builder from libsidplay:2 which is in another directory... - append-ldflags "-L${ESYSROOT}/usr/$(get_libdir)/sidplay/builders/" - - if use riscv; then - # bug #803473 - append-libs -latomic - fi - - if use truetype || use bidi; then - myeconfargs+=( --enable-freetype ) - else - myeconfargs+=( --disable-freetype ) - fi - - if use truetype || use projectm; then - local dejavu="${EPREFIX}/usr/share/fonts/dejavu/" - myeconfargs+=( - --with-default-font=${dejavu}/DejaVuSans.ttf - --with-default-font-family=Sans - --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf - --with-default-monospace-font-family=Monospace - ) - fi - - econf "${myeconfargs[@]}" - - # _FORTIFY_SOURCE is set to 2 in config.h, which is also the default value on Gentoo. - # Other values may break the build (bug 523144), so definition should not be removed. - # To prevent redefinition warnings, we undefine _FORTIFY_SOURCE at the start of config.h - sed -i '1i#undef _FORTIFY_SOURCE' config.h || die -} - -src_test() { - virtx emake check-TESTS -} - -src_install() { - default - find "${ED}" -name '*.la' -delete || die -} - -pkg_postinst() { - if [[ -z "${ROOT}" ]] && [[ -x "${EROOT}/usr/$(get_libdir)/vlc/vlc-cache-gen" ]] ; then - einfo "Running ${EPREFIX}/usr/$(get_libdir)/vlc/vlc-cache-gen on ${EROOT}/usr/$(get_libdir)/vlc/plugins/" - "${EPREFIX}/usr/$(get_libdir)/vlc/vlc-cache-gen" "${EROOT}/usr/$(get_libdir)/vlc/plugins/" - else - ewarn "We cannot run vlc-cache-gen (most likely ROOT != /)" - ewarn "Please run ${EPREFIX}/usr/$(get_libdir)/vlc/vlc-cache-gen manually" - ewarn "If you do not do it, vlc will take a long time to load." - fi - - xdg_pkg_postinst -} - -pkg_postrm() { - if [[ -e "${EROOT}"/usr/$(get_libdir)/vlc/plugins/plugins.dat ]]; then - rm "${EROOT}"/usr/$(get_libdir)/vlc/plugins/plugins.dat || die "Failed to rm plugins.dat" - fi - - xdg_pkg_postrm -} diff --git a/media-video/vlc/vlc-3.0.21_p20250217.ebuild b/media-video/vlc/vlc-3.0.21_p20250217.ebuild index a47964f063b1..0f566fbc3a54 100644 --- a/media-video/vlc/vlc-3.0.21_p20250217.ebuild +++ b/media-video/vlc/vlc-3.0.21_p20250217.ebuild @@ -14,7 +14,7 @@ S="${WORKDIR}/${PN}-${COMMIT}" LICENSE="LGPL-2.1 GPL-2" SLOT="0/5-9" # vlc - vlccore -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv -sparc ~x86" +KEYWORDS="amd64 ~arm arm64 ~loong ppc ppc64 ~riscv -sparc x86" IUSE="a52 alsa aom archive aribsub bidi bluray cddb chromaprint chromecast dav1d dbus dc1394 debug directx dts +dvbpsi dvd +encode faad fdk +ffmpeg flac fluidsynth diff --git a/media-video/wireplumber/Manifest b/media-video/wireplumber/Manifest index b3c45ff877bb..ce979e525efa 100644 --- a/media-video/wireplumber/Manifest +++ b/media-video/wireplumber/Manifest @@ -1,9 +1,13 @@ AUX wireplumber-0.5.6-config-disable-sound-server-parts.patch 559 BLAKE2B 8d71fadbfb8b45eeede3c3b322e11205f4b31af098f0798cc9bef2ee92eb74ce5f811233981351097b4da02c70ce42bcd0033fd951a89f8bc8218468d09b235c SHA512 1e6deb4ce2452f22fca6722c22cfa6a61794f8612c9b2baf6ac1a9b4cf6bdae84e3685e1d8957db3121d304fd5842de47a0f319b755dc349f354f55e118d4750 +AUX wireplumber-0.5.8-custom-lua-crash.patch 3153 BLAKE2B 47caa306b96668108c6f4ad8d362249018dc24fabe4b9f815960c89cb824d08b20a321580458cce5164a28e02e082d198fe1885e7d768c9a8df4e4241785b3d7 SHA512 706b0299a738c605b7601da8175f1d5abc7d488033df263951b4132556b8c9f3846bbf50977a390237ab51491063b8e8a47f126c6355476f8d4691ab5b86d102 +AUX wireplumber-0.5.8-mem-leak.patch 1092 BLAKE2B e65f129d107063cef702403fa35f53b120be832838196a7f705dbeb93daf6ceb763100294169e47004d80032ae05ac25944ce4bcec5ff348c95c82b035f33cc4 SHA512 5a48b13a8dc5aad143588e7945c51eeaa9f30089100a9956fa48d73048864289e69346441e09a4c21b1528a0160c2bb95d8f9221a9488647c863d190dafd2d26 +AUX wireplumber-0.5.8-vaargs.patch 2143 BLAKE2B 11f65b5791adfa998ebecf1cff6ee58ae12ef366c5af943d96621c2fc47eae780937a30997b969e6dd96df659f4b3e4a19f6ea673547fad1e8a990ac2b351468 SHA512 0cf5faa45966571bf80869219d0431b02df1a1293158a41b98cab00c0ac41d368af4ebf5239348f44ee7e82d8c0a5a1af4a49f493a962a837fe5009767bf312d AUX wireplumber.initd 287 BLAKE2B 915e91e428de674b46aab566c6bb62d402dc34c1f16d353150e4b9810356de77e8c9f7c12736bc86330a95481ad32521c6b9b98b5ad48fbc3993f1d09d9c1c59 SHA512 7828ce215125c33fc0c4a5832b72129a61bc704e23328c7126300288d60568350f0b937dbff20eef6942283f01106ead633ca71910c7db0e04ab1ffd5f47d963 DIST wireplumber-0.5.7.tar.bz2 416878 BLAKE2B 0def07be7c3652ef76d4af9167875a0d26440c33ad8427d9594922e34dd44fb422e63861931dd7d8861d97698d8752c01ff3bedd68445009f55c728dfd4224d1 SHA512 a9f47664359ec8e483a3b16a1ba6b6e6bea3187bd17536f1ee2a756a0b217ebc401d4f21044b4c1caac83f08cead71539cf96705968aac80289cfe7e70857c56 DIST wireplumber-0.5.8.tar.bz2 419851 BLAKE2B 2d811534771d57206bcac467b2241e0b6f67259a7399de2d28f758768317d652aa1c9cd2cc5327e3528928e3aa59cef2c94873688d9ecc935aaecb4078a81db9 SHA512 bb3a4a3bc9fd0ece7fccb4efa32d01b02d68738b7766dd4b3310471c4bb98cc499b324ef0643079665d175e3267c1b4e53deef6ebdd9600e49a9560adb22ad88 EBUILD wireplumber-0.5.7.ebuild 3956 BLAKE2B 8665c2eb28b98fec5b5182854a7d4ee9f555d6b4cfa16995dd2014581eff1a9037001be835cee3a063614edede23bd1a0529fd4873525078310551b0f2580b7d SHA512 52d1416cb274a252135bfa4d5e586a79ae64a87caaca9ce08faf082f60d8026190d2fae9e61ee8cb34681eb62c38ce57675095da945ce4ebc55c941778d28d8c EBUILD wireplumber-0.5.8-r1.ebuild 4041 BLAKE2B f76e30bbd52816c0ddce9848f51648ba769cd71c3de49b8dffca0183eaa7b006e0a187bd561efd3cde838523f5162ccae8288fc0f844cf414086c46d07ee1793 SHA512 78f1a5a6fb4907b059f3891f783b116037e4b3c7b2547be0e81a921b2c356bc66bc2f1490a3daa5404ad6a36a11ae2ff33935b8e4ba7880b24171e0e46fb68df -EBUILD wireplumber-0.5.8.ebuild 3962 BLAKE2B 971b0ef739a2e85d1749c796c6d589f0749455739770db5a7d56c25da274d6be1ec1e010917dbcb9e7c4e2cafef0acefd700998154bd010a985b04901ed24750 SHA512 79b1c73be334634ea99eef3ef81ae41590ab5df36efca4dcea67dc78f04a9b00ea314d44b75cca2c8e1efc5faa4520741c21cdacbfaab7a6369c2eb3bdc9f8e8 +EBUILD wireplumber-0.5.8-r2.ebuild 4159 BLAKE2B 60ebb068791fbaea24455dfd41d70724de11a9b3b1656436b81ac00fa156880fa2e89e55c3f23f74ed1cc27a04c50ec1578d094d7c0b8bacde57f8b82aecc0cc SHA512 cfe092c09d148296cb969359ce3f3a0762cfdc4f16f498c75c7d0cacac4b1ef2b9f6109a22d62a5f30f83d621f96c78d56feadaa69ef9c64aa95449077318973 +EBUILD wireplumber-0.5.8.ebuild 3956 BLAKE2B 8665c2eb28b98fec5b5182854a7d4ee9f555d6b4cfa16995dd2014581eff1a9037001be835cee3a063614edede23bd1a0529fd4873525078310551b0f2580b7d SHA512 52d1416cb274a252135bfa4d5e586a79ae64a87caaca9ce08faf082f60d8026190d2fae9e61ee8cb34681eb62c38ce57675095da945ce4ebc55c941778d28d8c EBUILD wireplumber-9999.ebuild 4041 BLAKE2B f76e30bbd52816c0ddce9848f51648ba769cd71c3de49b8dffca0183eaa7b006e0a187bd561efd3cde838523f5162ccae8288fc0f844cf414086c46d07ee1793 SHA512 78f1a5a6fb4907b059f3891f783b116037e4b3c7b2547be0e81a921b2c356bc66bc2f1490a3daa5404ad6a36a11ae2ff33935b8e4ba7880b24171e0e46fb68df MISC metadata.xml 719 BLAKE2B 7ad70a19cbc55cb0c399cbc1c8c56a3bab16d2dd477a285a3c142793af3704a8dd6648f6cfa0b9aa6fd8338c9cddd93cc565356a8a2e5031a6874b46ac66c2ee SHA512 a4617e6176a4dab7491103858ed5f663b8dda2a6cd97c348cc274ac959df813a811f70963487ccb670999fd51d107726762d872ce42290d02ea6ed24ea021e55 diff --git a/media-video/wireplumber/files/wireplumber-0.5.8-custom-lua-crash.patch b/media-video/wireplumber/files/wireplumber-0.5.8-custom-lua-crash.patch new file mode 100644 index 000000000000..92358ded7b0f --- /dev/null +++ b/media-video/wireplumber/files/wireplumber-0.5.8-custom-lua-crash.patch @@ -0,0 +1,72 @@ +https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/32d2abdf34c987df24ba3b073159ea4eee2edf73 + +From 32d2abdf34c987df24ba3b073159ea4eee2edf73 Mon Sep 17 00:00:00 2001 +From: George Kiagiadakis <george.kiagiadakis@collabora.com> +Date: Thu, 13 Feb 2025 16:06:29 +0200 +Subject: [PATCH] internal-comp-loader: generate a "provides" for components + that don't have one + +It is valid for components not to have a "provides" field, but it +prevents them from being able to have "before" and "after" dependencies. +With this patch, we generate a hidden "provides" field so that the +dependencies sorting algorithm can work without issues. + +Fixes: #771 +--- + lib/wp/private/internal-comp-loader.c | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/lib/wp/private/internal-comp-loader.c b/lib/wp/private/internal-comp-loader.c +index 45877eb7..842c6934 100644 +--- a/lib/wp/private/internal-comp-loader.c ++++ b/lib/wp/private/internal-comp-loader.c +@@ -28,7 +28,7 @@ struct _ComponentData + grefcount ref; + /* an identifier for this component that is understandable by the end user */ + gchar *printable_id; +- /* the provided feature name or NULL */ ++ /* the provided feature name */ + gchar *provides; + /* the original state of the feature (required / optional / disabled) */ + FeatureState state; +@@ -205,7 +205,7 @@ component_data_new_from_json (WpSpaJson * json, WpProperties * features, + comp->printable_id = g_strdup_printf ("%s [%s]", comp->provides, comp->type); + } + } else { +- comp->provides = NULL; ++ comp->provides = g_strdup_printf ("__anonymous_%p", comp); + comp->state = FEATURE_STATE_REQUIRED; + comp->printable_id = g_strdup_printf ("[%s: %s]", comp->type, comp->name); + } +@@ -328,7 +328,7 @@ wp_component_array_load_task_get_next_step (WpTransition * transition, guint ste + static gboolean + component_equals (const ComponentData * comp, const gchar * provides) + { +- return (comp->provides && g_str_equal (provides, comp->provides)); ++ return g_str_equal (provides, comp->provides); + } + + static inline gboolean +@@ -358,7 +358,7 @@ sort_components_before_after (WpComponentArrayLoadTask * self, GError ** error) + gchar *target_provides = g_ptr_array_index (comp->before, j); + for (guint k = 0; k < self->components->len; k++) { + ComponentData *target = g_ptr_array_index (self->components, k); +- if (target->provides && g_str_equal (target_provides, target->provides)) { ++ if (g_str_equal (target_provides, target->provides)) { + g_ptr_array_insert (target->after, -1, g_strdup (comp->provides)); + } + } +@@ -531,9 +531,8 @@ parse_components (WpComponentArrayLoadTask * self, GError ** error) + if (comp->state == FEATURE_STATE_REQUIRED) + g_ptr_array_add (required_components, component_data_ref (comp)); + +- if (comp->provides) +- g_hash_table_insert (self->feat_components, comp->provides, +- component_data_ref (comp)); ++ g_hash_table_insert (self->feat_components, comp->provides, ++ component_data_ref (comp)); + } + + /* topological sorting based on depth-first search */ +-- +GitLab diff --git a/media-video/wireplumber/files/wireplumber-0.5.8-mem-leak.patch b/media-video/wireplumber/files/wireplumber-0.5.8-mem-leak.patch new file mode 100644 index 000000000000..24d6c4c426d0 --- /dev/null +++ b/media-video/wireplumber/files/wireplumber-0.5.8-mem-leak.patch @@ -0,0 +1,28 @@ +https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/f3bc7168edeac015154feda01698a9c10f68e1b1 + +From f3bc7168edeac015154feda01698a9c10f68e1b1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= <pobrn@protonmail.com> +Date: Wed, 19 Feb 2025 18:34:58 +0100 +Subject: [PATCH] wpctl: fix default device name leak + +The `get-default-configured-node-name` handler returns a copy +of the name of the node, hence it must be freed. +--- + src/tools/wpctl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tools/wpctl.c b/src/tools/wpctl.c +index 9f507eca..38d730c8 100644 +--- a/src/tools/wpctl.c ++++ b/src/tools/wpctl.c +@@ -529,7 +529,7 @@ status_run (WpCtl * self) + printf (TREE_INDENT_END "Default Configured Devices:\n"); + if (def_nodes_api) { + for (guint i = 0; i < G_N_ELEMENTS (DEFAULT_NODE_MEDIA_CLASSES); i++) { +- const gchar *name = NULL; ++ g_autofree gchar *name = NULL; + g_signal_emit_by_name (def_nodes_api, "get-default-configured-node-name", + DEFAULT_NODE_MEDIA_CLASSES[i], &name); + if (name) +-- +GitLab diff --git a/media-video/wireplumber/files/wireplumber-0.5.8-vaargs.patch b/media-video/wireplumber/files/wireplumber-0.5.8-vaargs.patch new file mode 100644 index 000000000000..c047ecf7c026 --- /dev/null +++ b/media-video/wireplumber/files/wireplumber-0.5.8-vaargs.patch @@ -0,0 +1,50 @@ +https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/5846d12ea156c961772a44163a42987ef35c1ab6 + +From 5846d12ea156c961772a44163a42987ef35c1ab6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= <pobrn@protonmail.com> +Date: Tue, 18 Feb 2025 19:57:22 +0100 +Subject: [PATCH] wpctl: fix types in variadic arguments + +`wp_object_manager_add_interest()` passes the format string +and the arguments after that to `g_variant_new()`, which +requires a 32-bit integer for "u". Passing a 64-bit integer +will cause problems on certain ABIs. + +Furthermore, remove the metadata related interest declaration +from `set_default_prepare()` since the "set-default" command +does not access metadata directly, it uses the "default-nodes-api" +plugin. + +Fixes: 7784cfad92cfa4 ("wpctl: support @DEFAULT_{AUDIO,VIDEO}_{SINK,SOURCE}@ as ID ") +Fixes #773 +--- + src/tools/wpctl.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/tools/wpctl.c b/src/tools/wpctl.c +index 38d730c8..0e671109 100644 +--- a/src/tools/wpctl.c ++++ b/src/tools/wpctl.c +@@ -753,7 +753,7 @@ inspect_print_object (WpCtl * self, WpProxy * proxy, guint nest_level) + if (cmdline.inspect.show_referenced && nest_level == 0 && + key_is_object_reference (prop_item->key)) + { +- guint id = (guint) strtol (prop_item->value, NULL, 10); ++ guint32 id = (guint32) strtol (prop_item->value, NULL, 10); + g_autoptr (WpProxy) refer_proxy = + wp_object_manager_lookup (self->om, WP_TYPE_GLOBAL_PROXY, + WP_CONSTRAINT_TYPE_G_PROPERTY, "bound-id", "=u", id, NULL); +@@ -833,10 +833,8 @@ set_default_prepare (WpCtl * self, GError ** error) + { + wp_object_manager_add_interest (self->om, WP_TYPE_NODE, + WP_CONSTRAINT_TYPE_PW_GLOBAL_PROPERTY, +- "object.id", "=u", cmdline.set_default.id, ++ "object.id", "=u", (guint32) cmdline.set_default.id, + NULL); +- wp_object_manager_request_object_features (self->om, WP_TYPE_METADATA, +- WP_OBJECT_FEATURES_ALL); + wp_object_manager_request_object_features (self->om, WP_TYPE_NODE, + WP_PIPEWIRE_OBJECT_FEATURES_MINIMAL); + return TRUE; +-- +GitLab diff --git a/media-video/wireplumber/wireplumber-0.5.8-r2.ebuild b/media-video/wireplumber/wireplumber-0.5.8-r2.ebuild new file mode 100644 index 000000000000..31f15917567d --- /dev/null +++ b/media-video/wireplumber/wireplumber-0.5.8-r2.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# 1. Please regularly check (even at the point of bumping) Fedora's packaging +# for needed backports at https://src.fedoraproject.org/rpms/wireplumber/tree/rawhide +# +# 2. Keep an eye on git master (for both PipeWire and WirePlumber) as things +# continue to move quickly. It's not uncommon for fixes to be made shortly +# after releases. + +LUA_COMPAT=( lua5-{3,4} ) + +inherit lua-single meson systemd + +DESCRIPTION="Replacement for pipewire-media-session" +HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git" + EGIT_BRANCH="master" + inherit git-r3 +else + SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.bz2" + KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86" +fi + +LICENSE="MIT" +SLOT="0/0.5" +IUSE="elogind system-service systemd test" + +REQUIRED_USE=" + ${LUA_REQUIRED_USE} + ?? ( elogind systemd ) + system-service? ( systemd ) +" + +RESTRICT="!test? ( test )" + +# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building +BDEPEND=" + dev-libs/glib + dev-util/gdbus-codegen + dev-util/glib-utils + sys-devel/gettext + test? ( sys-apps/dbus ) +" +DEPEND=" + ${LUA_DEPS} + >=dev-libs/glib-2.68 + >=media-video/pipewire-1.0.5-r1:= + virtual/libintl + elogind? ( sys-auth/elogind ) + systemd? ( sys-apps/systemd ) +" +RDEPEND=" + ${DEPEND} + system-service? ( + acct-user/pipewire + acct-group/pipewire + ) +" + +DOCS=( {NEWS,README}.rst ) + +PATCHES=( + # Defer enabling sound server parts to media-video/pipewire + # TODO: Soon, we should be able to migrate to just a dropin at + # /usr/share. See https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/652#note_2399735. + "${FILESDIR}"/${PN}-0.5.6-config-disable-sound-server-parts.patch + # Backports + "${FILESDIR}"/${P}-custom-lua-crash.patch + "${FILESDIR}"/${P}-mem-leak.patch + "${FILESDIR}"/${P}-vaargs.patch +) + +src_configure() { + local emesonargs=( + -Ddaemon=true + -Dtools=true + -Dmodules=true + # Ebuild not wired up yet (Sphinx, Doxygen?) + -Ddoc=disabled + # Only used for Sphinx doc generation + -Dintrospection=disabled + -Dsystem-lua=true + -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version)) + $(meson_feature elogind) + $(meson_feature systemd) + $(meson_use system-service systemd-system-service) + $(meson_use systemd systemd-user-service) + -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir) + -Dsystemd-user-unit-dir=$(systemd_get_userunitdir) + $(meson_use test tests) + $(meson_use test dbus-tests) + ) + + meson_src_configure +} + +src_install() { + meson_src_install + + exeinto /etc/user/init.d + newexe "${FILESDIR}"/wireplumber.initd wireplumber + + mv "${ED}"/usr/share/doc/wireplumber/* "${ED}"/usr/share/doc/${PF} || die + rmdir "${ED}"/usr/share/doc/wireplumber || die +} + +pkg_postinst() { + if systemd_is_booted ; then + ewarn "pipewire-media-session.service is no longer installed. You must switch" + ewarn "to wireplumber.service user unit before your next logout/reboot:" + ewarn "systemctl --user disable pipewire-media-session.service" + ewarn "systemctl --user --force enable wireplumber.service" + else + ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher" + ewarn "is started (a replacement for directly calling pipewire binary)." + ewarn + ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist" + ewarn "or, if it does exist, that any reference to" + ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)." + fi + + if use system-service; then + ewarn + ewarn "WARNING: you have enabled the system-service USE flag, which installs" + ewarn "the system-wide systemd units that enable WirePlumber to run as a system" + ewarn "service. This is more than likely NOT what you want. You are strongly" + ewarn "advised not to enable this mode and instead stick with systemd user" + ewarn "units. The default configuration files will likely not work out of" + ewarn "box, and you are on your own with configuration." + ewarn + fi +} diff --git a/media-video/wireplumber/wireplumber-0.5.8.ebuild b/media-video/wireplumber/wireplumber-0.5.8.ebuild index f549b726fb74..d1f979b31c3a 100644 --- a/media-video/wireplumber/wireplumber-0.5.8.ebuild +++ b/media-video/wireplumber/wireplumber-0.5.8.ebuild @@ -23,7 +23,7 @@ if [[ ${PV} == 9999 ]]; then inherit git-r3 else SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.bz2" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86" fi LICENSE="MIT" diff --git a/media-video/yle-dl/Manifest b/media-video/yle-dl/Manifest index 36ba7d0a2bee..94852d88b59a 100644 --- a/media-video/yle-dl/Manifest +++ b/media-video/yle-dl/Manifest @@ -1,5 +1,7 @@ DIST yle-dl-20250126.tar.gz 80360 BLAKE2B adbdbd962ffd652c465fdf78e7eb64681435d3b04ace670fd425dd852968150481722ee82dfb5c57931bd35cf1006d887a3d842af6c47a1ff072a6303205150d SHA512 567d634aaf33833e79faaa700eb79f85c9bbd353005c0261012301b07dcdd6a5722a3a220b6acbcf8a28255010058ec34dd4b60b7b30a04d8ffaba663412f474 DIST yle-dl-20250227.tar.gz 80954 BLAKE2B 6f9dd4d5c98a4fd3c1c0bead3de3f23fa46f8a11a5463d6df57b7c897bd108d0fb3b55170d3827d081313125b55c0bff5442e87725ac77272627328cc7c46113 SHA512 1e4d7e9c57a7e1ce2cdd08c08785f0da7efb5adcd5d429eee829d409d775d082e14a00a9fa330dbc13e60fee84212090f033075f14ced3e543f911b3aefc425f +DIST yle-dl-20250316.tar.gz 81041 BLAKE2B fd4c935ead73df123fe6182c0f1697451b8a32318f2ded8cad9a3009e33a6b38d2330fdc2785e59eff3397b7e184b6d741ed40b7fb52aeadc9836496118f8c04 SHA512 47e8ef7812c82e0b321ddca77b7989c8dbcf1cdd26d35fc82d45c6c71cfc6ef023a77666425185a4cd688a1b675b2471b51bdefa073b2d3d67d4a9bbf2586f2e EBUILD yle-dl-20250126.ebuild 1704 BLAKE2B 2185a439fb87f0e429300e41f0ccb125d982529886feffa07eb4dd2e06ff0bf4aaab144ca35337fb171508ca8554a8aee64f3043d2452b841995a595a9c445c4 SHA512 4e9402ff14f0d52cdb74bd30b671b5c3445752b124a9af352a040e994c9e7113a906bf8457bd118fcb42ddcbba7f59d0f12478a4f5e72d2beb30f4930480a53d EBUILD yle-dl-20250227.ebuild 1750 BLAKE2B 4b2e420b47a607310a4ef06a13f2fc96c5de3e22f6c8f4880c4ec537dfd5593a35a20ca024ec6d6009d5f6cbd6e37457f0df05e371660513c04cd36b31a2f582 SHA512 0bc70c5e3a771f9d688c77ad0f05a7cf1c06cf6606493094013b0f6885f4dfbf67fba59a856aa03d139f4cfd53c036b7d35126aefe2f7c69b8cee48ffc3c0d22 +EBUILD yle-dl-20250316.ebuild 1750 BLAKE2B 4b2e420b47a607310a4ef06a13f2fc96c5de3e22f6c8f4880c4ec537dfd5593a35a20ca024ec6d6009d5f6cbd6e37457f0df05e371660513c04cd36b31a2f582 SHA512 0bc70c5e3a771f9d688c77ad0f05a7cf1c06cf6606493094013b0f6885f4dfbf67fba59a856aa03d139f4cfd53c036b7d35126aefe2f7c69b8cee48ffc3c0d22 MISC metadata.xml 363 BLAKE2B b27761ed00c4849b5e9a0c51fdf699ab7e1589acc017be236339e8e5044fbe05ad62ad8c7104f6e9e43de0779ad6f9f3fe4144fc57376d87d0304f7c7c3fe7cf SHA512 1b061009279fcf8271bec4958ddb93d93e1455686e42d623a64ef51a65e4f852d23873c59d5e547bbf66d6c596f542fd29f78de5c7b33f484918b01beb76dc92 diff --git a/media-video/yle-dl/yle-dl-20250316.ebuild b/media-video/yle-dl/yle-dl-20250316.ebuild new file mode 100644 index 000000000000..6450f764b991 --- /dev/null +++ b/media-video/yle-dl/yle-dl-20250316.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +DISTUTILS_USE_PEP517=flit + +inherit distutils-r1 optfeature + +DESCRIPTION="Download media files from Yle Areena" +HOMEPAGE="https://aajanki.github.io/yle-dl/ https://github.com/aajanki/yle-dl" +SRC_URI="https://github.com/aajanki/yle-dl/archive/refs/tags/releases/${PV}.tar.gz -> ${P}.tar.gz" + +S="${WORKDIR}/${PN}-releases-${PV}" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="amd64 x86" + +IUSE="test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# Requires an active internet connection during tests to test-download different media formats +# from Yle Areena. +PROPERTIES="test_network" +RESTRICT="test" + +RDEPEND="media-video/ffmpeg + net-misc/wget + >=dev-python/attrs-18.1.0[${PYTHON_USEDEP}] + >=dev-python/configargparse-0.13.0[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/progress[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}]" +BDEPEND="test? ( + ${RDEPEND} + media-video/ffmpeg[gnutls] + dev-python/pip[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/wheel[${PYTHON_USEDEP}] + )" + +distutils_enable_tests pytest + +DOCS=( COPYING ChangeLog README.fi.md README.sv.md README.md yledl.conf.sample ) + +src_install() { + docompress -x "/usr/share/doc/${PF}/yledl.conf.sample" + distutils-r1_src_install +} + +pkg_postinst() { + elog "Sample configuration file has been installed to " + elog " /usr/share/doc/yle-dl-${PVR}/yledl.conf.sample" + elog + optfeature "automatically detect filesystems that require restricted character sets" dev-python/psutil + optfeature "store metadata as extended file attributes" dev-python/pyxattr + optfeature "youtube-dl download engine" net-misc/yt-dlp +} |