diff options
author | Viorel Munteanu <ceamac.paragon@gmail.com> | 2022-02-01 22:14:38 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-02-18 01:12:09 +0000 |
commit | f00c4ea34c388669ef509f46dfcc6b635bb6af40 (patch) | |
tree | 0f00f122dff84d3d1cd1d7eca5913d0552b73df9 /net-misc/turbovnc | |
parent | net-misc/chrony: add glibc-2.35 seccomp patch (diff) | |
download | gentoo-f00c4ea34c388669ef509f46dfcc6b635bb6af40.tar.gz gentoo-f00c4ea34c388669ef509f46dfcc6b635bb6af40.tar.bz2 gentoo-f00c4ea34c388669ef509f46dfcc6b635bb6af40.zip |
net-misc/turbovnc: fix java-vm dependency
Closes: https://bugs.gentoo.org/832223
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/turbovnc')
-rw-r--r-- | net-misc/turbovnc/turbovnc-2.2.7-r1.ebuild | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/net-misc/turbovnc/turbovnc-2.2.7-r1.ebuild b/net-misc/turbovnc/turbovnc-2.2.7-r1.ebuild new file mode 100644 index 000000000000..b57e81831f74 --- /dev/null +++ b/net-misc/turbovnc/turbovnc-2.2.7-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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="gnutls +ssl" + +DEPEND=" + app-arch/bzip2 + media-libs/freetype + >=media-libs/libjpeg-turbo-2.0.0:=[java?] + sys-libs/zlib + >=virtual/jdk-1.8:* + virtual/opengl + x11-libs/libfontenc + x11-libs/libX11 + x11-libs/libXau + x11-libs/libXdmcp + x11-libs/libXext + x11-libs/libXfont2 + x11-libs/libxkbfile + x11-libs/pixman + ssl? ( + !gnutls? ( dev-libs/openssl:= ) + gnutls? ( net-libs/gnutls:= ) + ) + !net-misc/tigervnc +" +RDEPEND=" + ${DEPEND} + x11-apps/xkbcomp +" + +# net-misc/turbovnc does not build this file, it merely copies it +# from media-libs/libjpeg-turbo +QA_PREBUILT="usr/share/turbovnc/classes/libturbojpeg.so" + +src_prepare() { + use java && java-pkg-opt-2_src_prepare + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DTVNC_SYSTEMX11=ON + -DTVNC_SYSTEMLIBS=ON + -DTVNC_BUILDJAVA=$(usex java) + -DTVNC_BUILDNATIVE=ON + -DXKB_BIN_DIRECTORY=/usr/bin + -DXKB_DFLT_RULES=base + ) + + if use ssl ; then + # We prefer OpenSSL, so default to that if SSL is enabled + if use gnutls ; then + mycmakeargs+=( -DTVNC_USETLS=GnuTLS ) + else + # 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 + ) + fi + else + mycmakeargs+=( -DTVNC_USETLS=OFF ) + fi + + if use java ; then + export JAVACFLAGS="$(java-pkg_javac-args)" + export JNI_CFLAGS="$(java-pkg_get-jni-cflags)" + + mycmakeargs+=( + -DTJPEG_JAR="${EPREFIX}/usr/share/java/turbojpeg.jar" + -DTJPEG_JNILIBRARY="${EPREFIX}/usr/$(get_libdir)/libturbojpeg.so" + ) + 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 +} |