commit:     5ec9011ad7fa1011d6febc5d8ec884769b504899
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 29 10:02:23 2022 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri Dec 30 09:14:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ec9011a

net-misc/turbovnc: add 3.0.2

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

 net-misc/turbovnc/Manifest              |   2 +
 net-misc/turbovnc/metadata.xml          |   5 ++
 net-misc/turbovnc/turbovnc-3.0.2.ebuild | 136 ++++++++++++++++++++++++++++++++
 3 files changed, 143 insertions(+)

diff --git a/net-misc/turbovnc/Manifest b/net-misc/turbovnc/Manifest
index 6ce870f1f726..184184f4be7f 100644
--- a/net-misc/turbovnc/Manifest
+++ b/net-misc/turbovnc/Manifest
@@ -1,2 +1,4 @@
 DIST turbovnc-2.2.7.tar.gz 8789325 BLAKE2B 
257a9c9b3793b40668bf2f3bd9839b3003364f9130699caa52beaec24b75cb054830ee1b1aa67a22eb6173afc9af99c51e45fa3fa52e050c78e5226466ce99ce
 SHA512 
932faa645a71b825e467bdcdb4b872e961ad688c959beb0adbdd35d77969d856bb5c82b893afe8f6b0aa8be18cac3fa9192ce05074295c92a83f1a2344468788
 DIST turbovnc-3.0.1.tar.gz 8685384 BLAKE2B 
388657bac29ccd570b0a5e03ca49cb5b868907390743241599f84d900707ffc685d021702167e7f615004eafd545120de3dbd4c61e0e206ce2d4227ff54ea86a
 SHA512 
1d205db7fa23730e32752b0bc449a4cd2920ce7d065184bc84e49041dcd8db0e057fd7923635b74b09ab7957568d34f70dc1dd96b77b0905e80b4a5f1d8f28db
+DIST turbovnc-3.0.2.tar.gz 8691956 BLAKE2B 
872dbdb0127d9935e8232757f0939cf95930bcd087d06dabe771bfe4ccf4703c05fd2d9c01f0baf073ba37f989c0f02b4e20d5ed08eb6f2a4a83c6f5bb0f9d36
 SHA512 
f04ab062dafe3210ab7722aa12a97d1f7956ddef7eed965e7df86810b7c9aa35d981d2397503d154bd0da0c71542e0e58be458fb5841f05fc9a0d80fdddf2d11
+DIST turbovnc-3.0.2.tar.gz.sig 543 BLAKE2B 
3eeaa647ab3cab092112e3aa14cb4dba204e3c8a164082f32f942fd730d465e9b1973c9c7af047fcbba35fbfa02bb312fb8072963876b6add51d1105ac8eccbc
 SHA512 
d17c6900db2bc47d8bbe3cc4bf8d0d1f17447fe4db5346baabf105c5d37a5a13048d6888d48fc5bd8e7a7a81b473b59b66c4c0108a10fcac211365d603093c4c

diff --git a/net-misc/turbovnc/metadata.xml b/net-misc/turbovnc/metadata.xml
index 06bf263dec96..91034aafab24 100644
--- a/net-misc/turbovnc/metadata.xml
+++ b/net-misc/turbovnc/metadata.xml
@@ -13,6 +13,11 @@
                TurboVNC is a derivative of VNC (Virtual Network Computing) 
that is tuned to provide peak performance for 3D and video workloads.
                By The VirtualGL Project.
        </longdescription>
+       <use>
+               <flag name="java">Build the client (vncviewer)</flag>
+               <flag name="client">Build the client (vncviewer)</flag>
+               <flag name="server">Build the server (vncserver, Xvnc)</flag>
+       </use>
        <upstream>
                <remote-id type="sourceforge">turbovnc</remote-id>
                <remote-id type="github">TurboVNC/turbovnc</remote-id>

