Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Apr 2018 18:49:19 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r466175 - in head/math: . py-pynleq2 py-pynleq2/files
Message-ID:  <201804011849.w31InJEt097878@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Sun Apr  1 18:49:19 2018
New Revision: 466175
URL: https://svnweb.freebsd.org/changeset/ports/466175

Log:
  New port: math/py-pynleq2: Python binding for NLEQ2 algorithm's fortran implementation

Added:
  head/math/py-pynleq2/
  head/math/py-pynleq2/Makefile   (contents, props changed)
  head/math/py-pynleq2/distinfo   (contents, props changed)
  head/math/py-pynleq2/files/
  head/math/py-pynleq2/files/patch-setup.py   (contents, props changed)
  head/math/py-pynleq2/pkg-descr   (contents, props changed)
Modified:
  head/math/Makefile

Modified: head/math/Makefile
==============================================================================
--- head/math/Makefile	Sun Apr  1 17:36:45 2018	(r466174)
+++ head/math/Makefile	Sun Apr  1 18:49:19 2018	(r466175)
@@ -675,6 +675,7 @@
     SUBDIR += py-pymc
     SUBDIR += py-pymc3
     SUBDIR += py-pyneqsys
+    SUBDIR += py-pynleq2
     SUBDIR += py-pyodesys
     SUBDIR += py-pysparse
     SUBDIR += py-pysym

Added: head/math/py-pynleq2/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-pynleq2/Makefile	Sun Apr  1 18:49:19 2018	(r466175)
@@ -0,0 +1,37 @@
+# $FreeBSD$
+
+PORTNAME=	pynleq2
+DISTVERSION=	0.0.2
+CATEGORIES=	math python
+MASTER_SITES=	CHEESESHOP \
+		https://github.com/PySCeS/pysces/archive/:fortran
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTFILES=	${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} \
+		${PYSCES_VERSION}${EXTRACT_SUFX}:fortran
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Python binding for NLEQ2 algorithm's fortran implementation
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYNUMPY}
+
+USES=		fortran:flang python
+USE_PYTHON=	distutils autoplist
+
+BINARY_ALIAS=	gfortran6=flang # it keeps using gfortran6 regardless of the environment variables and arguments
+
+PYSCES_VERSION=	0.9.5
+FORTRAN_FILES=	linalg_nleq2.f nleq2.f wnorm.f zibconst.f zibmon.f zibsec.f
+
+pre-build: # compile fortran files into a static library because distutils fails while doing this
+	@${MKDIR} ${WRKDIR}/.fbuild && \
+		cd ${WRKDIR}/.fbuild && \
+		flang -c ${CFLAGS} -fPIC ${FORTRAN_FILES:C/^/${WRKDIR}\/pysces-${PYSCES_VERSION}\/pysces\/nleq2\//} && \
+		${AR} -qc libff.a ${FORTRAN_FILES:S/.f/.o/}
+
+post-install:
+	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}/nleq2.so
+
+.include <bsd.port.mk>

Added: head/math/py-pynleq2/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-pynleq2/distinfo	Sun Apr  1 18:49:19 2018	(r466175)
@@ -0,0 +1,5 @@
+TIMESTAMP = 1522600966
+SHA256 (pynleq2-0.0.2.tar.gz) = b9be75bb7def34cd7a82aed87b70f6c3c9f4602cbe9e8d4fcf43a4aae241112d
+SIZE (pynleq2-0.0.2.tar.gz) = 6219
+SHA256 (0.9.5.tar.gz) = 14131578b36154593ee5e793b3886572746209dcc3d9ed5ef3787a3476876cf6
+SIZE (0.9.5.tar.gz) = 2119094

Added: head/math/py-pynleq2/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-pynleq2/files/patch-setup.py	Sun Apr  1 18:49:19 2018	(r466175)
@@ -0,0 +1,27 @@
+--- setup.py.orig	2015-10-20 14:54:08 UTC
++++ setup.py
+@@ -75,19 +75,21 @@ if len(sys.argv) > 1 and '--help' not in
+ 
+     for src, md5sum in zip(sources, md5sums):
+         srcpath = os.path.join('nleq2', src)
+-        if not os.path.exists(srcpath):
++        if False and not os.path.exists(srcpath):
+             NLEQ2_URL = os.environ.get('PYNLEQ2_NLEQ2_ROOT_URL', None)
+             if NLEQ2_URL:
+                 download(NLEQ2_URL+src, srcpath)
+             else:
+                 fmtstr = "Could not find: %s ($PYNLEQ2_NLEQ2_ROOT_URL not set)"
+                 raise ValueError(fmtstr % src)
+-        if md5_of_file(srcpath).hexdigest() != md5sum:
++        if False and md5_of_file(srcpath).hexdigest() != md5sum:
+             raise ValueError("Mismatching MD5 sum for %s" % srcpath)
+ 
+     ext_modules = [
+         Extension('pynleq2.nleq2', [os.path.join('nleq2', f)
+-                                    for f in ('nleq2.pyf',) + sources])
++                                    for f in ('nleq2.pyf',)]
++                                   , libraries=['ff', 'flang', 'execinfo']
++                                   , library_dirs=['../.fbuild', '/usr/local/flang/lib'])
+     ]
+ 
+ PYNLEQ2_RELEASE_VERSION = os.environ.get('PYNLEQ2_RELEASE_VERSION', '')

Added: head/math/py-pynleq2/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-pynleq2/pkg-descr	Sun Apr  1 18:49:19 2018	(r466175)
@@ -0,0 +1,7 @@
+pynleq2 provides a Python binding to the NLEQ2 algorithm from CodeLib
+distributed by Zuse Institute Berlin (ZIB).
+
+pynleq2 can be used as a backend for pyneqsys (math/py-pyneqsys)
+to solve non-linear symbolic equation systems.
+
+WWW: https://github.com/bjodah/pynleq2



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804011849.w31InJEt097878>