summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-03-01 15:07:51 +0000
committerSam James <sam@gentoo.org>2021-03-01 15:26:34 +0000
commitcd037a4aa37f7f53c9dbad535ba60db1c2a09c7f (patch)
treedabbc783c6852b985f284021dedd4ef370cc5477 /net-misc/turbovnc
parentnet-misc/turbovnc: linewrap longdescription (diff)
downloadgentoo-cd037a4aa37f7f53c9dbad535ba60db1c2a09c7f.tar.gz
gentoo-cd037a4aa37f7f53c9dbad535ba60db1c2a09c7f.tar.bz2
gentoo-cd037a4aa37f7f53c9dbad535ba60db1c2a09c7f.zip
net-misc/turbovnc: make Java support optional, use system libraries
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/turbovnc')
-rw-r--r--net-misc/turbovnc/turbovnc-2.2.6.ebuild40
1 files changed, 33 insertions, 7 deletions
diff --git a/net-misc/turbovnc/turbovnc-2.2.6.ebuild b/net-misc/turbovnc/turbovnc-2.2.6.ebuild
index f854799ddce6..741bb109f455 100644
--- a/net-misc/turbovnc/turbovnc-2.2.6.ebuild
+++ b/net-misc/turbovnc/turbovnc-2.2.6.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit cmake
+inherit cmake java-pkg-opt-2
DESCRIPTION="A fast replacement for TigerVNC"
HOMEPAGE="https://www.turbovnc.org/"
@@ -13,24 +13,50 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
-DEPEND="virtual/jdk:1.8
+DEPEND="
>=media-libs/libjpeg-turbo-2.0.0[java]
- !net-misc/tigervnc"
-RDEPEND="${DEPEND}
- x11-apps/xkbcomp"
+ virtual/jdk:1.8
+ !net-misc/tigervnc
+"
+RDEPEND="
+ ${DEPEND}
+ x11-apps/xkbcomp
+"
+
+src_prepare() {
+ use java && java-pkg-opt-2_src_prepare
+ cmake_src_prepare
+}
src_configure() {
local mycmakeargs=(
- -DTJPEG_JAR="${EPREFIX}/usr/share/java/turbojpeg.jar"
- -DTJPEG_JNILIBRARY="${EPREFIX}/usr/$(get_libdir)/libturbojpeg.so"
+ -DTVNC_SYSTEMX11=ON
+ -DTVNC_SYSTEMLIBS=ON
+ -DTVNC_BUILDJAVA=$(usex java)
-DXKB_BIN_DIRECTORY=/usr/bin
-DXKB_DFLT_RULES=base
)
+
+ 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
+ fi
+
find "${ED}/usr/share/man/man1/" -name Xserver.1\* -print0 | xargs -0 rm || die
einstalldocs
}