logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: a1b3ad53734557996003730722841525e8527c22
parent 7c933590efb984c90029f10b2457e8abbed3ebe2
Author: Gentoo Authors <root@gentoo.org>
Date:   Sun, 14 Mar 2021 01:23:38 +0100

media-libs/libplacebo: Import from ::gentoo

Diffstat:

Amedia-libs/libplacebo/Manifest3+++
Amedia-libs/libplacebo/files/libplacebo-2.43.0-vulkan-headers-1.2.140-compatibility.patch59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amedia-libs/libplacebo/libplacebo-2.43.0.ebuild64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amedia-libs/libplacebo/libplacebo-2.43.1.ebuild64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amedia-libs/libplacebo/libplacebo-2.72.2.ebuild77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amedia-libs/libplacebo/libplacebo-9999.ebuild78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amedia-libs/libplacebo/metadata.xml21+++++++++++++++++++++
Mx11-libs/gtk+/Manifest2+-
Rx11-libs/gtk+/gtk+-3.24.26.ebuild -> x11-libs/gtk+/gtk+-3.24.27.ebuild0
Dx11-libs/gtk+/gtk+-3.98.5.ebuild172-------------------------------------------------------------------------------
Ax11-libs/gtk+/gtk+-4.0.1.ebuild172+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11 files changed, 539 insertions(+), 173 deletions(-)

