diff options
author | stephen <stephen@FreeBSD.org> | 2011-07-22 04:19:33 +0800 |
---|---|---|
committer | stephen <stephen@FreeBSD.org> | 2011-07-22 04:19:33 +0800 |
commit | 79a61128a49c54045700d284bfc27c4afae47c82 (patch) | |
tree | 674469348394dc0f5cbc3bfae976a912f16a3819 /math/arpack | |
parent | f4041983fc5a56b6f2a37b427a9b6a499aec4b18 (diff) | |
download | freebsd-ports-gnome-79a61128a49c54045700d284bfc27c4afae47c82.tar.gz freebsd-ports-gnome-79a61128a49c54045700d284bfc27c4afae47c82.tar.zst freebsd-ports-gnome-79a61128a49c54045700d284bfc27c4afae47c82.zip |
- Fix PATCH_SITES, and update to version 3 of Kloeckner's arscnd patch.
- Fix patch.tar.gz being unpacked into the wrong directory.
- Respect AR, RANLIB, LD, LDFLAGS, etc. in ARmake.inc.
- Fix install of arpack.h.
- Fix broken sparc64 build.
- Add tests.
- Various other cleanups.
PR: ports/159075
Submitted by: bf
Approved by: maho (mentor, implicit)
Diffstat (limited to 'math/arpack')
-rw-r--r-- | math/arpack/Makefile | 144 | ||||
-rw-r--r-- | math/arpack/distinfo | 4 | ||||
-rw-r--r-- | math/arpack/files/patch-ARmake.inc | 61 | ||||
-rw-r--r-- | math/arpack/files/patch-UTIL+second.f | 4 | ||||
-rw-r--r-- | math/arpack/pkg-plist | 2 |
5 files changed, 102 insertions, 113 deletions
diff --git a/math/arpack/Makefile b/math/arpack/Makefile index 1f1983a6d2c8..6f93ebbb3441 100644 --- a/math/arpack/Makefile +++ b/math/arpack/Makefile @@ -7,7 +7,7 @@ PORTNAME= arpack PORTVERSION= 96 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= math MASTER_SITES= http://www.caam.rice.edu/software/ARPACK/SRC/ DISTFILES= ${PORTNAME}${PORTVERSION}.tar.gz patch.tar.gz @@ -17,75 +17,125 @@ DISTFILES+= ug.ps.gz DIST_SUBDIR= arpack EXTRACT_ONLY= ${PORTNAME}${PORTVERSION}.tar.gz -PATCH_SITES= http://www.caam.rice.edu/software/ARPACK/SRC/ \ - http://mathema.tician.de/news.tiker.net/files/ -PATCHFILES= arpack-arscnd-2.patch.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) -.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS) -WITH_ATLAS= yes -.endif -.if defined(WITH_ATLAS) -LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas -BLAS_LIBS?= "-L${LOCALBASE}/lib -lf77blas -latlas" -.else -LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas -BLAS_LIBS?= "-L${LOCALBASE}/lib -lblas" -.endif - -ALL_TARGET= lib +LDFLAGS+= -L${LOCALBASE}/lib +USE_FORTRAN= yes USE_LDCONFIG= yes +WRKSRC = ${WRKDIR}/ARPACK + +BANDTESTS= ssbdr1 ssbdr2 ssbdr3 ssbdr4 ssbdr5 ssbdr6 \ + dsbdr1 dsbdr2 dsbdr3 dsbdr4 dsbdr5 dsbdr6 \ + snbdr1 snbdr2 snbdr3 snbdr4 snbdr5 snbdr6 \ + dnbdr1 dnbdr2 dnbdr3 dnbdr4 dnbdr5 dnbdr6 \ + cnbdr1 cnbdr2 cnbdr3 cnbdr4 \ + znbdr1 znbdr2 znbdr3 znbdr4 +COMPLEXTESTS= cndrv1 cndrv2 cndrv3 cndrv4 \ + zndrv1 zndrv2 zndrv3 zndrv4 +NONSYMTESTS= sndrv1 sndrv2 sndrv3 sndrv4 sndrv5 sndrv6 \ + dndrv1 dndrv2 dndrv3 dndrv4 dndrv5 dndrv6 +SIMPLETESTS= sssimp dssimp snsimp dnsimp cnsimp znsimp +SVDTESTS= ssvd dsvd +SYMTESTS= ssdrv1 ssdrv2 ssdrv3 ssdrv4 ssdrv5 ssdrv6 \ + dsdrv1 dsdrv2 dsdrv3 dsdrv4 dsdrv5 dsdrv6 .include <bsd.port.pre.mk> -.if ${ARCH} == "sparc64" -PICFLAG?= -fPIC +.if exists(${LOCALBASE}/lib/libatlas_r.so) +WITH_BLAS?= atlas .else -PICFLAG?= -fpic +WITH_BLAS?= reference .endif -.if ${ARCH} == "sparc64" -BROKEN= Does not install on sparc64 +.if ${WITH_BLAS} == atlas +LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas +BLAS?= -lf77blas -latlas +.else +LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas +BLAS?= -lblas .endif -USE_FORTRAN= yes - -WRKSRC= ${WRKDIR}/ARPACK -WRKSRC_SHARED= ${WRKDIR}/ARPACK_SHARED -FFLAGS_SHARED= ${FFLAGS} ${PICFLAG} -USE_LDCONFIG= yes +.if ${ARCH} == "sparc64" +PICFLAG?= -fPIC +.else +PICFLAG?= -fpic +.endif -pre-patch: - @(cd ${WRKSRC}; ${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/patch.tar.gz) +post-extract: + @${TAR} -C ${WRKDIR} -xzf ${_DISTDIR}/patch.tar.gz + @${GZIP_CMD} ${WRKSRC}/DOCUMENTS/ex-*.doc -pre-build: - ${CP} -R ${WRKSRC} ${WRKSRC_SHARED} - @${REINPLACE_CMD} -e 's+%FC%+${FC}+g ; s+%FFLAGS%+${FFLAGS}+g ; \ - s+%%WRKSRC%%+${WRKSRC}+ ; \ - s+%%BLAS_LIBS%%+${BLAS_LIBS}+' ${WRKSRC}/ARmake.inc - @${REINPLACE_CMD} -e 's+%FC%+${FC}+g ; s+%FFLAGS%+${FFLAGS_SHARED}+g ; \ - s+%%WRKSRC%%+${WRKSRC_SHARED}+ ; \ - s+%%BLAS_LIBS%%+${BLAS_LIBS}+' ${WRKSRC_SHARED}/ARmake.inc +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}|' \ + ${WRKSRC}/ARmake.inc + @${CP} -R ${WRKSRC} ${WRKSRC}_SHARED do-build: - cd ${WRKSRC} ; ${MAKE} ${ALL_TARGET} - cd ${WRKSRC_SHARED} ; ${MAKE} ${ALL_TARGET} ; ld -Bshareable -o libarpack.so.1 -x -soname libarpack.so.1 --whole-archive libarpack.a + @cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} \ + PICFLAG= home="${WRKSRC}" \ + ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET} + @cd ${WRKSRC}_SHARED ; ${SETENV} ${MAKE_ENV} \ + PICFLAG=${PICFLAG} home="${WRKSRC}_SHARED" \ + ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET} ; \ + ${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} ${WRKSRC}/libarpack.a ${PREFIX}/lib - @${INSTALL_DATA} ${WRKSRC_SHARED}/libarpack.so.1 ${PREFIX}/lib + @${INSTALL_DATA} ${WRKSRC}_SHARED/libarpack.so.1 ${PREFIX}/lib @${LN} -sf libarpack.so.1 ${PREFIX}/lib/libarpack.so - -post-install: .if !defined(NOPORTDOCS) - ${INSTALL_DATA} ${FILESDIR}/arpack.h ${PREFIX}/include - ${MKDIR} ${DOCSDIR} - -${GZIP_CMD} ${GZIP} ${WRKSRC}/DOCUMENTS/ex-*.doc - ${CP} ${WRKSRC}/DOCUMENTS/ex-*.doc.gz ${DOCSDIR} - ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/ug.ps.gz ${DOCSDIR} + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/DOCUMENTS/ex-*.doc.gz ${DOCSDIR} + @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/ug.ps.gz ${DOCSDIR} .endif +.if defined(MAINTAINER_MODE) +check regression-test test: simpletest +.endif + +simpletest: build + @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} \ + PICFLAG=${PICFLAG} home="${WRKSRC}_SHARED" \ + ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} simple ; ${SIMPLETESTS:S|^|./|:S|$| ; |} + +fulltest: fulltest-static fulltest-shared + +fulltest-static: lapack-drivers-static +.for d in BAND COMPLEX NONSYM SVD SYM + @cd ${WRKSRC}/EXAMPLES/${d} ; ${SETENV} ${MAKE_ENV} \ + PICFLAG= home="${WRKSRC}" \ + ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} ${${d}TESTS} ; ${${d}TESTS:S|^|./|:S|$| ; |} +.endfor + +fulltest-shared: lapack-drivers-shared +.for d in BAND COMPLEX NONSYM SIMPLE SVD SYM + @cd ${WRKSRC}_SHARED/EXAMPLES/${d} ; ${SETENV} ${MAKE_ENV} \ + PICFLAG=${PICFLAG} home="${WRKSRC}_SHARED" \ + ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} ${${d}TESTS} ; ${${d}TESTS:S|^|./|:S|$| ; |} +.endfor + +lapack-drivers-static: build + @cd ${WRKSRC}/LAPACK ; ${SETENV} ${MAKE_ENV} \ + PICFLAG= home="${WRKSRC}" \ + ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} sdrv ddrv cdrv zdrv + +lapack-drivers-shared: build + @cd ${WRKSRC}_SHARED/LAPACK ; ${SETENV} ${MAKE_ENV} \ + PICFLAG=${PICFLAG} home="${WRKSRC}_SHARED" \ + ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} sdrv ddrv cdrv zdrv + .include <bsd.port.post.mk> diff --git a/math/arpack/distinfo b/math/arpack/distinfo index fe4393a432ba..89ce7e837a49 100644 --- a/math/arpack/distinfo +++ b/math/arpack/distinfo @@ -4,5 +4,5 @@ SHA256 (arpack/patch.tar.gz) = af8914d60af47e49fbad55812d0a5d0a7040fba90c93e5ef1 SIZE (arpack/patch.tar.gz) = 226473 SHA256 (arpack/ug.ps.gz) = ff1faac74bfc42442955906132756ecd7f0034803898d507dbd1bc960f6f4ab0 SIZE (arpack/ug.ps.gz) = 248543 -SHA256 (arpack/arpack-arscnd-2.patch.gz) = 5c7923b64560733200c4ce79b2cbdc740b2cbfd94885182378c9ee8be1375711 -SIZE (arpack/arpack-arscnd-2.patch.gz) = 7946 +SHA256 (arpack/arpack-arscnd-3.patch.gz) = 497514b51a06483f11f4b70534746fbfa2e8128d5e499fda0cbad9e18690fc4f +SIZE (arpack/arpack-arscnd-3.patch.gz) = 8291 diff --git a/math/arpack/files/patch-ARmake.inc b/math/arpack/files/patch-ARmake.inc deleted file mode 100644 index 5111db81b5c8..000000000000 --- a/math/arpack/files/patch-ARmake.inc +++ /dev/null @@ -1,61 +0,0 @@ ---- ARmake.inc.orig Fri Apr 26 14:12:57 1996 -+++ ARmake.inc Fri Jul 11 16:41:11 2003 -@@ -25,14 +25,14 @@ - # | other than your home directory. | - # %--------------------------------------% - # --home = $(HOME)/ARPACK -+home = %%WRKSRC%% - # - # %--------------------------------------% - # | The platform identifier to suffix to | - # | the end of library names | - # %--------------------------------------% - # --PLAT = SUN4 -+PLAT = FBSD - # - # %------------------------------------------------------% - # | The directories to find the various pieces of ARPACK | -@@ -43,7 +43,7 @@ - UTILdir = $(home)/UTIL - SRCdir = $(home)/SRC - # --DIRS = $(BLASdir) $(LAPACKdir) $(UTILdir) $(SRCdir) -+DIRS = $(LAPACKdir) $(UTILdir) $(SRCdir) - # - # %-------------------------------------------------------------------% - # | Comment out the previous line and uncomment the following | -@@ -57,9 +57,9 @@ - # | The name of the libraries to be created/linked to | - # %---------------------------------------------------% - # --ARPACKLIB = $(home)/libarpack_$(PLAT).a --LAPACKLIB = --BLASLIB = -+ARPACKLIB = $(home)/libarpack.a -+LAPACKLIB = $(home)/liblapack.a -+BLASLIB = %%BLAS_LIBS%% - # - ALIBS = $(ARPACKLIB) $(LAPACKLIB) $(BLASLIB) - # -@@ -101,8 +101,8 @@ - # | for your system. | - # %-----------------------------------------% - # --FC = f77 --FFLAGS = -O -cg89 -+FC = %FC% -+FFLAGS = %FFLAGS% - - LDFLAGS = - CD = cd -@@ -112,7 +112,7 @@ - LN = ln - LNFLAGS = -s - --MAKE = /bin/make -+MAKE ?= /usr/bin/make - - RM = rm - RMFLAGS = -f diff --git a/math/arpack/files/patch-UTIL+second.f b/math/arpack/files/patch-UTIL+second.f index eae1e4b21c02..1fa7785db706 100644 --- a/math/arpack/files/patch-UTIL+second.f +++ b/math/arpack/files/patch-UTIL+second.f @@ -1,5 +1,5 @@ ---- UTIL/second.f~ Tue Oct 3 03:56:44 1995 -+++ UTIL/second.f Wed Jan 10 23:06:17 2007 +--- 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 .. diff --git a/math/arpack/pkg-plist b/math/arpack/pkg-plist index 7b67edf7818f..ccdb4b1e2bb7 100644 --- a/math/arpack/pkg-plist +++ b/math/arpack/pkg-plist @@ -1,7 +1,7 @@ lib/libarpack.a lib/libarpack.so lib/libarpack.so.1 -%%PORTDOCS%%include/arpack.h +include/arpack.h %%PORTDOCS%%%%DOCSDIR%%/ex-complex.doc.gz %%PORTDOCS%%%%DOCSDIR%%/ex-nonsym.doc.gz %%PORTDOCS%%%%DOCSDIR%%/ex-sym.doc.gz |