commit:     bc85b6ad461e344a5a2fee86d7b0f4ff0dd66d86
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 24 20:03:36 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Oct 24 20:03:36 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc85b6ad

sci-electronics/gnetman: Port to EAPI 7

Closes: https://bugs.gentoo.org/707894
Closes: https://bugs.gentoo.org/711354
Closes: https://bugs.gentoo.org/746032
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../gnetman-0.0.1_pre20110124-build-system.patch   | 22 +++++++++++++
 .../gnetman-0.0.1_pre20110124-fno-common.patch     | 30 +++++++++++++++++
 .../files/gnetman-0.0.1_pre20110124-tcl86.patch    |  4 +--
 .../gnetman/gnetman-0.0.1_pre20110124.ebuild       | 38 +++++++++++++---------
 4 files changed, 76 insertions(+), 18 deletions(-)

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
new file mode 100644
index 00000000000..2801fb59281
--- /dev/null
+++ b/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-build-system.patch
@@ -0,0 +1,22 @@
+--- a/src/batch/configure
++++ b/src/batch/configure
+@@ -72,8 +72,8 @@
+ flex -f -Pvr -o../verilog/vrscan.c ../verilog/vrscan.l
+ swig -tcl8 ../tcl/tclfunc.i
+ 
+-CFLAGS="-g -Wall -W -Wno-unused-parameter -Wno-unused-function -DDD_DEBUG 
-I../include -I../spice -I/usr/include/tcl8.4"
+-LIBS="-lpopt -ltcl8.4 -lddutil-dbg"
++CFLAGS="${CFLAGS} -W -Wno-unused-parameter -Wno-unused-function -I../include 
-I../spice"
++LIBS="-lpopt -ltcl -lddutil"
+ 
+ echo "CC=$CC
+ CFLAGS=$CFLAGS
+@@ -91,7 +91,7 @@
+ TARGET='../../bin/gnetman'
+ 
+ $(TARGET): $(OBJECTS)
+-      $(CC) $(CFLAGS) $(OBJECTS) $(LIBS) -o $(TARGET)
++      $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(TARGET)
+ 
+ clean:
+       rm -f $(OBJECTS) ../*/*database.[ch] ../*/*scan.c ../*/*parse.c

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
new file mode 100644
index 00000000000..3e247282b40
--- /dev/null
+++ b/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-fno-common.patch
@@ -0,0 +1,30 @@
+--- a/src/sch/schwrite.c
++++ b/src/sch/schwrite.c
+@@ -21,7 +21,7 @@
+ 
--------------------------------------------------------------------------------------------------*/
+ #include "sch.h"
+ 
+-FILE *schFile;
++extern FILE *schFile;
+ 
+ 
/*--------------------------------------------------------------------------------------------------
+   Write to schFile.
+--- a/src/spice/cir.h
++++ b/src/spice/cir.h
+@@ -36,5 +36,5 @@
+ extern void cirwarn(char *message, ...);
+ 
+ /* Attribute symbols */
+-utSym cirGraphicalSym, cirNetSym, cirSpiceTypeSym, cirSpiceTextSym;
++extern utSym cirGraphicalSym, cirNetSym, cirSpiceTypeSym, cirSpiceTextSym;
+ 
+--- a/src/spice/cirwrite.c
++++ b/src/spice/cirwrite.c
+@@ -29,6 +29,7 @@
+ FILE *cirFile;
+ uint32 cirLineNum;
+ cirRoot cirTheRoot;
++utSym cirGraphicalSym, cirNetSym, cirSpiceTypeSym, cirSpiceTextSym;
+ 
+ static char *cirLine;
+ static uint32 cirLinePos, cirLineSize, cirLastBreakPos;

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
index fdb6573990f..62f61cc5a4b 100644
--- a/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-tcl86.patch
+++ b/sci-electronics/gnetman/files/gnetman-0.0.1_pre20110124-tcl86.patch
@@ -1,5 +1,5 @@
---- gnetman-0.0.1_pre20110124_orig/src/tcl/tclwrap.c   2012-05-25 
07:44:51.000000000 +0200
-+++ gnetman-0.0.1_pre20110124/src/tcl/tclwrap.c        2013-02-24 
12:58:51.000000000 +0100
+--- a/src/tcl/tclwrap.c
++++ b/src/tcl/tclwrap.c
 @@ -46,7 +46,7 @@
     result = Tcl_EvalFile(interp, (char *)fileName) == TCL_OK;
     if (!result) {

diff --git a/sci-electronics/gnetman/gnetman-0.0.1_pre20110124.ebuild 
b/sci-electronics/gnetman/gnetman-0.0.1_pre20110124.ebuild
index 6594de4d08d..a8d0ede5ad5 100644
--- a/sci-electronics/gnetman/gnetman-0.0.1_pre20110124.ebuild
+++ b/sci-electronics/gnetman/gnetman-0.0.1_pre20110124.ebuild
@@ -1,38 +1,44 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
+EAPI=7
 
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
 
 DESCRIPTION="A GNU Netlist Manipulation Library"
 HOMEPAGE="https://sourceforge.net/projects/gnetman/";
 #snapshot from 
http://gnetman.git.sourceforge.net/git/gitweb.cgi?p=gnetman/gnetman;
 SRC_URI="mirror://gentoo/${P}.tar.gz"
 
-SLOT="0"
 LICENSE="GPL-2"
-IUSE="doc examples"
+SLOT="0"
 KEYWORDS="~amd64 ~x86"
+IUSE="doc examples"
 
-S=${WORKDIR}/${P}/src/batch
-
-RDEPEND=">=dev-lang/tcl-8.6:0
+RDEPEND="
+       >=dev-lang/tcl-8.6:0
        sci-electronics/geda"
 DEPEND="${RDEPEND}
        dev-db/datadraw"
 
-src_prepare() {
-       sed -e "/^CFLAGS=/s:-g -Wall:${CFLAGS}:" \
-           -e "/^CFLAGS=/s:-I/usr/include/tcl8.4::" \
-               -e "/^LIBS=/s:-ltcl8.4:-ltcl:" \
-               -e '/^$(TARGET):/,+3s:$(CFLAGS):$(CFLAGS) $(LDFLAGS):' \
-               -i configure || die
-       tc-export CC
+S="${WORKDIR}/${P}/src/batch"
+PATCHES=(
+       # fix build issues with tcl-8.6, #452034
+       "${FILESDIR}"/${P}-tcl86.patch
+       # fix build system, #711354
+       "${FILESDIR}"/${P}-build-system.patch
+       # fix -fno-common, #707894
+       "${FILESDIR}"/${P}-fno-common.patch
+)
 
+src_prepare() {
        cd ../.. || die
-       # fix build issues with tcl-8.6, #452034
-       epatch "${FILESDIR}/${P}-tcl86.patch"
+       default
+}
+
+src_configure() {
+       tc-export CC
+       default
 }
 
 src_install() {

Reply via email to