commit:     cb09577ad07e2ce5e7f03be7cb1c1c6c4dadb420
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  6 09:10:50 2025 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Dec  6 09:25:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb09577a

net-misc/tigervnc: update patch for live ebuild

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 ...igervnc-1.15.90-r2-disable-server-and-pam.patch | 94 ++++++++++++++++++++++
 net-misc/tigervnc/tigervnc-9999.ebuild             |  2 +-
 2 files changed, 95 insertions(+), 1 deletion(-)

diff --git 
a/net-misc/tigervnc/files/tigervnc-1.15.90-r2-disable-server-and-pam.patch 
b/net-misc/tigervnc/files/tigervnc-1.15.90-r2-disable-server-and-pam.patch
new file mode 100644
index 000000000000..f23a09884494
--- /dev/null
+++ b/net-misc/tigervnc/files/tigervnc-1.15.90-r2-disable-server-and-pam.patch
@@ -0,0 +1,94 @@
+Add BUILD_SERVER similar to BUILD_VIEWER
+
+Add a BUILD_SERVER option similar to BUILD_VIEWER.  When BUILD_SERVER is
+not active, we do not require pam, so also disable everything that needs
+pam.  This allows building the viewer on a machine where pam is not
+installed.
+
+See https://bugs.gentoo.org/852830
+
+Set ENABLE_WAYLAND to 0 if BUILD_SERVER is not active.
+
+Do not define _FORTIFY_SOURCE, it is already defined in Gentoo.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -76,7 +76,6 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+ 
+ # Tell the compiler to be stringent
+-add_compile_definitions(_FORTIFY_SOURCE=2)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Wvla")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat=2 -Wvla")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wzero-as-null-pointer-constant")
+@@ -260,6 +259,7 @@ if(BUILD_JAVA)
+   add_subdirectory(java)
+ endif()
+ 
++trioption(BUILD_SERVER "Build TigerVNC server")
+ trioption(BUILD_VIEWER "Build TigerVNC viewer")
+ if(BUILD_VIEWER)
+   # Check for FLTK
+@@ -341,7 +341,7 @@ if (ENABLE_NETTLE)
+ endif()
+ 
+ # Check for PAM library
+-if(UNIX AND NOT APPLE)
++if(BUILD_SERVER AND UNIX AND NOT APPLE)
+   find_package(PAM REQUIRED)
+ endif()
+ 
+@@ -391,7 +391,7 @@ if(UNIX AND NOT APPLE)
+ endif()
+ 
+ # check for libraries needed for wayland support
+-if(UNIX AND NOT APPLE)
++if(BUILD_SERVER AND UNIX AND NOT APPLE)
+   trioption(ENABLE_WAYLAND "Enable wayland support")
+   if(ENABLE_WAYLAND)
+     if(ENABLE_WAYLAND STREQUAL "AUTO")
+--- a/common/rfb/CMakeLists.txt
++++ b/common/rfb/CMakeLists.txt
+@@ -76,7 +76,7 @@ if(WIN32)
+   target_sources(rfb PRIVATE WinPasswdValidator.cxx)
+ endif(WIN32)
+ 
+-if(UNIX AND NOT APPLE)
++if(BUILD_SERVER AND UNIX AND NOT APPLE)
+   target_sources(rfb PRIVATE UnixPasswordValidator.cxx)
+   target_include_directories(rfb SYSTEM PRIVATE ${PAM_INCLUDE_DIRS})
+   target_link_libraries(rfb ${PAM_LIBRARIES})
+--- a/tests/perf/CMakeLists.txt
++++ b/tests/perf/CMakeLists.txt
+@@ -8,8 +8,10 @@ target_link_libraries(convperf test_util rfb)
+ add_executable(decperf decperf.cxx)
+ target_link_libraries(decperf test_util rdr rfb)
+ 
+-add_executable(encperf encperf.cxx)
+-target_link_libraries(encperf test_util core rdr rfb)
++if(BUILD_SERVER)
++  add_executable(encperf encperf.cxx)
++  target_link_libraries(encperf test_util core rdr rfb)
++endif()
+ 
+ if (BUILD_VIEWER)
+   add_executable(fbperf
+--- a/unix/CMakeLists.txt
++++ b/unix/CMakeLists.txt
+@@ -4,10 +4,12 @@ endif()
+ 
+ add_subdirectory(tx)
+ add_subdirectory(common)
+-add_subdirectory(vncconfig)
+-add_subdirectory(vncpasswd)
+-add_subdirectory(vncserver)
+-add_subdirectory(x0vncserver)
++if(BUILD_SERVER)
++  add_subdirectory(vncconfig)
++  add_subdirectory(vncpasswd)
++  add_subdirectory(vncserver)
++  add_subdirectory(x0vncserver)
++endif()
+ 
+ if (ENABLE_WAYLAND)
+   add_subdirectory(w0vncserver)

diff --git a/net-misc/tigervnc/tigervnc-9999.ebuild 
b/net-misc/tigervnc/tigervnc-9999.ebuild
index 466c6ca75b5e..7affa153a39d 100644
--- a/net-misc/tigervnc/tigervnc-9999.ebuild
+++ b/net-misc/tigervnc/tigervnc-9999.ebuild
@@ -113,7 +113,7 @@ PATCHES=(
        # Restore Java viewer
        "${FILESDIR}"/${PN}-1.11.0-install-java-viewer.patch
        "${FILESDIR}"/${PN}-1.14.0-xsession-path.patch
-       "${FILESDIR}"/${PN}-1.15.90-disable-server-and-pam.patch
+       "${FILESDIR}"/${PN}-1.15.90-r2-disable-server-and-pam.patch
        "${FILESDIR}"/${PN}-1.14.1-pam.patch
 )
 

Reply via email to