diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2018-04-24 06:03:05 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2018-04-24 06:03:05 +0000 |
commit | b9a8663a12547718763f037a28ca30ce04528f90 (patch) | |
tree | bc727001937b60caea7e70cb25be8c40ddc0211e /math/py-piranha | |
parent | 86bba3009d825034c05d63c9003b1e0bec70a81b (diff) | |
download | freebsd-ports-b9a8663a12547718763f037a28ca30ce04528f90.zip |
New port: math/py-piranha: Python binding for Piranha, the computer algebra system
Diffstat (limited to 'math/py-piranha')
-rw-r--r-- | math/py-piranha/Makefile | 45 | ||||
-rw-r--r-- | math/py-piranha/distinfo | 3 | ||||
-rw-r--r-- | math/py-piranha/files/patch-CMakeLists.txt | 11 | ||||
-rw-r--r-- | math/py-piranha/files/patch-cmake__modules_yacma_YACMAPythonSetup.cmake | 13 | ||||
-rw-r--r-- | math/py-piranha/pkg-descr | 10 | ||||
-rw-r--r-- | math/py-piranha/pkg-plist | 12 |
6 files changed, 94 insertions, 0 deletions
diff --git a/math/py-piranha/Makefile b/math/py-piranha/Makefile new file mode 100644 index 000000000000..80830d45e9df --- /dev/null +++ b/math/py-piranha/Makefile @@ -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> diff --git a/math/py-piranha/distinfo b/math/py-piranha/distinfo new file mode 100644 index 000000000000..5013bc74b26d --- /dev/null +++ b/math/py-piranha/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1522392828 +SHA256 (bluescarni-piranha-v0.10_GH0.tar.gz) = e2feefb7dac5e441688b2d849c1d89219243ce9a5daeb611b1d9fe952c86bd26 +SIZE (bluescarni-piranha-v0.10_GH0.tar.gz) = 821512 diff --git a/math/py-piranha/files/patch-CMakeLists.txt b/math/py-piranha/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..67ab069697e5 --- /dev/null +++ b/math/py-piranha/files/patch-CMakeLists.txt @@ -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) diff --git a/math/py-piranha/files/patch-cmake__modules_yacma_YACMAPythonSetup.cmake b/math/py-piranha/files/patch-cmake__modules_yacma_YACMAPythonSetup.cmake new file mode 100644 index 000000000000..c57ca35940e1 --- /dev/null +++ b/math/py-piranha/files/patch-cmake__modules_yacma_YACMAPythonSetup.cmake @@ -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}") diff --git a/math/py-piranha/pkg-descr b/math/py-piranha/pkg-descr new file mode 100644 index 000000000000..c02017b7ac10 --- /dev/null +++ b/math/py-piranha/pkg-descr @@ -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 diff --git a/math/py-piranha/pkg-plist b/math/py-piranha/pkg-plist new file mode 100644 index 000000000000..01e67f0f2d25 --- /dev/null +++ b/math/py-piranha/pkg-plist @@ -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 |