1 |
commit: 15bc4ddeb0d78cf15632d7d9247532f295943602 |
2 |
Author: Huang Rui <vowstar <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Apr 25 11:04:38 2022 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 27 13:18:57 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15bc4dde |
7 |
|
8 |
sci-electronics/iverilog: backport fix compile bug |
9 |
|
10 |
EAPI: update EAPI 7 -> 8 |
11 |
fix parse.cc fatal error |
12 |
fix calls nm directly |
13 |
fix can't find configure.in |
14 |
fix depend on sys-libs/readline:= |
15 |
|
16 |
Bug: https://bugs.gentoo.org/721022 |
17 |
Bug: https://bugs.gentoo.org/734760 |
18 |
Bug: https://bugs.gentoo.org/426262 |
19 |
Closes: https://bugs.gentoo.org/731906 |
20 |
Closes: https://bugs.gentoo.org/730096 |
21 |
Signed-off-by: Huang Rui <vowstar <AT> gmail.com> |
22 |
Closes: https://github.com/gentoo/gentoo/pull/25191 |
23 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
24 |
|
25 |
.../iverilog/files/iverilog-10.3-call-nm.patch | 67 +++++++++++++++ |
26 |
.../files/iverilog-10.3-configure-ac.patch | 12 +++ |
27 |
.../files/iverilog-10.3-gen-bison-header.patch | 97 ++++++++++++++++++++++ |
28 |
.../files/iverilog-10.3-override-var.patch | 12 +++ |
29 |
sci-electronics/iverilog/iverilog-10.3.ebuild | 23 +++-- |
30 |
5 files changed, 202 insertions(+), 9 deletions(-) |
31 |
|
32 |
diff --git a/sci-electronics/iverilog/files/iverilog-10.3-call-nm.patch b/sci-electronics/iverilog/files/iverilog-10.3-call-nm.patch |
33 |
new file mode 100644 |
34 |
index 000000000000..2261a6ada4cf |
35 |
--- /dev/null |
36 |
+++ b/sci-electronics/iverilog/files/iverilog-10.3-call-nm.patch |
37 |
@@ -0,0 +1,67 @@ |
38 |
+From f3396d502d408c1b349c378060027905a2c2a9c3 Mon Sep 17 00:00:00 2001 |
39 |
+From: Huang Rui <vowstar@×××××.com> |
40 |
+Date: Sat, 25 Jul 2020 12:50:49 +0800 |
41 |
+Subject: [PATCH 1/2] aclocal.m4: fix issue in cross-compiling |
42 |
+ |
43 |
+The aclocal.m4 called nm directly. |
44 |
+It can cause issue in cross-compiling and because is not possible |
45 |
+use a different NM implementation (like llvm-nm). |
46 |
+The compile error log: |
47 |
+https://bugs.gentoo.org/attachment.cgi?id=648556 |
48 |
+ |
49 |
+Closes: https://bugs.gentoo.org/731906 |
50 |
+Signed-off-by: Huang Rui <vowstar@×××××.com> |
51 |
+--- |
52 |
+ aclocal.m4 | 4 +++- |
53 |
+ 1 file changed, 3 insertions(+), 1 deletion(-) |
54 |
+ |
55 |
+diff --git a/aclocal.m4 b/aclocal.m4 |
56 |
+index a47eba42c..16ef69c85 100644 |
57 |
+--- a/aclocal.m4 |
58 |
++++ b/aclocal.m4 |
59 |
+@@ -25,9 +25,11 @@ AC_SUBST(install_suffix) |
60 |
+ # Unwarranted assumptions: |
61 |
+ # - the object file produced by AC_COMPILE_IFELSE is called "conftest.$ac_objext" |
62 |
+ # - the nm(1) utility is available, and its name is "nm". |
63 |
++# Here use $NM because they can cause issue in cross-compiling and because is |
64 |
++# not possible use a different NM implementation (like llvm-nm) |
65 |
+ AC_DEFUN([_AX_C_UNDERSCORES_MATCH_IF], |
66 |
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([void underscore(void){}])], |
67 |
+-[AS_IF([nm conftest.$ac_objext|grep $1 >/dev/null 2>/dev/null],[$2],[$3])], |
68 |
++[AS_IF([$NM conftest.$ac_objext|grep $1 >/dev/null 2>/dev/null],[$2],[$3])], |
69 |
+ [AC_MSG_ERROR([underscore test crashed])] |
70 |
+ )]) |
71 |
+ |
72 |
+ |
73 |
+From d827f674cc0a37d8150c18df6112a0a895f2a584 Mon Sep 17 00:00:00 2001 |
74 |
+From: Huang Rui <vowstar@×××××.com> |
75 |
+Date: Tue, 28 Jul 2020 21:15:49 +0800 |
76 |
+Subject: [PATCH 2/2] aclocal.m4: fix the comment contradicts the previous line |
77 |
+ |
78 |
+Changed to "the nm(1) utility or an equivalent is available, |
79 |
+and its name is defined by the $NM variable. |
80 |
+ |
81 |
+Signed-off-by: Huang Rui <vowstar@×××××.com> |
82 |
+--- |
83 |
+ aclocal.m4 | 8 ++++---- |
84 |
+ 1 file changed, 4 insertions(+), 4 deletions(-) |
85 |
+ |
86 |
+diff --git a/aclocal.m4 b/aclocal.m4 |
87 |
+index 16ef69c85..1b2dd6a1e 100644 |
88 |
+--- a/aclocal.m4 |
89 |
++++ b/aclocal.m4 |
90 |
+@@ -23,10 +23,10 @@ AC_SUBST(install_suffix) |
91 |
+ # ------------------------------ |
92 |
+ # Sub-macro for AX_C_UNDERSCORES_LEADING and AX_C_UNDERSCORES_TRAILING. |
93 |
+ # Unwarranted assumptions: |
94 |
+-# - the object file produced by AC_COMPILE_IFELSE is called "conftest.$ac_objext" |
95 |
+-# - the nm(1) utility is available, and its name is "nm". |
96 |
+-# Here use $NM because they can cause issue in cross-compiling and because is |
97 |
+-# not possible use a different NM implementation (like llvm-nm) |
98 |
++# - the object file produced by AC_COMPILE_IFELSE is called |
99 |
++# "conftest.$ac_objext" |
100 |
++# - the nm(1) utility or an equivalent is available, and its name |
101 |
++# is defined by the $NM variable. |
102 |
+ AC_DEFUN([_AX_C_UNDERSCORES_MATCH_IF], |
103 |
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([void underscore(void){}])], |
104 |
+ [AS_IF([$NM conftest.$ac_objext|grep $1 >/dev/null 2>/dev/null],[$2],[$3])], |
105 |
|
106 |
diff --git a/sci-electronics/iverilog/files/iverilog-10.3-configure-ac.patch b/sci-electronics/iverilog/files/iverilog-10.3-configure-ac.patch |
107 |
new file mode 100644 |
108 |
index 000000000000..b7a81d1facaa |
109 |
--- /dev/null |
110 |
+++ b/sci-electronics/iverilog/files/iverilog-10.3-configure-ac.patch |
111 |
@@ -0,0 +1,12 @@ |
112 |
+https://bugs.gentoo.org/426262 |
113 |
+--- a/Makefile.in 2022-04-25 18:06:16.529673077 +0800 |
114 |
++++ b/Makefile.in 2022-04-25 18:13:12.134356482 +0800 |
115 |
+@@ -200,7 +200,7 @@ |
116 |
+ ./config.status _pli_types.h |
117 |
+ _pli_types.h: stamp-_pli_types-h |
118 |
+ |
119 |
+-$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4 |
120 |
++$(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4 |
121 |
+ cd $(srcdir) && autoconf |
122 |
+ |
123 |
+ config.status: $(srcdir)/configure |
124 |
\ No newline at end of file |
125 |
|
126 |
diff --git a/sci-electronics/iverilog/files/iverilog-10.3-gen-bison-header.patch b/sci-electronics/iverilog/files/iverilog-10.3-gen-bison-header.patch |
127 |
new file mode 100644 |
128 |
index 000000000000..0027184c8338 |
129 |
--- /dev/null |
130 |
+++ b/sci-electronics/iverilog/files/iverilog-10.3-gen-bison-header.patch |
131 |
@@ -0,0 +1,97 @@ |
132 |
+From 5b699c1be73e789831db01e779a41478c0c62309 Mon Sep 17 00:00:00 2001 |
133 |
+From: Henner Zeller <h.zeller@×××.org> |
134 |
+Date: Wed, 29 Jul 2020 15:29:08 -0700 |
135 |
+Subject: [PATCH] Bison includes its generated header in *.cc. Generate with |
136 |
+ correct name. |
137 |
+ |
138 |
+The current bison (3.7) generates a *.cc file that includes the header |
139 |
+it generated. For parse.cc this would be parse.hh. Right now, we rename |
140 |
+this header to have a common name used in other files, but this results |
141 |
+in a compile error for the parse.cc file: |
142 |
+ |
143 |
+parse.cc:462:10: fatal error: parse.hh: No such file or directory |
144 |
+ 462 | #include "parse.hh" |
145 |
+ | ^~~~~~~~~~ |
146 |
+ |
147 |
+Fix this by telling bison to output the header file to the correct |
148 |
+filename in the first place so that we don't have to rename it. |
149 |
+(using the --defines instead of -d option). |
150 |
+ |
151 |
+This looks like a bison specific option not available in Posix yacc; |
152 |
+but looks like we're requiring bison anyway. |
153 |
+ |
154 |
+Signed-off-by: Henner Zeller <h.zeller@×××.org> |
155 |
+--- |
156 |
+ Makefile.in | 4 +--- |
157 |
+ tgt-pcb/Makefile.in | 4 +--- |
158 |
+ vhdlpp/Makefile.in | 4 +--- |
159 |
+ vvp/Makefile.in | 4 +--- |
160 |
+ 4 files changed, 4 insertions(+), 12 deletions(-) |
161 |
+ |
162 |
+diff --git a/Makefile.in b/Makefile.in |
163 |
+index 5ac5515a..cc8cac46 100644 |
164 |
+--- a/Makefile.in |
165 |
++++ b/Makefile.in |
166 |
+@@ -256,10 +256,8 @@ parse.o: parse.cc |
167 |
+ |
168 |
+ # Build this in two steps to avoid parallel build issues (see pr3462585) |
169 |
+ parse.cc: $(srcdir)/parse.y |
170 |
+- $(YACC) --verbose -t -p VL -d -o $@ $< |
171 |
++ $(YACC) --verbose -t -p VL --defines=parse.h -o $@ $< |
172 |
+ parse.h: parse.cc |
173 |
+- mv parse.cc.h $@ 2>/dev/null || mv parse.hh $@ |
174 |
+- touch $@ |
175 |
+ |
176 |
+ syn-rules.cc: $(srcdir)/syn-rules.y |
177 |
+ $(YACC) --verbose -t -p syn_ -o $@ $< |
178 |
+diff --git a/tgt-pcb/Makefile.in b/tgt-pcb/Makefile.in |
179 |
+index a5f9b7d5..7345e195 100644 |
180 |
+--- a/tgt-pcb/Makefile.in |
181 |
++++ b/tgt-pcb/Makefile.in |
182 |
+@@ -89,10 +89,8 @@ fp_lex.cc: $(srcdir)/fp.lex |
183 |
+ $(LEX) -s -ofp_lex.cc $(srcdir)/fp.lex |
184 |
+ |
185 |
+ fp.cc: $(srcdir)/fp.y |
186 |
+- $(YACC) --verbose -t -p fp -d -o $@ $< |
187 |
++ $(YACC) --verbose -t -p fp --defines=fp.h -o $@ $< |
188 |
+ fp.h: fp.cc |
189 |
+- mv fp.cc.h $@ 2>/dev/null || mv fp.hh $@ |
190 |
+- touch $@ |
191 |
+ |
192 |
+ ifeq (@WIN32@,yes) |
193 |
+ TGTLDFLAGS=-L.. -livl |
194 |
+diff --git a/vhdlpp/Makefile.in b/vhdlpp/Makefile.in |
195 |
+index 53ae140a..458178bd 100644 |
196 |
+--- a/vhdlpp/Makefile.in |
197 |
++++ b/vhdlpp/Makefile.in |
198 |
+@@ -117,10 +117,8 @@ lexor.cc: $(srcdir)/lexor.lex |
199 |
+ |
200 |
+ # Build this in two steps to avoid parallel build issues (see pr3462585) |
201 |
+ parse.cc: $(srcdir)/parse.y |
202 |
+- $(YACC) --verbose -t -d -o $@ $< |
203 |
++ $(YACC) --verbose -t --defines=parse.h -o $@ $< |
204 |
+ parse.h: parse.cc |
205 |
+- mv parse.cc.h $@ 2>/dev/null || mv parse.hh $@ |
206 |
+- touch $@ |
207 |
+ |
208 |
+ lexor_keyword.o: lexor_keyword.cc parse.h |
209 |
+ |
210 |
+diff --git a/vvp/Makefile.in b/vvp/Makefile.in |
211 |
+index 8ccdb1d2..cdd940f5 100644 |
212 |
+--- a/vvp/Makefile.in |
213 |
++++ b/vvp/Makefile.in |
214 |
+@@ -142,10 +142,8 @@ tables.o: tables.cc |
215 |
+ |
216 |
+ # Build this in two steps to avoid parallel build issues (see pr3462585) |
217 |
+ parse.cc: $(srcdir)/parse.y |
218 |
+- $(YACC) --verbose -t -d -o $@ $< |
219 |
++ $(YACC) --verbose -t --defines=parse.h -o $@ $< |
220 |
+ parse.h: parse.cc |
221 |
+- mv parse.cc.h $@ 2>/dev/null || mv parse.hh $@ |
222 |
+- touch $@ |
223 |
+ |
224 |
+ lexor.cc: $(srcdir)/lexor.lex |
225 |
+ $(LEX) -s -olexor.cc $(srcdir)/lexor.lex |
226 |
+-- |
227 |
+2.26.2 |
228 |
+ |
229 |
|
230 |
diff --git a/sci-electronics/iverilog/files/iverilog-10.3-override-var.patch b/sci-electronics/iverilog/files/iverilog-10.3-override-var.patch |
231 |
new file mode 100644 |
232 |
index 000000000000..93b9a616987d |
233 |
--- /dev/null |
234 |
+++ b/sci-electronics/iverilog/files/iverilog-10.3-override-var.patch |
235 |
@@ -0,0 +1,12 @@ |
236 |
+https://bugs.gentoo.org/730096 |
237 |
+--- a/vpi/Makefile.in 2022-04-25 18:39:03.748939186 +0800 |
238 |
++++ b/vpi/Makefile.in 2022-04-25 18:38:43.754679053 +0800 |
239 |
+@@ -71,7 +71,7 @@ |
240 |
+ M = sys_clog2.o v2005_math.o |
241 |
+ |
242 |
+ # Object files for va_math.vpi |
243 |
+-V = va_math.o |
244 |
++override V = va_math.o |
245 |
+ |
246 |
+ V2009 = v2009_table.o v2009_array.o v2009_enum.o v2009_string.o |
247 |
+ |
248 |
|
249 |
diff --git a/sci-electronics/iverilog/iverilog-10.3.ebuild b/sci-electronics/iverilog/iverilog-10.3.ebuild |
250 |
index 1a2a537efa44..a0e95ea74ac9 100644 |
251 |
--- a/sci-electronics/iverilog/iverilog-10.3.ebuild |
252 |
+++ b/sci-electronics/iverilog/iverilog-10.3.ebuild |
253 |
@@ -1,7 +1,7 @@ |
254 |
-# Copyright 1999-2021 Gentoo Authors |
255 |
+# Copyright 1999-2022 Gentoo Authors |
256 |
# Distributed under the terms of the GNU General Public License v2 |
257 |
|
258 |
-EAPI=7 |
259 |
+EAPI=8 |
260 |
|
261 |
inherit autotools |
262 |
|
263 |
@@ -26,23 +26,25 @@ LICENSE="LGPL-2.1" |
264 |
SLOT="0" |
265 |
IUSE="examples" |
266 |
|
267 |
-# If you are building from git, you will also need gperf to generate |
268 |
-# the configure scripts. |
269 |
-RDEPEND=" |
270 |
- sys-libs/readline:0 |
271 |
+# 721022, should depend on sys-libs/readline:= |
272 |
+DEPEND=" |
273 |
+ sys-libs/readline:= |
274 |
sys-libs/zlib |
275 |
" |
276 |
- |
277 |
-DEPEND=" |
278 |
+RDEPEND="${DEPEND}" |
279 |
+BDEPEND=" |
280 |
dev-util/gperf |
281 |
sys-devel/bison |
282 |
sys-devel/flex |
283 |
- ${RDEPEND} |
284 |
" |
285 |
|
286 |
PATCHES=( |
287 |
"${FILESDIR}"/${PN}-10.3-file-missing.patch #705412 |
288 |
"${FILESDIR}"/${PN}-10.3-fno-common.patch #706366 |
289 |
+ "${FILESDIR}"/${PN}-10.3-gen-bison-header.patch #734760 |
290 |
+ "${FILESDIR}"/${PN}-10.3-call-nm.patch #731906 |
291 |
+ "${FILESDIR}"/${PN}-10.3-configure-ac.patch #426262 |
292 |
+ "${FILESDIR}"/${PN}-10.3-override-var.patch #730096 |
293 |
) |
294 |
|
295 |
src_prepare() { |
296 |
@@ -52,6 +54,9 @@ src_prepare() { |
297 |
# Here translate the autoconf.sh, equivalent to the following code |
298 |
# > sh autoconf.sh |
299 |
|
300 |
+ # Move configure.in to configure.ac (bug #426262) |
301 |
+ mv configure.in configure.ac || die |
302 |
+ |
303 |
# Autoconf in root ... |
304 |
eautoconf --force |
305 |
# Precompiling lexor_keyword.gperf |