Wednesday, April 13, 2022

[update) math/arpack to arpack-ng 3.8.0

Index: Makefile
===================================================================
RCS file: /cvs/ports/math/arpack/Makefile,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile
--- Makefile 11 Mar 2022 19:36:12 -0000 1.21
+++ Makefile 13 Apr 2022 15:07:06 -0000
@@ -1,43 +1,43 @@
-COMMENT= solve large scale eigenvalue problems
+COMMENT = revised library for solving large-scale eigenvalue problems

-DISTNAME= arpack96
-PKGNAME= arpack-96
-REVISION= 8
-SHARED_LIBS= arpack 1.0
-CATEGORIES= math
+DISTNAME= ${GH_PROJECT}-${VERSION}
+PKGNAME= arpack-${VERSION}
+VERSION= 3.8.0
+SHARED_LIBS= arpack 2.0 \
+ parpack 1.0
+CATEGORIES= math
+FLAVORS= mpi
+FLAVOR?=

-HOMEPAGE= http://www.caam.rice.edu/software/ARPACK/
+HOMEPAGE= https://github.com/opencollab/arpack-ng

-# BSD license (not in distfile)
+# BSD 3-Clause
PERMIT_PACKAGE= Yes

-MASTER_SITES= ${HOMEPAGE}SRC/
-DISTFILES= ${DISTNAME}.tar.gz patch.tar.gz ug.ps.gz
-DIST_SUBDIR= arpack
-
-MODULES= fortran
-MODFORTRAN_COMPILER = gfortran
-BUILD_DEPENDS= ${MODFORTRAN_BUILD_DEPENDS}
+GH_ACCOUNT= opencollab
+GH_PROJECT= arpack-ng
+GH_TAGNAME= ${VERSION}
+
+MODULES= fortran \
+ devel/cmake
+BUILD_DEPENDS= devel/ninja

LIB_DEPENDS = math/lapack \
math/blas
-WANTLIB = lapack>=1 blas>=1 m
+WANTLIB = lapack blas m

-WRKDIST= ${WRKDIR}/ARPACK
-WRKSRC= ${WRKDIST}/SRC
-PICFLAG= -fPIC
-MAKE_FILE= ${FILESDIR}/Makefile
-MAKE_ENV= SHLIB_MAJOR=${LIBarpack_VERSION:R} \
- SHLIB_MINOR=${LIBarpack_VERSION:E} \
- FC="${MODFORTRAN_COMPILER} -cpp" \
- CC=${MODFORTRAN_COMPILER} \
- NOPROFILE=1
-FAKE_FLAGS= LIBDIR=${LOCALBASE}/lib DEBUGLIBS=no
+CONFIGURE_ARGS+=-DBUILD_SHARED_LIBS:BOOL=ON \
+ -D ICB=ON

-NO_TEST= Yes

-post-extract:
- @cd ${WRKDIST}/UTIL && mv *.f ${WRKSRC}
+
+.if ${FLAVOR:Mmpi}
+LIB_DEPENDS+= devel/openmpi
+CONFIGURE_ARGS+=-D MPI=ON
+WANTLIB+= execinfo pciaccess pthread util z
+WANTLIB+= mpi mpi_mpifh mpi_usempi_ignore_tkr
+WANTLIB+= mpi_usempif08 open-pal open-rte
+.endif

