aboutsummaryrefslogtreecommitdiffstats
path: root/cad/magic/Makefile
blob: 7082f384a5f3197ddebe7a8b2e0354e02a9b74f9 (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
# New ports collection makefile for:    magic
# Date created:         18 Dec 1994
# Whom:                 swallace
#
# $FreeBSD$
#

PORTNAME=   magic
PORTVERSION=    7.5.220
CATEGORIES= cad
MASTER_SITES=   http://opencircuitdesign.com/magic/archive/ \
        http://fossies.org/linux/misc/
EXTRACT_SUFX=   .tgz

MAINTAINER= ports@FreeBSD.org
COMMENT=    An interactive editor for VLSI layouts

LICENSE=    BSD

LIB_DEPENDS=    BLT24.3:${PORTSDIR}/x11-toolkits/blt

CONFIGURE_WRKSRC=   ${WRKSRC}/scripts

USE_XORG=   ice xext xi xmu
USE_GL=     gl
USE_TCL_BUILD=  yes
USE_TK_BUILD=   yes
USE_TCL=    yes
USE_TK=     yes
USE_GMAKE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-tcl=${TCL_LIBDIR} --with-tk=${TK_LIBDIR}
ALL_TARGET= tcllibrary
MAKE_JOBS_SAFE=yes

MAN1=       ext2sim.1 ext2spice.1 extcheck.1 magic.1
MAN5=       cmap.5 displays.5 dlys.5 dstyle.5 ext.5 glyphs.5 mag.5 \
        net.5 sim.5

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

PORTSCOUT=  limit:^7\.

.include <bsd.port.pre.mk>

post-patch:
    @${REINPLACE_CMD} -e \
        's|^#!.*|#!${AWK} -f|' ${WRKSRC}/ext2spice/spice2sim
    @${REINPLACE_CMD} -e \
        's|TCL_LIB_NAME=.*|TCL_LIB_NAME="tcl${TCL_VER:S/.//}"|g ; \
         s|TK_LIB_NAME=.*|TK_LIB_NAME="tk${TK_VER:S/.//}"|g ; \
         s|wish$${TK_VERSION}|${WISH:T}|g ; \
         s|tclsh$${TK_VERSION}|${TCLSH:T}|g ; \
         s|-l/usr/X11R6/include|-I${LOCALBASE}/include|g' ${CONFIGURE_WRKSRC}/configure
    @${REINPLACE_CMD} -e \
        '/CFLAGS/s| -pg | |' ${WRKSRC}/tcltk/Makefile
    @${REINPLACE_CMD} -e \
        's|^#!.*|#!${TCLSH}|' ${WRKSRC}/tcltk/strip_reflibs.tcl
    @${REINPLACE_CMD} -e \
        's|^#!.*|#!${WISH}|' ${WRKSRC}/tcltk/tkshell.tcl

pre-build:
    @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
        ${MAKEFILE} ${MAKE_ARGS} database/database.h)

.include <bsd.port.post.mk>