summaryrefslogtreecommitdiff
path: root/math/lapack95
diff options
context:
space:
mode:
Diffstat (limited to 'math/lapack95')
-rw-r--r--math/lapack95/Makefile37
-rw-r--r--math/lapack95/files/patch-make.inc7
2 files changed, 19 insertions, 25 deletions
diff --git a/math/lapack95/Makefile b/math/lapack95/Makefile
index 68eeff50b25a..88f781c2c512 100644
--- a/math/lapack95/Makefile
+++ b/math/lapack95/Makefile
@@ -13,12 +13,23 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= LAPACK95, Fortran90/95 wrapper for LAPACK
USES= fortran tar:tgz
+
+OPTIONS_RADIO= BLAS
+OPTIONS_RADIO_BLAS= REFERENCE ATLAS
+OPTIONS_DEFAULT= REFERENCE
+
+REFERENCE_DESC= Blas / Lapack
+REFERENCE_USES= blaslapack:netlib
+
+ATLAS_DESC= ATLAS
+ATLAS_USES= blaslapack:atlas
+
USE_LDCONFIG= yes
WRKSRC= ${WRKDIR}/LAPACK95
MAKE_JOBS_UNSAFE=yes
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
.if ${ARCH} == "sparc64"
PICFLAG?= -fPIC
@@ -26,32 +37,15 @@ PICFLAG?= -fPIC
PICFLAG?= -fpic
.endif
-.if exists(${LOCALBASE}/lib/libatlas.so)
-WITH_BLAS?= atlas
-.else
-WITH_BLAS?= reference
-.endif
-
-.if ${WITH_BLAS} == atlas
-LIB_DEPENDS+= libatlas.so:${PORTSDIR}/math/atlas
-BLAS= -lf77blas
-LAPACK= -lalapack -lcblas
-.else
-LIB_DEPENDS+= libblas.so:${PORTSDIR}/math/blas
-LIB_DEPENDS+= liblapack.so:${PORTSDIR}/math/lapack
-BLAS= -lblas
-LAPACK= -llapack
-.endif
-
.if ${PORT_OPTIONS:MEXAMPLES}
PORTEXAMPLES= make.inc EXAMPLES1 EXAMPLES2
.endif
pre-configure:
- ${REINPLACE_CMD} -e 's|%%BLAS%%|${BLAS}|g ; \
+ ${REINPLACE_CMD} -e 's|%%BLAS%%|${BLASLIB}|g ; \
s|%%FC%%|${FC}|g ; \
s|%%FFLAGS%%|${FFLAGS} $${PICFLAG}|g ; \
- s|%%LAPACK%%|${LAPACK}|g ; \
+ s|%%LAPACK%%|${LAPACKLIB}|g ; \
s|%%LDFLAGS%%|${LDFLAGS}|g ; \
s|%%LOCALBASE%%|${LOCALBASE}|g ; \
s|%%PREFIX%%|${PREFIX}|g' \
@@ -61,6 +55,7 @@ pre-configure:
${WRKSRC}/SRC/makefile \
${WRKSRC}/TESTING/makefile \
${WRKSRC}/EXAMPLES1/makefile*
+ ${MKDIR} ${WRKSRC}/lapack95_modules
${CP} -r ${WRKSRC} ${WRKSRC}_SHARED
do-build:
@@ -82,4 +77,4 @@ do-install:
cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTEXAMPLES}" ${STAGEDIR}${EXAMPLESDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/math/lapack95/files/patch-make.inc b/math/lapack95/files/patch-make.inc
index 5e453c61bc7d..977a9bcf6152 100644
--- a/math/lapack95/files/patch-make.inc
+++ b/math/lapack95/files/patch-make.inc
@@ -1,5 +1,5 @@
---- make.inc.orig 2000-11-30 08:18:37.000000000 -0500
-+++ make.inc 2011-07-21 02:46:07.000000000 -0400
+--- make.inc.orig 2000-11-30 14:18:37.000000000 +0100
++++ make.inc 2015-01-05 23:43:55.000000000 +0100
@@ -3,8 +3,8 @@
# UNI-C, Denmark; Univ. of Tennessee, USA; NAG Ltd., UK
# August 5, 2000
@@ -16,9 +16,8 @@
# including non-stop arithmetic.
-OPTS0 = -u -V -dcfuns -dusty -ieee=full
--MODLIB = -I./../lapack95_modules
+OPTS0 = %%FFLAGS%% #-u -V -dcfuns -dusty -ieee=full
-+MODLIB = -I./../lapack95_modules -I%%PREFIX%%/lib/lapack95_modules
+ MODLIB = -I./../lapack95_modules
OPTS1 = -c $(OPTS0)
OPTS3 = $(OPTS1) $(MODLIB)
OPTL = -o