Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Apr 2018 06:03:05 +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: r468178 - in head/math: . py-piranha py-piranha/files
Message-ID:  <201804240603.w3O635mV095931@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Tue Apr 24 06:03:05 2018
New Revision: 468178
URL: https://svnweb.freebsd.org/changeset/ports/468178

Log:
  New port: math/py-piranha: Python binding for Piranha, the computer algebra system

Added:
  head/math/py-piranha/
  head/math/py-piranha/Makefile   (contents, props changed)
  head/math/py-piranha/distinfo   (contents, props changed)
  head/math/py-piranha/files/
  head/math/py-piranha/files/patch-CMakeLists.txt   (contents, props changed)
  head/math/py-piranha/files/patch-cmake__modules_yacma_YACMAPythonSetup.cmake   (contents, props changed)
  head/math/py-piranha/pkg-descr   (contents, props changed)
  head/math/py-piranha/pkg-plist   (contents, props changed)
Modified:
  head/math/Makefile

Modified: head/math/Makefile
==============================================================================
--- head/math/Makefile	Tue Apr 24 05:30:42 2018	(r468177)
+++ head/math/Makefile	Tue Apr 24 06:03:05 2018	(r468178)
@@ -686,6 +686,7 @@
     SUBDIR += py-pandas
     SUBDIR += py-pandas-datareader
     SUBDIR += py-patsy
+    SUBDIR += py-piranha
     SUBDIR += py-plastex
     SUBDIR += py-probstat
     SUBDIR += py-pyasp

