* Add dummy knob WANT_FORTRAN for future gfortran

migration. currently it is not buildable with gfrotran42.
* Honor FC and FFLAGS.
This commit is contained in:
Maho Nakata 2007-01-09 02:37:43 +00:00
parent 1aefb8052d
commit 602b708bfb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=181827
2 changed files with 147 additions and 127 deletions

View file

@ -15,9 +15,20 @@ EXTRACT_SUFX= .tar.Z
MAINTAINER= ports@FreeBSD.org MAINTAINER= ports@FreeBSD.org
COMMENT= Plotting wavefunctions (molecular orbitals) in 3D COMMENT= Plotting wavefunctions (molecular orbitals) in 3D
.include <bsd.port.pre.mk>
WANT_FORTRAN= yes #dummy
#currently not buildable with gfortran.
#assume FreeBSD7 won't ship with f77 nor gfortran.
.if ${OSVERSION} >= 700000
USE_GCC= 3.4
.endif
pre-patch: pre-patch:
${MV} ${WRKSRC}/src/makefile ${WRKSRC}/src/Makefile ${MV} ${WRKSRC}/src/makefile ${WRKSRC}/src/Makefile
post-patch:
@${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g' -e 's+%%FFLAGS%%+${FFLAGS}+g' -e 's+%%LOCALBASE%%+${LOCALBASE}+g' ${WRKSRC}/src/Makefile
pre-build: pre-build:
${CP} ${FILESDIR}/Makefile.top ${WRKSRC}/Makefile ${CP} ${FILESDIR}/Makefile.top ${WRKSRC}/Makefile
@ -35,4 +46,4 @@ post-install:
@${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/examples/* ${PREFIX}/share/doc/psi88/examples @${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/examples/* ${PREFIX}/share/doc/psi88/examples
.endif .endif
.include <bsd.port.mk> .include <bsd.port.post.mk>

View file

@ -1,126 +1,135 @@
*** src/Makefile.orig Fri May 24 21:04:15 1991 --- src/Makefile.orig Sat May 25 04:04:15 1991
--- src/Makefile Mon Jun 14 23:41:50 1999 +++ src/Makefile Tue Jan 9 11:30:09 2007
*************** @@ -27,11 +27,11 @@
*** 27,37 **** # level and when it is working, increase the optimization level. So far
# level and when it is working, increase the optimization level. So far # optimization has never caused problems with this program.
# optimization has never caused problems with this program. #
# -# SGI 4D series flags
! # SGI 4D series flags +# FreeBSD
# #
f77 = f77 -f77 = f77
! FFLAGS = -w0 -O4 -G 64 -FFLAGS = -w0 -O4 -G 64
! LFLAGS = -lfastm -lfpe -s -LFLAGS = -lfastm -lfpe -s
# +FC = %%FC%%
# SUN Sparc series flags version 1.3 or later compiler +FFLAGS = %%FFLAGS%%
# +#LFLAGS = -lfastm -lfpe -s
--- 27,43 ---- #
# level and when it is working, increase the optimization level. So far # SUN Sparc series flags version 1.3 or later compiler
# optimization has never caused problems with this program. #
# @@ -60,12 +60,12 @@
! # FreeBSD # Place your G88/G90 util library definition here if you wish to
# # compile chk2psi
f77 = f77 #
! FFLAGS = -O3 -Wall -G90LIB = /usr/people/frisch/g90/libg90.a
! LFLAGS = +#G90LIB = /usr/people/frisch/g90/libg90.a
! # #
! # SGI 4D series flags # define the directory where the executables will reside
! # # usually /usr/local/bin or ~/bin to put it in your own directory
! #f77 = f77 #
! #FFLAGS = -w0 -O4 -G 64 -BIN = /usr/local/bin
! #LFLAGS = -lfastm -lfpe -s +BIN = %%PREFIX%%/bin
# #
# SUN Sparc series flags version 1.3 or later compiler #**** Add PSI2 to this and the install lists if you have a user defined
# # Plotting library to plot to the screen, also remove any which you
*************** @@ -84,13 +84,15 @@
*** 60,71 **** #######################################################################
# Place your G88/G90 util library definition here if you wish to #
# compile chk2psi
# - all: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT chk2psi $(EXTRAS)
! G90LIB = /usr/people/frisch/g90/libg90.a +# all: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT chk2psi $(EXTRAS)
# + all: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT $(EXTRAS)
# define the directory where the executables will reside
# usually /usr/local/bin or ~/bin to put it in your own directory #
# # Install in the executable directory - may need to be superuser
! BIN = /usr/local/bin # depending on where you decide to put it (/usr/local/bin for instance)
# #
#**** Add PSI2 to this and the install lists if you have a user defined -install: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT chk2psi $(EXTRAS)
# Plotting library to plot to the screen, also remove any which you +#install: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT chk2psi $(EXTRAS)
--- 66,77 ---- +install: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT $(EXTRAS)
# Place your G88/G90 util library definition here if you wish to mv PSI1 $(BIN)
# compile chk2psi chmod +rx $(BIN)/PSI1
# mv PSICON $(BIN)
! #G90LIB = /usr/people/frisch/g90/libg90.a @@ -99,71 +101,71 @@
# chmod +rx $(BIN)/PREPLOT
# define the directory where the executables will reside mv PSI2* $(BIN)
# usually /usr/local/bin or ~/bin to put it in your own directory chmod +rx $(BIN)/PSI2*
# - mv chk2psi $(BIN)
! BIN = $(PREFIX)/bin - chmod +rx $(BIN)/chk2psi
# +# mv chk2psi $(BIN)
#**** Add PSI2 to this and the install lists if you have a user defined +# chmod +rx $(BIN)/chk2psi
# Plotting library to plot to the screen, also remove any which you
*************** #
*** 84,96 **** # This is the Density matrix generation program (PSI1/88)
####################################################################### #
# PSI1: psi1.f
- f77 $(FFLAGS) psi1.f -o PSI1 $(LFLAGS)
! all: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT chk2psi $(EXTRAS) + %%FC%% $(FFLAGS) psi1.f -o PSI1 $(LFLAGS)
# #
# Install in the executable directory - may need to be superuser # This is the contour generation program (PSICON/88)
# depending on where you decide to put it (/usr/local/bin for instance) #
# PSICON: psicon.f
! install: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT chk2psi $(EXTRAS) - f77 $(FFLAGS) psicon.f -o PSICON $(LFLAGS)
mv PSI1 $(BIN) + %%FC%% $(FFLAGS) psicon.f -o PSICON $(LFLAGS)
chmod +rx $(BIN)/PSI1
mv PSICON $(BIN) #
--- 90,104 ---- # This is for the plotting routine (PSI2/88) to a user defined graphics lib
####################################################################### #
# PSI2: psi2.f
- f77 $(FFLAGS) psi2.f -o PSI2 $(GRLIBS) $(LFLAGS)
! # all: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT chk2psi $(EXTRAS) + %%FC%% $(FFLAGS) psi2.f -o PSI2 $(GRLIBS) $(LFLAGS)
! all: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT $(EXTRAS)
#
# # This is for the plotting routine set up to plot to a GKS device
# Install in the executable directory - may need to be superuser # gksplot.f is a gks library that SHOULD work on any machine.....
# depending on where you decide to put it (/usr/local/bin for instance) #
# PSI2GKS: psi2.f gksplot.f
! #install: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT chk2psi $(EXTRAS) - f77 $(FFLAGS) psi2.f gksplot.f -o PSI2GKS $(LFLAGS) $(GKSLIB)
! install: PSI1 PSICON PSI2CT PSI2HP PSI2PS PREPLOT $(EXTRAS) + %%FC%% $(FFLAGS) psi2.f gksplot.f -o PSI2GKS $(LFLAGS) $(GKSLIB)
mv PSI1 $(BIN)
chmod +rx $(BIN)/PSI1 #
mv PSICON $(BIN) # This is for the plotting routine set up to plot to a ChemText Metafile
*************** #
*** 99,106 **** PSI2CT: psi2.f ctplot.f
chmod +rx $(BIN)/PREPLOT - f77 $(FFLAGS) psi2.f ctplot.f -o PSI2CT $(LFLAGS)
mv PSI2* $(BIN) + %%FC%% $(FFLAGS) psi2.f ctplot.f -o PSI2CT $(LFLAGS)
chmod +rx $(BIN)/PSI2*
! mv chk2psi $(BIN) #
! chmod +rx $(BIN)/chk2psi # This is for the plotting routine set up to plot to a PostScript device
# psplot.f is a postscript library that SHOULD work on any machine.....
# #
# This is the Density matrix generation program (PSI1/88) PSI2PS: psi2.f psplot.f
--- 107,115 ---- - f77 $(FFLAGS) psi2.f psplot.f -o PSI2PS $(LFLAGS)
chmod +rx $(BIN)/PREPLOT + %%FC%% $(FFLAGS) psi2.f psplot.f -o PSI2PS $(LFLAGS)
mv PSI2* $(BIN)
chmod +rx $(BIN)/PSI2* #
! # This is for the plotting routine set up to plot to a HP plotter
! # mv chk2psi $(BIN) # hpplot.f is a HP plotter library that SHOULD work on any machine.....
! # chmod +rx $(BIN)/chk2psi #
PSI2HP: psi2.f hpplot.f
# - f77 $(FFLAGS) psi2.f hpplot.f -o PSI2HP $(LFLAGS)
# This is the Density matrix generation program (PSI1/88) + %%FC%% $(FFLAGS) psi2.f hpplot.f -o PSI2HP $(LFLAGS)
***************
*** 164,169 **** #
# Clean up when done # This is a program to convert MOPAC .GPT files (using the graph keyword)
# # to PSI/88 input files.
clean : #
! touch a.out foo.o core foo.u foo.f17 foo.22 PREPLOT: preplot.f
rm -f a.out *.o core *.u *.f17 *.f2* - f77 $(FFLAGS) preplot.f -o PREPLOT $(LFLAGS)
+ %%FC%% $(FFLAGS) preplot.f -o PREPLOT $(LFLAGS)
--- 173,178 ----
# Clean up when done #
# # This is a program to read checkpoint files -
clean : #
! touch a.out foo.o core foo.u foo.f17 foo.22 chk2psi: chk2psi.f $(G90LIB)
rm -f a.out *.o core *.u *.f17 *.f2* - f77 $(FFLAGS) chk2psi.f $(G90LIB) -o chk2psi $(LFLAGS)
+ %%FC%% $(FFLAGS) chk2psi.f $(G90LIB) -o chk2psi $(LFLAGS)
#
# Clean up when done
#
clean :
- touch a.out foo.o core foo.u foo.f17 foo.22
+ touch a.out foo.o core foo.u foo.f17 foo.22
rm -f a.out *.o core *.u *.f17 *.f2*