1 |
commit: bc85b6ad461e344a5a2fee86d7b0f4ff0dd66d86 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 24 20:03:36 2020 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 24 20:03:36 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc85b6ad |
7 |
|
8 |
sci-electronics/gnetman: Port to EAPI 7 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/707894 |
11 |
Closes: https://bugs.gentoo.org/711354 |
12 |
Closes: https://bugs.gentoo.org/746032 |
13 |
Package-Manager: Portage-3.0.8, Repoman-3.0.2 |
14 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
15 |
|
16 |
.../gnetman-0.0.1_pre20110124-build-system.patch | 22 +++++++++++++ |
17 |
.../gnetman-0.0.1_pre20110124-fno-common.patch | 30 +++++++++++++++++ |
18 |
.../files/gnetman-0.0.1_pre20110124-tcl86.patch | 4 +-- |
19 |
.../gnetman/gnetman-0.0.1_pre20110124.ebuild | 38 +++++++++++++--------- |
20 |
4 files changed, 76 insertions(+), 18 deletions(-) |
21 |
|
22 |
diff --git a/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-build-system.patch b/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-build-system.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..2801fb59281 |
25 |
--- /dev/null |
26 |
+++ b/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-build-system.patch |
27 |
@@ -0,0 +1,22 @@ |
28 |
+--- a/src/batch/configure |
29 |
++++ b/src/batch/configure |
30 |
+@@ -72,8 +72,8 @@ |
31 |
+ flex -f -Pvr -o../verilog/vrscan.c ../verilog/vrscan.l |
32 |
+ swig -tcl8 ../tcl/tclfunc.i |
33 |
+ |
34 |
+-CFLAGS="-g -Wall -W -Wno-unused-parameter -Wno-unused-function -DDD_DEBUG -I../include -I../spice -I/usr/include/tcl8.4" |
35 |
+-LIBS="-lpopt -ltcl8.4 -lddutil-dbg" |
36 |
++CFLAGS="${CFLAGS} -W -Wno-unused-parameter -Wno-unused-function -I../include -I../spice" |
37 |
++LIBS="-lpopt -ltcl -lddutil" |
38 |
+ |
39 |
+ echo "CC=$CC |
40 |
+ CFLAGS=$CFLAGS |
41 |
+@@ -91,7 +91,7 @@ |
42 |
+ TARGET='../../bin/gnetman' |
43 |
+ |
44 |
+ $(TARGET): $(OBJECTS) |
45 |
+- $(CC) $(CFLAGS) $(OBJECTS) $(LIBS) -o $(TARGET) |
46 |
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(TARGET) |
47 |
+ |
48 |
+ clean: |
49 |
+ rm -f $(OBJECTS) ../*/*database.[ch] ../*/*scan.c ../*/*parse.c |
50 |
|
51 |
diff --git a/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-fno-common.patch b/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-fno-common.patch |
52 |
new file mode 100644 |
53 |
index 00000000000..3e247282b40 |
54 |
--- /dev/null |
55 |
+++ b/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-fno-common.patch |
56 |
@@ -0,0 +1,30 @@ |
57 |
+--- a/src/sch/schwrite.c |
58 |
++++ b/src/sch/schwrite.c |
59 |
+@@ -21,7 +21,7 @@ |
60 |
+ --------------------------------------------------------------------------------------------------*/ |
61 |
+ #include "sch.h" |
62 |
+ |
63 |
+-FILE *schFile; |
64 |
++extern FILE *schFile; |
65 |
+ |
66 |
+ /*-------------------------------------------------------------------------------------------------- |
67 |
+ Write to schFile. |
68 |
+--- a/src/spice/cir.h |
69 |
++++ b/src/spice/cir.h |
70 |
+@@ -36,5 +36,5 @@ |
71 |
+ extern void cirwarn(char *message, ...); |
72 |
+ |
73 |
+ /* Attribute symbols */ |
74 |
+-utSym cirGraphicalSym, cirNetSym, cirSpiceTypeSym, cirSpiceTextSym; |
75 |
++extern utSym cirGraphicalSym, cirNetSym, cirSpiceTypeSym, cirSpiceTextSym; |
76 |
+ |
77 |
+--- a/src/spice/cirwrite.c |
78 |
++++ b/src/spice/cirwrite.c |
79 |
+@@ -29,6 +29,7 @@ |
80 |
+ FILE *cirFile; |
81 |
+ uint32 cirLineNum; |
82 |
+ cirRoot cirTheRoot; |
83 |
++utSym cirGraphicalSym, cirNetSym, cirSpiceTypeSym, cirSpiceTextSym; |
84 |
+ |
85 |
+ static char *cirLine; |
86 |
+ static uint32 cirLinePos, cirLineSize, cirLastBreakPos; |
87 |
|
88 |
diff --git a/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-tcl86.patch b/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-tcl86.patch |
89 |
index fdb6573990f..62f61cc5a4b 100644 |
90 |
--- a/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-tcl86.patch |
91 |
+++ b/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-tcl86.patch |
92 |
@@ -1,5 +1,5 @@ |
93 |
---- gnetman-0.0.1_pre20110124_orig/src/tcl/tclwrap.c 2012-05-25 07:44:51.000000000 +0200 |
94 |
-+++ gnetman-0.0.1_pre20110124/src/tcl/tclwrap.c 2013-02-24 12:58:51.000000000 +0100 |
95 |
+--- a/src/tcl/tclwrap.c |
96 |
++++ b/src/tcl/tclwrap.c |
97 |
@@ -46,7 +46,7 @@ |
98 |
result = Tcl_EvalFile(interp, (char *)fileName) == TCL_OK; |
99 |
if (!result) { |
100 |
|
101 |
diff --git a/sci-electronics/gnetman/gnetman-0.0.1_pre20110124.ebuild b/sci-electronics/gnetman/gnetman-0.0.1_pre20110124.ebuild |
102 |
index 6594de4d08d..a8d0ede5ad5 100644 |
103 |
--- a/sci-electronics/gnetman/gnetman-0.0.1_pre20110124.ebuild |
104 |
+++ b/sci-electronics/gnetman/gnetman-0.0.1_pre20110124.ebuild |
105 |
@@ -1,38 +1,44 @@ |
106 |
# Copyright 1999-2020 Gentoo Authors |
107 |
# Distributed under the terms of the GNU General Public License v2 |
108 |
|
109 |
-EAPI=4 |
110 |
+EAPI=7 |
111 |
|
112 |
-inherit eutils toolchain-funcs |
113 |
+inherit toolchain-funcs |
114 |
|
115 |
DESCRIPTION="A GNU Netlist Manipulation Library" |
116 |
HOMEPAGE="https://sourceforge.net/projects/gnetman/" |
117 |
#snapshot from http://gnetman.git.sourceforge.net/git/gitweb.cgi?p=gnetman/gnetman; |
118 |
SRC_URI="mirror://gentoo/${P}.tar.gz" |
119 |
|
120 |
-SLOT="0" |
121 |
LICENSE="GPL-2" |
122 |
-IUSE="doc examples" |
123 |
+SLOT="0" |
124 |
KEYWORDS="~amd64 ~x86" |
125 |
+IUSE="doc examples" |
126 |
|
127 |
-S=${WORKDIR}/${P}/src/batch |
128 |
- |
129 |
-RDEPEND=">=dev-lang/tcl-8.6:0 |
130 |
+RDEPEND=" |
131 |
+ >=dev-lang/tcl-8.6:0 |
132 |
sci-electronics/geda" |
133 |
DEPEND="${RDEPEND} |
134 |
dev-db/datadraw" |
135 |
|
136 |
-src_prepare() { |
137 |
- sed -e "/^CFLAGS=/s:-g -Wall:${CFLAGS}:" \ |
138 |
- -e "/^CFLAGS=/s:-I/usr/include/tcl8.4::" \ |
139 |
- -e "/^LIBS=/s:-ltcl8.4:-ltcl:" \ |
140 |
- -e '/^$(TARGET):/,+3s:$(CFLAGS):$(CFLAGS) $(LDFLAGS):' \ |
141 |
- -i configure || die |
142 |
- tc-export CC |
143 |
+S="${WORKDIR}/${P}/src/batch" |
144 |
+PATCHES=( |
145 |
+ # fix build issues with tcl-8.6, #452034 |
146 |
+ "${FILESDIR}"/${P}-tcl86.patch |
147 |
+ # fix build system, #711354 |
148 |
+ "${FILESDIR}"/${P}-build-system.patch |
149 |
+ # fix -fno-common, #707894 |
150 |
+ "${FILESDIR}"/${P}-fno-common.patch |
151 |
+) |
152 |
|
153 |
+src_prepare() { |
154 |
cd ../.. || die |
155 |
- # fix build issues with tcl-8.6, #452034 |
156 |
- epatch "${FILESDIR}/${P}-tcl86.patch" |
157 |
+ default |
158 |
+} |
159 |
+ |
160 |
+src_configure() { |
161 |
+ tc-export CC |
162 |
+ default |
163 |
} |
164 |
|
165 |
src_install() { |