summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-03-01 16:07:53 +0000
committerSam James <sam@gentoo.org>2021-03-01 16:08:18 +0000
commitbee10b04b6f7eaaaf0396f9f44b2c262f8726295 (patch)
tree3ffa3f478055a3689afdb57d3ff97f6b2efe61dd /net-misc
parentnet-misc/turbovnc: add various unbundled deps to *DEPEND (diff)
downloadgentoo-bee10b04b6f7eaaaf0396f9f44b2c262f8726295.tar.gz
gentoo-bee10b04b6f7eaaaf0396f9f44b2c262f8726295.tar.bz2
gentoo-bee10b04b6f7eaaaf0396f9f44b2c262f8726295.zip
net-misc/turbovnc: make SSL optional (openssl or gnutls)
OpenSSL is preferred. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/turbovnc/turbovnc-2.2.6.ebuild22
1 files changed, 22 insertions, 0 deletions
diff --git a/net-misc/turbovnc/turbovnc-2.2.6.ebuild b/net-misc/turbovnc/turbovnc-2.2.6.ebuild
index c6879d50e22..9c47e973cb1 100644
--- a/net-misc/turbovnc/turbovnc-2.2.6.ebuild
+++ b/net-misc/turbovnc/turbovnc-2.2.6.ebuild
@@ -12,6 +12,7 @@ SRC_URI="https://sourceforge.net/projects/turbovnc/files/${PV}/${P}.tar.gz/downl
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
+IUSE="+ssl gnutls"
DEPEND="
app-arch/bzip2
@@ -22,6 +23,10 @@ DEPEND="
virtual/opengl
x11-libs/libX11
x11-libs/libXext
+ ssl? (
+ !gnutls? ( dev-libs/openssl:= )
+ gnutls? ( net-libs/gnutls:= )
+ )
!net-misc/tigervnc
"
RDEPEND="
@@ -44,6 +49,23 @@ src_configure() {
-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=ON
+ -DTVNC_DLOPENSSL=0
+ )
+ 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)"