aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--math/petsc/Makefile5
-rw-r--r--math/sdpara/Makefile17
-rw-r--r--math/sdpara/files/patch-Makefile2
3 files changed, 11 insertions, 13 deletions
diff --git a/math/petsc/Makefile b/math/petsc/Makefile
index 1cb0f38add26..28e3c93dab52 100644
--- a/math/petsc/Makefile
+++ b/math/petsc/Makefile
@@ -43,10 +43,7 @@ CONFIGURE_ARGS+= --with-x-include=${X11BASE}/include \
--with-x-lib=${X11BASE}/lib/libX11.so
.endif
-WANT_FORTRAN=yes #dummy but future use
-BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42
-FC= gfortran42
-F77= gfortran42
+USE_FORTRAN= yes
FFLAGS+= -O2
PFX= ${PORTNAME}
TARGET= ${OPSYS:L}
diff --git a/math/sdpara/Makefile b/math/sdpara/Makefile
index bb0a400d23ca..f18f1f446d7a 100644
--- a/math/sdpara/Makefile
+++ b/math/sdpara/Makefile
@@ -20,15 +20,12 @@ EXTRACT_ONLY= ${PORTNAME}.${PORTVERSION}.src.tar.gz
MAINTAINER= maho@FreeBSD.org
COMMENT= SDPARA paralell version of SDPA (math/sdpa)
-LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas
-BUILD_DEPENDS= ${LOCALBASE}/lib/libscalapack.a:${PORTSDIR}/math/scalapack \
- ${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs \
- ${LOCALBASE}/mpich2/lib/libmpich.a:${PORTSDIR}/net/mpich2
+LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas \
+ scalapack:${PORTSDIR}/math/scalapack \
+ blacs:${PORTSDIR}/math/blacs \
+ mpich:${PORTSDIR}/net/mpich2
-WANT_FORTRAN=yes #dummy but future use
-BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42
-FC= gfortran42
-F77= gfortran42
+USE_FORTRAN= yes
USE_GMAKE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}
@@ -66,6 +63,9 @@ CFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops
.endif
.endif
+pre-build:
+ ${DIRNAME} `${F77} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR
+
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g ; \
s|%%LOCALBASE%%|${LOCALBASE}|g ; \
@@ -73,6 +73,7 @@ post-patch:
s|%%FFLAGS%%|${FFLAGS}|g ; \
s|%%LAPACK%%|${LAPACK}|g ; \
s|%%BLAS%%|${BLAS}|g ; \
+ s|%%GCCLIBDIR%%|${GCCLIBDIR}|g ; \
s|%%FORTRANLIBS%%|${FORTRANLIBS}|g ' ${WRKSRC}/Makefile
.if !defined(WITH_OPTIMIZED_FLAGS)
@${ECHO} "You can optimize by setting WITH_OPTIMIZED_FLAGS=yes."
diff --git a/math/sdpara/files/patch-Makefile b/math/sdpara/files/patch-Makefile
index de2626bd4974..f5c363278af8 100644
--- a/math/sdpara/files/patch-Makefile
+++ b/math/sdpara/files/patch-Makefile
@@ -10,7 +10,7 @@
-LAPACK_LIB = -llapack -lcblaswr -lcblas \
- -lf77blas -lI77 -lF77 -latlas
-+LAPACK_LIB = %%LAPACK%% %%BLAS%% %%FORTRANLIBS%%
++LAPACK_LIB = %%LAPACK%% %%BLAS%% %%GCCLIBDIR%% %%FORTRANLIBS%%
# if you use BLAS in clapack.tgz, use next line
# and set NON_ATLAS_SDPA in rsdpa_include.h to 1.