summaryrefslogtreecommitdiff
path: root/cad
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-02-27 17:14:28 +0000
committerjlam <jlam@pkgsrc.org>2002-02-27 17:14:28 +0000
commita199bd121be9dab2818a1ea40f92d95a51855097 (patch)
tree7aca219c647fc3eb24dc2d36d1c93b84666289d9 /cad
parentb71fd4996c732be132253eb7de527b482aa336c3 (diff)
downloadpkgsrc-a199bd121be9dab2818a1ea40f92d95a51855097.tar.gz
* Strongly buildlinkify to handle readline wierdness.
* Don't declare a bunch of extern functions that are already declared by system headers on NetBSD. XXX This change may be incorrect for non-current systems.
Diffstat (limited to 'cad')
-rw-r--r--cad/spice/Makefile31
-rw-r--r--cad/spice/PLIST30
-rw-r--r--cad/spice/distinfo6
-rw-r--r--cad/spice/files/NetBSD10
-rw-r--r--cad/spice/patches/patch-ac75
-rw-r--r--cad/spice/patches/patch-ag30
6 files changed, 107 insertions, 75 deletions
diff --git a/cad/spice/Makefile b/cad/spice/Makefile
index fc2d7fc862f..6bd6896e3a8 100644
--- a/cad/spice/Makefile
+++ b/cad/spice/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2001/09/27 23:17:47 jlam Exp $
+# $NetBSD: Makefile,v 1.20 2002/02/27 17:14:28 jlam Exp $
# FreeBSD Id: Makefile,v 1.10 1998/06/08 09:21:37 tg Exp
#
@@ -12,7 +12,10 @@ MAINTAINER= dmcmahill@netbsd.org
HOMEPAGE= http://bwrc.eecs.berkeley.edu/Classes/IcBook/SPICE/
COMMENT= General-purpose circuit simulation program
-DEPENDS+= readline>=4.0:../../devel/readline
+BUILDLINK_DEPENDS.readline= readline>=4.0
+
+USE_BUILDLINK_ONLY= yes
+USE_GNU_READLINE= uses rl_* interface
# documentation in ftp://ic.eecs.berkeley.edu/pub/Spice3/um.3f3.ps
@@ -20,20 +23,26 @@ DEPENDS+= readline>=4.0:../../devel/readline
#PATCH_SITES= ftp://ilpsoft.eecs.berkeley.edu/pub/SPICE3F5/
#PATCHFILES= grid.patch newcoms.patch spsmp.patch
-USE_X11= yes
WRKSRC= ${WRKDIR}
CONFLICTS= ng-spice-[0-9]*
+post-extract:
+ ${CP} ${FILESDIR}/NetBSD ${WRKSRC}/conf
+
do-configure:
${RM} -f ${WRKSRC}/makefile
- ${SED} 's;@WRKSRC@;${WRKSRC};g' <${FILESDIR}/NetBSD \
- >${WRKSRC}/conf/NetBSD
- ${MV} ${WRKSRC}/conf/defaults ${WRKSRC}/conf/defaults.BAK
- ${SED} \
- -e 's@$${X11BASE}@${X11PREFIX}@' \
- -e 's@$${PREFIX}@${PREFIX}@' \
- <${WRKSRC}/conf/defaults.BAK >${WRKSRC}/conf/defaults
+ cd ${WRKSRC}/conf; for file in NetBSD defaults; do \
+ ${SED} -e "s|@MAKE_PROGRAM@|${MAKE_PROGRAM}|g" \
+ -e "s|@CFLAGS@|${CFLAGS}|g" \
+ -e "s|@LDFLAGS@|${LDFLAGS}|g" \
+ -e 's|@BUILDLINK_X11_DIR@|${BUILDLINK_X11_DIR}|g' \
+ -e 's|@X11BASE@|${X11BASE}|g' \
+ -e "s|@WRKSRC@|${WRKSRC}|g" \
+ -e 's|@PREFIX@|${PREFIX}|g' \
+ $${file} > $${file}.new; \
+ ${MV} -f $${file}.new $${file}; \
+ done
do-build:
cd ${WRKSRC} ; util/build NetBSD default
@@ -57,4 +66,6 @@ post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/spice3
${INSTALL_DATA} ${WRKSRC}/examples/*.cir ${PREFIX}/share/examples/spice3
+.include "../../devel/readline/buildlink.mk"
+.include "../../mk/x11.buildlink.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/cad/spice/PLIST b/cad/spice/PLIST
index cf273e4fd86..ccc5387f4db 100644
--- a/cad/spice/PLIST
+++ b/cad/spice/PLIST
@@ -1,10 +1,15 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:49:22 zuntum Exp $
-bin/spice3
-bin/nutmeg
-bin/sconvert
+@comment $NetBSD: PLIST,v 1.2 2002/02/27 17:14:28 jlam Exp $
bin/help
-bin/proc2mod
bin/multidec
+bin/nutmeg
+bin/proc2mod
+bin/sconvert
+bin/spice3
+man/man1/nutmeg.1
+man/man1/sconvert.1
+man/man1/spice.1
+man/man3/mfb.3
+man/man5/mfbcap.5
share/examples/spice3/bjtnoise.cir
share/examples/spice3/bsim1tst.cir
share/examples/spice3/bsim2tst.cir
@@ -25,18 +30,13 @@ share/examples/spice3/resnoise.cir
share/examples/spice3/rtlinv.cir
share/examples/spice3/schmitt.cir
share/examples/spice3/simplepz.cir
-share/spice3/helpdir/spice.txt
share/spice3/helpdir/spice.idx
-share/spice3/scripts/setplot
-share/spice3/scripts/spinit
+share/spice3/helpdir/spice.txt
share/spice3/mfbcap
share/spice3/news
-man/man5/mfbcap.5.gz
-man/man1/sconvert.1.gz
-man/man1/nutmeg.1.gz
-man/man1/spice.1.gz
-man/man3/mfb.3.gz
-@dirrm share/examples/spice3
-@dirrm share/spice3/helpdir
+share/spice3/scripts/setplot
+share/spice3/scripts/spinit
@dirrm share/spice3/scripts
+@dirrm share/spice3/helpdir
@dirrm share/spice3
+@dirrm share/examples/spice3
diff --git a/cad/spice/distinfo b/cad/spice/distinfo
index e16269d1b3e..e0e2c55df0f 100644
--- a/cad/spice/distinfo
+++ b/cad/spice/distinfo
@@ -1,14 +1,14 @@
-$NetBSD: distinfo,v 1.2 2001/04/19 16:27:02 agc Exp $
+$NetBSD: distinfo,v 1.3 2002/02/27 17:14:28 jlam Exp $
SHA1 (sp3f4.kit.tar.Z) = bded1e078d0acfef090117490a7ac8a57887f39e
Size (sp3f4.kit.tar.Z) = 2086528 bytes
SHA1 (patch-aa) = 35d8d9ecfb2beaa54e0763197b551d5e26fc7f4e
SHA1 (patch-ab) = 4cbb89af1ef070ea0f5847ee59362aa587db3652
-SHA1 (patch-ac) = 8b271a11bac8ff7fa339ccc169ca3d996adbfeb1
+SHA1 (patch-ac) = 1554932f75b8532b1e2293390b5cea03a7133bb4
SHA1 (patch-ad) = ffcc3d3a03da19134dab68ac52d510655d2af6c0
SHA1 (patch-ae) = cad6420b959acadedeeaaa17e4d8ff06511cda10
SHA1 (patch-af) = 23d047049d5f183af12e14b56c535adf95b9f208
-SHA1 (patch-ag) = b54d96f7d3ae004db6a0d679341aeba1339a1d8a
+SHA1 (patch-ag) = f628e53a4dc0c63dc5b3b9287bb3f52cdb73dfc1
SHA1 (patch-ah) = 2c1f4f135cbba8e7159be4ae811e54e5464cbdda
SHA1 (patch-ai) = 7e94175896b98f17f43338a05ed993657d4cc844
SHA1 (patch-aj) = 6229e4066ab8bfba8b29bcc1260d75563637a784
diff --git a/cad/spice/files/NetBSD b/cad/spice/files/NetBSD
index f3d10144b97..870b2133642 100644
--- a/cad/spice/files/NetBSD
+++ b/cad/spice/files/NetBSD
@@ -1,12 +1,12 @@
# FreeBSD/NetBSD config exception file
-# $NetBSD: NetBSD,v 1.4 2000/08/16 05:09:31 dmcmahill Exp $
+# $NetBSD: NetBSD,v 1.5 2002/02/27 17:14:28 jlam Exp $
-MAKE = /usr/bin/make
+MAKE = @MAKE_PROGRAM@
INTERFACE_OPTS = -DWANT_X11
CC = gcc
-CC_OPT = -O2 -pipe -I@WRKSRC@/src/include -I${LOCALBASE}/include
-CC_OPT_SAFE = -O2 -fno-strength-reduce -pipe -I@WRKSRC@/src/include -I${LOCALBASE}/include
-LDFLAGS = -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lreadline -lm -ltermcap
+CC_OPT = -O2 -pipe -I@WRKSRC@/src/include @CFLAGS@
+CC_OPT_SAFE = -O2 -fno-strength-reduce -pipe -I@WRKSRC@/src/include @CFLAGS@
+LDFLAGS = @LDFLAGS@ -lreadline -lm -ltermcap
ASM_HACK = < /dev/null
SYS_CFLAGS = -Dbsd
diff --git a/cad/spice/patches/patch-ac b/cad/spice/patches/patch-ac
index 0c68b1a2e17..b89f65d722a 100644
--- a/cad/spice/patches/patch-ac
+++ b/cad/spice/patches/patch-ac
@@ -1,33 +1,44 @@
-$NetBSD: patch-ac,v 1.3 1999/10/01 17:05:15 dmcmahill Exp $
+$NetBSD: patch-ac,v 1.4 2002/02/27 17:14:28 jlam Exp $
-*** src/include/misc.h.orig Thu Dec 1 09:17:02 1994
---- src/include/misc.h Sun Mar 31 12:32:58 1996
-***************
-*** 86,92 ****
---- 86,94 ----
- extern char *realloc();
- extern char *getenv();
- extern int errno;
-+ #if !(defined(__FreeBSD__) || defined(__NetBSD__))
- extern char *sys_errlist[];
-+ #endif
- extern char *getenv();
- extern char *getwd();
- extern int rand();
-***************
-*** 111,122 ****
---- 111,124 ----
- # endif /* clearerr */
- # endif /* HAS_CLEARERR */
-
-+ #if !(defined(__FreeBSD__) || defined(__NetBSD__))
- # ifndef bzero
- extern int bzero();
- # endif
- # ifndef bcopy
- extern void bcopy();
- # endif
-+ #endif /* defined(__FreeBSD__) || defined(__NetBSD__) */
-
- # ifndef index
- # ifdef HAS_INDEX
+--- src/include/misc.h.orig Sun Apr 25 17:37:48 1993
++++ src/include/misc.h
+@@ -86,7 +86,9 @@
+ extern char *realloc();
+ extern char *getenv();
+ extern int errno;
++#if !(defined(__FreeBSD__) || defined(__NetBSD__))
+ extern char *sys_errlist[];
++#endif
+ extern char *getenv();
+ extern char *getwd();
+ extern int rand();
+@@ -109,12 +111,14 @@
+ # endif /* clearerr */
+ # endif /* HAS_CLEARERR */
+
++#if !(defined(__FreeBSD__) || defined(__NetBSD__))
+ # ifndef bzero
+ extern int bzero();
+ # endif
+ # ifndef bcopy
+ extern void bcopy();
+ # endif
++#endif /* defined(__FreeBSD__) || defined(__NetBSD__) */
+
+ # ifndef index
+ # ifdef HAS_INDEX
+@@ -144,12 +148,14 @@
+ extern void perror();
+ #endif
+
++#if !(defined(__FreeBSD__) || defined(__NetBSD__))
+ #ifdef HAS_TIME_
+ # ifdef HAS_BSDTIME
+ extern char *timezone();
+ # endif
+ extern char *asctime();
+ extern struct tm *localtime();
++#endif
+ #endif
+
+ #ifndef HAS_MEMAVL
diff --git a/cad/spice/patches/patch-ag b/cad/spice/patches/patch-ag
index 025de107519..21b452c9208 100644
--- a/cad/spice/patches/patch-ag
+++ b/cad/spice/patches/patch-ag
@@ -1,20 +1,23 @@
-$NetBSD: patch-ag,v 1.1 1999/10/01 17:05:15 dmcmahill Exp $
+$NetBSD: patch-ag,v 1.2 2002/02/27 17:14:28 jlam Exp $
--- conf/defaults.orig Thu Jul 29 17:33:56 1993
-+++ conf/defaults Wed Sep 29 21:30:44 1999
-@@ -66,5 +66,5 @@
++++ conf/defaults
+@@ -65,7 +65,7 @@
+ # the following definition:
# SYS_DIR = $(DIST_DIR)
-SYS_DIR = $(TOP1)/$(SYSTEM)
+SYS_DIR = $(TOP0)/$(SYSTEM)
# OBJ_TOP is the directory in which intermidiate files reside
-@@ -106,10 +106,10 @@
+ # These are ".o" files, synthesized ".c" files, ".a" files,
+@@ -105,12 +105,12 @@
+ # identified as and SYSTEM is the name of the per-system definitions
# file listed on the "build" command line.
-SPICE_DIR = $(TOP1)/$(SYSTEM)
-SPICE_LIB_DIR = $(SPICE_DIR)/lib
-+SPICE_DIR = ${PREFIX}
++SPICE_DIR = @PREFIX@
+SPICE_LIB_DIR = $(SPICE_DIR)/share/spice3
SPICE_EXEC_DIR = $(SPICE_DIR)/bin
@@ -23,7 +26,9 @@ $NetBSD: patch-ag,v 1.1 1999/10/01 17:05:15 dmcmahill Exp $
+S_SPICE_LIB_DIR = $(S_SPICE_DIR)/share/spice3
S_SPICE_EXEC_DIR= $(S_SPICE_DIR)/bin
-@@ -130,9 +130,9 @@
+ # INSTALL_DIRS lists the directories that need to be created before
+@@ -129,11 +129,11 @@
+ # an extra definition to work around the same strange bug. See either
# file "conf/vax" or "conf/gcc".
-CC = cc
@@ -35,17 +40,22 @@ $NetBSD: patch-ag,v 1.1 1999/10/01 17:05:15 dmcmahill Exp $
+CC_OPT = -O2 -pipe
# CC_OPT_SAFE: Special compile options to override CC_OPT for code
-@@ -204,5 +204,5 @@
+ # which typically causes problems for most compilers (bsim1 and bsim2).
+@@ -203,7 +203,7 @@
+ # X_DIR indicates the top of the X11 lib/include hierarchy; it is only
# a convenience that is used in the following definitions.
-X_DIR = /usr
-+X_DIR = ${X11BASE}
++X_DIR = @BUILDLINK_X11_DIR@
# INCX lists the X include directories. This may be different between
-@@ -219,5 +219,5 @@
+ # MIT X11r5, X11r4, and your vendor's version of X11, though listing
+@@ -218,7 +218,7 @@
+ # which is not available with all versions of X11. If you do not have
# it, then you do not need it (delete the following reference to it).
-LIBX = -L$(X_DIR)/lib -lXaw -lXt -lXext -lXmu -lX11
-+LIBX = -L$(X_DIR)/lib -Wl,-R$(X_DIR)/lib -lXaw -lXt -lXext -lXmu -lSM -lICE -lX11
++LIBX = -L$(X_DIR)/lib -Wl,-R@X11BASE@/lib -lXaw -lXt -lXext -lXmu -lSM -lICE -lX11
+