mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
- Fix SIGSEGV when there are spaces after a comma like ".PRINT TRAN v(2, 1)".
- Style clean-ups. PR: ports/157313 Spotted by: Makoto Kishimoto
This commit is contained in:
parent
f3bfa725e7
commit
cb28a2affc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=316960
4 changed files with 80 additions and 18 deletions
|
@ -1,44 +1,45 @@
|
||||||
# New ports collection makefile for: spice
|
# Created by: Julian Jenkins <kaveman@magna.com.au>
|
||||||
# Date created: 26 Mar 96
|
|
||||||
# Whom: Julian Jenkins <kaveman@magna.com.au>
|
|
||||||
#
|
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
#
|
|
||||||
|
|
||||||
PORTNAME= spice
|
PORTNAME= spice
|
||||||
PORTVERSION= 3f5.2
|
PORTVERSION= 3f5.2
|
||||||
PORTREVISION= 7
|
PORTREVISION= 8
|
||||||
CATEGORIES= cad
|
CATEGORIES= cad
|
||||||
MASTER_SITES= http://embedded.eecs.berkeley.edu/pubs/downloads/spice/:sources
|
MASTER_SITES= http://embedded.eecs.berkeley.edu/pubs/downloads/spice/:sources
|
||||||
|
PKGNAMESUFFIX= ${NOX11SUFX}
|
||||||
DISTFILES= spice3f5${EXTRACT_SUFX}:sources \
|
DISTFILES= spice3f5${EXTRACT_SUFX}:sources \
|
||||||
cp.ps toc.ps doc.ps
|
cp.ps toc.ps doc.ps
|
||||||
DIST_SUBDIR= spice
|
DIST_SUBDIR= spice
|
||||||
EXTRACT_ONLY= spice3f5${EXTRACT_SUFX}
|
EXTRACT_ONLY= spice3f5${EXTRACT_SUFX}
|
||||||
|
|
||||||
MAINTAINER= ports@FreeBSD.org
|
MAINTAINER= hrs@FreeBSD.org
|
||||||
COMMENT= A general-purpose circuit simulation program
|
COMMENT= A general-purpose circuit simulation program
|
||||||
|
|
||||||
LICENSE= BSD
|
LICENSE= BSD
|
||||||
|
|
||||||
WRKSRC= ${WRKDIR}/${PORTNAME}3f5
|
WRKSRC= ${WRKDIR}/${PORTNAME}3f5
|
||||||
|
MAKEFILE= ${FILESDIR}/Makefile
|
||||||
|
MAKE_ENV+= STRIP_CMD=${STRIP_CMD}
|
||||||
|
MAKE_JOBS_UNSAFE= yes
|
||||||
MAN1= sconvert.1 nutmeg.1 spice.1
|
MAN1= sconvert.1 nutmeg.1 spice.1
|
||||||
MAN3= mfb.3
|
MAN3= mfb.3
|
||||||
MAN5= mfbcap.5
|
MAN5= mfbcap.5
|
||||||
MLINKS= spice.1 spice3.1
|
MLINKS= spice.1 spice3.1
|
||||||
MAKEFILE= ${FILESDIR}/Makefile
|
|
||||||
MAKE_ENV+= STRIP_CMD=${STRIP_CMD}
|
|
||||||
MAKE_JOBS_UNSAFE= yes
|
|
||||||
|
|
||||||
.ifdef WITHOUT_X11
|
OPTIONS_DEFINE= DOCS X11
|
||||||
PKGNAMESUFFIX= -without-x11
|
OPTIONS_DEFAULT=DOCS X11
|
||||||
|
|
||||||
|
.include <bsd.port.options.mk>
|
||||||
|
|
||||||
|
.if ${PORT_OPTIONS:MX11}
|
||||||
|
USE_XORG= x11 xaw xext xmu xt
|
||||||
|
NOX11SUFX=
|
||||||
|
.else
|
||||||
|
NOX11SUFX= -nox11
|
||||||
COMMENT= A general-purpose circuit simulation program (non-X11 version)
|
COMMENT= A general-purpose circuit simulation program (non-X11 version)
|
||||||
MAKE_ARGS+= -DWITHOUT_X11
|
MAKE_ARGS+= -DWITHOUT_X11
|
||||||
.else
|
|
||||||
USE_XORG= x11 xaw xext xmu xt
|
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.include <bsd.port.pre.mk>
|
|
||||||
|
|
||||||
post-patch:
|
post-patch:
|
||||||
@${REINPLACE_CMD} -e 's|/usr/ucb|${LOCALBASE}/bin|' ${WRKSRC}/util/build
|
@${REINPLACE_CMD} -e 's|/usr/ucb|${LOCALBASE}/bin|' ${WRKSRC}/util/build
|
||||||
|
|
||||||
|
@ -50,7 +51,7 @@ do-configure:
|
||||||
${WRKSRC}/conf/FreeBSD ${WRKSRC}/conf/FreeBSD.without_x11
|
${WRKSRC}/conf/FreeBSD ${WRKSRC}/conf/FreeBSD.without_x11
|
||||||
|
|
||||||
post-install:
|
post-install:
|
||||||
.if !defined(NOPORTDOCS)
|
.if ${PORT_OPTIONS:MDOCS}
|
||||||
${MKDIR} ${DOCSDIR}
|
${MKDIR} ${DOCSDIR}
|
||||||
${CAT} ${DISTDIR}/${DIST_SUBDIR}/*.ps > ${DOCSDIR}/spice3f3.ps
|
${CAT} ${DISTDIR}/${DIST_SUBDIR}/*.ps > ${DOCSDIR}/spice3f3.ps
|
||||||
${GZIP_CMD} ${DOCSDIR}/*.ps
|
${GZIP_CMD} ${DOCSDIR}/*.ps
|
||||||
|
@ -58,4 +59,4 @@ post-install:
|
||||||
${MKDIR} ${EXAMPLESDIR}
|
${MKDIR} ${EXAMPLESDIR}
|
||||||
${INSTALL_DATA} ${WRKSRC}/examples/*.cir ${EXAMPLESDIR}
|
${INSTALL_DATA} ${WRKSRC}/examples/*.cir ${EXAMPLESDIR}
|
||||||
|
|
||||||
.include <bsd.port.post.mk>
|
.include <bsd.port.mk>
|
||||||
|
|
11
cad/spice/files/patch-src_lib_cp_lexical.c
Normal file
11
cad/spice/files/patch-src_lib_cp_lexical.c
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- src/lib/cp/lexical.c.orig 2013-05-01 05:15:32.000000000 +0900
|
||||||
|
+++ src/lib/cp/lexical.c 2013-05-01 05:16:36.000000000 +0900
|
||||||
|
@@ -145,7 +145,7 @@
|
||||||
|
switch (c) {
|
||||||
|
case ' ':
|
||||||
|
case '\t':
|
||||||
|
- if (i > 0) {
|
||||||
|
+ if (paren < 1 && i > 0) {
|
||||||
|
newword;
|
||||||
|
}
|
||||||
|
break;
|
31
cad/spice/files/patch-src_lib_fte_dotcards.c
Normal file
31
cad/spice/files/patch-src_lib_fte_dotcards.c
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
--- src/lib/fte/dotcards.c.orig 1993-07-30 13:44:28.000000000 +0900
|
||||||
|
+++ src/lib/fte/dotcards.c 2013-05-01 05:07:55.000000000 +0900
|
||||||
|
@@ -405,11 +405,17 @@
|
||||||
|
char *string;
|
||||||
|
{
|
||||||
|
char buf[BSIZE_SP], *s, *t, *ss = string;
|
||||||
|
+ char *e;
|
||||||
|
|
||||||
|
+ e = string + strlen(string);
|
||||||
|
if (ciprefix("v(", string) && index(string, ',')) {
|
||||||
|
for (s = string; *s && (*s != ','); s++)
|
||||||
|
;
|
||||||
|
*s++ = '\0';
|
||||||
|
+ while (s + 1 < e && isspace(*(s + 1))) {
|
||||||
|
+ *(s + 1) = '\0';
|
||||||
|
+ s++;
|
||||||
|
+ }
|
||||||
|
for (t = s; *t && (*t != ')'); t++)
|
||||||
|
;
|
||||||
|
*t = '\0';
|
||||||
|
@@ -589,6 +595,10 @@
|
||||||
|
|
||||||
|
if (c)
|
||||||
|
*c = 0;
|
||||||
|
+ while (c + 1 < r && isspace(*(c + 1))) {
|
||||||
|
+ c++;
|
||||||
|
+ *c = '\0';
|
||||||
|
+ }
|
||||||
|
|
||||||
|
wl = alloc(struct wordlist);
|
||||||
|
|
19
cad/spice/files/patch-src_lib_misc_string.c
Normal file
19
cad/spice/files/patch-src_lib_misc_string.c
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
--- src/lib/misc/string.c.orig 2013-05-01 03:50:59.000000000 +0900
|
||||||
|
+++ src/lib/misc/string.c 2013-05-01 03:58:30.000000000 +0900
|
||||||
|
@@ -148,13 +148,15 @@
|
||||||
|
(*s)++;
|
||||||
|
if (!**s)
|
||||||
|
return (NULL);
|
||||||
|
- while ((c = **s) && !isspace(c)) {
|
||||||
|
+ while ((c = **s)) {
|
||||||
|
if (c == '('/*)*/)
|
||||||
|
paren += 1;
|
||||||
|
else if (c == /*(*/')')
|
||||||
|
paren -= 1;
|
||||||
|
else if (c == ',' && paren < 1)
|
||||||
|
break;
|
||||||
|
+ else if (isspace(c) && paren < 1)
|
||||||
|
+ break;
|
||||||
|
buf[i++] = *(*s)++;
|
||||||
|
}
|
||||||
|
buf[i] = '\0';
|
Loading…
Add table
Reference in a new issue