net-misc/aiccu: fix for gnutls-3.4 and adjust dep (bug 549014, thanks spam and alpine...
authorMichael Weber <xmw@gentoo.org>
Mon, 10 Aug 2015 23:39:53 +0000 (01:39 +0200)
committerMichael Weber <xmw@gentoo.org>
Mon, 10 Aug 2015 23:40:43 +0000 (01:40 +0200)
Package-Manager: portage-2.2.20

net-misc/aiccu/aiccu-2007.01.15-r4.ebuild
net-misc/aiccu/aiccu-2007.01.15-r5.ebuild [new file with mode: 0644]
net-misc/aiccu/files/aiccu-2007.01.15-gnutls-3.4.patch [new file with mode: 0644]

index 339ace8e057f50679941d6bd753baf052c3955b3..d04136e726a4d44bad5ce6939461e61b06936448 100644 (file)
@@ -15,8 +15,7 @@ SLOT="0"
 KEYWORDS="amd64 arm hppa ppc sparc x86"
 IUSE="systemd"
 
-RDEPEND="
-       net-libs/gnutls
+RDEPEND="<net-libs/gnutls-3.4
        sys-apps/iproute2
        systemd? ( sys-apps/systemd )
 "
diff --git a/net-misc/aiccu/aiccu-2007.01.15-r5.ebuild b/net-misc/aiccu/aiccu-2007.01.15-r5.ebuild
new file mode 100644 (file)
index 0000000..a1c209b
--- /dev/null
@@ -0,0 +1,59 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info systemd toolchain-funcs
+
+DESCRIPTION="AICCU Client to configure an IPv6 tunnel to SixXS"
+HOMEPAGE="http://www.sixxs.net/tools/aiccu"
+SRC_URI="http://www.sixxs.net/archive/sixxs/aiccu/unix/${PN}_${PV//\./}.tar.gz"
+
+LICENSE="SixXS"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86"
+IUSE="systemd"
+
+RDEPEND="
+       net-libs/gnutls
+       sys-apps/iproute2
+       systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig
+"
+
+S=${WORKDIR}/${PN}
+
+CONFIG_CHECK="~TUN"
+
+src_prepare() {
+       epatch \
+               "${FILESDIR}"/${P}-r2-init.gentoo.patch \
+               "${FILESDIR}"/${P}-Makefile.patch \
+               "${FILESDIR}"/${P}-setupscript.patch \
+               "${FILESDIR}"/${P}-uclibc.patch \
+               "${FILESDIR}"/${P}-systemd.patch \
+               "${FILESDIR}"/${P}-gnutls-3.4.patch
+}
+
+src_compile() {
+       # Don't use main Makefile since it requires additional
+       # dependencies which are useless for us.
+       emake CC=$(tc-getCC) STRIP= -C unix-console \
+               HAVE_SYSTEMD=$(usex systemd 1 0)
+}
+
+src_install() {
+       dosbin unix-console/${PN}
+
+       insopts -m 600
+       insinto /etc
+       doins doc/${PN}.conf
+       newinitd doc/${PN}.init.gentoo ${PN}
+
+       use systemd && systemd_dounit doc/${PN}.service
+
+       dodoc doc/{HOWTO,README,changelog}
+}
diff --git a/net-misc/aiccu/files/aiccu-2007.01.15-gnutls-3.4.patch b/net-misc/aiccu/files/aiccu-2007.01.15-gnutls-3.4.patch
new file mode 100644 (file)
index 0000000..ee637a7
--- /dev/null
@@ -0,0 +1,22 @@
+from http://git.alpinelinux.org/cgit/aports/tree/main/aiccu
+
+--- aiccu/common/common.c      2015-04-17 23:08:32.543680010 +0200
++++ aiccu/common/common.c.new  2015-04-17 23:14:02.152457972 +0200
+@@ -272,7 +272,6 @@
+ {
+ #ifdef AICCU_GNUTLS
+       /* Allow connections to servers that have OpenPGP keys as well */
+-      const int       cert_type_priority[3] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 };
+       int             ret;
+ #endif /* AICCU_GNUTLS*/
+@@ -300,8 +299,7 @@
+       gnutls_set_default_priority(sock->session);
+       /* XXX: Return value is not documented in GNUTLS documentation! */
+-      gnutls_certificate_type_set_priority(sock->session, cert_type_priority);
+-      /* XXX: Return value is not documented in GNUTLS documentation! */
++      gnutls_priority_set_direct(sock->session, "NORMAL:+CTYPE-OPENPGP", NULL);
+       /* Configure the x509 credentials for the current session */
+       gnutls_credentials_set(sock->session, GNUTLS_CRD_CERTIFICATE, g_aiccu->tls_cred);