net-misc/tigervnc: disable-server-and-pam
Bug: 852830 Applied tigervnc-1.12.0-disable-server-and-pam.patch
This commit is contained in:
parent
e1b1518082
commit
6062b1a119
9 changed files with 489 additions and 0 deletions
11
net-misc/tigervnc/Manifest
Normal file
11
net-misc/tigervnc/Manifest
Normal file
|
@ -0,0 +1,11 @@
|
|||
AUX tigervnc-1.11.0-install-java-viewer.patch 788 BLAKE2B b3da744d21030bf988dc21bca66a17811b1180ad89fcbc6e3ca8b70b8803c284456cc14393dddf5f2f395d9044d90e8ac8ee50d155be7779b08c14d7bbcb270b SHA512 5f9650a6f8589ab952506cbf6a67f603fc720a70dd76a505da69812c039fb9a0a4137c9667ce11e253a35bade056a18d2fa584ac23cda8111ff1fe17e90f025a
|
||||
AUX tigervnc-1.12.0-disable-server-and-pam.patch 1673 BLAKE2B 0c2fc893988878e3afb4a857d1e08cbef0fd969a97c9e21fe72dc2668c02fcb9a6be3bb081c85a6bbc3ade90aa1daba4156110f70e06d46a5d90d90e70d67fe8 SHA512 0cc24a2ddedc77bd3f905a5b90886524aed1508c812acaeccd87333dcc7298ed1c07250b78d355569cc2af946af3637eddb29ac5004e17ba300b55700cd9e969
|
||||
AUX tigervnc-1.12.0-xorg-1.21.patch 1756 BLAKE2B c872216f03b595f61e91d876546c573ed572b20e9ead1e4ded7d830c739dc172a016784902d447dbe8aa78bb5a2e69c4ef6a4357f446af53f7bc569d56108dac SHA512 533ff06e9619cd63ee83dcb3e6a5a35f02f092b32b194f89e2c06f2f17aaf59a3c2adab27d3e87c4a0773f3f82cfec82492d6b031b3a9050d5f0ad4fcf0a0da0
|
||||
AUX tigervnc-1.12.0-xsession-path.patch 973 BLAKE2B c193ccc5ad0d8e04f8cd9f755c9d5b4a013af8bd4f9bbf9de4afbf21482fc62cbe1d57cc0274c5810588177db17b6cf1c69f5336e40cd3ccdefe0fa21bb1f736 SHA512 916e4f114834bcd4ccb2375ce35f7b36ad13496599e1a8aa736edf31627cd95eaab8b29e0fb9cfb07aa56856b2defbf916c23218debe1d62522d8dbac8674f38
|
||||
AUX tigervnc-1.12.0.confd 665 BLAKE2B 1525706e3e60727ed0f3eeb0dcfc849ea2b92463d9c4bff09eb9e644e51aa7665ff96d0f0c5ec321014145f8227d7c7b94578a97d948bfc94cacbc4087ebc184 SHA512 bced660d691f559ab9392aef7ea0040ea5f435d7f1cfef9b82983395c10103b8607e90a03de67d330371d641bf249ec61200b9d28d48600f7548978b7ee367c6
|
||||
AUX tigervnc-1.12.0.initd 2149 BLAKE2B 7d7389128816ad07ba0890d57c113834fc325b00729a5e3979dca5c25e9940690aab9e10d7e6a94a8645002cc15dcbd54137636b373c99f86454a5873870ed72 SHA512 c1047acf1211c4073a4581d5bfe78dec00320e0749b44608224cc478ac335233cd7beacbd161f61330fe28c2a6fa8de137b2c80e9ebda9d92f90b062f489eecb
|
||||
DIST tigervnc-1.12.0-xserver-21.patch 3642 BLAKE2B 690860c51d9d2e4606b16318237f86e5a042410dd5778e3d99a01df3fedd7f1993b4fc1eaeb9d193ef9e54d5b25b1d99bfb0bedc8cfb6673983625d9b45c2f92 SHA512 8e9a667557d22e908b1f4e58017f822e98bc608d1e27a09e6b8cfb3b01fe0c5cf9bf484fa634e4109eb7a32234df67fcfdeaca92d4ff982de0e83778c359034d
|
||||
DIST tigervnc-1.12.0.tar.gz 1561898 BLAKE2B 891934e48e3c4f2c36c280ad1562874d3c22ca3118e8eda2f68f9ad7cca978c76b8825100f540774b7a6553e981bd9264e0f717c8313585553741d31706cafad SHA512 a16b15e9cda552a49a3934e4174e49d186d06494d90d11582599ab82559014332662aed7760619a6dfb32a8c95f7d63c68ac7d632c29dd662a6b713f036672bb
|
||||
DIST xorg-server-21.1.1.tar.xz 4958508 BLAKE2B fadac208773700b91003ef18d46e6f2c6b501e59b7491c943f406641e9ff3837a8126034c023e9b6d2d4131ee438c1ef94fa458af1828d4be325519b47069a79 SHA512 8608ed9c1537c95e8a3adea5e3e372a3c5eb841f8e27c84283093f22fb1909e16a800006510da684b13f8f237f33b8a4be3e2537f5f9ab9af4c5ad12770eef0d
|
||||
EBUILD tigervnc-1.12.0-r6.ebuild 4697 BLAKE2B 81b82c663148550aaffdce525b9d3b7824fb27a9f7f87feb5557aab92c81d00b82eccc15f39ed1cd1bee2681b51b6ce2f5ab1e7208dbcfbb2d1db2b3ed00f021 SHA512 01b122e55ebc88afd5471bda775020ed9f91448c3b0f9256a5ea06518023c1c352576823ffde9a136362fc895804f9b68452601804d8a9a806d391b5c98e3abb
|
||||
MISC metadata.xml 706 BLAKE2B 221033648808798dd4d0be5db1374b76552a2a92eb5dc7b57f11c3feb7774e8fd85fd81f740753e3007bfd431fee4d4686210a5c1f2e967c2a67b76dfe03bb7f SHA512 f69cadf29c700280cae57028179c5e94eca3a3a71c82093bb7236e908d4407e149622aa39fc0a71ab25eab93a6250750cc95cdaa7ae933fd7f332de50250f845
|
|
@ -0,0 +1,26 @@
|
|||
See bug for rationale, gist is that this is still useful.
|
||||
|
||||
Patch from Erik Wallin <erikw@sizeit.se>
|
||||
https://bugs.gentoo.org/769794
|
||||
--- a/java/CMakeLists.txt
|
||||
+++ b/java/CMakeLists.txt
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
find_package(Java)
|
||||
|
||||
+set(DATA_DIR "${CMAKE_INSTALL_PREFIX}/share")
|
||||
+
|
||||
set(DEFAULT_JAVACFLAGS "-source 8 -target 8 -encoding UTF-8 -Xlint:all,-serial,-cast,-unchecked,-fallthrough,-dep-ann,-deprecation,-rawtypes")
|
||||
set(JAVACFLAGS ${DEFAULT_JAVACFLAGS} CACHE STRING
|
||||
"Java compiler flags (Default: ${DEFAULT_JAVACFLAGS})")
|
||||
@@ -172,3 +174,10 @@
|
||||
-P ${SRCDIR}/cmake/SignJar.cmake)
|
||||
|
||||
add_custom_target(java ALL DEPENDS VncViewer.jar)
|
||||
+
|
||||
+if(NOT WIN32)
|
||||
+ install(FILES
|
||||
+ ${BINDIR}/VncViewer.jar
|
||||
+ ${SRCDIR}/${CLASSPATH}/README
|
||||
+ DESTINATION ${DATA_DIR}/vnc/classes)
|
||||
+endif()
|
|
@ -0,0 +1,62 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index bba6085..b5dcfb0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -275,19 +275,6 @@ if(ENABLE_GNUTLS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-# Check for PAM library
|
||||
-if(UNIX AND NOT APPLE)
|
||||
- check_include_files(security/pam_appl.h HAVE_PAM_H)
|
||||
- set(CMAKE_REQUIRED_LIBRARIES -lpam)
|
||||
- check_function_exists(pam_start HAVE_PAM_START)
|
||||
- set(CMAKE_REQUIRED_LIBRARIES)
|
||||
- if(HAVE_PAM_H AND HAVE_PAM_START)
|
||||
- set(PAM_LIBS pam)
|
||||
- else()
|
||||
- message(FATAL_ERROR "Could not find PAM development files")
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
# Generate config.h and make sure the source finds it
|
||||
configure_file(config.h.in config.h)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
@@ -315,9 +302,6 @@ if(BUILD_VIEWER)
|
||||
add_subdirectory(media)
|
||||
endif()
|
||||
|
||||
-add_subdirectory(tests)
|
||||
-
|
||||
-
|
||||
if(BUILD_VIEWER)
|
||||
add_subdirectory(release)
|
||||
endif()
|
||||
diff --git a/common/rfb/CMakeLists.txt b/common/rfb/CMakeLists.txt
|
||||
index fc5a37b..d3fd783 100644
|
||||
--- a/common/rfb/CMakeLists.txt
|
||||
+++ b/common/rfb/CMakeLists.txt
|
||||
@@ -75,12 +75,6 @@ endif(WIN32)
|
||||
|
||||
set(RFB_LIBRARIES ${JPEG_LIBRARIES} ${PIXMAN_LIBRARY} os rdr)
|
||||
|
||||
-if(UNIX AND NOT APPLE)
|
||||
- set(RFB_SOURCES ${RFB_SOURCES} UnixPasswordValidator.cxx
|
||||
- UnixPasswordValidator.h pam.c pam.h)
|
||||
- set(RFB_LIBRARIES ${RFB_LIBRARIES} ${PAM_LIBS})
|
||||
-endif()
|
||||
-
|
||||
if(GNUTLS_FOUND)
|
||||
set(RFB_SOURCES
|
||||
${RFB_SOURCES}
|
||||
diff --git a/unix/CMakeLists.txt b/unix/CMakeLists.txt
|
||||
index 5456e00..09ac599 100644
|
||||
--- a/unix/CMakeLists.txt
|
||||
+++ b/unix/CMakeLists.txt
|
||||
@@ -1,6 +1,3 @@
|
||||
add_subdirectory(tx)
|
||||
add_subdirectory(common)
|
||||
-add_subdirectory(vncconfig)
|
||||
add_subdirectory(vncpasswd)
|
||||
-add_subdirectory(vncserver)
|
||||
-add_subdirectory(x0vncserver)
|
55
net-misc/tigervnc/files/tigervnc-1.12.0-xorg-1.21.patch
Normal file
55
net-misc/tigervnc/files/tigervnc-1.12.0-xorg-1.21.patch
Normal file
|
@ -0,0 +1,55 @@
|
|||
https://github.com/TigerVNC/tigervnc/commit/736b50d04e1ba965696cd15d456dc2b7fc123150.patch
|
||||
https://github.com/TigerVNC/tigervnc/commit/f2577107f7f55382c524d8c738a777e5cdd80f60.patch
|
||||
|
||||
From: Joakim Tjernlund <joakim.tjernlund@infinera.com>
|
||||
Date: Wed, 24 Nov 2021 21:09:36 +0100
|
||||
Subject: [PATCH] xorg-version.h: Increase supported Xorg version to 1.21
|
||||
|
||||
--- a/unix/xserver/hw/vnc/xorg-version.h
|
||||
+++ b/unix/xserver/hw/vnc/xorg-version.h
|
||||
@@ -33,8 +33,8 @@
|
||||
#error "X.Org older than 1.16 is not supported"
|
||||
#endif
|
||||
|
||||
-#if XORG_AT_LEAST(1, 21, 0)
|
||||
-#error "X.Org newer than 1.20 is not supported"
|
||||
+#if XORG_AT_LEAST(1, 22, 0)
|
||||
+#error "X.Org newer than 1.21 is not supported"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
From: Joakim Tjernlund <joakim.tjernlund@infinera.com>
|
||||
Date: Wed, 24 Nov 2021 21:10:56 +0100
|
||||
Subject: [PATCH] xvnc: adapt for 1.21
|
||||
|
||||
VENDOR_STRING is gone as is DEFAULT_LOG_VERBOSITY
|
||||
site.h has been removed and is not needed.
|
||||
--- a/unix/xserver/hw/vnc/xvnc.c
|
||||
+++ b/unix/xserver/hw/vnc/xvnc.c
|
||||
@@ -69,7 +69,6 @@ extern char buildtime[];
|
||||
#undef VENDOR_RELEASE
|
||||
#undef VENDOR_STRING
|
||||
#include "version-config.h"
|
||||
-#include "site.h"
|
||||
|
||||
#define XVNCVERSION "TigerVNC 1.12.80"
|
||||
#define XVNCCOPYRIGHT ("Copyright (C) 1999-2021 TigerVNC Team and many others (see README.rst)\n" \
|
||||
@@ -111,14 +110,13 @@ static Bool Render = TRUE;
|
||||
static Bool displaySpecified = FALSE;
|
||||
static char displayNumStr[16];
|
||||
|
||||
-static int vncVerbose = DEFAULT_LOG_VERBOSITY;
|
||||
+static int vncVerbose = 0;
|
||||
|
||||
static void
|
||||
vncPrintBanner(void)
|
||||
{
|
||||
ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT);
|
||||
- ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE,
|
||||
- VENDOR_STRING);
|
||||
+ ErrorF("Underlying X server release %d\n\n", VENDOR_RELEASE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
28
net-misc/tigervnc/files/tigervnc-1.12.0-xsession-path.patch
Normal file
28
net-misc/tigervnc/files/tigervnc-1.12.0-xsession-path.patch
Normal file
|
@ -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
|
||||
|
||||
--- 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 (-x "$cmd") {
|
||||
+ $Xsession = $cmd;
|
||||
+ last;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
if (not defined $Xsession) {
|
||||
die "$prog: Couldn't find suitable Xsession.\n";
|
15
net-misc/tigervnc/files/tigervnc-1.12.0.confd
Normal file
15
net-misc/tigervnc/files/tigervnc-1.12.0.confd
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Config file for /etc/init.d/tigervnc
|
||||
|
||||
# Specify the user(s) Xvnc(1) should be run for. The syntax is: "username:display".
|
||||
# example: "DISPLAYS="foo:1 bar:2" You can specify more users separated by space.
|
||||
# DISPLAYS="myuser:1"
|
||||
# Do not forget to add them to /etc/tigervnc/vncserver.users too
|
||||
|
||||
# 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
|
72
net-misc/tigervnc/files/tigervnc-1.12.0.initd
Normal file
72
net-misc/tigervnc/files/tigervnc-1.12.0.initd
Normal file
|
@ -0,0 +1,72 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||
|
||||
# shellcheck shell=sh
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ -n "${DISPLAYS}" ]; then
|
||||
if [ "$1" = "start" ]; then
|
||||
for user in $DISPLAYS; do
|
||||
# bug #690046
|
||||
if ! 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${user##*:}" ]; then
|
||||
eerror "Display :${user##*:} appears to be already in use because of /tmp/.X11-unix/X${user##*:}"
|
||||
eerror "Remove this file if there is no X server for :${user##*:}"
|
||||
return 1
|
||||
elif [ -e "/tmp/.X${user##*:}-lock" ]; then
|
||||
eerror "Display :${user##*:} appears to be already in use because of /tmp/.X${user##*:}-lock"
|
||||
eerror "Remove this file if there is no X server for :${user##*:}"
|
||||
return 1
|
||||
elif ! grep -E "^[^#]*:${user##*:}=${user%%:*}" /etc/tigervnc/vncserver.users > /dev/null 2>&1; then
|
||||
eerror "User ${user%%:*} is not defined for display :${user##*:} in /etc/tigervnc/vncserver.users"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
return 0
|
||||
else
|
||||
# here it is intended for $DISPLAYS to not expand
|
||||
# shellcheck disable=SC2016
|
||||
eerror 'Please define $DISPLAYS in /etc/conf.d/tigervnc'
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig start || return 1
|
||||
ebegin "Starting TigerVNC server"
|
||||
for user in $DISPLAYS; do
|
||||
[ -n "${TIGERVNC_XSESSION_FILE}" ] && export TIGERVNC_XSESSION_FILE
|
||||
/usr/libexec/vncsession-start ":${user##*:}" >/dev/null 2>&1
|
||||
done
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
checkconfig stop || return 2
|
||||
ebegin "Stopping TigerVNC server"
|
||||
for user in $DISPLAYS; do
|
||||
# vncserver no longer provides a `-kill` option
|
||||
# killing vncsession does not work, we have to kill Xvnc
|
||||
# run pstree to see exactly what's going on
|
||||
sessionpid=$(cat /run/vncsession-:"${user##*:}".pid)
|
||||
serverpid=$(pstree -p "$sessionpid" | grep Xvnc | sed -e 's/^.*Xvnc(//
|
||||
s/).*$//')
|
||||
kill "$serverpid" >/dev/null 2>&1
|
||||
done
|
||||
# Do not fail if a server is missing
|
||||
/bin/true
|
||||
eend $?
|
||||
}
|
||||
|
||||
restart() {
|
||||
svc_stop
|
||||
svc_start
|
||||
}
|
21
net-misc/tigervnc/metadata.xml
Normal file
21
net-misc/tigervnc/metadata.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>ceamac.paragon@gmail.com</email>
|
||||
<name>Viorel Munteanu</name>
|
||||
</maintainer>
|
||||
<maintainer type="project" proxied="proxy">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="drm">Build with DRM support</flag>
|
||||
<flag name="server">Build TigerVNC server</flag>
|
||||
<flag name="xorgmodule">Build the Xorg module</flag>
|
||||
<flag name="dri3">Build with DRI3 support</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">TigerVNC/tigervnc</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
199
net-misc/tigervnc/tigervnc-1.12.0-r6.ebuild
Normal file
199
net-misc/tigervnc/tigervnc-1.12.0-r6.ebuild
Normal file
|
@ -0,0 +1,199 @@
|
|||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
CMAKE_IN_SOURCE_BUILD=1
|
||||
inherit autotools cmake flag-o-matic java-pkg-opt-2 optfeature systemd xdg
|
||||
|
||||
XSERVER_VERSION="21.1.1"
|
||||
|
||||
DESCRIPTION="Remote desktop viewer display system"
|
||||
HOMEPAGE="https://www.tigervnc.org"
|
||||
SRC_URI="https://github.com/TigerVNC/tigervnc/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
server? (
|
||||
ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.xz
|
||||
https://github.com/TigerVNC/tigervnc/commit/0c5a2b2e7759c2829c07186cfce4d24aa9b5274e.patch -> ${P}-xserver-21.patch
|
||||
)"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~sparc x86"
|
||||
IUSE="dri3 +drm gnutls java nls +opengl +server xinerama"
|
||||
REQUIRED_USE="
|
||||
dri3? ( drm )
|
||||
opengl? ( server )
|
||||
"
|
||||
|
||||
CDEPEND="
|
||||
media-libs/libjpeg-turbo:=
|
||||
sys-libs/zlib:=
|
||||
x11-libs/fltk:1
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/libXi
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libXrender
|
||||
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-libs/xtrans
|
||||
x11-apps/xauth
|
||||
x11-apps/xinit
|
||||
x11-apps/xkbcomp
|
||||
x11-apps/xsetroot
|
||||
x11-misc/xkeyboard-config
|
||||
opengl? ( media-libs/libglvnd[X] )
|
||||
)
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
java? ( virtual/jre:1.8 )
|
||||
server? (
|
||||
dev-lang/perl
|
||||
sys-process/psmisc
|
||||
)"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
drm? ( x11-libs/libdrm )
|
||||
server? (
|
||||
media-fonts/font-util
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libxcvt
|
||||
x11-libs/libxkbfile
|
||||
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
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
if use server; then
|
||||
cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/. unix/xserver || die
|
||||
eapply "${FILESDIR}"/${P}-xorg-1.21.patch
|
||||
eapply "${DISTDIR}"/${P}-xserver-21.patch
|
||||
else
|
||||
PATCHES+=("${FILESDIR}/${PN}-1.12.0-disable-server-and-pam.patch")
|
||||
fi
|
||||
|
||||
cmake_src_prepare
|
||||
|
||||
if use server; then
|
||||
cd unix/xserver || die
|
||||
eapply ../xserver${XSERVER_VERSION}.patch
|
||||
eautoreconf
|
||||
sed -i 's:\(present.h\):../present/\1:' os/utils.c || die
|
||||
sed -i '/strcmp.*-fakescreenfps/,/^ \}/d' os/utils.c || die
|
||||
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)
|
||||
)
|
||||
|
||||
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}-${PV}.confd ${PN}
|
||||
newinitd "${FILESDIR}"/${PN}-${PV}.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
|
||||
|
||||
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}
|
||||
}
|
Loading…
Reference in a new issue