summaryrefslogtreecommitdiff
path: root/dev-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/gtkmm/files/MR-101.patch58
-rw-r--r--dev-cpp/gtkmm/gtkmm-4.20.0-r1.ebuild57
2 files changed, 115 insertions, 0 deletions
diff --git a/dev-cpp/gtkmm/files/MR-101.patch b/dev-cpp/gtkmm/files/MR-101.patch
new file mode 100644
index 000000000000..fd371fd88563
--- /dev/null
+++ b/dev-cpp/gtkmm/files/MR-101.patch
@@ -0,0 +1,58 @@
+From 98a9ffcaa6b40f32c202830eb90327f4a5dcf8ec Mon Sep 17 00:00:00 2001
+From: Lukas Schmelting <lschmelting@posteo.com>
+Date: Mon, 13 Jul 2026 23:37:21 +0200
+Subject: [PATCH] meson: Don't export Vulkan as an installed dependency
+
+The Vulkan dependency added in 1b5149eab addressed builds where GTK was
+built with Vulkan support but the Vulkan SDK was discovered by Meson's
+native dependency lookup instead of pkg-config. In that configuration
+GTK headers may include Vulkan headers, so gtkmm needs the Vulkan
+include path during its build.
+
+However, adding `vulkan_dep` to the exported dependency objects also
+records Vulkan in the installed pkg-config metadata. The resulting
+gtkmm-4.0.pc contains a private dependency on Vulkan, requiring
+consumers to resolve `vulkan.pc` even though gtkmm's installed interface
+does not expose Vulkan.
+
+Build environments where Vulkan headers are available to GTK but
+Vulkan's pkg-config metadata is not installed are affected by this. In
+particular, this was observed in Gentoo, where gtkmm consumers failed to
+configure because pkg-config could not resolve the Vulkan dependency
+from gtkmm-4.0.pc.
+
+Use a partial dependency containing only compile arguments for the
+library targets, and avoid exporting Vulkan through the installed
+dependency metadata.
+
+This retains the Vulkan include path handling needed when building gtkmm
+against GTK builds with Vulkan support, while avoiding a Vulkan
+dependency for gtkmm consumers.
+---
+ meson.build | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index dea3af35..c6da14af 100644
+--- a/meson.build
++++ b/meson.build
+@@ -150,6 +150,7 @@ epoxy_dep = dependency('epoxy', version: epoxy_req, required: build_demos)
+ # to use a custom path for the Vulkan SDK. Bugs that are found with it should
+ # be reported upstream and fixed.
+ vulkan_dep = dependency('vulkan', required: false)
++vulkan_compile_dep = vulkan_dep.partial_dependency(compile_args: true)
+
+ # The -mm libraries do not yet have pkg-config files for MSVC builds,
+ # so check for them manually
+@@ -163,7 +164,7 @@ gmmproc_dir = glibmm_dep.get_variable('gmmprocdir')
+
+ gmmproc_extra_m4_dirs = [pangomm_dep.get_variable('gmmprocm4dir')]
+
+-gdkmm_build_dep = [giomm_dep, gtk_dep, cairomm_dep, pangomm_dep, gdk_pixbuf_dep, vulkan_dep]
++gdkmm_build_dep = [giomm_dep, gtk_dep, cairomm_dep, pangomm_dep, gdk_pixbuf_dep, vulkan_compile_dep]
+ gskmm_build_dep = gdkmm_build_dep
+ gtkmm_build_dep = gdkmm_build_dep
+
+--
+GitLab
+
diff --git a/dev-cpp/gtkmm/gtkmm-4.20.0-r1.ebuild b/dev-cpp/gtkmm/gtkmm-4.20.0-r1.ebuild
new file mode 100644
index 000000000000..493c3157bcf0
--- /dev/null
+++ b/dev-cpp/gtkmm/gtkmm-4.20.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{13..14} )
+inherit gnome.org meson python-any-r1 virtualx
+
+DESCRIPTION="C++ interface for GTK+"
+HOMEPAGE="https://gtkmm.gnome.org/en/index.html"
+
+LICENSE="LGPL-2.1+"
+SLOT="4.0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="gtk-doc test vulkan"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/MR-101.patch
+)
+
+RDEPEND="
+ >=dev-cpp/glibmm-2.75.0:2.68[gtk-doc?]
+ >=gui-libs/gtk-4.19.4:4[vulkan?]
+ >=dev-cpp/cairomm-1.15.4:1.16[gtk-doc?]
+ >=dev-cpp/pangomm-2.50.0:2.48[gtk-doc?]
+ >=x11-libs/gdk-pixbuf-2.35.5:2
+ >=media-libs/libepoxy-1.2
+ vulkan? ( media-libs/vulkan-loader )
+"
+DEPEND="
+ ${RDEPEND}
+ gtk-doc? ( dev-libs/libsigc++:3 )
+"
+BDEPEND="
+ virtual/pkgconfig
+ gtk-doc? (
+ app-text/doxygen[dot]
+ dev-lang/perl
+ dev-libs/libxslt
+ )
+ ${PYTHON_DEPS}
+"
+
+src_configure() {
+ local emesonargs=(
+ -Dbuild-demos=false
+ $(meson_use gtk-doc build-documentation)
+ $(meson_use test build-tests)
+ )
+ meson_src_configure
+}
+
+src_test() {
+ virtx meson_src_test
+}