summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2024-07-08 18:41:11 +0000
committerYixun Lan <dlan@gentoo.org>2024-07-08 18:44:46 +0000
commit38db44467c63071527cdf7fd9cff4e642d14b27f (patch)
treef5b27721135767299eb55a34a5f35e1c92614748 /net-vpn
parentdev-lang/jint: remove TimeSystemTests (diff)
downloadgentoo-38db44467c63071527cdf7fd9cff4e642d14b27f.tar.gz
gentoo-38db44467c63071527cdf7fd9cff4e642d14b27f.tar.bz2
gentoo-38db44467c63071527cdf7fd9cff4e642d14b27f.zip
net-vpn/tinc: fix upnp issue
Closes: https://bugs.gentoo.org/935718 Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/tinc/files/tinc-1.1_pre18-fix-upnp.patch18
-rw-r--r--net-vpn/tinc/tinc-1.1_pre18-r1.ebuild (renamed from net-vpn/tinc/tinc-1.1_pre18.ebuild)9
2 files changed, 23 insertions, 4 deletions
diff --git a/net-vpn/tinc/files/tinc-1.1_pre18-fix-upnp.patch b/net-vpn/tinc/files/tinc-1.1_pre18-fix-upnp.patch
new file mode 100644
index 000000000000..1850540d96fc
--- /dev/null
+++ b/net-vpn/tinc/files/tinc-1.1_pre18-fix-upnp.patch
@@ -0,0 +1,18 @@
+diff --git a/src/upnp.c b/src/upnp.c
+index 553630e..fd2b30b 100644
+--- a/src/upnp.c
++++ b/src/upnp.c
+@@ -124,8 +124,12 @@ static void upnp_refresh() {
+ struct IGDdatas data;
+
+ char myaddr[64];
+-
++#if (MINIUPNPC_API_VERSION >= 18)
++ char wnaddr[64];
++ int result = UPNP_GetValidIGD(devices, &urls, &data, myaddr, sizeof(myaddr), wnaddr, sizeof(wnaddr));
++#else
+ int result = UPNP_GetValidIGD(devices, &urls, &data, myaddr, sizeof(myaddr));
++#endif
+
+ if(result <= 0) {
+ logger(DEBUG_PROTOCOL, LOG_WARNING, "[upnp] No IGD found");
diff --git a/net-vpn/tinc/tinc-1.1_pre18.ebuild b/net-vpn/tinc/tinc-1.1_pre18-r1.ebuild
index e5e8aca62cfa..0fe4682890c8 100644
--- a/net-vpn/tinc/tinc-1.1_pre18.ebuild
+++ b/net-vpn/tinc/tinc-1.1_pre18-r1.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
MY_PV=${PV/_/}
MY_P=${PN}-${MY_PV}
@@ -13,6 +13,7 @@ HOMEPAGE="https://www.tinc-vpn.org/"
SRC_URI="https://www.tinc-vpn.org/packages/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
@@ -25,15 +26,15 @@ DEPEND="
lzo? ( dev-libs/lzo:2 )
ncurses? ( sys-libs/ncurses:= )
readline? ( sys-libs/readline:= )
- upnp? ( net-libs/miniupnpc )
+ upnp? ( net-libs/miniupnpc:= )
zlib? ( sys-libs/zlib )"
RDEPEND="${DEPEND}
vde? ( net-misc/vde )"
-S="${WORKDIR}/${MY_P}"
PATCHES+=(
"${FILESDIR}"/tinc-1.1_pre16-r1-fix-paths.patch #560528
"${FILESDIR}"/${PN}-1.1-tinfo.patch #621868
+ "${FILESDIR}"/${P}-fix-upnp.patch #935718
)
src_prepare() {
@@ -45,7 +46,7 @@ src_prepare() {
sed -i "6d" configure.ac || die
sed -i "6iAC_INIT([tinc], ${PVR})" configure.ac || die
- eautoreconf
+ eautoreconf
}
src_configure() {