From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1098497-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id E50BF138334
	for <garchives@archives.gentoo.org>; Sat,  6 Jul 2019 07:07:04 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0FBFCE08C9;
	Sat,  6 Jul 2019 07:07:04 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id AC79CE08C9
	for <gentoo-commits@lists.gentoo.org>; Sat,  6 Jul 2019 07:07:03 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 07F8334726A
	for <gentoo-commits@lists.gentoo.org>; Sat,  6 Jul 2019 07:07:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 8367D6DC
	for <gentoo-commits@lists.gentoo.org>; Sat,  6 Jul 2019 07:06:59 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1562396574.8ffb9961657028bdacc37362aeb7aa1ac877cc15.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libvncserver/, net-libs/libvncserver/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-libs/libvncserver/files/libvncserver-0.9.12-libgcrypt.patch net-libs/libvncserver/libvncserver-0.9.12-r1.ebuild
X-VCS-Directories: net-libs/libvncserver/files/ net-libs/libvncserver/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 8ffb9961657028bdacc37362aeb7aa1ac877cc15
X-VCS-Branch: master
Date: Sat,  6 Jul 2019 07:06:59 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 19ce6a83-e869-4c80-b64e-24eb67b20444
X-Archives-Hash: 95a2cd9c693eb27b873c4f7744a13d74

commit:     8ffb9961657028bdacc37362aeb7aa1ac877cc15
Author:     Alexander Tsoy <alexander <AT> tsoy <DOT> me>
AuthorDate: Thu Jun 20 22:36:01 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jul  6 07:02:54 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ffb9961

net-libs/libvncserver: reorganize ssl/crypto deps

* no longer depend on libgcrypt when gnutls USE-flag is enabled
* put gnutls dependency behind ssl USE-flag

openssl/libressl also provides crypto (if gcrypt is not enabled), but
lets leave them behind ssl USE-flag anyway.

Package-Manager: Portage-2.3.66, Repoman-2.3.11
Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/libvncserver-0.9.12-libgcrypt.patch      | 40 ++++++++++++++++++++++
 .../libvncserver/libvncserver-0.9.12-r1.ebuild     | 16 ++++-----
 2 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/net-libs/libvncserver/files/libvncserver-0.9.12-libgcrypt.patch b/net-libs/libvncserver/files/libvncserver-0.9.12-libgcrypt.patch
new file mode 100644
index 00000000000..a0313562ff1
--- /dev/null
+++ b/net-libs/libvncserver/files/libvncserver-0.9.12-libgcrypt.patch
@@ -0,0 +1,40 @@
+From 57be637006a95091119f7a49b4232e461116520f Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <alexander@tsoy.me>
+Date: Sat, 25 May 2019 02:02:47 +0300
+Subject: [PATCH] crypto: rfbcrypto_gnutls is actually libgcrypt-based
+
+Long time ago gnutls used libgcrypt as a cryptographic backend. Perhaps
+that was what caused the confusion.
+---
+ CMakeLists.txt                                       | 9 ++++-----
+ common/{rfbcrypto_gnutls.c => rfbcrypto_libgcrypt.c} | 0
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+ rename common/{rfbcrypto_gnutls.c => rfbcrypto_libgcrypt.c} (100%)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b9ca4ba..0d3b4dc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -226,11 +226,10 @@ if(SYSTEMD_FOUND)
+ endif(SYSTEMD_FOUND)
+ 
+ if(LIBVNCSERVER_HAVE_SYS_UIO_H)
+-  if(GNUTLS_FOUND)
+-    message(STATUS "Building crypto with GnuTLS")
+-    set(CRYPTO_LIBRARIES ${GNUTLS_LIBRARIES})
+-    set(CRYPTO_SOURCES ${COMMON_DIR}/rfbcrypto_gnutls)
+-    include_directories(${GNUTLS_INCLUDE_DIR})
++  if(WITH_GCRYPT AND LIBGCRYPT_LIBRARIES)
++    message(STATUS "Building crypto with Libgcrypt")
++    set(CRYPTO_LIBRARIES ${LIBGCRYPT_LIBRARIES})
++    set(CRYPTO_SOURCES ${COMMON_DIR}/rfbcrypto_libgcrypt)
+   elseif(OPENSSL_FOUND)
+     message(STATUS "Building crypto with OpenSSL")
+     set(CRYPTO_LIBRARIES ${OPENSSL_LIBRARIES})
+diff --git a/common/rfbcrypto_gnutls.c b/common/rfbcrypto_libgcrypt.c
+similarity index 100%
+rename from common/rfbcrypto_gnutls.c
+rename to common/rfbcrypto_libgcrypt.c
+-- 
+2.21.0
+

diff --git a/net-libs/libvncserver/libvncserver-0.9.12-r1.ebuild b/net-libs/libvncserver/libvncserver-0.9.12-r1.ebuild
index c8c0be485e3..8f97ef15b98 100644
--- a/net-libs/libvncserver/libvncserver-0.9.12-r1.ebuild
+++ b/net-libs/libvncserver/libvncserver-0.9.12-r1.ebuild
@@ -17,19 +17,16 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~spa
 IUSE="+24bpp gcrypt gnutls ipv6 +jpeg libressl lzo +png sasl ssl systemd +threads +zlib"
 # https://bugs.gentoo.org/435326
 # https://bugs.gentoo.org/550916
-REQUIRED_USE="!gnutls? ( ssl? ( threads ) ) png? ( zlib )"
+REQUIRED_USE="ssl? ( !gnutls? ( threads ) ) png? ( zlib )"
 
 DEPEND="
 	gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0= )
-	gnutls? (
-		>=net-libs/gnutls-2.12.23-r6:0=
-		>=dev-libs/libgcrypt-1.5.3:0=
-	)
-	!gnutls? (
-		ssl? (
+	ssl? (
+		!gnutls? (
 			!libressl? ( >=dev-libs/openssl-1.0.2:0= )
 			libressl? ( >=dev-libs/libressl-2.7.0:0= )
 		)
+		gnutls? ( >=net-libs/gnutls-2.12.23-r6:0= )
 	)
 	jpeg? ( >=virtual/jpeg-0-r2:0 )
 	lzo? ( dev-libs/lzo )
@@ -45,6 +42,7 @@ DOCS=( AUTHORS ChangeLog NEWS README.md TODO )
 
 PATCHES=(
 	"${FILESDIR}"/${P}-cmake-libdir.patch
+	"${FILESDIR}"/${P}-libgcrypt.patch
 )
 
 src_configure() {
@@ -54,9 +52,9 @@ src_configure() {
 		-DWITH_JPEG=$(usex jpeg ON OFF)
 		-DWITH_PNG=$(usex png ON OFF)
 		-DWITH_THREADS=$(usex threads ON OFF)
-		-DWITH_GNUTLS=$(usex gnutls ON OFF)
+		-DWITH_GNUTLS=$(usex gnutls $(usex ssl ON OFF) OFF)
 		-DWITH_OPENSSL=$(usex gnutls OFF $(usex ssl ON OFF))
-		-DWITH_GCRYPT=$(usex gnutls ON $(usex gcrypt ON OFF))
+		-DWITH_GCRYPT=$(usex gcrypt ON OFF)
 		-DWITH_SYSTEMD=$(usex systemd ON OFF)
 		-DWITH_FFMPEG=OFF
 		-DWITH_24BPP=$(usex 24bpp ON OFF)