diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-05-09 00:01:03 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-05-09 00:01:03 +0100 |
commit | a0ce545d52f231499bf9f3644493113d8af58ec9 (patch) | |
tree | 4d67c09eed0c2ae28d1317f72d7f7b08b4f6aeea /media-libs | |
parent | 5181ced3f3566a9610b85922b083c8f84f20d78f (diff) |
gentoo auto-resync : 09:05:2024 - 00:01:03
Diffstat (limited to 'media-libs')
17 files changed, 992 insertions, 401 deletions
diff --git a/media-libs/Manifest.gz b/media-libs/Manifest.gz Binary files differindex 569ec38597ce..9eb2e7cc6d9b 100644 --- a/media-libs/Manifest.gz +++ b/media-libs/Manifest.gz diff --git a/media-libs/libggi/Manifest b/media-libs/libggi/Manifest index 5d8a6a18260f..a2f6598c47bb 100644 --- a/media-libs/libggi/Manifest +++ b/media-libs/libggi/Manifest @@ -1,4 +1,5 @@ +AUX libggi-2.2.2-incompatible-types.patch 475 BLAKE2B cc6a0d956e6d2aeed9e5328c0e4411db4d1c2dce818ce8af5aac7335efdaece6c9f233d3ec7a7a0e9e3425b8e28e83950b4caf05d42e39caf22a73c082f54f4b SHA512 dfa1825db363979cea9eb75e27d149f8ed696b89ebe157158693581bcc222ca0f83c8f7cae8ca615cd7f7d77509d69383b3beb875b396de1108fd177f7070d2b AUX libggi-2.2.2-slibtool.patch 2105 BLAKE2B 5cb1f3ede56aa35a5eecdbe49e649b5c512f267bc33c993355d4707c35e090c53586b1a7416262f40066207e6cd41ec8720047b37447b62103a9b94953ebd164 SHA512 f9eaaf862fe1ad7ba1baa29a9016ae810aaf7d054d23ed36512a59076c23e1ce359e08653f6cd13641e6136e023aa4fe511ad545fc4763f0472b0f400965d323 DIST libggi-2.2.2.src.tar.bz2 1071939 BLAKE2B e583ed802cffe825cec2575ee8d33e619ca5537c841380e12e4b5d07e485b4a3d515936d8b2f4763522b26c5302ccdd2de98810d85243408acaca64b04e520ac SHA512 ee2038dc64cea43994fa1ac716f1062462d17b0bbf30fd9a9d2762e7424a43fedc7c573178d9472738a5069ff3bf977ac26957c0c262c51cdf1065b616370975 -EBUILD libggi-2.2.2-r1.ebuild 1603 BLAKE2B 65af6ebb7d658a284ae2fc9f66108bb5191f157b25eb65324f78c077fcdb416eee137038167b3514315aa148d6328f2ba0ae5afa47ceae3edadd3e5dc21ee34b SHA512 42980b5119d9e060884b33930c424cbc876e5e8df40b717d710d1bc0120447a67d099cc49bde70b6d42674a3463046d74cdd87b9151c4136767a0d0b2f5809d7 +EBUILD libggi-2.2.2-r2.ebuild 1657 BLAKE2B b7382a6a899b059e1e82084d73d97228adf9c588eb8ac50e1d682a759310fc1fa13ed72f5de7a40924255d35f07ff2ac823c575078f0f57050af95e4bd919109 SHA512 3bab20f757617bd519277307832c10002c8a1fd821fbec4a5b220100ca3494af310947c9e22cf757bf8d61e1c6857d6e1b7f5dd29311cfdca05ee6c7300aca97 MISC metadata.xml 485 BLAKE2B 6d6d108c523eb917020b6292c303f86749350862790c7bc873c8582bb302f91e028745978d865cb65f5122bff3783ca9e0a5d81912a4bda87c47ae8de9573b53 SHA512 bccc6fc464d0d353628d61b3f9ef3271b5bc08fb959113ec92f72813ed7c7483323c2a610af6a35fecf1ce722e856aa98907673308f84fd0617e83b8128899dc diff --git a/media-libs/libggi/files/libggi-2.2.2-incompatible-types.patch b/media-libs/libggi/files/libggi-2.2.2-incompatible-types.patch new file mode 100644 index 000000000000..dc5dec5e6056 --- /dev/null +++ b/media-libs/libggi/files/libggi-2.2.2-incompatible-types.patch @@ -0,0 +1,12 @@ +Closes: https://bugs.gentoo.org/880931 +--- a/display/X/helper/dga/dga.c 2024-03-27 20:58:09.954061371 +0400 ++++ b/display/X/helper/dga/dga.c 2024-03-27 20:58:26.408971886 +0400 +@@ -261,7 +261,7 @@ + + /* This function performs the CheckMode operation and returns + * the number of the best mode. */ +-static int ggi_xdga_validate_mode(ggi_visual * vis, int num, ++static int ggi_xdga_validate_mode(ggi_visual * vis, long int num, + ggi_mode * mode) + { + ggi_x_priv *priv; diff --git a/media-libs/libggi/libggi-2.2.2-r1.ebuild b/media-libs/libggi/libggi-2.2.2-r2.ebuild index 5c776bc44459..ad874eeb201b 100644 --- a/media-libs/libggi/libggi-2.2.2-r1.ebuild +++ b/media-libs/libggi/libggi-2.2.2-r2.ebuild @@ -29,6 +29,7 @@ DOCS=( ChangeLog ChangeLog.1999 FAQ NEWS README ) PATCHES=( "${FILESDIR}/${P}-slibtool.patch" # 775584 + "${FILESDIR}/${P}-incompatible-types.patch" # 880931 ) src_prepare() { diff --git a/media-libs/libopenshot-audio/Manifest b/media-libs/libopenshot-audio/Manifest deleted file mode 100644 index 82c77a75ad56..000000000000 --- a/media-libs/libopenshot-audio/Manifest +++ /dev/null @@ -1,5 +0,0 @@ -DIST libopenshot-audio-0.2.2.tar.gz 1808059 BLAKE2B fcf242bdd678d2e79e2775f3aff7507520a4e8b9ddc7696e1506beca0c1f8e0687d66dfa35a31748e2e622def6e1c22c160e9424c1c27527854ebcafc24413ca SHA512 9960c6225dd9b843d18134e851761bf12861220a2c63970055bc73d554725e56abd6d35339f7490b672faaf0699f58e3701ff8a966ab07af3264325a9d0dc472 -DIST libopenshot-audio-0.3.2.tar.gz 1772366 BLAKE2B 3b0157f88d28cfc4d147eea86b621c836aee48510d76db6ec6e88773cc1ee677dc635ea9a84e04754be463a1cd4bc80e6830c7cbf31a968ed0900732b007ff7c SHA512 f10a709c748f37cd74a49e760eded67d14a24d4932401d62d616854c105f2d5a09b2a91f31190123d3f82f792f08976fedd9a4a2c1053b49bf18b9986e14be94 -EBUILD libopenshot-audio-0.2.2.ebuild 551 BLAKE2B 6a267cdd51ab9ce287c6fcfda4c29a12da8640d60a1f08e3c5adcf9f3f545fce24949dc60352182f4c0b8ca7e0213708ab5d152547fd529abd0f782c58005582 SHA512 ca83657277f9a98ed58a3d6a45b0b528679ac1ae183dcbef42858cc9f4c86f10e6d43df3e09f20d0f25885eebc98565c09a00a1fa00a434fd7c5a3124755df43 -EBUILD libopenshot-audio-0.3.2.ebuild 732 BLAKE2B dd430f439613db62d34899bf6f99e44cb921cd0fb7681d1134112d5895b7e80fde9e98017ccc8fbfbe655b5e45ca49ef480fe1840594b8545070d68370d0abbb SHA512 f21b4e31c32ae7754a076d8d246f398be8045f004549f431fde6680f0be734b6631bac171dabf2ed0203e6a77481127d43cb04fcb7665fed2363c1d95a3e1aaa -MISC metadata.xml 533 BLAKE2B 513039af39245d270280ce0c22f048c1a005a09f8ee29761123da25e6f1df0204cbf52784523ef388bd034c91167956686c912e975d5a2c9b400f2239e588e66 SHA512 a564455b0816ef467e8e85c4b38d47a2ca6337b5a92e1d1a918f53dc8f1c87105e8e7b468df51ef5a079b00de3feee78457b4b4f5d94c28847ecb08be32578a8 diff --git a/media-libs/libopenshot-audio/libopenshot-audio-0.2.2.ebuild b/media-libs/libopenshot-audio/libopenshot-audio-0.2.2.ebuild deleted file mode 100644 index 36d12a9faa65..000000000000 --- a/media-libs/libopenshot-audio/libopenshot-audio-0.2.2.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -DESCRIPTION="Library for audio editing and playback used by OpenShot" -HOMEPAGE="https://www.openshot.org/" -SRC_URI="https://github.com/OpenShot/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-3+" -SLOT="0/8" -KEYWORDS="amd64 x86" - -RDEPEND="media-libs/alsa-lib - media-libs/freetype - sys-libs/zlib - x11-libs/libX11 - x11-libs/libXcursor - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr" -DEPEND="${RDEPEND}" diff --git a/media-libs/libopenshot-audio/libopenshot-audio-0.3.2.ebuild b/media-libs/libopenshot-audio/libopenshot-audio-0.3.2.ebuild deleted file mode 100644 index 67969ea938e2..000000000000 --- a/media-libs/libopenshot-audio/libopenshot-audio-0.3.2.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -DESCRIPTION="Library for audio editing and playback used by OpenShot" -HOMEPAGE="https://www.openshot.org/" -SRC_URI="https://github.com/OpenShot/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-3+" -SLOT="0/8" -KEYWORDS="amd64 x86" -IUSE="doc" - -RDEPEND="media-libs/alsa-lib - media-libs/freetype - sys-libs/zlib - x11-libs/libX11 - x11-libs/libXcursor - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr" -DEPEND="${RDEPEND}" -BDEPEND="doc? ( app-text/doxygen )" - -src_configure() { - local mycmakeargs=( - -DENABLE_AUDIO_DOCS=$(usex doc) - -DAUTO_INSTALL_DOCS=$(usex doc) - ) - cmake_src_configure -} diff --git a/media-libs/libopenshot-audio/metadata.xml b/media-libs/libopenshot-audio/metadata.xml deleted file mode 100644 index c0c094ab8a28..000000000000 --- a/media-libs/libopenshot-audio/metadata.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>steils@gentoo.org</email> - <name>Stefan Strogin</name> - </maintainer> - <maintainer type="project"> - <email>media-video@gentoo.org</email> - <name>Gentoo Video project</name> - </maintainer> - <upstream> - <remote-id type="github">OpenShot/libopenshot-audio</remote-id> - <bugs-to>https://github.com/OpenShot/libopenshot-audio/issues</bugs-to> - </upstream> -</pkgmetadata> diff --git a/media-libs/libopenshot/Manifest b/media-libs/libopenshot/Manifest deleted file mode 100644 index bf3dafedb6e6..000000000000 --- a/media-libs/libopenshot/Manifest +++ /dev/null @@ -1,6 +0,0 @@ -AUX libopenshot-0.3.2-fix-test-file-collisions.patch 2711 BLAKE2B 3712f9093389b16bbacb45aaf6dbadc9382f4694a69c1e6655391000a9a5b342ed873e6cf63760eb1102c3b38bc69de3d3dfc75e611a1ff97e94ed0dc0c0f245 SHA512 85c37d74c75f1db5e6a8a1d98422f044cf88a474322f2e48eac9a90bf18861be094f9c14a22aec188da065e9a1333073f1b82ae182d8942c5b9a3b119e4cc5f4 -DIST libopenshot-0.2.7.tar.gz 22472544 BLAKE2B 511ed214f0ecc43294a787e1c0119f036e274a1e8d051cb6e926bf7a9b5cea416325a2e051fca758d1f80ec2b9d746a4dd268e5ac5322fe8539fa2041a8c4d9d SHA512 71cb0e4010d8f3ff453486c3da3c7019c6569066845dcc58f438049a08b1c8663f31c29a728ce5461e9d3a1ca550038b757d4528e62a26eeb45ecbe600353988 -DIST libopenshot-0.3.2.tar.gz 26132237 BLAKE2B 5bc371481ddf69b5de909963cb83d1128066280e1259ae8b23f7ef5450f3da00ef1137dcefe2978e10d1a51931529f104aebdf0601be4b066c7ed371ea43439e SHA512 8891077af28a4db6bc3a7cd078ce5570a8f62e0795c13b0fff795eba60c3e977ece70247033ee4017c9785592355b7421655246a5d6807a5790bd18927739795 -EBUILD libopenshot-0.2.7-r1.ebuild 2235 BLAKE2B f6e958fb30ee1e11d769dc4504fabf0ca7368e0cfe9806439cbbf36132c80d428d2c99fbbbe742630890833228ed6780307bb393c41fb5087e98d70316b5bcd9 SHA512 2deafe812b1a8cffb1e05dea389a941e03e7902aa3d792ef4f397a1da877021ec0c75972f0c0efc732fcf28baacfd936d0401c5682eba41e47b3faf248980029 -EBUILD libopenshot-0.3.2-r1.ebuild 2665 BLAKE2B 8e1c040528814d9910afc9a4672fff4a7494a233c419f6cbd74e14310954b19c19a02ed490e316bdad82f599d56092a1c2d2bd6c83c49e0f143773ebadb41733 SHA512 41dc70b5d7556d428578e7f429882106ea19a43bf483b22d96cb02076e71974019b2d220e081fe435f8a5d3fa03492b01e6704830f513a7017d0bd07e743915b -MISC metadata.xml 692 BLAKE2B 4026573a8fcb925db47d77d761687f7b184e1ddc09607575d74f74989ee813171d8ca80b62242aeafff876016a09080813842c8745a91a04c90976bf30f5fe33 SHA512 38ebac4cf25be33304bc04bfe8435750c869f070cfa70d8aa53fe569fa95cbbab61fabefff1b4d6ebfd52d30ed18d806941dc7115d5a1906f2e4e2e2823bb2ec diff --git a/media-libs/libopenshot/files/libopenshot-0.3.2-fix-test-file-collisions.patch b/media-libs/libopenshot/files/libopenshot-0.3.2-fix-test-file-collisions.patch deleted file mode 100644 index 38bb96c5e048..000000000000 --- a/media-libs/libopenshot/files/libopenshot-0.3.2-fix-test-file-collisions.patch +++ /dev/null @@ -1,89 +0,0 @@ -Fixes test file collisions with high concurrency builds -Fix by Ninpo <ninpo@qap.la> -https://bugs.gentoo.org/909759, https://github.com/OpenShot/libopenshot/issues/933 - ---- a/tests/FFmpegWriter.cpp -+++ b/tests/FFmpegWriter.cpp -@@ -34,7 +34,7 @@ TEST_CASE( "Webm", "[libopenshot][ffmpegwriter]" ) - r.Open(); - - /* WRITER ---------------- */ -- FFmpegWriter w("output1.webm"); -+ FFmpegWriter w("Webm-output1.webm"); - - // Set options - w.SetAudioOptions(true, "libvorbis", 44100, 2, LAYOUT_STEREO, 188000); -@@ -50,7 +50,7 @@ TEST_CASE( "Webm", "[libopenshot][ffmpegwriter]" ) - w.Close(); - r.Close(); - -- FFmpegReader r1("output1.webm"); -+ FFmpegReader r1("Webm-output1.webm"); - r1.Open(); - - // Verify various settings on new MP4 -@@ -81,7 +81,7 @@ TEST_CASE( "Options_Overloads", "[libopenshot][ffmpegwriter]" ) - r.Open(); - - /* WRITER ---------------- */ -- FFmpegWriter w("output1.mp4"); -+ FFmpegWriter w("Options_Overloads-output1.mp4"); - - // Set options - w.SetAudioOptions("aac", 48000, 192000); -@@ -97,7 +97,7 @@ TEST_CASE( "Options_Overloads", "[libopenshot][ffmpegwriter]" ) - w.Close(); - r.Close(); - -- FFmpegReader r1("output1.mp4"); -+ FFmpegReader r1("Options_Overloads-output1.mp4"); - r1.Open(); - - // Verify implied settings -@@ -123,7 +123,7 @@ TEST_CASE( "DisplayInfo", "[libopenshot][ffmpegwriter]" ) - r.Open(); - - /* WRITER ---------------- */ -- FFmpegWriter w("output1.webm"); -+ FFmpegWriter w("DisplayInfo-output1.webm"); - - // Set options - w.SetAudioOptions(true, "libvorbis", 44100, 2, LAYOUT_STEREO, 188000); -@@ -203,7 +203,7 @@ TEST_CASE( "Gif", "[libopenshot][ffmpegwriter]" ) - t.Open(); - - /* WRITER ---------------- */ -- FFmpegWriter w("output1.gif"); -+ FFmpegWriter w("Gif-output1.gif"); - - // Set options (no audio options are set) - w.SetVideoOptions(true, "gif", Fraction(24,1), 1280, 720, Fraction(1,1), false, false, 15000000); -@@ -221,7 +221,7 @@ TEST_CASE( "Gif", "[libopenshot][ffmpegwriter]" ) - w.Close(); - t.Close(); - -- FFmpegReader r1("output1.gif"); -+ FFmpegReader r1("Gif-output1.gif"); - r1.Open(); - - // Verify various settings on new Gif ---- a/tests/ImageWriter.cpp -+++ b/tests/ImageWriter.cpp -@@ -64,7 +64,7 @@ TEST_CASE( "Gif", "[libopenshot][imagewriter]" ) - r.Open(); - - /* WRITER ---------------- */ -- ImageWriter w("output1.gif"); -+ ImageWriter w("ImageWriter-Gif-output1.gif"); - - CHECK_FALSE(w.IsOpen()); - -@@ -87,7 +87,7 @@ TEST_CASE( "Gif", "[libopenshot][imagewriter]" ) - r.Close(); - - // Open up the 5th frame from the newly created GIF -- ImageReader r1("output1.gif[4]"); -+ ImageReader r1("ImageWriter-Gif-output1.gif[4]"); - - // Basic Reader state queries - CHECK(r1.Name() == "ImageReader"); diff --git a/media-libs/libopenshot/libopenshot-0.2.7-r1.ebuild b/media-libs/libopenshot/libopenshot-0.2.7-r1.ebuild deleted file mode 100644 index 915385d454bb..000000000000 --- a/media-libs/libopenshot/libopenshot-0.2.7-r1.ebuild +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) - -inherit cmake python-single-r1 toolchain-funcs - -DESCRIPTION="Video editing library used by OpenShot" -HOMEPAGE="https://www.openshot.org/" -SRC_URI="https://github.com/OpenShot/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-3+" -SLOT="0/21" -KEYWORDS="amd64 x86" -IUSE="doc examples +imagemagick +opencv +python test" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" -RESTRICT="!test? ( test )" - -RDEPEND="dev-libs/jsoncpp:0= - dev-libs/protobuf:= - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtmultimedia:5[widgets] - >=media-libs/libopenshot-audio-0.2.1:0= - media-video/ffmpeg:0=[encode,x264,xvid,vpx,mp3,theora,vorbis] - net-libs/cppzmq - net-libs/zeromq - imagemagick? ( >=media-gfx/imagemagick-7:0=[cxx] ) - opencv? ( >=media-libs/opencv-4.5.2:=[contrib,contribdnn] ) - python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND}" -BDEPEND="doc? ( app-text/doxygen ) - python? ( dev-lang/swig ) - test? ( - dev-cpp/catch:0 - dev-libs/unittest++ - )" - -pkg_pretend() { - [[ ${MERGE_TYPE} != binary ]] && tc-check-openmp -} - -pkg_setup() { - [[ ${MERGE_TYPE} != binary ]] && tc-check-openmp - use python && python-single-r1_pkg_setup -} - -src_prepare() { - cmake_src_prepare - # https://github.com/OpenShot/libopenshot/issues/17 - use test || cmake_comment_add_subdirectory tests -} - -src_configure() { - local mycmakeargs=( - -DDISABLE_BUNDLED_JSONCPP=ON - -DENABLE_MAGICK=$(usex imagemagick) - -DENABLE_OPENCV=$(usex opencv) - -DENABLE_RUBY=OFF # TODO: add ruby support - -DENABLE_PYTHON=$(usex python) - -DENABLE_TESTS=$(usex test) - -DUSE_SYSTEM_JSONCPP=ON - $(cmake_use_find_package imagemagick ImageMagick) - ) - use python && mycmakeargs+=( - -DPYTHON_EXECUTABLE="${PYTHON}" - -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" - -DPYTHON_LIBRARY="$(python_get_library_path)" - ) - cmake_src_configure -} - -src_compile() { - cmake_src_compile - use doc && cmake_build doc -} - -src_test() { - cmake_build test -} - -src_install() { - local DOCS=( AUTHORS README.md doc/HW-ACCEL.md ) - use examples && DOCS+=( examples/ ) - use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. ) - - cmake_src_install - use python && python_optimize -} diff --git a/media-libs/libopenshot/libopenshot-0.3.2-r1.ebuild b/media-libs/libopenshot/libopenshot-0.3.2-r1.ebuild deleted file mode 100644 index 3d319121df73..000000000000 --- a/media-libs/libopenshot/libopenshot-0.3.2-r1.ebuild +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) - -inherit cmake python-single-r1 toolchain-funcs virtualx - -DESCRIPTION="Video editing library used by OpenShot" -HOMEPAGE="https://www.openshot.org/" -SRC_URI="https://github.com/OpenShot/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-3+" -SLOT="0/21" -KEYWORDS="amd64 ~x86" -IUSE="babl doc examples +imagemagick +opencv +python test" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" -RESTRICT="!test? ( test )" - -RDEPEND="dev-libs/jsoncpp:0= - dev-libs/protobuf:= - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtmultimedia:5[widgets] - dev-qt/qtsvg:5 - >=media-libs/libopenshot-audio-0.3.0:0= - media-video/ffmpeg:0=[encode,x264,xvid,vpx,mp3,theora,vorbis] - net-libs/cppzmq - net-libs/zeromq - babl? ( media-libs/babl ) - imagemagick? ( >=media-gfx/imagemagick-7:0=[cxx] ) - opencv? ( >=media-libs/opencv-4.5.2:=[contrib,contribdnn] ) - python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND}" -BDEPEND="doc? ( app-text/doxygen ) - python? ( dev-lang/swig ) - test? ( - dev-cpp/catch:0 - dev-libs/unittest++ - )" - -PATCHES=( - "${FILESDIR}"/libopenshot-0.3.2-fix-test-file-collisions.patch -) - -pkg_pretend() { - [[ ${MERGE_TYPE} != binary ]] && tc-check-openmp -} - -pkg_setup() { - [[ ${MERGE_TYPE} != binary ]] && tc-check-openmp - use python && python-single-r1_pkg_setup -} - -src_prepare() { - cmake_src_prepare - # https://github.com/OpenShot/libopenshot/issues/17 - use test || cmake_comment_add_subdirectory tests -} - -src_configure() { - local mycmakeargs=( - -DDISABLE_BUNDLED_JSONCPP=ON - -DENABLE_MAGICK=$(usex imagemagick) - -DENABLE_OPENCV=$(usex opencv) - -DENABLE_RUBY=OFF # TODO: add ruby support - -DENABLE_PYTHON=$(usex python) - -DBUILD_TESTING=$(usex test) - -DENABLE_LIB_DOCS=$(usex doc) - -DUSE_SYSTEM_JSONCPP=ON - # Resvg not packaged yet - -DCMAKE_DISABLE_FIND_PACKAGE_Resvg=ON - $(cmake_use_find_package imagemagick ImageMagick) - $(cmake_use_find_package babl babl) - ) - use python && mycmakeargs+=( - -DPYTHON_EXECUTABLE="${PYTHON}" - -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" - -DPYTHON_LIBRARY="$(python_get_library_path)" - ) - cmake_src_configure -} - -src_compile() { - cmake_src_compile - use doc && cmake_build doc -} - -src_test() { - # https://github.com/OpenShot/libopenshot/issues/922 exclude broken test - virtx cmake_src_test -E '(Caption:caption effect|Timeline:Multi-threaded Timeline GetFrame)' || die -} - -src_install() { - local DOCS=( AUTHORS README.md doc/HW-ACCEL.md ) - use examples && DOCS+=( examples/ ) - use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. ) - - cmake_src_install - use python && python_optimize -} diff --git a/media-libs/libopenshot/metadata.xml b/media-libs/libopenshot/metadata.xml deleted file mode 100644 index 4919bd8be349..000000000000 --- a/media-libs/libopenshot/metadata.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>steils@gentoo.org</email> - <name>Stefan Strogin</name> - </maintainer> - <maintainer type="project"> - <email>media-video@gentoo.org</email> - <name>Gentoo Video project</name> - </maintainer> - <upstream> - <remote-id type="github">OpenShot/libopenshot</remote-id> - <bugs-to>https://github.com/OpenShot/libopenshot/issues</bugs-to> - </upstream> - <use> - <flag name="opencv"> - Enable <pkg>media-libs/opencv</pkg> support - </flag> - <flag name="babl"> - Enable <pkg>media-libs/babl</pkg> support - </flag> - </use> -</pkgmetadata> diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest index 48a587773266..39c033d746b9 100644 --- a/media-libs/mesa/Manifest +++ b/media-libs/mesa/Manifest @@ -2,10 +2,19 @@ AUX 24.0.4-dzn-Include-vulkan_core.h-instead-of-vulkan.h-in-the.patch 1088 BLAKE DIST mesa-24.0.4.tar.xz 20057744 BLAKE2B 6de755081f7e9dd9303af791e1a405203388787c294f8163c9d6598aa66eed1c001eeb03203c49ed8a264065458228efd849e6e59091a5963155ce8edc47c63f SHA512 1d05b07026417fbe9cf18f7b18f2db9fe5fe327555c590283d87f69bbdd51f64135928a1dbe155d750187fc268bbdbb070bc1ae9ffc3e013b8707b391969d515 DIST mesa-24.0.5.tar.xz 20096384 BLAKE2B c4c5f493206f761a7171f19c6549dc791559a1fdbcf49aea98016f98c10f9130081a16df6b780062621495a42dc49ef5f0800bda64058e8ba60106f6a046ccef SHA512 9476af4b9ac8db5dce397084ef169927d10b28adea7e74aa5b3136810b499ac98ddf7ab564e7d1ff81c887208c8ebab3ad2d4e27e7f46136609b5c67527018eb DIST mesa-24.0.6.tar.xz 20115628 BLAKE2B 531482c1a01ec4c0bd6b2f0857640c14fcc2ba70e85a14e4edf0f44ba466c12e39ad067690e6a571a0744ae06080943b1328a29263225cb7570f119464e17fbe SHA512 60fcc77132c3cb0c98e650d97d3324bfd18abe7f8f8a3aa5209f71b2fddd94510f939bbf5272b2241749307184d5badde9da4842be57ce13f5760875885ea6fc +DIST mesa-24.0.7.tar.xz 20144724 BLAKE2B d9438e533b471445b2403e01e1fd593d83c0013b0991585f718122f1cadc6ac6bb1fb913f0fb257354ae21ddd9fe1f970ad9ac46f05d756c223ed56a11b9c9ce SHA512 77b0fae80ab0a07e2e528c113eadef0e3004b8df3e6e98fffe6fc2d8ac39f5ce7fa38ebe5c2ae32bfbac993dd7cbe288ace18ebb03cf2fb445fe7114f74dd45c DIST mesa-24.1.0-rc1.tar.xz 28863968 BLAKE2B 6d1b72395c208fcc82838f42b79455ebde3474a5e0362f6ee0ca52031c5ea15e1419bd4c9768649eecdeea51806e3dd7584fc70941b36efc23eb39a1716ac425 SHA512 575252e76e9fd0266ca9cdb0acb8b12f2890dcecca904ff46b81d439d70520d58f719c90806a4a72d553fca4214cfa3333e1271a8831a1e6a68ca257affc84e3 +DIST mesa-24.1.0-rc3.tar.xz 28889928 BLAKE2B bb8fb1ce1559f613e94c33aa20e89061a8e78be23c84776d32ac45eb218bfb8d6e30e5efa4f6c3e0782af1b14c41dab8c98682723f5bf3b21980e01f6ab8e6cf SHA512 d75641a023ba489b5117b369a2d9007bcf6079f31375c9aa70afd968f8acc3695468e9cf2ef1989ed28459cf245fccd60507a0e8b0931401b77a4b2b21f0fe03 +DIST paste-1.0.14.tar.gz 18429 BLAKE2B 88f533fd336bbbe24872b100777703832ff46b52970b94981fea202726de35ac0d3466f96370fa89c966b33e0f13c75cbf7f5f88bba290dc490a63c9e08a0b16 SHA512 0ec40c228afe645cb027a99c8bd8f7c65158aab48655018a45736727906b05f7354df114405f2eae88c4eba73dec62e8228f8be9834afa0f22b5f31c18006d34 +DIST proc-macro2-1.0.70.tar.gz 46747 BLAKE2B 808e3a30c89fd979663899124853d386cc53862621f4d872bba87fe91baccddbc6612bd658b4c18b44f8420fcb10700b2906cde9c9512a616ab800ebbfb0867d SHA512 cd5c41ef6a410e310e90828a33fee42c1e2bf30dfc2b0a0cf429fcc60fa1262393c977b2cab5f8a50a35fd1394fd6cc7e7a482581f88dcde20d9ad030c7414a5 +DIST quote-1.0.33.tar.gz 32169 BLAKE2B 2438915aebe30b79929ddc6ed8bad5282537b081c763a3d6b2b9483b63e7b5e99b9bba6f1f7deb725031b23384410b60c7cc4aef0b00bb1d94541cde54408ee3 SHA512 3c000577d0e9f82bc379570a4fa63283d73cfc6dee0475475ba201994491dece0110cdefc26fcf9a3b9d0bf50a3649ca5b68c8a0f6f2e620946b624ff8b8f38b +DIST syn-2.0.39.tar.gz 286899 BLAKE2B 8bf5e89cb961195b48896294dc876d4e5e81fe7ac1df5330b972e6fdcfa2cf89fd1467f315081f84c1f447d402850e0ab4c7dc2bd20271c5e2bc9a2e3008f70b SHA512 2ee6bb196bef427a9b9aada38fb3a3a11e893c4e9e8808063f544f5c05cda58d554dfea24488dd60b4c299457852b52bf17e5de8595333ff4f2358441964c672 +DIST unicode-ident-1.0.12.tar.gz 50118 BLAKE2B 04e2651e14251d68f4e7e70e1e7a6d5eded21aa4f684c6162a91608189f6dcabaca4aa22204c40e08c82d76773c679ff965f21836264885a3b4cb62d7aa762db SHA512 0d0228bfd8eb6a94d8ae4a003511dd5ad52a58b08d98a8f0a8c5e3dc8b3e6b987ea5009255dc1e9c411f91aec16edc4aaff26ed7a9c48430272f970cd2a9510d EBUILD mesa-24.0.4.ebuild 11622 BLAKE2B 21b8abb688e9ebb187ecc7a961ce851a83c5b09c58d3a51a3dd1151e927322c85a8ab44c5f6108dd4d02ca665eccdb2ade4d1604abe78c48eaee747b82c37329 SHA512 9eea957f1ec9db156c8fd9210214b566991524d3422fb411ec3758088b9851f8499e28c7284911f153ab64e1ec25088bf9b6485e2a7b406950edea9a0557c43a EBUILD mesa-24.0.5.ebuild 11630 BLAKE2B 4c0b8bee298f59954db6759e92464530c0fd7684425ebbbd4985e0d7f87e004f1c0990ec5468266ee9773833fc00f6287ef162d9abaca1ebeb553fe0d26bc19f SHA512 0854e76a64cc3bb2bcd873805a1c92a46bb82cbba2a107cfd43af676da0eab5b755646155164182dedd8a3dc26a6b73a11e8c366ba8067e142b49ac6d48ec4f4 EBUILD mesa-24.0.6.ebuild 11630 BLAKE2B 4c0b8bee298f59954db6759e92464530c0fd7684425ebbbd4985e0d7f87e004f1c0990ec5468266ee9773833fc00f6287ef162d9abaca1ebeb553fe0d26bc19f SHA512 0854e76a64cc3bb2bcd873805a1c92a46bb82cbba2a107cfd43af676da0eab5b755646155164182dedd8a3dc26a6b73a11e8c366ba8067e142b49ac6d48ec4f4 +EBUILD mesa-24.0.7.ebuild 11630 BLAKE2B 4c0b8bee298f59954db6759e92464530c0fd7684425ebbbd4985e0d7f87e004f1c0990ec5468266ee9773833fc00f6287ef162d9abaca1ebeb553fe0d26bc19f SHA512 0854e76a64cc3bb2bcd873805a1c92a46bb82cbba2a107cfd43af676da0eab5b755646155164182dedd8a3dc26a6b73a11e8c366ba8067e142b49ac6d48ec4f4 EBUILD mesa-24.1.0_rc1.ebuild 11269 BLAKE2B 4ac83d1dd74ba734037a2ce0c22d104297750576d4d36f8c24ec0c8ea1b41c716b7487966e7b763a6564ff6178b5525c1e49607b00db32c3f934f2f5efae3527 SHA512 d67e10773cee536b5c9cf3b1e2a3d0a8649e21aa3d7d36bcd5935af1fff40cdf78b26b7fa2b7e3e2ebec99de0023542a39e8eed640eb23257e5f5d7392e8f0a3 -EBUILD mesa-9999.ebuild 11269 BLAKE2B 4ac83d1dd74ba734037a2ce0c22d104297750576d4d36f8c24ec0c8ea1b41c716b7487966e7b763a6564ff6178b5525c1e49607b00db32c3f934f2f5efae3527 SHA512 d67e10773cee536b5c9cf3b1e2a3d0a8649e21aa3d7d36bcd5935af1fff40cdf78b26b7fa2b7e3e2ebec99de0023542a39e8eed640eb23257e5f5d7392e8f0a3 +EBUILD mesa-24.1.0_rc3.ebuild 13477 BLAKE2B 8ba955abf455044183db4601302c7473228c47b79318b837bfdf51aec8671f901744cc9bef54782bccee230d72a2a4c4e94c53279e8991292a9875fba98af444 SHA512 ecfd3177d7edd5d1ae5c56f7d19c7ceb2e42aa0d88df67a90db14609c7959f54c37244dab369c8c35d1e5e72e846957229f92250591fbd3e6c033005018506ee +EBUILD mesa-9999.ebuild 13477 BLAKE2B 8ba955abf455044183db4601302c7473228c47b79318b837bfdf51aec8671f901744cc9bef54782bccee230d72a2a4c4e94c53279e8991292a9875fba98af444 SHA512 ecfd3177d7edd5d1ae5c56f7d19c7ceb2e42aa0d88df67a90db14609c7959f54c37244dab369c8c35d1e5e72e846957229f92250591fbd3e6c033005018506ee MISC metadata.xml 1435 BLAKE2B 53690878512b86ce0b8dce38b083684c85ad5c1a655d5a69cb3265e156869845263eb16f271691b66c9f0cd76e97b56908acf7a1792d6abac0ec99447826cbb5 SHA512 842106e5d6eb60ff33c8cae7f0d52983c4f7e104152718b50fc790cbcb2506551a6fc7841fe8e3c7963850c238f77505b0e49b10a3a936baf459e1acaf73e07f diff --git a/media-libs/mesa/mesa-24.0.7.ebuild b/media-libs/mesa/mesa-24.0.7.ebuild new file mode 100644 index 000000000000..53d40957a9fc --- /dev/null +++ b/media-libs/mesa/mesa-24.0.7.ebuild @@ -0,0 +1,431 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( {15..17} ) +LLVM_OPTIONAL=1 +PYTHON_COMPAT=( python3_{10..12} ) + +inherit llvm-r1 meson-multilib python-any-r1 linux-info + +MY_P="${P/_/-}" + +DESCRIPTION="OpenGL-like graphic library for Linux" +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" + inherit git-r3 +else + SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris" +fi +S="${WORKDIR}/${MY_P}" +EGIT_CHECKOUT_DIR=${S} + +LICENSE="MIT SGI-B-2.0" +SLOT="0" + +RADEON_CARDS="r300 r600 radeon radeonsi" +VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau panfrost v3d vc4 virgl vivante vmware" +for card in ${VIDEO_CARDS}; do + IUSE_VIDEO_CARDS+=" video_cards_${card}" +done + +IUSE="${IUSE_VIDEO_CARDS} + cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm + lm-sensors opencl +opengl osmesa +proprietary-codecs selinux + test unwind vaapi valgrind vdpau vulkan + vulkan-overlay wayland +X xa zink +zstd" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + d3d9? ( + || ( + video_cards_intel + video_cards_r300 + video_cards_r600 + video_cards_radeonsi + video_cards_nouveau + video_cards_vmware + ) + ) + llvm? ( ${LLVM_REQUIRED_USE} ) + vulkan-overlay? ( vulkan ) + video_cards_lavapipe? ( llvm vulkan ) + video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) ) + video_cards_r300? ( x86? ( llvm ) amd64? ( llvm ) ) + vdpau? ( X ) + xa? ( X ) + X? ( gles1? ( opengl ) gles2? ( opengl ) ) + zink? ( vulkan || ( opengl gles1 gles2 ) ) +" + +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.119" +RDEPEND=" + >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] + >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}] + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) + llvm? ( + $(llvm_gen_dep " + sys-devel/llvm:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}] + opencl? ( + dev-util/spirv-llvm-translator:\${LLVM_SLOT} + sys-devel/clang:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}] + ) + ") + video_cards_r600? ( + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + video_cards_radeon? ( + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + ) + lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] ) + opencl? ( + >=virtual/opencl-3 + dev-libs/libclc[spirv(-)] + >=dev-util/spirv-tools-1.3.231.0 + virtual/libelf:0= + ) + vaapi? ( + >=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] + ) + vdpau? ( >=x11-libs/libvdpau-1.4:=[${MULTILIB_USEDEP}] ) + video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] ) + selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] ) + wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] ) + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] + X? ( + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] + >=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}] + >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] + >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}] + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] + x11-libs/libXfixes[${MULTILIB_USEDEP}] + x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}] + ) + zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) +" +for card in ${RADEON_CARDS}; do + RDEPEND="${RDEPEND} + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) + " +done +RDEPEND="${RDEPEND} + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) +" + +DEPEND="${RDEPEND} + video_cards_d3d12? ( >=dev-util/directx-headers-1.611.0[${MULTILIB_USEDEP}] ) + valgrind? ( dev-debug/valgrind ) + wayland? ( >=dev-libs/wayland-protocols-1.30 ) + X? ( + x11-libs/libXrandr[${MULTILIB_USEDEP}] + x11-base/xorg-proto + ) +" +BDEPEND=" + ${PYTHON_DEPS} + opencl? ( + >=virtual/rust-1.62.0 + >=dev-util/bindgen-0.58.0 + >=dev-build/meson-1.3.1 + ) + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]") + vulkan? ( + dev-util/glslang + llvm? ( + video_cards_intel? ( + amd64? ( + $(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]") + ~dev-util/intel_clc-${PV} + dev-libs/libclc[spirv(-)] + ) + ) + ) + ) + wayland? ( dev-util/wayland-scanner ) +" + +QA_WX_LOAD=" +x86? ( + usr/lib/libglapi.so.0.0.0 + usr/lib/libOSMesa.so.8.0.0 + usr/lib/libGLX_mesa.so.0.0.0 +)" + +PATCHES=( + "${FILESDIR}"/24.0.4-dzn-Include-vulkan_core.h-instead-of-vulkan.h-in-the.patch +) + +pkg_pretend() { + if use vulkan; then + if ! use video_cards_d3d12 && + ! use video_cards_freedreno && + ! use video_cards_intel && + ! use video_cards_radeonsi && + ! use video_cards_v3d; then + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d" + fi + fi + + if use vaapi; then + if ! use video_cards_d3d12 && + ! use video_cards_r600 && + ! use video_cards_radeonsi && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau" + fi + fi + + if use vdpau; then + if ! use video_cards_d3d12 && + ! use video_cards_r300 && + ! use video_cards_r600 && + ! use video_cards_radeonsi && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain d3d12, r300, r600, radeonsi, or nouveau" + fi + fi + + if use xa; then + if ! use video_cards_freedreno && + ! use video_cards_nouveau && + ! use video_cards_vmware; then + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" + fi + fi + + if ! use llvm; then + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" + fi + + if use osmesa && ! use llvm; then + ewarn "OSMesa will be slow without enabling USE=llvm" + fi +} + +python_check_deps() { + python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" || return 1 + if use llvm && use vulkan && use video_cards_intel && use amd64; then + python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1 + fi +} + +pkg_setup() { + # warning message for bug 459306 + if use llvm && has_version sys-devel/llvm[!debug=]; then + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" + ewarn "detected! This can cause problems. For details, see bug 459306." + fi + + if use video_cards_intel || + use video_cards_radeonsi; then + if kernel_is -ge 5 11 3; then + CONFIG_CHECK="~KCMP" + elif kernel_is -ge 5 11; then + CONFIG_CHECK="~CHECKPOINT_RESTORE" + elif kernel_is -ge 5 10 20; then + CONFIG_CHECK="~KCMP" + else + CONFIG_CHECK="~CHECKPOINT_RESTORE" + fi + linux-info_pkg_setup + fi + + use llvm && llvm-r1_pkg_setup + python-any-r1_pkg_setup +} + +src_prepare() { + default + sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \ + bin/symbols-check.py || die # bug #830728 +} + +multilib_src_configure() { + local emesonargs=() + + local platforms + use X && platforms+="x11" + use wayland && platforms+=",wayland" + emesonargs+=(-Dplatforms=${platforms#,}) + + if use video_cards_intel || + use video_cards_r300 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau || + use video_cards_vmware; then + emesonargs+=($(meson_use d3d9 gallium-nine)) + else + emesonargs+=(-Dgallium-nine=false) + fi + + if use video_cards_d3d12 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau; then + emesonargs+=($(meson_feature vaapi gallium-va)) + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers ) + else + emesonargs+=(-Dgallium-va=disabled) + fi + + if use video_cards_d3d12; then + emesonargs+=($(meson_feature vaapi gallium-d3d12-video)) + fi + + if use video_cards_d3d12 || + use video_cards_r300 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau; then + emesonargs+=($(meson_feature vdpau gallium-vdpau)) + else + emesonargs+=(-Dgallium-vdpau=disabled) + fi + + if use video_cards_freedreno || + use video_cards_nouveau || + use video_cards_vmware; then + emesonargs+=($(meson_feature xa gallium-xa)) + else + emesonargs+=(-Dgallium-xa=disabled) + fi + + if use video_cards_freedreno || + use video_cards_lima || + use video_cards_panfrost || + use video_cards_v3d || + use video_cards_vc4 || + use video_cards_vivante; then + gallium_enable -- kmsro + fi + + gallium_enable -- swrast + gallium_enable video_cards_freedreno freedreno + gallium_enable video_cards_intel crocus i915 iris + gallium_enable video_cards_lima lima + gallium_enable video_cards_d3d12 d3d12 + gallium_enable video_cards_nouveau nouveau + gallium_enable video_cards_panfrost panfrost + gallium_enable video_cards_v3d v3d + gallium_enable video_cards_vc4 vc4 + gallium_enable video_cards_virgl virgl + gallium_enable video_cards_vivante etnaviv + gallium_enable video_cards_vmware svga + gallium_enable zink zink + + gallium_enable video_cards_r300 r300 + gallium_enable video_cards_r600 r600 + gallium_enable video_cards_radeonsi radeonsi + if ! use video_cards_r300 && \ + ! use video_cards_r600; then + gallium_enable video_cards_radeon r300 r600 + fi + + if use llvm && use opencl; then + PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig" + # See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst + emesonargs+=( + $(meson_native_true gallium-rusticl) + -Drust_std=2021 + ) + fi + + if use vulkan; then + vulkan_enable video_cards_lavapipe swrast + vulkan_enable video_cards_freedreno freedreno + vulkan_enable video_cards_intel intel intel_hasvk + vulkan_enable video_cards_d3d12 microsoft-experimental + vulkan_enable video_cards_radeonsi amd + vulkan_enable video_cards_v3d broadcom + fi + + driver_list() { + local drivers="$(sort -u <<< "${1// /$'\n'}")" + echo "${drivers//$'\n'/,}" + } + + local vulkan_layers + use vulkan && vulkan_layers+="device-select" + use vulkan-overlay && vulkan_layers+=",overlay" + emesonargs+=(-Dvulkan-layers=${vulkan_layers#,}) + + if use llvm && use vulkan && use video_cards_intel && use amd64; then + emesonargs+=(-Dintel-clc=system) + else + emesonargs+=(-Dintel-clc=disabled) + fi + + if use opengl || use gles1 || use gles2; then + emesonargs+=( + -Degl=enabled + -Dgbm=enabled + -Dglvnd=true + ) + else + emesonargs+=( + -Degl=disabled + -Dgbm=disabled + -Dglvnd=false + ) + fi + + if use opengl && use X; then + emesonargs+=(-Dglx=dri) + else + emesonargs+=(-Dglx=disabled) + fi + + emesonargs+=( + $(meson_use test build-tests) + -Dshared-glapi=enabled + -Ddri3=enabled + -Dexpat=enabled + $(meson_use opengl) + $(meson_feature gles1) + $(meson_feature gles2) + $(meson_feature llvm) + $(meson_feature lm-sensors lmsensors) + $(meson_use osmesa) + $(meson_use selinux) + $(meson_feature unwind libunwind) + $(meson_feature zstd) + $(meson_use cpu_flags_x86_sse2 sse2) + -Dvalgrind=$(usex valgrind auto disabled) + -Dvideo-codecs=$(usex proprietary-codecs "all" "all_free") + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") + -Dbuildtype=$(usex debug debug plain) + -Db_ndebug=$(usex debug false true) + ) + meson_src_configure +} + +multilib_src_test() { + meson_src_test -t 100 +} + +# $1 - VIDEO_CARDS flag (check skipped for "--") +# other args - names of DRI drivers to enable +gallium_enable() { + if [[ $1 == -- ]] || use $1; then + shift + GALLIUM_DRIVERS+=("$@") + fi +} + +vulkan_enable() { + if [[ $1 == -- ]] || use $1; then + shift + VULKAN_DRIVERS+=("$@") + fi +} diff --git a/media-libs/mesa/mesa-24.1.0_rc3.ebuild b/media-libs/mesa/mesa-24.1.0_rc3.ebuild new file mode 100644 index 000000000000..f9c4e1acfcbb --- /dev/null +++ b/media-libs/mesa/mesa-24.1.0_rc3.ebuild @@ -0,0 +1,468 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( {15..17} ) +LLVM_OPTIONAL=1 +PYTHON_COMPAT=( python3_{10..12} ) + +inherit llvm-r1 meson-multilib python-any-r1 linux-info rust-toolchain + +MY_P="${P/_/-}" + +SYN_PV=2.0.39 +PROC_MACRO2_PV=1.0.70 +QUOTE_PV=1.0.33 +UNICODE_IDENT_PV=1.0.12 +PASTE_PV=1.0.14 + +NAK_URI=" + https://github.com/dtolnay/syn/archive/refs/tags/${SYN_PV}.tar.gz -> syn-${SYN_PV}.tar.gz + https://github.com/dtolnay/proc-macro2/archive/refs/tags/${PROC_MACRO2_PV}.tar.gz -> proc-macro2-${PROC_MACRO2_PV}.tar.gz + https://github.com/dtolnay/quote/archive/refs/tags/${QUOTE_PV}.tar.gz -> quote-${QUOTE_PV}.tar.gz + https://github.com/dtolnay/unicode-ident/archive/refs/tags/${UNICODE_IDENT_PV}.tar.gz -> unicode-ident-${UNICODE_IDENT_PV}.tar.gz + https://github.com/dtolnay/paste/archive/refs/tags/${PASTE_PV}.tar.gz -> paste-${PASTE_PV}.tar.gz +" + +DESCRIPTION="OpenGL-like graphic library for Linux" +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" + SRC_URI="${NAK_URI}" + inherit git-r3 +else + SRC_URI=" + https://archive.mesa3d.org/${MY_P}.tar.xz + ${NAK_URI} + " + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris" +fi +S="${WORKDIR}/${MY_P}" +EGIT_CHECKOUT_DIR=${S} + +LICENSE="MIT SGI-B-2.0" +SLOT="0" + +RADEON_CARDS="r300 r600 radeon radeonsi" +VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau nvk panfrost v3d vc4 virgl vivante vmware" +for card in ${VIDEO_CARDS}; do + IUSE_VIDEO_CARDS+=" video_cards_${card}" +done + +IUSE="${IUSE_VIDEO_CARDS} + cpu_flags_x86_sse2 d3d9 debug +llvm + lm-sensors opencl +opengl osmesa +proprietary-codecs selinux + test unwind vaapi valgrind vdpau vulkan + vulkan-overlay wayland +X xa zink +zstd" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + d3d9? ( + || ( + video_cards_intel + video_cards_r300 + video_cards_r600 + video_cards_radeonsi + video_cards_nouveau + video_cards_vmware + ) + ) + llvm? ( ${LLVM_REQUIRED_USE} ) + vulkan-overlay? ( vulkan ) + video_cards_lavapipe? ( llvm vulkan ) + video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) ) + video_cards_r300? ( x86? ( llvm ) amd64? ( llvm ) ) + video_cards_nvk? ( vulkan video_cards_nouveau ) + vdpau? ( X ) + xa? ( X ) + zink? ( opengl vulkan ) +" + +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.119" +RDEPEND=" + >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] + >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}] + >=sys-libs/zlib-1.2.9[${MULTILIB_USEDEP}] + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) + llvm? ( + $(llvm_gen_dep " + sys-devel/llvm:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}] + opencl? ( + dev-util/spirv-llvm-translator:\${LLVM_SLOT} + sys-devel/clang:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}] + ) + ") + video_cards_r600? ( + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + video_cards_radeon? ( + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + ) + lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] ) + opencl? ( + >=virtual/opencl-3 + dev-libs/libclc[spirv(-)] + >=dev-util/spirv-tools-1.3.231.0 + virtual/libelf:0= + ) + vaapi? ( + >=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] + ) + vdpau? ( >=x11-libs/libvdpau-1.5:=[${MULTILIB_USEDEP}] ) + video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] ) + selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] ) + wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] ) + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] + X? ( + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] + >=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}] + >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] + >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}] + >=x11-libs/libxcb-1.17:=[${MULTILIB_USEDEP}] + x11-libs/libXfixes[${MULTILIB_USEDEP}] + x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}] + ) + zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) +" +for card in ${RADEON_CARDS}; do + RDEPEND="${RDEPEND} + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) + " +done +RDEPEND="${RDEPEND} + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) +" + +DEPEND="${RDEPEND} + video_cards_d3d12? ( >=dev-util/directx-headers-1.613.0[${MULTILIB_USEDEP}] ) + valgrind? ( dev-debug/valgrind ) + wayland? ( >=dev-libs/wayland-protocols-1.34 ) + X? ( + x11-libs/libXrandr[${MULTILIB_USEDEP}] + x11-base/xorg-proto + ) +" +# meson-1.4.0 contains a regression, so it fails to compile nouveau/NVK +# see https://gitlab.freedesktop.org/mesa/mesa/-/issues/10855 +BDEPEND=" + ${PYTHON_DEPS} + opencl? ( + >=virtual/rust-1.62.0 + >=dev-util/bindgen-0.58.0 + >=dev-build/meson-1.3.1 + ) + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]") + video_cards_intel? ( + ~dev-util/intel_clc-${PV} + dev-libs/libclc[spirv(-)] + $(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]") + ) + vulkan? ( + dev-util/glslang + video_cards_nvk? ( + >=dev-util/bindgen-0.68.1 + >=dev-util/cbindgen-0.26.0 + >=virtual/rust-1.74.1 + <dev-build/meson-1.4.0 + ) + ) + wayland? ( dev-util/wayland-scanner ) +" + +QA_WX_LOAD=" +x86? ( + usr/lib/libglapi.so.0.0.0 + usr/lib/libOSMesa.so.8.0.0 + usr/lib/libGLX_mesa.so.0.0.0 +)" + +src_unpack() { + [[ ${PV} == 9999 ]] && git-r3_src_unpack + unpack ${A} +} + +pkg_pretend() { + if use vulkan; then + if ! use video_cards_d3d12 && + ! use video_cards_freedreno && + ! use video_cards_intel && + ! use video_cards_radeonsi && + ! use video_cards_v3d && + ! use video_cards_nvk; then + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, v3d, or nvk" + fi + fi + + if use vaapi; then + if ! use video_cards_d3d12 && + ! use video_cards_r600 && + ! use video_cards_radeonsi && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau" + fi + fi + + if use vdpau; then + if ! use video_cards_d3d12 && + ! use video_cards_r300 && + ! use video_cards_r600 && + ! use video_cards_radeonsi && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain d3d12, r300, r600, radeonsi, or nouveau" + fi + fi + + if use xa; then + if ! use video_cards_freedreno && + ! use video_cards_nouveau && + ! use video_cards_vmware; then + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" + fi + fi + + if ! use llvm; then + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" + fi + + if use osmesa && ! use llvm; then + ewarn "OSMesa will be slow without enabling USE=llvm" + fi +} + +python_check_deps() { + python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" || return 1 + if use llvm && use vulkan && use video_cards_intel && use amd64; then + python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1 + fi +} + +pkg_setup() { + # warning message for bug 459306 + if use llvm && has_version sys-devel/llvm[!debug=]; then + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" + ewarn "detected! This can cause problems. For details, see bug 459306." + fi + + if use video_cards_intel || + use video_cards_radeonsi; then + if kernel_is -ge 5 11 3; then + CONFIG_CHECK="~KCMP" + elif kernel_is -ge 5 11; then + CONFIG_CHECK="~CHECKPOINT_RESTORE" + elif kernel_is -ge 5 10 20; then + CONFIG_CHECK="~KCMP" + else + CONFIG_CHECK="~CHECKPOINT_RESTORE" + fi + linux-info_pkg_setup + fi + + use llvm && llvm-r1_pkg_setup + python-any-r1_pkg_setup +} + +src_prepare() { + default + sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \ + bin/symbols-check.py || die # bug #830728 + + if use video_cards_nvk; then + # NVK Subproject Handling + pushd "${S}" >/dev/null || die + for subpkg in proc-macro2-${PROC_MACRO2_PV} syn-${SYN_PV} quote-${QUOTE_PV} unicode-ident-${UNICODE_IDENT_PV} paste-${PASTE_PV}; do + # copy subprojects folder + cp -r ../${subpkg} subprojects || die + # copy meson.build + cp subprojects/packagefiles/${subpkg%-*}/meson.build subprojects/${subpkg} || die + # ovewrite subpkg version when needed + sed -i -e "s/directory = \S\+/directory = ${subpkg}/" subprojects/${subpkg%-*}.wrap || die + done + popd >/dev/null || die + fi +} + +multilib_src_configure() { + local emesonargs=() + + local platforms + use X && platforms+="x11" + use wayland && platforms+=",wayland" + emesonargs+=(-Dplatforms=${platforms#,}) + + if use video_cards_intel || + use video_cards_r300 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau || + use video_cards_vmware; then + emesonargs+=($(meson_use d3d9 gallium-nine)) + else + emesonargs+=(-Dgallium-nine=false) + fi + + if use video_cards_d3d12 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau; then + emesonargs+=($(meson_feature vaapi gallium-va)) + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers ) + else + emesonargs+=(-Dgallium-va=disabled) + fi + + if use video_cards_d3d12; then + emesonargs+=($(meson_feature vaapi gallium-d3d12-video)) + fi + + if use video_cards_d3d12 || + use video_cards_r300 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau; then + emesonargs+=($(meson_feature vdpau gallium-vdpau)) + else + emesonargs+=(-Dgallium-vdpau=disabled) + fi + + if use video_cards_freedreno || + use video_cards_nouveau || + use video_cards_vmware; then + emesonargs+=($(meson_feature xa gallium-xa)) + else + emesonargs+=(-Dgallium-xa=disabled) + fi + + if use video_cards_freedreno || + use video_cards_lima || + use video_cards_panfrost || + use video_cards_v3d || + use video_cards_vc4 || + use video_cards_vivante; then + gallium_enable -- kmsro + fi + + gallium_enable -- swrast + gallium_enable video_cards_freedreno freedreno + gallium_enable video_cards_intel crocus i915 iris + gallium_enable video_cards_lima lima + gallium_enable video_cards_d3d12 d3d12 + gallium_enable video_cards_nouveau nouveau + gallium_enable video_cards_panfrost panfrost + gallium_enable video_cards_v3d v3d + gallium_enable video_cards_vc4 vc4 + gallium_enable video_cards_virgl virgl + gallium_enable video_cards_vivante etnaviv + gallium_enable video_cards_vmware svga + gallium_enable zink zink + + gallium_enable video_cards_r300 r300 + gallium_enable video_cards_r600 r600 + gallium_enable video_cards_radeonsi radeonsi + if ! use video_cards_r300 && \ + ! use video_cards_r600; then + gallium_enable video_cards_radeon r300 r600 + fi + + if use llvm && use opencl; then + PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig" + # See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst + emesonargs+=( + $(meson_native_true gallium-rusticl) + -Drust_std=2021 + ) + fi + + if use vulkan; then + vulkan_enable video_cards_lavapipe swrast + vulkan_enable video_cards_freedreno freedreno + vulkan_enable video_cards_intel intel intel_hasvk + vulkan_enable video_cards_d3d12 microsoft-experimental + vulkan_enable video_cards_radeonsi amd + vulkan_enable video_cards_v3d broadcom + if use video_cards_nvk; then + vulkan_enable video_cards_nvk nouveau + if ! multilib_is_native_abi; then + echo -e "[binaries]\nrust = ['rustc', '--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini" + emesonargs+=( + --native-file "${T}"/rust_fix.ini + ) + fi + fi + fi + + driver_list() { + local drivers="$(sort -u <<< "${1// /$'\n'}")" + echo "${drivers//$'\n'/,}" + } + + local vulkan_layers + use vulkan && vulkan_layers+="device-select" + use vulkan-overlay && vulkan_layers+=",overlay" + emesonargs+=(-Dvulkan-layers=${vulkan_layers#,}) + + if use opengl && use X; then + emesonargs+=(-Dglx=dri) + else + emesonargs+=(-Dglx=disabled) + fi + + use debug && EMESON_BUILDTYPE=debug + + emesonargs+=( + $(meson_use test build-tests) + -Dshared-glapi=enabled + -Ddri3=enabled + -Dexpat=enabled + $(meson_use opengl) + $(meson_feature opengl gbm) + $(meson_feature opengl gles1) + $(meson_feature opengl gles2) + $(meson_feature opengl glvnd) + $(meson_feature opengl egl) + $(meson_feature llvm) + $(meson_feature lm-sensors lmsensors) + $(meson_use osmesa) + $(meson_use selinux) + $(meson_feature unwind libunwind) + $(meson_native_use_feature video_cards_intel intel-rt) + $(meson_feature zstd) + $(meson_use cpu_flags_x86_sse2 sse2) + -Dintel-clc=$(usex video_cards_intel system auto) + -Dvalgrind=$(usex valgrind auto disabled) + -Dvideo-codecs=$(usex proprietary-codecs "all" "all_free") + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") + -Db_ndebug=$(usex debug false true) + ) + meson_src_configure + + if ! multilib_is_native_abi && use video_cards_nvk; then + sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' build.ninja || die + fi +} + +multilib_src_test() { + meson_src_test -t 100 +} + +# $1 - VIDEO_CARDS flag (check skipped for "--") +# other args - names of DRI drivers to enable +gallium_enable() { + if [[ $1 == -- ]] || use $1; then + shift + GALLIUM_DRIVERS+=("$@") + fi +} + +vulkan_enable() { + if [[ $1 == -- ]] || use $1; then + shift + VULKAN_DRIVERS+=("$@") + fi +} diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild index a25510a044f3..f9c4e1acfcbb 100644 --- a/media-libs/mesa/mesa-9999.ebuild +++ b/media-libs/mesa/mesa-9999.ebuild @@ -7,18 +7,36 @@ LLVM_COMPAT=( {15..17} ) LLVM_OPTIONAL=1 PYTHON_COMPAT=( python3_{10..12} ) -inherit llvm-r1 meson-multilib python-any-r1 linux-info +inherit llvm-r1 meson-multilib python-any-r1 linux-info rust-toolchain MY_P="${P/_/-}" +SYN_PV=2.0.39 +PROC_MACRO2_PV=1.0.70 +QUOTE_PV=1.0.33 +UNICODE_IDENT_PV=1.0.12 +PASTE_PV=1.0.14 + +NAK_URI=" + https://github.com/dtolnay/syn/archive/refs/tags/${SYN_PV}.tar.gz -> syn-${SYN_PV}.tar.gz + https://github.com/dtolnay/proc-macro2/archive/refs/tags/${PROC_MACRO2_PV}.tar.gz -> proc-macro2-${PROC_MACRO2_PV}.tar.gz + https://github.com/dtolnay/quote/archive/refs/tags/${QUOTE_PV}.tar.gz -> quote-${QUOTE_PV}.tar.gz + https://github.com/dtolnay/unicode-ident/archive/refs/tags/${UNICODE_IDENT_PV}.tar.gz -> unicode-ident-${UNICODE_IDENT_PV}.tar.gz + https://github.com/dtolnay/paste/archive/refs/tags/${PASTE_PV}.tar.gz -> paste-${PASTE_PV}.tar.gz +" + DESCRIPTION="OpenGL-like graphic library for Linux" HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" + SRC_URI="${NAK_URI}" inherit git-r3 else - SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz" + SRC_URI=" + https://archive.mesa3d.org/${MY_P}.tar.xz + ${NAK_URI} + " KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris" fi S="${WORKDIR}/${MY_P}" @@ -28,7 +46,7 @@ LICENSE="MIT SGI-B-2.0" SLOT="0" RADEON_CARDS="r300 r600 radeon radeonsi" -VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau panfrost v3d vc4 virgl vivante vmware" +VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau nvk panfrost v3d vc4 virgl vivante vmware" for card in ${VIDEO_CARDS}; do IUSE_VIDEO_CARDS+=" video_cards_${card}" done @@ -55,6 +73,7 @@ REQUIRED_USE=" video_cards_lavapipe? ( llvm vulkan ) video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) ) video_cards_r300? ( x86? ( llvm ) amd64? ( llvm ) ) + video_cards_nvk? ( vulkan video_cards_nouveau ) vdpau? ( X ) xa? ( X ) zink? ( opengl vulkan ) @@ -126,6 +145,8 @@ DEPEND="${RDEPEND} x11-base/xorg-proto ) " +# meson-1.4.0 contains a regression, so it fails to compile nouveau/NVK +# see https://gitlab.freedesktop.org/mesa/mesa/-/issues/10855 BDEPEND=" ${PYTHON_DEPS} opencl? ( @@ -142,7 +163,15 @@ BDEPEND=" dev-libs/libclc[spirv(-)] $(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]") ) - vulkan? ( dev-util/glslang ) + vulkan? ( + dev-util/glslang + video_cards_nvk? ( + >=dev-util/bindgen-0.68.1 + >=dev-util/cbindgen-0.26.0 + >=virtual/rust-1.74.1 + <dev-build/meson-1.4.0 + ) + ) wayland? ( dev-util/wayland-scanner ) " @@ -153,14 +182,20 @@ x86? ( usr/lib/libGLX_mesa.so.0.0.0 )" +src_unpack() { + [[ ${PV} == 9999 ]] && git-r3_src_unpack + unpack ${A} +} + pkg_pretend() { if use vulkan; then if ! use video_cards_d3d12 && ! use video_cards_freedreno && ! use video_cards_intel && ! use video_cards_radeonsi && - ! use video_cards_v3d; then - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d" + ! use video_cards_v3d && + ! use video_cards_nvk; then + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, v3d, or nvk" fi fi @@ -236,6 +271,20 @@ src_prepare() { default sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \ bin/symbols-check.py || die # bug #830728 + + if use video_cards_nvk; then + # NVK Subproject Handling + pushd "${S}" >/dev/null || die + for subpkg in proc-macro2-${PROC_MACRO2_PV} syn-${SYN_PV} quote-${QUOTE_PV} unicode-ident-${UNICODE_IDENT_PV} paste-${PASTE_PV}; do + # copy subprojects folder + cp -r ../${subpkg} subprojects || die + # copy meson.build + cp subprojects/packagefiles/${subpkg%-*}/meson.build subprojects/${subpkg} || die + # ovewrite subpkg version when needed + sed -i -e "s/directory = \S\+/directory = ${subpkg}/" subprojects/${subpkg%-*}.wrap || die + done + popd >/dev/null || die + fi } multilib_src_configure() { @@ -336,6 +385,15 @@ multilib_src_configure() { vulkan_enable video_cards_d3d12 microsoft-experimental vulkan_enable video_cards_radeonsi amd vulkan_enable video_cards_v3d broadcom + if use video_cards_nvk; then + vulkan_enable video_cards_nvk nouveau + if ! multilib_is_native_abi; then + echo -e "[binaries]\nrust = ['rustc', '--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini" + emesonargs+=( + --native-file "${T}"/rust_fix.ini + ) + fi + fi fi driver_list() { @@ -383,6 +441,10 @@ multilib_src_configure() { -Db_ndebug=$(usex debug false true) ) meson_src_configure + + if ! multilib_is_native_abi && use video_cards_nvk; then + sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' build.ninja || die + fi } multilib_src_test() { |