summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@gentoo.org>2024-08-25 02:30:56 -0400
committerEli Schwartz <eschwartz@gentoo.org>2024-08-25 16:23:23 -0400
commit45a465608ea72d3de1aa22b6d250873251751aeb (patch)
tree563a9df50472fb1c25471213755e790fb459600c
parentnet-vpn/i2pd: drop i2p-hardening USE flag (diff)
downloadgentoo-45a465608ea72d3de1aa22b6d250873251751aeb.tar.gz
gentoo-45a465608ea72d3de1aa22b6d250873251751aeb.tar.bz2
gentoo-45a465608ea72d3de1aa22b6d250873251751aeb.zip
dev-qt/qtbase: prevent automagically building against gtk[X,wayland]
e.g. the upstream code checks whether GDK_WINDOWING_WAYLAND is defined by the gtk headers, and if so will compile against the wayland symbols it provides. This means that qtbase built on a system with gtk+[-wayland] will be compatible with anything, but when built on a system with gtk+[wayland], requires that at runtime. It's only needed, of course, by the qgtk3 platformtheme plugin which not necessarily everyone builds, wants, or uses at runtime :) but still. We can solve this with a (new) gentoo-specific macro that hides the GTK implementations when we don't want it. This is gated on our existing USE flags for wayland/X support. Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
-rw-r--r--dev-qt/qtbase/qtbase-6.7.2-r4.ebuild (renamed from dev-qt/qtbase/qtbase-6.7.2-r3.ebuild)11
-rw-r--r--dev-qt/qtbase/qtbase-6.7.9999.ebuild11
-rw-r--r--dev-qt/qtbase/qtbase-6.8.9999.ebuild11
-rw-r--r--dev-qt/qtbase/qtbase-6.9999.ebuild11
4 files changed, 36 insertions, 8 deletions
diff --git a/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild b/dev-qt/qtbase/qtbase-6.7.2-r4.ebuild
index 2782f8186d06..e7e909a26a94 100644
--- a/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.2-r4.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit qt6-build toolchain-funcs
+inherit flag-o-matic qt6-build toolchain-funcs
DESCRIPTION="Cross-platform application development framework"
@@ -99,7 +99,7 @@ COMMON_DEPEND="
cups? ( net-print/cups )
gtk? (
x11-libs/gdk-pixbuf:2
- x11-libs/gtk+:3
+ >=x11-libs/gtk+-3.24.41-r1:3[X?,wayland?]
x11-libs/pango
)
)
@@ -170,6 +170,13 @@ src_prepare() {
}
src_configure() {
+ # The only component that uses gdk backends is the qgtk3 platformtheme plugin
+ if use gtk; then
+ # defang automagic dependencies
+ use wayland || append-cxxflags -DGENTOO_GTK_HIDE_WAYLAND
+ use X || append-cxxflags -DGENTOO_GTK_HIDE_X11
+ fi
+
local mycmakeargs=(
-DBUILD_WITH_PCH=OFF
diff --git a/dev-qt/qtbase/qtbase-6.7.9999.ebuild b/dev-qt/qtbase/qtbase-6.7.9999.ebuild
index e4a66f7137f8..580f9e80474a 100644
--- a/dev-qt/qtbase/qtbase-6.7.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.9999.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit qt6-build toolchain-funcs
+inherit flag-o-matic qt6-build toolchain-funcs
DESCRIPTION="Cross-platform application development framework"
@@ -99,7 +99,7 @@ COMMON_DEPEND="
cups? ( net-print/cups )
gtk? (
x11-libs/gdk-pixbuf:2
- x11-libs/gtk+:3
+ >=x11-libs/gtk+-3.24.41-r1:3[X?,wayland?]
x11-libs/pango
)
)
@@ -166,6 +166,13 @@ src_prepare() {
}
src_configure() {
+ # The only component that uses gdk backends is the qgtk3 platformtheme plugin
+ if use gtk; then
+ # defang automagic dependencies
+ use wayland || append-cxxflags -DGENTOO_GTK_HIDE_WAYLAND
+ use X || append-cxxflags -DGENTOO_GTK_HIDE_X11
+ fi
+
local mycmakeargs=(
-DBUILD_WITH_PCH=OFF
diff --git a/dev-qt/qtbase/qtbase-6.8.9999.ebuild b/dev-qt/qtbase/qtbase-6.8.9999.ebuild
index 9af015d9b088..1381d70d7a19 100644
--- a/dev-qt/qtbase/qtbase-6.8.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.8.9999.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit qt6-build toolchain-funcs
+inherit flag-o-matic qt6-build toolchain-funcs
DESCRIPTION="Cross-platform application development framework"
@@ -99,7 +99,7 @@ COMMON_DEPEND="
cups? ( net-print/cups )
gtk? (
x11-libs/gdk-pixbuf:2
- x11-libs/gtk+:3
+ >=x11-libs/gtk+-3.24.41-r1:3[X?,wayland?]
x11-libs/pango
)
)
@@ -166,6 +166,13 @@ src_prepare() {
}
src_configure() {
+ # The only component that uses gdk backends is the qgtk3 platformtheme plugin
+ if use gtk; then
+ # defang automagic dependencies
+ use wayland || append-cxxflags -DGENTOO_GTK_HIDE_WAYLAND
+ use X || append-cxxflags -DGENTOO_GTK_HIDE_X11
+ fi
+
local mycmakeargs=(
-DBUILD_WITH_PCH=OFF
diff --git a/dev-qt/qtbase/qtbase-6.9999.ebuild b/dev-qt/qtbase/qtbase-6.9999.ebuild
index 9af015d9b088..1381d70d7a19 100644
--- a/dev-qt/qtbase/qtbase-6.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.9999.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit qt6-build toolchain-funcs
+inherit flag-o-matic qt6-build toolchain-funcs
DESCRIPTION="Cross-platform application development framework"
@@ -99,7 +99,7 @@ COMMON_DEPEND="
cups? ( net-print/cups )
gtk? (
x11-libs/gdk-pixbuf:2
- x11-libs/gtk+:3
+ >=x11-libs/gtk+-3.24.41-r1:3[X?,wayland?]
x11-libs/pango
)
)
@@ -166,6 +166,13 @@ src_prepare() {
}
src_configure() {
+ # The only component that uses gdk backends is the qgtk3 platformtheme plugin
+ if use gtk; then
+ # defang automagic dependencies
+ use wayland || append-cxxflags -DGENTOO_GTK_HIDE_WAYLAND
+ use X || append-cxxflags -DGENTOO_GTK_HIDE_X11
+ fi
+
local mycmakeargs=(
-DBUILD_WITH_PCH=OFF