commit:     da4a46a43b19ab5483c93d45b20b9f0384d3cbc7
Author:     Tact Yoshida <otakuto.gentoo <AT> gmail <DOT> com>
AuthorDate: Thu Jul 19 03:13:11 2018 +0000
Commit:     Tony Vroon <chainsaw <AT> gentoo <DOT> org>
CommitDate: Mon Jul 23 08:46:15 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da4a46a4

net-misc/tigervnc: Version bump to 1.9.0

Package-Manager: Portage-2.3.40, Repoman-2.3.9
Closes: https://github.com/gentoo/gentoo/pull/9275

 net-misc/tigervnc/Manifest                         |   2 +
 .../files/tigervnc-1.9.0-030_manpages.patch        |  55 ++++++
 .../files/tigervnc-1.9.0-055_xstartup.patch        |  33 ++++
 .../files/xserver120-drmfourcc-header.patch        |  36 ++++
 net-misc/tigervnc/files/xserver120.patch           |  91 ++++++++++
 net-misc/tigervnc/metadata.xml                     |  20 +--
 net-misc/tigervnc/tigervnc-1.9.0.ebuild            | 196 +++++++++++++++++++++
 7 files changed, 423 insertions(+), 10 deletions(-)

diff --git a/net-misc/tigervnc/Manifest b/net-misc/tigervnc/Manifest
index 95da57ad284..3df4fac3055 100644
--- a/net-misc/tigervnc/Manifest
+++ b/net-misc/tigervnc/Manifest
@@ -1,3 +1,5 @@
 DIST tigervnc-1.4.2-patches-0.1.tar.bz2 7361 BLAKE2B 
5e4aed97f3b1e88488f1f080b11afb515d70fcf5b9a20074436a97b3a54a89bd308bacec5584263a7cd72ef3f8b8863102cbd8ab3685cb3251764f5f23f4a037
 SHA512 
86235aba8e735e4afed21d2940cee8ea2f4f1bc951db79aaf481ae79ab81d4518add6be2619ce9371f77fd068c8dbf069754ecc0168e5afe9e8505d3d61cc573
 DIST tigervnc-1.8.0.tar.gz 1433830 BLAKE2B 
bdbe0e11a1459dc6328c7c54e8062f0628b952e33fcbe6ffe93c1b2148b52a17fd99fcae333b2eddf5256ffd0376a83634521473c2cd8937ba95b69bf133c796
 SHA512 
c066e9781622e342667bf03fd6bbb94ed17b412b07c46764b7b73b2eb308c285e865cf1e901f7d218db05a0486fb3f8877e75da3c939ef0d020247713779327a
+DIST tigervnc-1.9.0.tar.gz 1506520 BLAKE2B 
292c2e5fb9ffe2573e216257e889d259abfdca5964559492c318e24ea00563211e7477a4f1b2b09d0e962343d4aeb2c12dcfdd6857a3282882ee9f91fdf8103a
 SHA512 
333910f567e6b5e4a5a22d898b2d4c3f4b834cb4cc8fc13ff55d31401894c0d5122a127692ec5eb51e412c945ff3ea5b8146f9ab22cbe1e47541e09239ec8c9d
 DIST xorg-server-1.19.5.tar.bz2 5965044 BLAKE2B 
23375793ea4459a962f412440e307081ce2acd3c646e5db4d1bfac20e267bcbb1752ba8f6de66df06d25eaf92d1b55082a80eced0d44c257a757d5926ca6a7f3
 SHA512 
928dea5850b98cd815004cfa133eca23cfa9521920c934c68a92787f2cae13cca1534eee772a4fb74b8ae8cb92662b5d68b95b834c8aa8ec57cd57cb4e5dd45c
+DIST xorg-server-1.20.0.tar.bz2 6096838 BLAKE2B 
34ee6d6dbbde54d54e082a0791e85ad52d728e239a7d8fadb75ebcbdbaab8752b90ca6d075f096d971db7ec68ce4ecac5c70fcf536ce23c20b8dce8f32e2c046
 SHA512 
1489e8511c9da682ef0460182dfeeddd241c72d4ef4d206d9706f1e39572c09953df851fab18cefb65a1ee4c6710c6ba13c63c9c9fc0bc1b5f12c50780412cde

