From 9c92256b3bfad9d1c347ebfca7fd7e6ecf697f08 Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Sun, 17 Jul 2022 13:03:20 -0700 Subject: [PATCH] science/thermofun: Update 0.3.9 -> 0.4.0 Reported by: portscout --- science/thermofun/Makefile | 20 ++++++++++++++++--- science/thermofun/distinfo | 6 +++--- .../patch-python_thermofun_CMakeLists.txt | 11 ++++++++++ science/thermofun/pkg-plist | 4 ++++ 4 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 science/thermofun/files/patch-python_thermofun_CMakeLists.txt diff --git a/science/thermofun/Makefile b/science/thermofun/Makefile index 20738a3c4cc34..395e3421c7dfe 100644 --- a/science/thermofun/Makefile +++ b/science/thermofun/Makefile @@ -1,6 +1,6 @@ PORTNAME= thermofun DISTVERSIONPREFIX= v -DISTVERSION= 0.3.9 +DISTVERSION= 0.4.0 CATEGORIES= science # chemistry MAINTAINER= yuri@FreeBSD.org @@ -9,7 +9,8 @@ COMMENT= Code for calculating thermodynamic properties of materials LICENSE= LGPL3 LICENSE_FILE= ${WRKSRC}/COPYING -BUILD_DEPENDS= nlohmann-json>0:devel/nlohmann-json +BUILD_DEPENDS= nlohmann-json>0:devel/nlohmann-json \ + spdlog>0:devel/spdlog LIB_DEPENDS= libChemicalFun.so:science/chemicalfun USES= cmake compiler:c++14-lang @@ -17,6 +18,19 @@ USES= cmake compiler:c++14-lang USE_GITHUB= yes GH_ACCOUNT= thermohub -CMAKE_OFF= TFUN_BUILD_PYTHON +CXXFLAGS+= -DSPDLOG_FMT_EXTERNAL # see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258073#c3 + +OPTIONS_DEFINE= PYTHON +OPTIONS_DEFAULT= PYTHON +OPTIONS_SUB= yes + +PYTHON_USES= python +PYTHON_USE= PYTHON=pytest +PYTHON_CMAKE_BOOL= TFUN_BUILD_PYTHON +PYTHON_CMAKE_ON= -DFREEBSD_STAGEDIR=${STAGEDIR} +PYTHON_BUILD_DEPENDS= pybind11>0:devel/pybind11 + +post-install-PYTHON-on: + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/thermofun/PyThermoFun${PYTHON_EXT_SUFFIX}.so .include diff --git a/science/thermofun/distinfo b/science/thermofun/distinfo index 8b8352d191d70..6271051840cf4 100644 --- a/science/thermofun/distinfo +++ b/science/thermofun/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1642529596 -SHA256 (thermohub-thermofun-v0.3.9_GH0.tar.gz) = 49995b3a139e7ed93d2bf6ab09a316459bca809cf3f612878c9fa017befaf913 -SIZE (thermohub-thermofun-v0.3.9_GH0.tar.gz) = 1338633 +TIMESTAMP = 1658079403 +SHA256 (thermohub-thermofun-v0.4.0_GH0.tar.gz) = bd863174a272ddf166643312bc4b759cb429ed0230e9023678357673e56569b2 +SIZE (thermohub-thermofun-v0.4.0_GH0.tar.gz) = 1340065 diff --git a/science/thermofun/files/patch-python_thermofun_CMakeLists.txt b/science/thermofun/files/patch-python_thermofun_CMakeLists.txt new file mode 100644 index 0000000000000..9919f4931845b --- /dev/null +++ b/science/thermofun/files/patch-python_thermofun_CMakeLists.txt @@ -0,0 +1,11 @@ +--- python/thermofun/CMakeLists.txt.orig 2022-07-17 19:24:14 UTC ++++ python/thermofun/CMakeLists.txt +@@ -43,7 +43,7 @@ install(CODE + endif() + + execute_process( +- COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install --prefix=\${THERMOFUN_PYTHON_INSTALL_PREFIX_NATIVE} ++ COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install --root=${FREEBSD_STAGEDIR} --prefix=\${THERMOFUN_PYTHON_INSTALL_PREFIX_NATIVE} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + " + ) diff --git a/science/thermofun/pkg-plist b/science/thermofun/pkg-plist index 6270720c9aa4c..ae0bee96a6b6e 100644 --- a/science/thermofun/pkg-plist +++ b/science/thermofun/pkg-plist @@ -68,3 +68,7 @@ lib/cmake/ThermoFun/ThermoFunConfigVersion.cmake lib/cmake/ThermoFun/ThermoFunTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/ThermoFun/ThermoFunTargets.cmake lib/libThermoFun.so +%%PYTHON%%%%PYTHON_SITELIBDIR%%/thermofun/PyThermoFun%%PYTHON_EXT_SUFFIX%%.so +%%PYTHON%%%%PYTHON_SITELIBDIR%%/thermofun/__init__.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/thermofun/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc +%%PYTHON%%%%PYTHON_SITELIBDIR%%/thermofun-0.4.0-py%%PYTHON_VER%%.egg-info