Added: head/math/py-piranha/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-piranha/Makefile	Tue Apr 24 06:03:05 2018	(r468178)
@@ -0,0 +1,45 @@
+# $FreeBSD$
+
+PORTNAME=	piranha
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.10
+CATEGORIES=	math
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Python binding for Piranha, the computer algebra system
+
+LICENSE=	GPLv3 LGPL3
+LICENSE_COMB=	dual
+LICENSE_FILE_GPLv3=	${WRKSRC}/COPYING.gpl3
+LICENSE_FILE_LGPL3=	${WRKSRC}/COPYING.lgpl3
+
+BUILD_DEPENDS=	${LOCALBASE}/include/piranha/piranha.hpp:math/${PORTNAME}
+LIB_DEPENDS=	libboost_iostreams.so:devel/boost-libs \
+		libgmp.so:math/gmp \
+		libmpfr.so:math/mpfr \
+		${PY_BOOST}
+
+USES=		cmake:outsource compiler:c++14-lang python
+USE_GITHUB=	yes
+GH_ACCOUNT=	bluescarni
+USE_PYTHON=	flavors
+
+PYTHON_SUFFIX_LETTER=	${PYTHON_VER:C/^2.*//:C/^3.*/m/}
+
+CMAKE_ON=	BUILD_PYRANHA
+CMAKE_OFF=	PIRANHA_INSTALL_HEADERS
+CMAKE_ARGS=	-DPYTHON_EXECUTABLE:STRING=${PYTHON_CMD} \
+		-DPYTHON_LIBRARIES:STRING=${LOCALBASE}/lib/libpython${PYTHON_VER}${PYTHON_SUFFIX_LETTER}.so \
+		-DPYTHON_INCLUDE_DIRS:STRING=${LOCALBASE}/include/python${PYTHON_VER}${PYTHON_SUFFIX_LETTER} \
+		-DPYTHONLIBS_VERSION_STRING:STRING=${PYTHON_VER} \
+		-DPYTHON_VERSION_MAJOR:STRING=${PYTHON_MAJOR_VER} \
+		-DPYTHON_VERSION_MINOR:STRING=${PYTHON_VER:C/[0-9]\.//}
+
+post-patch: # FIND_PACKAGE(Boost) only supports modules python and python3
+	@${REINPLACE_CMD} -e 's|$${REQUIRED_BOOST_LIBS} python)|$${REQUIRED_BOOST_LIBS} python${PYTHON_MAJOR_VER:S/2//})|' ${WRKSRC}/CMakeLists.txt
+
+post-install:
+	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/pyranha/_core.so
+
+.include <bsd.port.mk>

Added: head/math/py-piranha/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-piranha/distinfo	Tue Apr 24 06:03:05 2018	(r468178)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1522392828
+SHA256 (bluescarni-piranha-v0.10_GH0.tar.gz) = e2feefb7dac5e441688b2d849c1d89219243ce9a5daeb611b1d9fe952c86bd26
+SIZE (bluescarni-piranha-v0.10_GH0.tar.gz) = 821512

Added: head/math/py-piranha/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-piranha/files/patch-CMakeLists.txt	Tue Apr 24 06:03:05 2018	(r468178)
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2018-03-30 18:21:52 UTC
++++ CMakeLists.txt
+@@ -196,7 +196,7 @@ IF(USE_TCMALLOC AND CMAKE_BUILD_TYPE STR
+ ENDIF()
+ 
+ # Try to determine the git revision.
+-find_package(Git)
++#find_package(Git)
+ if(Git_FOUND)
+ 	message(STATUS "Git executable: ${GIT_EXECUTABLE}")
+ 	execute_process(COMMAND ${GIT_EXECUTABLE} "log" "--no-color" "-n1" "--date=short" "--pretty=format:%H" WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} OUTPUT_VARIABLE PIRANHA_GIT_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)

Added: head/math/py-piranha/files/patch-cmake__modules_yacma_YACMAPythonSetup.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-piranha/files/patch-cmake__modules_yacma_YACMAPythonSetup.cmake	Tue Apr 24 06:03:05 2018	(r468178)
@@ -0,0 +1,13 @@
+--- cmake_modules/yacma/YACMAPythonSetup.cmake.orig	2018-03-30 18:25:11 UTC
++++ cmake_modules/yacma/YACMAPythonSetup.cmake
+@@ -6,8 +6,8 @@ endif()
+ include(YACMACompilerLinkerSettings)
+ 
+ # Find Python interpreter and libraries. This is the order suggested by CMake's documentation.
+-find_package(PythonInterp REQUIRED)
+-find_package(PythonLibs REQUIRED)
++#find_package(PythonInterp REQUIRED)
++#find_package(PythonLibs REQUIRED)
+ message(STATUS "Python interpreter: ${PYTHON_EXECUTABLE}")
+ message(STATUS "Python libraries: ${PYTHON_LIBRARIES}")
+ message(STATUS "Python include dirs: ${PYTHON_INCLUDE_DIRS}")

Added: head/math/py-piranha/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-piranha/pkg-descr	Tue Apr 24 06:03:05 2018	(r468178)
@@ -0,0 +1,10 @@
+Piranha is a computer-algebra library for the symbolic manipulation of sparse
+multivariate polynomials and other closely-related symbolic objects (such as
+Poisson series).
+
+Piranha is written in modern C++, with emphasis on portability, correctness and
+performance. Piranha also includes a set of optional bindings for the Python
+programming language, called Pyranha, that allow to use the library in an
+interactive and script-oriented way.
+
+WWW: https://github.com/bluescarni/piranha

Added: head/math/py-piranha/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-piranha/pkg-plist	Tue Apr 24 06:03:05 2018	(r468178)
@@ -0,0 +1,12 @@
+%%PYTHON_SITELIBDIR%%/pyranha/__init__.py
+%%PYTHON_SITELIBDIR%%/pyranha/_common.py
+%%PYTHON_SITELIBDIR%%/pyranha/_core.so
+%%PYTHON_SITELIBDIR%%/pyranha/_tutorial/__init__.py
+%%PYTHON_SITELIBDIR%%/pyranha/_tutorial/hello_piranha.py
+%%PYTHON_SITELIBDIR%%/pyranha/_tutorial/integer.py
+%%PYTHON_SITELIBDIR%%/pyranha/_tutorial/rational.py
+%%PYTHON_SITELIBDIR%%/pyranha/_version.py
+%%PYTHON_SITELIBDIR%%/pyranha/celmec.py
+%%PYTHON_SITELIBDIR%%/pyranha/math.py
+%%PYTHON_SITELIBDIR%%/pyranha/test.py
+%%PYTHON_SITELIBDIR%%/pyranha/types.py



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