summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-04-16 03:26:48 +0100
committerSam James <sam@gentoo.org>2024-04-16 03:26:48 +0100
commite499bab5e3954a68c5f62be43689aa41244067f9 (patch)
treef91d5d9c09738ba3dfa07c6f5e136e6fd2e5556a
parentmedia-sound/sox: sort BDEPEND (diff)
downloadgentoo-e499bab5e3954a68c5f62be43689aa41244067f9.tar.gz
gentoo-e499bab5e3954a68c5f62be43689aa41244067f9.tar.bz2
gentoo-e499bab5e3954a68c5f62be43689aa41244067f9.zip
net-misc/wget: fix build w/ USE="-debug libproxy"
Closes: https://bugs.gentoo.org/930060 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--net-misc/wget/files/wget-1.24.5-libproxy-no-debug.patch50
-rw-r--r--net-misc/wget/wget-1.24.5.ebuild4
2 files changed, 54 insertions, 0 deletions
diff --git a/net-misc/wget/files/wget-1.24.5-libproxy-no-debug.patch b/net-misc/wget/files/wget-1.24.5-libproxy-no-debug.patch
new file mode 100644
index 000000000000..9f75dc471a16
--- /dev/null
+++ b/net-misc/wget/files/wget-1.24.5-libproxy-no-debug.patch
@@ -0,0 +1,50 @@
+https://bugs.gentoo.org/930060
+https://gitlab.com/gnuwget/wget/-/issues/19
+https://gitlab.com/gnuwget/wget/-/merge_requests/39
+
+From 5f0aa59239c36fc945b94d8ab91562d56e5bf776 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 16 Apr 2024 03:18:40 +0100
+Subject: [PATCH] Fix libproxy build with --disable-debug
+
+The definition of debug_logprintf in src/log.c is guarded by ENABLE_DEBUG
+(although its prototype is unconditionally available in src/log.h).
+
+The uses of debug_logprintf in src/retr.c aren't guarded by ENABLE_DEBUG.
+
+Use the DEBUGP macro which is designed for this purpose.
+
+* src/retr.c (getproxy): Use DEBUGP macro.
+
+Fixes: https://gitlab.com/gnuwget/wget/-/issues/19
+Copyright-paperwork-exempt: Yes
+--- a/src/retr.c
++++ b/src/retr.c
+@@ -1498,21 +1498,21 @@ getproxy (struct url *u)
+ pxProxyFactory *pf = px_proxy_factory_new ();
+ if (!pf)
+ {
+- debug_logprintf ("Allocating memory for libproxy failed");
++ DEBUGP (("Allocating memory for libproxy failed"));
+ return NULL;
+ }
+
+- debug_logprintf ("asking libproxy about url '%s'\n", u->url);
++ DEBUGP (("asking libproxy about url '%s'\n", u->url));
+ char **proxies = px_proxy_factory_get_proxies (pf, u->url);
+ if (proxies)
+ {
+ if (proxies[0])
+ {
+- debug_logprintf ("libproxy suggest to use '%s'\n", proxies[0]);
++ DEBUGP (("libproxy suggest to use '%s'\n", proxies[0]));
+ if (strcmp (proxies[0], "direct://") != 0)
+ {
+ proxy = xstrdup (proxies[0]);
+- debug_logprintf ("libproxy setting to use '%s'\n", proxy);
++ DEBUGP (("libproxy setting to use '%s'\n", proxy));
+ }
+ }
+
+--
+GitLab
diff --git a/net-misc/wget/wget-1.24.5.ebuild b/net-misc/wget/wget-1.24.5.ebuild
index 81f8f939140c..6626e1328e7d 100644
--- a/net-misc/wget/wget-1.24.5.ebuild
+++ b/net-misc/wget/wget-1.24.5.ebuild
@@ -63,6 +63,10 @@ DOCS=( AUTHORS MAILING-LIST NEWS README )
# gnulib FPs
QA_CONFIG_IMPL_DECL_SKIP=( unreachable MIN alignof static_assert )
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.24.5-libproxy-no-debug.patch
+)
+
pkg_setup() {
use test && python-any-r1_pkg_setup
}