diff --git a/science/thermofun/Makefile b/science/thermofun/Makefile index 20738a3c4cc3..395e3421c7df 100644 --- a/science/thermofun/Makefile +++ b/science/thermofun/Makefile @@ -1,22 +1,36 @@ PORTNAME= thermofun DISTVERSIONPREFIX= v -DISTVERSION= 0.3.9 +DISTVERSION= 0.4.0 CATEGORIES= science # chemistry MAINTAINER= yuri@FreeBSD.org 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 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 8b8352d191d7..6271051840cf 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 000000000000..9919f4931845 --- /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 6270720c9aa4..ae0bee96a6b6 100644 --- a/science/thermofun/pkg-plist +++ b/science/thermofun/pkg-plist @@ -1,70 +1,74 @@ include/ThermoFun/Batch/OutputBatch.h include/ThermoFun/Batch/ThermoBatch.h include/ThermoFun/Common/Exception.h include/ThermoFun/Common/OutputToCSV.h include/ThermoFun/Common/OutputWaterSteamConventionProp.h include/ThermoFun/Common/ParseJsonToData.h include/ThermoFun/Common/ScalarTypes.hpp include/ThermoFun/Common/ThermoOmp.h include/ThermoFun/Common/ThermoScalar.hpp include/ThermoFun/Common/Units.hpp include/ThermoFun/Database.h include/ThermoFun/ElectroModelsSolvent.h include/ThermoFun/Element.h include/ThermoFun/GlobalVariables.h include/ThermoFun/OptimizationUtils.h include/ThermoFun/Reaction.h include/ThermoFun/Reactions/DolejsManning2010.h include/ThermoFun/Reactions/FrantzMarshall.h include/ThermoFun/Reactions/LogK_function_of_T.h include/ThermoFun/Reactions/RyzhenkoBryzgalyn.h include/ThermoFun/Reactions/Volume_function_of_T.h include/ThermoFun/Substance.h include/ThermoFun/Substances/EmpiricalCpIntegration.h include/ThermoFun/Substances/Gases/GasCGF.h include/ThermoFun/Substances/Gases/GasCORK.h include/ThermoFun/Substances/Gases/GasPR78.h include/ThermoFun/Substances/Gases/GasPRSV.h include/ThermoFun/Substances/Gases/GasSRK.h include/ThermoFun/Substances/Gases/GasSTP.h include/ThermoFun/Substances/Gases/s_solmod_.h include/ThermoFun/Substances/Gases/verror.h include/ThermoFun/Substances/Solids/SolidBMGottschalk.h include/ThermoFun/Substances/Solids/SolidBerman88.h include/ThermoFun/Substances/Solids/SolidHPLandau.h include/ThermoFun/Substances/Solids/SolidMurnaghanHP98.h include/ThermoFun/Substances/Solute/SoluteADgems.h include/ThermoFun/Substances/Solute/SoluteAnderson91.h include/ThermoFun/Substances/Solute/SoluteHKFgems.h include/ThermoFun/Substances/Solute/SoluteHKFreaktoro.h include/ThermoFun/Substances/Solute/SoluteHollandPowell98.h include/ThermoFun/Substances/Solvent/Reaktoro/WaterConstants.hpp include/ThermoFun/Substances/Solvent/Reaktoro/WaterElectroState.hpp include/ThermoFun/Substances/Solvent/Reaktoro/WaterElectroStateJohnsonNorton.hpp include/ThermoFun/Substances/Solvent/Reaktoro/WaterHelmholtzState.hpp include/ThermoFun/Substances/Solvent/Reaktoro/WaterHelmholtzStateHGK.hpp include/ThermoFun/Substances/Solvent/Reaktoro/WaterHelmholtzStateWagnerPruss.hpp include/ThermoFun/Substances/Solvent/Reaktoro/WaterThermoState.hpp include/ThermoFun/Substances/Solvent/Reaktoro/WaterThermoStateUtils.hpp include/ThermoFun/Substances/Solvent/Reaktoro/WaterUtils.hpp include/ThermoFun/Substances/Solvent/WaterElectroFernandez1997.h include/ThermoFun/Substances/Solvent/WaterElectroSverjensky2014.h include/ThermoFun/Substances/Solvent/WaterHGK-JNgems.h include/ThermoFun/Substances/Solvent/WaterHGKreaktoro.h include/ThermoFun/Substances/Solvent/WaterIdealGasWolley.h include/ThermoFun/Substances/Solvent/WaterJN91reaktoro.h include/ThermoFun/Substances/Solvent/WaterWP95reaktoro.h include/ThermoFun/Substances/Solvent/WaterZhangDuan2005.h include/ThermoFun/Substances/StandardEntropyCpIntegration.h include/ThermoFun/ThermoEngine.h include/ThermoFun/ThermoFun.h include/ThermoFun/ThermoModelsReaction.h include/ThermoFun/ThermoModelsSolvent.h include/ThermoFun/ThermoModelsSubstance.h include/ThermoFun/ThermoParameters.h include/ThermoFun/ThermoProperties.h lib/cmake/ThermoFun/ThermoFunConfig.cmake 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