net-libs/net6: gnutls-3.4 + eapi bump
authorAlon Bar-Lev <alonbl@gentoo.org>
Fri, 3 Mar 2017 16:09:11 +0000 (18:09 +0200)
committerAlon Bar-Lev <alonbl@gentoo.org>
Fri, 3 Mar 2017 20:54:56 +0000 (22:54 +0200)
Bug: 582812

Package-Manager: Portage-2.3.3, Repoman-2.3.1

net-libs/net6/files/net6-1.3.14-gnutls-3.4.patch [new file with mode: 0644]
net-libs/net6/net6-1.3.14-r2.ebuild [new file with mode: 0644]

diff --git a/net-libs/net6/files/net6-1.3.14-gnutls-3.4.patch b/net-libs/net6/files/net6-1.3.14-gnutls-3.4.patch
new file mode 100644 (file)
index 0000000..0eb4316
--- /dev/null
@@ -0,0 +1,27 @@
+From 90154df3f1d504f0ebb3d70b889c1f0e30990588 Mon Sep 17 00:00:00 2001
+From: Carlos Alberto Lopez Perez <clopez@igalia.com>
+Date: Thu, 28 Jul 2016 14:43:38 +0200
+Subject: [PATCH] Fix build with GnuTLS >= 3.4.0
+
+  * gnutls_kx_set_priority() has been removed in 3.4.0 and
+    gnutls_priority_set_direct() should be used instead.
+---
+ src/encrypt.cpp | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/encrypt.cpp b/src/encrypt.cpp
+index 30f83a6..9223c35 100644
+--- a/src/encrypt.cpp
++++ b/src/encrypt.cpp
+@@ -175,10 +175,8 @@ net6::tcp_encrypted_socket_base::
+                                   gnutls_session_t sess):
+       tcp_client_socket(cobj), session(sess), state(DEFAULT)
+ {
+-      const int kx_prio[] = { GNUTLS_KX_ANON_DH, 0 };
+-
+       gnutls_set_default_priority(session);
+-      gnutls_kx_set_priority(session, kx_prio);
++      gnutls_priority_set_direct(session, "NORMAL:+ANON-DH", NULL);
+       gnutls_transport_set_ptr(
+               session,
diff --git a/net-libs/net6/net6-1.3.14-r2.ebuild b/net-libs/net6/net6-1.3.14-r2.ebuild
new file mode 100644 (file)
index 0000000..2ddc4a1
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic multilib
+
+DESCRIPTION="Network access framework for IPv4/IPv6 written in C++"
+HOMEPAGE="http://gobby.0x539.de/"
+SRC_URI="http://releases.0x539.de/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~x86"
+IUSE="nls static-libs"
+
+RDEPEND="dev-libs/libsigc++:2
+       >=net-libs/gnutls-1.2.10"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig
+       nls? ( sys-devel/gettext )"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+PATCHES=(
+       "${FILESDIR}/${P}-gnutls-3.4.patch"
+)
+
+src_configure() {
+       append-cxxflags -std=c++11
+       econf $(use_enable nls) \
+               $(use_enable static-libs static)
+}
+
+src_install() {
+       default
+       prune_libtool_files
+}
+
+pkg_postinst() {
+       elog "Please note that because of the use of C++ templates"
+       elog "Gobby 0.4 has to be recompiled against the new ${PN}"
+       elog "to pick up the changes."
+}