git: d03746a74ee3 - main - science/thermofun: update 0.5.1 → 0.7.1

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Wed, 07 Oct 2026 18:02:51 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d03746a74ee3d1785df12a1e6b043eeb23d205a1

commit d03746a74ee3d1785df12a1e6b043eeb23d205a1
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-10-07 18:02:38 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-10-07 18:02:49 +0000

    science/thermofun: update 0.5.1 → 0.7.1
---
 science/thermofun/Makefile                         | 29 +++++------
 science/thermofun/distinfo                         |  6 +--
 .../thermofun/files/patch-python_CMakeLists.txt    | 60 ++++++++++++++++++++++
 .../files/patch-python_thermofun_CMakeLists.txt    | 20 --------
 science/thermofun/pkg-plist                        | 20 ++++----
 5 files changed, 86 insertions(+), 49 deletions(-)

diff --git a/science/thermofun/Makefile b/science/thermofun/Makefile
index 9dbd9ef9f8b9..b3e250d05ec1 100644
--- a/science/thermofun/Makefile
+++ b/science/thermofun/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	thermofun
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.5.1
+DISTVERSION=	0.7.1
 CATEGORIES=	science # chemistry
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -14,14 +14,12 @@ BUILD_DEPENDS=	nlohmann-json>0:devel/nlohmann-json \
 		spdlog>0:devel/spdlog
 LIB_DEPENDS=	libChemicalFun.so:science/chemicalfun
 
-USES=		cmake
+USES=		cmake compiler:c++20-lang
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	thermohub
 
-TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
-
-CXXFLAGS+=	-DSPDLOG_FMT_EXTERNAL # see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258073#c3
+CMAKE_OFF=	TFUN_USE_AUTODIFF # TODO add port for autodiff library
 
 TEST_WRKSRC=	${WRKSRC}
 
@@ -29,20 +27,17 @@ OPTIONS_DEFINE=		PYTHON
 OPTIONS_DEFAULT=	PYTHON
 OPTIONS_SUB=		yes
 
