aboutsummaryrefslogtreecommitdiff
path: root/math/suitesparse
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2007-01-09 22:33:33 +0000
committerMaho Nakata <maho@FreeBSD.org>2007-01-09 22:33:33 +0000
commitb59215bb6a371727fb9c54df2efcc447a7afc60f (patch)
tree02f6e39a6510def5319100d7cf0ad5d8ac5bb6e3 /math/suitesparse
parent03433af0066e6dfe9448956be37c145fec24f041 (diff)
downloadports-b59215bb6a371727fb9c54df2efcc447a7afc60f.tar.gz
ports-b59215bb6a371727fb9c54df2efcc447a7afc60f.zip
* Migrate to gfortran
* ATLAS build is now conditional * bump port revision
Notes
Notes: svn path=/head/; revision=181917
Diffstat (limited to 'math/suitesparse')
-rw-r--r--math/suitesparse/Makefile27
-rw-r--r--math/suitesparse/files/patch-CHOLMOD+Demo+Makefile11
-rw-r--r--math/suitesparse/files/patch-UFconfig+UFconfig.mk15
-rw-r--r--math/suitesparse/files/patch-UMFPACK+Demo+Makefile11
4 files changed, 48 insertions, 16 deletions
diff --git a/math/suitesparse/Makefile b/math/suitesparse/Makefile
index 0520db8362df..822b7f9ae541 100644
--- a/math/suitesparse/Makefile
+++ b/math/suitesparse/Makefile
@@ -7,6 +7,7 @@
PORTNAME= suitesparse
PORTVERSION= 2.3.1
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= http://www.cise.ufl.edu/research/sparse/SuiteSparse/
DISTNAME= SuiteSparse-${PORTVERSION}
@@ -15,16 +16,20 @@ DIST_SUBDIR= ${PORTNAME}/${PORTVERSION}
MAINTAINER= maho@FreeBSD.org
COMMENT= SuiteSparse is a set of packages for sparse matrices calculation
-BUILD_DEPENDS= ${LOCALBASE}/lib/libmetis.a:${PORTSDIR}/math/metis
+BUILD_DEPENDS= metis:${PORTSDIR}/math/metis
-.if defined(WITH_BLAS)
-LIB_DEPENDS+= blas.1:${PORTSDIR}/math/blas
+.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS)
+WITH_ATLAS= yes
+.endif
+.if defined(WITH_ATLAS)
+LIB_DEPENDS+= atlas.1:${PORTSDIR}/math/atlas
+BLAS= -L${LOCALBASE}/lib -lf77blas -latlas
+LAPACK= -L${LOCALBASE}/lib -lalapack
+.else
+LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
+LIB_DEPENDS+= lapack.4:${PORTSDIR}/math/lapack
BLAS= -L${LOCALBASE}/lib -lblas
LAPACK= -L${LOCALBASE}/lib -llapack
-.else
-LIB_DEPENDS+= atlas.1:${PORTSDIR}/math/atlas
-BLAS= -L${LOCALBASE}/lib -lf77blas -latlas -lg2c
-LAPACK= -L${LOCALBASE}/lib -lalapack -lcblas
.endif
CONFLICTS= elmer-umfpack-4*
@@ -41,6 +46,8 @@ CONFLICTS= umfpack-*
USE_LDCONFIG= yes
USE_GMAKE= yes
+USE_GCC= 4.2+
+WANT_FORTRAN= yes
WRKSRC=${WRKDIR}/SuiteSparse
WRKSRC_SHARED=${WRKSRC}_shared
CFLAGS_SHARED=${CFLAGS} ${FPIC}
@@ -51,7 +58,8 @@ post-patch:
${CP} -r ${WRKSRC} ${WRKSRC_SHARED}
@${REINPLACE_CMD} -e 's,%%CC%%,${CC},g' \
-e 's,%%CFLAGS%%,${CFLAGS},g' \
- -e 's,%%F77%%,${FC},g' \
+ -e 's,%%F77%%,${F77},g' \
+ -e 's,%%FC%%,${FC},g' \
-e 's,%%FFLAGS%%,${FFLAGS},g' \
-e 's,%%BLAS%%,${BLAS},g' \
-e 's,%%LAPACK%%,${LAPACK},g' \
@@ -64,7 +72,8 @@ post-patch:
@${REINPLACE_CMD} -e 's,%%CC%%,${CC},g' \
-e 's,%%CFLAGS%%,${CFLAGS_SHARED},g' \
- -e 's,%%F77%%,${FC},g' \
+ -e 's,%%F77%%,${F77},g' \
+ -e 's,%%FC%%,${FC},g' \
-e 's,%%FFLAGS%%,${FFLAGS_SHARED},g' \
-e 's,%%BLAS%%,${BLAS},g' \
-e 's,%%LAPACK%%,${LAPACK},g' \
diff --git a/math/suitesparse/files/patch-CHOLMOD+Demo+Makefile b/math/suitesparse/files/patch-CHOLMOD+Demo+Makefile
new file mode 100644
index 000000000000..8556e3fd3b00
--- /dev/null
+++ b/math/suitesparse/files/patch-CHOLMOD+Demo+Makefile
@@ -0,0 +1,11 @@
+--- CHOLMOD/Demo/Makefile~ Fri Aug 25 22:41:39 2006
++++ CHOLMOD/Demo/Makefile Wed Jan 10 07:16:27 2007
+@@ -19,7 +19,7 @@
+ $(LAPACK) $(BLAS) $(XERBLA) $(LIB)
+ #-------------------------------------------------------------------------------
+
+-C = $(CC) $(CFLAGS) $(CHOLMOD_CONFIG)
++C = $(FC) $(CFLAGS) $(CHOLMOD_CONFIG)
+
+ code: library cholmod_demo cholmod_l_demo cholmod_simple
+
diff --git a/math/suitesparse/files/patch-UFconfig+UFconfig.mk b/math/suitesparse/files/patch-UFconfig+UFconfig.mk
index bf16e9ab2194..33e0515986ad 100644
--- a/math/suitesparse/files/patch-UFconfig+UFconfig.mk
+++ b/math/suitesparse/files/patch-UFconfig+UFconfig.mk
@@ -1,5 +1,5 @@
---- UFconfig/UFconfig.mk Wed Nov 29 20:18:52 2006
-+++ UFconfig/UFconfig.mk Thu Dec 28 09:14:51 2006
+--- UFconfig/UFconfig.mk.orig Wed Nov 29 20:18:52 2006
++++ UFconfig/UFconfig.mk Wed Jan 10 07:10:43 2007
@@ -31,8 +31,8 @@
# C compiler and compiler flags: These will normally not give you optimal
# performance. You should select the optimization parameters that are best
@@ -11,18 +11,19 @@
# ranlib, and ar, for generating libraries
RANLIB = ranlib
-@@ -43,8 +43,8 @@
+@@ -43,8 +43,9 @@
MV = mv -f
# Fortran compiler (not normally required)
-F77 = f77
-F77FLAGS = -O
+F77 = %%F77%%
++FC = %%FC%%
+F77FLAGS = %%FFLAGS%%
F77LIB =
# C and Fortran libraries
-@@ -73,8 +73,8 @@
+@@ -73,8 +74,8 @@
# These settings will probably not work, since there is no fixed convention for
# naming the BLAS and LAPACK library (*.a or *.so) files. Assume the Goto
# BLAS are available.
@@ -33,7 +34,7 @@
# The BLAS might not contain xerbla, an error-handling routine for LAPACK and
# the BLAS. Also, the standard xerbla requires the Fortran I/O library, and
-@@ -102,8 +102,8 @@
+@@ -102,8 +103,8 @@
# The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc.
# You may wish to use an absolute path. METIS is optional. Compile
# CHOLMOD with -DNPARTITION if you do not wish to use METIS.
@@ -44,7 +45,7 @@
# If you use CHOLMOD_CONFIG = -DNPARTITION then you must use the following
# options:
-@@ -126,7 +126,7 @@
+@@ -126,7 +127,7 @@
# -DNRECIPROCAL do not multiply by the reciprocal
# -DNO_DIVIDE_BY_ZERO do not divide by zero
@@ -53,7 +54,7 @@
#------------------------------------------------------------------------------
# CHOLMOD configuration
-@@ -176,12 +176,12 @@
+@@ -176,12 +177,12 @@
# alternatives:
# CFLAGS = -g -fexceptions \
diff --git a/math/suitesparse/files/patch-UMFPACK+Demo+Makefile b/math/suitesparse/files/patch-UMFPACK+Demo+Makefile
new file mode 100644
index 000000000000..8f154638df31
--- /dev/null
+++ b/math/suitesparse/files/patch-UMFPACK+Demo+Makefile
@@ -0,0 +1,11 @@
+--- UMFPACK/Demo/Makefile.old Wed Jan 10 07:13:07 2007
++++ UMFPACK/Demo/Makefile Wed Jan 10 07:13:22 2007
+@@ -10,7 +10,7 @@
+
+ include ../../UFconfig/UFconfig.mk
+
+-C = $(CC) $(CFLAGS) $(UMFPACK_CONFIG) -I../Include -I../../AMD/Include \
++C = $(FC) $(CFLAGS) $(UMFPACK_CONFIG) -I../Include -I../../AMD/Include \
+ -I../../UFconfig
+
+ INC = ../Include/umfpack.h ../../AMD/Include/amd.h ../../UFconfig/UFconfig.h