diff --git a/math/blacs/Makefile b/math/blacs/Makefile index e64916419f10..568c9e324a94 100644 --- a/math/blacs/Makefile +++ b/math/blacs/Makefile @@ -1,105 +1,102 @@ # New ports collection makefile for: blacs # Date created: 5 May 2003 # Whom: NAKATA, Maho # # $FreeBSD$ # PORTNAME= blacs PORTVERSION= 1.7 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= math MASTER_SITES= ftp://ftp.netlib.org/blacs/ DISTNAME= BLACS DISTFILES= mpiblacs.tgz blacstester.tgz mpiblacs-patch03.tgz .if !defined(NOPORTDOCS) DISTFILES+= blacs_install.ps f77blacsqref.ps lawn94.ps \ cblacsqref.ps mpi_prop.ps mpiblacs_issues.ps .endif DIST_SUBDIR= blacs EXTRACT_ONLY= mpiblacs.tgz blacstester.tgz mpiblacs-patch03.tgz MAINTAINER= maho@FreeBSD.org COMMENT= The BLACS (Basic Linear Algebra Communication Subprograms) PKGMESSAGE= ${WRKDIR}/pkg-message SUB_FILES= pkg-message .include .if exists(${LOCALBASE}/mpi/openmpi/bin/mpirun) WITH_OPENMPI= yes .endif .if defined(WITH_OPENMPI) BUILD_DEPENDS= ${LOCALBASE}/mpi/openmpi/lib/libmpi.so:${PORTSDIR}/net/openmpi RUN_DEPENDS= ${LOCALBASE}/mpi/openmpi/bin/mpirun:${PORTSDIR}/net/openmpi EXTRA_PATCHES+= ${FILESDIR}/Bmake.inc-openmpi.diff .else BUILD_DEPENDS= ${LOCALBASE}/mpich2/lib/libmpich.a:${PORTSDIR}/net/mpich2 RUN_DEPENDS= ${LOCALBASE}/mpich2/bin/mpirun:${PORTSDIR}/net/mpich2 EXTRA_PATCHES+= ${FILESDIR}/Bmake.inc-mpich.diff .endif -pre-fetch: - @${ECHO} "If you want to use compiler other than f77," - @${ECHO} "plase set NO_GNUF77=yes" - -F77?= f77 -.if !defined(NO_GNUF77) -F77EXTRAFLAGS= -w -fno-globals -fugly-complex -.endif +WANT_FORTRAN=yes +USE_GCC=4.2+ +MAKE_ENV= "FC=${FC}" "F77=${F77}" +USE_GMAKE=yes +F77EXTRAFLAGS= #-w -fno-globals -fugly-complex DEBUG_LEVEL= 0 .if defined(WITH_OPTIMIZED_FLAGS) .if ${ARCH} == "amd64" FFLAGS+= -pipe -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time CFLAGS+= -pipe -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time .elif ${ARCH} == "i386" FFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -mcpu=i686 -march=i686 -mfancy-math-387 -mpreferred-stack-boundary=3 CFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -mcpu=i686 -march=i686 -mfancy-math-387 -mpreferred-stack-boundary=3 .else FFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -Wno-multichar CFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -Wno-multichar .endif .endif pre-patch: (${CP} ${WRKSRC}/BMAKES/Bmake.MPI-LINUX ${WRKSRC}/Bmake.inc) pre-configure: (${REINPLACE_CMD} -e 's,@WRKSRC@,${WRKSRC},g ; s,@DEBUG_LEVEL@,${DEBUG_LEVEL},g ; s,@LOCALBASE@,${LOCALBASE},g ; s,@CC@,${CC},g ; s,@CFLAGS@,${CFLAGS},g ; s,@F77@,${F77},g ; s,@FFLAGS@,${FFLAGS},g ; s,@F77EXTRAFLAGS@,${F77EXTRAFLAGS},g ; s, ARCH *.= ar, ARCMD = ar,' ${WRKSRC}/Bmake.inc) ${REINPLACE_CMD} -e 's|\$$(ARCH)|$$(ARCMD)|' ${WRKSRC}/SRC/MPI/Makefile .if ${OSVERSION} < 500000 ${REINPLACE_CMD} -e 's|F77LOADFLAGS = |F77LOADFLAGS = ${PTHREAD_LIBS}|' ${WRKSRC}/Bmake.inc .endif do-build: (cd ${WRKSRC}; make mpi; make tester) do-install: ${INSTALL_DATA} ${WRKSRC}/LIB/blacsCinit_MPI-FreeBSD-${DEBUG_LEVEL}.a ${PREFIX}/lib/libblacsc.a ${INSTALL_DATA} ${WRKSRC}/LIB/blacsF77init_MPI-FreeBSD-${DEBUG_LEVEL}.a ${PREFIX}/lib/libblacsf77.a ${INSTALL_DATA} ${WRKSRC}/LIB/blacs_MPI-FreeBSD-${DEBUG_LEVEL}.a ${PREFIX}/lib/libblacs.a ${MKDIR} ${PREFIX}/share/BLACS/TESTING ( cd ${WRKSRC}/TESTING/EXE ; \ ${INSTALL_PROGRAM} xCbtest_MPI-FreeBSD-${DEBUG_LEVEL} ${PREFIX}/share/BLACS/TESTING/xCbtest_MPI-FreeBSD; \ ${INSTALL_PROGRAM} xFbtest_MPI-FreeBSD-${DEBUG_LEVEL} ${PREFIX}/share/BLACS/TESTING/xFbtest_MPI-FreeBSD; \ ${INSTALL_DATA} bsbr.dat ${PREFIX}/share/BLACS/TESTING; \ ${INSTALL_DATA} bt.dat ${PREFIX}/share/BLACS/TESTING; \ ${INSTALL_DATA} comb.dat ${PREFIX}/share/BLACS/TESTING; \ ${INSTALL_DATA} sdrv.dat ${PREFIX}/share/BLACS/TESTING) .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} ${CAT} ${DISTDIR}/${DIST_SUBDIR}/blacs_install.ps | ${GZIP_CMD} > ${DOCSDIR}/blacs_install.ps.gz ${CAT} ${DISTDIR}/${DIST_SUBDIR}/cblacsqref.ps | ${GZIP_CMD} > ${DOCSDIR}/cblacsqref.ps.gz ${CAT} ${DISTDIR}/${DIST_SUBDIR}/f77blacsqref.ps | ${GZIP_CMD} > ${DOCSDIR}/f77blacsqref.ps.gz ${CAT} ${DISTDIR}/${DIST_SUBDIR}/lawn94.ps | ${GZIP_CMD} > ${DOCSDIR}/lawn94.ps.gz ${CAT} ${DISTDIR}/${DIST_SUBDIR}/mpi_prop.ps | ${GZIP_CMD} > ${DOCSDIR}/mpi_prop.ps.gz ${CAT} ${DISTDIR}/${DIST_SUBDIR}/mpiblacs_issues.ps | ${GZIP_CMD} > ${DOCSDIR}/mpiblacs_issues.ps.gz .endif post-install: @${CAT} ${PKGMESSAGE} .include diff --git a/math/blacs/files/Bmake.inc-mpich.diff b/math/blacs/files/Bmake.inc-mpich.diff index 1b6f547a9a87..c4d362b8d6b0 100644 --- a/math/blacs/files/Bmake.inc-mpich.diff +++ b/math/blacs/files/Bmake.inc-mpich.diff @@ -1,64 +1,75 @@ --- Bmake.inc.orig Mon May 5 10:53:00 2003 +++ Bmake.inc Mon May 5 10:58:38 2003 @@ -13,7 +13,7 @@ # ----------------------------- # The top level BLACS directory # ----------------------------- - BTOPdir = $(HOME)/BLACS + BTOPdir = @WRKSRC@ # --------------------------------------------------------------------------- # The communication library your BLACS have been written for. @@ -32,14 +32,14 @@ # ------------------------------------------------------------- # The platform identifier to suffix to the end of library names # ------------------------------------------------------------- - PLAT = LINUX + PLAT = FreeBSD # ---------------------------------------------------------- # Name and location of the BLACS library. See section 2 for # details on BLACS debug level (BLACSDBGLVL). # ---------------------------------------------------------- BLACSdir = $(BTOPdir)/LIB - BLACSDBGLVL = 0 + BLACSDBGLVL = @DEBUG_LEVEL@ BLACSFINIT = $(BLACSdir)/blacsF77init_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a BLACSCINIT = $(BLACSdir)/blacsCinit_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a BLACSLIB = $(BLACSdir)/blacs_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a @@ -47,10 +47,10 @@ # ------------------------------------- # Name and location of the MPI library. # ------------------------------------- - MPIdir = /usr/local/mpich + MPIdir = @LOCALBASE@/mpich2 MPILIBdir = $(MPIdir)/lib/ MPIINCdir = $(MPIdir)/include - MPILIB = $(MPILIBdir)/libmpich.a + MPILIB = $(MPILIBdir)/libmpich.a # ------------------------------------- # All libraries required by the tester. @@ -195,16 +195,15 @@ # optimization. This is the F77NO_OPTFLAG. The usage of the remaining # macros should be obvious from the names. #============================================================================= - F77 = g77 - F77NO_OPTFLAGS = - F77FLAGS = $(F77NO_OPTFLAGS) -O - F77LOADER = $(F77) + F77 = @F77@ + F77NO_OPTFLAGS = @F77EXTRAFLAGS@ + F77FLAGS = @FFLAGS@ + F77LOADER = @F77@ F77LOADFLAGS = - CC = gcc - CCFLAGS = -O4 + CC = @CC@ + CCFLAGS = @CFLAGS@ CCLOADER = $(CC) CCLOADFLAGS = - # -------------------------------------------------------------------------- # The archiver and the flag(s) to use when building an archive (library). # Also the ranlib routine. If your system has no ranlib, set RANLIB = echo. +--- Bmake.inc~ Wed Jan 10 16:11:00 2007 ++++ Bmake.inc Wed Jan 10 16:18:08 2007 +@@ -93,7 +93,7 @@ + # setting for your platform, compile and run BLACS/INSTALL/xintface. + # Choices are: Add_, NoChange, UpCase, or f77IsF2C. + # --------------------------------------------------------------------------- +- INTFACE = -Df77IsF2C ++ INTFACE = -DAdd_ + + # ------------------------------------------------------------------------ + # Allows the user to vary the topologies that the BLACS default topologies