summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-06-16 00:47:20 +0100
committerSam James <sam@gentoo.org>2023-06-16 00:47:20 +0100
commit19b82f87d352cd13932ec5b4892e65baecb4abca (patch)
tree343375686fd9a21514fca4071d6d6f9bee855519 /net-libs
parentsys-firmware/intel-microcode: add 20230613_p20230520 (diff)
downloadgentoo-19b82f87d352cd13932ec5b4892e65baecb4abca.tar.gz
gentoo-19b82f87d352cd13932ec5b4892e65baecb4abca.tar.bz2
gentoo-19b82f87d352cd13932ec5b4892e65baecb4abca.zip
net-libs/glib-networking: fix tests w/ >-libproxy-0.5.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/glib-networking/files/glib-networking-2.76.0-libproxy-0.5.patch65
-rw-r--r--net-libs/glib-networking/glib-networking-2.76.0.ebuild4
2 files changed, 69 insertions, 0 deletions
diff --git a/net-libs/glib-networking/files/glib-networking-2.76.0-libproxy-0.5.patch b/net-libs/glib-networking/files/glib-networking-2.76.0-libproxy-0.5.patch
new file mode 100644
index 000000000000..e59fe9a07416
--- /dev/null
+++ b/net-libs/glib-networking/files/glib-networking-2.76.0-libproxy-0.5.patch
@@ -0,0 +1,65 @@
+https://bugs.gentoo.org/907303
+https://gitlab.gnome.org/GNOME/glib-networking/-/commit/a7db10e8862050f19af5c2eebcd1d590a04d5ced
+
+From a7db10e8862050f19af5c2eebcd1d590a04d5ced Mon Sep 17 00:00:00 2001
+From: Jan-Michael Brummer <jan.brummer@tabos.org>
+Date: Tue, 13 Jun 2023 17:10:11 +0200
+Subject: [PATCH] Fix tests using libproxy 0.5
+
+New libproxy 0.5 now behaves just like glib, additional checks aren't
+needed.
+
+Fixes: https://gitlab.gnome.org/GNOME/glib-networking/-/issues/212
+--- a/proxy/tests/common.c
++++ b/proxy/tests/common.c
+@@ -172,13 +172,15 @@ static void
+ test_proxy_ignore_common (void)
+ {
+ GProxyResolver *resolver;
+- gboolean is_libproxy;
+ GError *error = NULL;
+ char **proxies;
+ int i;
+
++#ifndef LIBPROXY_0_5
++ gboolean is_libproxy = g_strcmp0 (g_getenv ("GIO_PROXY_TEST_NAME"), "libproxy") == 0;
++#endif
++
+ resolver = g_proxy_resolver_get_default ();
+- is_libproxy = g_strcmp0 (g_getenv ("GIO_PROXY_TEST_NAME"), "libproxy") == 0;
+
+ for (i = 0; i < n_ignore_tests; i++)
+ {
+@@ -186,9 +188,11 @@ test_proxy_ignore_common (void)
+ NULL, &error);
+ g_assert_no_error (error);
+
++#ifndef LIBPROXY_0_5
+ if (is_libproxy && ignore_tests[i].libproxy_fails)
+ g_assert_cmpstr (proxies[0], ==, "http://localhost:8080");
+ else
++#endif
+ g_assert_cmpstr (proxies[0], ==, ignore_tests[i].proxy);
+
+ g_strfreev (proxies);
+--- a/proxy/tests/meson.build
++++ b/proxy/tests/meson.build
+@@ -18,9 +18,16 @@ foreach program: proxy_test_programs
+ )
+ endif
+
++ c_flags = []
++
++ if libproxy_dep.version() >= '0.5.0'
++ c_flags += '-DLIBPROXY_0_5'
++ endif
++
+ exe = executable(
+ test_name,
+ program[0] + '.c',
++ c_args : c_flags,
+ include_directories: top_inc,
+ dependencies: program[2],
+ install: enable_installed_tests,
+--
+GitLab
diff --git a/net-libs/glib-networking/glib-networking-2.76.0.ebuild b/net-libs/glib-networking/glib-networking-2.76.0.ebuild
index 63096b664380..349108fee1a8 100644
--- a/net-libs/glib-networking/glib-networking-2.76.0.ebuild
+++ b/net-libs/glib-networking/glib-networking-2.76.0.ebuild
@@ -30,6 +30,10 @@ BDEPEND="
test? ( sys-apps/dbus )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.76.0-libproxy-0.5.patch
+)
+
src_prepare() {
default
xdg_environment_reset