diff --git a/net-misc/tigervnc/files/tigervnc-1.9.0-030_manpages.patch 
b/net-misc/tigervnc/files/tigervnc-1.9.0-030_manpages.patch
new file mode 100644
index 00000000000..8a30f18d7d9
--- /dev/null
+++ b/net-misc/tigervnc/files/tigervnc-1.9.0-030_manpages.patch
@@ -0,0 +1,55 @@
+diff --git a/unix/vncserver b/unix/vncserver
+index 9e7a6ac5..139f9601 100755
+--- a/unix/vncserver
++++ b/unix/vncserver
+@@ -684,6 +684,7 @@ sub Usage
+       "                 [-geometry <width>x<height>]\n".
+       "                 [-pixelformat rgbNNN|bgrNNN]\n".
+       "                 [-fp <font-path>]\n".
++      "                 [-cc <visual>]\n".
+       "                 [-fg]\n".
+       "                 [-autokill]\n".
+       "                 [-noxstartup]\n".
+diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx
+index f076565f..05669a42 100644
+--- a/vncviewer/vncviewer.cxx
++++ b/vncviewer/vncviewer.cxx
+@@ -352,6 +352,11 @@ static void usage(const char *programName)
+           "       %s [parameters] -listen [port] [parameters]\n"
+           "       %s [parameters] [.tigervnc file]\n",
+           programName, programName, programName);
++  fprintf(stderr,"\n"
++        "Options:\n\n"
++        "  -display Xdisplay - Specifies the X display for the viewer 
window\n"
++        "  -geometry geometry - Standard X position and sizing 
specification.\n");
++
+   fprintf(stderr,"\n"
+           "Parameters can be turned on with -<param> or off with -<param>=0\n"
+           "Parameters which take a value can be specified as "
+diff --git a/vncviewer/vncviewer.man b/vncviewer/vncviewer.man
+index 729c01d6..07dc58f1 100644
+--- a/vncviewer/vncviewer.man
++++ b/vncviewer/vncviewer.man
+@@ -240,6 +240,10 @@ This option specifies the preferred encoding to use from 
one of "Tight", "ZRLE",
+ Disable lossy JPEG compression in Tight encoding. Default is off.
+ .
+ .TP
++.B \-ImprovedHextile
++Try harder to compress data (default).
++.
++.TP
+ .B \-QualityLevel \fIlevel\fP
+ JPEG quality level. 0 = Low, 9 = High. May be adjusted automatically if
+ \fB-AutoSelect\fP is turned on. Default is 8.
+@@ -296,6 +300,11 @@ respectively.
+ .B \-AlertOnFatalError
+ Display a dialog with any fatal error before exiting. Default is on.
+ 
++.
++.TP
++.B \-ZlibLevel
++Zlib compression level.
++
+ .SH FILES
+ .TP
+ $HOME/.vnc/default.tigervnc

diff --git a/net-misc/tigervnc/files/tigervnc-1.9.0-055_xstartup.patch 
b/net-misc/tigervnc/files/tigervnc-1.9.0-055_xstartup.patch
new file mode 100644
index 00000000000..8b50d8ccf15
--- /dev/null
+++ b/net-misc/tigervnc/files/tigervnc-1.9.0-055_xstartup.patch
@@ -0,0 +1,33 @@
+diff --git a/unix/vncserver b/unix/vncserver
+index 9e7a6ac5..fff53bdb 100755
+--- a/unix/vncserver
++++ b/unix/vncserver
+@@ -63,27 +63,7 @@ $defaultXStartup
+     = ("#!/bin/sh\n\n".
+        "unset SESSION_MANAGER\n".
+        "unset DBUS_SESSION_BUS_ADDRESS\n".
+-       "OS=`uname -s`\n".
+-       "if [ \$OS = 'Linux' ]; then\n".
+-       "  case \"\$WINDOWMANAGER\" in\n".
+-       "    \*gnome\*)\n".
+-       "      if [ -e /etc/SuSE-release ]; then\n".
+-       "        PATH=\$PATH:/opt/gnome/bin\n".
+-       "        export PATH\n".
+-       "      fi\n".
+-       "      ;;\n".
+-       "  esac\n".
+-       "fi\n".
+-       "if [ -x /etc/X11/xinit/xinitrc ]; then\n".
+-       "  exec /etc/X11/xinit/xinitrc\n".
+-       "fi\n".
+-       "if [ -f /etc/X11/xinit/xinitrc ]; then\n".
+-       "  exec sh /etc/X11/xinit/xinitrc\n".
+-       "fi\n".
+-       "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n".
+-       "xsetroot -solid grey\n".
+-       "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
+-       "twm &\n");
++       "exec /etc/X11/xinit/xinitrc\n");
+ 
+ $defaultConfig
+     = ("## Supported server options to pass to vncserver upon invocation can 
be listed\n".

diff --git a/net-misc/tigervnc/files/xserver120-drmfourcc-header.patch 
b/net-misc/tigervnc/files/xserver120-drmfourcc-header.patch
new file mode 100644
index 00000000000..4028ebb7451
--- /dev/null
+++ b/net-misc/tigervnc/files/xserver120-drmfourcc-header.patch
@@ -0,0 +1,36 @@
+diff -urpN xorg-server-1.20.0.orig/dri3/dri3.c xorg-server-1.20.0/dri3/dri3.c
+--- xorg-server-1.20.0.orig/dri3/dri3.c        2018-05-10 09:32:34.000000000 
-0700
++++ xorg-server-1.20.0/dri3/dri3.c     2018-06-13 19:32:52.131915519 -0700
+@@ -26,7 +26,7 @@
+ 
+ #include "dri3_priv.h"
+ 
+-#include <drm_fourcc.h>
++#include <libdrm/drm_fourcc.h>
+ 
+ static int dri3_request;
+ DevPrivateKeyRec dri3_screen_private_key;
+diff -urpN xorg-server-1.20.0.orig/dri3/dri3_request.c 
xorg-server-1.20.0/dri3/dri3_request.c
+--- xorg-server-1.20.0.orig/dri3/dri3_request.c        2018-05-10 
09:32:34.000000000 -0700
++++ xorg-server-1.20.0/dri3/dri3_request.c     2018-06-13 19:33:46.164444267 
-0700
+@@ -30,7 +30,7 @@
+ #include <xace.h>
+ #include "../Xext/syncsdk.h"
+ #include <protocol-versions.h>
+-#include <drm_fourcc.h>
++#include <libdrm/drm_fourcc.h>
+ 
+ static Bool
+ dri3_screen_can_one_point_two(ScreenPtr screen)
+diff -urpN xorg-server-1.20.0.orig/dri3/dri3_screen.c 
xorg-server-1.20.0/dri3/dri3_screen.c
+--- xorg-server-1.20.0.orig/dri3/dri3_screen.c 2018-05-10 09:32:34.000000000 
-0700
++++ xorg-server-1.20.0/dri3/dri3_screen.c      2018-06-13 19:33:13.885725528 
-0700
+@@ -29,7 +29,7 @@
+ #include <misync.h>
+ #include <misyncshm.h>
+ #include <randrstr.h>
+-#include <drm_fourcc.h>
++#include <libdrm/drm_fourcc.h>
+ #include <unistd.h>
+ 
+ int

diff --git a/net-misc/tigervnc/files/xserver120.patch 
b/net-misc/tigervnc/files/xserver120.patch
new file mode 100644
index 00000000000..e823a651ae0
--- /dev/null
+++ b/net-misc/tigervnc/files/xserver120.patch
@@ -0,0 +1,91 @@
+diff -urpN xorg-server-1.20.0.orig/configure.ac xorg-server-1.20.0/configure.ac
+--- xorg-server-1.20.0.orig/configure.ac       2018-05-10 09:32:34.000000000 
-0700
++++ xorg-server-1.20.0/configure.ac    2018-06-13 19:04:47.536413626 -0700
+@@ -74,6 +74,7 @@ dnl forcing an entire recompile.x
+ AC_CONFIG_HEADERS(include/version-config.h)
+ 
+ AM_PROG_AS
++AC_PROG_CXX
+ AC_PROG_LN_S
+ LT_PREREQ([2.2])
+ LT_INIT([disable-static win32-dll])
+@@ -1777,6 +1778,10 @@ if test "x$XVFB" = xyes; then
+       AC_SUBST([XVFB_SYS_LIBS])
+ fi
+ 
++dnl Xvnc DDX
++AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"])
++AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB 
$RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB 
$MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB 
$XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB"])
++AC_SUBST([XVNC_SYS_LIBS], ["$GLX_SYS_LIBS"])
+ 
+ dnl Xnest DDX
+ 
+@@ -1812,6 +1817,8 @@ if test "x$XORG" = xauto; then
+ fi
+ AC_MSG_RESULT([$XORG])
+ 
++AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg 
version])
++
+ if test "x$XORG" = xyes; then
+       XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 
-I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
+       XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support 
-I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
+@@ -2029,7 +2036,6 @@ if test "x$XORG" = xyes; then
+       AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
+       AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
+       AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
+-      AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current 
Xorg version])
+       AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
+       AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
+       AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
+@@ -2565,6 +2571,7 @@ hw/dmx/Makefile
+ hw/dmx/man/Makefile
+ hw/vfb/Makefile
+ hw/vfb/man/Makefile
++hw/vnc/Makefile
+ hw/xnest/Makefile
+ hw/xnest/man/Makefile
+ hw/xwin/Makefile
+diff -urpN xorg-server-1.20.0.orig/hw/Makefile.am 
xorg-server-1.20.0/hw/Makefile.am
+--- xorg-server-1.20.0.orig/hw/Makefile.am     2018-05-10 09:32:34.000000000 
-0700
++++ xorg-server-1.20.0/hw/Makefile.am  2018-06-13 19:04:47.536413626 -0700
+@@ -38,7 +38,8 @@ SUBDIRS =                    \
+       $(DMX_SUBDIRS)          \
+       $(KDRIVE_SUBDIRS)       \
+       $(XQUARTZ_SUBDIRS)      \
+-      $(XWAYLAND_SUBDIRS)
++      $(XWAYLAND_SUBDIRS)     \
++      vnc
+ 
+ DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xwayland
+ 
+diff -urpN xorg-server-1.20.0.orig/include/os.h xorg-server-1.20.0/include/os.h
+--- xorg-server-1.20.0.orig/include/os.h       2018-05-10 09:32:36.000000000 
-0700
++++ xorg-server-1.20.0/include/os.h    2018-06-13 19:04:47.537413618 -0700
+@@ -633,7 +633,7 @@ LogSetDisplay(void);
+ extern _X_EXPORT void
+ LogClose(enum ExitCode error);
+ extern _X_EXPORT Bool
+-LogSetParameter(LogParameter param, int value);
++LogSetParameter(enum _LogParameter param, int value);
+ extern _X_EXPORT void
+ LogVWrite(int verb, const char *f, va_list args)
+ _X_ATTRIBUTE_PRINTF(2, 0);
+diff -urpN xorg-server-1.20.0.orig/mi/miinitext.c 
xorg-server-1.20.0/mi/miinitext.c
+--- xorg-server-1.20.0.orig/mi/miinitext.c     2018-05-10 09:32:37.000000000 
-0700
++++ xorg-server-1.20.0/mi/miinitext.c  2018-06-13 19:05:14.742200675 -0700
+@@ -107,8 +107,15 @@ SOFTWARE.
+ #include "os.h"
+ #include "globals.h"
+ 
++#ifdef TIGERVNC
++extern void vncExtensionInit(INITARGS);
++#endif
++
+ /* List of built-in (statically linked) extensions */
+ static const ExtensionModule staticExtensions[] = {
++#ifdef TIGERVNC
++    {vncExtensionInit, "VNC-EXTENSION", NULL},
++#endif
+     {GEExtensionInit, "Generic Event Extension", &noGEExtension},
+     {ShapeExtensionInit, "SHAPE", NULL},
+ #ifdef MITSHM

diff --git a/net-misc/tigervnc/metadata.xml b/net-misc/tigervnc/metadata.xml
index 4dd36932fca..ca145c01b56 100644
--- a/net-misc/tigervnc/metadata.xml
+++ b/net-misc/tigervnc/metadata.xml
@@ -3,19 +3,19 @@
 <pkgmetadata>
     <maintainer type="person">
         <email>[email protected]</email>
-        <name>Takuto Yoshida</name>
+        <name>Tact Yoshida</name>
     </maintainer>
     <maintainer type="project">
         <email>[email protected]</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>
+    <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>

diff --git a/net-misc/tigervnc/tigervnc-1.9.0.ebuild 
b/net-misc/tigervnc/tigervnc-1.9.0.ebuild
new file mode 100644
index 00000000000..711d27363d3
--- /dev/null
+++ b/net-misc/tigervnc/tigervnc-1.9.0.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_IN_SOURCE_BUILD=1
+
+inherit autotools cmake-utils eutils flag-o-matic java-pkg-opt-2 systemd 
xdg-utils gnome2-utils
+
+XSERVER_VERSION="1.20.0"
+
+DESCRIPTION="Remote desktop viewer display system"
+HOMEPAGE="http://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.bz2
  )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc 
