git: de6021150895 - main - science/openems: Fix build with HDF5 1.12.0+

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 18 Jul 2022 12:52:01 UTC
The branch main has been updated by sunpoet:

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

commit de60211508958485595161815c016b3ea5466e22
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-07-18 12:50:24 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-07-18 12:51:28 +0000

    science/openems: Fix build with HDF5 1.12.0+
---
 science/openems/Makefile         |  3 ++-
 science/openems/files/patch-hdf5 | 13 +++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/science/openems/Makefile b/science/openems/Makefile
index 3488ec1e3236..f7d5c0db03d2 100644
--- a/science/openems/Makefile
+++ b/science/openems/Makefile
@@ -31,7 +31,8 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	thliebig
 GH_PROJECT=	openEMS
 
-CMAKE_ARGS=	-DVTK_DIR=${LOCALBASE}/lib/cmake/vtk-9.1
+CMAKE_ARGS=	-DVTK_DIR=${LOCALBASE}/lib/cmake/vtk-9.1 \
+		-DLOCALBASE=${LOCALBASE}
 
 CXXFLAGS+=	-I${LOCALBASE}/include/fparser # fparser.pc probably returns a wrong value
 
diff --git a/science/openems/files/patch-hdf5 b/science/openems/files/patch-hdf5
new file mode 100644
index 000000000000..b88530ce9aa7
--- /dev/null
+++ b/science/openems/files/patch-hdf5
@@ -0,0 +1,13 @@
+--- CMakeLists.txt.orig	2022-02-15 18:12:06 UTC
++++ CMakeLists.txt
+@@ -114,7 +114,9 @@ message(STATUS "TinyXML_LIBRARY: ${TinyXML_LIBRARY}")
+ INCLUDE_DIRECTORIES( ${TinyXML_INCLUDE_DIR} )
+ 
+ # hdf5
+-find_package(HDF5 1.8 COMPONENTS C HL REQUIRED)
++set(HDF5_INCLUDE_DIRS "${LOCALBASE}/include")
++set(HDF5_LIBRARIES "-L${LOCALBASE}/lib -lhdf5 -lhdf5_cpp")
++set(HDF5_LIBRARY_DIRS "${LOCALBASE}/lib")
+ INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIRS})
+ link_directories(${HDF5_LIBRARIES})
+ # hdf5 compat