aboutsummaryrefslogtreecommitdiffstats
path: root/biology/povchem/Makefile
blob: 0c9c15d20572466c54b9bfad4cc35feb7f8cfe27 (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
# New ports collection Makefile for: povchem
# Date created:         Mar 14 1998
# Whom:                 frankch@waru.life.nthu.edu.tw
#
# $FreeBSD$
#

PORTNAME=   povchem
PORTVERSION=    1.0
PORTREVISION=   1
CATEGORIES= biology graphics
MASTER_SITES=   http://www.chemicalgraphics.com/paul/PC_Dist/v1.00/
DISTFILES=  povchem.c \
        povchem.cfg \
        periodic.tab

MAINTAINER= frankch@waru.life.nthu.edu.tw

NO_WRKSUBDIR=   yes
DIST_SUBDIR=    povchem

DEFS=       -DDATADIR=\"${PREFIX}/share/povchem\" \
        -DSYSCONFDIR=\"${PREFIX}/etc\"

do-extract:
    @${MKDIR} ${WRKSRC}
.for file in ${DISTFILES}
    @${CP} ${_DISTDIR}/${file} ${WRKSRC}
.endfor

post-patch:
    @${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/povchem.cfg
    @${PERL} -pi -e "s|%%X11BASE%%|${X11BASE}|g" ${WRKSRC}/povchem.cfg

do-build:
    cd ${WRKSRC} && ${CC} ${CFLAGS} ${DEFS} -o povchem povchem.c -lm

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/povchem ${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/povchem.cfg ${PREFIX}/etc
    @${MKDIR} ${PREFIX}/share/povchem
    ${INSTALL_DATA} ${WRKSRC}/periodic.tab ${PREFIX}/share/povchem

.include <bsd.port.mk>