aboutsummaryrefslogtreecommitdiffstats
path: root/cad/irsim/Makefile
blob: 3c1463665b59d8f9e5b081f57925fa0e857762be (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
# Created by: swallace
# $FreeBSD$

PORTNAME=   irsim
PORTVERSION=    9.7.81
CATEGORIES= cad
MASTER_SITES=   http://opencircuitdesign.com/irsim/archive/
EXTRACT_SUFX=   .tgz

MAINTAINER= danilogondolfo@gmail.com
COMMENT=    Event-driven logic-level simulator for MOS circuis

LICENSE=    GPLv2

OPTIONS_RADIO=  INTERPRETER
OPTIONS_RADIO_INTERPRETER=  SCHEME TCL
OPTIONS_DEFAULT=    SCHEME
SCHEME_DESC=    Scheme interpreter
TCL_DESC=   Tcl interpreter
OPTIONS_SUB=    yes

SCHEME_CONFIGURE_ON=    --with-interpreter=scheme
TCL_CONFIGURE_ON=   --with-interpreter=tcl --with-tcl=${TCL_LIBDIR} \
            --with-tk=${TK_LIBDIR} --with-tclincls=${TCL_INCLUDEDIR} \
            --with-tkincls=${TK_INCLUDEDIR} --with-tcllibs=${LOCALBASE}/lib \
            --with-tklibs=${LOCALBASE}/lib

CONFIGURE_WRKSRC=   ${WRKSRC}/scripts

USES=   gmake
USE_XORG=   x11
GNU_CONFIGURE=  yes

CFLAGS+=    -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

MAN1=       irsim.1
MAN3=       irsim-analyzer.3
MAN5=       netchange.5

NO_STAGE=   yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MTCL}
USE_TK_BUILD=   yes
USE_TK=     yes
PLIST_SUB+= NOTCL="@comment "
.else
WISH=       ${FALSE}
PLIST_SUB+= NOTCL=""
.endif

.if empty(PORT_OPTIONS:MSCHEME) && empty(PORT_OPTIONS:MTCL)
CONFIGURE_ARGS+=    --with-interpreter=no
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        's|FreeBSD-\*|*-*-freebsd*| ; \
         s|wish |${WISH:T} | ; \
         s|"-fpic"|"-fPIC"| ; \
         /-l\/usr\/X11R6\/include/d' ${CONFIGURE_WRKSRC}/configure

.include <bsd.port.mk>