diff options
Diffstat (limited to 'net-libs/libproxy')
-rw-r--r-- | net-libs/libproxy/Manifest | 6 | ||||
-rw-r--r-- | net-libs/libproxy/files/libproxy-0.4.15-avoid-nm-build-dep.patch | 63 | ||||
-rw-r--r-- | net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-1.patch | 101 | ||||
-rw-r--r-- | net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-2.patch | 23 | ||||
-rw-r--r-- | net-libs/libproxy/files/libproxy-0.4.15-python-3.7.patch | 23 | ||||
-rw-r--r-- | net-libs/libproxy/libproxy-0.4.15.ebuild | 87 |
6 files changed, 303 insertions, 0 deletions
diff --git a/net-libs/libproxy/Manifest b/net-libs/libproxy/Manifest index 0d7f9d817bd7..6397513b1c38 100644 --- a/net-libs/libproxy/Manifest +++ b/net-libs/libproxy/Manifest @@ -3,7 +3,13 @@ AUX libproxy-0.4.11-avoid-nm-build-dep.patch 2062 BLAKE2B e563e162d5b393f2badeeb AUX libproxy-0.4.12-macosx.patch 3387 BLAKE2B 6c16cc9bd73255c106413708db7f88a6391ffbc4617461edf8fdbe6bf6bfe8ce194f7770e25c5eeeeacd14302aaf76f0c8a30793277d459b118bed838f81d1c6 SHA512 bb815f33745fe1304139f5da2502d157f049ce896ebc2dd5a62c012877c9a3e6bf850a47438a919a910f27ef49c20f9666a3da5a7386641d3250e58f481c2753 AUX libproxy-0.4.12-mozjs.pc.patch 781 BLAKE2B 9476a64b55fff7ec206042c42479c76bf1ca005f6fe93c621d307c2561c806c1d8718972bf787defc94fc4c9bb65a7c6a7d1e3ff1c2eab403c6290dc78d94e23 SHA512 30ad9224a5676b8ac8f50b56cdb61f2708225994bc26910eb07f58345423102116058a19273b16b462dec846b065925615251fe5fb7b2394f232dd66a013d230 AUX libproxy-0.4.13-cmake-37.patch 954 BLAKE2B 156f95113351f42f4e48a741f13dcda3cb0cfa7e26409c7cdb1b3347b4e0e30afb4c06de371723180cb4533df5180563606055b2ccd0f1a4a9b314cd3c84951c SHA512 e1aeacb40f06e9137d1f82444961e1216479e7d44d18c9d4c16b09d0e0b0c92c2f77e4c37fe33a020695d5dc23b1e4b2e4617d25e7d878bb816c60f3bc78ed45 +AUX libproxy-0.4.15-avoid-nm-build-dep.patch 2300 BLAKE2B 7932706ccb856bf3b68dd319d19a99675217b699332c2ffebbbc8d7c54e4478e722b74e596e94917a1a93b0a13da3bc2e79fa41e23249437c8f21637964237c1 SHA512 b603060bd60d35fc29420a22235c9e46b9afc9bd048ec78738699bcd7b555c93775be60c05f150780af6b77f403d0197649e8e1bd2ce599f415dba90380bfc22 +AUX libproxy-0.4.15-mozjs-52-1.patch 3771 BLAKE2B c5b760979a0c8188ada05e2842d65fd108451d57255c12e971a99f42e373e77c1ac069506085c1d8d20f395551b140dac77a0d33b009b760632921c9452c5d34 SHA512 6572bd725662533aa5a2660461606bc101bb75edfe21021a73f2faa4d3f5d91fb83637ac43e448ad124abfc1c6e59c82f96ae9cd571289767ee6c193be552fbf +AUX libproxy-0.4.15-mozjs-52-2.patch 847 BLAKE2B 0b6b408b6745c6b4bf277549a8682db67b4db426e0fe87830c0ca51f9da3c0fc6afc39ee22f13af5c4e3abcf587765b1de0bddc508530302dded86eb1e547b8f SHA512 e1f3fd54ea7fba12d019fe9388236eba1afb73a7e9978c4bbcf9309f9d3aa246747f15e1e62a1d86eba05147b62b2d97d45d1b4547f08a01e4ddef8a8b0746ad +AUX libproxy-0.4.15-python-3.7.patch 774 BLAKE2B fedb3b9c1f003a24706a8b9b66d70f3abe01dd26bdd25eacf7685247d262e02ae0b406d0a2871f12d8d1b92df5abcdf207d940fec91c964fb33d38b454a91d82 SHA512 4330e9043ed767accea8f6f74b6999017633c51d615b229e7a43e9ed468630c630653c6917a4196e8f05d285df383de3bb269a79db127d902d1c960f29d39246 AUX proxy.1 681 BLAKE2B 14db05aa4282661bf4148af6187f8d3f2b9cefaa439851c5086b397f1b6972b8f28027aeb9ad7ac801d616f5b46f19b050642f0e754a63bd6aca1354aa2bad5c SHA512 57074dde3303d8775cb842fee5a6dde22f1c14d9e30af16f018e81fa87585c6e5b12edc1453cf8135624b4ac49568aebfdeaf634782307d6776c4cf2c5f8f96f DIST libproxy-0.4.13.tar.gz 89296 BLAKE2B 05e1c6a56e562a9fc8c8123bead6f3a264589f97895079f3d90cd0edd03d980c9b2bb0a4a3c2d2c2aa553e0ed0450863bd74236c00d94b9c42930efe9c37bff1 SHA512 babbe5e9326cb2bfdf4504662533b314f72c3475687f8b57c235614698cb18e0ed31752b834cb1d33cc94ecd3af6589684b2846e73830f0be3557c465a1f1c42 +DIST libproxy-0.4.15.tar.gz 93084 BLAKE2B 9aa86403eaf4e1791958013c2739e251c61f11da40e66b3296b33a7f380828895f621175add5efb3cd17222ff016941801c25c2d70c19ef3a6652510268a0b3d SHA512 8f68bd56e44aeb3f553f4657bef82a5d14302780508dafa32454d6f724b724c884ceed6042f8df53a081d26ea0b05598cf35eab44823257c47c5ef8afb36442b EBUILD libproxy-0.4.13-r2.ebuild 3162 BLAKE2B a47bc29f68d55349482c655bceadb23863dbd759eaf932d2750ecc9d710d2e5fde03ddd919427fe194d8c343a300214bde41301d8b467f3ca57114455b84d588 SHA512 b78198fe3dda3743208f7a1e0f4a04fff1d27e34993585591c32ef968759dc9f8372107d7dacf5cab6794404f865ae4e26bf74fd5c76319d4f944b94b245db1d +EBUILD libproxy-0.4.15.ebuild 2839 BLAKE2B 66d83f73f4820e7b148574984aa094d8473298af4c156691593e21138c31fd6e8fcfe02bdc7eca4b200fda06ad43c7e3d16b5b0ead7688cc9e3f26eb261a86cd SHA512 7a37a0c189521e06af8fe309be4bcadce2aee63d684c5fe21fc7a58273aeda1224b177187bd18cf20249be569f179b2ad77f1d0723dfe2adf9e725ed8e635108 MISC metadata.xml 691 BLAKE2B fc4bcbf2660517674f65be0e28ee44bb1ad5958b2ab8bfc52ec071e46dd75b2ab7317f73644403c5fcc81bdb390afbad5da72763268bbbbe4bb50d077c1aa303 SHA512 d9405961f0cf0cc796948bacb020668a1a0d5b0e0690d9473029d3835dc51fed3d131b7e3da215419a2489bec21d95576fd4592a58aa46bb76114d985a981f7f diff --git a/net-libs/libproxy/files/libproxy-0.4.15-avoid-nm-build-dep.patch b/net-libs/libproxy/files/libproxy-0.4.15-avoid-nm-build-dep.patch new file mode 100644 index 000000000000..0b9320a6dfd5 --- /dev/null +++ b/net-libs/libproxy/files/libproxy-0.4.15-avoid-nm-build-dep.patch @@ -0,0 +1,63 @@ +From 518214ee85e10c5bc99d3b115ae7ac9cc3fc14fc 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 +--- + libproxy/cmake/modules/network_networkmanager.cmk | 4 ++-- + libproxy/modules/network_networkmanager.cpp | 23 +++++++++++++++++------ + 2 files changed, 19 insertions(+), 8 deletions(-) + +--- a/libproxy/cmake/modules/network_networkmanager.cmk 2017-05-11 11:33:33.000000000 +0200 ++++ b/libproxy/cmake/modules/network_networkmanager.cmk 2019-10-06 15:17:37.881932672 +0200 +@@ -1,6 +1,6 @@ + if (NOT WIN32 AND NOT APPLE) +- px_check_modules(NM libnm dbus-1) ++ px_check_modules(NM dbus-1) + if (NOT NM_FOUND) +- px_check_modules(NMold NetworkManager dbus-1) ++ px_check_modules(NMold dbus-1) + endif (NOT NM_FOUND) + endif() + +--- a/libproxy/modules/network_networkmanager.cpp 2017-05-11 11:33:33.000000000 +0200 ++++ b/libproxy/modules/network_networkmanager.cpp 2019-10-06 15:24:21.621173178 +0200 +@@ -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-0.9.6.4'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: +-- +1.8.2.1 diff --git a/net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-1.patch b/net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-1.patch new file mode 100644 index 000000000000..c2d0257d437f --- /dev/null +++ b/net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-1.patch @@ -0,0 +1,101 @@ +From f594720280b2e40d81fa6e286a0ef8868687ef7e Mon Sep 17 00:00:00 2001 +From: Pierre Lejeune <superheron@gmail.com> +Date: Sat, 30 Jun 2018 21:10:06 +0200 +Subject: [PATCH] Build with mozjs-52 + +Fixes #71 +--- + libproxy/cmake/modules/pacrunner_mozjs.cmk | 2 +- + libproxy/modules/pacrunner_mozjs.cpp | 19 +++++++------------ + 2 files changed, 8 insertions(+), 13 deletions(-) + +diff --git a/libproxy/cmake/modules/pacrunner_mozjs.cmk b/libproxy/cmake/modules/pacrunner_mozjs.cmk +index c2ae3db..20857fb 100644 +--- a/libproxy/cmake/modules/pacrunner_mozjs.cmk ++++ b/libproxy/cmake/modules/pacrunner_mozjs.cmk +@@ -9,7 +9,7 @@ if(WIN32) + elseif(NOT APPLE) + option(WITH_MOZJS "Search for MOZJS package" ON) + if (WITH_MOZJS) +- pkg_search_module(MOZJS mozjs-38) ++ pkg_search_module(MOZJS mozjs-52 mozjs-60) + if(MOZJS_FOUND) + include_directories(${MOZJS_INCLUDE_DIRS}) + link_directories(${MOZJS_LIBRARY_DIRS}) +diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp +index a70b2e9..ed07c69 100644 +--- a/libproxy/modules/pacrunner_mozjs.cpp ++++ b/libproxy/modules/pacrunner_mozjs.cpp +@@ -35,6 +35,7 @@ using namespace libproxy; + #pragma GCC diagnostic ignored "-Winvalid-offsetof" + #include <jsapi.h> + #pragma GCC diagnostic error "-Winvalid-offsetof" ++#include <js/Initialization.h> + #include <js/CallArgs.h> + + #include "pacutils.h" +@@ -111,17 +112,14 @@ class mozjs_pacrunner : public pacrunner { + mozjs_pacrunner(string pac, const url& pacurl) throw (bad_alloc) : pacrunner(pac, pacurl) { + + // Set defaults +- this->jsrun = nullptr; + this->jsctx = nullptr; + JS_Init(); + +- // Initialize Javascript runtime environment +- if (!(this->jsrun = JS_NewRuntime(1024 * 1024))) goto error; +- if (!(this->jsctx = JS_NewContext(this->jsrun, 1024 * 1024))) goto error; ++ // Initialize Javascript context ++ if (!(this->jsctx = JS_NewContext(1024 * 1024))) goto error; + { + JS::RootedValue rval(this->jsctx); + JS::CompartmentOptions compart_opts; +- compart_opts.setVersion(JSVERSION_LATEST); + + this->jsglb = new JS::Heap<JSObject*>(JS_NewGlobalObject( + this->jsctx, &cls, +@@ -139,16 +137,15 @@ class mozjs_pacrunner : public pacrunner { + JS::CompileOptions options(this->jsctx); + options.setUTF8(true); + +- JS::Evaluate(this->jsctx, global, options, JAVASCRIPT_ROUTINES, +- strlen(JAVASCRIPT_ROUTINES), &rval); ++ JS::Evaluate(this->jsctx, options, JAVASCRIPT_ROUTINES, ++ strlen(JAVASCRIPT_ROUTINES), JS::MutableHandleValue(&rval)); + + // Add PAC to the environment +- JS::Evaluate(this->jsctx, global, options, pac.c_str(), pac.length(), &rval); ++ JS::Evaluate(this->jsctx, options, pac.c_str(), pac.length(), JS::MutableHandleValue(&rval)); + return; + } + error: + if (this->jsctx) JS_DestroyContext(this->jsctx); +- if (this->jsrun) JS_DestroyRuntime(this->jsrun); + throw bad_alloc(); + } + +@@ -156,7 +153,6 @@ class mozjs_pacrunner : public pacrunner { + if (this->jsac) delete this->jsac; + if (this->jsglb) delete this->jsglb; + if (this->jsctx) JS_DestroyContext(this->jsctx); +- if (this->jsrun) JS_DestroyRuntime(this->jsrun); + JS_ShutDown(); + } + +@@ -178,7 +174,7 @@ class mozjs_pacrunner : public pacrunner { + JS::RootedObject global(this->jsctx,this->jsglb->get()); + bool result = JS_CallFunctionName(this->jsctx, global, "FindProxyForURL", args, &rval); + if (!result) return ""; +- ++ + char * tmpanswer = JS_EncodeString(this->jsctx, rval.toString()); + string answer = string(tmpanswer); + JS_free(this->jsctx, tmpanswer); +@@ -188,7 +184,6 @@ class mozjs_pacrunner : public pacrunner { + } + + private: +- JSRuntime *jsrun; + JSContext *jsctx; + JS::Heap<JSObject*> *jsglb; + JSAutoCompartment *jsac; diff --git a/net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-2.patch b/net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-2.patch new file mode 100644 index 000000000000..fc23ef2cf8e5 --- /dev/null +++ b/net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-2.patch @@ -0,0 +1,23 @@ +From a9b052c6e30101fb0b702917f245a3e2a2f08366 Mon Sep 17 00:00:00 2001 +From: Laurent Bigonville <bigon@bigon.be> +Date: Tue, 2 Oct 2018 10:22:56 +0200 +Subject: [PATCH] Add call to JS::InitSelfHostedCode() + +This is needed otherwise mozjs crashes +--- + libproxy/modules/pacrunner_mozjs.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp +index ed07c69..38e7d46 100644 +--- a/libproxy/modules/pacrunner_mozjs.cpp ++++ b/libproxy/modules/pacrunner_mozjs.cpp +@@ -118,6 +118,8 @@ class mozjs_pacrunner : public pacrunner { + // Initialize Javascript context + if (!(this->jsctx = JS_NewContext(1024 * 1024))) goto error; + { ++ if (!JS::InitSelfHostedCode(this->jsctx)) goto error; ++ + JS::RootedValue rval(this->jsctx); + JS::CompartmentOptions compart_opts; + diff --git a/net-libs/libproxy/files/libproxy-0.4.15-python-3.7.patch b/net-libs/libproxy/files/libproxy-0.4.15-python-3.7.patch new file mode 100644 index 000000000000..95e56c2fe25d --- /dev/null +++ b/net-libs/libproxy/files/libproxy-0.4.15-python-3.7.patch @@ -0,0 +1,23 @@ +From 2d6da65598b90480b4a62c4633eda035ea51681f Mon Sep 17 00:00:00 2001 +From: David King <amigadave@amigadave.com> +Date: Wed, 27 Jun 2018 06:36:00 +0100 +Subject: [PATCH] python: support Python 3.7 and 3.8 + +Add 3.7 and 3.8 to the list of accepted Python 3 versions. +--- + cmake/FindPython3Interp.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/FindPython3Interp.cmake b/cmake/FindPython3Interp.cmake +index c6cbe3d..8e5e409 100644 +--- a/cmake/FindPython3Interp.cmake ++++ b/cmake/FindPython3Interp.cmake +@@ -39,7 +39,7 @@ + + unset(_Python3_NAMES) + +-set(_Python3_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0) ++set(_Python3_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) + + if(Python3Interp_FIND_VERSION) + if(Python3Interp_FIND_VERSION_COUNT GREATER 1) diff --git a/net-libs/libproxy/libproxy-0.4.15.ebuild b/net-libs/libproxy/libproxy-0.4.15.ebuild new file mode 100644 index 000000000000..8f8f6a2ec5a1 --- /dev/null +++ b/net-libs/libproxy/libproxy-0.4.15.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2020 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 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" +IUSE="gnome kde mono networkmanager perl spidermonkey test webkit" + +RESTRICT="!test? ( test )" + +BDEPEND=" + virtual/pkgconfig:0[${MULTILIB_USEDEP}] +" +DEPEND=" + gnome? ( dev-libs/glib:2[${MULTILIB_USEDEP}] ) + mono? ( dev-lang/mono ) + networkmanager? ( sys-apps/dbus:0[${MULTILIB_USEDEP}] ) + perl? ( dev-lang/perl:= ) + spidermonkey? ( >=dev-lang/spidermonkey-52.0.0:= ) + webkit? ( net-libs/webkit-gtk:4 ) +" +RDEPEND="${DEPEND} + kde? ( kde-frameworks/kconfig:5 ) +" +# avoid dependency loop, bug #467696 +PDEPEND="networkmanager? ( net-misc/networkmanager )" + +PATCHES=( + # get-pac-test freezes when run by the ebuild, succeeds when building + # manually; virtualx.eclass doesn't help :( + "${FILESDIR}/${PN}-0.4.10-disable-pac-test.patch" + + # 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}/${P}-avoid-nm-build-dep.patch" + + # backports from git master: + "${FILESDIR}"/${P}-python-3.7.patch # find python-3.7 and 3.8 as well + "${FILESDIR}"/${P}-mozjs-52-{1,2}.patch +) + +multilib_src_configure() { + local mycmakeargs=( + -DCMAKE_C_FLAGS="${CFLAGS}" + -DCMAKE_CXX_FLAGS="${CXXFLAGS}" + -DWITH_NATUS=OFF + -DWITH_PYTHON2=OFF + # WITH_VALA just copies the .vapi file over and needs no deps, + # hence always enable it unconditionally + -DWITH_VALA=ON + -DWITH_WEBKIT=OFF + $(multilib_is_native_abi && usex mono -DGMCS_EXECUTABLE="${EPREFIX}"/usr/bin/mcs) + -DWITH_GNOME3=$(usex gnome) + -DWITH_KDE=$(usex kde) + -DWITH_DOTNET=$(multilib_is_native_abi && usex mono || echo OFF) + -DWITH_NM=$(usex networkmanager) + $(multilib_is_native_abi && usex perl -DPERL_VENDORINSTALL=ON) + -DWITH_PERL=$(multilib_is_native_abi && usex perl || echo OFF) + -DWITH_PYTHON3=OFF # Major issue: https://github.com/libproxy/libproxy/issues/65 + -DWITH_MOZJS=$(multilib_is_native_abi && usex spidermonkey || echo OFF) + -DBUILD_TESTING=$(usex test) + -DWITH_WEBKIT3=$(multilib_is_native_abi && usex webkit || echo OFF) + ) + cmake_src_configure +} + +src_configure() { + [[ ${CHOST} == *-solaris* ]] && append-libs -lsocket -lnsl + + multilib-minimal_src_configure +} + +multilib_src_install_all() { + doman "${FILESDIR}"/proxy.1 +} |