commit:     4803c60e00b3e82eeca852d1e945dd2965570bdb
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  9 15:56:59 2025 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sun Nov  9 16:27:58 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4803c60e

net-misc/tigervnc: add 1.15.90

Add net-misc/tigervnc 1.15.90, aka 1.16.0 beta.

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

 net-misc/tigervnc/Manifest                         |   3 +-
 .../tigervnc-1.15.90-disable-server-and-pam.patch  | 103 ++++++++
 net-misc/tigervnc/metadata.xml                     |   1 +
 net-misc/tigervnc/tigervnc-1.15.90.ebuild          | 259 +++++++++++++++++++++
 4 files changed, 365 insertions(+), 1 deletion(-)

diff --git a/net-misc/tigervnc/Manifest b/net-misc/tigervnc/Manifest
index d003d6c17216..565c1b9e3f0f 100644
--- a/net-misc/tigervnc/Manifest
+++ b/net-misc/tigervnc/Manifest
@@ -1,5 +1,6 @@
 DIST tigervnc-1.14.1.tar.gz 2097932 BLAKE2B 
44593837154e019562f63cad54afaa41d1af7a5199988571002019dc60af193162a54b4c3f4e57a3cef2c824253bec5d83f029ba489a7f5459873255b1968cba
 SHA512 
d7a6cff4a3a1e4c30e2dbd6e17ad2d76145e76f5c1a93abbaf32b1c488377a4eaf936d4e8a24a97863948138ba40031c862f9da1c1cd427da35ebffa8eaa4f31
 DIST tigervnc-1.15.0.tar.gz 2126369 BLAKE2B 
c8646860884ae8fec7f81d9e87967bb279e7bf7ebcc69973660ed827f5a1cf6d8700a70a364e9099e68779b6dfb168242db2afa428f5cfc11784020696261191
 SHA512 
0b550296b5bd06ac9d63ce10861ff54d24e79b6ac1551d80e9b81845fa873d85bfd684112c66d86188c9c61fdffb9421ea8696c1c7fd15a24fb1bf6bfe6a5e05
+DIST tigervnc-1.15.90.tar.gz 2202872 BLAKE2B 
84bc3a4642fe9f10bc9038ce0473de16aaa7c3e2656a3862f0afe201cf78370ecd1c3fea1102698a8b1ef6f3ced3c57d08b35fb3a3ba08f62d4e81636d45fc50
 SHA512 
6e3e3bc97aa780e348e2338e7e3f564c9f235e1aa9ce163abc34d8508d4a5776de66c4f93fbe84842eeb8867578649e64f57d07f3cac499ab653fae07dac30d0
 DIST xorg-server-21.1.14.tar.xz 5016608 BLAKE2B 
b64ff9bbcd1d1c632b588800acb1531d6295a52347294d323d684a7149a4f803fb38357a102d715525511c8bb8554daf2e71c28149ccb650b1c7c1990351f53e
 SHA512 
833d36ca4a409363dc021a50702bc29dbb32d074de319d6910a158b6e4d8f51a20c3b0de0486d9613d4e526fe4fd60ca306b3c9fcce7d014ca8cc10185afd973
 DIST xorg-server-21.1.15.tar.xz 5009756 BLAKE2B 
a7d5df70a4af98b903a306850a169879cf083b2c811f6e75e1e916f85441214541f7c9fa0e0089c4bf08c67597166d97ea194c6a0a511948568120e579d1104f
 SHA512 
677bbec81ecdd1d14e1d289a00c40249988985ec636e5473b30c4f63bad03a6cc5f9168cea94969e1550370eee8863595bc9c064c3d218a96123afc7567bf363
-DIST xorg-server-21.1.18.tar.xz 5037376 BLAKE2B 
48c7b745c07a31d11d3a95f8eba056ff46bf69f2c70d499f677cbd706347e0c3c28a8197be5c0d65670c5b2f87f559ea10e7c21ee88bdc767c6a921d5fa8d3b2
 SHA512 
839ce759fc0e5405599c4cff0acf381f278d22b465b9fb9e335b5fd1c63f6d546788e4e869854026eb4b1e1a77a83b60d6fef472cf8534d45630f31b587a50dd
+DIST xorg-server-21.1.20.tar.xz 5055676 BLAKE2B 
ca39f25dc71483a9d31f6cb3edfe4d2c0d93dff92edc89c8d508c114ae2193ad7416cc121659e5e09183f2f582dce7efc38885533136063ec328f45096e33c19
 SHA512 
cb83cfaaa804b39d4c6d827222439c7725ee2c6fe738d5f5ac9a406c3978ef3d7fafe9ba9fda54ba93fb37447f88edbc1e48656d5771b204945c6d67d1233f80

