From b8c7370a682e4e29cda623222d17a790c01c3642 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 7 Aug 2024 12:37:21 +0100 Subject: gentoo auto-resync : 07:08:2024 - 12:37:20 --- net-misc/tigervnc/Manifest | 8 +- net-misc/tigervnc/files/tigervnc-1.13.90.initd | 91 -------- .../files/tigervnc-1.14.0-xsession-path.patch | 28 +++ net-misc/tigervnc/files/tigervnc-1.14.0.confd | 13 ++ net-misc/tigervnc/files/tigervnc-1.14.0.initd | 90 ++++++++ net-misc/tigervnc/tigervnc-1.13.90-r1.ebuild | 229 -------------------- net-misc/tigervnc/tigervnc-1.14.0.ebuild | 235 +++++++++++++++++++++ 7 files changed, 371 insertions(+), 323 deletions(-) delete mode 100644 net-misc/tigervnc/files/tigervnc-1.13.90.initd create mode 100644 net-misc/tigervnc/files/tigervnc-1.14.0-xsession-path.patch create mode 100644 net-misc/tigervnc/files/tigervnc-1.14.0.confd create mode 100644 net-misc/tigervnc/files/tigervnc-1.14.0.initd delete mode 100644 net-misc/tigervnc/tigervnc-1.13.90-r1.ebuild create mode 100644 net-misc/tigervnc/tigervnc-1.14.0.ebuild (limited to 'net-misc/tigervnc') diff --git a/net-misc/tigervnc/Manifest b/net-misc/tigervnc/Manifest index c274981e9cbb..58ab8c718202 100644 --- a/net-misc/tigervnc/Manifest +++ b/net-misc/tigervnc/Manifest @@ -3,12 +3,14 @@ AUX tigervnc-1.12.0-xsession-path.patch 973 BLAKE2B c193ccc5ad0d8e04f8cd9f755c9d AUX tigervnc-1.12.80-disable-server-and-pam.patch 1394 BLAKE2B fcda4d2199dce67a189e3b3aba7e88e41d2325e79147de7a5e0a414aff2583ac0bda1de7e372b907527177612eaeb2462294dbf578f5342701e9d274f09e4f78 SHA512 ec1fa15f70ff508636c02cf3b945b7e372fb391c674e47c6c0cbfc871400a3fc6f0847dae62cf7eb5d56afae121b9aec8d19359319ca0e7e04df03b3bec3cc5e AUX tigervnc-1.13.1.confd 518 BLAKE2B ee5e354a36638850595cda0c4d083c6837609201cca520175f78b03aa8cce18c6b89f534cdaf6c409ecd5aacf0c0115a52ebd458cc4aaa4aa0ba19942e2352cf SHA512 57db5b7ba590a48fc7e91da13cbe2ff0bf6e96088d522d214f6dc5266ea9dc214c561c9705380477f25d65eede870ef3b054fa77fabac78cd5ac449204e07b59 AUX tigervnc-1.13.1.initd 2635 BLAKE2B 4600e73a22cb774030bcb0f750a50b134f06183a30008781e78c5e64034ab4ae8e5598e8e65f01c2bee96276ded4ec583df73f5eee0bc1ff1e8c2524af9ea6fd SHA512 acdbd97e3f559474c0c5b9211a8a3885f70d7d59a89c236d01b50490c6c2a70c4b7f9c2346f161640b09123cadb8803f0cbe9ddaa0efd046bcdd00033f133673 -AUX tigervnc-1.13.90.initd 2927 BLAKE2B 9a6a13cbe80471151896a617be7c2ad6c57ed4d3913ee6fff7cc7845e93966c6fab2852b1561ac3b26c001518ddbdd25428501cb48f8dd3e7a8a59ca8940c3ec SHA512 45ee8723ed38c1821b6e60a034b20c95f11cd1db21a3270c6c2655516d5e2114cd872f163d2e7d649057156db0702a44bb0a8f8cbf05a9be7c04fdb62b6678de +AUX tigervnc-1.14.0-xsession-path.patch 1008 BLAKE2B f73bbab10b21a8b27b5b1773e43b254ca5e5017efd84aba8916ad6b5549c2cffabcbac7c14c0b1d8dbb2fb280299d580ceab45399b593abc8f520d692988024b SHA512 cc3ead0af6c618b00914a131723fcf401f913a10e3398e92702387e805dc94f7878558deff4ee12d58e8f2608a7d268ba937a8fcc34ed303b9e3328e77b98bf6 +AUX tigervnc-1.14.0.confd 530 BLAKE2B 1152c237744ee69ab317a8d979a8282abb259cb359500b251c31faf6a683ec11c31ef283749e420f5fce54a9f5bec7e97df4ccfdae41871173d30458c8669137 SHA512 75dbae29d2bab1e1b56f9d2d73bb674cbd968a9919e085bc1d356726caed91b469474753176d657c0b5ef2afe6fdf691b661d2224062b22bc39a9752951ac6d4 +AUX tigervnc-1.14.0.initd 2996 BLAKE2B 675bc890a23805aceeeb1ee559d192c4a39ee7251d520cc5d98cfd2c2f075737fb3ed192903a08f850603847ce7769e3ae01b2c29dc4591cb3444edf835c6e0d SHA512 0e4043df37125e48d4314fc87400bf5e4eb9ca9848d2afead2f34b4f94422a03b939c3cf246a40c44b91e9cf0aec261f35a3c98e9861810db2f5a73f384a3c60 DIST tigervnc-1.13.1.tar.gz 1989081 BLAKE2B 3f4d395c2788a4d475dcd42793c43f249264db586da85f99d7e0f64ea37854831c61bb5c99945578f8dbeac5ee30e0f7b46fa7f215768c70e750d50689cd4e7a SHA512 9190dbcd3b57ba52286c158c0675104d68463d7e3ea8e23493514b64451ddb511f3daf0f177339bc231155daea376d9c8dc58216663e10aa12f67468f4559da5 -DIST tigervnc-1.13.90.tar.gz 2082778 BLAKE2B 204f2bdc503f4f13ead2cb641c78390763ebc590822d5759fdb3f1c1e052c761ffa443bdbb8f380d5b6b9f45215506bbd1c20d4bae336ee14d9e3621161a182a SHA512 8787d8b18e491df841947b42492e6ac09ed57c72a2b3a1aa901676b7b73bd8dfab5ce45177333913cf66d604804c55357d15eefe5747c31e97b91ce2b9f44093 +DIST tigervnc-1.14.0.tar.gz 2090452 BLAKE2B 5211dadae0ed66b2b286609f2555f45d3d9b45eef738e6deac3193f433ac6b6858ae6245af621d5a001336d91b99237b0a4976e4642111b27f4f668dbcc79803 SHA512 ee36f0aa40957274fb00fd755624a8bea80432d797d6c183645ed1251058ab30594d2261693b5655c5ca85a22e53f93029eeccc51fe86780398d1a017fa2311c DIST xorg-server-21.1.13.tar.xz 4963952 BLAKE2B f6b05439e54b9709ce7a5b5f3702053ebc586ac8f8976bb6de9955ab34eac7201e027e1076584cf5b6d8c2639703e3a908b9e38f5dc52d4897aac8650f462502 SHA512 a55fbeeed227c12c67f166f2c06a7f4f8d78feeea04c6e73509dbc723185fd0772349aa23f7c44cf0828ac0a0e2f9e4b26cffb220e6dfa7186d60f88b25ccaf1 DIST xorg-server-21.1.8.tar.xz 4980208 BLAKE2B a223efe6d14b55bd133b7f8db75b7720ea0ae58f1eced0f6b20caf6e7045e7649a0923a1c6db5d649265375e6768fa9811477d2fa0da52d7a1e65cf4511535d2 SHA512 6104b3620ed2e1e27d9a8e963388bbe8785a764585b1bc03dbf5d719a92894773dda580d377ca18ceeab353e65a5d23cc947bab84a4012f9dd1eca31cac36937 EBUILD tigervnc-1.13.1-r3.ebuild 5432 BLAKE2B e9104059ab3ca717699f38329a8c428f24f7ff9d42ebd27181f30f0dd4bad7ba7af86f7e1a75406a0f08a6570cf1bed9ee4d03c50f266d6bf9c681d1b7bd2c86 SHA512 b921c52372954381ae535c6c7e9fa518c31f33a62e13a63ae9cca0f0fd210f4efa40d769966d86a4c3d4ad71d6b2d0caa30de6fd4d4b1de61f41faedb87e803a -EBUILD tigervnc-1.13.90-r1.ebuild 5451 BLAKE2B 969ff59f69636c982e7c4bbf6fae54941b1d0f71950135d62700b31d28166e84708de6a4d5b0f3f3e0e3e3b05f37a3e5b7c15a3ad9154a1c8709f7428071b1bf SHA512 7fbb6c3eaaafb0284816e6a0c93524991f3b4d506cf93d3e3563b5f4da5264b8541e27a5420fcc8716a252b78694ecffc1b2eae0834d5f4b1057b58971db08a0 +EBUILD tigervnc-1.14.0.ebuild 5606 BLAKE2B bcaaa94235e07852da83c4e511517c56b0258c5e9b7a1f7520f47e3b77ad2258b87f5f0ca5f8181d23de9c3f7c2262001e90c8b0544e50ea0faf363fa80ca438 SHA512 d0e34507861494b11ab610f76f0ed062ecca79fb27418bd76890cfc23e53a7697a2bf655c9a0af99fd5936cb93a3949d0aee3c9c8cb632f496d1959582f822cc EBUILD tigervnc-9999.ebuild 5451 BLAKE2B 969ff59f69636c982e7c4bbf6fae54941b1d0f71950135d62700b31d28166e84708de6a4d5b0f3f3e0e3e3b05f37a3e5b7c15a3ad9154a1c8709f7428071b1bf SHA512 7fbb6c3eaaafb0284816e6a0c93524991f3b4d506cf93d3e3563b5f4da5264b8541e27a5420fcc8716a252b78694ecffc1b2eae0834d5f4b1057b58971db08a0 MISC metadata.xml 602 BLAKE2B cd3ae9a2fa5758627621230b5bc005b46c65d028764c5578d7684ae7aaa6403d301a59476e2aae6fa4a7a1f38cd0d8c23a7db3a784666aa2f375267444c48658 SHA512 16c1ccff038df995cbe4bace496636e41f1de9c28ad25c45d49f63485d3b7b71d9682866ff1b005acc7b401d66112c1709048298a77fb1c0baadc879fa236743 diff --git a/net-misc/tigervnc/files/tigervnc-1.13.90.initd b/net-misc/tigervnc/files/tigervnc-1.13.90.initd deleted file mode 100644 index bf9eee12787b..000000000000 --- a/net-misc/tigervnc/files/tigervnc-1.13.90.initd +++ /dev/null @@ -1,91 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License, v2 or later - -# shellcheck shell=sh - -# Create symlinks for all displays. -# For example for display :1, run `ln -s tigervnc /etc/init.d/tigervnc.1` -# Then `rc-update add tigervnc.1 default` -# For compatibility, /etc/init.d/tigervnc will start all displays. - -DISPLAYS=${SVCNAME#*.} -if [ "$DISPLAYS" = "tigervnc" ]; then - should_warn=1 - DISPLAYS=$(grep -v "^#" /etc/tigervnc/vncserver.users | sed -e 's/=.*//' -e 's/^://') -fi - -depend() { - need net -} - -checkconfig() { - if [ -n "${DISPLAYS}" ]; then - if [ "$1" = "start" ]; then - for display in $DISPLAYS; do - user="$(grep "^:${display}" /etc/tigervnc/vncserver.users)" - user=${user#*=} - # bug #690046 - if [ -z "${user}" ]; then - eerror "User is not defined for display :${display} in /etc/tigervnc/vncserver.users" - return 1 - # 1.13.90 changed the default config directory to ~/.config/tigervnc - # but still supports ~/.vnc if not found - elif ! runuser -l "${user}" -s /bin/bash -c \ - "[[ ( -d ${XDG_CONFIG_HOME:-~/.config}/tigervnc && -f ${XDG_CONFIG_HOME:-~/.config}/tigervnc/passwd ) || ( ! -d ${XDG_CONFIG_HOME:-~/.config}/tigervnc && -f ~/.vnc/passwd ) ]]"; then - eerror "There are no passwords defined for user ${user}." - return 1 - elif [ -e "/tmp/.X11-unix/X${display}" ]; then - eerror "Display :${display} appears to be already in use because of /tmp/.X11-unix/X${display}" - eerror "Remove this file if there is no X server for :${display}" - return 1 - elif [ -e "/tmp/.X${display}-lock" ]; then - eerror "Display :${display} appears to be already in use because of /tmp/.X${display}-lock" - eerror "Remove this file if there is no X server for :${display}" - return 1 - fi - FREEDISPLAYS="${FREEDISPLAYS} ${display}" - done - fi - return 0 - else - eerror 'There are no displays configured in /etc/tigervnc/vncserver.users' - return 1 - fi -} - -checkwarn() { - if [ "${should_warn}" = "1" ]; then - ewarn 'Running /etc/init.d/tigervnc in compatibility mode' - ewarn 'Please migrate to one service per display as detailed here:' - ewarn 'https://wiki.gentoo.org/wiki/TigerVNC#Migrating_from_1.13.1-r2_or_lower:' - fi -} - -start() { - checkwarn - FREEDISPLAYS="" - checkconfig start || return 1 - for display in $FREEDISPLAYS; do - [ -n "${TIGERVNC_XSESSION_FILE}" ] && export TIGERVNC_XSESSION_FILE - ebegin "Starting TigerVNC server :${display}" - start-stop-daemon --start --pidfile=/run/vncsession-":${display}".pid /usr/libexec/vncsession-start -- ":${display}" - eend $? - done -} - -stop() { - checkconfig stop || return 2 - for display in $DISPLAYS; do - ebegin "Stopping TigerVNC server :${display}" - start-stop-daemon --stop --pidfile=/run/vncsession-":${display}".pid - eend $? - done - # Do not fail if a server is missing - /bin/true -} - -restart() { - svc_stop - svc_start -} diff --git a/net-misc/tigervnc/files/tigervnc-1.14.0-xsession-path.patch b/net-misc/tigervnc/files/tigervnc-1.14.0-xsession-path.patch new file mode 100644 index 000000000000..898bd2122eaf --- /dev/null +++ b/net-misc/tigervnc/files/tigervnc-1.14.0-xsession-path.patch @@ -0,0 +1,28 @@ +Add more possible paths for Xsession, depending on which display manager is +installed. We need an Xsession that executes its command line parameters, so +leave xinit last. + +See also https://bugs.gentoo.org/746227 and https://bugs.gentoo.org/936475 + +--- a/unix/vncserver/vncserver.in ++++ b/unix/vncserver/vncserver.in +@@ -437,11 +437,14 @@ + die "$prog: couldn't find \"$cmd\" on your PATH.\n"; + } + +- foreach $cmd ("/etc/X11/xinit/Xsession", "/etc/X11/Xsession") { +- if (-x "$cmd") { +- $Xsession = $cmd; +- last; +- } ++ $Xsession=$ENV{TIGERVNC_XSESSION_FILE}; ++ if (not defined $Xsession) { ++ foreach $cmd ("/usr/share/sddm/scripts/Xsession", "/etc/gdm/Xsession", "/etc/lightdm/Xsession", "/usr/share/slim/Xsession", "/etc/X11/Sessions/Xsession", "/etc/X11/xinit/Xsession", "/etc/X11/Xsession") { ++ if (-r "$cmd") { ++ $Xsession = $cmd; ++ last; ++ } ++ } + } + if (not defined $Xsession) { + die "$prog: Couldn't find suitable Xsession.\n"; diff --git a/net-misc/tigervnc/files/tigervnc-1.14.0.confd b/net-misc/tigervnc/files/tigervnc-1.14.0.confd new file mode 100644 index 000000000000..9cadc6ab8ae5 --- /dev/null +++ b/net-misc/tigervnc/files/tigervnc-1.14.0.confd @@ -0,0 +1,13 @@ +# Config file for /etc/init.d/tigervnc + +# Add the user(s) Xvnc(1) should be run for to /etc/tigervnc/vncserver.users +# DISPLAYS is no loger used. + +# Optionally override the default Xsession file +# TIGERVNC_XSESSION_FILE="/usr/share/sddm/scripts/Xsession" +# TIGERVNC_XSESSION_FILE="/etc/gdm/Xsession" +# TIGERVNC_XSESSION_FILE="/etc/lightdm/Xsession" +# TIGERVNC_XSESSION_FILE="/usr/share/slim/Xsession" + +# vncsession no longer supports VNC_OPTS +# Use /etc/tigervnc/vncserver-config-defaults or $HOME/.config/tigervnc/config instead diff --git a/net-misc/tigervnc/files/tigervnc-1.14.0.initd b/net-misc/tigervnc/files/tigervnc-1.14.0.initd new file mode 100644 index 000000000000..fa9e4248b304 --- /dev/null +++ b/net-misc/tigervnc/files/tigervnc-1.14.0.initd @@ -0,0 +1,90 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License, v2 or later + +# shellcheck shell=sh + +# Create symlinks for all displays. +# For example for display :1, run `ln -s tigervnc /etc/init.d/tigervnc.1` +# Then `rc-update add tigervnc.1 default` +# For compatibility, /etc/init.d/tigervnc will start all displays. + +DISPLAYS=${SVCNAME#*.} +if [ "$DISPLAYS" = "tigervnc" ]; then + should_warn=1 + DISPLAYS=$(grep -v "^#" /etc/tigervnc/vncserver.users | sed -e 's/=.*//' -e 's/^://') +fi + +depend() { + need net +} + +checkconfig() { + if [ -n "${DISPLAYS}" ]; then + if [ "$1" = "start" ]; then + for display in $DISPLAYS; do + user="$(grep "^:${display}" /etc/tigervnc/vncserver.users)" + user=${user#*=} + if [ -z "${user}" ]; then + eerror "User is not defined for display :${display} in /etc/tigervnc/vncserver.users" + return 1 + elif [ -e "/tmp/.X11-unix/X${display}" ]; then + eerror "Display :${display} appears to be already in use because of /tmp/.X11-unix/X${display}" + eerror "Remove this file if there is no X server for :${display}" + return 1 + elif [ -e "/tmp/.X${display}-lock" ]; then + eerror "Display :${display} appears to be already in use because of /tmp/.X${display}-lock" + eerror "Remove this file if there is no X server for :${display}" + return 1 + # bug #690046 + # The default config directory is now ~/.config/tigervnc, but still supports ~/.vnc if not found + # Only warn if password is missing, do not error out. See bug #936442 + elif ! runuser -l "${user}" -s /bin/bash -c \ + "[[ ( -d ${XDG_CONFIG_HOME:-~/.config}/tigervnc && -f ${XDG_CONFIG_HOME:-~/.config}/tigervnc/passwd ) || ( ! -d ${XDG_CONFIG_HOME:-~/.config}/tigervnc && -f ~/.vnc/passwd ) ]]"; then + ewarn "There are no passwords defined for user ${user}. The server may not start." + fi + FREEDISPLAYS="${FREEDISPLAYS} ${display}" + done + fi + return 0 + else + eerror 'There are no displays configured in /etc/tigervnc/vncserver.users' + return 1 + fi +} + +checkwarn() { + if [ "${should_warn}" = "1" ]; then + ewarn 'Running /etc/init.d/tigervnc in compatibility mode' + ewarn 'Please migrate to one service per display as detailed here:' + ewarn 'https://wiki.gentoo.org/wiki/TigerVNC#Migrating_from_1.13.1-r2_or_lower:' + fi +} + +start() { + checkwarn + FREEDISPLAYS="" + checkconfig start || return 1 + for display in $FREEDISPLAYS; do + [ -n "${TIGERVNC_XSESSION_FILE}" ] && export TIGERVNC_XSESSION_FILE + ebegin "Starting TigerVNC server :${display}" + start-stop-daemon --start --pidfile=/run/vncsession-":${display}".pid /usr/libexec/vncsession-start -- ":${display}" + eend $? + done +} + +stop() { + checkconfig stop || return 2 + for display in $DISPLAYS; do + ebegin "Stopping TigerVNC server :${display}" + start-stop-daemon --stop --pidfile=/run/vncsession-":${display}".pid + eend $? + done + # Do not fail if a server is missing + /bin/true +} + +restart() { + svc_stop + svc_start +} diff --git a/net-misc/tigervnc/tigervnc-1.13.90-r1.ebuild b/net-misc/tigervnc/tigervnc-1.13.90-r1.ebuild deleted file mode 100644 index 24dd8515063c..000000000000 --- a/net-misc/tigervnc/tigervnc-1.13.90-r1.ebuild +++ /dev/null @@ -1,229 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CMAKE_IN_SOURCE_BUILD=1 -inherit autotools cmake flag-o-matic java-pkg-opt-2 optfeature systemd xdg - -XSERVER_VERSION="21.1.13" -XSERVER_PATCH_VERSION="21" - -DESCRIPTION="Remote desktop viewer display system" -HOMEPAGE="https://tigervnc.org" -SRC_URI="server? ( ftp://ftp.freedesktop.org/pub/xorg/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 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" -fi - -LICENSE="GPL-2" -SLOT="0" -IUSE="dri3 +drm gnutls java nls +opengl +server +viewer xinerama" -REQUIRED_USE=" - dri3? ( drm ) - java? ( viewer ) - opengl? ( server ) - || ( server viewer ) -" - -# TODO: sys-libs/libselinux -COMMON_DEPEND=" - dev-libs/gmp:= - dev-libs/nettle:= - media-libs/libjpeg-turbo:= - sys-libs/zlib:= - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXrandr - x11-libs/pixman - gnutls? ( net-libs/gnutls:= ) - nls? ( virtual/libiconv ) - server? ( - dev-libs/libbsd - dev-libs/openssl:0= - sys-libs/pam - x11-libs/libXau - 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 - opengl? ( media-libs/libglvnd[X] ) - !net-misc/turbovnc[server] - ) - viewer? ( - media-video/ffmpeg:= - x11-libs/fltk: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/libxcvt - 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 ) -" - -PATCHES=( - # Restore Java viewer - "${FILESDIR}"/${PN}-1.11.0-install-java-viewer.patch - "${FILESDIR}"/${PN}-1.12.0-xsession-path.patch - "${FILESDIR}"/${PN}-1.12.80-disable-server-and-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 arm || use hppa; then - append-flags "-fPIC" - fi - - local mycmakeargs=( - -DENABLE_GNUTLS=$(usex gnutls) - -DENABLE_NLS=$(usex nls) - -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_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.13.1.confd ${PN} - newinitd "${FILESDIR}"/${PN}-1.13.90.initd ${PN} - - systemd_douserunit unix/vncserver/vncserver@.service - - # comment out pam_selinux.so, the server does not start if missing - # part of bug #746227 - sed -i -e '/pam_selinux/s/^/#/' "${ED}"/etc/pam.d/tigervnc || die - - # 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 && [[ -n ${REPLACING_VERSIONS} ]] && ver_test "${REPLACING_VERSIONS}" -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 - } - - 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} -} diff --git a/net-misc/tigervnc/tigervnc-1.14.0.ebuild b/net-misc/tigervnc/tigervnc-1.14.0.ebuild new file mode 100644 index 000000000000..dfc8ef4f5e0b --- /dev/null +++ b/net-misc/tigervnc/tigervnc-1.14.0.ebuild @@ -0,0 +1,235 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CMAKE_IN_SOURCE_BUILD=1 +inherit autotools cmake flag-o-matic java-pkg-opt-2 optfeature systemd xdg + +XSERVER_VERSION="21.1.13" +XSERVER_PATCH_VERSION="21" + +DESCRIPTION="Remote desktop viewer display system" +HOMEPAGE="https://tigervnc.org" +SRC_URI="server? ( ftp://ftp.freedesktop.org/pub/xorg/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 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="dri3 +drm gnutls java nls +opengl +server +viewer xinerama" +REQUIRED_USE=" + dri3? ( drm ) + java? ( viewer ) + opengl? ( server ) + || ( server viewer ) +" + +# TODO: sys-libs/libselinux +COMMON_DEPEND=" + dev-libs/gmp:= + dev-libs/nettle:= + media-libs/libjpeg-turbo:= + sys-libs/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/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 + opengl? ( media-libs/libglvnd[X] ) + !net-misc/turbovnc[server] + ) + viewer? ( + media-video/ffmpeg:= + x11-libs/fltk: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/libxcvt + 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 ) +" + +PATCHES=( + # Restore Java viewer + "${FILESDIR}"/${PN}-1.11.0-install-java-viewer.patch + "${FILESDIR}"/${PN}-1.14.0-xsession-path.patch + "${FILESDIR}"/${PN}-1.12.80-disable-server-and-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 arm || use hppa; then + append-flags "-fPIC" + fi + + local mycmakeargs=( + -DENABLE_GNUTLS=$(usex gnutls) + -DENABLE_NLS=$(usex nls) + -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_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/vncserver@.service + + # comment out pam_selinux.so, the server does not start if missing + # part of bug #746227 + sed -i -e '/pam_selinux/s/^/#/' "${ED}"/etc/pam.d/tigervnc || die + + # 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 && [[ -n ${REPLACING_VERSIONS} ]] && ver_test "${REPLACING_VERSIONS}" -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} +} -- cgit v1.2.3