-PYTHON_BUILD_DEPENDS=	pybind11>0:devel/pybind11 \
-			${PY_SETUPTOOLS} \
-			${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \
-			${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR}
 PYTHON_USES=		python
 PYTHON_USE=		PYTHON=pytest
 PYTHON_CMAKE_BOOL=	TFUN_BUILD_PYTHON
-PYTHON_CMAKE_ON=	-DFREEBSD_STAGEDIR=${STAGEDIR} -DFREEBSD_PREFIX=${PREFIX}
-
-post-install-PYTHON-on:
-	# remove wrong *.pyc, see related bug https://bitbucket.org/gems4/chemicalfun/issues/1/please-support-stagedir
-	@${FIND} ${STAGEDIR} -name "*.pyc" -delete
-	@${FIND} ${STAGEDIR} -name __pycache__ -delete
-	# strip binary
-	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/thermofun/PyThermoFun${PYTHON_TAG}.so
+PYTHON_CMAKE_ON=	-DFREEBSD_PREFIX=${PREFIX}
+PYTHON_BUILD_DEPENDS=	pybind11>0:devel/pybind11
+
+TEST_ENV=	${MAKE_ENV} \
+		PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \
+		LD_LIBRARY_PATH=${STAGEDIR}${PREFIX}/lib:${STAGEDIR}${LOCALBASE}/lib
+TEST_ARGS=	--disable-plugin-autoload
+
+# tests as of 0.7.1: 53 passed, 53 skipped in 0.48s
 
 .include <bsd.port.mk>
diff --git a/science/thermofun/distinfo b/science/thermofun/distinfo
index 59f3dc735b4f..a77fc2065bc5 100644
--- a/science/thermofun/distinfo
+++ b/science/thermofun/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1746512235
-SHA256 (thermohub-thermofun-v0.5.1_GH0.tar.gz) = 9f3bcd20112155f5b0d65e39768eceaef3f041485812c9211c281a318b3f057d
-SIZE (thermohub-thermofun-v0.5.1_GH0.tar.gz) = 2087867
+TIMESTAMP = 1791387076
+SHA256 (thermohub-thermofun-v0.7.1_GH0.tar.gz) = d12ef613f25f1b30f2f442b5c084a95c75d0371c389d2d8829993c727ad2cce1
+SIZE (thermohub-thermofun-v0.7.1_GH0.tar.gz) = 2257599
diff --git a/science/thermofun/files/patch-python_CMakeLists.txt b/science/thermofun/files/patch-python_CMakeLists.txt
new file mode 100644
index 000000000000..e0bda47e202b
--- /dev/null
+++ b/science/thermofun/files/patch-python_CMakeLists.txt
@@ -0,0 +1,60 @@
+--- python/CMakeLists.txt.orig	2026-10-05 10:38:56 UTC
++++ python/CMakeLists.txt
+@@ -7,47 +7,16 @@ if(NOT DEFINED THERMOFUN_PYTHON_INSTALL_PREFIX)
+ 
+ # Install where the python package is installed to CMAKE_INSTALL_PREFIX if not given
+ if(NOT DEFINED THERMOFUN_PYTHON_INSTALL_PREFIX)
++    set(THERMOFUN_PYTHON_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
++endif()
+ 
+-# Install the ThermoFun python package using setuptools
+-install(CODE
+-"
+-   if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
+-      execute_process(
+-        COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:PyThermoFun>
+-                ${CMAKE_CURRENT_BINARY_DIR}/src/thermofun/$<TARGET_FILE_NAME:PyThermoFun>
+-      )
+-   endif()
+-
+-   execute_process(
+-        COMMAND ${Python3_EXECUTABLE} -m pip install ${CMAKE_CURRENT_BINARY_DIR} -vv
+-        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+-"
++# Just install the shared object library built by pybind11 natively
++install(TARGETS PyThermoFun
++    DESTINATION "${THERMOFUN_PYTHON_INSTALL_PREFIX}/lib/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/thermofun"
+ )
+-
+-else()
+-
+-# If the path is already in Windows format (with backslashes), it can't be added directly
+-# to the string below, otherwise CMake will later complain about "Invalid escape sequence".
+-file(TO_CMAKE_PATH "${THERMOFUN_PYTHON_INSTALL_PREFIX}" THERMOFUN_PYTHON_INSTALL_PREFIX)
+-message(STATUS "THERMOFUN_PYTHON_INSTALL_PREFIX: ${THERMOFUN_PYTHON_INSTALL_PREFIX}")
+-
+-# Install the ThermoFun python package using setuptools
+-install(CODE
+-"
+-   file(TO_NATIVE_PATH \"${THERMOFUN_PYTHON_INSTALL_PREFIX}\" THERMOFUN_PYTHON_INSTALL_PREFIX_NATIVE)
+-
+-   if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
+-      execute_process(
+-        COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:PyThermoFun>
+-                ${CMAKE_CURRENT_BINARY_DIR}/src/thermofun/$<TARGET_FILE_NAME:PyThermoFun>
+-        )
+-    endif()
+-
+-    execute_process(
+-        COMMAND ${Python3_EXECUTABLE} -m pip install --prefix \${THERMOFUN_PYTHON_INSTALL_PREFIX_NATIVE} ${CMAKE_CURRENT_BINARY_DIR} -vv
+-        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+-"
++ 
++# Install the Python source wrapper files natively 
++install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/thermofun/
++        DESTINATION "${THERMOFUN_PYTHON_INSTALL_PREFIX}/lib/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/thermofun"
++        FILES_MATCHING PATTERN "*.py"
+ )
+-
+-endif()
+-
diff --git a/science/thermofun/files/patch-python_thermofun_CMakeLists.txt b/science/thermofun/files/patch-python_thermofun_CMakeLists.txt
deleted file mode 100644
index 1f43ef2f810b..000000000000
--- a/science/thermofun/files/patch-python_thermofun_CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
---- python/thermofun/CMakeLists.txt.orig	2025-05-05 07:34:58 UTC
-+++ python/thermofun/CMakeLists.txt
-@@ -26,7 +26,7 @@ add_custom_target(thermofun ALL
-     COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:PyThermoFun> 
-         ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_NAME:PyThermoFun>
-     #COMMAND ${PYTHON_EXECUTABLE} -m pip install ${_PIP_ARG} -e ${CMAKE_CURRENT_BINARY_DIR}
--    COMMAND ${PYTHON_EXECUTABLE} -m pip install --prefix ${CMAKE_BINARY_DIR} --ignore-installed .
-+    COMMAND ${PYTHON_EXECUTABLE} -m pip install --root ${FREEBSD_STAGEDIR} --prefix ${FREEBSD_PREFIX} --ignore-installed .
-     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
- 
- # Set dependencies of thermofun target
-@@ -71,7 +71,7 @@ install(CODE
-     endif()
- 
-     execute_process(
--        COMMAND \"${PYTHON_EXECUTABLE}\" -m pip install --prefix \"${THERMOFUN_PYTHON_INSTALL_PREFIX}\" \"${CMAKE_CURRENT_BINARY_DIR}\"
-+        COMMAND \"${PYTHON_EXECUTABLE}\" -m pip install --root ${FREEBSD_STAGEDIR} --prefix ${FREEBSD_PREFIX} \"${CMAKE_CURRENT_BINARY_DIR}\"
-         WORKING_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}\")
- "
- )
diff --git a/science/thermofun/pkg-plist b/science/thermofun/pkg-plist
index 68b9fb7d44c2..49d110e7fcdf 100644
--- a/science/thermofun/pkg-plist
+++ b/science/thermofun/pkg-plist
@@ -4,8 +4,11 @@ include/ThermoFun/Common/Exception.h
 include/ThermoFun/Common/OutputToCSV.h
 include/ThermoFun/Common/OutputWaterSteamConventionProp.h
 include/ThermoFun/Common/ParseJsonToData.h
+include/ThermoFun/Common/Real.hpp
+include/ThermoFun/Common/Rounding.hpp
 include/ThermoFun/Common/ScalarTypes.hpp
 include/ThermoFun/Common/ThermoOmp.h
+include/ThermoFun/Common/ThermoProperty.hpp
 include/ThermoFun/Common/ThermoScalar.hpp
 include/ThermoFun/Common/Units.hpp
 include/ThermoFun/Database.h
@@ -21,6 +24,8 @@ 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/CGFanalytic.hpp
+include/ThermoFun/Substances/Gases/CGFpure.hpp
 include/ThermoFun/Substances/Gases/GasCGF.h
 include/ThermoFun/Substances/Gases/GasCORK.h
 include/ThermoFun/Substances/Gases/GasPR78.h
@@ -47,6 +52,7 @@ 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/SolventDensityDerivatives.hpp
 include/ThermoFun/Substances/Solvent/WaterElectroFernandez1997.h
 include/ThermoFun/Substances/Solvent/WaterElectroSverjensky2014.h
 include/ThermoFun/Substances/Solvent/WaterHGK-JNgems.h
@@ -68,12 +74,8 @@ lib/cmake/ThermoFun/ThermoFunConfigVersion.cmake
 lib/cmake/ThermoFun/ThermoFunTargets-%%CMAKE_BUILD_TYPE%%.cmake
 lib/cmake/ThermoFun/ThermoFunTargets.cmake
 lib/libThermoFun.so
-%%PYTHON_SITELIBDIR%%/thermofun-0.5.0.dist-info/INSTALLER
-%%PYTHON_SITELIBDIR%%/thermofun-0.5.0.dist-info/METADATA
-%%PYTHON_SITELIBDIR%%/thermofun-0.5.0.dist-info/RECORD
-%%PYTHON_SITELIBDIR%%/thermofun-0.5.0.dist-info/REQUESTED
-%%PYTHON_SITELIBDIR%%/thermofun-0.5.0.dist-info/WHEEL
-%%PYTHON_SITELIBDIR%%/thermofun-0.5.0.dist-info/direct_url.json
-%%PYTHON_SITELIBDIR%%/thermofun-0.5.0.dist-info/top_level.txt
-%%PYTHON_SITELIBDIR%%/thermofun/PyThermoFun%%PYTHON_TAG%%.so
-%%PYTHON_SITELIBDIR%%/thermofun/__init__.py
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/thermofun/PyThermoFun%%PYTHON_TAG%%.so
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/thermofun/__init__.py
+@dir include/ThermoFun/Substances/Gases/tools
+%%PYTHON%%@dir %%PYTHON_SITELIBDIR%%/thermofun/Batch
+%%PYTHON%%@dir %%PYTHON_SITELIBDIR%%/thermofun/Common