summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2018-10-09 08:24:02 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2018-10-09 08:24:02 +0000
commit74fa1be30b34bed7becfcd04324994d7d717e4b3 (patch)
tree4d34172e662f29ab4a351e0fabe0005ccc087818 /math
parentUpdate to 0.17.0 release. (diff)
New port: math/primme: Iterative eigensolver for symmetric and hermitian matrices
Notes
Notes: svn path=/head/; revision=481610
Diffstat (limited to 'math')
-rw-r--r--math/Makefile1
-rw-r--r--math/primme/Makefile46
-rw-r--r--math/primme/distinfo3
-rw-r--r--math/primme/files/patch-examples_Makefile11
-rw-r--r--math/primme/files/patch-src_Makefile11
-rw-r--r--math/primme/files/patch-src_eigs_primme__interface.c11
-rw-r--r--math/primme/files/patch-src_include_template.h11
-rw-r--r--math/primme/files/patch-tests_COMMON_num.h11
-rw-r--r--math/primme/files/patch-tests_Makefile11
-rw-r--r--math/primme/pkg-descr10
10 files changed, 126 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index e2c94075dacb..446b8801ae93 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -656,6 +656,7 @@
SUBDIR += plplot
SUBDIR += plplot-ada
SUBDIR += primegen
+ SUBDIR += primme
SUBDIR += prng
SUBDIR += proofgeneral
SUBDIR += pspp
diff --git a/math/primme/Makefile b/math/primme/Makefile
new file mode 100644
index 000000000000..de3e95aea74d
--- /dev/null
+++ b/math/primme/Makefile
@@ -0,0 +1,46 @@
+# $FreeBSD$
+
+PORTNAME= primme
+DISTVERSIONPREFIX= v
+DISTVERSION= 2.1
+CATEGORIES= math
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Iterative eigensolver for symmetric and hermitian matrices
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/COPYING.txt
+
+LIB_DEPENDS= libblas.so:math/blas \
+ liblapack.so:math/lapack
+TEST_DEPENDS= gfortran${GCC_DEFAULT}:lang/gcc${GCC_DEFAULT}
+
+USES= gmake localbase:ldflags
+USE_GITHUB= yes
+MAKEFILE= makefile
+ALL_TARGET= solib
+USE_LDCONFIG= yes
+
+BINARY_ALIAS= make=${GMAKE}
+
+CFLAGS+= -fPIC
+LDFLAGS+= ${LOCALBASE}/lib/liblapack.so ${LOCALBASE}/lib/libblas.so
+
+TEST_ENV= ${MAKE_ENV} F77=gfortran${GCC_DEFAULT} FLDR=gfortran${GCC_DEFAULT} \
+ LDFLAGS="-lm -Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT} ${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgcc_s.so" \
+ USE_MPI=no USE_PETSC=no PETSC_DIR=${LOCALBASE}
+TEST_TARGET= all_tests test
+
+PLIST_FILES= include/primme.h \
+ include/primme_eigs.h \
+ include/primme_eigs_f77.h \
+ include/primme_f77.h \
+ include/primme_svds.h \
+ include/primme_svds_f77.h \
+ lib/libprimme.so
+
+do-install:
+ cd ${WRKSRC} && ${COPYTREE_SHARE} include ${STAGEDIR}${PREFIX}
+ ${INSTALL_LIB} ${WRKSRC}/lib/lib${PORTNAME}.so ${STAGEDIR}${PREFIX}/lib
+
+.include <bsd.port.mk>
diff --git a/math/primme/distinfo b/math/primme/distinfo
new file mode 100644
index 000000000000..65cd874bf9b6
--- /dev/null
+++ b/math/primme/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1539019293
+SHA256 (primme-primme-v2.1_GH0.tar.gz) = edc924250d464f51d0f529aaa77d8b741411b4453b3423fa663a65732055467b
+SIZE (primme-primme-v2.1_GH0.tar.gz) = 6071172
diff --git a/math/primme/files/patch-examples_Makefile b/math/primme/files/patch-examples_Makefile
new file mode 100644
index 000000000000..d7be2f73eb4d
--- /dev/null
+++ b/math/primme/files/patch-examples_Makefile
@@ -0,0 +1,11 @@
+--- examples/Makefile.orig 2017-04-11 04:35:01 UTC
++++ examples/Makefile
+@@ -8,7 +8,7 @@ include ../Link_flags
+
+ override INCLUDE += -I../include
+ override FINCLUDE += -I../include
+-LIBDIRS += -L../lib
++LIBDIRS += ../lib/libprimme.so
+
+ EXAMPLES_C = ex_eigs_dseq ex_eigs_zseq ex_svds_dseq ex_svds_zseq
+ EXAMPLES_CXX = ex_eigs_zseqxx ex_svds_zseqxx
diff --git a/math/primme/files/patch-src_Makefile b/math/primme/files/patch-src_Makefile
new file mode 100644
index 000000000000..5e27ef90f1d0
--- /dev/null
+++ b/math/primme/files/patch-src_Makefile
@@ -0,0 +1,11 @@
+--- src/Makefile.orig 2018-10-09 07:03:22 UTC
++++ src/Makefile
+@@ -89,7 +89,7 @@ auto_headers: $(AUTOMATED_HEADERS_LINALG
+ $(RANLIB) $@
+
+ ../lib/$(SOLIBRARY): ../lib/$(LIBRARY)
+- $(CC) -shared -o ../lib/$(SOLIBRARY) -Wl,--whole-archive ../lib/$(LIBRARY) -Wl,--no-whole-archive
++ $(CC) -shared -o ../lib/$(SOLIBRARY) -Wl,--whole-archive ../lib/$(LIBRARY) -Wl,--no-whole-archive $(LDFLAGS)
+
+ #
+ # Generate CTAGS
diff --git a/math/primme/files/patch-src_eigs_primme__interface.c b/math/primme/files/patch-src_eigs_primme__interface.c
new file mode 100644
index 000000000000..a030f5a332fb
--- /dev/null
+++ b/math/primme/files/patch-src_eigs_primme__interface.c
@@ -0,0 +1,11 @@
+--- src/eigs/primme_interface.c.orig 2018-10-08 17:26:04 UTC
++++ src/eigs/primme_interface.c
+@@ -36,7 +36,7 @@
+ *
+ ******************************************************************************/
+
+-#if !(defined (__APPLE__) && defined (__MACH__))
++#if !(defined (__APPLE__) && defined (__MACH__)) && !defined(__FreeBSD__)
+ # include <malloc.h>
+ #endif
+ #include <stdlib.h> /* mallocs, free */
diff --git a/math/primme/files/patch-src_include_template.h b/math/primme/files/patch-src_include_template.h
new file mode 100644
index 000000000000..d7c44e296fb0
--- /dev/null
+++ b/math/primme/files/patch-src_include_template.h
@@ -0,0 +1,11 @@
+--- src/include/template.h.orig 2018-10-08 17:27:07 UTC
++++ src/include/template.h
+@@ -368,7 +368,7 @@
+ *
+ **********************************************************************/
+
+-#if !(defined (__APPLE__) && defined (__MACH__))
++#if !(defined (__APPLE__) && defined (__MACH__)) && !defined(__FreeBSD__)
+ # include <malloc.h> /* malloc */
+ #endif
+ #include <stdlib.h> /* malloc, free */
diff --git a/math/primme/files/patch-tests_COMMON_num.h b/math/primme/files/patch-tests_COMMON_num.h
new file mode 100644
index 000000000000..083294d771fe
--- /dev/null
+++ b/math/primme/files/patch-tests_COMMON_num.h
@@ -0,0 +1,11 @@
+--- tests/COMMON/num.h.orig 2018-10-08 17:28:33 UTC
++++ tests/COMMON/num.h
+@@ -42,7 +42,7 @@
+ #endif
+ #define Sprimme CONCAT(SCALAR_PRE,primme)
+ #define Sprimme_svds CONCAT(SCALAR_PRE,primme_svds)
+-#if !(defined (__APPLE__) && defined (__MACH__))
++#if !(defined (__APPLE__) && defined (__MACH__)) && !defined(__FreeBSD__)
+ # include <malloc.h> /* malloc */
+ #endif
+ #include <stdlib.h> /* malloc, free */
diff --git a/math/primme/files/patch-tests_Makefile b/math/primme/files/patch-tests_Makefile
new file mode 100644
index 000000000000..63f39cf5312d
--- /dev/null
+++ b/math/primme/files/patch-tests_Makefile
@@ -0,0 +1,11 @@
+--- tests/Makefile.orig 2018-10-08 19:10:07 UTC
++++ tests/Makefile
+@@ -9,7 +9,7 @@ include ../Link_flags
+ SOBJS= COMMON/shared_utils.o COMMON/ioandtest.o
+ COMMON_INCLUDE = -I./COMMON -I../include
+ override INCLUDE += $(COMMON_INCLUDE)
+-LIBDIRS += -L../lib
++LIBDIRS += ../lib/libprimme.so
+
+ USE_NATIVE ?= yes
+ USE_PETSC ?= $(if $(findstring undefined,$(origin PETSC_DIR)),no,yes)
diff --git a/math/primme/pkg-descr b/math/primme/pkg-descr
new file mode 100644
index 000000000000..1ef11bb824ee
--- /dev/null
+++ b/math/primme/pkg-descr
@@ -0,0 +1,10 @@
+PRIMME, pronounced as prime, computes a few eigenvalues and their corresponding
+eigenvectors of a real symmetric or complex Hermitian matrix. It can also
+compute singular values and vectors of a square or rectangular matrix. It can
+find largest, smallest, or interior singular/eigenvalues and can use
+preconditioning to accelerate convergence. It is especially optimized for large,
+difficult problems, and can be a useful tool for both non-experts and experts.
+PRIMME is written in C99, but complete interfaces are provided for Fortran 77,
+MATLAB, Python, and R.
+
+WWW: http://www.cs.wm.edu/~andreas/software/