diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2022-11-06 09:25:38 -0500 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2022-11-07 14:27:57 -0500 |
commit | e83d63df26c90d786e09ef271b8a51f0c66db3a7 (patch) | |
tree | 5ffe58ac35dce06ed3097fe50a407ae511d837e6 /media-libs | |
parent | media-libs/libplacebo: build fixes for stable (diff) | |
download | gentoo-e83d63df26c90d786e09ef271b8a51f0c66db3a7.tar.gz gentoo-e83d63df26c90d786e09ef271b8a51f0c66db3a7.tar.bz2 gentoo-e83d63df26c90d786e09ef271b8a51f0c66db3a7.zip |
media-libs/libplacebo: sync live
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/libplacebo/libplacebo-9999.ebuild | 93 |
1 files changed, 56 insertions, 37 deletions
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 } |