summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViorel Munteanu <ceamac.paragon@gmail.com>2022-06-12 16:59:48 +0300
committerSam James <sam@gentoo.org>2022-06-15 22:07:03 +0100
commitc55b548846bee43e4bfc56e7499109ed4738b72e (patch)
tree6f96e35d8fe7757a0f0f8134c7cc68714b97fde2
parentdev-db/redis: add 7.0.2 (diff)
downloadgentoo-c55b548846bee43e4bfc56e7499109ed4738b72e.tar.gz
gentoo-c55b548846bee43e4bfc56e7499109ed4738b72e.tar.bz2
gentoo-c55b548846bee43e4bfc56e7499109ed4738b72e.zip
net-misc/turbovnc: add 3.0
Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/25864 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--net-misc/turbovnc/Manifest1
-rw-r--r--net-misc/turbovnc/files/turbovnc-3.0-fix-musl-compilation.patch20
-rw-r--r--net-misc/turbovnc/turbovnc-3.0.ebuild102
3 files changed, 123 insertions, 0 deletions
diff --git a/net-misc/turbovnc/Manifest b/net-misc/turbovnc/Manifest
index 1e90b89a91ba..faae4b9ed0f4 100644
--- a/net-misc/turbovnc/Manifest
+++ b/net-misc/turbovnc/Manifest
@@ -1 +1,2 @@
DIST turbovnc-2.2.7.tar.gz 8789325 BLAKE2B 257a9c9b3793b40668bf2f3bd9839b3003364f9130699caa52beaec24b75cb054830ee1b1aa67a22eb6173afc9af99c51e45fa3fa52e050c78e5226466ce99ce SHA512 932faa645a71b825e467bdcdb4b872e961ad688c959beb0adbdd35d77969d856bb5c82b893afe8f6b0aa8be18cac3fa9192ce05074295c92a83f1a2344468788
+DIST turbovnc-3.0.tar.gz 8665757 BLAKE2B 98600dc1f4fd91b30c8c48f2e465aa4cb9c53190c08611374ed6e1ef59be585f1694a1c6827939dec9cf259bd0e9a8fbdea9194653f5a3c66eb97cca1e12b09b SHA512 baa5f62fa1d76a09dc16262d853598b9d9ba8a12f3804c27df6af4983700b4dc1ad7f981ea02e2dc4d36c29b0cd7a1d7a7a8c98b7ae971cbc688ca30fd5c19ec
diff --git a/net-misc/turbovnc/files/turbovnc-3.0-fix-musl-compilation.patch b/net-misc/turbovnc/files/turbovnc-3.0-fix-musl-compilation.patch
new file mode 100644
index 000000000000..d96b7bc1ca28
--- /dev/null
+++ b/net-misc/turbovnc/files/turbovnc-3.0-fix-musl-compilation.patch
@@ -0,0 +1,20 @@
+See bug https://bugs.gentoo.org/836723
+
+The error is this:
+
+/var/tmp/portage/net-misc/turbovnc-2.2.7-r2/work/turbovnc-2.2.7/unix/Xvnc/programs/Xserver/os/access.c: In function 'GetLocalClientCreds':
+/var/tmp/portage/net-misc/turbovnc-2.2.7-r2/work/turbovnc-2.2.7/unix/Xvnc/programs/Xserver/os/access.c:1178:18: error: storage size of 'peercred' isn't known
+ 1178 | struct ucred peercred;
+ | ^~~~~~~~
+
+--- ./unix/Xvnc/programs/Xserver/os/CMakeLists.txt~ 2022-06-12 15:41:05.980270914 +0300
++++ ./unix/Xvnc/programs/Xserver/os/CMakeLists.txt 2022-06-12 15:43:14.113823213 +0300
+@@ -1,7 +1,7 @@
+ include_directories(../render ../../../lib/libsha1)
+
+ add_definitions(-DUNIXCONN -DTCPCONN -DHASXDMAUTH ${ServerOSDefines} -DXDMCP
+- -DHAVE_SHA1_IN_LIBSHA1)
++ -DHAVE_SHA1_IN_LIBSHA1 -D_GNU_SOURCE)
+ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
+ add_definitions(-DLOCALCONN)
+ elseif(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
diff --git a/net-misc/turbovnc/turbovnc-3.0.ebuild b/net-misc/turbovnc/turbovnc-3.0.ebuild
new file mode 100644
index 000000000000..26c0c3cbe94e
--- /dev/null
+++ b/net-misc/turbovnc/turbovnc-3.0.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake desktop java-pkg-opt-2
+
+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"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+ssl"
+
+COMMON_DEPEND="
+ app-arch/bzip2
+ media-libs/freetype
+ >=media-libs/libjpeg-turbo-2.0.0:=[java?]
+ sys-libs/pam
+ sys-libs/zlib
+ virtual/opengl
+ x11-apps/xauth
+ x11-libs/libfontenc
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libXfont2
+ x11-libs/libxkbfile
+ x11-libs/pixman
+ x11-misc/xkeyboard-config
+ java? (
+ >=virtual/jdk-1.8:*
+ x11-libs/libXi
+ )
+ ssl? ( dev-libs/openssl:= )
+ !net-misc/tigervnc
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ x11-apps/xkbcomp
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ x11-libs/xtrans
+"
+
+PATCHES=( "${FILESDIR}"/"${P}"-fix-musl-compilation.patch )
+
+src_prepare() {
+ use java && java-pkg-opt-2_src_prepare
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DTVNC_SYSTEMX11=ON
+ -DTVNC_SYSTEMLIBS=ON
+ -DTVNC_BUILDVIEWER=$(usex java)
+ -DTVNC_BUILDHELPER=$(usex java)
+ -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
+
+ if use java ; 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 java ; 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
+
+ find "${ED}"/usr/share/man/man1/ -name Xserver.1\* -delete || die
+
+ einstalldocs
+}