summaryrefslogtreecommitdiff
path: root/net-misc/tigervnc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-24 13:27:08 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-24 13:27:08 +0100
commitbfc2a8298cab03d289dc2cfed63308396fa0babe (patch)
tree2d4288572b0938dcfc64edd39a4c1086402931a5 /net-misc/tigervnc
parente28a6e6eb5373071be3a09aa457f0488d753c80c (diff)
gentoo auto-resync : 24:06:2023 - 13:27:08
Diffstat (limited to 'net-misc/tigervnc')
-rw-r--r--net-misc/tigervnc/Manifest5
-rw-r--r--net-misc/tigervnc/files/tigervnc-1.13.1.confd13
-rw-r--r--net-misc/tigervnc/files/tigervnc-1.13.1.initd88
-rw-r--r--net-misc/tigervnc/tigervnc-1.13.1-r3.ebuild230
-rw-r--r--net-misc/tigervnc/tigervnc-9999.ebuild11
5 files changed, 340 insertions, 7 deletions
diff --git a/net-misc/tigervnc/Manifest b/net-misc/tigervnc/Manifest
index 2376c10c9a1c..61a46015f3f5 100644
--- a/net-misc/tigervnc/Manifest
+++ b/net-misc/tigervnc/Manifest
@@ -3,8 +3,11 @@ AUX tigervnc-1.12.0-xsession-path.patch 973 BLAKE2B c193ccc5ad0d8e04f8cd9f755c9d
AUX tigervnc-1.12.0.confd 665 BLAKE2B 1525706e3e60727ed0f3eeb0dcfc849ea2b92463d9c4bff09eb9e644e51aa7665ff96d0f0c5ec321014145f8227d7c7b94578a97d948bfc94cacbc4087ebc184 SHA512 bced660d691f559ab9392aef7ea0040ea5f435d7f1cfef9b82983395c10103b8607e90a03de67d330371d641bf249ec61200b9d28d48600f7548978b7ee367c6
AUX tigervnc-1.12.0.initd 2149 BLAKE2B 7d7389128816ad07ba0890d57c113834fc325b00729a5e3979dca5c25e9940690aab9e10d7e6a94a8645002cc15dcbd54137636b373c99f86454a5873870ed72 SHA512 c1047acf1211c4073a4581d5bfe78dec00320e0749b44608224cc478ac335233cd7beacbd161f61330fe28c2a6fa8de137b2c80e9ebda9d92f90b062f489eecb
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
DIST tigervnc-1.13.1.tar.gz 1989081 BLAKE2B 3f4d395c2788a4d475dcd42793c43f249264db586da85f99d7e0f64ea37854831c61bb5c99945578f8dbeac5ee30e0f7b46fa7f215768c70e750d50689cd4e7a SHA512 9190dbcd3b57ba52286c158c0675104d68463d7e3ea8e23493514b64451ddb511f3daf0f177339bc231155daea376d9c8dc58216663e10aa12f67468f4559da5
DIST xorg-server-21.1.8.tar.xz 4980208 BLAKE2B a223efe6d14b55bd133b7f8db75b7720ea0ae58f1eced0f6b20caf6e7045e7649a0923a1c6db5d649265375e6768fa9811477d2fa0da52d7a1e65cf4511535d2 SHA512 6104b3620ed2e1e27d9a8e963388bbe8785a764585b1bc03dbf5d719a92894773dda580d377ca18ceeab353e65a5d23cc947bab84a4012f9dd1eca31cac36937
EBUILD tigervnc-1.13.1-r2.ebuild 5268 BLAKE2B 45352e11fbd53ce50dc7af7a8e182bb7e1e56d236398f0407afafd2cb585caa8cc0a0f3d92094e5188fde658524041a8e15f81b52ee19ec66fb3c9902b5a7dff SHA512 ac9bb8b04ac34794c019286df64519a750eca97c132db3f788c1bc2c5710530f6bbebd58dca7ac3d4a89259ec0826d498b7e62a71baa7d42ce8b8ddb5dfb15b4
-EBUILD tigervnc-9999.ebuild 5273 BLAKE2B 21db9a7d076814705a9292835dab34c68c2ebf3db19294876df0cb87584fe9d6d8885454d167e80126c520d5feb7464755d4ca3a2420e5559664fbee3015c4f8 SHA512 43dfdb28fe460ff0051e0da97ddededc40d7adc8676a6c8c74ce16dafcc3c5abedfffd675718518c8436a40b4ca7b754ed8008012507106398a06cd14ac9d147
+EBUILD tigervnc-1.13.1-r3.ebuild 5437 BLAKE2B ecc064290a987ec75cccb658a7a1495d762acb6a3f7f312d24da426b5826b8ebbfcff50f4e2e0c1a892999c70c81feda03cfb0277ada6741fd7e197fbec2d183 SHA512 b23d395efd9211806425866fb859771bf32ff78dc8f8fc0c78137b8fd6df1efc502934b902e2682a8e35e9d19383c05b08d449483bb5a46a741d9ed9394bedea
+EBUILD tigervnc-9999.ebuild 5364 BLAKE2B f2bc3c8b4a83d01989fc5d353a2afb78f7e04413c5fab6bfdcf927a9b992dfa5426e25db8ec541aaaa3b0cc3160323cfc340d5a034ee51c47b1a27076dc2d7c6 SHA512 060c2b282be98fa105fc862beafd60632e9b5967dc6f57b1149ab0be7b33b899875a2af32abfd88fff16d82d2f0a57361373d28726e225c2fd7be5ddc7150fd1
MISC metadata.xml 602 BLAKE2B cd3ae9a2fa5758627621230b5bc005b46c65d028764c5578d7684ae7aaa6403d301a59476e2aae6fa4a7a1f38cd0d8c23a7db3a784666aa2f375267444c48658 SHA512 16c1ccff038df995cbe4bace496636e41f1de9c28ad25c45d49f63485d3b7b71d9682866ff1b005acc7b401d66112c1709048298a77fb1c0baadc879fa236743
diff --git a/net-misc/tigervnc/files/tigervnc-1.13.1.confd b/net-misc/tigervnc/files/tigervnc-1.13.1.confd
new file mode 100644
index 000000000000..bb6dae7df032
--- /dev/null
+++ b/net-misc/tigervnc/files/tigervnc-1.13.1.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/.vnc/config instead
diff --git a/net-misc/tigervnc/files/tigervnc-1.13.1.initd b/net-misc/tigervnc/files/tigervnc-1.13.1.initd
new file mode 100644
index 000000000000..f7e72fa84c07
--- /dev/null
+++ b/net-misc/tigervnc/files/tigervnc-1.13.1.initd
@@ -0,0 +1,88 @@
+#!/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
+ elif ! runuser -l "${user}" -c "[ -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/tigervnc-1.13.1-r3.ebuild b/net-misc/tigervnc/tigervnc-1.13.1-r3.ebuild
new file mode 100644
index 000000000000..14114aae2041
--- /dev/null
+++ b/net-misc/tigervnc/tigervnc-1.13.1-r3.ebuild
@@ -0,0 +1,230 @@
+# Copyright 1999-2023 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.8"
+XSERVER_PATCH_VERSION="21.1.1"
+
+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 's:\(present.h\):../present/\1:' os/utils.c || die
+ 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 \
+ --disable-present \
+ --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 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.1.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 && {
+ 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:'
+ }
+
+ 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-9999.ebuild b/net-misc/tigervnc/tigervnc-9999.ebuild
index a1d75fef3750..23b38081e296 100644
--- a/net-misc/tigervnc/tigervnc-9999.ebuild
+++ b/net-misc/tigervnc/tigervnc-9999.ebuild
@@ -72,10 +72,7 @@ COMMON_DEPEND="
"
RDEPEND="${COMMON_DEPEND}
java? ( >=virtual/jre-1.8:* )
- server? (
- dev-lang/perl
- sys-process/psmisc
- )
+ server? ( dev-lang/perl )
"
DEPEND="${COMMON_DEPEND}
java? ( >=virtual/jdk-1.8:* )
@@ -203,8 +200,8 @@ src_install() {
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.12.0.confd ${PN}
- newinitd "${FILESDIR}"/${PN}-1.12.0.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}-1.13.1.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}-1.13.1.initd ${PN}
systemd_douserunit unix/vncserver/vncserver@.service
@@ -220,6 +217,8 @@ src_install() {
pkg_postinst() {
xdg_pkg_postinst
+ use server && elog 'OpenRC users: please migrate to one service per display as documented here' #FIXME: add link
+
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 && \