diff --git 
a/net-misc/tigervnc/files/tigervnc-1.15.90-disable-server-and-pam.patch 
b/net-misc/tigervnc/files/tigervnc-1.15.90-disable-server-and-pam.patch
new file mode 100644
index 000000000000..181a1a0cee1c
--- /dev/null
+++ b/net-misc/tigervnc/files/tigervnc-1.15.90-disable-server-and-pam.patch
@@ -0,0 +1,103 @@
+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 STREQUAL "AUTO")
+     find_package(GLib)
+@@ -423,6 +423,8 @@ if(UNIX AND NOT APPLE)
+     set(ENABLE_WAYLAND 0)
+     message(WARNING "GLib, Gio, Gobject, PipeWire, Uuid, WaylandClient or 
Xkbcommon NOT found. w0vncserver disabled.")
+   endif()
++else()
++  set(ENABLE_WAYLAND 0)
+ endif()
+ 
+ find_package(GTest)
+--- 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/metadata.xml b/net-misc/tigervnc/metadata.xml
index 7c4c48e857d6..9c726cced770 100644
--- a/net-misc/tigervnc/metadata.xml
+++ b/net-misc/tigervnc/metadata.xml
@@ -9,6 +9,7 @@
                <flag name="dri3">Build with DRI3 support</flag>
                <flag name="drm">Build with DRM support</flag>
                <flag name="java">Build TigerVNC Java viewer</flag>
+               <flag name="pwquality">Use <pkg>dev-libs/libpwquality</pkg> for 
password quality checking in vncpasswd</flag>
                <flag name="server">Build TigerVNC server</flag>
                <flag name="viewer">Build TigerVNC viewer</flag>
        </use>

diff --git a/net-misc/tigervnc/tigervnc-1.15.90.ebuild 
b/net-misc/tigervnc/tigervnc-1.15.90.ebuild
new file mode 100644
index 000000000000..466c6ca75b5e
--- /dev/null
+++ b/net-misc/tigervnc/tigervnc-1.15.90.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_IN_SOURCE_BUILD=1
+inherit autotools cmake eapi9-ver flag-o-matic java-pkg-opt-2 optfeature 
systemd xdg
+
+XSERVER_VERSION="21.1.20"
+XSERVER_PATCH_VERSION="21"
+
+DESCRIPTION="Remote desktop viewer display system"
+HOMEPAGE="https://tigervnc.org";
+SRC_URI="server? ( 
https://www.x.org/releases/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.xz
 )"
