1 |
commit: bf945baafb407fb516c304759df3e68fab26ce6e |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 28 20:43:31 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 28 21:02:01 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf945baa |
7 |
|
8 |
sci-electronics/freehdl: Version bump to 0.0.8 |
9 |
|
10 |
Gentoo-bug: 594706 |
11 |
* EAPI=6 |
12 |
* [QA] fix printf format specifiers |
13 |
* [QA] fix assigning C-string literals to 'char*' |
14 |
* Remove .la files unconditionally |
15 |
* Disable building and installing of static libs |
16 |
|
17 |
Package-Manager: portage-2.3.1 |
18 |
|
19 |
sci-electronics/freehdl/Manifest | 1 + |
20 |
.../freehdl/files/freehdl-0.0.8-fix-c++14.patch | 507 +++++++++++++++++++++ |
21 |
.../freehdl/files/freehdl-0.0.8-qa.patch | 279 ++++++++++++ |
22 |
sci-electronics/freehdl/freehdl-0.0.8.ebuild | 33 ++ |
23 |
4 files changed, 820 insertions(+) |
24 |
|
25 |
diff --git a/sci-electronics/freehdl/Manifest b/sci-electronics/freehdl/Manifest |
26 |
index c07d576..bd71078b 100644 |
27 |
--- a/sci-electronics/freehdl/Manifest |
28 |
+++ b/sci-electronics/freehdl/Manifest |
29 |
@@ -1 +1,2 @@ |
30 |
DIST freehdl-0.0.7.tar.gz 1394351 SHA256 b12f2066d856d03e8abc0d93d6ba566b9c55b18e60d47614106c64030324d2de SHA512 3e2ca8fe4c6ba4d112d716ae48856e6ecfecf6eceac7a4bf0665c9a99d9fca880c4af095a6db093a9d7005d2b7cc753c287a3af850d05738c64c78b3c0dad566 WHIRLPOOL f86afdc4a5069ef141d2ba338648e621586724bf96c4d83da1549012ee2d2f6bbcda24e3d197267e41c631791e5737cd069241e563b0eebf016c857915c10c21 |
31 |
+DIST freehdl-0.0.8.tar.gz 1389888 SHA256 7f0978f8252329450de43e98c04c15fdd8a3f2bdc5ca91f75f8f5dd280c6ed84 SHA512 731fde1a940a762e570107819a89ac2884029e5c4f5d51e5df0032a4381fd04c7da948b5f2de6b1ce60801f6ce3a0a9123a4902e75e216a1182b25b2134f44ee WHIRLPOOL b9f496f0fdfcd8b4d3b2c4b731c2d6884760417604023c20e5c0d2f451a6883da86da8e8f935c2491d3b9d451927ce1791447303c67df05d4338795b63261a14 |
32 |
|
33 |
diff --git a/sci-electronics/freehdl/files/freehdl-0.0.8-fix-c++14.patch b/sci-electronics/freehdl/files/freehdl-0.0.8-fix-c++14.patch |
34 |
new file mode 100644 |
35 |
index 00000000..6da5bb1 |
36 |
--- /dev/null |
37 |
+++ b/sci-electronics/freehdl/files/freehdl-0.0.8-fix-c++14.patch |
38 |
@@ -0,0 +1,507 @@ |
39 |
+C++11 has added new types (std::hash), which get dropped into the namespace due to |
40 |
+awful 'using namespace std;' declarations everywhere, causing name collisions. |
41 |
+Instead, only drop a minimal set of declarations into the global :: namespace. |
42 |
+See also: https://bugs.gentoo.org/show_bug.cgi?id=594706 |
43 |
+ |
44 |
+--- a/fire/test-fire.cc |
45 |
++++ b/fire/test-fire.cc |
46 |
+@@ -2,7 +2,7 @@ |
47 |
+ #include <stdio.h> |
48 |
+ #include <freehdl/fire.h> |
49 |
+ |
50 |
+-using namespace std; |
51 |
++using std::cout; |
52 |
+ |
53 |
+ extern tree_chunk_info fire_chunk_info; |
54 |
+ |
55 |
+--- a/freehdl/cdfggen-chunk.h |
56 |
++++ b/freehdl/cdfggen-chunk.h |
57 |
+@@ -7,7 +7,9 @@ |
58 |
+ #include <string> |
59 |
+ #include <vector> |
60 |
+ typedef enum {to, downto} cdfgg_direction; |
61 |
+-using namespace std; |
62 |
++using std::string; |
63 |
++using std::vector; |
64 |
++using std::pair; |
65 |
+ |
66 |
+ extern tree_chunk_info cdfggen_chunk_info; |
67 |
+ extern tree_ctype_info int_ctype_info; |
68 |
+--- a/freehdl/cdfggen-chunk.t |
69 |
++++ b/freehdl/cdfggen-chunk.t |
70 |
+@@ -13,8 +13,7 @@ |
71 |
+ (header-add "#include <freehdl/tree-supp.h>" |
72 |
+ "#include <string>" |
73 |
+ "#include <vector>" |
74 |
+- "typedef enum {to, downto} cdfgg_direction;" |
75 |
+- "using namespace std;") |
76 |
++ "typedef enum {to, downto} cdfgg_direction;") |
77 |
+ |
78 |
+ (impl-add "#include <freehdl/cdfggen-chunk.h>") |
79 |
+ |
80 |
+--- a/freehdl/kernel-attributes.hh |
81 |
++++ b/freehdl/kernel-attributes.hh |
82 |
+@@ -1,6 +1,8 @@ |
83 |
+ #ifndef FREEHDL_KERNEL_ATTRIBUTES_H |
84 |
+ #define FREEHDL_KERNEL_ATTRIBUTES_H |
85 |
+ |
86 |
++using std::max; |
87 |
++ |
88 |
+ /* ************************************************************* |
89 |
+ * Function kind attributes for signals |
90 |
+ * ************************************************************* */ |
91 |
+--- a/freehdl/kernel-db.hh |
92 |
++++ b/freehdl/kernel-db.hh |
93 |
+@@ -3,6 +3,8 @@ |
94 |
+ |
95 |
+ #include <assert.h> |
96 |
+ |
97 |
++#include <string> |
98 |
++using std::string; |
99 |
+ |
100 |
+ /* This header file includes the definitions that are required to |
101 |
+ * setup a kernel database. This database will be used by the kernel |
102 |
+@@ -254,7 +256,7 @@ |
103 |
+ |
104 |
+ // A hash function template used tp generate a hash number from |
105 |
+ // d |
106 |
+-class db_basic_key_hash : public hash<unsigned long> { |
107 |
++class db_basic_key_hash : public __gnu_cxx::hash<unsigned long> { |
108 |
+ public: |
109 |
+ size_t operator()(const db_basic_key& x) const { |
110 |
+ return (*(hash<unsigned long> *)this)(((unsigned long)x.value)>>2); |
111 |
+--- a/freehdl/kernel-dump.hh |
112 |
++++ b/freehdl/kernel-dump.hh |
113 |
+@@ -13,9 +13,9 @@ |
114 |
+ #include <string> |
115 |
+ #include <fstream> |
116 |
+ |
117 |
+-using namespace std; |
118 |
++using std::fstream; |
119 |
+ |
120 |
+-typedef map<string, char*, less<string> > Tmap; |
121 |
++typedef map<string, const char*, less<string> > Tmap; |
122 |
+ extern Tmap mapping_translation_table; |
123 |
+ |
124 |
+ // For each signal which is dumped an virtual process is created. This |
125 |
+--- a/freehdl/kernel-fhdl-stream.hh |
126 |
++++ b/freehdl/kernel-fhdl-stream.hh |
127 |
+@@ -9,7 +9,9 @@ |
128 |
+ #include <string> |
129 |
+ #include <iostream> |
130 |
+ |
131 |
+-using namespace std; |
132 |
++using std::istream; |
133 |
++using std::ostream; |
134 |
++using std::string; |
135 |
+ |
136 |
+ struct fhdl_ostream_t { |
137 |
+ union { |
138 |
+--- a/freehdl/kernel-map-list.hh |
139 |
++++ b/freehdl/kernel-map-list.hh |
140 |
+@@ -7,7 +7,6 @@ |
141 |
+ #include <freehdl/kernel-acl.hh> |
142 |
+ #include <freehdl/kernel-sig-info.hh> |
143 |
+ |
144 |
+-using namespace std; |
145 |
+ //using namespace __gnu_cxx; |
146 |
+ |
147 |
+ // A signal_link instance describes the connection |
148 |
+--- a/freehdl/kernel-name-stack.hh |
149 |
++++ b/freehdl/kernel-name-stack.hh |
150 |
+@@ -3,7 +3,7 @@ |
151 |
+ |
152 |
+ #include <string> |
153 |
+ |
154 |
+-using namespace std; |
155 |
++using std::string; |
156 |
+ |
157 |
+ #define NAME_STACK_INCREMENT 10 |
158 |
+ |
159 |
+--- a/freehdl/kernel-signal-source-list-array.hh |
160 |
++++ b/freehdl/kernel-signal-source-list-array.hh |
161 |
+@@ -13,7 +13,6 @@ |
162 |
+ #include <freehdl/kernel-util.hh> |
163 |
+ #include <freehdl/kernel-source-descriptor.hh> |
164 |
+ |
165 |
+-using namespace std; |
166 |
+ //using namespace __gnu_cxx; |
167 |
+ |
168 |
+ // signal_source stores information about a source of a signal. Note |
169 |
+--- a/freehdl/kernel-util.hh |
170 |
++++ b/freehdl/kernel-util.hh |
171 |
+@@ -15,7 +15,8 @@ |
172 |
+ #include <hash_map> |
173 |
+ #endif |
174 |
+ |
175 |
+-using namespace std; |
176 |
++using std::stringstream; |
177 |
++using std::string; |
178 |
+ |
179 |
+ #if !defined __GNUC__ || __GNUC__ != 2 |
180 |
+ using namespace __gnu_cxx; |
181 |
+@@ -24,7 +25,7 @@ |
182 |
+ // A hash function template used tp generate a hash number from |
183 |
+ // pointer values. |
184 |
+ template<class T> |
185 |
+-class pointer_hash : public hash<unsigned long> { |
186 |
++class pointer_hash : public __gnu_cxx::hash<unsigned long> { |
187 |
+ public: |
188 |
+ size_t operator()(const T& x) const { |
189 |
+ return (*(hash<unsigned long> *)this)(((unsigned long)x)>>2); |
190 |
+--- a/freehdl/std.h |
191 |
++++ b/freehdl/std.h |
192 |
+@@ -1,7 +1,6 @@ |
193 |
+ #ifndef FREEHDL_STD_H |
194 |
+ #define FREEHDL_STD_H |
195 |
+ |
196 |
+-using namespace std; |
197 |
+ |
198 |
+ #include <freehdl/std-standard.hh> |
199 |
+ #include <freehdl/std-vhdl-types.hh> |
200 |
+--- a/freehdl/std-vhdl-types.hh |
201 |
++++ b/freehdl/std-vhdl-types.hh |
202 |
+@@ -6,13 +6,24 @@ |
203 |
+ #include <float.h> |
204 |
+ #include <math.h> |
205 |
+ #include <iostream> |
206 |
++#include <map> |
207 |
++#include <list> |
208 |
++#include <functional> |
209 |
+ #include <string.h> |
210 |
+ |
211 |
+ #include <freehdl/std-memory.hh> |
212 |
+ #include <freehdl/kernel-error.hh> |
213 |
+ #include <freehdl/kernel-acl.hh> |
214 |
+ |
215 |
+-using namespace std; |
216 |
++using std::string; |
217 |
++using std::istream; |
218 |
++using std::ostream; |
219 |
++using std::min; |
220 |
++using std::map; |
221 |
++using std::stringstream; |
222 |
++using std::list; |
223 |
++using std::less; |
224 |
++using std::iostream; |
225 |
+ |
226 |
+ typedef long long int lint; |
227 |
+ const int BUFFER_STREAM_SIZE_INCREMENT = 1024; |
228 |
+--- a/freehdl/vaul-lexer.h |
229 |
++++ b/freehdl/vaul-lexer.h |
230 |
+@@ -32,7 +32,6 @@ |
231 |
+ #include <stdarg.h> |
232 |
+ #include <string.h> |
233 |
+ |
234 |
+-using namespace std; |
235 |
+ |
236 |
+ #undef yyFlexLexer |
237 |
+ #define yyFlexLexer vaul_FlexLexer |
238 |
+--- a/ieee/numeric_std.cc |
239 |
++++ b/ieee/numeric_std.cc |
240 |
+@@ -2,6 +2,7 @@ |
241 |
+ #include <freehdl/std.h> |
242 |
+ |
243 |
+ |
244 |
++using std::max; |
245 |
+ |
246 |
+ /* package :ieee:numeric_std */ |
247 |
+ /* External declarations */ |
248 |
+--- a/kernel/attributes.cc |
249 |
++++ b/kernel/attributes.cc |
250 |
+@@ -5,6 +5,7 @@ |
251 |
+ #include <freehdl/kernel-kernel-class.hh> |
252 |
+ #include <freehdl/kernel-reader-info.hh> |
253 |
+ #include <freehdl/kernel-driver-info.hh> |
254 |
++using std::max; |
255 |
+ #include <freehdl/kernel-attributes.hh> |
256 |
+ |
257 |
+ |
258 |
+--- a/kernel/db.cc |
259 |
++++ b/kernel/db.cc |
260 |
+@@ -1,6 +1,5 @@ |
261 |
+ #define KERNEL // Include internal kernel definitions |
262 |
+ |
263 |
+-using namespace std; |
264 |
+ #include <freehdl/kernel-db.hh> |
265 |
+ |
266 |
+ |
267 |
+--- a/kernel/fhdl_stream.cc |
268 |
++++ b/kernel/fhdl_stream.cc |
269 |
+@@ -7,6 +7,9 @@ |
270 |
+ #include <freehdl/kernel-error.hh> |
271 |
+ #include <freehdl/kernel-fhdl-stream.hh> |
272 |
+ |
273 |
++using std::cin; |
274 |
++using std::cout; |
275 |
++using std::stringstream; |
276 |
+ |
277 |
+ // Error stream to output error messages generated by the kernel, |
278 |
+ // e.g. to print error messages due to invalid simulator commands |
279 |
+--- a/kernel/kernel_class.cc |
280 |
++++ b/kernel/kernel_class.cc |
281 |
+@@ -16,6 +16,10 @@ |
282 |
+ #include <freehdl/kernel-resolver-descriptor.hh> |
283 |
+ #include <freehdl/kernel-fhdl-stream.hh> |
284 |
+ |
285 |
++using std::cerr; |
286 |
++using std::pair; |
287 |
++using std::binary_function; |
288 |
++ |
289 |
+ // Arguments that are passed in form the command line |
290 |
+ int main_argc; |
291 |
+ char **main_argv; |
292 |
+--- a/kernel/main.cc |
293 |
++++ b/kernel/main.cc |
294 |
+@@ -34,6 +34,15 @@ |
295 |
+ #include <freehdl/kernel-error.hh> |
296 |
+ #include <freehdl/kernel-fhdl-stream.hh> |
297 |
+ |
298 |
++using std::ios; |
299 |
++using std::ifstream; |
300 |
++using std::ofstream; |
301 |
++using std::ostringstream; |
302 |
++using std::cin; |
303 |
++using std::cerr; |
304 |
++using std::cout; |
305 |
++using std::endl; |
306 |
++ |
307 |
+ #ifdef PERFMON_STATISTICS |
308 |
+ #include "pcounter.hh" |
309 |
+ #endif |
310 |
+--- a/kernel/map_list.cc |
311 |
++++ b/kernel/map_list.cc |
312 |
+@@ -4,6 +4,8 @@ |
313 |
+ #include <freehdl/kernel-sig-info.hh> |
314 |
+ #include <freehdl/kernel-resolver-descriptor.hh> |
315 |
+ |
316 |
++using std::max; |
317 |
++ |
318 |
+ // Stores the father signal(s) of port signals |
319 |
+ port_signal_link_map_t port_signal_link_map; |
320 |
+ |
321 |
+--- a/kernel/name_stack.cc |
322 |
++++ b/kernel/name_stack.cc |
323 |
+@@ -1,8 +1,10 @@ |
324 |
+ #include <stdlib.h> |
325 |
+ #include <stdio.h> |
326 |
++#include <stack> |
327 |
+ #include <freehdl/kernel-error.hh> |
328 |
+ #include <freehdl/kernel-name-stack.hh> |
329 |
+ |
330 |
++using std::stack; |
331 |
+ |
332 |
+ name_stack instance_name; |
333 |
+ |
334 |
+--- a/kernel/persistent_cdfg_dump.cc |
335 |
++++ b/kernel/persistent_cdfg_dump.cc |
336 |
+@@ -3,6 +3,7 @@ |
337 |
+ #include <freehdl/kernel-persistent-cdfg-dump.hh> |
338 |
+ #include <freehdl/kernel-persistent-dump.hh> |
339 |
+ |
340 |
++using std::endl; |
341 |
+ |
342 |
+ buffer_stream register_cdfg_tmp_buffer; |
343 |
+ |
344 |
+--- a/kernel/sig_info.cc |
345 |
++++ b/kernel/sig_info.cc |
346 |
+@@ -1,6 +1,5 @@ |
347 |
+ #define KERNEL // Include internal kernel definitions |
348 |
+ |
349 |
+-using namespace std; |
350 |
+ #include <freehdl/kernel-error.hh> |
351 |
+ #include <freehdl/kernel-db.hh> |
352 |
+ #include <freehdl/kernel-sig-info.hh> |
353 |
+--- a/std/internal_textio.cc |
354 |
++++ b/std/internal_textio.cc |
355 |
+@@ -10,6 +10,10 @@ |
356 |
+ #include <freehdl/kernel-name-stack.hh> |
357 |
+ #include <freehdl/kernel-register.hh> |
358 |
+ |
359 |
++using std::ios; |
360 |
++using std::cin; |
361 |
++using std::cout; |
362 |
++ |
363 |
+ /* package :std:textio */ |
364 |
+ |
365 |
+ /* Definitions for access type :std:textio:line */ |
366 |
+--- a/std/vhdl_types.cc |
367 |
++++ b/std/vhdl_types.cc |
368 |
+@@ -12,6 +12,9 @@ |
369 |
+ #include <freehdl/kernel-register.hh> |
370 |
+ |
371 |
+ |
372 |
++using std::ios; |
373 |
++using std::ifstream; |
374 |
++using std::ofstream; |
375 |
+ |
376 |
+ /* ************************************************************* |
377 |
+ * Some global functions |
378 |
+--- a/v2cc/mapping.cc |
379 |
++++ b/v2cc/mapping.cc |
380 |
+@@ -34,7 +34,12 @@ |
381 |
+ #include <iostream> |
382 |
+ #include <stdlib.h> |
383 |
+ |
384 |
+-using namespace std; |
385 |
++using std::string; |
386 |
++using std::list; |
387 |
++using std::map; |
388 |
++using std::istream; |
389 |
++using std::ifstream; |
390 |
++using std::cerr; |
391 |
+ |
392 |
+ v2cc_mapper::v2cc_mapper () |
393 |
+ { |
394 |
+--- a/v2cc/v2cc.cc |
395 |
++++ b/v2cc/v2cc.cc |
396 |
+@@ -35,7 +35,6 @@ |
397 |
+ |
398 |
+ */ |
399 |
+ |
400 |
+-using namespace std; |
401 |
+ |
402 |
+ #if HAVE_MALLOC_H |
403 |
+ #include <malloc.h> |
404 |
+--- a/v2cc/v2cc-const-fold.cc |
405 |
++++ b/v2cc/v2cc-const-fold.cc |
406 |
+@@ -16,6 +16,9 @@ |
407 |
+ #include "v2cc-util.h" |
408 |
+ |
409 |
+ |
410 |
++using std::cerr; |
411 |
++using std::max; |
412 |
++using std::min; |
413 |
+ |
414 |
+ // Used to generate error messages |
415 |
+ extern vaul_error_printer codegen_error; |
416 |
+--- a/v2cc/v2cc-decl.cc |
417 |
++++ b/v2cc/v2cc-decl.cc |
418 |
+@@ -13,6 +13,9 @@ |
419 |
+ #include "mapping.h" |
420 |
+ #include "v2cc-util.h" |
421 |
+ |
422 |
++using std::endl; |
423 |
++using std::min; |
424 |
++using std::max; |
425 |
+ |
426 |
+ void test (RegionStack &rstack) |
427 |
+ { |
428 |
+--- a/v2cc/v2cc-explore.cc |
429 |
++++ b/v2cc/v2cc-explore.cc |
430 |
+@@ -15,7 +15,6 @@ |
431 |
+ #include "mapping.h" |
432 |
+ #include "v2cc-util.h" |
433 |
+ |
434 |
+-using namespace std; |
435 |
+ |
436 |
+ // Used to generate error messages |
437 |
+ extern vaul_error_printer codegen_error; |
438 |
+--- a/v2cc/v2cc.h |
439 |
++++ b/v2cc/v2cc.h |
440 |
+@@ -1,7 +1,17 @@ |
441 |
+ #ifndef V2CC_HEADER |
442 |
+ #define V2CC_HEADER |
443 |
+ |
444 |
+-using namespace std; |
445 |
++using std::vector; |
446 |
++using std::list; |
447 |
++using std::string; |
448 |
++using std::pair; |
449 |
++using std::string; |
450 |
++using std::set; |
451 |
++using std::less; |
452 |
++using std::deque; |
453 |
++using std::binary_function; |
454 |
++using std::map; |
455 |
++using std::binary_function; |
456 |
+ |
457 |
+ #include <freehdl/vaul.h> |
458 |
+ #include "mapping.h" |
459 |
+--- a/v2cc/v2cc-qid.cc |
460 |
++++ b/v2cc/v2cc-qid.cc |
461 |
+@@ -4,6 +4,7 @@ |
462 |
+ #include "v2cc-util.h" |
463 |
+ |
464 |
+ |
465 |
++using std::endl; |
466 |
+ |
467 |
+ // ****************************************************************************************** |
468 |
+ // Name: m_qid , generic function |
469 |
+--- a/v2cc/v2cc-util.cc |
470 |
++++ b/v2cc/v2cc-util.cc |
471 |
+@@ -9,6 +9,9 @@ |
472 |
+ |
473 |
+ #include "v2cc-util.h" |
474 |
+ |
475 |
++using std::endl; |
476 |
++using std::hex; |
477 |
++using std::dec; |
478 |
+ |
479 |
+ // ****************************************************************************************** |
480 |
+ // Some global variables |
481 |
+--- a/v2cc/v2cc-util.h |
482 |
++++ b/v2cc/v2cc-util.h |
483 |
+@@ -2,13 +2,18 @@ |
484 |
+ #ifndef V2CC_UTIL_H |
485 |
+ #define V2CC_UTIL_H |
486 |
+ |
487 |
+-using namespace std; |
488 |
+ |
489 |
+ #include <sstream> |
490 |
+ #include <iomanip> |
491 |
+ #include <freehdl/vaul.h> |
492 |
+ #include "v2cc-chunk.h" |
493 |
+ |
494 |
++using std::stringstream; |
495 |
++using std::setprecision; |
496 |
++using std::showpoint; |
497 |
++using std::ofstream; |
498 |
++using std::cout; |
499 |
++ |
500 |
+ // ****************************************************************************************** |
501 |
+ // Some global variables |
502 |
+ // ****************************************************************************************** |
503 |
+--- a/vaul/bison-parser.cc |
504 |
++++ b/vaul/bison-parser.cc |
505 |
+@@ -86,7 +86,6 @@ |
506 |
+ #include <malloc.h> |
507 |
+ #endif |
508 |
+ |
509 |
+-using namespace std; |
510 |
+ |
511 |
+ #define YYINITDEPTH 10000 |
512 |
+ #define YYMAXDEPTH 100000 |
513 |
+--- a/vaul/bison-parser.yy |
514 |
++++ b/vaul/bison-parser.yy |
515 |
+@@ -49,7 +49,6 @@ |
516 |
+ #include <malloc.h> |
517 |
+ #endif |
518 |
+ |
519 |
+-using namespace std; |
520 |
+ |
521 |
+ #define YYINITDEPTH 10000 |
522 |
+ #define YYMAXDEPTH 100000 |
523 |
+--- a/vaul/printer.cc |
524 |
++++ b/vaul/printer.cc |
525 |
+@@ -27,7 +27,8 @@ |
526 |
+ #include <string.h> |
527 |
+ #include <sstream> |
528 |
+ |
529 |
+-using namespace std; |
530 |
++using std::ostringstream; |
531 |
++using std::ostream; |
532 |
+ |
533 |
+ void vaul_printer::printf (const char *fmt, ...) |
534 |
+ { |
535 |
+--- a/vaul/tree.cc |
536 |
++++ b/vaul/tree.cc |
537 |
+@@ -31,7 +31,7 @@ |
538 |
+ #include <assert.h> |
539 |
+ #include <stdlib.h> |
540 |
+ |
541 |
+-using namespace std; |
542 |
++using std::ostream; |
543 |
+ |
544 |
+ vaul_id_set::vaul_id_set(int dummy) |
545 |
+ { |
546 |
|
547 |
diff --git a/sci-electronics/freehdl/files/freehdl-0.0.8-qa.patch b/sci-electronics/freehdl/files/freehdl-0.0.8-qa.patch |
548 |
new file mode 100644 |
549 |
index 00000000..d35af9f |
550 |
--- /dev/null |
551 |
+++ b/sci-electronics/freehdl/files/freehdl-0.0.8-qa.patch |
552 |
@@ -0,0 +1,279 @@ |
553 |
+Fix various QA issues: |
554 |
+* Use correct printf format specifiers for 'size_t' |
555 |
+* Fix const correctness ('char*' -> 'const char*') for C-string literals |
556 |
+* Correctly forward declare inline functions |
557 |
+ |
558 |
+--- a/fire/test-fire.cc |
559 |
++++ b/fire/test-fire.cc |
560 |
+@@ -24,7 +24,7 @@ |
561 |
+ if (k->size < (size_t) N) |
562 |
+ sizes[k->size]++; |
563 |
+ if (k->size % 4 !=0) |
564 |
+- printf ("odd size: %d\n", k->size); |
565 |
++ printf ("odd size: %zu\n", k->size); |
566 |
+ } |
567 |
+ printf ("min = %d, max = %d\n", min, max); |
568 |
+ for (int i = min; i <= max && i < N; i+=4) |
569 |
+--- a/fire/tree-supp.cc |
570 |
++++ b/fire/tree-supp.cc |
571 |
+@@ -485,7 +485,7 @@ |
572 |
+ if (size < (size_t) N) |
573 |
+ sizes[size]++; |
574 |
+ if (size % 4 !=0) |
575 |
+- printf ("odd size: %d\n", size); |
576 |
++ printf ("odd size: %zu\n", size); |
577 |
+ } |
578 |
+ |
579 |
+ void |
580 |
+--- a/freehdl/kernel-dump.hh |
581 |
++++ b/freehdl/kernel-dump.hh |
582 |
+@@ -42,9 +42,9 @@ |
583 |
+ short wait_id; |
584 |
+ // This function will return an appropriate table entry (if |
585 |
+ // available) |
586 |
+- char *find_table(type_info_interface* type); |
587 |
++ const char *find_table(type_info_interface* type); |
588 |
+ //this variable is used by the read_type function |
589 |
+- char* translation_table; |
590 |
++ const char* translation_table; |
591 |
+ // This method is executed each time the signal value changes |
592 |
+ bool execute(); |
593 |
+ // Continue dumping the signal. |
594 |
+@@ -77,7 +77,7 @@ |
595 |
+ extern list<signal_dump*> signal_dump_process_list; |
596 |
+ |
597 |
+ // Used to store the user_defined translation table types |
598 |
+-extern map<string, char*, less<string> > mapping_translation_table; |
599 |
++extern map<string, const char*, less<string> > mapping_translation_table; |
600 |
+ |
601 |
+ |
602 |
+ /****************************************************** |
603 |
+--- a/freehdl/kernel-fhdl-stream.hh |
604 |
++++ b/freehdl/kernel-fhdl-stream.hh |
605 |
+@@ -29,7 +31,7 @@ |
606 |
+ str->flush(); |
607 |
+ } |
608 |
+ |
609 |
+- fhdl_ostream_t &operator<<(char *p); |
610 |
++ fhdl_ostream_t &operator<<(const char *p); |
611 |
+ fhdl_ostream_t &operator<<(const string &a); |
612 |
+ fhdl_ostream_t &operator<<(const int i); |
613 |
+ fhdl_ostream_t &operator<<(const unsigned int i); |
614 |
+--- a/freehdl/std-vhdl-types.hh |
615 |
++++ b/freehdl/std-vhdl-types.hh |
616 |
+@@ -607,7 +618,7 @@ |
617 |
+ // which caused the failure or NULL otherwise. |
618 |
+ virtual const char *read(void *dest, const char *str) = 0; |
619 |
+ // Prints the content of src into an string stream in VCD format |
620 |
+- virtual void vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure) = 0; |
621 |
++ virtual void vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure) = 0; |
622 |
+ // Prints value into binary stream. Note that only the raw data but |
623 |
+ // no type info objects are written! The method returns the number |
624 |
+ // of bytes written to the stream. |
625 |
+@@ -785,7 +796,7 @@ |
626 |
+ bool assign(void *dest, const void *src); |
627 |
+ void remove(void *src); |
628 |
+ void print(buffer_stream &str, const void *src, int mode); |
629 |
+- void vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure); |
630 |
++ void vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure); |
631 |
+ const char *read(void *dest, const char *str); |
632 |
+ |
633 |
+ integer check(integer value) { |
634 |
+@@ -821,7 +832,7 @@ |
635 |
+ bool assign(void *dest, const void *src); |
636 |
+ void remove(void *src); |
637 |
+ void print(buffer_stream &str, const void *src, int mode); |
638 |
+- void vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure) {}; |
639 |
++ void vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure) {}; |
640 |
+ const char *read(void *dest, const char *str); |
641 |
+ }; |
642 |
+ |
643 |
+@@ -849,7 +860,7 @@ |
644 |
+ bool assign(void *dest, const void *src); |
645 |
+ void remove(void *src); |
646 |
+ void print(buffer_stream &str, const void *src, int mode) {}; |
647 |
+- void vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure) {}; |
648 |
++ void vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure) {}; |
649 |
+ const char *read(void *dest, const char *str); |
650 |
+ }; |
651 |
+ |
652 |
+@@ -879,7 +890,7 @@ |
653 |
+ bool assign(void *dest, const void *src); |
654 |
+ void remove(void *src); |
655 |
+ void print(buffer_stream &str, const void *src, int mode); |
656 |
+- void vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure); |
657 |
++ void vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure); |
658 |
+ const char *read(void *dest, const char *str); |
659 |
+ |
660 |
+ floatingpoint check(floatingpoint value) { |
661 |
+@@ -914,7 +925,7 @@ |
662 |
+ bool assign(void *dest, const void *src); |
663 |
+ void remove(void *src); |
664 |
+ void print(buffer_stream &str, const void *src, int mode); |
665 |
+- void vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure); |
666 |
++ void vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure); |
667 |
+ const char *read(void *dest, const char *str); |
668 |
+ |
669 |
+ enumeration check(integer value) { |
670 |
+@@ -954,7 +965,7 @@ |
671 |
+ bool assign(void *dest, const void *src); |
672 |
+ void remove(void *src); |
673 |
+ void print(buffer_stream &str, const void *src, int mode); |
674 |
+- void vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure) ; |
675 |
++ void vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure) ; |
676 |
+ const char *read(void *dest, const char *str); |
677 |
+ |
678 |
+ physical check(physical value) { |
679 |
+@@ -1087,7 +1098,7 @@ |
680 |
+ bool assign(void *dest, const void *src) { return false; }; |
681 |
+ void remove(void *src); |
682 |
+ void print(buffer_stream &str, const void *src, int mode); |
683 |
+- void vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure) ; |
684 |
++ void vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure) ; |
685 |
+ const char *read(void *dest, const char *str); |
686 |
+ }; |
687 |
+ |
688 |
+@@ -1230,7 +1241,7 @@ |
689 |
+ bool assign(void *dest, const void *src) { return false; }; |
690 |
+ void remove(void *src); |
691 |
+ void print(buffer_stream &str, const void *src, int mode); |
692 |
+- void vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure); |
693 |
++ void vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure); |
694 |
+ const char *read(void *dest, const char *str); |
695 |
+ }; |
696 |
+ |
697 |
+--- a/freehdl/vaul-lexer.h |
698 |
++++ b/freehdl/vaul-lexer.h |
699 |
+@@ -115,7 +114,7 @@ |
700 |
+ IR_String expand_bitstring(const char *, int len); |
701 |
+ |
702 |
+ int LexerInput(char *buf, int max_size); |
703 |
+- void LexerError(char *msg); |
704 |
++ void LexerError(const char *msg); |
705 |
+ void message(char *fmt, va_list ap); |
706 |
+ void message(vaul_yyltype &loc, char *fmt, va_list ap); |
707 |
+ |
708 |
+--- a/kernel/driver_info.cc |
709 |
++++ b/kernel/driver_info.cc |
710 |
+@@ -270,6 +270,7 @@ |
711 |
+ |
712 |
+ |
713 |
+ // Creates transaction composite signals. Returns number of assigned scalars. |
714 |
++inline int do_record_transport_assignment(driver_info &, const record_base &, int, const vtime &); |
715 |
+ inline int |
716 |
+ do_array_transport_assignment(driver_info &driver, const array_base &value, int first, const vtime &tr_time) |
717 |
+ { |
718 |
+@@ -311,7 +312,6 @@ |
719 |
+ assigned_scalars += do_array_transport_assignment(driver, (array_base&)value.data[j], i, tr_time); |
720 |
+ break; |
721 |
+ case RECORD: |
722 |
+- inline int do_record_transport_assignment(driver_info &, const record_base &, int, const vtime &); |
723 |
+ assigned_scalars += do_record_transport_assignment(driver, (record_base&)value.data[j], i, tr_time); |
724 |
+ break; |
725 |
+ } |
726 |
+@@ -339,6 +339,7 @@ |
727 |
+ |
728 |
+ |
729 |
+ // Creates transaction for composite signals. Returns number of assigned scalars. |
730 |
++inline int do_record_inertial_assignment(driver_info &, const record_base &, int, const vtime &, const vtime &); |
731 |
+ inline int |
732 |
+ do_array_inertial_assignment(driver_info &driver, |
733 |
+ const array_base &value, int first, |
734 |
+@@ -381,8 +382,6 @@ |
735 |
+ assigned_scalars += do_array_inertial_assignment(driver, (array_base&)value.data[j], i, tr_time, rm_time); |
736 |
+ break; |
737 |
+ case RECORD: |
738 |
+- inline int do_record_inertial_assignment(driver_info &, const record_base &, int, |
739 |
+- const vtime &, const vtime &); |
740 |
+ assigned_scalars += do_record_inertial_assignment(driver, (record_base&)value.data[j], i, tr_time, rm_time); |
741 |
+ break; |
742 |
+ } |
743 |
+--- a/kernel/dump.cc |
744 |
++++ b/kernel/dump.cc |
745 |
+@@ -90,7 +90,7 @@ |
746 |
+ |
747 |
+ |
748 |
+ // find_translation table |
749 |
+-char * |
750 |
++const char * |
751 |
+ signal_dump::find_table(type_info_interface* type) |
752 |
+ { |
753 |
+ switch(type->id) |
754 |
+--- a/kernel/fhdl_stream.cc |
755 |
++++ b/kernel/fhdl_stream.cc |
756 |
+@@ -60,7 +63,7 @@ |
757 |
+ } |
758 |
+ |
759 |
+ fhdl_ostream_t & |
760 |
+-fhdl_ostream_t::operator<<(char *p) |
761 |
++fhdl_ostream_t::operator<<(const char *p) |
762 |
+ { |
763 |
+ if (!socket_connection) |
764 |
+ *str << p; |
765 |
+--- a/std/vhdl_types.cc |
766 |
++++ b/std/vhdl_types.cc |
767 |
+@@ -1013,7 +1016,7 @@ |
768 |
+ } |
769 |
+ |
770 |
+ void |
771 |
+-integer_info_base::vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure) |
772 |
++integer_info_base::vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure) |
773 |
+ { |
774 |
+ integer op =*((integer*)src); |
775 |
+ static char result[INTEGER_SIZE_LD + 1]; |
776 |
+@@ -1306,7 +1309,7 @@ |
777 |
+ } |
778 |
+ |
779 |
+ void |
780 |
+-float_info_base::vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure) { |
781 |
++float_info_base::vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure) { |
782 |
+ // should be definitly enough characters to hold a string |
783 |
+ // representation of a double |
784 |
+ static char rbuffer[8*sizeof(double)]; |
785 |
+@@ -1432,7 +1435,7 @@ |
786 |
+ |
787 |
+ |
788 |
+ void |
789 |
+-enum_info_base::vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure) |
790 |
++enum_info_base::vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure) |
791 |
+ { |
792 |
+ if (translation_table != NULL) { |
793 |
+ const char output = translation_table[*((enumeration*)src)]; |
794 |
+@@ -1583,7 +1586,7 @@ |
795 |
+ } |
796 |
+ |
797 |
+ void |
798 |
+-physical_info_base::vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure) { |
799 |
++physical_info_base::vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure) { |
800 |
+ str << *((physical*)src) << " " << units[0]; |
801 |
+ } |
802 |
+ |
803 |
+@@ -1778,7 +1781,7 @@ |
804 |
+ } |
805 |
+ |
806 |
+ // Temporary VCD_Print function |
807 |
+-void array_info::vcd_print(buffer_stream &str, const void *src,char* translation_table, bool pure) |
808 |
++void array_info::vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure) |
809 |
+ { |
810 |
+ //str.clean(); |
811 |
+ int length = ((array_base*)src)->info->length; |
812 |
+@@ -2090,7 +2093,7 @@ |
813 |
+ |
814 |
+ |
815 |
+ // Temporary VCD_Print function |
816 |
+-void record_info::vcd_print(buffer_stream &str, const void *src, char* translation_table, bool pure) |
817 |
++void record_info::vcd_print(buffer_stream &str, const void *src, const char* translation_table, bool pure) |
818 |
+ { |
819 |
+ record_base &record = *(record_base*)src; |
820 |
+ record_info &rinfo = *record.info; |
821 |
+--- a/vaul/lexer.cc |
822 |
++++ b/vaul/lexer.cc |
823 |
+@@ -2075,7 +2075,7 @@ |
824 |
+ } |
825 |
+ |
826 |
+ void |
827 |
+-vaul_lexer::LexerError (char *m) |
828 |
++vaul_lexer::LexerError (const char *m) |
829 |
+ { |
830 |
+ if (prt) |
831 |
+ prt->fprintf (log, "%?%s %C\n", this, m, this); |
832 |
|
833 |
diff --git a/sci-electronics/freehdl/freehdl-0.0.8.ebuild b/sci-electronics/freehdl/freehdl-0.0.8.ebuild |
834 |
new file mode 100644 |
835 |
index 00000000..c11e4d9 |
836 |
--- /dev/null |
837 |
+++ b/sci-electronics/freehdl/freehdl-0.0.8.ebuild |
838 |
@@ -0,0 +1,33 @@ |
839 |
+# Copyright 1999-2016 Gentoo Foundation |
840 |
+# Distributed under the terms of the GNU General Public License v2 |
841 |
+# $Id$ |
842 |
+ |
843 |
+EAPI=6 |
844 |
+ |
845 |
+DESCRIPTION="A free VHDL simulator" |
846 |
+SRC_URI="mirror://sourceforge/qucs/${P}.tar.gz" |
847 |
+HOMEPAGE="http://freehdl.seul.org/" |
848 |
+LICENSE="GPL-2" |
849 |
+ |
850 |
+SLOT="0" |
851 |
+IUSE="" |
852 |
+KEYWORDS="~amd64 ~ppc ~x86" |
853 |
+ |
854 |
+RDEPEND=">=dev-scheme/guile-2.0:*" |
855 |
+DEPEND="virtual/pkgconfig" |
856 |
+ |
857 |
+PATCHES=( |
858 |
+ "${FILESDIR}/${PN}-0.0.8-fix-c++14.patch" |
859 |
+ "${FILESDIR}/${PN}-0.0.8-qa.patch" |
860 |
+) |
861 |
+ |
862 |
+src_configure() { |
863 |
+ econf --disable-static |
864 |
+} |
865 |
+ |
866 |
+src_install() { |
867 |
+ default |
868 |
+ |
869 |
+ # package provides .pc files |
870 |
+ find "${D}" -name '*.la' -delete || die |
871 |
+} |