summaryrefslogtreecommitdiffstats
path: root/biology/gaussian98/Makefile
blob: 8f53b7def95f3bd03509ce7eec8185b45a956eb2 (plain)
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
69
70
71
72
73
# New ports collection makefile for:	gaussian98
# Date created:		Feb 10 2001
# Whom:			NAKATA, Maho <chat95@mbox.kyoto-inet.or.jp>
#
# $FreeBSD$
#

PORTNAME=	gaussian98
PORTVERSION=	1.0.7
CATEGORIES=	biology
MASTER_SITES=	file:${CD_MOUNTPT}/TAR/
DISTNAME=	WKSSRC
EXTRACT_SUFX=	.TAR

MAINTAINER=	chat95@mbox.kyoto-inet.or.jp

LIB_DEPENDS=	blas:${PORTSDIR}/math/blas

USE_GMAKE=	yes
INSTALLS_SHLIB=	yes
WRKSRC=		${WRKDIR}/g98

NO_CDROM=	"You must purchase a licensed copy from Gaussian inc."
NO_PACKAGE=	"You must purchase a licensed copy from Gaussian inc."
RESTRICTED=	"You must purchase a licensed copy from Gaussian inc."

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 400013
USE_NEWGCC=	yes
F77?=		g77
.else
F77?=		f77
.endif

post-extract:
	${RM} ${DISTDIR}/${DISTFILES}

post-patch:
	@${SED} -e s+@PREFIX@+${PREFIX}+ ${FILESDIR}/gaussian98  > ${WRKSRC}/gaussian98
	@${ECHO} "You can override and FFLAGS on the command line."
	@${ECHO} "Following is an recommended one."
	@${ECHO} "make FFLAGS=\"-malign-double -fexpensive-optimizations -O4 -ffast-math -funroll-loops\""

MAKE_ENV=	"GMAKE=${GMAKE} F77=${F77} PREFIX=${PREFIX}"

do-build:
	(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} csh ./bsd/bldg98)

do-install:
	@${MKDIR} ${PREFIX}/bin/g98/bsd \
	 	  ${PREFIX}/share/gaussian98/explore/examples \
	 	  ${PREFIX}/share/gaussian98/explore/exercise \
		  ${PREFIX}/share/gaussian98/explore/quick
	@(cd ${WRKSRC}/bsd; \
	  ${INSTALL_SCRIPT} gau-unlimit set-mflags g98.login \
		${PREFIX}/bin/g98/bsd; \
	  cd ${WRKSRC}; \
	  ${INSTALL_PROGRAM} gauopt ghelp newzmat testrt cubegen cubman \
		c8698 ham506 cktoig rwfdump chkmove freqchk freqmem formchk \
		demofc chkchk pluck unfchk g98 *.exe gau-machine \
		${PREFIX}/bin/g98; \
	  ${INSTALL_SCRIPT} gaussian98 ${PREFIX}/bin; \
	  ${INSTALL_DATA} ${WRKSRC}/libgauutil.so.1 ${PREFIX}/lib; \
	  cd ${PREFIX}/lib; ${LN} -sf libgauutil.so.1 libgauutil.so; \
	  cd ${WRKSRC}/explore/examples; \
	  ${INSTALL_DATA} * ${PREFIX}/share/gaussian98/explore/examples; \
	  cd ${WRKSRC}/explore/exercise; \
	  ${INSTALL_DATA} *  ${PREFIX}/share/gaussian98/explore/exercise; \
	  cd ${WRKSRC}/explore/quick; \
	  ${INSTALL_DATA} * ${PREFIX}/share/gaussian98/explore/quick)

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud