Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package netgen for openSUSE:Factory checked in at 2022-09-02 21:56:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/netgen (Old) and /work/SRC/openSUSE:Factory/.netgen.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "netgen" Fri Sep 2 21:56:32 2022 rev:7 rq:1000530 version:6.2.2203 Changes: -------- --- /work/SRC/openSUSE:Factory/netgen/netgen.changes 2022-03-07 17:46:57.935119419 +0100 +++ /work/SRC/openSUSE:Factory/.netgen.new.2083/netgen.changes 2022-09-02 21:56:56.896355339 +0200 @@ -1,0 +2,23 @@ +Tue Aug 2 22:07:26 UTC 2022 - Stefan Br??ns <stefan.bru...@rwth-aachen.de> + +- Generate python stubs, add + 0001-Ignore-invalid-unknown-types-in-pybind11-docstrings.patch + +------------------------------------------------------------------- +Fri Jul 15 16:35:18 UTC 2022 - Stefan Br??ns <stefan.bru...@rwth-aachen.de> + +- update to version 6.2.2203 + * no changelog provided +- Drop obsolete/upstream patches: + * 0001-Set-explicit-OBJECT-library-type-for-internal-togl.patch + * 0001-Throw-in-case-enum-value-is-unhandled.patch + * 0001-Throw-Exception-when-shape-has-invalid-type.patch + * 0001-Fix-signedness-for-ARM-Neon-mask-type.patch +- Add patches: + * 0001-Link-nggui-to-FFMPEG-und-JPEG-libraries-when-needed.patch + * 0001-Avoid-installation-of-Togl-static-library.patch + * 0001-Fix-use-of-unitialized-stlgeometry-member-in-constru.patch + * 0001-Include-filesystem-from-experimental-for-GCC-7.patch + * 0001-Fix-netgen-executable-and-library-RUNPATHs.patch + +------------------------------------------------------------------- Old: ---- 0001-Fix-signedness-for-ARM-Neon-mask-type.patch 0001-Set-explicit-OBJECT-library-type-for-internal-togl.patch 0001-Throw-Exception-when-shape-has-invalid-type.patch 0001-Throw-in-case-enum-value-is-unhandled.patch netgen-6.2.2105.tar.gz New: ---- 0001-Avoid-installation-of-Togl-static-library.patch 0001-Fix-netgen-executable-and-library-RUNPATHs.patch 0001-Fix-use-of-unitialized-stlgeometry-member-in-constru.patch 0001-Ignore-invalid-unknown-types-in-pybind11-docstrings.patch 0001-Include-filesystem-from-experimental-for-GCC-7.patch 0001-Link-nggui-to-FFMPEG-und-JPEG-libraries-when-needed.patch netgen-6.2.2203.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ netgen.spec ++++++ --- /var/tmp/diff_new_pack.kIxvSc/_old 2022-09-02 21:56:58.468359143 +0200 +++ /var/tmp/diff_new_pack.kIxvSc/_new 2022-09-02 21:56:58.476359162 +0200 @@ -16,7 +16,6 @@ # -%bcond_with need_clang %bcond_with openmpi %bcond_without ffmpeg %bcond_without opencascade @@ -24,27 +23,31 @@ %bcond_with pytest Name: netgen -Version: 6.2.2105 +Version: 6.2.2203 Release: 0 Summary: Automatic 3D tetrahedral mesh generator License: LGPL-2.1-only Group: Productivity/Graphics/CAD URL: https://ngsolve.org/ Source0: https://github.com/NGSolve/netgen/archive/refs/tags/v%{version}.tar.gz#/netgen-%{version}.tar.gz -# PATCH-FIX-UPSTREAM -Patch0: 0001-Set-explicit-OBJECT-library-type-for-internal-togl.patch # PATCH-FIX-OPENSUSE Patch1: 0001-Disable-backtrace-generation.patch -# PATCH-FIX-UPSTREAM -Patch2: 0001-Throw-in-case-enum-value-is-unhandled.patch -# PATCH-FIX-UPSTREAM -Patch3: 0001-Throw-Exception-when-shape-has-invalid-type.patch # PATCH-FIX-OPENSUSE -- Allow to disable download of Catch2 Patch4: 0001-Optionally-use-system-provided-Catch2.patch # PATCH-FIX-UPSTREAM Patch5: 0001-Optionally-prefer-system-wide-pybind11.patch # PATCH-FIX-UPSTREAM -Patch6: 0001-Fix-signedness-for-ARM-Neon-mask-type.patch +Patch6: 0001-Link-nggui-to-FFMPEG-und-JPEG-libraries-when-needed.patch +# PATCH-FIX-UPSTREAM +Patch7: 0001-Avoid-installation-of-Togl-static-library.patch +# PATCH-FIX-UPSTREAM +Patch8: 0001-Fix-use-of-unitialized-stlgeometry-member-in-constru.patch +# PATCH-FIX-OPENSUSE +Patch9: 0001-Include-filesystem-from-experimental-for-GCC-7.patch +# PATCH-FIX-UPSTREAM +Patch10: 0001-Fix-netgen-executable-and-library-RUNPATHs.patch +# PATCH-FIX-OPENSUSE +Patch11: 0001-Ignore-invalid-unknown-types-in-pybind11-docstrings.patch %if %{with opencascade} BuildRequires: occt-devel BuildRequires: pkgconfig(fontconfig) @@ -52,12 +55,14 @@ %endif BuildRequires: cmake BuildRequires: fdupes +BuildRequires: gcc-c++ >= 7 BuildRequires: git-core BuildRequires: libjpeg-devel BuildRequires: python3-devel -BuildRequires: python3-pybind11-devel -%if %{with pytest} BuildRequires: python3-numpy +BuildRequires: python3-pybind11-devel >= 2.7.0 +BuildRequires: python3-pybind11-stubgen +%if %{with pytest} BuildRequires: python3-pytest BuildRequires: python3-pytest-check %endif @@ -81,12 +86,6 @@ BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libswscale) %endif -%if %{with need_clang} -BuildRequires: llvm -BuildRequires: llvm-clang -%else -BuildRequires: gcc-c++ >= 7 -%endif BuildRequires: xz # x86 (32bit) is no longer supported upstream. Also exclude other 32 bit archs ExcludeArch: %{ix86} %{arm} ppc @@ -146,11 +145,7 @@ %autosetup -p1 %build -%if %{with need_clang} - OPTFLAGS="$(echo %{optflags} | sed "s:-grecord-gcc-switches::g") -flto" -%else - OPTFLAGS="%{optflags}" -%endif +%global optflags %{optflags} -DPYBIND11_HAS_FILESYSTEM_IS_OPTIONAL=1 # Work around broken version detection echo "v%{version}-0-0" > ./version.txt @@ -168,14 +163,6 @@ -DCMAKE_SKIP_BUILD_RPATH=ON \ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON \ -%if %{with need_clang} - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER=clang++ \ - -DCMAKE_AR=%{_bindir}/llvm-ar \ - -DCMAKE_RANLIB=%{_bindir}/llvm-ranlib \ - -DCMAKE_NM=%{_bindir}/llvm-nm \ - -DCMAKE_OBJDUMP=%{_bindir}/llvm-objdump \ -%endif -DENABLE_UNIT_TESTS=ON \ -DDOWNLOAD_DEPENDENCIES=OFF \ -DUSE_NATIVE_ARCH=OFF \ @@ -199,8 +186,14 @@ %cmake_build %install +# Stubgen imports the just created netgen bindings -- https://github.com/NGSolve/netgen/issues/132 +export PYTHONPATH=%{buildroot}%{python3_sitearch} %cmake_install rm -Rf %{buildroot}%{_datadir}/%{name}/doc +# https://github.com/NGSolve/netgen/issues/126 +find %{buildroot}%{_libdir}/ -iname \*.a -print -delete +# Remove private attributes from stubs +find %{buildroot}%{python3_sitearch} -iname \*.pyi -exec sed -i -e '/^_[^_].*=/ d' '{}' \; %fdupes %{buildroot}/%{_prefix} @@ -217,11 +210,12 @@ %{_datadir}/netgen %files -n netgen-libs -%{_libdir}/netgen +%dir %{_libdir}/netgen +%{_libdir}/netgen/*.so %files -n python3-%{name} %{python3_sitearch}/netgen -%{python3_sitearch}/pyngcore*.so +%{python3_sitearch}/pyngcore %files devel %dir %{_prefix}/lib/cmake ++++++ 0001-Avoid-installation-of-Togl-static-library.patch ++++++ >From 4d25528b83ec577e1fdbf76d2631605404f72728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Wed, 6 Jul 2022 23:23:08 +0200 Subject: [PATCH] Avoid installation of Togl static library --- CMakeLists.txt | 2 +- ng/Togl2.1/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20c01740..1d98b324 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -282,7 +282,7 @@ if (USE_GUI) target_include_directories(netgen_gui INTERFACE ${TK_INCLUDE_PATH}/../xlib) endif() - target_link_libraries(nggui PUBLIC nglib togl PRIVATE "$<BUILD_INTERFACE:netgen_python>" ) + target_link_libraries(nggui PUBLIC nglib PRIVATE togl "$<BUILD_INTERFACE:netgen_python>" ) if(WIN32) target_compile_definitions(netgen_gui INTERFACE -DTOGL_WGL) diff --git a/ng/Togl2.1/CMakeLists.txt b/ng/Togl2.1/CMakeLists.txt index 5d149129..c2ec4115 100644 --- a/ng/Togl2.1/CMakeLists.txt +++ b/ng/Togl2.1/CMakeLists.txt @@ -7,7 +7,7 @@ endif(APPLE) if(WIN32) set(TOGL_LIBRARY_TYPE SHARED) else(WIN32) - set(TOGL_LIBRARY_TYPE STATIC) + set(TOGL_LIBRARY_TYPE OBJECT) endif(WIN32) add_library(togl ${TOGL_LIBRARY_TYPE} togl.c toglProcAddr.c toglStubInit.c) -- 2.36.1 ++++++ 0001-Disable-backtrace-generation.patch ++++++ --- /var/tmp/diff_new_pack.kIxvSc/_old 2022-09-02 21:56:58.508359240 +0200 +++ /var/tmp/diff_new_pack.kIxvSc/_new 2022-09-02 21:56:58.512359249 +0200 @@ -1,4 +1,4 @@ -From ea050b5974992228f0bb46d8d4108d15880b5120 Mon Sep 17 00:00:00 2001 +From 1934071e77efc2ab471c330afda2fe0dece074f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Mon, 1 Mar 2021 19:18:22 +0100 Subject: [PATCH] Disable backtrace generation @@ -37,6 +37,6 @@ } } // namespace ngcore -- -2.30.1 +2.36.1 ++++++ 0001-Fix-netgen-executable-and-library-RUNPATHs.patch ++++++ >From 201f2b3dd0a213ea2d825c53b71d7344ca6947a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Fri, 15 Jul 2022 18:26:29 +0200 Subject: [PATCH] Fix netgen executable and library RUNPATHs netgen defaults to the CMAKE_INSTALL_RPATH, which includes "$ORIGIN", i.e. the BINDIR, but it should only point to the binary directories. The libraries are all located in the same directory, so just use "$ORIGIN" for these. --- CMakeLists.txt | 2 +- ng/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d98b324..1435a8e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -194,7 +194,7 @@ set(NG_INSTALL_DIR EXPORT netgen-targets RUNTIME DESTINATION ${NG_INSTALL_DIR_BI install(EXPORT netgen-targets DESTINATION ${NG_INSTALL_DIR_CMAKE} COMPONENT netgen_devel) set(CMAKE_MACOSX_RPATH TRUE) -set(CMAKE_INSTALL_RPATH "${NG_RPATH_TOKEN};${NG_RPATH_TOKEN}/${NETGEN_RPATH}") +set(CMAKE_INSTALL_RPATH "${NG_RPATH_TOKEN}") if(BUILD_FOR_CONDA) file(RELATIVE_PATH py_rpath "/bin" "/${NG_INSTALL_DIR_LIB}") set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${py_rpath}") diff --git a/ng/CMakeLists.txt b/ng/CMakeLists.txt index 3ad3d8be..2c980065 100644 --- a/ng/CMakeLists.txt +++ b/ng/CMakeLists.txt @@ -24,6 +24,7 @@ if(USE_GUI) target_sources(netgen PRIVATE ../windows/netgen.rc) endif(WIN32) target_link_libraries( netgen nglib nggui netgen_python netgen_gui) + set_target_properties( netgen PROPERTIES INSTALL_RPATH "${NG_RPATH_TOKEN}/${NETGEN_RPATH}") install(TARGETS netgen ${NG_INSTALL_DIR}) if(APPLE) set_target_properties(netgen PROPERTIES OUTPUT_NAME netgen) -- 2.37.0 ++++++ 0001-Fix-use-of-unitialized-stlgeometry-member-in-constru.patch ++++++ >From 80466f3c7ea1496d35b31d906fd8cc9784663298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Wed, 13 Jul 2022 12:09:39 +0200 Subject: [PATCH] Fix use of unitialized stlgeometry member in constructor stlgeometry is a private member of VisualSceneSTLGeometry/Meshing, and can't point to any valid geometry when the constructor runs, so remove any dereferences there. Remove the misleading extern declaration of netgen::stlgeometry. --- libsrc/stlgeom/vsstl.cpp | 3 --- libsrc/stlgeom/vsstl.hpp | 4 ++-- libsrc/visualization/stlmeshing.cpp | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/libsrc/stlgeom/vsstl.cpp b/libsrc/stlgeom/vsstl.cpp index 854909d8..0f450038 100644 --- a/libsrc/stlgeom/vsstl.cpp +++ b/libsrc/stlgeom/vsstl.cpp @@ -21,7 +21,6 @@ namespace netgen /* *********************** Draw STL Geometry **************** */ -extern STLGeometry * stlgeometry; DLL_HEADER extern shared_ptr<Mesh> mesh; @@ -33,8 +32,6 @@ VisualSceneSTLMeshing :: VisualSceneSTLMeshing () { selecttrig = 0; nodeofseltrig = 1; - stlgeometry->SetSelectTrig(selecttrig); - stlgeometry->SetNodeOfSelTrig(nodeofseltrig); } VisualSceneSTLMeshing :: ~VisualSceneSTLMeshing () diff --git a/libsrc/stlgeom/vsstl.hpp b/libsrc/stlgeom/vsstl.hpp index 6d4a6490..f6995d37 100644 --- a/libsrc/stlgeom/vsstl.hpp +++ b/libsrc/stlgeom/vsstl.hpp @@ -13,7 +13,7 @@ namespace netgen class NGGUI_API VisualSceneSTLGeometry : public VisualScene { NgArray<int> trilists; - class STLGeometry * stlgeometry; + class STLGeometry * stlgeometry = nullptr; public: VisualSceneSTLGeometry (); @@ -29,7 +29,7 @@ namespace netgen { NgArray<int> trilists; int selecttrig, nodeofseltrig; - class STLGeometry * stlgeometry; + class STLGeometry * stlgeometry = nullptr; public: VisualSceneSTLMeshing (); diff --git a/libsrc/visualization/stlmeshing.cpp b/libsrc/visualization/stlmeshing.cpp index 70699c56..b3f812e3 100644 --- a/libsrc/visualization/stlmeshing.cpp +++ b/libsrc/visualization/stlmeshing.cpp @@ -19,7 +19,6 @@ namespace netgen /* *********************** Draw STL Geometry **************** */ -extern STLGeometry * stlgeometry; extern AutoPtr<Mesh> mesh; @@ -33,8 +32,6 @@ VisualSceneSTLMeshing :: VisualSceneSTLMeshing () { selecttrig = 0; nodeofseltrig = 1; - stlgeometry->SetSelectTrig(selecttrig); - stlgeometry->SetNodeOfSelTrig(nodeofseltrig); } VisualSceneSTLMeshing :: ~VisualSceneSTLMeshing () -- 2.36.1 ++++++ 0001-Ignore-invalid-unknown-types-in-pybind11-docstrings.patch ++++++ >From 1304999ae6bbd91e946808a40558fccd49318e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Wed, 3 Aug 2022 00:05:53 +0200 Subject: [PATCH] Ignore invalid/unknown types in pybind11 docstrings See https://github.com/NGSolve/netgen/issues/131 --- python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index b4f46866..ccab5494 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -32,7 +32,7 @@ if(pybind11_stubgen AND NOT ${pybind11_stubgen} EQUAL 0) for better autocompletion support install it with pip.") else() message("-- Found pybind11-stubgen: ${stubgen_path}") - install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pybind11_stubgen --no-setup-py netgen)") + install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pybind11_stubgen --no-setup-py --ignore-invalid=all netgen)") install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../stubs/netgen-stubs/ DESTINATION ${NG_INSTALL_DIR_PYTHON}/netgen/ COMPONENT netgen) endif() endif(BUILD_STUB_FILES) -- 2.37.1 ++++++ 0001-Include-filesystem-from-experimental-for-GCC-7.patch ++++++ >From b74697b6151f78b3952c8378f98ecbff3b6f9f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Wed, 13 Jul 2022 15:58:16 +0200 Subject: [PATCH] Include filesystem from experimental for GCC 7 --- libsrc/core/archive.hpp | 16 +++++++++++----- libsrc/core/utils.cpp | 6 ++---- libsrc/core/utils.hpp | 13 +++++++------ libsrc/general/mystring.hpp | 5 +++++ libsrc/meshing/meshclass.hpp | 7 ++++++- 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/libsrc/core/archive.hpp b/libsrc/core/archive.hpp index 4271e725..a4dee54b 100644 --- a/libsrc/core/archive.hpp +++ b/libsrc/core/archive.hpp @@ -5,7 +5,13 @@ #include <array> // for array #include <complex> // for complex #include <cstring> // for size_t, strlen -#include <filesystem> // for path +#if defined(__GNUC__) && (__GNUC__ < 8) +#include <experimental/filesystem> +namespace filesystem = std::experimental::filesystem; +#else +#include <filesystem> // for filesystem::path +namespace filesystem = std::filesystem; +#endif #include <fstream> // for ifstream, ofstream #include <functional> // for function #include <map> // for map @@ -741,7 +747,7 @@ namespace ngcore BinaryOutArchive(std::shared_ptr<std::ostream>&& astream) : Archive(true), stream(std::move(astream)) { } - BinaryOutArchive(const std::filesystem::path& filename) + BinaryOutArchive(const filesystem::path& filename) : BinaryOutArchive(std::make_shared<std::ofstream>(filename)) {} ~BinaryOutArchive () override { FlushBuffer(); } @@ -829,7 +835,7 @@ namespace ngcore BinaryInArchive (std::shared_ptr<std::istream>&& astream) : Archive(false), stream(std::move(astream)) { } - BinaryInArchive (const std::filesystem::path& filename) + BinaryInArchive (const filesystem::path& filename) : BinaryInArchive(std::make_shared<std::ifstream>(filename)) { ; } using Archive::operator&; @@ -904,7 +910,7 @@ namespace ngcore TextOutArchive (std::shared_ptr<std::ostream>&& astream) : Archive(true), stream(std::move(astream)) { } - TextOutArchive (const std::filesystem::path& filename) : + TextOutArchive (const filesystem::path& filename) : TextOutArchive(std::make_shared<std::ofstream>(filename)) { } using Archive::operator&; @@ -959,7 +965,7 @@ namespace ngcore TextInArchive (std::shared_ptr<std::istream>&& astream) : Archive(false), stream(std::move(astream)) { } - TextInArchive (const std::filesystem::path& filename) + TextInArchive (const filesystem::path& filename) : TextInArchive(std::make_shared<std::ifstream>(filename)) {} using Archive::operator&; diff --git a/libsrc/core/utils.cpp b/libsrc/core/utils.cpp index 62d4d136..184342ae 100644 --- a/libsrc/core/utils.cpp +++ b/libsrc/core/utils.cpp @@ -7,8 +7,6 @@ #include <cxxabi.h> #endif #include <array> -#include <filesystem> -#include <iostream> #include <regex> #include "ngstream.hpp" @@ -112,10 +110,10 @@ namespace ngcore #endif } - NGCORE_API std::filesystem::path GetTempFilename() + NGCORE_API filesystem::path GetTempFilename() { static int counter = 0; - auto path = std::filesystem::temp_directory_path(); + auto path = filesystem::temp_directory_path(); path += ".temp_netgen_file_"+ToString(counter++)+"_"+ToString(GetTimeCounter()); return path; } diff --git a/libsrc/core/utils.hpp b/libsrc/core/utils.hpp index d072be47..32f4c9f6 100644 --- a/libsrc/core/utils.hpp +++ b/libsrc/core/utils.hpp @@ -3,7 +3,13 @@ #include <atomic> #include <chrono> +#if defined(__GNUC__) && (__GNUC__ < 8) +#include <experimental/filesystem> +namespace filesystem = std::experimental::filesystem; +#else #include <filesystem> +namespace filesystem = std::filesystem; +#endif #include <map> #include <ostream> #include <sstream> @@ -96,11 +102,6 @@ namespace ngcore return res; } - inline std::string ToLower( const std::filesystem::path & p ) - { - return ToLower(p.string()); - } - template<typename T1, typename T2> std::ostream& operator << (std::ostream& ost, const std::map<T1,T2>& map) { @@ -221,7 +222,7 @@ namespace ngcore NGCORE_API int GetCompiledSIMDSize(); NGCORE_API bool IsRangeCheckEnabled(); - NGCORE_API std::filesystem::path GetTempFilename(); + NGCORE_API filesystem::path GetTempFilename(); } // namespace ngcore diff --git a/libsrc/general/mystring.hpp b/libsrc/general/mystring.hpp index ee364d77..5eb39df9 100644 --- a/libsrc/general/mystring.hpp +++ b/libsrc/general/mystring.hpp @@ -19,7 +19,12 @@ #ifndef MYSTRING__H #define MYSTRING__H +#if defined(__GNUC__) && (__GNUC__ < 8) +#include <experimental/filesystem> +namespace filesystem = std::experimental::filesystem; +#else #include <filesystem> +#endif namespace netgen { diff --git a/libsrc/meshing/meshclass.hpp b/libsrc/meshing/meshclass.hpp index 0d063963..5f278107 100644 --- a/libsrc/meshing/meshclass.hpp +++ b/libsrc/meshing/meshclass.hpp @@ -11,7 +11,12 @@ The mesh class */ -#include<filesystem> +#if defined(__GNUC__) && (__GNUC__ < 8) +#include <experimental/filesystem> +namespace filesystem = std::experimental::filesystem; +#else +#include <filesystem> +#endif namespace netgen { -- 2.37.0 ++++++ 0001-Link-nggui-to-FFMPEG-und-JPEG-libraries-when-needed.patch ++++++ >From a1ca414a629699d09c690c5b3d92081d82e23095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Wed, 6 Jul 2022 19:36:01 +0200 Subject: [PATCH] Link nggui to FFMPEG und JPEG libraries when needed The nggui library calls functions from libav (ffmpeg) and libjpeg, and thus should link to it. Build fails otherwise when "-Wl,--no-undefined" is set. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index caca0bfc..e1276ab4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -427,6 +427,9 @@ if (USE_JPEG) find_package(JPEG REQUIRED) add_definitions(-DJPEGLIB) include_directories(${JPEG_INCLUDE_DIR}) + if(USE_GUI) + target_link_libraries(netgen_gui INTERFACE ${JPEG_LIBRARIES}) + endif() endif (USE_JPEG) ####################################################################### @@ -434,6 +437,9 @@ if (USE_MPEG) find_package(FFMPEG REQUIRED) add_definitions(-DFFMPEG -D__STDC_CONSTANT_MACROS) include_directories(${FFMPEG_INCLUDE_DIR}) + if(USE_GUI) + target_link_libraries(netgen_gui INTERFACE ${FFMPEG_LIBRARIES}) + endif() endif (USE_MPEG) ####################################################################### -- 2.36.1 ++++++ 0001-Optionally-prefer-system-wide-pybind11.patch ++++++ --- /var/tmp/diff_new_pack.kIxvSc/_old 2022-09-02 21:56:58.596359453 +0200 +++ /var/tmp/diff_new_pack.kIxvSc/_new 2022-09-02 21:56:58.600359462 +0200 @@ -1,6 +1,6 @@ -From 3892ddbfa204e61822b87ff2e01ae99035aa09ae Mon Sep 17 00:00:00 2001 +From 8675419a1a4d9a9afd0392f24746ba7d95faa796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> -Date: Thu, 27 Jan 2022 08:45:02 +0100 +Date: Wed, 6 Jul 2022 17:20:53 +0200 Subject: [PATCH] Optionally prefer system wide pybind11 Linux distributions typically prefer system provided libraries, so @@ -17,27 +17,27 @@ - pybind11_INCLUDE_DIR is used by pybind11_add_module, use it also for ngcore (core/register_archive.hpp) --- - CMakeLists.txt | 28 ++++++++++++++++++---------- - 1 file changed, 18 insertions(+), 10 deletions(-) + CMakeLists.txt | 32 ++++++++++++++++++++------------ + 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index dcc24afa..3519d831 100644 +index b7662035..20c01740 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -9,10 +9,12 @@ else(WIN32) - cmake_minimum_required(VERSION 3.8) - endif(WIN32) +@@ -5,10 +5,12 @@ endif(NOT CMAKE_BUILD_TYPE) + cmake_minimum_required(VERSION 3.13) + cmake_policy(VERSION 3.13) +include (CMakeDependentOption) option( USE_NATIVE_ARCH "build for native cpu architecture" ON) - option( USE_GUI "don't build netgen with GUI" ON ) + option( USE_GUI "build with GUI" ON ) option( USE_PYTHON "build with python interface" ON ) +cmake_dependent_option( PREFER_SYSTEM_PYBIND11 "Use system wide PyBind11" ON "USE_PYTHON" OFF) option( USE_MPI "enable mpi parallelization" OFF ) option( USE_MPI4PY "enable mpi4py interface" ON ) - option( USE_OCC "(not supported) compile with OpenCascade geometry kernel" OFF) -@@ -268,23 +270,29 @@ else() + option( USE_OCC "build with OpenCascade geometry kernel interface" OFF) +@@ -302,24 +304,30 @@ else() endif() if (USE_PYTHON) @@ -46,6 +46,11 @@ - if( PYBIND_INCLUDE_DIR ) - message(STATUS "Found Pybind11: ${PYBIND_INCLUDE_DIR}") - else( PYBIND_INCLUDE_DIR ) +- message(FATAL_ERROR "Could NOT find pybind11!") +- endif( PYBIND_INCLUDE_DIR ) +- +- target_include_directories(netgen_python INTERFACE ${PYBIND_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) +- target_include_directories(nglib PRIVATE ${PYBIND_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) + if (PREFER_SYSTEM_PYBIND11) + find_package(pybind11 CONFIG) + endif() @@ -53,20 +58,18 @@ + set(NG_INSTALL_PYBIND OFF) + else() + add_subdirectory(external_dependencies/pybind11) ++ if (pybind11_INCLUDE_DIR) ++ message(STATUS "Found Pybind11: ${pybind11_INCLUDE_DIR}") ++ else() ++ message(FATAL_ERROR "Could NOT find pybind11!") ++ endif() + endif() -+ if (pybind11_INCLUDE_DIR) -+ message(STATUS "Found Pybind11: ${pybind11_INCLUDE_DIR}") -+ else() - message(FATAL_ERROR "Could NOT find pybind11!") -- endif( PYBIND_INCLUDE_DIR ) -+ endif() - -- target_include_directories(netgen_python INTERFACE ${PYBIND_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) ++ + target_include_directories(netgen_python INTERFACE ${pybind11_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) - if(NOT ${BUILD_FOR_CONDA}) ++ target_include_directories(nglib PRIVATE ${pybind11_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) + if(NOT ${BUILD_FOR_CONDA} OR WIN32) # Don't link python libraries in conda environments -- target_link_libraries(netgen_python INTERFACE ${PYTHON_LIBRARIES}) -+ target_link_libraries(netgen_python INTERFACE ${PYTHON_LIBRARIES}) + target_link_libraries(netgen_python INTERFACE ${PYTHON_LIBRARIES}) endif() if(NG_INSTALL_PYBIND) @@ -78,6 +81,6 @@ endif (USE_PYTHON) -- -2.34.1 +2.36.1 ++++++ 0001-Optionally-use-system-provided-Catch2.patch ++++++ --- /var/tmp/diff_new_pack.kIxvSc/_old 2022-09-02 21:56:58.612359491 +0200 +++ /var/tmp/diff_new_pack.kIxvSc/_new 2022-09-02 21:56:58.616359500 +0200 @@ -1,27 +1,32 @@ -From 2aa63672c1ec26a96a4d0ce111370e333fb78e6f Mon Sep 17 00:00:00 2001 +From f1017faee9a057f86be34abd3926189623d73cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Wed, 3 Mar 2021 18:45:22 +0100 Subject: [PATCH] Optionally use system provided Catch2 +Most external_projects are only fetched on Windows and/or MacOS, but are +assumed to be available on Linux. The only outlier is Catch2. + +In case netgen is build in an isolated environment, fetching Catch2 will +fail, even when Catch2 is available as a system package. --- - CMakeLists.txt | 12 +++++++++++- + CMakeLists.txt | 13 ++++++++++++- cmake/SuperBuild.cmake | 1 + - 2 files changed, 12 insertions(+), 1 deletion(-) + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8e5ade9b..036ccc01 100644 +index 20c01740..caca0bfc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -31,6 +31,8 @@ option( DEBUG_LOG "Enable more debug output (may increase computation time) - on +@@ -33,6 +33,8 @@ option( DEBUG_LOG "Enable more debug output (may increase computation time) - on option( CHECK_RANGE "Check array range access, automatically enabled if built in debug mode" OFF) option( BUILD_STUB_FILES "Build stub files for better autocompletion" ON) option( BUILD_FOR_CONDA "Link python libraries only to executables" OFF) +option( DOWNLOAD_DEPENDENCIES "Download any dependencies not found on the system" ON) + - option( USE_SUPERBUILD "use ccache" ON) + option( USE_SUPERBUILD "build dependencies automatically" ON) option( TRACE_MEMORY "Enable memory tracing" OFF) -@@ -378,7 +380,16 @@ enable_testing() +@@ -479,7 +481,16 @@ enable_testing() include(CTest) if(ENABLE_UNIT_TESTS) @@ -40,11 +45,11 @@ diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake -index 6e9600df..da6e3a96 100644 +index 13d6915a..6c33d6e9 100644 --- a/cmake/SuperBuild.cmake +++ b/cmake/SuperBuild.cmake -@@ -139,6 +139,7 @@ set_vars( NETGEN_CMAKE_ARGS - CMAKE_PREFIX_PATH +@@ -232,6 +232,7 @@ set_vars( NETGEN_CMAKE_ARGS + INTEL_MIC CMAKE_INSTALL_PREFIX ENABLE_UNIT_TESTS + DOWNLOAD_DEPENDENCIES @@ -52,6 +57,6 @@ USE_SPDLOG DEBUG_LOG -- -2.30.1 +2.36.1 ++++++ netgen-6.2.2105.tar.gz -> netgen-6.2.2203.tar.gz ++++++ ++++ 34291 lines of diff (skipped)