Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions ports/netgen/142.diff
Original file line number Diff line number Diff line change
@@ -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()
6 changes: 3 additions & 3 deletions ports/netgen/add_filesystem.patch
Original file line number Diff line number Diff line change
@@ -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 <memory>
#include <string>
#include <vector>
Expand Down
40 changes: 37 additions & 3 deletions ports/netgen/cmake-adjustments.patch
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
8 changes: 4 additions & 4 deletions ports/netgen/downstream-fixes.patch
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 4 additions & 6 deletions ports/netgen/git-ver.patch
Original file line number Diff line number Diff line change
@@ -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
)
Expand Down
32 changes: 15 additions & 17 deletions ports/netgen/occ-78.patch
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

Expand All @@ -53,7 +53,7 @@ index e1716691c..e8a434911 100644
#include <Standard_Real.hxx>
-#endif
-#ifndef _Standard_Version_HeaderFile
-#include <Standard_Version.hxx>
#include <Standard_Version.hxx>
-#endif
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
Expand All @@ -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;
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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<Standard_Integer>::max()); }
+#else
Expand All @@ -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
Expand All @@ -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) {
Expand All @@ -154,7 +153,6 @@ index bc0383f99..826134ba0 100644
+#else
+ return std::hash<TopoDS_Shape>{}(key);
+#endif
};
};
*/
TopTools_IndexedMapOfShape shape_map;
Array<TopoDS_Shape> shape_list;
36 changes: 18 additions & 18 deletions ports/netgen/static-exports.patch
Original file line number Diff line number Diff line change
@@ -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 @@

Expand All @@ -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
36 changes: 31 additions & 5 deletions ports/netgen/vcpkg-fix-cgns-link.patch
Original file line number Diff line number Diff line change
@@ -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
+ $<IF:$<TARGET_EXISTS:CGNS::cgns_shared>,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@)
7 changes: 6 additions & 1 deletion ports/netgen/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion scripts/ci.feature.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,6 @@ 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
nethost:arm64-linux=fail
ngspice:x64-windows-static=fail
ngtcp2[gnutls]:arm64-windows-static-md=cascade
Expand Down
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A file that shouldn't be there?

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/bin/clang" :
{
"hash" : "db030e9f2a7d74e530965a33037428186657256f",
"size" : 145095072,
"timestamp" : 1759437932
},
"/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++" :
{
"hash" : "db030e9f2a7d74e530965a33037428186657256f",
"size" : 145095072,
"timestamp" : 1759437932
},
"/usr/bin/c++" :
{
"hash" : "683eba44ac1c0233dfaeb0128ef04cca0cf5764e",
"size" : 1027128,
"timestamp" : 1766091591
},
"/usr/bin/cc" :
{
"hash" : "9b512455dfa5d38a8af495ae8357c79c990086b7",
"size" : 1023032,
"timestamp" : 1766091591
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A file that shouldn't be there?

Empty file.
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6950,7 +6950,7 @@
},
"netgen": {
"baseline": "6.2.2401",
"port-version": 2
"port-version": 3
},
"nethost": {
"baseline": "8.0.3",
Expand Down
Loading
Loading