1 |
commit: f8191695a8d61399cbacb6c2e97de8dd21f91beb |
2 |
Author: Peter Levine <plevine457 <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri May 26 04:45:12 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 26 21:00:02 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8191695 |
7 |
|
8 |
dev-cpp/pficommon: Fix building with GCC-6 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=594540 |
11 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/4765 |
13 |
|
14 |
.../pficommon/files/pficommon-1.3.1.0-gcc6.patch | 350 +++++++++++++++++++++ |
15 |
dev-cpp/pficommon/pficommon-1.3.1.0.ebuild | 5 +- |
16 |
2 files changed, 353 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/dev-cpp/pficommon/files/pficommon-1.3.1.0-gcc6.patch b/dev-cpp/pficommon/files/pficommon-1.3.1.0-gcc6.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..62373838919 |
21 |
--- /dev/null |
22 |
+++ b/dev-cpp/pficommon/files/pficommon-1.3.1.0-gcc6.patch |
23 |
@@ -0,0 +1,350 @@ |
24 |
+--- a/src/network/cgi/inserter.cpp |
25 |
++++ b/src/network/cgi/inserter.cpp |
26 |
+@@ -50,8 +50,8 @@ |
27 |
+ |
28 |
+ tag_inserter::~tag_inserter() |
29 |
+ { |
30 |
+- shared_ptr<tag_elem> elem(new tag_elem(name, attrs)); |
31 |
+- vector<shared_ptr<html_elem> > children=b.leave(); |
32 |
++ pfi::lang::shared_ptr<tag_elem> elem(new tag_elem(name, attrs)); |
33 |
++ vector<pfi::lang::shared_ptr<html_elem> > children=b.leave(); |
34 |
+ for (int i=0;i<(int)children.size();i++) |
35 |
+ elem->add_child(children[i]); |
36 |
+ b.push(elem); |
37 |
+@@ -59,12 +59,12 @@ |
38 |
+ |
39 |
+ text_inserter::text_inserter(const string &text, xhtml_builder &b) |
40 |
+ { |
41 |
+- b.push(shared_ptr<html_elem>(new text_elem(text))); |
42 |
++ b.push(pfi::lang::shared_ptr<html_elem>(new text_elem(text))); |
43 |
+ } |
44 |
+ |
45 |
+ prim_inserter::prim_inserter(const string &text, xhtml_builder &b) |
46 |
+ { |
47 |
+- b.push(shared_ptr<html_elem>(new prim_elem(text))); |
48 |
++ b.push(pfi::lang::shared_ptr<html_elem>(new prim_elem(text))); |
49 |
+ } |
50 |
+ |
51 |
+ } // cgi |
52 |
+--- a/src/network/cgi/server.cpp |
53 |
++++ b/src/network/cgi/server.cpp |
54 |
+@@ -161,12 +161,12 @@ |
55 |
+ <<", thread-num="<<thread_num |
56 |
+ <<", timeout="<<ssock->timeout()<<endl; |
57 |
+ |
58 |
+- ths=vector<shared_ptr<thread> >(thread_num); |
59 |
+- vector<shared_ptr<cgi, threading_model::multi_thread> > cgis(thread_num); |
60 |
++ ths=vector<pfi::lang::shared_ptr<thread> >(thread_num); |
61 |
++ vector<pfi::lang::shared_ptr<cgi, threading_model::multi_thread> > cgis(thread_num); |
62 |
+ |
63 |
+ for (int i=0; i<thread_num; i++){ |
64 |
+- cgis[i]=shared_ptr<cgi, threading_model::multi_thread>(dynamic_cast<cgi*>(c.clone())); |
65 |
+- ths[i]=shared_ptr<thread>(new thread(bind(&run_server::process, this, ssock, cgis[i]))); |
66 |
++ cgis[i]=pfi::lang::shared_ptr<cgi, threading_model::multi_thread>(dynamic_cast<cgi*>(c.clone())); |
67 |
++ ths[i]=pfi::lang::shared_ptr<thread>(new thread(bind(&run_server::process, this, ssock, cgis[i]))); |
68 |
+ if (!ths[i]->start()){ |
69 |
+ ostringstream oss; |
70 |
+ oss<<"unable to start thread"<<endl; |
71 |
+@@ -185,7 +185,7 @@ |
72 |
+ ths.clear(); |
73 |
+ } |
74 |
+ |
75 |
+-static shared_ptr<http::response> gen_resp(stringstream &ss) |
76 |
++static pfi::lang::shared_ptr<http::response> gen_resp(stringstream &ss) |
77 |
+ { |
78 |
+ http::header head(ss); |
79 |
+ |
80 |
+@@ -210,7 +210,7 @@ |
81 |
+ head.erase("status"); |
82 |
+ } |
83 |
+ |
84 |
+- shared_ptr<http::response> resp(new http::response(code, reason)); |
85 |
++ pfi::lang::shared_ptr<http::response> resp(new http::response(code, reason)); |
86 |
+ |
87 |
+ head["Content-Type"]=content_type; |
88 |
+ |
89 |
+@@ -232,10 +232,10 @@ |
90 |
+ } |
91 |
+ |
92 |
+ void run_server::process(socket_type ssock, |
93 |
+- shared_ptr<cgi, threading_model::multi_thread> cc) |
94 |
++ pfi::lang::shared_ptr<cgi, threading_model::multi_thread> cc) |
95 |
+ { |
96 |
+ for (;;){ |
97 |
+- shared_ptr<stream_socket> sock(ssock->accept()); |
98 |
++ pfi::lang::shared_ptr<stream_socket> sock(ssock->accept()); |
99 |
+ if (!sock) continue; |
100 |
+ |
101 |
+ if (ssock->timeout()>0 && !sock->set_timeout(ssock->timeout())) |
102 |
+@@ -272,7 +272,7 @@ |
103 |
+ |
104 |
+ cc->exec(req.body(), sout, cerr, env); |
105 |
+ |
106 |
+- shared_ptr<http::response> resp=gen_resp(sout); |
107 |
++ pfi::lang::shared_ptr<http::response> resp=gen_resp(sout); |
108 |
+ resp->send(sock); |
109 |
+ } |
110 |
+ catch(const exception &e){ |
111 |
+--- a/src/network/http/base.cpp |
112 |
++++ b/src/network/http/base.cpp |
113 |
+@@ -61,7 +61,7 @@ |
114 |
+ { |
115 |
+ } |
116 |
+ |
117 |
+-void header::read_header(function<bool(string*)> f) |
118 |
++void header::read_header(pfi::lang::function<bool(string*)> f) |
119 |
+ { |
120 |
+ string line, key, val; |
121 |
+ if (!f(&line)) |
122 |
+@@ -124,7 +124,7 @@ |
123 |
+ return sock->getline(*str, line_limit); |
124 |
+ } |
125 |
+ |
126 |
+-header::header(shared_ptr<stream_socket> sock) |
127 |
++header::header(pfi::lang::shared_ptr<stream_socket> sock) |
128 |
+ { |
129 |
+ read_header(bind(&socket_getline, sock.get(), _1, line_limit)); |
130 |
+ } |
131 |
+@@ -211,7 +211,7 @@ |
132 |
+ return dat.end(); |
133 |
+ } |
134 |
+ |
135 |
+-void header::send(shared_ptr<stream_socket> sock) |
136 |
++void header::send(pfi::lang::shared_ptr<stream_socket> sock) |
137 |
+ { |
138 |
+ for (int i=0;i<(int)dat.size();i++){ |
139 |
+ string line=dat[i].first+": "+dat[i].second+"\r\n"; |
140 |
+@@ -228,7 +228,7 @@ |
141 |
+ public: |
142 |
+ typedef C char_type; |
143 |
+ |
144 |
+- basic_httpbody_chunked_streambuf(shared_ptr<stream_socket> sock) |
145 |
++ basic_httpbody_chunked_streambuf(pfi::lang::shared_ptr<stream_socket> sock) |
146 |
+ : sock(sock) |
147 |
+ , chunk_rest(0) |
148 |
+ , buf(buf_size) |
149 |
+@@ -321,7 +321,7 @@ |
150 |
+ iss>>hex>>chunk_rest; |
151 |
+ } |
152 |
+ |
153 |
+- shared_ptr<stream_socket> sock; |
154 |
++ pfi::lang::shared_ptr<stream_socket> sock; |
155 |
+ |
156 |
+ int chunk_rest; |
157 |
+ |
158 |
+@@ -334,7 +334,7 @@ |
159 |
+ public: |
160 |
+ typedef C char_type; |
161 |
+ |
162 |
+- basic_httpbody_streambuf(shared_ptr<stream_socket> sock, int length) |
163 |
++ basic_httpbody_streambuf(pfi::lang::shared_ptr<stream_socket> sock, int length) |
164 |
+ : sock(sock) |
165 |
+ , rest(length) |
166 |
+ , buf(T::eof()){ |
167 |
+@@ -359,7 +359,7 @@ |
168 |
+ } |
169 |
+ |
170 |
+ private: |
171 |
+- shared_ptr<stream_socket> sock; |
172 |
++ pfi::lang::shared_ptr<stream_socket> sock; |
173 |
+ |
174 |
+ int rest; |
175 |
+ int buf; |
176 |
+@@ -368,7 +368,7 @@ |
177 |
+ template <class C, class T=char_traits<C> > |
178 |
+ class basic_httpbody_chunked_stream : public basic_iostream<C,T>{ |
179 |
+ public: |
180 |
+- basic_httpbody_chunked_stream(shared_ptr<stream_socket> sock) |
181 |
++ basic_httpbody_chunked_stream(pfi::lang::shared_ptr<stream_socket> sock) |
182 |
+ : basic_iostream<C,T>() |
183 |
+ , buf(sock){ |
184 |
+ this->init(&buf); |
185 |
+@@ -380,7 +380,7 @@ |
186 |
+ template <class C, class T=char_traits<C> > |
187 |
+ class basic_httpbody_stream : public basic_iostream<C,T>{ |
188 |
+ public: |
189 |
+- basic_httpbody_stream(shared_ptr<stream_socket> sock, int len) |
190 |
++ basic_httpbody_stream(pfi::lang::shared_ptr<stream_socket> sock, int len) |
191 |
+ : basic_iostream<C,T>() |
192 |
+ , buf(sock, len){ |
193 |
+ this->init(&buf); |
194 |
+@@ -406,7 +406,7 @@ |
195 |
+ { |
196 |
+ } |
197 |
+ |
198 |
+-request::request(shared_ptr<stream_socket> sock) |
199 |
++request::request(pfi::lang::shared_ptr<stream_socket> sock) |
200 |
+ : method_("") |
201 |
+ , uri_("/") |
202 |
+ , version_(1,1) |
203 |
+@@ -438,11 +438,11 @@ |
204 |
+ |
205 |
+ // body |
206 |
+ if (cicmp(header_["Transfer-Encoding"],"chunked")) |
207 |
+- stream=shared_ptr<iostream>(new basic_httpbody_chunked_stream<char>(sock)); |
208 |
++ stream=pfi::lang::shared_ptr<iostream>(new basic_httpbody_chunked_stream<char>(sock)); |
209 |
+ else if (header_["Content-Length"]!="") |
210 |
+- stream=shared_ptr<iostream>(new basic_httpbody_stream<char>(sock, lexical_cast<int>(header_["Content-Length"]))); |
211 |
++ stream=pfi::lang::shared_ptr<iostream>(new basic_httpbody_stream<char>(sock, lexical_cast<int>(header_["Content-Length"]))); |
212 |
+ else |
213 |
+- stream=shared_ptr<iostream>(new socketstream(sock)); |
214 |
++ stream=pfi::lang::shared_ptr<iostream>(new socketstream(sock)); |
215 |
+ } |
216 |
+ |
217 |
+ request::~request() |
218 |
+@@ -474,7 +474,7 @@ |
219 |
+ return *stream; |
220 |
+ } |
221 |
+ |
222 |
+-void request::send(shared_ptr<stream_socket> sock) |
223 |
++void request::send(pfi::lang::shared_ptr<stream_socket> sock) |
224 |
+ { |
225 |
+ stringstream *ss=dynamic_cast<stringstream*>(stream.get()); |
226 |
+ if (!ss) throw http_exception("body is not stringstream"); |
227 |
+@@ -499,7 +499,7 @@ |
228 |
+ if (sock->flush()>=0) |
229 |
+ throw http_exception("flush failed"); |
230 |
+ if (dat.length()==0) |
231 |
+- stream=shared_ptr<iostream>(new socketstream(sock)); |
232 |
++ stream=pfi::lang::shared_ptr<iostream>(new socketstream(sock)); |
233 |
+ } |
234 |
+ |
235 |
+ response::response() |
236 |
+@@ -518,7 +518,7 @@ |
237 |
+ { |
238 |
+ } |
239 |
+ |
240 |
+-response::response(shared_ptr<stream_socket> sock) |
241 |
++response::response(pfi::lang::shared_ptr<stream_socket> sock) |
242 |
+ { |
243 |
+ // status-line |
244 |
+ { |
245 |
+@@ -546,11 +546,11 @@ |
246 |
+ |
247 |
+ // body |
248 |
+ if (cicmp(header_["Transfer-Encoding"],"chunked")) |
249 |
+- stream=shared_ptr<iostream>(new basic_httpbody_chunked_stream<char>(sock)); |
250 |
++ stream=pfi::lang::shared_ptr<iostream>(new basic_httpbody_chunked_stream<char>(sock)); |
251 |
+ else if (header_["Content-Length"]!="") |
252 |
+- stream=shared_ptr<iostream>(new basic_httpbody_stream<char>(sock, lexical_cast<int>(header_["Content-Length"]))); |
253 |
++ stream=pfi::lang::shared_ptr<iostream>(new basic_httpbody_stream<char>(sock, lexical_cast<int>(header_["Content-Length"]))); |
254 |
+ else |
255 |
+- stream=shared_ptr<iostream>(new socketstream(sock)); |
256 |
++ stream=pfi::lang::shared_ptr<iostream>(new socketstream(sock)); |
257 |
+ } |
258 |
+ |
259 |
+ response::~response() |
260 |
+@@ -582,7 +582,7 @@ |
261 |
+ return *stream; |
262 |
+ } |
263 |
+ |
264 |
+-void response::send(shared_ptr<stream_socket> sock) |
265 |
++void response::send(pfi::lang::shared_ptr<stream_socket> sock) |
266 |
+ { |
267 |
+ stringstream *ss=dynamic_cast<stringstream*>(stream.get()); |
268 |
+ if (!ss) throw http_exception("body is not stringstream"); |
269 |
+@@ -607,7 +607,7 @@ |
270 |
+ if (sock->flush()>=0) |
271 |
+ throw http_exception("flush failed"); |
272 |
+ if (dat.length()==0) |
273 |
+- stream=shared_ptr<iostream>(new socketstream(sock)); |
274 |
++ stream=pfi::lang::shared_ptr<iostream>(new socketstream(sock)); |
275 |
+ } |
276 |
+ |
277 |
+ } // http |
278 |
+--- a/src/network/rpc/base.cpp |
279 |
++++ b/src/network/rpc/base.cpp |
280 |
+@@ -59,20 +59,20 @@ |
281 |
+ { |
282 |
+ } |
283 |
+ |
284 |
+-void rpc_server::add(const string &name, shared_ptr<invoker_base> invoker) |
285 |
++void rpc_server::add(const string &name, pfi::lang::shared_ptr<invoker_base> invoker) |
286 |
+ { |
287 |
+ funcs[name]=invoker; |
288 |
+ } |
289 |
+ |
290 |
+ bool rpc_server::serv(uint16_t port, int nthreads) |
291 |
+ { |
292 |
+- shared_ptr<server_socket, threading_model::multi_thread> ssock(new server_socket()); |
293 |
++ pfi::lang::shared_ptr<server_socket, threading_model::multi_thread> ssock(new server_socket()); |
294 |
+ if (!ssock->create(port)) |
295 |
+ return false; |
296 |
+ |
297 |
+- vector<shared_ptr<thread> > ths(nthreads); |
298 |
++ vector<pfi::lang::shared_ptr<thread> > ths(nthreads); |
299 |
+ for (int i=0; i<nthreads; i++){ |
300 |
+- ths[i]=shared_ptr<thread>(new thread(bind(&rpc_server::process, this, ssock))); |
301 |
++ ths[i]=pfi::lang::shared_ptr<thread>(new thread(bind(&rpc_server::process, this, ssock))); |
302 |
+ if (!ths[i]->start()) return false; |
303 |
+ } |
304 |
+ for (int i=0; i<nthreads; i++) |
305 |
+@@ -80,10 +80,10 @@ |
306 |
+ return true; |
307 |
+ } |
308 |
+ |
309 |
+-void rpc_server::process(shared_ptr<server_socket, threading_model::multi_thread> ssock) |
310 |
++void rpc_server::process(pfi::lang::shared_ptr<server_socket, threading_model::multi_thread> ssock) |
311 |
+ { |
312 |
+ for (;;){ |
313 |
+- shared_ptr<stream_socket> sock(ssock->accept()); |
314 |
++ pfi::lang::shared_ptr<stream_socket> sock(ssock->accept()); |
315 |
+ if (!sock) continue; |
316 |
+ sock->set_nodelay(true); |
317 |
+ |
318 |
+@@ -139,11 +139,11 @@ |
319 |
+ { |
320 |
+ } |
321 |
+ |
322 |
+-shared_ptr<socketstream> rpc_client::get_connection() |
323 |
++pfi::lang::shared_ptr<socketstream> rpc_client::get_connection() |
324 |
+ { |
325 |
+ for (int i=0;i<2;i++){ |
326 |
+ if (!ss || !(*ss)){ |
327 |
+- ss=shared_ptr<socketstream>(new socketstream(host, port)); |
328 |
++ ss=pfi::lang::shared_ptr<socketstream>(new socketstream(host, port)); |
329 |
+ if (!(*ss)){ |
330 |
+ ss.reset(); |
331 |
+ continue; |
332 |
+@@ -180,7 +180,7 @@ |
333 |
+ return ss; |
334 |
+ } |
335 |
+ |
336 |
+-void rpc_client::return_connection(shared_ptr<socketstream> css) |
337 |
++void rpc_client::return_connection(pfi::lang::shared_ptr<socketstream> css) |
338 |
+ { |
339 |
+ ss=css; |
340 |
+ } |
341 |
+--- a/src/network/socket.cpp |
342 |
++++ b/src/network/socket.cpp |
343 |
+@@ -58,7 +58,7 @@ |
344 |
+ namespace pfi{ |
345 |
+ namespace network{ |
346 |
+ |
347 |
+-shared_ptr<dns_resolver, threading_model::multi_thread> stream_socket::resolver; |
348 |
++pfi::lang::shared_ptr<dns_resolver, threading_model::multi_thread> stream_socket::resolver; |
349 |
+ r_mutex stream_socket::resolver_m; |
350 |
+ |
351 |
+ class sigign{ |
352 |
+@@ -88,7 +88,7 @@ |
353 |
+ close(); |
354 |
+ } |
355 |
+ |
356 |
+-void stream_socket::set_dns_resolver(shared_ptr<dns_resolver, threading_model::multi_thread> r) |
357 |
++void stream_socket::set_dns_resolver(pfi::lang::shared_ptr<dns_resolver, threading_model::multi_thread> r) |
358 |
+ { |
359 |
+ synchronized(resolver_m) |
360 |
+ resolver=r; |
361 |
+@@ -106,10 +106,10 @@ |
362 |
+ return false; |
363 |
+ } |
364 |
+ |
365 |
+- shared_ptr<dns_resolver, threading_model::multi_thread> res; |
366 |
++ pfi::lang::shared_ptr<dns_resolver, threading_model::multi_thread> res; |
367 |
+ synchronized(resolver_m){ |
368 |
+ if (!resolver) |
369 |
+- set_dns_resolver(shared_ptr<dns_resolver, threading_model::multi_thread> |
370 |
++ set_dns_resolver(pfi::lang::shared_ptr<dns_resolver, threading_model::multi_thread> |
371 |
+ (new normal_dns_resolver())); |
372 |
+ res=resolver; |
373 |
+ } |
374 |
|
375 |
diff --git a/dev-cpp/pficommon/pficommon-1.3.1.0.ebuild b/dev-cpp/pficommon/pficommon-1.3.1.0.ebuild |
376 |
index bfa534c9313..db9afe674b6 100644 |
377 |
--- a/dev-cpp/pficommon/pficommon-1.3.1.0.ebuild |
378 |
+++ b/dev-cpp/pficommon/pficommon-1.3.1.0.ebuild |
379 |
@@ -1,4 +1,4 @@ |
380 |
-# Copyright 1999-2015 Gentoo Foundation |
381 |
+# Copyright 1999-2017 Gentoo Foundation |
382 |
# Distributed under the terms of the GNU General Public License v2 |
383 |
|
384 |
EAPI=4 |
385 |
@@ -39,7 +39,8 @@ src_prepare() { |
386 |
epatch "${FILESDIR}"/${P}-libdir.patch \ |
387 |
"${FILESDIR}"/${P}-soname.patch \ |
388 |
"${FILESDIR}"/${P}-postgresql.patch \ |
389 |
- "${FILESDIR}"/${P}-gcc-4.7.patch |
390 |
+ "${FILESDIR}"/${P}-gcc-4.7.patch \ |
391 |
+ "${FILESDIR}"/${P}-gcc6.patch |
392 |
} |
393 |
|
394 |
src_configure() { |