aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2018-10-12 01:55:30 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2018-10-12 01:55:30 +0000
commit483d58244afe4c7abb6d95a5fb73bb184646bd67 (patch)
tree325bb81f05d367ed2f9dcd6c0ff493eb17eaa4e0
parent7992a3aded75f9f356f3ebccf35c5dc0663a6261 (diff)
downloadports-483d58244afe4c7abb6d95a5fb73bb184646bd67.tar.gz
ports-483d58244afe4c7abb6d95a5fb73bb184646bd67.zip
Notes
-rw-r--r--math/Makefile1
-rw-r--r--math/py-primme/Makefile32
-rw-r--r--math/py-primme/distinfo3
-rw-r--r--math/py-primme/files/patch-setup.py60
-rw-r--r--math/py-primme/pkg-descr5
5 files changed, 101 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 5ff980a1edb8..c6c89d24dea2 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -720,6 +720,7 @@
SUBDIR += py-petsc4py
SUBDIR += py-piranha
SUBDIR += py-plastex
+ SUBDIR += py-primme
SUBDIR += py-probstat
SUBDIR += py-pyFFTW
SUBDIR += py-pyasp
diff --git a/math/py-primme/Makefile b/math/py-primme/Makefile
new file mode 100644
index 000000000000..5f1fbd99e431
--- /dev/null
+++ b/math/py-primme/Makefile
@@ -0,0 +1,32 @@
+# $FreeBSD$
+
+PORTNAME= primme
+DISTVERSION= 2.1.5.20181011 # need the latest changes, but github repo is mistagged, no regular github tag available
+CATEGORIES= math python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= PRIMME wrapper for Python
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/../COPYING.txt
+
+BUILD_DEPENDS= ${PYNUMPY}
+LIB_DEPENDS= libprimme.so:math/primme
+RUN_DEPENDS= ${PYNUMPY}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>=0:devel/py-nose@${PY_FLAVOR}
+
+USES= fortran gmake localbase:ldflags python shebangfix
+SHEBANG_FILES= examples.py tests.py
+USE_GITHUB= yes
+GH_TAGNAME= 6a0fa27
+USE_PYTHON= distutils autoplist
+TEST_TARGET= test
+
+WRKSRC_SUBDIR= Python
+BINARY_ALIAS= python2=${PYTHON_CMD}
+
+post-test: # not sure why does the 'test' target tun examples and not tests
+ @cd ${WRKSRC} && ${PYTHON_CMD} ${WRKSRC}/tests.py
+
+.include <bsd.port.mk>
diff --git a/math/py-primme/distinfo b/math/py-primme/distinfo
new file mode 100644
index 000000000000..4e33cdc8c396
--- /dev/null
+++ b/math/py-primme/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1539307207
+SHA256 (primme-primme-2.1.5.20181011-6a0fa27_GH0.tar.gz) = 8f662a7c41d5bfb7910ccb9bbcb7f06f1191fc7c7a9d41fb695e9b13438bcb79
+SIZE (primme-primme-2.1.5.20181011-6a0fa27_GH0.tar.gz) = 5511173
diff --git a/math/py-primme/files/patch-setup.py b/math/py-primme/files/patch-setup.py
new file mode 100644
index 000000000000..c1531c348260
--- /dev/null
+++ b/math/py-primme/files/patch-setup.py
@@ -0,0 +1,60 @@
+--- setup.py.orig 2018-10-11 23:38:33 UTC
++++ setup.py
+@@ -15,31 +16,33 @@ def get_numpy_options():
+ numpy_include = numpy.get_include()
+
+ # Obtain BLAS/LAPACK linking options
+- lapack_info = get_info('lapack_opt')
+- blas_info = get_info('blas_opt')
+- using_atlas = False
+- using_f77blas = False
+- using_lapack = False
+- for l in lapack_info.get('libraries', []) + blas_info.get('libraries', []):
+- if "atlas" in l: using_atlas = True
+- if "f77blas" in l: using_f77blas = True
+- if "lapack" in l: using_lapack = True
+- if using_atlas and (not using_f77blas or not using_lapack):
+- lapack_info = get_info('atlas')
+- # ATLAS notices an incomplete LAPACK by not setting language to f77
+- complete_lapack = lapack_info.get('language', "") == "f77"
+- if complete_lapack:
+- blas_info = {}
+- else:
+- # If ATLAS has an incomplete LAPACK, use a regular one
+- blas_info = get_info('atlas_blas')
+- lapack_info = get_info('lapack')
++ #lapack_info = get_info('lapack_opt')
++ #blas_info = get_info('blas_opt')
++ #using_atlas = False
++ #using_f77blas = False
++ #using_lapack = False
++ #for l in lapack_info.get('libraries', []) + blas_info.get('libraries', []):
++ # if "atlas" in l: using_atlas = True
++ # if "f77blas" in l: using_f77blas = True
++ # if "lapack" in l: using_lapack = True
++ #if using_atlas and (not using_f77blas or not using_lapack):
++ # lapack_info = get_info('atlas')
++ # # ATLAS notices an incomplete LAPACK by not setting language to f77
++ # complete_lapack = lapack_info.get('language', "") == "f77"
++ # if complete_lapack:
++ # blas_info = {}
++ # else:
++ # # If ATLAS has an incomplete LAPACK, use a regular one
++ # blas_info = get_info('atlas_blas')
++ # lapack_info = get_info('lapack')
+
+- blaslapack_libraries = lapack_info.get('libraries', []) + blas_info.get('libraries', [])
+- blaslapack_library_dirs = lapack_info.get('library_dirs', []) + blas_info.get('library_dirs', [])
+- blaslapack_extra_link_args = lapack_info.get('extra_link_args', []) + blas_info.get('extra_link_args', [])
+- if not blaslapack_libraries and not blaslapack_extra_link_args:
+- blaslapack_libraries = ['lapack', 'blas']
++ #blaslapack_libraries = lapack_info.get('libraries', []) + blas_info.get('libraries', [])
++ #blaslapack_library_dirs = lapack_info.get('library_dirs', []) + blas_info.get('library_dirs', [])
++ #blaslapack_extra_link_args = lapack_info.get('extra_link_args', []) + blas_info.get('extra_link_args', [])
++ #if not blaslapack_libraries and not blaslapack_extra_link_args:
++ blaslapack_libraries = []
++ blaslapack_extra_link_args = []
++ blaslapack_library_dirs = []
+
+ return dict(
+ include_dirs = [numpy_include, "primme/include", "primme/src/include"],
diff --git a/math/py-primme/pkg-descr b/math/py-primme/pkg-descr
new file mode 100644
index 000000000000..9229872fedf2
--- /dev/null
+++ b/math/py-primme/pkg-descr
@@ -0,0 +1,5 @@
+The python binding for PRIMME, PReconditioned Iterative MultiMethod Eigensolver
+for solving symmetric/Hermitian eigenvalue problems and singular value
+problems.
+
+WWW: http://www.cs.wm.edu/~andreas/software/