aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2007-03-09 09:20:38 +0800
committermaho <maho@FreeBSD.org>2007-03-09 09:20:38 +0800
commit1ab743a1b0380df11a456be3cca7ed88c5df259d (patch)
tree9aec989587fcbdbeaa40884b4c4311fa1ae1af3a /math
parentba1589e71522d7e09abc02ad8aefcac55b92d3a5 (diff)
downloadfreebsd-ports-gnome-1ab743a1b0380df11a456be3cca7ed88c5df259d.tar.gz
freebsd-ports-gnome-1ab743a1b0380df11a456be3cca7ed88c5df259d.tar.zst
freebsd-ports-gnome-1ab743a1b0380df11a456be3cca7ed88c5df259d.zip
* Update to 1.7.5.
* Install shared libs as well.
Diffstat (limited to 'math')
-rw-r--r--math/scalapack/Makefile42
-rw-r--r--math/scalapack/distinfo6
-rw-r--r--math/scalapack/files/SLmake.inc-mpich.diff30
-rw-r--r--math/scalapack/files/SLmake.inc-openmpi.diff18
-rw-r--r--math/scalapack/pkg-plist2
5 files changed, 67 insertions, 31 deletions
diff --git a/math/scalapack/Makefile b/math/scalapack/Makefile
index 458fd974adf1..d10f54998e2a 100644
--- a/math/scalapack/Makefile
+++ b/math/scalapack/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= scalapack
-PORTVERSION= 1.7.4
-PORTREVISION= 2
+PORTVERSION= 1.7.5
CATEGORIES= math
MASTER_SITES= ftp://ftp.netlib.org/scalapack/
DISTFILES= scalapack-${PORTVERSION}.tgz manpages.tgz
@@ -22,8 +21,12 @@ EXTRACT_ONLY= scalapack-${PORTVERSION}.tgz manpages.tgz
MAINTAINER= maho@FreeBSD.org
COMMENT= The ScaLAPACK Scalable LAPACK library
-BUILD_DEPENDS= ${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs \
- ${LOCALBASE}/bin/f2c:${PORTSDIR}/lang/f2c
+BUILD_DEPENDS= ${LOCALBASE}/bin/f2c:${PORTSDIR}/lang/f2c
+LIB_DEPENDS= blacs.1:${PORTSDIR}/math/blacs
+
+CONFLICTS= elmer-mathlibs-1*
+
+USE_LDCONFIG= yes
WANT_FORTRAN= yes #dummy but future use
BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42
@@ -60,13 +63,24 @@ WITH_OPENMPI= yes
.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
+RUN_DEPENDS+= ${LOCALBASE}/mpi/openmpi/bin/mpirun:${PORTSDIR}/net/openmpi
EXTRA_PATCHES+= ${FILESDIR}/SLmake.inc-openmpi.diff
.else
-BUILD_DEPENDS+= ${LOCALBASE}/mpich2/lib/libmpich.a:${PORTSDIR}/net/mpich2
+LIB_DEPENDS+= mpich:${PORTSDIR}/net/mpich2
EXTRA_PATCHES+= ${FILESDIR}/SLmake.inc-mpich.diff
.endif
+.if ${ARCH} == "sparc64" || ${ARCH} == "amd64"
+FPIC= -fPIC
+.else
+FPIC= -fpic
+.endif
+
+WRKSRC_SHARED=${WRKSRC}_shared
+CFLAGS_SHARED=${CFLAGS} ${FPIC}
+FFLAGS_SHARED=${CFLAGS} ${FPIC}
+SVERSION=1
+
.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
@@ -81,25 +95,37 @@ CFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops
.endif
post-patch:
- @${REINPLACE_CMD} -e 's,@BLAS@,${BLAS},g; s,@WRKSRC@,${WRKSRC},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}/SLmake.inc
+ ${CP} -r ${WRKSRC} ${WRKSRC_SHARED}
+ @${REINPLACE_CMD} -e 's,@BLAS@,${BLAS},g; s,@WRKSRC@,${WRKSRC},g ; s,@LOCALBASE@,${LOCALBASE},g ; s,@CC@,${CC},g ; s,@CFLAGS@,${CFLAGS},g ; s,@F77@,${F77},g ; s,@FFLAGS@,${FFLAGS},g ; s,@NOOPT@,,g ; s,@F77EXTRAFLAGS@,${F77EXTRAFLAGS},g ; s,^ARCH *.= ar,ARCMD = ar,' ${WRKSRC}/SLmake.inc
+ @${REINPLACE_CMD} -e 's,@BLAS@,${BLAS},g; s,@WRKSRC@,${WRKSRC_SHARED},g ; s,@LOCALBASE@,${LOCALBASE},g ; s,@CC@,${CC},g ; s,@CFLAGS@,${CFLAGS_SHARED},g ; s,@F77@,${F77},g ; s,@FFLAGS@,${FFLAGS_SHARED},g ; s,@NOOPT@,${FPIC},g ; s,@F77EXTRAFLAGS@,${F77EXTRAFLAGS},g ; s,^ARCH *.= ar,ARCMD = ar,' ${WRKSRC_SHARED}/SLmake.inc
.for mkf in ${ARCH2FIX}
@${REINPLACE_CMD} -e 's|\$$(ARCH)|$$(ARCMD)|' ${WRKSRC}/${mkf}/Makefile
+ @${REINPLACE_CMD} -e 's|\$$(ARCH)|$$(ARCMD)|' ${WRKSRC_SHARED}/${mkf}/Makefile
.endfor
do-build:
(cd ${WRKSRC}; make ; make exe)
+ (cd ${WRKSRC_SHARED}; make ; make exe)
(cd ${WRKSRC}; ${PATCH} < ${FILESDIR}/PBtools.h.patch )
+ (cd ${WRKSRC_SHARED}; ${PATCH} < ${FILESDIR}/PBtools.h.patch )
(${MKDIR} ${WRKSRC}/include ;\
cd ${WRKSRC}/include ;\
f2c -C++ -P ${WRKSRC}/SRC/*.f ;\
f2c -C++ -P ${WRKSRC}/TOOLS/*.f ;\
${CAT} *.P | ${GREP} -v :ref: > scalapack.h)
+post-build:
+ cd ${WRKSRC_SHARED} ; \
+ ld -Bshareable -o libscalapack.so.${SVERSION} -x -soname libscalapack.so.${SVERSION} --whole-archive ${WRKSRC_SHARED}/libscalapack.a ;\
+ ${LN} -s libscalapack.so.${SVERSION} libscalapack.so
+
do-install:
${INSTALL_DATA} ${WRKSRC}/libscalapack.a ${PREFIX}/lib/libscalapack.a
+ ${INSTALL_DATA} ${WRKSRC_SHARED}/libscalapack.so ${PREFIX}/lib/libscalapack.so
+ ${INSTALL_DATA} ${WRKSRC_SHARED}/libscalapack.so.1 ${PREFIX}/lib/libscalapack.so.1
${INSTALL_MAN} ${WRKDIR}/MANPAGES/man/manl/*.l ${PREFIX}/man/manl
${MKDIR} ${PREFIX}/share/SCALAPACK/TESTING
- (cd ${WRKSRC}/TESTING/ ;\
+ (cd ${WRKSRC_SHARED}/TESTING/ ;\
${INSTALL_PROGRAM} x* ${PREFIX}/share/SCALAPACK/TESTING ;\
${INSTALL_DATA} *.dat ${PREFIX}/share/SCALAPACK/TESTING)
${INSTALL_DATA} ${WRKSRC}/include/scalapack.h ${PREFIX}/include
diff --git a/math/scalapack/distinfo b/math/scalapack/distinfo
index 809d13f7283f..87d41b3463ce 100644
--- a/math/scalapack/distinfo
+++ b/math/scalapack/distinfo
@@ -1,6 +1,6 @@
-MD5 (scalapack/scalapack-1.7.4.tgz) = 688b759059e11e54f5381bfa2850c519
-SHA256 (scalapack/scalapack-1.7.4.tgz) = 7b5de82088feb23d1581ae96d80ff80585b0d78ebcb32098bd2bf3ce670b02ff
-SIZE (scalapack/scalapack-1.7.4.tgz) = 5014804
+MD5 (scalapack/scalapack-1.7.5.tgz) = 122226d32ce02e2651988f905367a6f8
+SHA256 (scalapack/scalapack-1.7.5.tgz) = 115c7441b848b61d7d8087cfeec892d061e7b38003213ea2d4289b13c1bb3770
+SIZE (scalapack/scalapack-1.7.5.tgz) = 5024316
MD5 (scalapack/manpages.tgz) = a536ab4837ec68addff0a3ec99427a10
SHA256 (scalapack/manpages.tgz) = a745c9f367d65e3c7611c126597a4681094b002552e47b621964d30a966aac7b
SIZE (scalapack/manpages.tgz) = 379541
diff --git a/math/scalapack/files/SLmake.inc-mpich.diff b/math/scalapack/files/SLmake.inc-mpich.diff
index e9f389e71d58..f2cc9fae9916 100644
--- a/math/scalapack/files/SLmake.inc-mpich.diff
+++ b/math/scalapack/files/SLmake.inc-mpich.diff
@@ -1,5 +1,5 @@
---- SLmake.inc.orig Thu Aug 9 11:59:50 2001
-+++ SLmake.inc Mon May 5 11:51:11 2003
+--- SLmake.inc.old Wed Mar 7 14:01:14 2007
++++ SLmake.inc Wed Mar 7 14:01:29 2007
@@ -19,26 +19,26 @@
# The complete path to the top level of ScaLAPACK directory, usually
# $(HOME)/SCALAPACK
@@ -42,27 +42,16 @@
+F77 = @F77@
#F77 = /usr/local/pgi/linux86/bin/pgf77
-CC = gcc
-+CC = @CC@
- NOOPT =
+-NOOPT =
-F77FLAGS = -O3 $(NOOPT)
-CCFLAGS = -O4
++CC = @CC@
++NOOPT = @NOOPT@
+F77FLAGS = @FFLAGS@
+CCFLAGS = @CFLAGS@
SRCFLAG =
F77LOADER = $(F77)
CCLOADER = $(CC)
-@@ -94,7 +94,7 @@
- # The name of the libraries to be created/linked to
- #
- SCALAPACKLIB = $(home)/libscalapack.a
--BLASLIB = /usr/local/lib/libf77blas.a /usr/local/lib/libatlas.a
-+BLASLIB = -L@LOCALBASE@/lib @BLAS@
- #
- PBLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(BLASLIB) $(SMPLIB)
- PRLIBS = $(SCALAPACKLIB) $(CBLACSLIB) $(SMPLIB)
-
---- SLmake.inc~ Wed Jan 10 16:50:13 2007
-+++ SLmake.inc Wed Jan 10 16:54:40 2007
@@ -82,7 +82,7 @@
# C preprocessor defs for compilation
# (-DNoChange, -DAdd_, -DUpCase, or -Df77IsF2C)
@@ -72,3 +61,12 @@
#
# The archiver and the flag(s) to use when building archive (library)
# Also the ranlib routine. If your system has no ranlib, set RANLIB = echo
+@@ -94,7 +94,7 @@
+ # The name of the libraries to be created/linked to
+ #
+ SCALAPACKLIB = $(home)/libscalapack.a
+-BLASLIB = /usr/local/lib/libf77blas.a /usr/local/lib/libatlas.a
++BLASLIB = -L@LOCALBASE@/lib @BLAS@
+ #
+ PBLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(BLASLIB) $(SMPLIB)
+ PRLIBS = $(SCALAPACKLIB) $(CBLACSLIB) $(SMPLIB)
diff --git a/math/scalapack/files/SLmake.inc-openmpi.diff b/math/scalapack/files/SLmake.inc-openmpi.diff
index 6b60fbd8e810..cb749f023bd9 100644
--- a/math/scalapack/files/SLmake.inc-openmpi.diff
+++ b/math/scalapack/files/SLmake.inc-openmpi.diff
@@ -1,5 +1,5 @@
---- SLmake.inc.orig Thu Aug 9 04:59:50 2001
-+++ SLmake.inc Mon Nov 13 15:45:36 2006
+--- SLmake.inc.orig Thu Jan 19 06:36:03 2006
++++ SLmake.inc Wed Mar 7 14:03:20 2007
@@ -19,26 +19,26 @@
# The complete path to the top level of ScaLAPACK directory, usually
# $(HOME)/SCALAPACK
@@ -42,15 +42,25 @@
+F77 = mpif77
#F77 = /usr/local/pgi/linux86/bin/pgf77
-CC = gcc
-+CC = mpicc
- NOOPT =
+-NOOPT =
-F77FLAGS = -O3 $(NOOPT)
-CCFLAGS = -O4
++CC = mpicc
++NOOPT = @NOOPT@
+F77FLAGS = @FFLAGS@
+CCFLAGS = @CFLAGS@
SRCFLAG =
F77LOADER = $(F77)
CCLOADER = $(CC)
+@@ -82,7 +82,7 @@
+ # C preprocessor defs for compilation
+ # (-DNoChange, -DAdd_, -DUpCase, or -Df77IsF2C)
+ #
+-CDEFS = -Df77IsF2C -DNO_IEEE $(USEMPI)
++CDEFS = -DAdd_ -DNO_IEEE $(USEMPI)
+ #
+ # The archiver and the flag(s) to use when building archive (library)
+ # Also the ranlib routine. If your system has no ranlib, set RANLIB = echo
@@ -94,7 +94,7 @@
# The name of the libraries to be created/linked to
#
diff --git a/math/scalapack/pkg-plist b/math/scalapack/pkg-plist
index 6283a75f1a30..a00b8d39adb9 100644
--- a/math/scalapack/pkg-plist
+++ b/math/scalapack/pkg-plist
@@ -5,6 +5,8 @@ include/PBtools.h
include/pblas.h
include/scalapack.h
lib/libscalapack.a
+lib/libscalapack.so
+lib/libscalapack.so.1
%%DATADIR%%/TESTING/BLLT.dat
%%DATADIR%%/TESTING/BLU.dat
%%DATADIR%%/TESTING/BRD.dat