commit:     241d63ed27f32ba09a8699651b6ce06b84155f48
Author:     Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Wed Jan  1 21:10:02 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Jan  8 06:32:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=241d63ed

x11-terms/ghostty: make X11 optional

Add the X use flag, which controls the gtk-x11 ZBS option. This allows
ghostty to be built without libX11 for pure-wayland setups.

Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 x11-terms/ghostty/ghostty-1.0.1.ebuild | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/x11-terms/ghostty/ghostty-1.0.1.ebuild 
b/x11-terms/ghostty/ghostty-1.0.1.ebuild
index e00e89040d49..bc5f8f256b99 100644
--- a/x11-terms/ghostty/ghostty-1.0.1.ebuild
+++ b/x11-terms/ghostty/ghostty-1.0.1.ebuild
@@ -62,12 +62,12 @@ KEYWORDS="~amd64"
 # TODO: simdutf integration (missing Gentoo version)
 # TODO: spirv-cross integration (missing Gentoo package)
 # TODO: glfw integration (no option from upstream)
-# NOTE: gtk backend requires X right now since ghostty unconditionally
-#       includes gdk/x11/gdkx.h.
-#       https://github.com/ghostty-org/ghostty/issues/3477
 RDEPEND="
        adwaita? ( gui-libs/libadwaita:1= )
-       gtk? ( gui-libs/gtk:4=[X] )
+       gtk? (
+               gui-libs/gtk:4=[X?]
+               X? ( x11-libs/libX11 )
+       )
 
        system-fontconfig? ( >=media-libs/fontconfig-2.14.2:= )
        system-freetype? ( >=media-libs/freetype-2.13.2:=[bzip2] )
@@ -83,7 +83,7 @@ BDEPEND="
        man? ( virtual/pandoc )
 "
 
-IUSE="+adwaita man +gtk glfw"
+IUSE="+X +adwaita man +gtk glfw"
 # System integrations
 IUSE+="
        +system-fontconfig +system-freetype +system-glslang +system-harfbuzz 
+system-libpng +system-libxml2
@@ -91,6 +91,7 @@ IUSE+="
 "
 
 REQUIRED_USE="
+       X? ( gtk )
        adwaita? ( gtk )
        ^^ ( gtk glfw )
 "
@@ -113,6 +114,7 @@ src_configure() {
                -Dfont-backend=fontconfig_freetype
                -Drenderer=opengl
                -Dgtk-adwaita=$(usex adwaita true false)
+               -Dgtk-x11=$(usex X true false)
                -Demit-docs=$(usex man true false)
                -Dversion-string="${PV}"
 

Reply via email to