diff --git a/0010-rename-netgen-binary.patch b/0010-rename-netgen-binary.patch new file mode 100644 index 0000000..4471f13 --- /dev/null +++ b/0010-rename-netgen-binary.patch @@ -0,0 +1,10 @@ +--- a/ng/CMakeLists.txt ++++ b/ng/CMakeLists.txt +@@ -10,6 +10,7 @@ if(USE_GUI) + endif(WIN32) + + add_executable(netgen ${netgen_sources}) ++ set_target_properties(netgen PROPERTIES OUTPUT_NAME netgen-mesher) + target_link_libraries( netgen nglib ${ZLIB_LIBRARIES} ${LIBTOGL} ${TK_LIBRARY} ${TCL_LIBRARY} ${JPEG_LIBRARIES} ${FFMPEG_LIBRARIES} ${X11_X11_LIB} ${OCC_LIBRARIES}) + if(NOT WIN32) + target_link_libraries( netgen mesh stlvis stl geom2dvis interface geom2d csg stl visual csgvis ) diff --git a/netgen-mesher.spec b/netgen-mesher.spec index 5e4e89e..a87ec68 100644 --- a/netgen-mesher.spec +++ b/netgen-mesher.spec @@ -23,7 +23,7 @@ Name: netgen-mesher Version: 6.2 -Release: 0.4.git%{shortcommit}%{?dist} +Release: 0.5.git%{shortcommit}%{?dist} Summary: Automatic mesh generation tool License: LGPLv2 @@ -53,6 +53,8 @@ Patch9: 0009-immintrin.patch # TODO Re-evaluate: Some fixes to the code (taken from salome netgen plugin) # Patch10: netgen-5.3.0_fixes.patch +# Rename binary in cmake so that exported modules work correctly +Patch10: 0010-rename-netgen-binary.patch BuildRequires: cmake @@ -213,7 +215,9 @@ mkdir serial -DINCDIR=%{_includedir}/%{name} \ -DUSE_JPEG=1 -DUSE_OCC=1 \ -DPYBIND_INCLUDE_DIR=%{_includedir} \ - -DLIBTOGL=%{_libdir}/libTogl%{togl_ver}.so .. + -DLIBTOGL=%{_libdir}/libTogl%{togl_ver}.so \ + -DOpenGL_GL_PREFERENCE=GLVND \ + .. %make_build ) @@ -279,7 +283,6 @@ EOF\ %make_install -C openmpi %writepkgconfig # Avoid conflicts with netgen, remove data files (are correctly installed below) -mv %{buildroot}/$MPI_BIN/netgen %{buildroot}/$MPI_BIN/%{name} rm -f %{buildroot}/$MPI_BIN/*.tcl rm -f %{buildroot}/$MPI_BIN/*.ocf %{_openmpi_unload} @@ -290,7 +293,6 @@ rm -f %{buildroot}/$MPI_BIN/*.ocf %make_install -C mpich %writepkgconfig # Avoid conflicts with netgen, remove data files (are correctly installed below) -mv %{buildroot}/$MPI_BIN/netgen %{buildroot}/$MPI_BIN/%{name} rm -f %{buildroot}/$MPI_BIN/*.tcl rm -f %{buildroot}/$MPI_BIN/*.ocf %{_mpich_unload} @@ -301,8 +303,7 @@ rm -f %{buildroot}/$MPI_BIN/*.ocf export MPI_LIB=%{_libdir} export MPI_INCLUDE=%{_includedir} %writepkgconfig -# Avoid conflicts with netgen, move data files to correct place -mv %{buildroot}/%{_bindir}/netgen %{buildroot}/%{_bindir}/%{name} +# move data files to correct place mv %{buildroot}%{_bindir}/*.tcl %{buildroot}%{_bindir}/*.ocf %{buildroot}%{_datadir}/%{name} chmod -x %{buildroot}%{_datadir}/%{name}/*.tcl %{buildroot}%{_datadir}/%{name}/*.ocf @@ -419,6 +420,9 @@ fi %changelog +* Wed May 02 2018 Sandro Mani - 6.2-0.5.git94fd571 +- Rename netgen binary at CMake level to prevent breaking cmake config module (#1573330) + * Thu Feb 08 2018 Fedora Release Engineering - 6.2-0.4.git94fd571 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild