Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package netgen for openSUSE:Factory checked 
in at 2021-03-24 16:11:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/netgen (Old)
 and      /work/SRC/openSUSE:Factory/.netgen.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "netgen"

Wed Mar 24 16:11:34 2021 rev:2 rq:876629 version:6.2.2101

Changes:
--------
--- /work/SRC/openSUSE:Factory/netgen/netgen.changes    2019-04-04 
15:26:31.150877550 +0200
+++ /work/SRC/openSUSE:Factory/.netgen.new.2401/netgen.changes  2021-03-24 
16:11:36.739854648 +0100
@@ -1,0 +2,20 @@
+Mon Mar  1 21:49:34 UTC 2021 - Stefan Br??ns <stefan.bru...@rwth-aachen.de>
+
+- update to version 6.2.2101
+  * no changelog provided
+- Properly split package: libraries (as required by e.g FreeCAD),
+  python-bindings, examples and standalone GUI.
+- Drop upstream fix_build.patch
+- Replace 0001-Allow-compilation-on-archs-beyond-x86.patch
+  with -DUSE_NATIVE_ARCH=OFF
+- Fix build:
+  * Add 0001-Disable-backtrace-generation.patch, do not call "nm"
+    or "addr2line" from library.
+  * Add 0001-Set-explicit-OBJECT-library-type-for-internal-togl.patch
+  * Add 0001-Throw-in-case-enum-value-is-unhandled.patch
+  * Disable -Wl,--no-undefined, libs have circular dependencies
+  * Add 0001-Fix-GetTimeCounter-for-Aarch64-variants.patch
+- Enable Catch2 unittests, add
+  0001-Optionally-use-system-provided-Catch2.patch
+
+-------------------------------------------------------------------

Old:
----
  0001-Allow-compilation-on-archs-beyond-x86.patch
  fix_build.patch
  netgen-6.2.1810.obscpio

New:
----
  0001-Disable-backtrace-generation.patch
  0001-Fix-GetTimeCounter-for-Aarch64-variants.patch
  0001-Optionally-use-system-provided-Catch2.patch
  0001-Set-explicit-OBJECT-library-type-for-internal-togl.patch
  0001-Throw-in-case-enum-value-is-unhandled.patch
  netgen-6.2.2101.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ netgen.spec ++++++
--- /var/tmp/diff_new_pack.eSl6RK/_old  2021-03-24 16:11:37.603855555 +0100
+++ /var/tmp/diff_new_pack.eSl6RK/_new  2021-03-24 16:11:37.607855559 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package netgen
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,31 +12,50 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 %bcond_with need_clang
 %bcond_with openmpi
 %bcond_without ffmpeg
-%bcond_with opencascade
+%bcond_without opencascade
+# pytest-check is not available
+%bcond_with pytest
 
 Name:           netgen
-Version:        6.2.1810
+Version:        6.2.2101
 Release:        0
 Summary:        Automatic 3D tetrahedral mesh generator
 License:        LGPL-2.1-only
 Group:          Productivity/Graphics/CAD
 URL:            https://ngsolve.org/
 Source0:        netgen-%{version}.tar.xz
-Patch0:         fix_build.patch
-# PATCH-FIX-OPENSUSE -- do not try to include immintrin.h when SSE is not 
supported
-Patch1:         0001-Allow-compilation-on-archs-beyond-x86.patch
-# not supported by upstream
+# PATCH-FIX-OPENSUSE
+Patch0:         0001-Set-explicit-OBJECT-library-type-for-internal-togl.patch
+# PATCH-FIX-OPENSUSE
+Patch1:         0001-Disable-backtrace-generation.patch
+# PATCH-FIX-OPENSUSE
+Patch2:         0001-Throw-in-case-enum-value-is-unhandled.patch
+# PATCH-FIX-OPENSUSE
+Patch3:         0001-Fix-GetTimeCounter-for-Aarch64-variants.patch
+# PATCH-FIX-OPENSUSE -- Allow to disable download of Catch2
+Patch4:         0001-Optionally-use-system-provided-Catch2.patch
 %if %{with opencascade}
 BuildRequires:  occt-devel
 %endif
 BuildRequires:  cmake
 BuildRequires:  fdupes
+BuildRequires:  git-core
+BuildRequires:  libjpeg-devel
+BuildRequires:  python3-devel
+BuildRequires:  python3-pybind11-devel
+%if %{with pytest}
+BuildRequires:  python3-numpy
+BuildRequires:  python3-pytest
+BuildRequires:  python3-pytest-check
+%endif
+BuildRequires:  pkgconfig(catch2)
 BuildRequires:  pkgconfig(gl)
 BuildRequires:  pkgconfig(glu)
 BuildRequires:  pkgconfig(icu-uc)
@@ -46,11 +65,9 @@
 BuildRequires:  pkgconfig(x11)
 BuildRequires:  pkgconfig(xmu)
 BuildRequires:  pkgconfig(zlib)
-BuildRequires:  libjpeg-devel
-BuildRequires:  python3-devel
 %if %{with openmpi}
-BuildRequires:  openmpi-devel
 BuildRequires:  metis-devel
+BuildRequires:  openmpi-devel
 %endif
 %if %{with ffmpeg}
 BuildRequires:  pkgconfig(libavcodec)
@@ -59,16 +76,13 @@
 BuildRequires:  pkgconfig(libswscale)
 %endif
 %if %{with need_clang}
-BuildRequires:  llvm-clang
 BuildRequires:  llvm
-%else
-%if %{?suse_version} == 1315
-BuildRequires:  gcc7-c++
+BuildRequires:  llvm-clang
 %else
 BuildRequires:  gcc-c++ >= 7
 %endif
-%endif
 BuildRequires:  xz
+Recommends:     %{name}-examples
 
 %description
 NETGEN is an automatic 3D tetrahedral mesh generator. It accepts
@@ -78,10 +92,21 @@
 contains modules for mesh optimization and hierarchical mesh
 refinement.
 
+%package -n netgen-libs
+Summary:        NETGEN mesher libraries
+Group:          System/Libraries
+Conflicts:      %{name} < %{version}
+Provides:       %{name}:%{_libdir}/netgen/libngcore.so
+
+%description -n netgen-libs
+NETGEN mesh generator shared libraries.
+
 %package devel
 Summary:        Development files for netgen
+# Should not depend on the netgen binary, but the cmake config is broken
 Group:          Development/Libraries/C and C++
 Requires:       %{name} = %{version}
+Requires:       netgen-libs = %{version}
 %if %{with opencascade}
 Requires:       occt-devel
 %endif
@@ -89,30 +114,45 @@
 %description devel
 Development files for NETGEN.
 
+%package examples
+Summary:        NETGEN examples
+Group:          Productivity/Graphics/CAD
+Requires:       %{name} = %{version}
+Conflicts:      %{name} < %{version}
+Provides:       %{name}:%{_datadir}/netgen/cube.geo
+BuildArch:      noarch
+
+%description examples
+Various example geometry data for NETGEN.
+
+%package -n python3-%{name}
+Summary:        NETGEN python bindings
+Group:          Productivity/Graphics/CAD
+Conflicts:      %{name} < %{version}
+Provides:       %{name}:%{python3_sitearch}/netgen/libngpy.so
+
+%description  -n python3-%{name}
+Python bindings for NETGEN.
+
 
 %prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
-# fix version, non-number will break FreeCAD macros
-sed -i -e 's,"6.2-dev","6.2.0",' libsrc/include/mydefs.hpp
+%autosetup -p1
 
 %build
-%if %{?suse_version} == 1315
-export CC=gcc-7
-export CXX=g++-7
-%endif
-mkdir build
-cd build
 %if %{with need_clang}
     OPTFLAGS="$(echo %{optflags} | sed "s:-grecord-gcc-switches::g") -flto"
 %else
     OPTFLAGS="%{optflags}"
 %endif
-  CFLAGS="$OPTFLAGS -fno-strict-aliasing" \
-  CXXFLAGS="$OPTFLAGS -fno-strict-aliasing" \
-  cmake \
-    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+
+# Work around broken version detection
+echo "v%{version}-0-0" > ./version.txt
+
+# Do not error out on undefined symbols - there is a circular dependency
+# between libvisual and libmesh ...
+%cmake \
+    -DUSE_SUPERBUILD=OFF \
+    -DCMAKE_SHARED_LINKER_FLAGS="-flto=auto -Wl,--as-needed 
-Wl,--warn-unresolved-symbols -Wl,-z,now" \
     -DNG_INSTALL_DIR_INCLUDE=%{_includedir}/netgen \
     -DNG_INSTALL_DIR_LIB=%{_libdir}/netgen \
     -DCMAKE_SKIP_BUILD_RPATH=ON \
@@ -125,9 +165,12 @@
     -DCMAKE_NM=%{_bindir}/llvm-nm \
     -DCMAKE_OBJDUMP=%{_bindir}/llvm-objdump \
 %endif
+    -DENABLE_UNIT_TESTS=ON \
+    -DDOWNLOAD_DEPENDENCIES=OFF \
     -DUSE_NATIVE_ARCH=OFF \
     -DUSE_GUI=ON \
     -DUSE_PYTHON=ON \
+    -DNG_INSTALL_DIR_PYTHON=%{python3_sitearch} \
 %if %{with openmpi}
     -DUSE_MPI=ON \
 %else
@@ -141,24 +184,37 @@
     -DUSE_MPEG=OFF \
 %endif
     ..
-  make %{?_smp_mflags}
-cd ..
+
+%cmake_build
 
 %install
-cd build
-%make_install
-cd ..
+%cmake_install
+rm -Rf %{buildroot}%{_datadir}/%{name}/doc
+
 %fdupes %{buildroot}/%{_prefix}
 
+%check
+export LD_LIBRARY_PATH=%{buildroot}%{_libdir}/%{name}
+%ctest %{!?with_pytest: --exclude-regex pytest}
+
 %files
 %license LICENSE
+%doc doc/*.pdf
 %{_bindir}/*
+
+%files examples
 %{_datadir}/netgen
+
+%files -n netgen-libs
 %{_libdir}/netgen
+
+%files -n python3-%{name}
 %{python3_sitearch}/netgen
+%{python3_sitearch}/pyngcore*.so
 
 %files devel
 %dir %{_prefix}/lib/cmake
 %{_includedir}/netgen
 %{_prefix}/lib/cmake/netgen
 
+%changelog

++++++ 0001-Disable-backtrace-generation.patch ++++++
>From ea050b5974992228f0bb46d8d4108d15880b5120 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

The backtracing functionality is quite fragile (depends on parsing output
from "nm" and "addr2line", calls signal unsafe functions in signal
handlers).

Also, linking fails due to missing linkage to libdl (uses dladdr).
---
 libsrc/core/exception.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libsrc/core/exception.cpp b/libsrc/core/exception.cpp
index b89d721e..335e3411 100644
--- a/libsrc/core/exception.cpp
+++ b/libsrc/core/exception.cpp
@@ -23,7 +23,7 @@ namespace ngcore
 
 
 // ********* STUFF FOR GETBACKTRACE ***************************
-#ifdef __GNUC__
+#if 0
 
 #include <execinfo.h>
 #include <string.h>
@@ -232,6 +232,10 @@ namespace ngcore
 {
   std::string GetBackTrace()
   {
+    static auto backtrace = getenv("NG_BACKTRACE");
+    if(backtrace) {
+       return std::string("Backtrace disabled, use a debugger");
+    }
     return std::string();
   }
 } // namespace ngcore
-- 
2.30.1

++++++ 0001-Fix-GetTimeCounter-for-Aarch64-variants.patch ++++++
>From 85e8c09ff6626b12480f4919a26a7086d4c20579 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 17:03:29 +0100
Subject: [PATCH] Fix GetTimeCounter for Aarch64 variants

Neither GCC nor Clang define an __arm64__ preprocessor macro, but use
__aarch64__ (MSVC uses _MARM_64). Add a "64" suffix to the define, i.e.
NETGEN_ARCH_ARM64 to make it more obvious in only refers to aarch64, and
to be in line with NETGEN_ARCH_AMD64.

Replace the (Clang specific) __builtin_readcyclecounter with inline
asm:
- The function return cycles (i.e. varies with CPU frequency), not time
- It may return 0, depending on the PMU settings
- It may cause an illegal instruction, in case it is not trapped by the
  kernel, e.g. on FreeBSD.

Reading the generic timer/counter CNTVCT_EL0 instead of PMCCNTR_EL0 avoids
these pitfalls. The inline asm works on GCC and Clang, instead of
Clang only for the builtin.
---
 libsrc/core/ngcore_api.hpp |  6 +++++-
 libsrc/core/utils.hpp      | 11 +++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/libsrc/core/ngcore_api.hpp b/libsrc/core/ngcore_api.hpp
index 330e7e33..9c977c1c 100644
--- a/libsrc/core/ngcore_api.hpp
+++ b/libsrc/core/ngcore_api.hpp
@@ -71,7 +71,11 @@
 #define NETGEN_ARCH_AMD64
 #endif
 
-#if defined(__arm64__) || defined(_M_ARM64)
+#if defined(__aarch64__) || defined(_M_ARM64)
+#define NETGEN_ARCH_ARM64
+#endif
+
+#if defined(__arm__) || defined(_M_ARM)
 #define NETGEN_ARCH_ARM
 #endif
 
diff --git a/libsrc/core/utils.hpp b/libsrc/core/utils.hpp
index ca015ae3..102ff319 100644
--- a/libsrc/core/utils.hpp
+++ b/libsrc/core/utils.hpp
@@ -10,7 +10,7 @@
 
 #include "ngcore_api.hpp"       // for NGCORE_API and CPU arch macros
 
-#if defined(__APPLE__) && defined(NETGEN_ARCH_ARM)
+#if defined(__APPLE__) && defined(NETGEN_ARCH_ARM64)
 #include <mach/mach_time.h>
 #endif
 
@@ -58,12 +58,15 @@ namespace ngcore
 
   inline TTimePoint GetTimeCounter() noexcept
   {
-#if defined(__APPLE__) && defined(NETGEN_ARCH_ARM)
+#if defined(__APPLE__) && defined(NETGEN_ARCH_ARM64)
     return mach_absolute_time();
 #elif defined(NETGEN_ARCH_AMD64)
     return __rdtsc();
-#elif defined(NETGEN_ARCH_ARM)
-    return __builtin_readcyclecounter();
+#elif defined(NETGEN_ARCH_ARM64) && defined(__GNUC__)
+    // __GNUC__ is also defined by CLANG. Use inline asm to read Generic Timer
+    unsigned long long tics;
+    __asm __volatile("mrs %0, CNTVCT_EL0" : "=&r" (tics));
+    return tics;
 #else
 #warning "Unsupported CPU architecture"
     return 0;
-- 
2.30.1

++++++ 0001-Optionally-use-system-provided-Catch2.patch ++++++
>From 2aa63672c1ec26a96a4d0ce111370e333fb78e6f 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

---
 CMakeLists.txt         | 12 +++++++++++-
 cmake/SuperBuild.cmake |  1 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e5ade9b..036ccc01 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,6 +31,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( TRACE_MEMORY     "Enable memory tracing" OFF)
@@ -378,7 +380,16 @@ enable_testing()
 include(CTest)
 
 if(ENABLE_UNIT_TESTS)
-  include(${CMAKE_CURRENT_LIST_DIR}/cmake/external_projects/catch.cmake)
+  if(DOWNLOAD_DEPENDENCIES)
+    include(${CMAKE_CURRENT_LIST_DIR}/cmake/external_projects/catch.cmake)
+  else(DOWNLOAD_DEPENDENCIES)
+    find_package(Catch2 REQUIRED)
+    set_target_properties(Catch2::Catch2 PROPERTIES IMPORTED_GLOBAL TRUE)
+    add_library(project_catch ALIAS Catch2::Catch2)
+    get_target_property(_CATCH_INCLUDE_DIR_BASE Catch2::Catch2 
INTERFACE_INCLUDE_DIRECTORIES)
+    string(CONCAT CATCH_INCLUDE_DIR ${_CATCH_INCLUDE_DIR_BASE} "/catch2")
+  endif(DOWNLOAD_DEPENDENCIES)
+  message(STATUS "Catch2 include dir: ${CATCH_INCLUDE_DIR}")
 endif(ENABLE_UNIT_TESTS)
 
 
diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake
index 6e9600df..da6e3a96 100644
--- a/cmake/SuperBuild.cmake
+++ b/cmake/SuperBuild.cmake
@@ -139,6 +139,7 @@ set_vars( NETGEN_CMAKE_ARGS
   CMAKE_PREFIX_PATH
   CMAKE_INSTALL_PREFIX
   ENABLE_UNIT_TESTS
+  DOWNLOAD_DEPENDENCIES
   ENABLE_CPP_CORE_GUIDELINES_CHECK
   USE_SPDLOG
   DEBUG_LOG
-- 
2.30.1

++++++ 0001-Set-explicit-OBJECT-library-type-for-internal-togl.patch ++++++
>From 2439f9b6f261aab36a7b2459b7b1fe9db691f7ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de>
Date: Sun, 28 Feb 2021 23:57:18 +0100
Subject: [PATCH] Set explicit OBJECT library type for internal togl

---
 ng/Togl2.1/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ng/Togl2.1/CMakeLists.txt b/ng/Togl2.1/CMakeLists.txt
index bcade1f7..876b4f01 100644
--- a/ng/Togl2.1/CMakeLists.txt
+++ b/ng/Togl2.1/CMakeLists.txt
@@ -20,7 +20,7 @@ else(WIN32)
   include_directories(BEFORE "${TCL_INCLUDE_PATH}") 
   include_directories(BEFORE "${TK_INCLUDE_PATH}") 
 
-  add_library(togl togl.c toglProcAddr.c toglStubInit.c)
+  add_library(togl OBJECT togl.c toglProcAddr.c toglStubInit.c)
   target_link_libraries(togl -ldl)
 endif(WIN32)
 
-- 
2.30.1

++++++ 0001-Throw-in-case-enum-value-is-unhandled.patch ++++++
>From bf412edff1dccb3a79de2cb6ab31b7861743a101 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 22:32:20 +0100
Subject: [PATCH] Throw in case enum value is unhandled

---
 libsrc/csg/solid.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libsrc/csg/solid.cpp b/libsrc/csg/solid.cpp
index 52bd6321..035e654c 100644
--- a/libsrc/csg/solid.cpp
+++ b/libsrc/csg/solid.cpp
@@ -193,6 +193,8 @@ namespace netgen
         return Complement (s1->PointInSolid (p, eps));
       case ROOT:
        return s1->PointInSolid (p, eps);
+      default:
+       throw Exception("PointInSolid: invalid op");
       }
   }
 
@@ -212,6 +214,8 @@ namespace netgen
         return Complement (s1->VecInSolid (p, v, eps));
       case ROOT:
        return s1->VecInSolid (p, v, eps);
+      default:
+       throw Exception("VecInSolid: invalid op");
       }
   }
   
@@ -232,6 +236,8 @@ namespace netgen
         return Complement (s1->VecInSolid2 (p, v1, v2, eps));
       case ROOT:
        return s1->VecInSolid2 (p, v1, v2, eps);
+      default:
+       throw Exception("VecInSolid2: invalid op");
       }
   }
 
-- 
2.30.1

++++++ _service ++++++
--- /var/tmp/diff_new_pack.eSl6RK/_old  2021-03-24 16:11:37.663855618 +0100
+++ /var/tmp/diff_new_pack.eSl6RK/_new  2021-03-24 16:11:37.667855621 +0100
@@ -2,8 +2,8 @@
   <service name="obs_scm" mode="disabled">
     <param name="url">https://github.com/NGSolve/netgen.git</param>
     <param name="scm">git</param>
-    <param name="revision">v6.2.1810</param>
-    <param name="version">6.2.1810</param>
+    <param name="revision">v6.2.2101</param>
+    <param name="version">6.2.2101</param>
   </service>
   <service name="set_version" mode="disabled" />
 

++++++ netgen-6.2.1810.obscpio -> netgen-6.2.2101.obscpio ++++++
/work/SRC/openSUSE:Factory/netgen/netgen-6.2.1810.obscpio 
/work/SRC/openSUSE:Factory/.netgen.new.2401/netgen-6.2.2101.obscpio differ: 
char 47, line 1

++++++ netgen.obsinfo ++++++
--- /var/tmp/diff_new_pack.eSl6RK/_old  2021-03-24 16:11:37.703855660 +0100
+++ /var/tmp/diff_new_pack.eSl6RK/_new  2021-03-24 16:11:37.707855663 +0100
@@ -1,5 +1,5 @@
 name: netgen
-version: 6.2.1810
-mtime: 1542966747
-commit: 7934a348726cfc3380aff0c23b829c035b1094c7
+version: 6.2.2101
+mtime: 1610722218
+commit: 5e489319c60926daa836cecff39f0e92779032ba
 

Reply via email to