diff --git a/media-libs/libplacebo/Manifest b/media-libs/libplacebo/Manifest @@ -0,0 +1,3 @@ +DIST libplacebo-v2.43.0.tar.gz 356219 BLAKE2B b5f36dc4b7a0b35a47efc64064d0d7e9cf023dea2974fe355d29a6c835efa67b6f50ec500fa3ce50b932fef5d035a470f0adc8377cd274c5904fb4ffc303bb0c SHA512 c57463a9fcde1b259620fcb7ce6470b0d06e45ed837b4eca35ff0931e4c440ef613590485119ed21237f9cf3c3cdb617253f17699d9d252070f30d5dcbc233ab +DIST libplacebo-v2.43.1.tar.gz 356913 BLAKE2B 1fbda35bcdaf96ebfb20a05bcec35fc03168def2a5fbf3aa4861187a67409d3b9ae28169de2cb6fa9a78e40a1d073982e58c7e36ac9468b5c7c227ef0bb0f96c SHA512 62463dfee6e6fd450395e42d7af2b6e0caa0b183c0d00f5ba0c5ddc893a47cdd0371d37fc72a7361228324b0dc9c55dd0309a5a7210cf753618fde18a094abcb +DIST libplacebo-v2.72.2.tar.gz 398314 BLAKE2B 59ce83d23c22fa1bc10d82b01b531ee82e3e40bf062adf7ea1d276a65c683c448797348a7a9ce234f92e0fd6c699903ae70f15df5d2e2779bec32db6b0b769e6 SHA512 0cb100350dbc81566a8363b0265bf89de8569b0313d1f1aa8ba621e39d7ee43a47ec9ab7827d01fdd2133c357983002412e67c2b2ba3616bd570f16e8e3ba135 diff --git a/media-libs/libplacebo/files/libplacebo-2.43.0-vulkan-headers-1.2.140-compatibility.patch b/media-libs/libplacebo/files/libplacebo-2.43.0-vulkan-headers-1.2.140-compatibility.patch @@ -0,0 +1,59 @@ +From 45e19e7bbbbfceb197d8826c775e16ef536a4565 Mon Sep 17 00:00:00 2001 +From: Niklas Haas <git@haasn.xyz> +Date: Tue, 5 May 2020 00:13:49 +0200 +Subject: [PATCH] vulkan: get rid of deprecated enum members + +Maybe we should just get rid of the switch coverage check altogether. I +wish we could somehow differentiate between enums defined in our code +and enums defined externally. + +Fixes #71. +--- + src/vulkan/context.c | 4 +++- + src/vulkan/swapchain.c | 7 +------ + 2 files changed, 4 insertions(+), 7 deletions(-) + +diff --git a/src/vulkan/context.c b/src/vulkan/context.c +index 10928a9..14a57cf 100644 +--- a/src/vulkan/context.c ++++ b/src/vulkan/context.c +@@ -685,7 +685,6 @@ VkPhysicalDevice pl_vulkan_choose_device(struct pl_context *ctx, + [VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU] = {"virtual", 3}, + [VK_PHYSICAL_DEVICE_TYPE_CPU] = {"software", 2}, + [VK_PHYSICAL_DEVICE_TYPE_OTHER] = {"other", 1}, +- [VK_PHYSICAL_DEVICE_TYPE_END_RANGE+1] = {0}, + }; + + int best = 0; +@@ -693,6 +692,9 @@ VkPhysicalDevice pl_vulkan_choose_device(struct pl_context *ctx, + VkPhysicalDeviceProperties props = {0}; + GetPhysicalDeviceProperties(devices[i], &props); + VkPhysicalDeviceType t = props.deviceType; ++ if (t > PL_ARRAY_SIZE(types)) ++ continue; ++ + PL_INFO(vk, " GPU %d: %s (%s)", i, props.deviceName, types[t].name); + + if (params->surface) { +diff --git a/src/vulkan/swapchain.c b/src/vulkan/swapchain.c +index bf6fd54..6bf40dd 100644 +--- a/src/vulkan/swapchain.c ++++ b/src/vulkan/swapchain.c +@@ -138,13 +138,8 @@ static bool vk_map_color_space(VkColorSpaceKHR space, struct pl_color_space *out + return false; + #endif + +- // Included to satisfy the switch coverage check +- case VK_COLOR_SPACE_RANGE_SIZE_KHR: +- case VK_COLOR_SPACE_MAX_ENUM_KHR: +- break; ++ default: return false; + } +- +- return false; + } + + static bool pick_surf_format(const struct pl_gpu *gpu, const struct vk_ctx *vk, +-- +2.27.0 + diff --git a/media-libs/libplacebo/libplacebo-2.43.0.ebuild b/media-libs/libplacebo/libplacebo-2.43.0.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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" + S="${WORKDIR}/${PN}-v${PV}" +fi + +inherit meson multilib-minimal + +DESCRIPTION="Reusable library for GPU-accelerated image processing primitives" +HOMEPAGE="https://code.videolan.org/videolan/libplacebo" + +LICENSE="LGPL-2.1+" +SLOT="0/$(ver_cut 2)" # libplacebo.so version +IUSE="glslang lcms +opengl +shaderc test +vulkan" +REQUIRED_USE="vulkan? ( || ( glslang shaderc ) )" + +RDEPEND="glslang? ( dev-util/glslang[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2[${MULTILIB_USEDEP}] ) + opengl? ( media-libs/libepoxy[${MULTILIB_USEDEP}] ) + shaderc? ( >=media-libs/shaderc-2017.2[${MULTILIB_USEDEP}] ) + vulkan? ( + dev-util/vulkan-headers + media-libs/vulkan-loader[${MULTILIB_USEDEP}] + )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${P}-vulkan-headers-1.2.140-compatibility.patch +) + +multilib_src_configure() { + local emesonargs=( + $(meson_feature glslang) + $(meson_feature lcms) + $(meson_feature opengl) + $(meson_feature shaderc) + $(meson_feature vulkan) + $(meson_use test tests) + ) + meson_src_configure +} + +multilib_src_compile() { + meson_src_compile +} + +multilib_src_test() { + meson_src_test -t 10 +} + +multilib_src_install() { + meson_src_install +} diff --git a/media-libs/libplacebo/libplacebo-2.43.1.ebuild b/media-libs/libplacebo/libplacebo-2.43.1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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" + S="${WORKDIR}/${PN}-v${PV}" +fi + +inherit meson multilib-minimal + +DESCRIPTION="Reusable library for GPU-accelerated image processing primitives" +HOMEPAGE="https://code.videolan.org/videolan/libplacebo" + +LICENSE="LGPL-2.1+" +SLOT="0/$(ver_cut 2)" # libplacebo.so version +IUSE="glslang lcms +opengl +shaderc test +vulkan" +REQUIRED_USE="vulkan? ( || ( glslang shaderc ) )" + +RDEPEND="glslang? ( dev-util/glslang[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2[${MULTILIB_USEDEP}] ) + opengl? ( media-libs/libepoxy[${MULTILIB_USEDEP}] ) + shaderc? ( >=media-libs/shaderc-2017.2[${MULTILIB_USEDEP}] ) + vulkan? ( + dev-util/vulkan-headers + media-libs/vulkan-loader[${MULTILIB_USEDEP}] + )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/libplacebo-2.43.0-vulkan-headers-1.2.140-compatibility.patch +) + +multilib_src_configure() { + local emesonargs=( + $(meson_feature glslang) + $(meson_feature lcms) + $(meson_feature opengl) + $(meson_feature shaderc) + $(meson_feature vulkan) + $(meson_use test tests) + ) + meson_src_configure +} + +multilib_src_compile() { + meson_src_compile +} + +multilib_src_test() { + meson_src_test -t 10 +} + +multilib_src_install() { + meson_src_install +} diff --git a/media-libs/libplacebo/libplacebo-2.72.2.ebuild b/media-libs/libplacebo/libplacebo-2.72.2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_REQ_USE="xml" +PYTHON_COMPAT=( python3_{7,8,9} ) + +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" + S="${WORKDIR}/${PN}-v${PV}" +fi + +inherit meson multilib-minimal python-any-r1 + +DESCRIPTION="Reusable library for GPU-accelerated image processing primitives" +HOMEPAGE="https://code.videolan.org/videolan/libplacebo" + +LICENSE="LGPL-2.1+" +SLOT="0/$(ver_cut 2)" # libplacebo.so version +IUSE="glslang lcms +opengl +shaderc test +vulkan" +REQUIRED_USE="vulkan? ( || ( glslang shaderc ) )" +RESTRICT="!test? ( test )" + +RDEPEND="glslang? ( dev-util/glslang[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2[${MULTILIB_USEDEP}] ) + opengl? ( media-libs/libepoxy[${MULTILIB_USEDEP}] ) + shaderc? ( >=media-libs/shaderc-2017.2[${MULTILIB_USEDEP}] ) + vulkan? ( + dev-util/vulkan-headers + media-libs/vulkan-loader[${MULTILIB_USEDEP}] + )" +DEPEND="${RDEPEND}" + +BDEPEND="virtual/pkgconfig + vulkan? ( + ${PYTHON_DEPS} + $(python_gen_any_dep 'dev-python/mako[${PYTHON_USEDEP}]') + )" + +python_check_deps() { + has_version -b "dev-python/mako[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use vulkan && python-any-r1_pkg_setup +} + +multilib_src_configure() { + local emesonargs=( + $(meson_feature glslang) + $(meson_feature lcms) + $(meson_feature opengl) + $(meson_feature shaderc) + $(meson_feature vulkan) + $(meson_use test tests) + # hard-code path from dev-util/vulkan-headers + -Dvulkan-registry=/usr/share/vulkan/registry/vk.xml + ) + meson_src_configure +} + +multilib_src_compile() { + meson_src_compile +} + +multilib_src_test() { + meson_src_test -t 10 +} + +multilib_src_install() { + meson_src_install +} diff --git a/media-libs/libplacebo/libplacebo-9999.ebuild b/media-libs/libplacebo/libplacebo-9999.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_REQ_USE="xml" +PYTHON_COMPAT=( python3_{7,8,9} ) + +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" + S="${WORKDIR}/${PN}-v${PV}" +fi + +inherit meson multilib-minimal python-any-r1 + +DESCRIPTION="Reusable library for GPU-accelerated image processing primitives" +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" +IUSE="glslang lcms +opengl +shaderc test +vulkan" +REQUIRED_USE="vulkan? ( || ( glslang shaderc ) )" +RESTRICT="!test? ( test )" + +RDEPEND="glslang? ( dev-util/glslang[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2[${MULTILIB_USEDEP}] ) + opengl? ( media-libs/libepoxy[${MULTILIB_USEDEP}] ) + shaderc? ( >=media-libs/shaderc-2017.2[${MULTILIB_USEDEP}] ) + vulkan? ( + dev-util/vulkan-headers + media-libs/vulkan-loader[${MULTILIB_USEDEP}] + )" +DEPEND="${RDEPEND}" + +BDEPEND="virtual/pkgconfig + vulkan? ( + ${PYTHON_DEPS} + $(python_gen_any_dep 'dev-python/mako[${PYTHON_USEDEP}]') + )" + +python_check_deps() { + has_version -b "dev-python/mako[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use vulkan && python-any-r1_pkg_setup +} + +multilib_src_configure() { + local emesonargs=( + $(meson_feature glslang) + $(meson_feature lcms) + $(meson_feature opengl) + $(meson_feature shaderc) + $(meson_feature vulkan) + $(meson_use test tests) + # hard-code path from dev-util/vulkan-headers + -Dvulkan-registry=/usr/share/vulkan/registry/vk.xml + ) + meson_src_configure +} + +multilib_src_compile() { + meson_src_compile +} + +multilib_src_test() { + meson_src_test -t 10 +} + +multilib_src_install() { + meson_src_install +} diff --git a/media-libs/libplacebo/metadata.xml b/media-libs/libplacebo/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gentoo@haasn.xyz</email> + <name>Niklas Haas</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Gentoo Proxy Maintainers Project</name> + </maintainer> + <use> + <flag name="glslang">Use <pkg>dev-util/glslang</pkg> to compile GLSL</flag> + <flag name="lcms">Add support for color management via <pkg>media-libs/lcms</pkg></flag> + <flag name="shaderc">Use <pkg>media-libs/shaderc</pkg> to compile GLSL</flag> + <flag name="vulkan">Add support for the vulkan graphics API</flag> + </use> + <upstream> + <bugs-to>https://code.videolan.org/videolan/libplacebo/issues</bugs-to> + </upstream> +</pkgmetadata> diff --git a/x11-libs/gtk+/Manifest b/x11-libs/gtk+/Manifest @@ -1,2 +1,2 @@ DIST gtk+-3.24.26.tar.xz 21404732 BLAKE2B 8260b684b4d508af6b9a5060e47847254ae6bf647ae1dfa131bdbb35f2eaeb3f45ba749e9ad6e1920c05dab660d78424e38d974070928c56e91fc422a62d87db SHA512 d3023e9cd0c1f0de384266c4bd4549a7006ff475de82617de16378617a4a669645ad355cbabfe2ff43b19dddfbba7b9413ec98c14ed0f5ee3a61466b3d6eff76 -DIST gtk-3.98.5.tar.xz 18827724 BLAKE2B 4e37920b92edd3ae5af1e976dfe10aae4fd4819b410291b801f9d60a84b4d4b4945411a1773491e48fdf3378bfe01a4d1662fc66e03807c90f33c919d5aac07f SHA512 6bd0068ac504a92999eaa18934769adbd5fd39134bc8239728cc30633f44a8b59dc26d074e3d6932f8c1ce7c5e1adcb7db6c4556150505ac62f833161648fb20 +DIST gtk-4.0.1.tar.xz 19511708 BLAKE2B 5fa221e55a6580434e473a7052d3f7c0e5b60b4331688f05aa681eb43830ce5e25f640c24076b5fe024096dcc98fae541f47b0b19d1e3c857cf498bf66ac34e2 SHA512 cab50b5bcf1a6bfdd5245c908e813330b9173531c49fdd63f9b5618f5329ddf2560f0a3548f61bba55dea6d816e57681d4e59941cfc50cf430544d3ebcd90aad diff --git a/x11-libs/gtk+/gtk+-3.24.26.ebuild b/x11-libs/gtk+/gtk+-3.24.27.ebuild diff --git a/x11-libs/gtk+/gtk+-3.98.5.ebuild b/x11-libs/gtk+/gtk+-3.98.5.ebuild @@ -1,172 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -GNOME_ORG_MODULE="gtk" - -inherit meson gnome2 multilib virtualx multilib-minimal - -DESCRIPTION="Gimp ToolKit +" -HOMEPAGE="https://www.gtk.org/" - -LICENSE="LGPL-2+" -SLOT="4" -IUSE="broadway colord cups cloudprint cloudproviders examples ffmpeg +gstreamer gtk-doc +introspection test vim-syntax wayland +X xinerama tracker3 vulkan profiler" -REQUIRED_USE=" - || ( wayland X ) - xinerama? ( X ) -" - -KEYWORDS="~amd64" - -# Upstream wants us to do their job: -# https://bugzilla.gnome.org/show_bug.cgi?id=768662#c1 -RESTRICT="test" - -BDEPEND=" - >=dev-util/meson-0.54.2 - dev-lang/sassc - dev-util/gdbus-codegen - sys-apps/diffutils - dev-libs/libxslt -" - -# gstreamer-player-1.0.pc => media-libs/gst-plugins-bad -DEPEND=" - >=dev-libs/glib-2.63.1:2[${MULTILIB_USEDEP}] - >=x11-libs/pango-1.45.0[introspection?,${MULTILIB_USEDEP}] - >=dev-libs/fribidi-0.19.7[${MULTILIB_USEDEP}] - >=dev-libs/atk-2.15.1[introspection?,${MULTILIB_USEDEP}] - >=x11-libs/cairo-1.14[glib,svg,X?,${MULTILIB_USEDEP}] - >=x11-libs/gdk-pixbuf-2.30:2[introspection?,${MULTILIB_USEDEP}] - >=media-libs/graphene-1.9.1[${MULTILIB_USEDEP}] - >=media-libs/libepoxy-1.4[X(+)?,${MULTILIB_USEDEP}] - introspection? ( >=dev-libs/gobject-introspection-1.39:= ) - wayland? ( - >=dev-libs/wayland-protocols-1.20 - >=dev-libs/wayland-1.14.91[${MULTILIB_USEDEP}] - >=x11-libs/libxkbcommon-0.2[${MULTILIB_USEDEP}] - ) - >=media-libs/harfbuzz-0.9:= - app-text/iso-codes - tracker3? ( >=app-misc/tracker-3.0 ) - X? ( - >=x11-libs/libXrandr-1.5[${MULTILIB_USEDEP}] - x11-libs/libX11[${MULTILIB_USEDEP}] - x11-libs/libXrender[${MULTILIB_USEDEP}] - x11-libs/libXi[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - x11-libs/libXcursor[${MULTILIB_USEDEP}] - x11-libs/libXdamage[${MULTILIB_USEDEP}] - x11-libs/libXfixes[${MULTILIB_USEDEP}] - x11-libs/libXcomposite[${MULTILIB_USEDEP}] - media-libs/fontconfig[${MULTILIB_USEDEP}] - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) - ) - vulkan? ( - media-libs/vulkan-loader - media-libs/shaderc - ) - cloudproviders? ( dev-libs/libcloudproviders ) - profiler? ( dev-util/sysprof-capture ) - - ffmpeg? ( media-video/ffmpeg:= ) - - gstreamer? ( >=media-libs/gst-plugins-bad-1.12.3 ) - - cups? ( net-print/cups ) - cloudprint? ( - net-libs/rest:0.7 - dev-libs/json-glib - ) - colord? ( >=x11-misc/colord-0.1.9 ) -" - -src_prepare() { - gnome2_src_prepare -} - -multilib_src_configure() { - local emesonargs=( - $(meson_use X x11-backend) - $(meson_use wayland wayland-backend) - $(meson_use broadway broadway-backend) - - -Dvulkan=$(usex vulkan) - -Dxinerama=$(usex xinerama) - $(meson_use cloudproviders) - $(meson_use profiler) - $(meson_use tracker3) - - -Dprint-backends=file,lpr$(usex cups ,cups '')$(usex cloudprint ,cloudprint '') - -Dcolord=$(usex colord) - ) - - if use ffmpeg && use gstreamer; then - emesonargs+=( -Dmedia=ffmpeg,gstreamer ) - elif use ffmpeg; then - emesonargs+=( -Dmedia=ffmpeg ) - elif use gstreamer; then - emesonargs+=( -Dmedia=gstreamer ) - else - emesonargs+=( -Dmedia=none ) - fi - - meson_src_configure -} - -multilib_src_test() { - meson_src_test -} - -multilib_src_install() { - meson_src_install -} - -multilib_src_install_all() { - DOCS=( NEWS CONTRIBUTING.md README.md ) - einstalldocs -} - -pkg_preinst() { - gnome2_pkg_preinst - - multilib_pkg_preinst() { - # Make immodules.cache belongs to gtk+ alone - local cache="usr/$(get_libdir)/gtk-4.0/4.0.0/immodules.cache" - - if [[ -e ${EROOT}${cache} ]]; then - cp "${EROOT}"${cache} "${ED}"/${cache} || die - else - touch "${ED}"/${cache} || die - fi - } - multilib_parallel_foreach_abi multilib_pkg_preinst -} - -pkg_postinst() { - gnome2_pkg_postinst - - multilib_pkg_postinst() { - gnome2_query_immodules_gtk3 \ - || die "Update immodules cache failed (for ${ABI})" - } - multilib_parallel_foreach_abi multilib_pkg_postinst - - if ! has_version "app-text/evince"; then - elog "Please install app-text/evince for print preview functionality." - elog "Alternatively, check \"gtk-print-preview-command\" documentation and" - elog "add it to your settings.ini file." - fi -} - -pkg_postrm() { - gnome2_pkg_postrm - - if [[ -z ${REPLACED_BY_VERSION} ]]; then - multilib_pkg_postrm() { - rm -f "${EROOT}"usr/$(get_libdir)/gtk-4.0/4.0.0/immodules.cache - } - multilib_foreach_abi multilib_pkg_postrm - fi -} diff --git a/x11-libs/gtk+/gtk+-4.0.1.ebuild b/x11-libs/gtk+/gtk+-4.0.1.ebuild @@ -0,0 +1,172 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +GNOME_ORG_MODULE="gtk" + +inherit meson gnome2 multilib virtualx multilib-minimal + +DESCRIPTION="Gimp ToolKit +" +HOMEPAGE="https://www.gtk.org/" + +LICENSE="LGPL-2+" +SLOT="4" +IUSE="broadway colord cups cloudprint cloudproviders examples ffmpeg +gstreamer gtk-doc +introspection test vim-syntax wayland +X xinerama tracker3 vulkan profiler" +REQUIRED_USE=" + || ( wayland X ) + xinerama? ( X ) +" + +KEYWORDS="~amd64" + +# Upstream wants us to do their job: +# https://bugzilla.gnome.org/show_bug.cgi?id=768662#c1 +RESTRICT="test" + +BDEPEND=" + >=dev-util/meson-0.54.2 + dev-lang/sassc + dev-util/gdbus-codegen + sys-apps/diffutils + dev-libs/libxslt +" + +# gstreamer-player-1.0.pc => media-libs/gst-plugins-bad +DEPEND=" + >=dev-libs/glib-2.66.0:2[${MULTILIB_USEDEP}] + >=x11-libs/pango-1.45.0[introspection?,${MULTILIB_USEDEP}] + >=dev-libs/fribidi-0.19.7[${MULTILIB_USEDEP}] + >=dev-libs/atk-2.15.1[introspection?,${MULTILIB_USEDEP}] + >=x11-libs/cairo-1.14[glib,svg,X?,${MULTILIB_USEDEP}] + >=x11-libs/gdk-pixbuf-2.30:2[introspection?,${MULTILIB_USEDEP}] + >=media-libs/graphene-1.9.1[${MULTILIB_USEDEP}] + >=media-libs/libepoxy-1.4[X(+)?,${MULTILIB_USEDEP}] + introspection? ( >=dev-libs/gobject-introspection-1.39:= ) + wayland? ( + >=dev-libs/wayland-protocols-1.20 + >=dev-libs/wayland-1.14.91[${MULTILIB_USEDEP}] + >=x11-libs/libxkbcommon-0.2[${MULTILIB_USEDEP}] + ) + >=media-libs/harfbuzz-0.9:= + app-text/iso-codes + tracker3? ( >=app-misc/tracker-3.0 ) + X? ( + >=x11-libs/libXrandr-1.5[${MULTILIB_USEDEP}] + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXrender[${MULTILIB_USEDEP}] + x11-libs/libXi[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXcursor[${MULTILIB_USEDEP}] + x11-libs/libXdamage[${MULTILIB_USEDEP}] + x11-libs/libXfixes[${MULTILIB_USEDEP}] + x11-libs/libXcomposite[${MULTILIB_USEDEP}] + media-libs/fontconfig[${MULTILIB_USEDEP}] + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) + ) + vulkan? ( + media-libs/vulkan-loader + media-libs/shaderc + ) + cloudproviders? ( dev-libs/libcloudproviders ) + profiler? ( dev-util/sysprof-capture ) + + ffmpeg? ( media-video/ffmpeg:= ) + + gstreamer? ( >=media-libs/gst-plugins-bad-1.12.3 ) + + cups? ( net-print/cups ) + cloudprint? ( + net-libs/rest:0.7 + dev-libs/json-glib + ) + colord? ( >=x11-misc/colord-0.1.9 ) +" + +src_prepare() { + gnome2_src_prepare +} + +multilib_src_configure() { + local emesonargs=( + $(meson_use X x11-backend) + $(meson_use wayland wayland-backend) + $(meson_use broadway broadway-backend) + + $(meson_feature vulkan) + $(meson_feature xinerama) + $(meson_feature cloudproviders) + $(meson_use profiler) + $(meson_use tracker3) + + -Dprint-backends=file,lpr$(usex cups ,cups '')$(usex cloudprint ,cloudprint '') + $(meson_feature colord) + ) + + if use ffmpeg && use gstreamer; then + emesonargs+=( -Dmedia=ffmpeg,gstreamer ) + elif use ffmpeg; then + emesonargs+=( -Dmedia=ffmpeg ) + elif use gstreamer; then + emesonargs+=( -Dmedia=gstreamer ) + else + emesonargs+=( -Dmedia=none ) + fi + + meson_src_configure +} + +multilib_src_test() { + meson_src_test +} + +multilib_src_install() { + meson_src_install +} + +multilib_src_install_all() { + DOCS=( NEWS CONTRIBUTING.md README.md ) + einstalldocs +} + +pkg_preinst() { + gnome2_pkg_preinst + + multilib_pkg_preinst() { + # Make immodules.cache belongs to gtk+ alone + local cache="usr/$(get_libdir)/gtk-4.0/4.0.0/immodules.cache" + + if [[ -e ${EROOT}${cache} ]]; then + cp "${EROOT}"${cache} "${ED}"/${cache} || die + else + touch "${ED}"/${cache} || die + fi + } + multilib_parallel_foreach_abi multilib_pkg_preinst +} + +pkg_postinst() { + gnome2_pkg_postinst + + multilib_pkg_postinst() { + gnome2_query_immodules_gtk3 \ + || die "Update immodules cache failed (for ${ABI})" + } + multilib_parallel_foreach_abi multilib_pkg_postinst + + if ! has_version "app-text/evince"; then + elog "Please install app-text/evince for print preview functionality." + elog "Alternatively, check \"gtk-print-preview-command\" documentation and" + elog "add it to your settings.ini file." + fi +} + +pkg_postrm() { + gnome2_pkg_postrm + + if [[ -z ${REPLACED_BY_VERSION} ]]; then + multilib_pkg_postrm() { + rm -f "${EROOT}"usr/$(get_libdir)/gtk-4.0/4.0.0/immodules.cache + } + multilib_foreach_abi multilib_pkg_postrm + fi +}