aboutsummaryrefslogtreecommitdiffstats
path: root/biology/molden/Makefile
blob: 47b601da582fddf60f0926fd76913bdb7aee4b74 (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
# Created by: Ryo MIYAMOTO <rmiya@cc.hirosaki-u.ac.jp>
# $FreeBSD$

PORTNAME=   molden
PORTVERSION=    5.0.6
PORTEPOCH=  1
CATEGORIES= biology
MASTER_SITES=   ftp://ftp.cmbi.ru.nl/pub/molgraph/molden/
DISTNAME=   ${PORTNAME}${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Display molecular orbitals and electron densities in 2D and 3D

RESTRICTED= free for academic, non profit usage; do not re-distribute source and executable.

OPTIONS_DEFINE= DATA DOCS
OPTIONS_DEFAULT=DATA

WRKSRC=     ${WRKDIR}/${PORTNAME}${PORTVERSION:R}

USE_XORG=   x11
USE_GL=     glu
USE_FORTRAN=    yes
USE_GMAKE=  yes
MAKEFILE=   makefile
MAKE_JOBS_UNSAFE=yes

CFLAGS+=    -D${OPSYS:U} -DDOBACK -DHASTIMER -DCOLOR_OFFSET=0.0

PORTDOCS=   *
PORTDATA=   *
PLIST_FILES=    bin/ambfor bin/gmolden bin/molden bin/surf

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

post-patch:
    @${REINPLACE_CMD} -e \
        's|^CC |#CC | ; \
         s|^FC |#FC | ; \
         s|/usr/X11R6|${LOCALBASE}| ; \
         s|-lXmu|| ; \
         /depend/s|^|#|' ${WRKSRC}/makefile

post-configure:
    @${ECHO_MSG} "********************"
    @${ECHO_MSG} "**  If you want to use a larger MOLDEN,"
    @${ECHO_MSG} "**  edit change_parameter.sh and run it,"
    @${ECHO_MSG} "**  before \'make build\'."
    @${ECHO_MSG} "********************"

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/molden ${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/gmolden ${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/ambfor/ambfor ${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/surf/surf ${PREFIX}/bin
.if ${PORT_OPTIONS:MDATA}
    @${MKDIR} ${DATADIR}/test
    ${INSTALL_DATA} ${WRKSRC}/test/* ${DATADIR}/test
    @${MKDIR} ${DATADIR}/utils
    ${INSTALL_DATA} ${WRKSRC}/utils/* ${DATADIR}/utils
.endif
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
.endif

.include <bsd.port.mk>