commit: c4934b4851ea67d4849749e27017db5dbf6f17c4 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Mon Jul 28 21:54:12 2025 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Mon Jul 28 21:57:25 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4934b48
net-p2p/classified-ads: Fix build w/ >=net-libs/miniupnpc-2.2.8 This was broken for a full year ... Closes: https://bugs.gentoo.org/934332 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> net-p2p/classified-ads/classified-ads-0.16.ebuild | 4 +- .../classified-ads-0.16-miniupnpc-2.2.8.patch | 47 ++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/net-p2p/classified-ads/classified-ads-0.16.ebuild b/net-p2p/classified-ads/classified-ads-0.16.ebuild index 30c8a9c7dc71..cb658e18289c 100644 --- a/net-p2p/classified-ads/classified-ads-0.16.ebuild +++ b/net-p2p/classified-ads/classified-ads-0.16.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -45,6 +45,8 @@ DEPEND="${RDEPEND} BDEPEND="sys-devel/gettext doc? ( app-text/doxygen )" +PATCHES=( "${FILESDIR}/${P}-miniupnpc-2.2.8.patch" ) # bug 934332, git master + src_prepare() { # preprocessed graphics are unpacked into wrong directory # so lets move them into correct location: diff --git a/net-p2p/classified-ads/files/classified-ads-0.16-miniupnpc-2.2.8.patch b/net-p2p/classified-ads/files/classified-ads-0.16-miniupnpc-2.2.8.patch new file mode 100644 index 000000000000..e8819137847c --- /dev/null +++ b/net-p2p/classified-ads/files/classified-ads-0.16-miniupnpc-2.2.8.patch @@ -0,0 +1,47 @@ +https://github.com/operatornormal/classified-ads/commit/bfc61b0d41933f832451c288e3a36f87338afdc4 + +From bfc61b0d41933f832451c288e3a36f87338afdc4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Antti=20J=C3=A4rvinen?= <[email protected]> +Date: Wed, 8 Jan 2025 21:23:22 +0200 +Subject: [PATCH] Support for miniupnpc 2.2.8 see + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076686 thanks for Yangfl + +--- + net/networklistener.cpp | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/net/networklistener.cpp b/net/networklistener.cpp +index 24eaa4c..42de839 100644 +--- a/net/networklistener.cpp ++++ b/net/networklistener.cpp +@@ -1,7 +1,7 @@ + /* -*-C++-*- -*-coding: utf-8-unix;-*- +- Classified Ads is Copyright (c) Antti Järvinen 2013. ++ Classified Ads is Copyright (c) Antti Järvinen 2013-2025. + +- This file is part of Classified Ads. ++ This file is part of Classified Ads. + + Classified Ads is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public +@@ -9,7 +9,7 @@ + version 2.1 of the License, or (at your option) any later version. + + Classified Ads is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of ++ but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + +@@ -291,7 +291,11 @@ void NetworkListener::figureOutLocalAddresses() { + char lan_address[64]; + struct UPNPUrls upnp_urls; + struct IGDdatas upnp_data; ++#if (MINIUPNPC_API_VERSION >= 18) ++ int status = UPNP_GetValidIGD(upnp_dev, &upnp_urls, &upnp_data, lan_address, sizeof(lan_address), NULL, 0); ++#else + int status = UPNP_GetValidIGD(upnp_dev, &upnp_urls, &upnp_data, lan_address, sizeof(lan_address)); ++#endif + // look up possible "status" values, the number "1" indicates a valid IGD was found + QLOG_STR("UPNP_GetValidIGD = " + QString::number(status)) ; + if ( status > 0 ) {
