From 2c3d46ff0961314c35017d85a64ab9a1cc6f4ad8 Mon Sep 17 00:00:00 2001 From: Sergey Popov Date: Wed, 27 Jan 2016 17:34:08 +0300 Subject: [PATCH] net-misc/vtun: fix building with GCC 5 Bump EAPI to 5, add slot to dev-libs/openssl dependency. Add missing 'die' on sed call. Make description shorter to silence QA warning. Gentoo-Bug: 570462 Package-Manager: portage-2.2.26 --- net-misc/vtun/files/vtun-3.0.3-gcc5.patch | 13 +++++++++++++ net-misc/vtun/vtun-3.0.3.ebuild | 14 +++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 net-misc/vtun/files/vtun-3.0.3-gcc5.patch diff --git a/net-misc/vtun/files/vtun-3.0.3-gcc5.patch b/net-misc/vtun/files/vtun-3.0.3-gcc5.patch new file mode 100644 index 0000000000000..99c6531d72681 --- /dev/null +++ b/net-misc/vtun/files/vtun-3.0.3-gcc5.patch @@ -0,0 +1,13 @@ +Index: vtun-3.0.3/cfg_file.y +=================================================================== +--- vtun-3.0.3.orig/cfg_file.y ++++ vtun-3.0.3/cfg_file.y +@@ -624,7 +624,7 @@ int clear_nat_hack_client(void *d, void + } + + /* Clear the VTUN_NAT_HACK flag which are not relevant to the current operation mode */ +-inline void clear_nat_hack_flags(int svr) ++extern inline void clear_nat_hack_flags(int svr) + { + if (svr) + llist_trav(&host_list,clear_nat_hack_server,NULL); diff --git a/net-misc/vtun/vtun-3.0.3.ebuild b/net-misc/vtun/vtun-3.0.3.ebuild index 67921500af5a1..2a5c6490db58f 100644 --- a/net-misc/vtun/vtun-3.0.3.ebuild +++ b/net-misc/vtun/vtun-3.0.3.ebuild @@ -1,12 +1,12 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=4 +EAPI=5 inherit eutils linux-info -DESCRIPTION="Create virtual tunnels over TCP/IP networks with traffic shaping, encryption, and compression" +DESCRIPTION="Create tunnels over TCP/IP networks with shaping, encryption, and compression" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" HOMEPAGE="http://vtun.sourceforge.net/" @@ -15,7 +15,7 @@ SLOT="0" KEYWORDS="~alpha amd64 ppc ~sparc x86" IUSE="lzo socks5 ssl zlib" -RDEPEND="ssl? ( dev-libs/openssl ) +RDEPEND="ssl? ( dev-libs/openssl:0 ) lzo? ( dev-libs/lzo:2 ) zlib? ( sys-libs/zlib ) socks5? ( net-proxy/dante )" @@ -33,8 +33,12 @@ src_prepare() { epatch "${FILESDIR}"/${P}-includes.patch # remove unneeded checking for /etc/vtund.conf epatch "${FILESDIR}"/${PN}-3.0.2-remove-config-presence-check.patch + # GCC 5 compatibility, patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778164 + epatch "${FILESDIR}"/${P}-gcc5.patch # portage takes care about striping binaries itself - sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in + sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in || die + + epatch_user } src_configure() {