diff --git a/net-misc/turbovnc/turbovnc-3.0.2.ebuild 
b/net-misc/turbovnc/turbovnc-3.0.2.ebuild
new file mode 100644
index 000000000000..3471a1f73bd5
--- /dev/null
+++ b/net-misc/turbovnc/turbovnc-3.0.2.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_OPT_USE=client
+inherit cmake desktop java-pkg-opt-2 verify-sig
+
+DESCRIPTION="A fast replacement for TigerVNC"
+HOMEPAGE="https://www.turbovnc.org/";
+SRC_URI="
+       
https://sourceforge.net/projects/turbovnc/files/${PV}/${P}.tar.gz/download -> 
${P}.tar.gz
+       verify-sig? ( 
https://sourceforge.net/projects/turbovnc/files/${PV}/${P}.tar.gz.sig/download 
-> ${P}.tar.gz.sig )
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+server +ssl"
+REQUIRED_USE="|| ( client server )"
+
+COMMON_DEPEND="
+       x11-apps/xauth
+       x11-libs/libX11
+       x11-libs/libXext
+       x11-misc/xkeyboard-config
+       client? (
+               media-libs/libjpeg-turbo:=[java]
+               x11-libs/libXi
+               !net-misc/tigervnc
+       )
+       server? (
+               media-libs/libjpeg-turbo:=
+               sys-libs/pam
+               sys-libs/zlib
+               virtual/opengl
+               x11-libs/libXau
+               x11-libs/libXdmcp
+               x11-libs/libXfont2
+               x11-libs/pixman
+               ssl? ( dev-libs/openssl:= )
+               !net-misc/tigervnc[server]
+       )
+"
+
+RDEPEND="
+       ${COMMON_DEPEND}
+       x11-apps/xkbcomp
+       client? ( >=virtual/jre-1.8:* )
+"
+
+# libbz2.so.1, libfontenc.so.1 and libfreetype.so.6 are used by libXfont2.so.2
+# but cmake will look for them, so add them here
+DEPEND="
+       ${COMMON_DEPEND}
+       x11-libs/xtrans
+       client? ( >=virtual/jdk-1.8:* )
+       server? (
+               app-arch/bzip2
+               media-libs/freetype
+               x11-libs/libfontenc
+       )
+"
+
+BDEPEND="
+       verify-sig? ( sec-keys/openpgp-keys-vgl-turbovnc )
+"
+
+PATCHES=( "${FILESDIR}"/"${PN}"-3.0-fix-musl-compilation.patch )
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/vgl-turbovnc.asc
+
+pkg_pretend() {
+       if use ssl && ! use server; then
+               einfo "USE=\"ssl\" selected but USE=\"server\" is not.  The SSL 
support is unused"
+       fi
+}
+
+src_prepare() {
+       use client && java-pkg-opt-2_src_prepare
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DTVNC_BUILDVIEWER=$(usex client)
+               -DTVNC_BUILDHELPER=$(usex client)
+               -DTVNC_BUILDSERVER=$(usex server)
+               -DTVNC_BUILDWEBSERVER=$(usex server)
+       )
+
+       if use server ; then
+               mycmakeargs+=(
+                       -DTVNC_SYSTEMLIBS=ON
+                       -DTVNC_SYSTEMX11=ON
+                       -DXKB_BIN_DIRECTORY=/usr/bin
+                       -DXKB_DFLT_RULES=base
+               )
+               if use ssl ; then
+                       # Link properly against OpenSSL to ensure
+                       # we catch e.g. ABI change
+                       # (i.e. don't dlopen it)
+                       mycmakeargs+=(
+                               -DTVNC_USETLS=OpenSSL
+                               -DTVNC_DLOPENSSL=OFF
+                       )
+               else
+                       mycmakeargs+=( -DTVNC_USETLS=OFF )
+               fi
+       fi
+
+       if use client ; then
+               export JAVACFLAGS="$(java-pkg_javac-args)"
+               export JNI_CFLAGS="$(java-pkg_get-jni-cflags)"
+       fi
+
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+
+       if use client ; then
+               java-pkg_dojar "${BUILD_DIR}"/java/VncViewer.jar
+               make_desktop_entry vncviewer "TurboVNC Viewer" 
/usr/share/icons/hicolor/48x48/apps/${PN}.png
+       fi
+
+       # Don't install incompatible init script
+       rm -rf "${ED}"/etc/init.d/ || die
+       rm -rf "${ED}"/etc/sysconfig/ || die
+
+       # Conflicts with x11-base/xorg-server
+       find "${ED}"/usr/share/man/man1/ -name Xserver.1\* -delete || die
+
+       einstalldocs
+}

Reply via email to