diff options
Diffstat (limited to 'media-libs/libplacebo')
-rw-r--r-- | media-libs/libplacebo/Manifest | 11 | ||||
-rw-r--r-- | media-libs/libplacebo/files/libplacebo-4.192.1-python-executable.patch | 8 | ||||
-rw-r--r-- | media-libs/libplacebo/files/libplacebo-5.229.1-llvm-libunwind.patch | 9 | ||||
-rw-r--r-- | media-libs/libplacebo/files/libplacebo-5.229.1-python-executable.patch | 11 | ||||
-rw-r--r-- | media-libs/libplacebo/files/libplacebo-5.229.1-shared-glslang.patch | 12 | ||||
-rw-r--r-- | media-libs/libplacebo/libplacebo-4.192.1-r2.ebuild (renamed from media-libs/libplacebo/libplacebo-4.192.1-r1.ebuild) | 16 | ||||
-rw-r--r-- | media-libs/libplacebo/libplacebo-5.229.1.ebuild | 91 | ||||
-rw-r--r-- | media-libs/libplacebo/libplacebo-9999.ebuild | 93 |
8 files changed, 208 insertions, 43 deletions
diff --git a/media-libs/libplacebo/Manifest b/media-libs/libplacebo/Manifest index 532304cc2e9a..9b4222e0dd7e 100644 --- a/media-libs/libplacebo/Manifest +++ b/media-libs/libplacebo/Manifest @@ -1,5 +1,12 @@ AUX libplacebo-2.72.2-fix-vulkan-undeclared.patch 963 BLAKE2B 3b6944af02eb6078dc5224309e3af4b65a4681e29701622e95166a4156d3eecd6e671fc2b4acec633340c0582afc96419b2a7a170de1b7976b04c880a1d4672a SHA512 4154e1ec3f06b08628444ba36fcdd4bac48b06ef8d0caf689a2fe3fb3e48ed7d1e4cc3f568401025174235e1ce1359eb4f010047aee99cfe7e0fa20c4cfa01c5 +AUX libplacebo-4.192.1-python-executable.patch 266 BLAKE2B 23146785355b86440974d5017f7a1f0766d65b937153755ddf4f6785ab835232f5b2f363279a8df332333c2ef9de9bfef8ff7acaf70cec892f54c87283a5b7df SHA512 ad3a07536731b2c454ad342c0db330e13fe12f61b5fce76b49be643d3bba3297bd53723d7bc34898346cbbc481d59437b1a65f56225790824eedca7ee81606c6 +AUX libplacebo-5.229.1-llvm-libunwind.patch 418 BLAKE2B 0042bc6404de57fbbb814ebc91bb51ee5a6bb279a960af81bd2bc71b9eb092c0ee183e31614a892d26508516dd550837a6d5c8038512e8f8e899cddf1236f600 SHA512 b6a40675f0ea5b6e36fb47b56e08dc1ec7425ff8193dfd92aeccd3830da91b77410b9f5792b233b630bdd7422993d6d0f22b82761e29d17336357bb47c89bc48 +AUX libplacebo-5.229.1-python-executable.patch 400 BLAKE2B 1de79b031d4aa7c55e058db788d2ba3ed6a66e58dac325a091b40be58b95e6cbacf852a0f1e84465d2834ecd07aa920390b90a81e03c3e21825eb0ed56c2b68f SHA512 5b8c1f5856b1e0cf67a306fc7b3fce552f26c4e8d785a2a0570b1ea983d487cd235fb9bed10f86747597f19d2b2d9a920b19a88acf3e48d44aeaa999849cff76 +AUX libplacebo-5.229.1-shared-glslang.patch 678 BLAKE2B ff1dff5e3009f165091cc17e1cfbd7fb3ed90763e96a437b791486c27b75b8d5c308ab9d9704777071fc0483c2b0f6e48cc9a91c22b6296a12a184f6f6e0e27c SHA512 ec345ac50603d1b77dcc939e87534eaec735bd3dae81579e92c90b8dafa20970b14a1afc2785fe8f7121398f6b81b34bfe0d4d5c1a1727a131e0442c4f9e2da1 +DIST libplacebo-glad-2.0.2.tar.gz 581059 BLAKE2B ce7f63ac1f9a6263d3de3f9c56f4a47b8bbdd1ac7eba875c7ad807ae923c8a82d7f323725af8b64adbbc30c2e014c6a5ed8b3325b7f15984222075874a68c0cf SHA512 c719bcd7a0aaa56d89158c9f347410b9e66466fb957a5a5f201b4cce21a0c1589d6d2a866e12134ed43435a5567d842fbfd134559dea1ca59a34b079ff6f5d37 DIST libplacebo-v4.192.1.tar.gz 632762 BLAKE2B 19a3bee6f05632cde1739fe8c861c96035a7b1f5ed2af6bbc67776529551c88f5da63d49dede2d7ee2c8d96edd6faf733e0371714028b72eddcf4c4cf23b937f SHA512 780dff60a31a9c7fff47522385235077cc6b1a38be32bc0276c090d89ce25754dd0b910db5be631d0065337fe4700f68adabee06f48a4935d422f09f2e0e5525 -EBUILD libplacebo-4.192.1-r1.ebuild 1925 BLAKE2B 06454edc71bba48d1b074d4023d67faab3d03150b822ee2675ac1a837290bbf4cce686fb54f81ca0e98194e9b1e7d13730d4412ce6acd2faacee34445f978dcc SHA512 ca847e8c66e44acf97c27e27eed30005770bbe7cc2a0f585da314177fd8fe6c3be238d2748ed7bf1fa1a02a7108cb582fa038f5a9379a856c0ca3fff3e96ac23 -EBUILD libplacebo-9999.ebuild 1895 BLAKE2B 15b4a593deae2f103299def490173b2d2cd3a76dfacf37bc54492a12ddbf1873297b4b5ff8b8e6e895ba4f8fb568b5a435114c132568c9dd2a90bbfcd5229be0 SHA512 2de178da7be187146a9f6d6ba0854b43ac1917ef69e3ab4957284e89c6c1625d98279d01fa2e78dfa7236800b7d80b05c96838856312199c8184282bcd76133d +DIST libplacebo-v5.229.1.tar.gz 673121 BLAKE2B 0a59e16b4565b10b222c5a5a8e607670bd4010a2be9b99ebdc15638827fcaf21bbf3c16a3cd2b902bcef43041dec56441494a0f618094e14db8f99a9d314c621 SHA512 45efb252d5d44e5429790f9024b1b2a153051d6d604b07fcf3e4de7d49a2e91d20457be76e08b3b9ab43248c4a2e7268c9f8dc69837783e572f9b8735c955334 +EBUILD libplacebo-4.192.1-r2.ebuild 2333 BLAKE2B e3c2735e64a54f34c83b14d425e8c99170e9d8048bd02ae1b4fc44e676b8fe1e03d92bcfbc7d353186a98387c0609d767bfe118d2e64e54baba577fe58b7071f SHA512 49008898a94dd60fd96a9489dca9421c2d3d6a34bcc3a9b8dd953707a4f7a6a7534112a4cd4bc339b637317590c8329b210eb8310924f3bb945a806f884536b7 +EBUILD libplacebo-5.229.1.ebuild 2646 BLAKE2B 72410323371e7f3c6e1b389262d1e0c6f5e06a5b07ee58909b4e7db5a3793d8f6590585a9a24c5db14ab989d7a73b414a0622e93c0e50214f0956e2375e05d13 SHA512 a3307baf16783b55a91aec207461f88bfdfeb25d05454456213e22b9cc74a1bd4263d000288c98b260c8929ecb7e7cd667f3583e38b8be275b86748677e57ea5 +EBUILD libplacebo-9999.ebuild 2646 BLAKE2B 72410323371e7f3c6e1b389262d1e0c6f5e06a5b07ee58909b4e7db5a3793d8f6590585a9a24c5db14ab989d7a73b414a0622e93c0e50214f0956e2375e05d13 SHA512 a3307baf16783b55a91aec207461f88bfdfeb25d05454456213e22b9cc74a1bd4263d000288c98b260c8929ecb7e7cd667f3583e38b8be275b86748677e57ea5 MISC metadata.xml 678 BLAKE2B 7b4c70ba3d89a81182905365354eaac312888c492a33e2d7b410c79139af9680aeac65c2dc6b692410e601c9bba13c4ff16f80c48c2d9accc3d5d1f82be5395f SHA512 64cd5d5d2231ed1bf6298f074d56471bf158ea29fdac3c4d7f1e54b7259e4ce294b6c1ed31b1397fad952224e9211778bdb59dd33c429870fd58ab9931ab0677 diff --git a/media-libs/libplacebo/files/libplacebo-4.192.1-python-executable.patch b/media-libs/libplacebo/files/libplacebo-4.192.1-python-executable.patch new file mode 100644 index 000000000000..8fbad683e397 --- /dev/null +++ b/media-libs/libplacebo/files/libplacebo-4.192.1-python-executable.patch @@ -0,0 +1,8 @@ +https://bugs.gentoo.org/731728 +--- a/src/meson.build ++++ b/src/meson.build +@@ -9,3 +9,3 @@ + # Dependencies +-prog_python = import('python').find_installation() ++prog_python = import('python').find_installation('python3') + libm = cc.find_library('m', required: false) diff --git a/media-libs/libplacebo/files/libplacebo-5.229.1-llvm-libunwind.patch b/media-libs/libplacebo/files/libplacebo-5.229.1-llvm-libunwind.patch new file mode 100644 index 000000000000..a1f0aaa2b806 --- /dev/null +++ b/media-libs/libplacebo/files/libplacebo-5.229.1-llvm-libunwind.patch @@ -0,0 +1,9 @@ +llvm-libunwind does not have cmake nor pkg-config files, not great +but switch to cc.find for simplicity with meson feature-type options +--- a/src/meson.build ++++ b/src/meson.build +@@ -1,3 +1,3 @@ + ### Common dependencies +-unwind = dependency('libunwind', required: get_option('unwind')) ++unwind = cc.find_library('libunwind', required: get_option('unwind')) + libexecinfo = cc.find_library('execinfo', required: false) diff --git a/media-libs/libplacebo/files/libplacebo-5.229.1-python-executable.patch b/media-libs/libplacebo/files/libplacebo-5.229.1-python-executable.patch new file mode 100644 index 000000000000..35486262c992 --- /dev/null +++ b/media-libs/libplacebo/files/libplacebo-5.229.1-python-executable.patch @@ -0,0 +1,11 @@ +Upstream bundles python deps and uses same interpreter as meson, +but we don't and need this to use the eclass' python3 instead. + +https://bugs.gentoo.org/731728 +--- a/meson.build ++++ b/meson.build +@@ -323,3 +323,3 @@ + thirdparty = meson.project_source_root()/'3rdparty' +-python = import('python').find_installation() ++python = import('python').find_installation('python3') + python_env = environment() diff --git a/media-libs/libplacebo/files/libplacebo-5.229.1-shared-glslang.patch b/media-libs/libplacebo/files/libplacebo-5.229.1-shared-glslang.patch new file mode 100644 index 000000000000..14ce1f6972c0 --- /dev/null +++ b/media-libs/libplacebo/files/libplacebo-5.229.1-shared-glslang.patch @@ -0,0 +1,12 @@ +OSDependent and OGLCompiler are already included in the shared libglslang, +and glslang-1.3.231 normally does not install these with shared builds. +--- a/src/glsl/meson.build ++++ b/src/glsl/meson.build +@@ -21,5 +21,5 @@ + cxx.find_library('MachineIndependent', required: false), +- cxx.find_library('OSDependent', required: glslang_req), ++ cxx.find_library('OSDependent', required: false), + cxx.find_library('HLSL', required: glslang_req), +- cxx.find_library('OGLCompiler', required: glslang_req), ++ cxx.find_library('OGLCompiler', required: false), + cxx.find_library('GenericCodeGen', required: false), diff --git a/media-libs/libplacebo/libplacebo-4.192.1-r1.ebuild b/media-libs/libplacebo/libplacebo-4.192.1-r2.ebuild index c047cd32fdf8..96e2470a8d31 100644 --- a/media-libs/libplacebo/libplacebo-4.192.1-r1.ebuild +++ b/media-libs/libplacebo/libplacebo-4.192.1-r2.ebuild @@ -26,11 +26,15 @@ IUSE="glslang lcms +opengl +shaderc test unwind +vulkan" REQUIRED_USE="vulkan? ( || ( glslang shaderc ) )" RESTRICT="!test? ( test )" -RDEPEND="glslang? ( dev-util/glslang[${MULTILIB_USEDEP}] ) +# Build broken with newer glslang due to struct TBuiltInResource changes +# (also breaks ABI wrt https://github.com/KhronosGroup/glslang/issues/3052). +# Fixed in next libplacebo version, but this older one is needed for stable +# mpv. Note glslang can be disabled, shaderc provides same functionality. +RDEPEND="glslang? ( <dev-util/glslang-1.3.231:=[${MULTILIB_USEDEP}] ) lcms? ( media-libs/lcms:2[${MULTILIB_USEDEP}] ) opengl? ( media-libs/libepoxy[${MULTILIB_USEDEP}] ) shaderc? ( >=media-libs/shaderc-2017.2[${MULTILIB_USEDEP}] ) - unwind? ( sys-libs/libunwind:= ) + unwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] ) vulkan? ( dev-util/vulkan-headers media-libs/vulkan-loader[${MULTILIB_USEDEP}] @@ -43,7 +47,10 @@ BDEPEND="virtual/pkgconfig $(python_gen_any_dep 'dev-python/mako[${PYTHON_USEDEP}]') )" -PATCHES=( "${FILESDIR}"/libplacebo-2.72.2-fix-vulkan-undeclared.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-2.72.2-fix-vulkan-undeclared.patch + "${FILESDIR}"/${P}-python-executable.patch +) python_check_deps() { has_version -b "dev-python/mako[${PYTHON_USEDEP}]" @@ -55,6 +62,7 @@ pkg_setup() { multilib_src_configure() { local emesonargs=( + -Ddemos=false #851927 $(meson_feature glslang) $(meson_feature lcms) $(meson_feature opengl) @@ -63,7 +71,7 @@ multilib_src_configure() { $(meson_feature vulkan) $(meson_use test tests) # hard-code path from dev-util/vulkan-headers - -Dvulkan-registry=/usr/share/vulkan/registry/vk.xml + -Dvulkan-registry="${ESYSROOT}"/usr/share/vulkan/registry/vk.xml ) meson_src_configure } diff --git a/media-libs/libplacebo/libplacebo-5.229.1.ebuild b/media-libs/libplacebo/libplacebo-5.229.1.ebuild new file mode 100644 index 000000000000..305607263956 --- /dev/null +++ b/media-libs/libplacebo/libplacebo-5.229.1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +inherit meson-multilib python-any-r1 + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://code.videolan.org/videolan/libplacebo.git" + inherit git-r3 +else + GLAD_PV=2.0.2 + SRC_URI=" + https://code.videolan.org/videolan/libplacebo/-/archive/v${PV}/libplacebo-v${PV}.tar.gz + opengl? ( https://github.com/Dav1dde/glad/archive/refs/tags/v${GLAD_PV}.tar.gz -> ${PN}-glad-${GLAD_PV}.tar.gz )" + S="${WORKDIR}/${PN}-v${PV}" + KEYWORDS="~amd64 ~ppc64 ~x86" +fi + +DESCRIPTION="Reusable library for GPU-accelerated image processing primitives" +HOMEPAGE="https://code.videolan.org/videolan/libplacebo/" + +LICENSE="LGPL-2.1+ opengl? ( MIT )" +SLOT="0/$(ver_cut 2 ${PV}.9999)" # soname +IUSE="glslang lcms llvm-libunwind +opengl +shaderc test unwind +vulkan" +RESTRICT="!test? ( test )" +REQUIRED_USE="vulkan? ( || ( glslang shaderc ) )" + +# libglvnd is used with dlopen() through glad (inc. egl/gles) +RDEPEND=" + lcms? ( media-libs/lcms:2[${MULTILIB_USEDEP}] ) + opengl? ( media-libs/libglvnd[${MULTILIB_USEDEP}] ) + shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] ) + !shaderc? ( glslang? ( dev-util/glslang:=[${MULTILIB_USEDEP}] ) ) + unwind? ( + llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] ) + !llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] ) + ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )" +DEPEND=" + ${RDEPEND} + vulkan? ( dev-util/vulkan-headers )" +BDEPEND=" + virtual/pkgconfig + vulkan? ( $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.229.1-llvm-libunwind.patch + "${FILESDIR}"/${PN}-5.229.1-python-executable.patch + "${FILESDIR}"/${PN}-5.229.1-shared-glslang.patch +) + +python_check_deps() { + python_has_version "dev-python/jinja[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use vulkan && python-any-r1_pkg_setup +} + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + local EGIT_SUBMODULES=( $(usev opengl 3rdparty/glad) ) + git-r3_src_unpack + else + default + if use opengl; then + rmdir "${S}"/3rdparty/glad || die + mv glad-${GLAD_PV} "${S}"/3rdparty/glad || die + fi + fi +} + +multilib_src_configure() { + local emesonargs=( + -Ddemos=false #851927 + $(meson_use test tests) + $(meson_feature lcms) + $(meson_feature opengl) + $(meson_feature opengl gl-proc-addr) + $(meson_feature shaderc) + $(usex shaderc -Dglslang=disabled $(meson_feature glslang)) + $(meson_feature unwind) + $(meson_feature vulkan) + $(meson_feature vulkan vk-proc-addr) + -Dvulkan-registry="${ESYSROOT}"/usr/share/vulkan/registry/vk.xml + ) + + meson_src_configure +} diff --git a/media-libs/libplacebo/libplacebo-9999.ebuild b/media-libs/libplacebo/libplacebo-9999.ebuild index 72d2114b55cb..305607263956 100644 --- a/media-libs/libplacebo/libplacebo-9999.ebuild +++ b/media-libs/libplacebo/libplacebo-9999.ebuild @@ -1,72 +1,91 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_REQ_USE="xml(+)" -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{8..11} ) +inherit meson-multilib python-any-r1 -if [[ "${PV}" == "9999" ]]; then +if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://code.videolan.org/videolan/libplacebo.git" inherit git-r3 else - KEYWORDS="~amd64 ~ppc64 ~x86" - SRC_URI="https://code.videolan.org/videolan/libplacebo/-/archive/v${PV}/libplacebo-v${PV}.tar.gz" + GLAD_PV=2.0.2 + SRC_URI=" + https://code.videolan.org/videolan/libplacebo/-/archive/v${PV}/libplacebo-v${PV}.tar.gz + opengl? ( https://github.com/Dav1dde/glad/archive/refs/tags/v${GLAD_PV}.tar.gz -> ${PN}-glad-${GLAD_PV}.tar.gz )" S="${WORKDIR}/${PN}-v${PV}" + KEYWORDS="~amd64 ~ppc64 ~x86" fi -inherit meson-multilib python-any-r1 - DESCRIPTION="Reusable library for GPU-accelerated image processing primitives" -HOMEPAGE="https://code.videolan.org/videolan/libplacebo" +HOMEPAGE="https://code.videolan.org/videolan/libplacebo/" -LICENSE="LGPL-2.1+" -# Please add a sub-slot for releases depending on libplacebo.so version -SLOT="0/9999" -IUSE="glslang lcms +opengl +shaderc test unwind +vulkan" -REQUIRED_USE="vulkan? ( || ( glslang shaderc ) )" +LICENSE="LGPL-2.1+ opengl? ( MIT )" +SLOT="0/$(ver_cut 2 ${PV}.9999)" # soname +IUSE="glslang lcms llvm-libunwind +opengl +shaderc test unwind +vulkan" RESTRICT="!test? ( test )" +REQUIRED_USE="vulkan? ( || ( glslang shaderc ) )" -RDEPEND="glslang? ( dev-util/glslang[${MULTILIB_USEDEP}] ) +# libglvnd is used with dlopen() through glad (inc. egl/gles) +RDEPEND=" lcms? ( media-libs/lcms:2[${MULTILIB_USEDEP}] ) - opengl? ( media-libs/libepoxy[${MULTILIB_USEDEP}] ) - shaderc? ( >=media-libs/shaderc-2017.2[${MULTILIB_USEDEP}] ) - unwind? ( sys-libs/libunwind:= ) - vulkan? ( - dev-util/vulkan-headers - media-libs/vulkan-loader[${MULTILIB_USEDEP}] - )" -DEPEND="${RDEPEND}" + opengl? ( media-libs/libglvnd[${MULTILIB_USEDEP}] ) + shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] ) + !shaderc? ( glslang? ( dev-util/glslang:=[${MULTILIB_USEDEP}] ) ) + unwind? ( + llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] ) + !llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] ) + ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )" +DEPEND=" + ${RDEPEND} + vulkan? ( dev-util/vulkan-headers )" +BDEPEND=" + virtual/pkgconfig + vulkan? ( $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') )" -BDEPEND="virtual/pkgconfig - vulkan? ( - ${PYTHON_DEPS} - $(python_gen_any_dep 'dev-python/mako[${PYTHON_USEDEP}]') - )" +PATCHES=( + "${FILESDIR}"/${PN}-5.229.1-llvm-libunwind.patch + "${FILESDIR}"/${PN}-5.229.1-python-executable.patch + "${FILESDIR}"/${PN}-5.229.1-shared-glslang.patch +) python_check_deps() { - has_version -b "dev-python/mako[${PYTHON_USEDEP}]" + python_has_version "dev-python/jinja[${PYTHON_USEDEP}]" } pkg_setup() { use vulkan && python-any-r1_pkg_setup } +src_unpack() { + if [[ ${PV} == 9999 ]]; then + local EGIT_SUBMODULES=( $(usev opengl 3rdparty/glad) ) + git-r3_src_unpack + else + default + if use opengl; then + rmdir "${S}"/3rdparty/glad || die + mv glad-${GLAD_PV} "${S}"/3rdparty/glad || die + fi + fi +} + multilib_src_configure() { local emesonargs=( - $(meson_feature glslang) + -Ddemos=false #851927 + $(meson_use test tests) $(meson_feature lcms) $(meson_feature opengl) + $(meson_feature opengl gl-proc-addr) $(meson_feature shaderc) + $(usex shaderc -Dglslang=disabled $(meson_feature glslang)) $(meson_feature unwind) $(meson_feature vulkan) - $(meson_use test tests) - # hard-code path from dev-util/vulkan-headers - -Dvulkan-registry=/usr/share/vulkan/registry/vk.xml + $(meson_feature vulkan vk-proc-addr) + -Dvulkan-registry="${ESYSROOT}"/usr/share/vulkan/registry/vk.xml ) - meson_src_configure -} -multilib_src_test() { - meson_src_test -t 10 + meson_src_configure } |