blob: ca584629d38478c3d60650f3c8d434954f776be0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
# Created by: Julian Jenkins <kaveman@magna.com.au>
# $FreeBSD$
PORTNAME= spice
PORTVERSION= 3f5.2
PORTREVISION= 11
CATEGORIES= cad
MASTER_SITES= http://embedded.eecs.berkeley.edu/pubs/downloads/spice/:srcs \
http://www-device.eecs.berkeley.edu/~bsim/Files/BSIM3/ftpv330/src/:bsim3 \
http://www-device.eecs.berkeley.edu/~bsim/Files/BSIM4/BSIM480/:bsim4 \
http://home.hiroshima-u.ac.jp/usdl/HiSIM2/:hisim2 \
LOCAL/hrs/${PORTNAME}:docs
DISTFILES= spice3f5${EXTRACT_SUFX}:srcs \
BSIM3v330.tar.Z:bsim3 \
BSIM480_Code.zip:bsim4 \
HiSIM_2.8.0_Release_20140605.zip:hisim2 \
cp.ps:docs toc.ps:docs doc.ps:docs
DIST_SUBDIR= spice
EXTRACT_ONLY= spice3f5${EXTRACT_SUFX}
MAINTAINER= hrs@FreeBSD.org
COMMENT= General-purpose circuit simulation program
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYRIGHT
EXTRACT_DEPENDS= ${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
WRKSRC= ${WRKDIR}/${PORTNAME}3f5
MAKEFILE= ${FILESDIR}/Makefile
CONFIGURE_ENV= CONFIGFILE="${CONFIGFILE}" \
LOCALBASE="${LOCALBASE}"
PORTDOCS= spice3f3.ps.gz
PORTEXAMPLES= bjtnoise.cir bsim1tst.cir bsim2tst.cir diffpair.cir \
diodisto.cir ltra_1.cir ltra_2.cir ltra_3.cir \
mixdisto.cir mos6inv.cir mosamp2.cir mosmem.cir process.mod \
process.pro pz2.cir pzt.cir rc.cir rca3040.cir resnoise.cir \
rtlinv.cir schmitt.cir simplepz.cir
OPTIONS_DEFINE= DOCS EXAMPLES X11 DEV_BSIM3 DEV_BSIM4 DEV_HISIM2
OPTIONS_DEFAULT=DOCS EXAMPLES X11
X11_USE= XORG=x11,xaw,xext,xmu,xt
X11_CONFIGURE_ENV= WITH_X11=yes
DEV_BSIM3_DESC= BSIM3v3 MOS Transistor Model Support
DEV_BSIM4_DESC= BSIM4v4 MOS Transistor Model Support
DEV_HISIM2_DESC= HiSIM2 IGFET Model Support
.include <bsd.port.options.mk>
# Configuration parameters.
CC_OPT= ${CFLAGS}
CONFIGFILE= ${WRKSRC}/conf/FreeBSD
DEVICES=
.for D in BSIM3 BSIM4 HISIM2
. if !empty(PORT_OPTIONS:MDEV_$D)
DEVICES+= ${D:tl}
. endif
.endfor
.if !empty(PORT_OPTIONS:MDEV_BSIM3) || \
!empty(PORT_OPTIONS:MDEV_BSIM4) || \
!empty(PORT_OPTIONS:MDEV_HISIM2)
LICENSE_COMB= multi
LICENSE_FILE_MIT= ${WRKSRC}/COPYRIGHT
.if !empty(PORT_OPTIONS:MDEV_BSIM3) || \
!empty(PORT_OPTIONS:MDEV_BSIM4)
LICENSE+= BSIML
LICENSE_NAME_BSIML= BSIM license
LICENSE_PERMS_BSIML= dist-mirror pkg-mirror auto-accept
.if !empty(PORT_OPTIONS:MDEV_BSIM3)
LICENSE_FILE_BSIML= ${WRKSRC}/src/lib/dev/bsim3/B3TERMS_OF_USE
.else
LICENSE_FILE_BSIML= ${WRKSRC}/src/lib/dev/bsim4/B4TERMS_OF_USE.txt
.endif
.endif
.if !empty(PORT_OPTIONS:MDEV_HISIM2)
LICENSE+= HISIML
LICENSE_NAME_HISIML= HiSIM license
LICENSE_PERMS_HISIML= dist-mirror pkg-mirror auto-accept
LICENSE_FILE_HISIML= ${FILESDIR}/hisim2-license.txt
.endif
.endif
post-extract:
@${DO_NADA}
.if ${PORT_OPTIONS:MDEV_BSIM3}
@${MKDIR} ${WRKSRC}/src/lib/dev/bsim3
${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/BSIM3v330.tar.Z \
-C ${WRKSRC}/src/lib/dev/bsim3
.endif
.if ${PORT_OPTIONS:MDEV_BSIM4}
@${MKDIR} ${WRKSRC}/src/lib/dev/bsim4
${UNZIP_CMD} -qo ${DISTDIR}/${DIST_SUBDIR}/BSIM480_Code.zip \
-d ${WRKSRC}/src/lib/dev/bsim4
.endif
.if ${PORT_OPTIONS:MDEV_HISIM2}
${UNZIP_CMD} -qo ${DISTDIR}/${DIST_SUBDIR}/HiSIM_2.8.0_Release_20140605.zip \
-d ${WRKDIR}
${MV} ${WRKDIR}/HiSIM_2.8.0_Release_20140605/HiSIM_2.8.0_C-Code/hisim2 \
${WRKSRC}/src/lib/dev
.endif
${CONFIGFILE}::
@${SETENV} ${CONFIGURE_ENV} ${MAKE} -f ${MAKEFILE} configure
.for V in CC MAKE CC_OPT DEVICES
@${ECHO_CMD} "${V}=${$V}" >> ${WRKSRC}/conf/FreeBSD
.endfor
do-configure: ${CONFIGFILE}
@${DO_NADA}
post-install:
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
${CAT} ${DISTDIR}/${DIST_SUBDIR}/*.ps | ${GZIP_CMD} > \
${STAGEDIR}${DOCSDIR}/${PORTDOCS}
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
cd ${WRKSRC}/examples && \
${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}
.endif
.include <bsd.port.mk>
|