post-install:
.for i in BAND COMPLEX NONSYM SIMPLE SVD SYM
@@ -49,7 +49,7 @@ post-install:
${PREFIX}/share/examples/arpack
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/arpack
${INSTALL_DATA} ${WRKDIST}/DOCUMENTS/* ${PREFIX}/share/doc/arpack
- ${INSTALL_DATA} ${WRKDIR}/ug.ps ${PREFIX}/share/doc/arpack
- ${INSTALL_DATA} ${FILESDIR}/LICENSE ${PREFIX}/share/doc/arpack
+ ${INSTALL_DATA} ${WRKDIST}/COPYING ${PREFIX}/share/doc/arpack
+

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/math/arpack/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 18 Jan 2015 03:14:26 -0000 1.4
+++ distinfo 13 Apr 2022 15:07:06 -0000
@@ -1,6 +1,2 @@
-SHA256 (arpack/arpack96.tar.gz) = xqR+yjCiVsuuYOacYGJRuEtqDzUrpSey3L1Hic6F7Pw=
-SHA256 (arpack/patch.tar.gz) = r4kU1gr0fkn7rVWBLQpdCnBA+6kMk+XvGo2I0yAn060=
-SHA256 (arpack/ug.ps.gz) = /x+qx0v8QkQpVZBhMnVuzX8ANIA4mNUH29G8lg9vSrA=
-SIZE (arpack/arpack96.tar.gz) = 636865
-SIZE (arpack/patch.tar.gz) = 226473
-SIZE (arpack/ug.ps.gz) = 248543
+SHA256 (arpack-ng-3.8.0.tar.gz) = raWus4eIdDgzByOckjW3FqihcMbQlqZiW/1SmETfAD0=
+SIZE (arpack-ng-3.8.0.tar.gz) = 1014494
Index: files/LICENSE
===================================================================
RCS file: files/LICENSE
diff -N files/LICENSE
--- files/LICENSE 5 Apr 2010 20:29:18 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-BSD Software License
-
-Pertains to ARPACK and P_ARPACK
-
-Copyright (c) 1996-2008 Rice University.
-Developed by D.C. Sorensen, R.B. Lehoucq, C. Yang, and K. Maschhoff.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-- Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-- Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer listed
- in this license in the documentation and/or other materials
- provided with the distribution.
-
-- Neither the name of the copyright holders nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: files/Makefile
===================================================================
RCS file: files/Makefile
diff -N files/Makefile
--- files/Makefile 11 Mar 2022 19:36:12 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-LIB= arpack
-SRCS= sgetv0.f slaqrb.f sstqrb.f ssortc.f ssortr.f sstatn.f sstats.f \
- snaitr.f snapps.f snaup2.f snaupd.f snconv.f sneigh.f sngets.f \
- ssaitr.f ssapps.f ssaup2.f ssaupd.f ssconv.f sseigt.f ssgets.f \
- sneupd.f sseupd.f ssesrt.f \
- svout.f smout.f \
- dgetv0.f dlaqrb.f dstqrb.f dsortc.f dsortr.f dstatn.f dstats.f \
- dnaitr.f dnapps.f dnaup2.f dnaupd.f dnconv.f dneigh.f dngets.f \
- dsaitr.f dsapps.f dsaup2.f dsaupd.f dsconv.f dseigt.f dsgets.f \
- dneupd.f dseupd.f dsesrt.f \
- dvout.f dmout.f \
- cnaitr.f cnapps.f cnaup2.f cnaupd.f cneigh.f cneupd.f cngets.f \
- cgetv0.f csortc.f cstatn.f \
- cvout.f cmout.f \
- znaitr.f znapps.f znaup2.f znaupd.f zneigh.f zneupd.f zngets.f \
- zgetv0.f zsortc.f zstatn.f \
- zvout.f zmout.f \
- icnteq.f icopy.f iset.f iswap.f ivout.f second.f
-
-.include <bsd.lib.mk>
Index: patches/patch-SRC_second_f
===================================================================
RCS file: patches/patch-SRC_second_f
diff -N patches/patch-SRC_second_f
--- patches/patch-SRC_second_f 11 Mar 2022 19:36:12 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-Index: SRC/second.f
---- SRC/second.f.orig
-+++ SRC/second.f
-@@ -21,7 +21,7 @@
- * ..
- * .. External Functions ..
- REAL ETIME
-- EXTERNAL ETIME
-+* EXTERNAL ETIME
- * ..
- * .. Executable Statements ..
- *
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/math/arpack/pkg/DESCR,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 DESCR
--- pkg/DESCR 19 Oct 2006 16:19:54 -0000 1.1.1.1
+++ pkg/DESCR 13 Apr 2022 15:07:06 -0000
@@ -1,5 +1,8 @@
-ARPACK is a collection of Fortran77 subroutines designed to solve large
+ARPACK-NG is a collection of Fortran77 subroutines designed to solve large
scale eigenvalue problems.
+It is a fork of the Rice University ARPACK, that was created as a joint project
+between Debian, Octave and Scilab and is now a community project maintained by
+a few volunteers.

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
@@ -24,3 +27,6 @@ auxiliary storage is required. A set of
desired k-dimensional eigen-space is computed which is numerically
orthogonal to working precision. Numerically accurate eigenvectors are
available on request.
+
+Flavors:
+ mpi - Build with OpenMPI support
Index: pkg/PFRAG.mpi
===================================================================
RCS file: pkg/PFRAG.mpi
diff -N pkg/PFRAG.mpi
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.mpi 13 Apr 2022 15:07:06 -0000
@@ -0,0 +1,4 @@
+include/arpack/parpack.h
+include/arpack/parpack.hpp
+@lib lib/libparpack.so.${LIBparpack_VERSION}
+lib/pkgconfig/parpack.pc
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/math/arpack/pkg/PLIST,v
retrieving revision 1.6
diff -u -p -r1.6 PLIST
--- pkg/PLIST 11 Mar 2022 19:36:12 -0000 1.6
+++ pkg/PLIST 13 Apr 2022 15:07:06 -0000
@@ -1,16 +1,31 @@
-lib/libarpack.a
+include/arpack/
+include/arpack/arpack.h
+include/arpack/arpack.hpp
+include/arpack/arpackdef.h
+include/arpack/arpackicb.h
+include/arpack/debug.h
+include/arpack/debug_c.h
+include/arpack/debug_c.hpp
+include/arpack/stat.h
+include/arpack/stat_c.h
+include/arpack/stat_c.hpp
+lib/cmake/
+lib/cmake/arpack-ng/
+lib/cmake/arpack-ng/arpack-ng-config-version.cmake
+lib/cmake/arpack-ng/arpack-ng-config.cmake
@lib lib/libarpack.so.${LIBarpack_VERSION}
+lib/pkgconfig/arpack.pc
share/doc/arpack/
-share/doc/arpack/LICENSE
+share/doc/arpack/COPYING
share/doc/arpack/README
share/doc/arpack/debug.doc
share/doc/arpack/ex-complex.doc
share/doc/arpack/ex-nonsym.doc
share/doc/arpack/ex-sym.doc
share/doc/arpack/stat.doc
-share/doc/arpack/ug.ps
share/examples/arpack/
share/examples/arpack/BAND/
+share/examples/arpack/BAND/Makefile.am
share/examples/arpack/BAND/README
share/examples/arpack/BAND/cnband.f
share/examples/arpack/BAND/cnbdr1.f
@@ -31,7 +46,6 @@ share/examples/arpack/BAND/dsbdr3.f
share/examples/arpack/BAND/dsbdr4.f
share/examples/arpack/BAND/dsbdr5.f
share/examples/arpack/BAND/dsbdr6.f
-share/examples/arpack/BAND/makefile
share/examples/arpack/BAND/snband.f
share/examples/arpack/BAND/snbdr1.f
share/examples/arpack/BAND/snbdr2.f
@@ -52,17 +66,18 @@ share/examples/arpack/BAND/znbdr2.f
share/examples/arpack/BAND/znbdr3.f
share/examples/arpack/BAND/znbdr4.f
share/examples/arpack/COMPLEX/
+share/examples/arpack/COMPLEX/Makefile.am
share/examples/arpack/COMPLEX/README
share/examples/arpack/COMPLEX/cndrv1.f
share/examples/arpack/COMPLEX/cndrv2.f
share/examples/arpack/COMPLEX/cndrv3.f
share/examples/arpack/COMPLEX/cndrv4.f
-share/examples/arpack/COMPLEX/makefile
share/examples/arpack/COMPLEX/zndrv1.f
share/examples/arpack/COMPLEX/zndrv2.f
share/examples/arpack/COMPLEX/zndrv3.f
share/examples/arpack/COMPLEX/zndrv4.f
share/examples/arpack/NONSYM/
+share/examples/arpack/NONSYM/Makefile.am
share/examples/arpack/NONSYM/README
share/examples/arpack/NONSYM/dndrv1.f
share/examples/arpack/NONSYM/dndrv2.f
@@ -70,7 +85,6 @@ share/examples/arpack/NONSYM/dndrv3.f
share/examples/arpack/NONSYM/dndrv4.f
share/examples/arpack/NONSYM/dndrv5.f
share/examples/arpack/NONSYM/dndrv6.f
-share/examples/arpack/NONSYM/makefile
share/examples/arpack/NONSYM/sndrv1.f
share/examples/arpack/NONSYM/sndrv2.f
share/examples/arpack/NONSYM/sndrv3.f
@@ -79,22 +93,23 @@ share/examples/arpack/NONSYM/sndrv5.f
share/examples/arpack/NONSYM/sndrv6.f
share/examples/arpack/README
share/examples/arpack/SIMPLE/
+share/examples/arpack/SIMPLE/Makefile.am
share/examples/arpack/SIMPLE/README
share/examples/arpack/SIMPLE/cnsimp.f
share/examples/arpack/SIMPLE/debug.h
share/examples/arpack/SIMPLE/dnsimp.f
share/examples/arpack/SIMPLE/dssimp.f
-share/examples/arpack/SIMPLE/makefile
share/examples/arpack/SIMPLE/snsimp.f
share/examples/arpack/SIMPLE/sssimp.f
share/examples/arpack/SIMPLE/znsimp.f
share/examples/arpack/SVD/
+share/examples/arpack/SVD/Makefile.am
share/examples/arpack/SVD/README
share/examples/arpack/SVD/debug.h
share/examples/arpack/SVD/dsvd.f
-share/examples/arpack/SVD/makefile
share/examples/arpack/SVD/ssvd.f
share/examples/arpack/SYM/
+share/examples/arpack/SYM/Makefile.am
share/examples/arpack/SYM/README
share/examples/arpack/SYM/dsdrv1.f
share/examples/arpack/SYM/dsdrv2.f
@@ -102,10 +117,10 @@ share/examples/arpack/SYM/dsdrv3.f
share/examples/arpack/SYM/dsdrv4.f
share/examples/arpack/SYM/dsdrv5.f
share/examples/arpack/SYM/dsdrv6.f
-share/examples/arpack/SYM/makefile
share/examples/arpack/SYM/ssdrv1.f
share/examples/arpack/SYM/ssdrv2.f
share/examples/arpack/SYM/ssdrv3.f
share/examples/arpack/SYM/ssdrv4.f
share/examples/arpack/SYM/ssdrv5.f
share/examples/arpack/SYM/ssdrv6.f
+%%mpi%%
So here's the diff switching math/arpack to

https://github.com/opencollab/arpack-ng

Unfortunately it's a *huge* diff, because it has to change a lot of things:

* change upstream to opencollab on github
* change to CMake build
* remove post-extract dance, because it is no longer needed for arpack-ng
* copy License directly from source directory, since it's now
distributed with the source tarball
* remove files/LICENSE and files/Makefile accordingly
* remove patch/patch-SRC_second_f
It builds and works fine without that patch, at least for me.
* add a flavour to build with OpenMPI support

Succesfully builds

math/armadillo
math/igraph
(math/mlpack only depends on it via ensmallen -> armadillo)
math/octave

On 4/9/22 16:37, Volker Schlecht wrote:
> Hi,
>
> while working on an update for math/octave from 5.2.0 to 6.4.0 I noticed
> that what we package as math/arpack has been superseded by arpack-ng
> packages in FreeBSD, NetBSD and pretty much every Linux distribution I
> bothered to check.
>
> I have a working port for arpack-ng
> (https://github.com/opencollab/arpack-ng), but since it obviously
> conflicts with math/arpack, I was wondering what's the best way forward.
>
> Net* and Free* appear to have dropped their arpack ports and added
> arpack-ng ports instead, which arguably would make versioning a bit
> easier, given that arpack is at version 96 ...
>
> Should I work on a patch against math/arpack or submit a new port?
>
> Either way, this would affect
>
> math/mlpack
> math/igraph
> math/armadillo
> math/octave
>
> All of which build happily against arpack-ng.
>
> cu,
> Volker
>

No comments:

Post a Comment