net-misc/tigervnc: fix wayland dependencies

Wayland dependencies were still required even with USE=-wayland.

Closes: https://bugs.gentoo.org/965904
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
This commit is contained in:
Viorel Munteanu 2025-11-10 18:02:43 +02:00
parent 045091bc0d
commit 5694ee9f68
No known key found for this signature in database
GPG Key ID: 0CE5A97D9310DAB0
2 changed files with 28 additions and 8 deletions

View File

@ -38,19 +38,39 @@ Do not define _FORTIFY_SOURCE, it is already defined in Gentoo.
find_package(PAM REQUIRED) find_package(PAM REQUIRED)
endif() endif()
@@ -391,7 +391,7 @@ if(UNIX AND NOT APPLE) @@ -391,21 +391,9 @@ if(UNIX AND NOT APPLE)
endif() endif()
# check for libraries needed for wayland support # check for libraries needed for wayland support
-if(UNIX AND NOT APPLE) -if(UNIX AND NOT APPLE)
+if(BUILD_SERVER AND UNIX AND NOT APPLE) +if(BUILD_SERVER AND UNIX AND NOT APPLE)
trioption(ENABLE_WAYLAND "Enable wayland support") trioption(ENABLE_WAYLAND "Enable wayland support")
if(ENABLE_WAYLAND STREQUAL "AUTO") - if(ENABLE_WAYLAND STREQUAL "AUTO")
find_package(GLib) - find_package(GLib)
@@ -423,6 +423,8 @@ if(UNIX AND NOT APPLE) - find_package(Gio)
set(ENABLE_WAYLAND 0) - find_package(Gobject)
message(WARNING "GLib, Gio, Gobject, PipeWire, Uuid, WaylandClient or Xkbcommon NOT found. w0vncserver disabled.") -
- # Portals specific
- find_package(PipeWire)
- find_package(Uuid)
-
- # wlroots specific
- find_package(WaylandClient)
- find_package(Xkbcommon)
- else()
+ if(ENABLE_WAYLAND)
find_package(GLib REQUIRED)
find_package(Gio REQUIRED)
find_package(Gobject REQUIRED)
@@ -418,11 +406,8 @@ if(UNIX AND NOT APPLE)
find_package(WaylandClient REQUIRED)
find_package(Xkbcommon REQUIRED)
endif() endif()
- if(NOT GLIB_FOUND OR NOT GIO_FOUND OR NOT GOBJECT_FOUND OR NOT PIPEWIRE_FOUND
- OR NOT UUID_FOUND OR NOT WAYLANDCLIENT_FOUND OR NOT XKBCOMMON_FOUND)
- set(ENABLE_WAYLAND 0)
- message(WARNING "GLib, Gio, Gobject, PipeWire, Uuid, WaylandClient or Xkbcommon NOT found. w0vncserver disabled.")
- endif()
+else() +else()
+ set(ENABLE_WAYLAND 0) + set(ENABLE_WAYLAND 0)
endif() endif()

View File

@ -38,7 +38,7 @@ COMMON_DEPEND="
dev-libs/gmp:= dev-libs/gmp:=
dev-libs/nettle:= dev-libs/nettle:=
media-libs/libjpeg-turbo:= media-libs/libjpeg-turbo:=
virtual/zlib virtual/zlib:=
x11-libs/libX11 x11-libs/libX11
x11-libs/libXext x11-libs/libXext
x11-libs/libXrandr x11-libs/libXrandr
@ -79,7 +79,7 @@ COMMON_DEPEND="
) )
viewer? ( viewer? (
media-video/ffmpeg:= media-video/ffmpeg:=
<x11-libs/fltk-1.4:1= <x11-libs/fltk-1.4:1
x11-libs/libXi x11-libs/libXi
x11-libs/libXrender x11-libs/libXrender
!net-misc/turbovnc[viewer] !net-misc/turbovnc[viewer]