~x86"
+IUSE="+drm gnutls nls java +opengl pam server +xorgmodule xinerama dri3"
+
+CDEPEND="
+       virtual/jpeg:0
+       sys-libs/zlib:=
+       >=x11-libs/fltk-1.3.1
+       gnutls? ( net-libs/gnutls:= )
+       nls? ( virtual/libiconv )
+       pam? ( virtual/pam )
+       x11-libs/libX11
+       x11-libs/libXext
+       x11-libs/libXrender
+       server? (
+               x11-libs/libXau
+               x11-libs/libXdamage
+               x11-libs/libXdmcp
+               x11-libs/libXfont2
+               x11-libs/libXtst
+               >=x11-libs/pixman-0.27.2
+               >=x11-apps/xauth-1.0.3
+               x11-apps/xsetroot
+               >=x11-misc/xkeyboard-config-2.4.1-r3
+               opengl? ( virtual/opengl )
+               xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* )
+               drm? ( x11-libs/libdrm )
+       )
+       xinerama? ( x11-libs/libXinerama )
+       "
+
+RDEPEND="${CDEPEND}
+       !net-misc/tightvnc
+       !net-misc/vnc
+       !net-misc/xf4vnc
+       java? ( >=virtual/jre-1.5:* )"
+
+DEPEND="${CDEPEND}
+       amd64? ( dev-lang/nasm )
+       x86? ( dev-lang/nasm )
+       nls? ( sys-devel/gettext )
+       java? ( >=virtual/jdk-1.5 )
+       x11-base/xorg-proto
+       media-libs/fontconfig
+       x11-base/xorg-proto
+       x11-libs/libICE
+       x11-libs/libSM
+       x11-libs/libXcursor
+       x11-libs/libXfixes
+       x11-libs/libXft
+       x11-libs/libXi
+       server? (
+               dev-libs/libbsd
+               x11-libs/libxkbfile
+               x11-libs/libxshmfence
+               virtual/pkgconfig
+               media-fonts/font-util
+               x11-misc/util-macros
+               >=x11-libs/xtrans-1.3.3
+               opengl? ( >=media-libs/mesa-10.3.4-r1 )
+       )"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-030_manpages.patch
+       "${FILESDIR}"/${P}-055_xstartup.patch
+)
+
+src_prepare() {
+       if use server ; then
+               cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/. 
unix/xserver || die
+       fi
+
+       cmake-utils_src_prepare
+
+       if use server ; then
+               cd unix/xserver || die
+               eapply "${FILESDIR}"/xserver120.patch
+               eapply "${FILESDIR}"/xserver120-drmfourcc-header.patch
+               eautoreconf
+       fi
+}
+
+src_configure() {
+       if use arm || use hppa ; then
+               append-flags "-fPIC"
+       fi
+
+       local mycmakeargs=(
+               -DENABLE_GNUTLS=$(usex gnutls)
+               -DENABLE_NLS=$(usex nls)
+               -DENABLE_PAM=$(usex pam)
+               -DBUILD_JAVA=$(usex java)
+       )
+
+       cmake-utils_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-dmx \
+                       --disable-dri \
+                       $(use_enable dri3) \
+                       --disable-glamor \
+                       --disable-kdrive \
+                       --disable-libunwind \
+                       --disable-linux-acpi \
+                       --disable-record \
+                       --disable-selective-werror \
+                       --disable-silent-rules \
+                       --disable-static \
+                       --disable-unit-tests \
+                       --disable-xephyr \
+                       $(use_enable xinerama) \
+                       --disable-xnest \
+                       --disable-xorg \
+                       --disable-xvfb \
+                       --disable-xwin \
+                       --disable-xwayland \
+                       --enable-dri2 \
+                       --with-pic \
+                       --without-dtrace \
+                       --disable-present
+       fi
+}
+
+src_compile() {
+       cmake-utils_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-utils_src_install
+
+       if use server ; then
+               emake -C unix/xserver/hw/vnc DESTDIR="${D}" install
+               if ! use xorgmodule; then
+                       rm -rv "${ED%/}"/usr/$(get_libdir)/xorg || die
+               else
+                       rm -v 
"${ED%/}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la || die
+               fi
+
+               newconfd "${FILESDIR}"/${PN}.confd ${PN}
+               newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+               systemd_douserunit contrib/systemd/user/[email protected]
+       else
+               local f
+               cd "${ED}" || die
+               for f in vncserver x0vncserver vncconfig; do
+                       rm usr/bin/$f || die
+                       rm usr/share/man/man1/$f.1 || die
+               done
+       fi
+}
+
+pkg_postinst() {
+       xdg_desktop_database_update
+       gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+       xdg_desktop_database_update
+       gnome2_icon_cache_update
+}

Reply via email to