diff --git a/ports/netgen/142.diff b/ports/netgen/142.diff index 6e8fe2de1297d1..4982e31ec422a4 100644 --- a/ports/netgen/142.diff +++ b/ports/netgen/142.diff @@ -1,13 +1,13 @@ -diff --git a/cmake/generate_version_file.cmake b/cmake/generate_version_file.cmake -index c4a579d1..c47b6039 100644 ---- a/cmake/generate_version_file.cmake -+++ b/cmake/generate_version_file.cmake -@@ -39,7 +39,7 @@ string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-([0-9a-z]+).*" "\\1" - set(NETGEN_VERSION_SHORT ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}.${NETGEN_VERSION_PATCH}) - set(NETGEN_VERSION_LONG ${NETGEN_VERSION_SHORT}-${NETGEN_VERSION_TWEAK}-${NETGEN_VERSION_HASH}) - --if(NETGEN_VERSION_TWEAK) -+if(NETGEN_VERSION_TWEAK AND NOT NETGEN_VERSION_TWEAK STREQUAL git_version_string) - # no release version - nightly build - set(NETGEN_VERSION ${NETGEN_VERSION_LONG}) - else() +diff --git a/cmake/generate_version_file.cmake b/cmake/generate_version_file.cmake +index 82ab044..84fd0d3 100644 +--- a/cmake/generate_version_file.cmake ++++ b/cmake/generate_version_file.cmake +@@ -39,7 +39,7 @@ string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-([0-9a-z]+).*" "\\1" + set(NETGEN_VERSION_SHORT ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}.${NETGEN_VERSION_PATCH}) + set(NETGEN_VERSION_LONG ${NETGEN_VERSION_SHORT}-${NETGEN_VERSION_TWEAK}-${NETGEN_VERSION_HASH}) + +-if(NETGEN_VERSION_TWEAK) ++if(NETGEN_VERSION_TWEAK AND NOT NETGEN_VERSION_TWEAK STREQUAL git_version_string) + # no release version - nightly build + set(NETGEN_VERSION ${NETGEN_VERSION_LONG}) + else() diff --git a/ports/netgen/add_filesystem.patch b/ports/netgen/add_filesystem.patch index 47f9c2ae257878..625d00165c9656 100644 --- a/ports/netgen/add_filesystem.patch +++ b/ports/netgen/add_filesystem.patch @@ -1,8 +1,8 @@ diff --git a/libsrc/core/logging.hpp b/libsrc/core/logging.hpp -index adfed7e..d34d3e9 100644 ---- a/libsrc/core/logging.hpp +index 3899320..20f8133 100644 +--- a/libsrc/core/logging.hpp +++ b/libsrc/core/logging.hpp -@@ -6,6 +6,7 @@ +@@ -5,6 +5,7 @@ #include #include #include diff --git a/ports/netgen/cmake-adjustments.patch b/ports/netgen/cmake-adjustments.patch index 0683f567cb4ca7..3a45c8cfe21683 100644 --- a/ports/netgen/cmake-adjustments.patch +++ b/ports/netgen/cmake-adjustments.patch @@ -1,8 +1,42 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1bd0ce4..eec03de 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -87,7 +87,9 @@ set(NG_INSTALL_SUFFIX netgen CACHE STRING "Suffix appended to install directorie + if(USE_PYTHON) + if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.18) + find_package(Python3 REQUIRED COMPONENTS Development.Module) +- find_package(Python3 COMPONENTS Interpreter Development.Embed) ++ if(NOT CMAKE_CROSSCOMPILING) ++ find_package(Python3 COMPONENTS Interpreter Development.Embed) ++ endif() + else() + find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + endif() +@@ -312,6 +314,8 @@ else() + endif() + + if (USE_PYTHON) ++ set(PYBIND11_FINDPYTHON ON) ++ set(PYBIND11_USE_CROSSCOMPILING ON) + if (PREFER_SYSTEM_PYBIND11) + set(NG_INSTALL_PYBIND OFF) + find_package(pybind11 CONFIG REQUIRED) +@@ -324,6 +327,9 @@ if (USE_PYTHON) + if(Python3_LIBRARIES AND (WIN32 OR NOT BUILD_FOR_CONDA)) + target_link_libraries(netgen_python INTERFACE ${Python3_LIBRARIES}) + endif() ++ if (WIN32) ++ target_compile_definitions(netgen_python INTERFACE Py_NO_LINK_LIB) ++ endif() + + if(NG_INSTALL_PYBIND) + install(DIRECTORY ${pybind11_INCLUDE_DIR}/pybind11 DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel) diff --git a/libsrc/core/CMakeLists.txt b/libsrc/core/CMakeLists.txt -index c4f4795..cd5ad50 100644 ---- a/libsrc/core/CMakeLists.txt +index d91a1bb..f492089 100644 +--- a/libsrc/core/CMakeLists.txt +++ b/libsrc/core/CMakeLists.txt -@@ -28,8 +28,7 @@ endif(USE_PYTHON) +@@ -34,8 +34,7 @@ endif(USE_PYTHON) if(WIN32) target_compile_options(ngcore PUBLIC /bigobj /MP /W1 /wd4068) diff --git a/ports/netgen/downstream-fixes.patch b/ports/netgen/downstream-fixes.patch index d570ec874211bb..795a76e3672dc1 100644 --- a/ports/netgen/downstream-fixes.patch +++ b/ports/netgen/downstream-fixes.patch @@ -1,18 +1,18 @@ diff --git a/libsrc/stlgeom/stltopology.hpp b/libsrc/stlgeom/stltopology.hpp -index 2a3822f70..a14dc5bda 100644 +index ac16a28..99117b7 100644 --- a/libsrc/stlgeom/stltopology.hpp +++ b/libsrc/stlgeom/stltopology.hpp -@@ -350,7 +350,7 @@ public: +@@ -351,7 +351,7 @@ public: int GetNP() const { return points.Size(); } int AddPoint(const Point<3> & p) { points.Append(p); return points.Size(); } const Point<3> & GetPoint(STLPointId nr) const { return points[nr]; } // .Get(nr); } -+ DLL_HEADER int GetPointNum (const Point<3> & p); - int GetPointNum (const Point<3> & p); ++ DLL_HEADER int GetPointNum (const Point<3> & p); void SetPoint(STLPointId nr, const Point<3> & p) { points[nr] = p; } // { points.Elem(nr) = p; } auto & GetPoints() const { return points; } diff --git a/nglib/nglib.cpp b/nglib/nglib.cpp -index ee25f3814..c8fe35cb2 100644 +index c72e067..c8fe35c 100644 --- a/nglib/nglib.cpp +++ b/nglib/nglib.cpp @@ -619,6 +619,7 @@ namespace nglib diff --git a/ports/netgen/git-ver.patch b/ports/netgen/git-ver.patch index 710b6d60c7db4c..2cadad246bcd6b 100644 --- a/ports/netgen/git-ver.patch +++ b/ports/netgen/git-ver.patch @@ -1,13 +1,11 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6e9f4cc..bf92061 100644 ---- a/CMakeLists.txt +index af8ec30..1bd0ce4 100644 +--- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -430,7 +430,8 @@ endif (USE_MPEG) - ####################################################################### +@@ -439,6 +439,7 @@ endif (USE_MPEG) add_custom_target(ng_generate_version_file ${CMAKE_COMMAND} -- -DBDIR=${CMAKE_CURRENT_BINARY_DIR} -+ -DBDIR=${CMAKE_CURRENT_BINARY_DIR} + -DBDIR=${CMAKE_CURRENT_BINARY_DIR} + -DNETGEN_VERSION_GIT=${NETGEN_VERSION_GIT} -P ${CMAKE_CURRENT_LIST_DIR}/cmake/generate_version_file.cmake ) diff --git a/ports/netgen/occ-78.patch b/ports/netgen/occ-78.patch index ba67919387c183..63597cc83cf952 100644 --- a/ports/netgen/occ-78.patch +++ b/ports/netgen/occ-78.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0846f39bd..f7516afa4 100644 +index 47cbae1..d277630 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -372,25 +372,20 @@ if (USE_OCC) +@@ -375,25 +375,20 @@ if (USE_OCC) TKGeomAlgo TKGeomBase TKHLR @@ -32,10 +32,10 @@ index 0846f39bd..f7516afa4 100644 TKernel ) diff --git a/libsrc/occ/Partition_Loop3d.hxx b/libsrc/occ/Partition_Loop3d.hxx -index e1716691c..e8a434911 100644 +index e171669..fe77b90 100644 --- a/libsrc/occ/Partition_Loop3d.hxx +++ b/libsrc/occ/Partition_Loop3d.hxx -@@ -10,27 +10,16 @@ +@@ -10,27 +10,17 @@ #ifndef _Partition_Loop3d_HeaderFile #define _Partition_Loop3d_HeaderFile @@ -53,7 +53,7 @@ index e1716691c..e8a434911 100644 #include -#endif -#ifndef _Standard_Version_HeaderFile --#include + #include -#endif +#include +#include @@ -67,7 +67,7 @@ index e1716691c..e8a434911 100644 #endif class TopoDS_Shape; -@@ -38,6 +27,8 @@ class TopoDS_Shape; +@@ -38,6 +28,8 @@ class TopoDS_Shape; #if OCC_VERSION_HEX < 0x070000 class TopTools_ListOfShape; class TopTools_MapOfOrientedShape; @@ -77,7 +77,7 @@ index e1716691c..e8a434911 100644 class TopoDS_Edge; diff --git a/libsrc/occ/occ_edge.cpp b/libsrc/occ/occ_edge.cpp -index 0c907d78b..fd64c9a42 100644 +index 4805bb1..bb2b98e 100644 --- a/libsrc/occ/occ_edge.cpp +++ b/libsrc/occ/occ_edge.cpp @@ -55,7 +55,11 @@ namespace netgen @@ -93,7 +93,7 @@ index 0c907d78b..fd64c9a42 100644 void OCCEdge::ProjectPoint(Point<3>& p, EdgePointGeomInfo* gi) const diff --git a/libsrc/occ/occ_face.cpp b/libsrc/occ/occ_face.cpp -index 239982aa8..ea4dd15b4 100644 +index 239982a..ea4dd15 100644 --- a/libsrc/occ/occ_face.cpp +++ b/libsrc/occ/occ_face.cpp @@ -32,7 +32,11 @@ namespace netgen @@ -109,14 +109,13 @@ index 239982aa8..ea4dd15b4 100644 Point<3> OCCFace::GetCenter() const diff --git a/libsrc/occ/occ_solid.hpp b/libsrc/occ/occ_solid.hpp -index d598de4a2..66f28d73a 100644 +index d598de4..416c1eb 100644 --- a/libsrc/occ/occ_solid.hpp +++ b/libsrc/occ/occ_solid.hpp -@@ -16,8 +16,11 @@ namespace netgen - OCCSolid(TopoDS_Shape dshape) +@@ -17,7 +17,11 @@ namespace netgen : solid(TopoDS::Solid(dshape)) { } -- + +#if OCC_VERSION_HEX < 0x070800 size_t GetHash() const override { return solid.HashCode(std::numeric_limits::max()); } +#else @@ -126,7 +125,7 @@ index d598de4a2..66f28d73a 100644 } diff --git a/libsrc/occ/occ_vertex.cpp b/libsrc/occ/occ_vertex.cpp -index 6e83c8944..be8e38732 100644 +index 6e83c89..be8e387 100644 --- a/libsrc/occ/occ_vertex.cpp +++ b/libsrc/occ/occ_vertex.cpp @@ -19,6 +19,10 @@ namespace netgen @@ -141,10 +140,10 @@ index 6e83c8944..be8e38732 100644 } } diff --git a/libsrc/occ/occgeom.cpp b/libsrc/occ/occgeom.cpp -index bc0383f99..826134ba0 100644 +index 00ed0d0..ad58ae6 100644 --- a/libsrc/occ/occgeom.cpp +++ b/libsrc/occ/occgeom.cpp -@@ -1716,9 +1716,13 @@ namespace netgen +@@ -1717,8 +1717,12 @@ namespace netgen /* // enumerate shapes and archive only integers auto my_hash = [](const TopoDS_Shape & key) { @@ -154,7 +153,6 @@ index bc0383f99..826134ba0 100644 +#else + return std::hash{}(key); +#endif - }; + }; */ TopTools_IndexedMapOfShape shape_map; - Array shape_list; diff --git a/ports/netgen/static-exports.patch b/ports/netgen/static-exports.patch index 452f14cfe58945..a13f15bfb0762c 100644 --- a/ports/netgen/static-exports.patch +++ b/ports/netgen/static-exports.patch @@ -1,6 +1,6 @@ diff --git a/libsrc/core/ngcore_api.hpp b/libsrc/core/ngcore_api.hpp index e66e9b8..4ecaa05 100644 ---- a/libsrc/core/ngcore_api.hpp +--- a/libsrc/core/ngcore_api.hpp +++ b/libsrc/core/ngcore_api.hpp @@ -35,8 +35,13 @@ @@ -17,22 +17,22 @@ index e66e9b8..4ecaa05 100644 #define NGCORE_API_EXPORT __attribute__((visibility("default"))) #define NGCORE_API_IMPORT __attribute__((visibility("default"))) diff --git a/nglib/nglib.h b/nglib/nglib.h -index f8c745a..e4587d2 100644 ---- a/nglib/nglib.h +index 0e7c59e..971d2d9 100644 +--- a/nglib/nglib.h +++ b/nglib/nglib.h @@ -26,11 +26,15 @@ - // Philippose - 14.02.2009 - // Modifications for creating a DLL in Windows - #ifdef WIN32 -+ #if defined(NGSTATIC_BUILD) -+ #define NGLIB_API -+ #else - #ifdef nglib_EXPORTS - #define NGLIB_API __declspec(dllexport) - #else - #define NGLIB_API __declspec(dllimport) - #endif -+ #endif - #else - #define NGLIB_API __attribute__((visibility("default"))) - #endif + // Philippose - 14.02.2009 + // Modifications for creating a DLL in Windows + #ifdef WIN32 ++ #if defined(NGSTATIC_BUILD) ++ #define NGLIB_API ++ #else + #ifdef nglib_EXPORTS + #define NGLIB_API __declspec(dllexport) + #else + #define NGLIB_API __declspec(dllimport) + #endif ++ #endif + #else + #define NGLIB_API __attribute__((visibility("default"))) + #endif diff --git a/ports/netgen/vcpkg-fix-cgns-link.patch b/ports/netgen/vcpkg-fix-cgns-link.patch index e3fbc22d68e1f9..24adb3f4861817 100644 --- a/ports/netgen/vcpkg-fix-cgns-link.patch +++ b/ports/netgen/vcpkg-fix-cgns-link.patch @@ -1,13 +1,39 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index bf92061..933505d 100644 +index e5021d5..9d2909e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -500,7 +500,7 @@ endif(ENABLE_CPP_CORE_GUIDELINES_CHECK) +@@ -510,15 +510,10 @@ endif(ENABLE_CPP_CORE_GUIDELINES_CHECK) add_library(netgen_cgns INTERFACE) if(USE_CGNS) - find_library( CGNS_LIBRARY NAMES cgns cgnsdll ) -+ find_library( CGNS_LIBRARY NAMES cgnsdll cgns) - find_path( CGNS_INCLUDE_DIR cgnslib.h ) +- find_path( CGNS_INCLUDE_DIR cgnslib.h ) ++ find_package(cgns CONFIG REQUIRED) target_compile_definitions(netgen_cgns INTERFACE NG_CGNS) - target_include_directories(netgen_cgns INTERFACE ${CGNS_INCLUDE_DIR}) +- target_include_directories(netgen_cgns INTERFACE ${CGNS_INCLUDE_DIR}) +- target_link_libraries(netgen_cgns INTERFACE ${CGNS_LIBRARY}) +- if(NOT WIN32 AND NOT APPLE) # hdf5 is statically linked into cgns in Windows amd MacOS binaries +- find_library(HDF5_LIBRARY NAMES hdf5 hdf5_serial) +- target_link_libraries(netgen_cgns INTERFACE ${HDF5_LIBRARY}) +- endif(NOT WIN32 AND NOT APPLE) ++ target_link_libraries(netgen_cgns INTERFACE ++ $,CGNS::cgns_shared,CGNS::cgns_static>) + endif(USE_CGNS) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/netgen_version.hpp ${CMAKE_CURRENT_BINARY_DIR}/netgen_config.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE}/include COMPONENT netgen_devel) +diff --git a/cmake/NetgenConfig.cmake.in b/cmake/NetgenConfig.cmake.in +index 477ed214..05630cac 100644 +--- a/cmake/NetgenConfig.cmake.in ++++ b/cmake/NetgenConfig.cmake.in +@@ -70,6 +70,11 @@ set(NETGEN_USE_NUMA @USE_NUMA@) + set(NETGEN_PYTHON_RPATH "@NETGEN_PYTHON_RPATH@") + set(NETGEN_RPATH_TOKEN "@NG_RPATH_TOKEN@") + ++if(NETGEN_USE_CGNS) ++ include(CMakeFindDependencyMacro) ++ find_dependency(cgns CONFIG) ++endif() ++ + set(NETGEN_INSTALL_DIR_PYTHON @NG_INSTALL_DIR_PYTHON@) + set(NETGEN_INSTALL_DIR_BIN @NG_INSTALL_DIR_BIN@) + set(NETGEN_INSTALL_DIR_LIB @NG_INSTALL_DIR_LIB@) diff --git a/ports/netgen/vcpkg.json b/ports/netgen/vcpkg.json index af020132aabc2e..95760a98bb0778 100644 --- a/ports/netgen/vcpkg.json +++ b/ports/netgen/vcpkg.json @@ -1,7 +1,7 @@ { "name": "netgen", "version": "6.2.2401", - "port-version": 2, + "port-version": 3, "description": "NETGEN is an automatic 3d tetrahedral mesh generator. It accepts input from constructive solid geometry (CSG) or boundary representation (BRep) from STL file format. The connection to a geometry kernel allows the handling of IGES and STEP files. NETGEN contains modules for mesh optimization and hierarchical mesh refinement.", "homepage": "https://ngsolve.org/", "license": "LGPL-2.1-or-later", @@ -53,6 +53,11 @@ "occ": { "description": "build with OpenCascade geometry kernel interface", "dependencies": [ + { + "name": "fontconfig", + "default-features": false, + "platform": "!windows & !osx" + }, { "name": "opencascade", "default-features": false diff --git a/scripts/ci.feature.baseline.txt b/scripts/ci.feature.baseline.txt index 18e8cd7cba9516..e2a0df14dff90c 100644 --- a/scripts/ci.feature.baseline.txt +++ b/scripts/ci.feature.baseline.txt @@ -817,7 +817,7 @@ netcdf-c[tools]:arm64-linux=feature-fails netcdf-c[zstd]:arm64-linux=cascade netcdf-cxx4:arm64-windows-static-md=fail netcdf-cxx4:x64-windows-static-md=fail -netgen[python]:arm64-linux=cascade +netgen[core,cgns,jpeg,mpeg,occ,python]:arm64-linux=combination-fails nethost:arm64-linux=fail ngspice:x64-windows-static=fail ngtcp2[gnutls]:arm64-windows-static-md=cascade diff --git a/versions/baseline.json b/versions/baseline.json index 987ec63f8b9d49..7cd36af80b5ea0 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6950,7 +6950,7 @@ }, "netgen": { "baseline": "6.2.2401", - "port-version": 2 + "port-version": 3 }, "nethost": { "baseline": "8.0.3", diff --git a/versions/n-/netgen.json b/versions/n-/netgen.json index 08be3a52fa53e1..e3a00fc6db1b8e 100644 --- a/versions/n-/netgen.json +++ b/versions/n-/netgen.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "9c444be4d2a61cb67f2052719d87e4c9f1550d14", + "version": "6.2.2401", + "port-version": 3 + }, { "git-tree": "63e8a8e2e8c3eaa03617cb6e42e6fc82fae9dc94", "version": "6.2.2401",