summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2022-06-21 00:13:04 -0400
committerMatt Turner <mattst88@gentoo.org>2022-06-21 00:40:44 -0400
commit64b8854267134d2539c6b66d793a25fc2157a085 (patch)
tree8e42482972b26eaf4d0dca2b008f37e793a8a3ee /net-libs
parentmedia-sound/chuck: fixed hardcoded toolchain (diff)
downloadgentoo-64b8854267134d2539c6b66d793a25fc2157a085.tar.gz
gentoo-64b8854267134d2539c6b66d793a25fc2157a085.tar.bz2
gentoo-64b8854267134d2539c6b66d793a25fc2157a085.zip
net-libs/libproxy: Version bump to 0.4.18
* Add IUSE=duktape (bug #842714) * Fix IUSE=webkit (broken by commit 0fdbf838a0ef 5.5 years ago) * Drop libproxy-0.4.10-disable-pac-test.patch; test seems to pass now Closes: https://bugs.gentoo.org/842714 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libproxy/Manifest1
-rw-r--r--net-libs/libproxy/files/libproxy-0.4.18-Fix-building-without-duktape.patch33
-rw-r--r--net-libs/libproxy/files/libproxy-0.4.18-avoid-nm-build-dep.patch90
-rw-r--r--net-libs/libproxy/libproxy-0.4.18.ebuild84
-rw-r--r--net-libs/libproxy/metadata.xml1
5 files changed, 209 insertions, 0 deletions
diff --git a/net-libs/libproxy/Manifest b/net-libs/libproxy/Manifest
index 58615016c9cb..6d388cb8b367 100644
--- a/net-libs/libproxy/Manifest
+++ b/net-libs/libproxy/Manifest
@@ -1 +1,2 @@
DIST libproxy-0.4.17.tar.gz 95542 BLAKE2B 70b78c90aebb0ea308d105ec6d2c61bb54dea36df2d99db835f29c6ffa91168c15e73e01823b799a37fa89a9cb6fca51013ea057006b608fa2a79f4056a5d3c5 SHA512 589045538a78dc7453335ed61c60adad3352b840b224885d4a58ae284e52224ae3ff2eebd77df57aebbc3ae75d7b6d69a825f24f01c19e75bf0a3345dce53126
+DIST libproxy-0.4.18.tar.gz 98037 BLAKE2B 12505cc7afe9ca27bb387df31d7368ed3ac83696255e6bd8fdbca1528fb6fe83510cdf7c6bda09939dcb55daefba24cf9c52435f664c6cba01daad87ddff3f2a SHA512 1148d688a9f070273a1a2b110a788561789799089660292bbba59fbf0a9caf7d28cb039a9ccdcb935f752e1e34739b2d2f4c784b1bb3bbaa03d108e7b38a4754
diff --git a/net-libs/libproxy/files/libproxy-0.4.18-Fix-building-without-duktape.patch b/net-libs/libproxy/files/libproxy-0.4.18-Fix-building-without-duktape.patch
new file mode 100644
index 000000000000..dd834687553a
--- /dev/null
+++ b/net-libs/libproxy/files/libproxy-0.4.18-Fix-building-without-duktape.patch
@@ -0,0 +1,33 @@
+https://github.com/libproxy/libproxy/pull/180
+
+From 54a08b73f4a9bc43356dd50fe91942b4270bfe10 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 21 Jun 2022 00:08:57 -0400
+Subject: [PATCH] Fix building without duktape
+
+Otherwise configuring fails with
+
+CMake Error at libproxy/cmake/modules.cmk:26 (math):
+ math cannot parse the expression: "0+0+0+": syntax error, unexpected end of
+ file (6).
+Call Stack (most recent call first):
+ libproxy/CMakeLists.txt:14 (include)
+---
+ libproxy/cmake/modules/pacrunner_duktape.cmk | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libproxy/cmake/modules/pacrunner_duktape.cmk b/libproxy/cmake/modules/pacrunner_duktape.cmk
+index e7918a8..a468125 100644
+--- a/libproxy/cmake/modules/pacrunner_duktape.cmk
++++ b/libproxy/cmake/modules/pacrunner_duktape.cmk
+@@ -17,5 +17,7 @@ else()
+ link_directories(${DUKTAPE_LIBRARIES})
+ link_libraries(duktape)
+ endif()
++ else()
++ set(DUKTAPE_FOUND 0)
+ endif()
+ endif()
+--
+2.35.1
+
diff --git a/net-libs/libproxy/files/libproxy-0.4.18-avoid-nm-build-dep.patch b/net-libs/libproxy/files/libproxy-0.4.18-avoid-nm-build-dep.patch
new file mode 100644
index 000000000000..d62eac9af879
--- /dev/null
+++ b/net-libs/libproxy/files/libproxy-0.4.18-avoid-nm-build-dep.patch
@@ -0,0 +1,90 @@
+From f0ae8a0022a18fb26dff0ace0608d1916c68d179 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Mon, 29 Apr 2013 23:02:25 -0400
+Subject: [PATCH] Avoid build-time dependency on NetworkManager
+
+Needed to prevent a dependency loop:
+nm -> libsoup -> glib-networking -> libproxy -> nm
+
+https://bugs.gentoo.org/467696
+
+* asturm@gentoo.org: Rebased on top of 0.4.15
+ also revert 423801295921ab1ec0d98565fcbc2635088d45da
+* sam@gentoo.org: Rebased on top of 0.4.16
+ (same revert included)
+* mattst88@gentoo.org: Rebased on top of 0.4.18
+ (same revert included)
+---
+ libproxy/cmake/modules.cmk | 6 ++---
+ .../cmake/modules/network_networkmanager.cmk | 5 +---
+ libproxy/modules/network_networkmanager.cpp | 23 ++++++++++++++-----
+ 3 files changed, 21 insertions(+), 13 deletions(-)
+
+diff --git a/libproxy/cmake/modules.cmk b/libproxy/cmake/modules.cmk
+index 6eaaa01..0afce2f 100644
+--- a/libproxy/cmake/modules.cmk
++++ b/libproxy/cmake/modules.cmk
+@@ -43,10 +43,10 @@ px_module(config_w32reg "${WIN32}" 1)
+ px_module(ignore_domain 1 1)
+ px_module(ignore_hostname 1 1)
+ px_module(ignore_ip 1 1)
+-if(NM_FOUND OR NMold_FOUND)
++if(NM_FOUND)
+ set(NM_BUILD 1)
+-endif(NM_FOUND OR NMold_FOUND)
+-px_module(network_networkmanager "${NM_BUILD}" 0 ${NM_LIBRARIES}${NMold_LIBRARIES})
++endif(NM_FOUND)
++px_module(network_networkmanager "${NM_BUILD}" 0 ${NM_LIBRARIES})
+ px_module(pacrunner_mozjs "${MOZJS_FOUND}" ${BIPR} ${MOZJS_LIBRARIES})
+ px_module(pacrunner_natus "${NATUS_FOUND}" ${BIPR} ${NATUS_LIBRARIES})
+ px_module(pacrunner_webkit "${WEBKIT_FOUND}" ${BIPR} ${WEBKIT_LIBRARIES})
+diff --git a/libproxy/cmake/modules/network_networkmanager.cmk b/libproxy/cmake/modules/network_networkmanager.cmk
+index 6ef6ead..2586bbd 100644
+--- a/libproxy/cmake/modules/network_networkmanager.cmk
++++ b/libproxy/cmake/modules/network_networkmanager.cmk
+@@ -1,6 +1,3 @@
+ if (NOT WIN32 AND NOT APPLE)
+- px_check_modules(NM libnm dbus-1)
+- if (NOT NM_FOUND)
+- px_check_modules(NMold NetworkManager dbus-1)
+- endif (NOT NM_FOUND)
++ px_check_modules(NM dbus-1)
+ endif()
+diff --git a/libproxy/modules/network_networkmanager.cpp b/libproxy/modules/network_networkmanager.cpp
+index 546a8ee..317f1ab 100644
+--- a/libproxy/modules/network_networkmanager.cpp
++++ b/libproxy/modules/network_networkmanager.cpp
+@@ -23,13 +23,24 @@
+ using namespace libproxy;
+
+ #include <dbus/dbus.h>
+-#include <NetworkManager.h>
+
+-// Backwards compatibility: with the switch to libnm, NM_STATE_CONNECTED is no
+-// longer defined. NM_STATE_CONNECTED_GLOBAL appeared with NM 0.9 and was aliased
+-#ifndef NM_STATE_CONNECTED
+- #define NM_STATE_CONNECTED NM_STATE_CONNECTED_GLOBAL
+-#endif
++/*
++ * copy-pasted from NetworkManager-1.26.0's NetworkManager.h to prevent
++ * a circular dependency; https://bugs.gentoo.org/467696
++ */
++#define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
++#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager"
++typedef enum {
++ NM_STATE_UNKNOWN = 0,
++ NM_STATE_ASLEEP = 10,
++ NM_STATE_DISCONNECTED = 20,
++ NM_STATE_DISCONNECTING = 30,
++ NM_STATE_CONNECTING = 40,
++ NM_STATE_CONNECTED_LOCAL = 50,
++ NM_STATE_CONNECTED_SITE = 60,
++ NM_STATE_CONNECTED_GLOBAL = 70,
++} NMState;
++#define NM_STATE_CONNECTED NM_STATE_CONNECTED_GLOBAL
+
+ class networkmanager_network_extension : public network_extension {
+ public:
+--
+2.35.1
+
diff --git a/net-libs/libproxy/libproxy-0.4.18.ebuild b/net-libs/libproxy/libproxy-0.4.18.ebuild
new file mode 100644
index 000000000000..0e6a926aebd0
--- /dev/null
+++ b/net-libs/libproxy/libproxy-0.4.18.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+inherit cmake-multilib flag-o-matic mono-env
+
+DESCRIPTION="Library for automatic proxy configuration management"
+HOMEPAGE="https://github.com/libproxy/libproxy"
+SRC_URI="https://github.com/libproxy/libproxy/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~x86-solaris"
+IUSE="duktape gnome kde mono networkmanager spidermonkey test webkit"
+
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ virtual/pkgconfig
+"
+DEPEND="
+ duktape? ( dev-lang/duktape )
+ gnome? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )
+ mono? ( dev-lang/mono )
+ networkmanager? ( sys-apps/dbus:0[${MULTILIB_USEDEP}] )
+ spidermonkey? ( dev-lang/spidermonkey:68 )
+ webkit? ( net-libs/webkit-gtk:4 )
+"
+RDEPEND="${DEPEND}
+ kde? ( kde-frameworks/kconfig:5 )
+"
+# avoid dependency loop, bug #467696
+PDEPEND="networkmanager? ( net-misc/networkmanager )"
+
+PATCHES=(
+ # https://github.com/libproxy/libproxy/issues/27
+ "${FILESDIR}/${PN}-0.4.12-macosx.patch"
+
+ # prevent dependency loop with networkmanager, libsoup, glib-networking; bug #467696
+ # https://github.com/libproxy/libproxy/issues/28
+ "${FILESDIR}/${PN}-0.4.18-avoid-nm-build-dep.patch"
+
+ "${FILESDIR}/${PN}-0.4.18-Fix-building-without-duktape.patch"
+)
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_C_FLAGS="${CFLAGS}"
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS}"
+
+ -DWITH_DOTNET=$(multilib_is_native_abi && usex mono || echo OFF)
+ $(multilib_is_native_abi && usex mono -DGMCS_EXECUTABLE="${EPREFIX}"/usr/bin/mcs)
+ -DWITH_GNOME2=OFF
+ -DWITH_GNOME3=$(usex gnome)
+ -DWITH_KDE=$(usex kde)
+ -DWITH_MOZJS=$(multilib_is_native_abi && usex spidermonkey || echo OFF)
+ -DWITH_NM=$(usex networkmanager)
+ -DWITH_PERL=OFF # bug 705410, uses reserved target name "test"
+ -DWITH_PYTHON2=OFF
+ -DWITH_PYTHON3=OFF # Major issue: https://github.com/libproxy/libproxy/issues/65
+ # WITH_VALA just copies the .vapi file over and needs no deps,
+ # hence always enable it unconditionally
+ -DWITH_VALA=ON
+ -DWITH_WEBKIT=$(multilib_is_native_abi && usex webkit || echo OFF)
+ -DWITH_WEBKIT3=$(multilib_is_native_abi && usex webkit || echo OFF)
+ -DWITH_DUKTAPE=$(multilib_is_native_abi && usex duktape || echo OFF)
+
+ -DWITH_NATUS=OFF
+ -DBUILD_TESTING=$(usex test)
+ )
+ cmake_src_configure
+}
+
+src_configure() {
+ [[ ${CHOST} == *-solaris* ]] && append-libs -lsocket -lnsl
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_install_all() {
+ doman "${FILESDIR}"/proxy.1
+}
diff --git a/net-libs/libproxy/metadata.xml b/net-libs/libproxy/metadata.xml
index d443844f9a64..c93e411e331d 100644
--- a/net-libs/libproxy/metadata.xml
+++ b/net-libs/libproxy/metadata.xml
@@ -5,6 +5,7 @@
<email>freedesktop-bugs@gentoo.org</email>
</maintainer>
<use>
+ <flag name="duktape">Use <pkg>dev-lang/duktape</pkg> for PAC parsing</flag>
<flag name="gnome">Enable support for reading proxy settings from GNOME</flag>
<flag name="kde">Enable support for reading proxy settings from KDE</flag>
<flag name="spidermonkey">Use libmozjs from <pkg>dev-lang/spidermonkey</pkg> for PAC parsing</flag>