FreeBSD Bugzilla – Attachment 117063 Details for
Bug 159129
math/arpack should not be linked with math/lapack
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 8.76 KB, created by
Stephen Montgomery-Smith
on 2011-07-23 05:50:09 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Stephen Montgomery-Smith
Created:
2011-07-23 05:50:09 UTC
Size:
8.76 KB
patch
obsolete
>diff -urN /usr/ports/math/arpack/Makefile arpack/Makefile >--- /usr/ports/math/arpack/Makefile 2011-07-22 15:21:20.000000000 -0500 >+++ arpack/Makefile 2011-07-22 19:56:46.000000000 -0500 >@@ -7,7 +7,7 @@ > > PORTNAME= arpack > PORTVERSION= 96 >-PORTREVISION= 8 >+PORTREVISION= 9 > CATEGORIES= math > MASTER_SITES= http://www.caam.rice.edu/software/ARPACK/SRC/ > DISTFILES= ${PORTNAME}${PORTVERSION}.tar.gz patch.tar.gz >@@ -17,15 +17,14 @@ > DIST_SUBDIR= arpack > EXTRACT_ONLY= ${PORTNAME}${PORTVERSION}.tar.gz > >-PATCH_SITES= http://mathema.tician.de/news.tiker.net/files/ >-PATCHFILES= arpack-arscnd-3.patch.gz >-PATCH_DIST_STRIP= -p1 >- > MAINTAINER= stephen@FreeBSD.org > COMMENT= Argand Library: large eigenvalue subroutines (serial version) > >+OPTIONS= MANGLE_LAPACK_NAMES "Mangle LAPACK names" Off >+ > LDFLAGS+= -L${LOCALBASE}/lib > USE_FORTRAN= yes >+FFLAGS+= -ffixed-line-length-none > USE_LDCONFIG= yes > WRKSRC = ${WRKDIR}/ARPACK > >@@ -46,6 +45,13 @@ > > .include <bsd.port.pre.mk> > >+.if defined(WITH_MANGLE_LAPACK_NAMES) >+PATCH_SITES= http://mathema.tician.de/news.tiker.net/files/ >+PATCHFILES= arpack-arscnd-3.patch.gz >+PATCH_DIST_STRIP= -p1 >+USE_PERL5_BUILD= yes >+.endif >+ > .if exists(${LOCALBASE}/lib/libatlas_r.so) > WITH_BLAS?= atlas > .else >@@ -69,15 +75,25 @@ > post-extract: > @${TAR} -C ${WRKDIR} -xzf ${_DISTDIR}/patch.tar.gz > @${GZIP_CMD} ${WRKSRC}/DOCUMENTS/ex-*.doc >- > post-patch: > @${REINPLACE_CMD} -E \ > -e '/^(home|AR|FC|LDFLAGS|MAKE|PLAT|RANLIB|SHELL)[[:space:]]+=/d' \ > -e '/^ARPACKLIB[[:space:]]+=/s/_\$$\(PLAT\)//' \ > -e '\|^BLASLIB[[:space:]]+=|s|=.*|= ${LDFLAGS} ${BLAS}|' \ > -e '/^DIRS[[:space:]]+=/s/\$$\(BLASdir\)//' \ >- -e '\|^FFLAGS[[:space:]]+=|s|=.*|= ${FFLAGS} $${PICFLAG}|' \ >+ -e '\|^FFLAGS[[:space:]]+=|s|=.*|= ${FFLAGS} $${PICFLAG} -ffixed-line-length-none|' \ > ${WRKSRC}/ARmake.inc >+.if defined(WITH_MANGLE_LAPACK_NAMES) >+ @${SETENV} FILESDIR=${FILESDIR} WRKSRC=${WRKSRC} WRKDIR=${WRKDIR} \ >+ ${PERL} ${SCRIPTDIR}/mangle-lapack-names.pl >+.else >+ @${CP} ${FILESDIR}/arpack.h ${WRKDIR}/ >+.endif >+.if defined(WITH_MANGLE_LAPACK_NAMES) >+ @cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/UTIL+arscnd.f-patch >+.else >+ @cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/UTIL+second.f-patch >+.endif > @${CP} -R ${WRKSRC} ${WRKSRC}_SHARED > > do-build: >@@ -90,7 +106,7 @@ > ${LD} -Bshareable -o libarpack.so.1 -x -soname libarpack.so.1 --whole-archive libarpack.a > > do-install: >- @${INSTALL_DATA} ${FILESDIR}/arpack.h ${PREFIX}/include >+ @${INSTALL_DATA} ${WRKDIR}/arpack.h ${PREFIX}/include > @${INSTALL_DATA} ${WRKSRC}/libarpack.a ${PREFIX}/lib > @${INSTALL_DATA} ${WRKSRC}_SHARED/libarpack.so.1 ${PREFIX}/lib > @${LN} -sf libarpack.so.1 ${PREFIX}/lib/libarpack.so >@@ -108,7 +124,7 @@ > @cd ${WRKSRC}/EXAMPLES/SIMPLE ; ${SETENV} ${MAKE_ENV} \ > PICFLAG= home="${WRKSRC}" \ > ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} simple ; ${SIMPLETESTS:S|^|./|:S|$| ; |} >- @cd ${WRKSRC}_SHARED/EXAMPLES/SIMPLE ; ${SETENV} ${MAKE_ENV} \ >+ cd ${WRKSRC}_SHARED/EXAMPLES/SIMPLE ; ${SETENV} ${MAKE_ENV} \ > PICFLAG=${PICFLAG} home="${WRKSRC}_SHARED" \ > ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} simple ; ${SIMPLETESTS:S|^|./|:S|$| ; |} > >diff -urN /usr/ports/math/arpack/files/UTIL+arscnd.f-patch arpack/files/UTIL+arscnd.f-patch >--- /usr/ports/math/arpack/files/UTIL+arscnd.f-patch 1969-12-31 18:00:00.000000000 -0600 >+++ arpack/files/UTIL+arscnd.f-patch 2011-07-22 14:38:20.000000000 -0500 >@@ -0,0 +1,10 @@ >+--- UTIL/arscnd.f.bak 2011-07-20 19:47:43.000000000 -0400 >++++ UTIL/arscnd.f 2011-07-20 19:48:05.000000000 -0400 >+@@ -21,7 +21,6 @@ >+ * .. >+ * .. External Functions .. >+ REAL ETIME >+- EXTERNAL ETIME >+ * .. >+ * .. Executable Statements .. >+ * >diff -urN /usr/ports/math/arpack/files/UTIL+second.f-patch arpack/files/UTIL+second.f-patch >--- /usr/ports/math/arpack/files/UTIL+second.f-patch 1969-12-31 18:00:00.000000000 -0600 >+++ arpack/files/UTIL+second.f-patch 2011-07-22 14:37:29.000000000 -0500 >@@ -0,0 +1,10 @@ >+--- UTIL/second.f.bak 2011-07-20 19:47:43.000000000 -0400 >++++ UTIL/second.f 2011-07-20 19:48:05.000000000 -0400 >+@@ -21,7 +21,6 @@ >+ * .. >+ * .. External Functions .. >+ REAL ETIME >+- EXTERNAL ETIME >+ * .. >+ * .. Executable Statements .. >+ * >diff -urN /usr/ports/math/arpack/files/patch-UTIL+second.f arpack/files/patch-UTIL+second.f >--- /usr/ports/math/arpack/files/patch-UTIL+second.f 2011-07-22 15:21:20.000000000 -0500 >+++ arpack/files/patch-UTIL+second.f 1969-12-31 18:00:00.000000000 -0600 >@@ -1,10 +0,0 @@ >---- UTIL/arscnd.f.bak 2011-07-20 19:47:43.000000000 -0400 >-+++ UTIL/arscnd.f 2011-07-20 19:48:05.000000000 -0400 >-@@ -21,7 +21,6 @@ >- * .. >- * .. External Functions .. >- REAL ETIME >-- EXTERNAL ETIME >- * .. >- * .. Executable Statements .. >- * >diff -urN /usr/ports/math/arpack/pkg-descr arpack/pkg-descr >--- /usr/ports/math/arpack/pkg-descr 2006-01-14 19:35:37.000000000 -0600 >+++ arpack/pkg-descr 2011-07-22 21:59:52.000000000 -0500 >@@ -1,24 +1,19 @@ >-The package is designed to compute a few eigenvalues and corresponding >-eigenvectors of a general n by n matrix A. It is most appropriate for large >-sparse or structured matrices A where structured means that a matrix-vector >-product w <- Av requires order n rather than the usual order n2 floating point >-operations. This software is based upon an algorithmic variant of the Arnoldi >-process called the Implicitly Restarted Arnoldi Method (IRAM). When the matrix >-A is symmetric it reduces to a variant of the Lanczos process called the >-Implicitly Restarted Lanczos Method (IRLM). These variants may be viewed as a >-synthesis of the Arnoldi/Lanczos process with the Implicitly Shifted QR >-technique that is suitable for large scale problems. For many standard >-problems, a matrix factorization is not required. Only the action of the matrix >-on a vector is needed. >-ARPACK software is capable of solving large scale symmetric, nonsymmetric, >-and generalized eigenproblems from significant application areas. The software >-is designed to compute a few (k) eigenvalues with user specified features >-such as those of largest real part or largest magnitude. Storage requirements >-are on the order of n*k locations. No auxiliary storage is required. A set >-of Schur basis vectors for the desired k-dimensional eigen-space is computed >-which is numerically orthogonal to working precision. Numerically accurate >-eigenvectors are available on request. >+ARPACK software is designed to solve symmetric, nonsymmetric, and generalized >+eigenproblems for sparse matrices. The software is designed to compute a few >+(k) eigenvalues with user specified features such as those of largest real >+part or largest magnitude. Storage requirements are on the order of n*k >+locations. A set of Schur basis vectors for the desired k-dimensional >+eigen-space is computed which is numerically orthogonal to working precision. >+Numerically accurate eigenvectors are available on request. > > WWW: http://www.caam.rice.edu/software/ARPACK/ > >-NOTE: You MUST link with BLAS library or a replacement like ATLAS. >+NOTES >+1. You MUST link with the BLAS library or a replacement like ATLAS. >+2. ARPACK is designed to work with lapack version 2, and it provides its own >+ lapack routines. If you have to link with lapack version 3 or greater, >+ it is recommended that you switch on the option MANGLE_LAPACK_NAMES. This >+ does two things. First it uses a patch described at >+ http://mathema.tician.de/node/373. Secondly, it mangles all the names of >+ the LAPACK routines provided in ARPACK by preceding each function or >+ subroutine name by "AR_". >diff -urN /usr/ports/math/arpack/scripts/mangle-lapack-names.pl arpack/scripts/mangle-lapack-names.pl >--- /usr/ports/math/arpack/scripts/mangle-lapack-names.pl 1969-12-31 18:00:00.000000000 -0600 >+++ arpack/scripts/mangle-lapack-names.pl 2011-07-22 15:08:57.000000000 -0500 >@@ -0,0 +1,43 @@ >+$WRKSRC = $ENV{"WRKSRC"} || die; >+$WRKDIR = $ENV{"WRKDIR"} || die; >+$FILESDIR = $ENV{"FILESDIR"} || die; >+$|=1; >+ >+while (<$WRKSRC/LAPACK/*.f>) { >+ open(FOR,$_); >+ while (<FOR>) { >+ push @functions, $1 if /FUNCTION\s+(\w+)/ || /SUBROUTINE\s+(\w+)/; >+ } >+ close FOR; >+} >+ >+print "Mangling LAPACK names. This may take some time.\n"; >+open(LIST,"find $WRKSRC -type f -name \"*.f\" |"); >+while ($filename = <LIST>) { >+ print "."; >+ chomp $filename; >+ rename $filename, "$filename.bak"; >+ open(IN,"$filename.bak") || die; >+ $contents = join "", <IN>; >+ close IN; >+ foreach (@functions) { >+ $contents =~ s/\b$_\b/AR_$_/gi; >+ } >+ open(OUT,"> $filename") || die; >+ print OUT $contents; >+ close OUT; >+} >+close LIST; >+ >+print "."; >+open(IN,"$FILESDIR/arpack.h") || die; >+$contents = join '',<IN>; >+close IN; >+foreach (@functions) { >+ $_ = lc($_); >+ $contents =~ s/\b${_}_\b/ar_${_}_/g; >+} >+open(OUT,"> $WRKDIR/arpack.h") || die; >+print OUT $contents; >+close OUT; >+print "\nDone mangling.\n";
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 159129
: 117063 |
117064