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@gentoo.org>
This commit is contained in:
David Seifert
2020-10-24 22:03:36 +02:00
parent 1e054f143b
commit bc85b6ad46
4 changed files with 77 additions and 19 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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
cd ../.. || die
S="${WORKDIR}/${P}/src/batch"
PATCHES=(
# fix build issues with tcl-8.6, #452034
epatch "${FILESDIR}/${P}-tcl86.patch"
"${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
default
}
src_configure() {
tc-export CC
default
}
src_install() {