1 |
commit: eb13aa137fcda3e70a82a877aef671a9c7860634 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 11 09:22:26 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 11 09:22:26 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb13aa13 |
7 |
|
8 |
net-libs/libproxy: fix build on c++17 compiler (gcc-11) |
9 |
|
10 |
Closes: https://bugs.gentoo.org/732700 |
11 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
12 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
13 |
|
14 |
.../libproxy/files/libproxy-0.4.15-gcc-11.patch | 118 +++++++++++++++++++++ |
15 |
net-libs/libproxy/libproxy-0.4.15-r2.ebuild | 86 +++++++++++++++ |
16 |
2 files changed, 204 insertions(+) |
17 |
|
18 |
diff --git a/net-libs/libproxy/files/libproxy-0.4.15-gcc-11.patch b/net-libs/libproxy/files/libproxy-0.4.15-gcc-11.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..2d40a6c1600 |
21 |
--- /dev/null |
22 |
+++ b/net-libs/libproxy/files/libproxy-0.4.15-gcc-11.patch |
23 |
@@ -0,0 +1,118 @@ |
24 |
+https://bugs.gentoo.org/732700 |
25 |
+https://github.com/libproxy/libproxy/issues/127 |
26 |
+ |
27 |
+--- a/libproxy/extension_config.hpp |
28 |
++++ b/libproxy/extension_config.hpp |
29 |
+@@ -31,7 +31,7 @@ using namespace libmodman; |
30 |
+ class DLL_PUBLIC config_extension : public extension<config_extension> { |
31 |
+ public: |
32 |
+ // Abstract methods |
33 |
+- virtual vector<url> get_config(const url &dst) throw (runtime_error)=0; |
34 |
++ virtual vector<url> get_config(const url &dst)=0; |
35 |
+ |
36 |
+ // Virtual methods |
37 |
+ virtual string get_ignore(const url &dst); |
38 |
+--- a/libproxy/extension_pacrunner.cpp |
39 |
++++ b/libproxy/extension_pacrunner.cpp |
40 |
+@@ -30,7 +30,7 @@ pacrunner_extension::~pacrunner_extension() { |
41 |
+ if (this->pr) delete this->pr; |
42 |
+ } |
43 |
+ |
44 |
+-pacrunner* pacrunner_extension::get(string pac, const url& pacurl) throw (bad_alloc) { |
45 |
++pacrunner* pacrunner_extension::get(string pac, const url& pacurl) { |
46 |
+ if (this->pr) { |
47 |
+ if (this->last == pac) |
48 |
+ return this->pr; |
49 |
+--- a/libproxy/extension_pacrunner.hpp |
50 |
++++ b/libproxy/extension_pacrunner.hpp |
51 |
+@@ -26,7 +26,7 @@ |
52 |
+ #define PX_PACRUNNER_MODULE_EZ(name, symb, smod) \ |
53 |
+ class name ## _pacrunner_extension : public pacrunner_extension { \ |
54 |
+ protected: \ |
55 |
+- virtual pacrunner* create(string pac, const url& pacurl) throw (bad_alloc) { \ |
56 |
++ virtual pacrunner* create(string pac, const url& pacurl) { \ |
57 |
+ return new name ## _pacrunner(pac, pacurl); \ |
58 |
+ } \ |
59 |
+ }; \ |
60 |
+@@ -41,13 +41,13 @@ class DLL_PUBLIC pacrunner { |
61 |
+ public: |
62 |
+ pacrunner(string pac, const url& pacurl); |
63 |
+ virtual ~pacrunner() {}; |
64 |
+- virtual string run(const url& url) throw (bad_alloc)=0; |
65 |
++ virtual string run(const url& url)=0; |
66 |
+ }; |
67 |
+ |
68 |
+ class DLL_PUBLIC pacrunner_extension : public extension<pacrunner_extension, true> { |
69 |
+ public: |
70 |
+ // Virtual methods |
71 |
+- virtual pacrunner* get(string pac, const url& pacurl) throw (bad_alloc); |
72 |
++ virtual pacrunner* get(string pac, const url& pacurl); |
73 |
+ virtual ~pacrunner_extension(); |
74 |
+ |
75 |
+ // Final methods |
76 |
+@@ -55,7 +55,7 @@ public: |
77 |
+ |
78 |
+ protected: |
79 |
+ // Abstract methods |
80 |
+- virtual pacrunner* create(string pac, const url& pacurl) throw (bad_alloc)=0; |
81 |
++ virtual pacrunner* create(string pac, const url& pacurl)=0; |
82 |
+ |
83 |
+ private: |
84 |
+ pacrunner* pr; |
85 |
+--- a/libproxy/modules/config_envvar.cpp |
86 |
++++ b/libproxy/modules/config_envvar.cpp |
87 |
+@@ -24,7 +24,7 @@ using namespace libproxy; |
88 |
+ |
89 |
+ class envvar_config_extension : public config_extension { |
90 |
+ public: |
91 |
+- vector<url> get_config(const url &dst) throw (runtime_error) { |
92 |
++ vector<url> get_config(const url &dst) { |
93 |
+ const char *proxy = NULL; |
94 |
+ vector<url> response; |
95 |
+ |
96 |
+--- a/libproxy/modules/config_sysconfig.cpp |
97 |
++++ b/libproxy/modules/config_sysconfig.cpp |
98 |
+@@ -124,7 +124,7 @@ public: |
99 |
+ ~sysconfig_config_extension() { |
100 |
+ } |
101 |
+ |
102 |
+- vector<url> get_config(const url &dst) throw (runtime_error) { |
103 |
++ vector<url> get_config(const url &dst) { |
104 |
+ map<string,string>::const_iterator it = _data.find("PROXY_ENABLED"); |
105 |
+ vector<url> response; |
106 |
+ |
107 |
+--- a/libproxy/url.cpp |
108 |
++++ b/libproxy/url.cpp |
109 |
+@@ -115,7 +115,7 @@ string url::encode(const string &data, const string &valid_reserved) { |
110 |
+ return encoded.str(); |
111 |
+ } |
112 |
+ |
113 |
+-url::url(const string &url) throw(parse_error) |
114 |
++url::url(const string &url) |
115 |
+ : m_orig(url), m_port(0), m_ips(NULL) { |
116 |
+ size_t idx = 0; |
117 |
+ size_t hier_part_start, hier_part_end; |
118 |
+@@ -298,7 +298,7 @@ url& url::operator=(const url& url) { |
119 |
+ return *this; |
120 |
+ } |
121 |
+ |
122 |
+-url& url::operator=(string strurl) throw (parse_error) { |
123 |
++url& url::operator=(string strurl) { |
124 |
+ url tmp(strurl); |
125 |
+ *this = tmp; |
126 |
+ return *this; |
127 |
+--- a/libproxy/url.hpp |
128 |
++++ b/libproxy/url.hpp |
129 |
+@@ -50,10 +50,10 @@ public: |
130 |
+ |
131 |
+ ~url(); |
132 |
+ url(const url& url); |
133 |
+- url(const string& url) throw (parse_error); |
134 |
++ url(const string& url); |
135 |
+ bool operator==(const url& url) const; |
136 |
+ url& operator=(const url& url); |
137 |
+- url& operator=(string url) throw (parse_error); |
138 |
++ url& operator=(string url); |
139 |
+ |
140 |
+ string get_host() const; |
141 |
+ sockaddr const* const* get_ips(bool usedns); |
142 |
|
143 |
diff --git a/net-libs/libproxy/libproxy-0.4.15-r2.ebuild b/net-libs/libproxy/libproxy-0.4.15-r2.ebuild |
144 |
new file mode 100644 |
145 |
index 00000000000..cbec1147443 |
146 |
--- /dev/null |
147 |
+++ b/net-libs/libproxy/libproxy-0.4.15-r2.ebuild |
148 |
@@ -0,0 +1,86 @@ |
149 |
+# Copyright 1999-2020 Gentoo Authors |
150 |
+# Distributed under the terms of the GNU General Public License v2 |
151 |
+ |
152 |
+EAPI=7 |
153 |
+ |
154 |
+CMAKE_ECLASS=cmake |
155 |
+inherit cmake-multilib flag-o-matic mono-env |
156 |
+ |
157 |
+DESCRIPTION="Library for automatic proxy configuration management" |
158 |
+HOMEPAGE="https://github.com/libproxy/libproxy" |
159 |
+SRC_URI="https://github.com/libproxy/libproxy/archive/${PV}.tar.gz -> ${P}.tar.gz" |
160 |
+ |
161 |
+LICENSE="LGPL-2.1+" |
162 |
+SLOT="0" |
163 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" |
164 |
+IUSE="gnome kde mono networkmanager spidermonkey test webkit" |
165 |
+ |
166 |
+RESTRICT="!test? ( test )" |
167 |
+ |
168 |
+BDEPEND=" |
169 |
+ virtual/pkgconfig |
170 |
+" |
171 |
+DEPEND=" |
172 |
+ gnome? ( dev-libs/glib:2[${MULTILIB_USEDEP}] ) |
173 |
+ mono? ( dev-lang/mono ) |
174 |
+ networkmanager? ( sys-apps/dbus:0[${MULTILIB_USEDEP}] ) |
175 |
+ spidermonkey? ( >=dev-lang/spidermonkey-52.0.0:= ) |
176 |
+ webkit? ( net-libs/webkit-gtk:4 ) |
177 |
+" |
178 |
+RDEPEND="${DEPEND} |
179 |
+ kde? ( kde-frameworks/kconfig:5 ) |
180 |
+" |
181 |
+# avoid dependency loop, bug #467696 |
182 |
+PDEPEND="networkmanager? ( net-misc/networkmanager )" |
183 |
+ |
184 |
+PATCHES=( |
185 |
+ # get-pac-test freezes when run by the ebuild, succeeds when building |
186 |
+ # manually; virtualx.eclass doesn't help :( |
187 |
+ "${FILESDIR}/${PN}-0.4.10-disable-pac-test.patch" |
188 |
+ |
189 |
+ # https://github.com/libproxy/libproxy/issues/27 |
190 |
+ "${FILESDIR}/${PN}-0.4.12-macosx.patch" |
191 |
+ |
192 |
+ # prevent dependency loop with networkmanager, libsoup, glib-networking; bug #467696 |
193 |
+ # https://github.com/libproxy/libproxy/issues/28 |
194 |
+ "${FILESDIR}/${P}-avoid-nm-build-dep.patch" |
195 |
+ |
196 |
+ # backports from git master: |
197 |
+ "${FILESDIR}"/${P}-python-3.7.patch # find python-3.7 and 3.8 as well |
198 |
+ "${FILESDIR}"/${P}-mozjs-52-{1,2}.patch |
199 |
+ "${FILESDIR}"/${P}-gcc-11.patch |
200 |
+) |
201 |
+ |
202 |
+multilib_src_configure() { |
203 |
+ local mycmakeargs=( |
204 |
+ -DCMAKE_C_FLAGS="${CFLAGS}" |
205 |
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS}" |
206 |
+ -DWITH_NATUS=OFF |
207 |
+ -DWITH_PYTHON2=OFF |
208 |
+ # WITH_VALA just copies the .vapi file over and needs no deps, |
209 |
+ # hence always enable it unconditionally |
210 |
+ -DWITH_VALA=ON |
211 |
+ -DWITH_WEBKIT=OFF |
212 |
+ $(multilib_is_native_abi && usex mono -DGMCS_EXECUTABLE="${EPREFIX}"/usr/bin/mcs) |
213 |
+ -DWITH_GNOME3=$(usex gnome) |
214 |
+ -DWITH_KDE=$(usex kde) |
215 |
+ -DWITH_DOTNET=$(multilib_is_native_abi && usex mono || echo OFF) |
216 |
+ -DWITH_NM=$(usex networkmanager) |
217 |
+ -DWITH_PERL=OFF # bug 705410, uses reserved target name "test" |
218 |
+ -DWITH_PYTHON3=OFF # Major issue: https://github.com/libproxy/libproxy/issues/65 |
219 |
+ -DWITH_MOZJS=$(multilib_is_native_abi && usex spidermonkey || echo OFF) |
220 |
+ -DBUILD_TESTING=$(usex test) |
221 |
+ -DWITH_WEBKIT3=$(multilib_is_native_abi && usex webkit || echo OFF) |
222 |
+ ) |
223 |
+ cmake_src_configure |
224 |
+} |
225 |
+ |
226 |
+src_configure() { |
227 |
+ [[ ${CHOST} == *-solaris* ]] && append-libs -lsocket -lnsl |
228 |
+ |
229 |
+ multilib-minimal_src_configure |
230 |
+} |
231 |
+ |
232 |
+multilib_src_install_all() { |
233 |
+ doman "${FILESDIR}"/proxy.1 |
234 |
+} |