aboutsummaryrefslogtreecommitdiffstats
path: root/science/fastcap/Makefile
blob: 34051281d94aae65d3db6c44f4e1efb8ff10dd86 (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
# New ports collection makefile for:    FastCap
# Date created:     5 Jan 2006
# Whom:         Pedro Giffuni <giffunip@asme.org>
#
# $FreeBSD$
#

PORTNAME=   fastcap
DISTVERSION=    2.0wr-011109
CATEGORIES= science cad
MASTER_SITES=   http://www.wrcad.com/ftp/pub/ LOCAL/bf

MAINTAINER= bf@FreeBSD.org
COMMENT=    A three-dimensional capacitance extraction program

HAS_CONFIGURE=  yes
CONFIGURE_SCRIPT=   config
WRKSRC =    ${WRKDIR}/fastcap-2.0wr

BINFILES=   busgen capgen cubegen fastcap pipedgen pyragen

post-patch:
    @${REINPLACE_CMD} -e 's,TYPE=other,TYPE=4,' \
        ${WRKSRC}/config
    @${REINPLACE_CMD} -Ee '/CFLAGS =/{s/=/+=/;s/-O[[:digit:]]*//;}' \
        ${WRKSRC}/src/Makefile.4
#minimal changes to fix the clang build (there should be a more thorough
#clean-up, to correct types of functions, remove implicit declarations, fix
#formatting, add missing returns, etc.)
    @${REINPLACE_CMD} -E -e 's,^mul(Up|Down),void &,' \
        ${WRKSRC}/src/mulDo.c
    @${REINPLACE_CMD} -e 's,^mulMatUp,void &,' \
        ${WRKSRC}/src/mulMats.c
    @${REINPLACE_CMD} -e 's,^static getnbrs,static void getnbrs,' \
        ${WRKSRC}/src/mulSetup.c

do-install:
.for b in ${BINFILES}
    @${INSTALL_PROGRAM} ${WRKSRC}/bin/${b} ${PREFIX}/bin/
.endfor
.if !defined(NOPORTEXAMPLES)
    ${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR}
.endif
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${CAT} ${WRKSRC}/README ${WRKSRC}/README.mit > ${DOCSDIR}/readme
    ${INSTALL_DATA} ${WRKSRC}/doc/*.ps ${DOCSDIR}
    ${GZIP_CMD} ${DOCSDIR}/*
.endif

.include <bsd.port.mk>