+
+if [[ ${PV} == *9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/TigerVNC/tigervnc/";
+else
+       SRC_URI+=" https://github.com/TigerVNC/tigervnc/archive/v${PV}.tar.gz 
-> ${P}.tar.gz"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 
~riscv ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="dri3 +drm gnutls java nls +opengl pwquality +server test +viewer wayland 
xinerama"
+REQUIRED_USE="
+       dri3? ( drm )
+       java? ( viewer )
+       opengl? ( server )
+       || ( server viewer )
+"
+RESTRICT="!test? ( test )"
+
+# TODO: sys-libs/libselinux
+# <fltk-1.4: 
https://github.com/TigerVNC/tigervnc/pull/1887#issuecomment-2545662546
+COMMON_DEPEND="
+       dev-libs/gmp:=
+       dev-libs/nettle:=
+       media-libs/libjpeg-turbo:=
+       virtual/zlib
+       x11-libs/libX11
+       x11-libs/libXext
+       x11-libs/libXrandr
+       x11-libs/pixman
+       gnutls? ( net-libs/gnutls:= )
+       nls? ( virtual/libiconv )
+       server? (
+               dev-libs/openssl:0=
+               sys-libs/pam
+               x11-libs/libXau
+               x11-libs/libxcvt
+               x11-libs/libXdamage
+               x11-libs/libXdmcp
+               x11-libs/libXfixes
+               x11-libs/libXfont2
+               x11-libs/libXtst
+               x11-libs/pixman
+               x11-apps/xauth
+               x11-apps/xinit
+               x11-apps/xkbcomp
+               x11-apps/xsetroot
+               x11-misc/xkeyboard-config
+               dri3? (
+                       media-libs/mesa[opengl]
+                       x11-libs/libxshmfence
+               )
+               opengl? ( media-libs/libglvnd[X] )
+               pwquality? ( dev-libs/libpwquality )
+               wayland? (
+                       dev-libs/glib:2
+                       dev-libs/wayland
+                       dev-util/wayland-scanner
+                       media-video/pipewire:=
+                       sys-apps/util-linux
+                       x11-libs/libxkbcommon
+               )
+               !net-misc/turbovnc[server]
+       )
+       viewer? (
+               media-video/ffmpeg:=
+               <x11-libs/fltk-1.4:1=
+               x11-libs/libXi
+               x11-libs/libXrender
+               !net-misc/turbovnc[viewer]
+       )
+"
+RDEPEND="${COMMON_DEPEND}
+       java? ( >=virtual/jre-1.8:* )
+       server? ( dev-lang/perl )
+"
+DEPEND="${COMMON_DEPEND}
+       java? ( >=virtual/jdk-1.8:* )
+       drm? ( x11-libs/libdrm )
+       server? (
+               media-fonts/font-util
+               x11-base/xorg-proto
+               x11-libs/libXi
+               x11-libs/libxkbfile
+               x11-libs/libXrender
+               x11-libs/xtrans
+               x11-misc/util-macros
+               opengl? ( media-libs/mesa )
+       )
+"
+BDEPEND="
+       virtual/pkgconfig
+       nls? ( sys-devel/gettext )
+       test? ( dev-cpp/gtest )
+"
+
+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.14.1-pam.patch
+)
+
+src_unpack() {
+       if [[ ${PV} == *9999 ]]; then
+               git-r3_src_unpack
+               use server && unpack xorg-server-${XSERVER_VERSION}.tar.xz
+       else
+               default
+       fi
+}
+
+src_prepare() {
+       if use server; then
+               cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/. 
unix/xserver || die
+       fi
+
+       cmake_src_prepare
+
+       if use server; then
+               cd unix/xserver || die
+               eapply ../xserver${XSERVER_PATCH_VERSION}.patch
+               eautoreconf
+               sed -i '/strcmp.*-fakescreenfps/,/^        \}/d' os/utils.c || 
die
+
+               if use drm; then
+                       cd "${WORKDIR}" && \
+                       sed -i 's:\(drm_fourcc.h\):libdrm/\1:' $(grep 
drm_fourcc.h -rl .) || die
+               fi
+       fi
+}
+
+src_configure() {
+       if ! use server; then
+               use wayland && ewarn "USE=wayland is ignored when USE=server is 
not set"
+               use pwquality && ewarn "USE=pwquality is ignored when 
USE=server is not set"
+       fi
+
+       if use arm || use hppa; then
+               append-flags "-fPIC"
+       fi
+
+       local mycmakeargs=(
+               -DENABLE_GNUTLS=$(usex gnutls)
+               -DENABLE_NLS=$(usex nls)
+               -DENABLE_WAYLAND=$(usex wayland)
+               -DENABLE_PWQUALITY=$(usex pwquality)
+               -DBUILD_JAVA=$(usex java)
+               -DBUILD_SERVER=$(usex server)
+               -DBUILD_VIEWER=$(usex viewer)
+       )
+
+       cmake_src_configure
+
+       if use server; then
+               cd unix/xserver || die
+               econf \
+                       $(use_enable opengl glx) \
+                       $(use_enable drm libdrm) \
+                       --disable-config-hal \
+                       --disable-config-udev \
+                       --disable-devel-docs \
+                       --disable-dri \
+                       $(use_enable dri3) \
+                       --disable-glamor \
+                       --disable-kdrive \
+                       --disable-libunwind \
+                       --disable-linux-acpi \
+                       --disable-record \
+                       --disable-selective-werror \
+                       --disable-static \
+                       --disable-unit-tests \
+                       --disable-xephyr \
+                       $(use_enable xinerama) \
+                       --disable-xnest \
+                       --disable-xorg \
+                       --disable-xvfb \
+                       --disable-xwin \
+                       --enable-dri2 \
+                       --with-pic \
+                       --without-dtrace \
+                       --with-sha1=libcrypto
+       fi
+}
+
+src_compile() {
+       cmake_src_compile
+
+       if use server; then
+               # deps of the vnc module and the module itself
+               local d subdirs=(
+                       fb xfixes Xext dbe $(usex opengl glx "") $(usev dri3) 
randr render
+                       damageext miext Xi xkb composite dix mi os present 
hw/vnc
+               )
+               for d in "${subdirs[@]}"; do
+                       emake -C unix/xserver/"${d}"
+               done
+       fi
+}
+
+src_test() {
+       ctest --test-dir tests/unit/
+}
+
+src_install() {
+       cmake_src_install
+
+       if use server; then
+               emake -C unix/xserver/hw/vnc DESTDIR="${D}" install
+               rm -v 
"${ED}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la || die
+
+               newconfd "${FILESDIR}"/${PN}-1.14.0.confd ${PN}
+               newinitd "${FILESDIR}"/${PN}-1.14.0.initd ${PN}
+
+               systemd_douserunit unix/vncserver/[email protected]
+
+               # install vncserver to /usr/bin too, see bug #836620
+               dosym -r /usr/libexec/vncserver /usr/bin/vncserver
+       fi
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       use server && ver_replacing -lt 1.13.1-r3 && {
+               elog 'OpenRC users: please migrate to one service per display 
as documented here:'
+               elog 
'https://wiki.gentoo.org/wiki/TigerVNC#Migrating_from_1.13.1-r2_or_lower:'
+               elog
+       }
+
+       use server && {
+               elog 'PLEASE NOTE:'
+               elog '  The default config directory is now 
${XDG_CONFIG_HOME}/tigervnc or'
+               elog '  ~/.config/tigervnc instead of ~/.vnc'
+               elog
+       }
+
+       local OPTIONAL_DM="gnome-base/gdm x11-misc/lightdm x11-misc/sddm 
x11-misc/slim"
+       use server && \
+               optfeature "keeping track of the xorg-server module" 
net-misc/tigervnc-xorg-module && \
+               optfeature_header "Install any additional display manager 
package:" && \
+               optfeature "proper session support" ${OPTIONAL_DM}
+}

Reply via email to