From a712cc0a1b067f4ace11854b1db4dfa4b3132359 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: May 11 2017 10:53:59 +0000 Subject: Update to 6.2.0 snapshot --- diff --git a/.gitignore b/.gitignore index 60ebde1..5df246a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /netgen-5.1.tar.gz /netgen-5.3.0.tar.gz /netgen-5.3.1.tar.gz +/netgen-mesher-git-94fd57154f556450a04808b244eb8c83e7a95fb6.zip diff --git a/0001-Add-missing-ldl.patch b/0001-Add-missing-ldl.patch new file mode 100644 index 0000000..0517fde --- /dev/null +++ b/0001-Add-missing-ldl.patch @@ -0,0 +1,26 @@ +From 6f761a0cc4e5ffe5aeab5607de605522b14f1c99 Mon Sep 17 00:00:00 2001 +From: Sandro Mani +Date: Tue, 2 May 2017 13:53:59 +0200 +Subject: [PATCH] Add missing -ldl + +--- + ng/CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ng/CMakeLists.txt b/ng/CMakeLists.txt +index d98c802..0a44206 100644 +--- a/ng/CMakeLists.txt ++++ b/ng/CMakeLists.txt +@@ -14,6 +14,9 @@ if(USE_GUI) + if(NOT WIN32) + target_link_libraries( netgen mesh stlvis stl geom2dvis interface geom2d csg stl visual csgvis ) + endif(NOT WIN32) ++ if(USE_MPI) ++ target_link_libraries(netgen dl) ++ endif(USE_MPI) + + install(TARGETS netgen ${ng_install_dir}) + if(APPLE) +-- +2.12.2 + diff --git a/0001-Don-t-install-pybind-files.patch b/0001-Don-t-install-pybind-files.patch new file mode 100644 index 0000000..a6e4a98 --- /dev/null +++ b/0001-Don-t-install-pybind-files.patch @@ -0,0 +1,27 @@ +From 9f22ce217939abd49e888c23cc0b150e0cd03eb3 Mon Sep 17 00:00:00 2001 +From: Sandro Mani +Date: Mon, 1 May 2017 23:05:51 +0200 +Subject: [PATCH 1/8] Don't install pybind files + +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e5a99d3..04163ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,8 +190,8 @@ if (USE_PYTHON) + include_directories(${PYBIND_INCLUDE_DIR}) + include_directories(${PYTHON_INCLUDE_DIRS}) + +- install(DIRECTORY ${PYBIND_INCLUDE_DIR}/pybind11 DESTINATION ${INCDIR} COMPONENT netgen_devel) +- install(FILES ${PYBIND_INCLUDE_DIR}/../LICENSE DESTINATION ${INCDIR}/pybind11 COMPONENT netgen_devel) ++# install(DIRECTORY ${PYBIND_INCLUDE_DIR}/pybind11 DESTINATION ${INCDIR} COMPONENT netgen_devel) ++# install(FILES ${PYBIND_INCLUDE_DIR}/../LICENSE DESTINATION ${INCDIR}/pybind11 COMPONENT netgen_devel) + endif (USE_PYTHON) + + ####################################################################### +-- +2.12.2 + diff --git a/0002-Rename-libraries-add-library-versions.patch b/0002-Rename-libraries-add-library-versions.patch new file mode 100644 index 0000000..d3b5522 --- /dev/null +++ b/0002-Rename-libraries-add-library-versions.patch @@ -0,0 +1,214 @@ +From ac95890c8ad73f29c4fdf4bc009530437abb04ac Mon Sep 17 00:00:00 2001 +From: Sandro Mani +Date: Mon, 1 May 2017 23:06:11 +0200 +Subject: [PATCH 2/8] Rename libraries, add library versions + +--- + libsrc/csg/CMakeLists.txt | 8 ++++++++ + libsrc/general/CMakeLists.txt | 3 +++ + libsrc/geom2d/CMakeLists.txt | 8 ++++++++ + libsrc/gprim/CMakeLists.txt | 3 +++ + libsrc/interface/CMakeLists.txt | 3 +++ + libsrc/linalg/CMakeLists.txt | 3 +++ + libsrc/meshing/CMakeLists.txt | 3 +++ + libsrc/occ/CMakeLists.txt | 6 ++++++ + libsrc/stlgeom/CMakeLists.txt | 8 ++++++++ + libsrc/visualization/CMakeLists.txt | 3 +++ + nglib/CMakeLists.txt | 1 + + 11 files changed, 49 insertions(+) + +diff --git a/libsrc/csg/CMakeLists.txt b/libsrc/csg/CMakeLists.txt +index 510b0e0..94d2465 100644 +--- a/libsrc/csg/CMakeLists.txt ++++ b/libsrc/csg/CMakeLists.txt +@@ -7,6 +7,10 @@ add_library(csg ${NG_LIB_TYPE} + solid.cpp specpoin.cpp spline3d.cpp surface.cpp triapprox.cpp zrefine.cpp + python_csg.cpp splinesurface.cpp + ) ++ ++set_target_properties(csg PROPERTIES OUTPUT_NAME "ngcsg") ++set_target_properties(csg PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + if(APPLE) + set_target_properties( csg PROPERTIES SUFFIX ".so") + endif(APPLE) +@@ -20,6 +24,10 @@ endif(NOT WIN32) + + if(USE_GUI) + add_library(csgvis ${NG_LIB_TYPE} vscsg.cpp ) ++ ++ set_target_properties(csgvis PROPERTIES OUTPUT_NAME "ngcsgvis") ++ set_target_properties(csgvis PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + if(NOT WIN32) + target_link_libraries(csgvis csg visual) + if(APPLE) +diff --git a/libsrc/general/CMakeLists.txt b/libsrc/general/CMakeLists.txt +index 811bc80..d0ce0f3 100644 +--- a/libsrc/general/CMakeLists.txt ++++ b/libsrc/general/CMakeLists.txt +@@ -6,6 +6,9 @@ add_library(gen OBJECT + mpi_interface.cpp gzstream.cpp + ) + ++set_target_properties(gen PROPERTIES OUTPUT_NAME "nggen") ++set_target_properties(gen PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + set_target_properties( gen PROPERTIES POSITION_INDEPENDENT_CODE ON ) + + install( FILES ngexception.hpp DESTINATION ${INCDIR} COMPONENT netgen_devel ) +diff --git a/libsrc/geom2d/CMakeLists.txt b/libsrc/geom2d/CMakeLists.txt +index 332fe06..59eaffe 100644 +--- a/libsrc/geom2d/CMakeLists.txt ++++ b/libsrc/geom2d/CMakeLists.txt +@@ -1,5 +1,9 @@ + add_definitions(-DNGLIB_EXPORTS) + add_library(geom2d ${NG_LIB_TYPE} genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp python_geom2d.cpp ) ++ ++set_target_properties(geom2d PROPERTIES OUTPUT_NAME "nggeom2d") ++set_target_properties(geom2d PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + if(APPLE) + set_target_properties( geom2d PROPERTIES SUFFIX ".so") + endif(APPLE) +@@ -11,6 +15,10 @@ endif(NOT WIN32) + + if(USE_GUI) + add_library(geom2dvis ${NG_LIB_TYPE} vsgeom2d.cpp) ++ ++ set_target_properties(geom2dvis PROPERTIES OUTPUT_NAME "nggeom2dvis") ++ set_target_properties(geom2dvis PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + if(NOT WIN32) + target_link_libraries(geom2dvis geom2d) + install( TARGETS geom2dvis ${ng_install_dir}) +diff --git a/libsrc/gprim/CMakeLists.txt b/libsrc/gprim/CMakeLists.txt +index 4bf13c6..d6ea1c6 100644 +--- a/libsrc/gprim/CMakeLists.txt ++++ b/libsrc/gprim/CMakeLists.txt +@@ -4,6 +4,9 @@ add_library(gprim OBJECT + geomtest3d.cpp transform3d.cpp spline.cpp splinegeometry.cpp + ) + ++set_target_properties(gprim PROPERTIES OUTPUT_NAME "nggprim") ++set_target_properties(gprim PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + set_target_properties( gprim PROPERTIES POSITION_INDEPENDENT_CODE ON ) + + install(FILES +diff --git a/libsrc/interface/CMakeLists.txt b/libsrc/interface/CMakeLists.txt +index aca5706..53a8cf9 100644 +--- a/libsrc/interface/CMakeLists.txt ++++ b/libsrc/interface/CMakeLists.txt +@@ -13,6 +13,9 @@ add_library(interface ${NG_LIB_TYPE} + wuchemnitz.cpp writegmsh2.cpp writeOpenFOAM15x.cpp + ) + ++set_target_properties(interface PROPERTIES OUTPUT_NAME "nginterface") ++set_target_properties(interface PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + # TARGET_LINK_LIBRARIES(interface ${MPI_CXX_LIBRARIES} ${PYTHON_LIBS}) + # TARGET_LINK_LIBRARIES( interface ${LIBPTHREAD} ${OCC_LIBRARIES} ${LIBTOGL} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ) + if(NOT WIN32) +diff --git a/libsrc/linalg/CMakeLists.txt b/libsrc/linalg/CMakeLists.txt +index e50fb5b..b9e4919 100644 +--- a/libsrc/linalg/CMakeLists.txt ++++ b/libsrc/linalg/CMakeLists.txt +@@ -2,6 +2,9 @@ add_library( la OBJECT + densemat.cpp polynomial.cpp bfgs.cpp linopt.cpp linsearch.cpp + ) + ++set_target_properties(la PROPERTIES OUTPUT_NAME "ngla") ++set_target_properties(la PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + set_target_properties(la PROPERTIES POSITION_INDEPENDENT_CODE ON ) + + install(FILES +diff --git a/libsrc/meshing/CMakeLists.txt b/libsrc/meshing/CMakeLists.txt +index 959f286..ea0ebff 100644 +--- a/libsrc/meshing/CMakeLists.txt ++++ b/libsrc/meshing/CMakeLists.txt +@@ -24,6 +24,9 @@ add_library(mesh ${NG_LIB_TYPE} + ${mesh_object_libs} + ) + ++set_target_properties(mesh PROPERTIES OUTPUT_NAME "ngmesh") ++set_target_properties(mesh PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + if(APPLE) + set_target_properties( mesh PROPERTIES SUFFIX ".so") + endif(APPLE) +diff --git a/libsrc/occ/CMakeLists.txt b/libsrc/occ/CMakeLists.txt +index 8f7f7c3..8865a9a 100644 +--- a/libsrc/occ/CMakeLists.txt ++++ b/libsrc/occ/CMakeLists.txt +@@ -5,8 +5,14 @@ add_library(occ ${NG_LIB_TYPE} + occconstruction.cpp occgenmesh.cpp occgeom.cpp occmeshsurf.cpp + ) + ++set_target_properties(occ PROPERTIES OUTPUT_NAME "ngocc") ++set_target_properties(occ PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + add_library(occvis ${NG_LIB_TYPE} vsocc.cpp) + ++set_target_properties(occvis PROPERTIES OUTPUT_NAME "ngoccvis") ++set_target_properties(occvis PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + if(NOT WIN32) + target_link_libraries( occ ${OCC_LIBRARIES} ${PYTHON_LIBRARIES}) + target_link_libraries( occvis occ ) +diff --git a/libsrc/stlgeom/CMakeLists.txt b/libsrc/stlgeom/CMakeLists.txt +index d2072a1..8241e95 100644 +--- a/libsrc/stlgeom/CMakeLists.txt ++++ b/libsrc/stlgeom/CMakeLists.txt +@@ -3,6 +3,10 @@ add_library(stl ${NG_LIB_TYPE} + stlgeommesh.cpp stlline.cpp stltool.cpp stltopology.cpp python_stl.cpp + ) + ++ ++set_target_properties(stl PROPERTIES OUTPUT_NAME "ngstl") ++set_target_properties(stl PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + if(NOT WIN32) + target_link_libraries( stl mesh ${PYTHON_LIBRARIES}) + target_link_libraries( stl ${PYTHON_LIBRARIES}) +@@ -13,6 +17,10 @@ if(USE_GUI) + add_library(stlvis ${NG_LIB_TYPE} + vsstl.cpp + ) ++ ++ set_target_properties(stlvis PROPERTIES OUTPUT_NAME "ngstlvis") ++ set_target_properties(stlvis PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + if(NOT WIN32) + target_link_libraries( stlvis stl ) + install( TARGETS stlvis ${ng_install_dir}) +diff --git a/libsrc/visualization/CMakeLists.txt b/libsrc/visualization/CMakeLists.txt +index 5031cba..2768553 100644 +--- a/libsrc/visualization/CMakeLists.txt ++++ b/libsrc/visualization/CMakeLists.txt +@@ -11,6 +11,9 @@ endif(USE_GUI) + + add_library(visual ${NG_LIB_TYPE} ${LIB_VISUAL_SOURCES}) + ++set_target_properties(visual PROPERTIES OUTPUT_NAME "ngvisual") ++set_target_properties(visual PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) ++ + if(NOT WIN32) + target_link_libraries( visual ${PYTHON_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TCL_LIBRARY} ) + install( TARGETS visual ${ng_install_dir}) +diff --git a/nglib/CMakeLists.txt b/nglib/CMakeLists.txt +index eb18a63..461515f 100644 +--- a/nglib/CMakeLists.txt ++++ b/nglib/CMakeLists.txt +@@ -21,6 +21,7 @@ if(WIN32) + endif(WIN32) + + add_library(nglib SHARED nglib.cpp ${nglib_objects}) ++set_target_properties(nglib PROPERTIES VERSION ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}) + if(NOT WIN32) + target_link_libraries( nglib mesh stl interface geom2d csg stl visual) + if(USE_GUI) +-- +2.12.2 + diff --git a/0003-Set-default-NETGENDIR.patch b/0003-Set-default-NETGENDIR.patch new file mode 100644 index 0000000..b7d5b3b --- /dev/null +++ b/0003-Set-default-NETGENDIR.patch @@ -0,0 +1,79 @@ +From ad3c9c978e7ce8dbd008ef3da748de580a0f22a2 Mon Sep 17 00:00:00 2001 +From: Sandro Mani +Date: Mon, 1 May 2017 23:12:20 +0200 +Subject: [PATCH 3/8] Set default NETGENDIR + +--- + ng/ngappinit.cpp | 8 +++++--- + ng/ngtesting.tcl | 4 ++-- + py_tutorials/CMakeLists.txt | 2 +- + tutorials/CMakeLists.txt | 2 +- + 4 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/ng/ngappinit.cpp b/ng/ngappinit.cpp +index cf2f25b..3d4c399 100644 +--- a/ng/ngappinit.cpp ++++ b/ng/ngappinit.cpp +@@ -154,9 +154,11 @@ int main(int argc, char ** argv) + + if (getenv ("NETGENDIR") && strlen (getenv ("NETGENDIR"))) + ngdir = getenv ("NETGENDIR"); +- else +- ngdir = "."; +- ++ else { ++ ngdir = "/usr/share/netgen-mesher"; ++ setenv("NETGENDIR", ngdir.c_str(), 1); ++ } ++ + verbose = parameters.GetDefineFlag ("V"); + + if (verbose) +diff --git a/ng/ngtesting.tcl b/ng/ngtesting.tcl +index f0f685e..73ac7a9 100644 +--- a/ng/ngtesting.tcl ++++ b/ng/ngtesting.tcl +@@ -64,7 +64,7 @@ proc ngtest { {t all} {f ""}} { + } + + puts "\n ** testing in2d files in tutorials/ **" +- set testdir "$::ngdir/../share/netgen" ++ set testdir "$::ngdir/../share/netgen-mesher" + set in2dfiles { demo2d newin2d square v2in2d } + foreach {tfile} $in2dfiles { + if {$f != ""} { puts " * meshing file tutorials/$tfile.in2d..." } +@@ -89,7 +89,7 @@ proc ngtest { {t all} {f ""}} { + } + + puts "\n ** testing geo files in tutorials/ **" +- set testdir "$::ngdir/../share/netgen" ++ set testdir "$::ngdir/../share/netgen-mesher" + set geofiles { boxcyl cubemcyl extrusion revolution trafo + circle_on_cube cubemsphere fichera sculpture twobricks + cone cylinder lshape3d shaft twocubes +diff --git a/py_tutorials/CMakeLists.txt b/py_tutorials/CMakeLists.txt +index 895911a..11ece3e 100644 +--- a/py_tutorials/CMakeLists.txt ++++ b/py_tutorials/CMakeLists.txt +@@ -1,5 +1,5 @@ + install( FILES + shaft.geo mesh.py exportNeutral.py +- DESTINATION share/netgen/py_tutorials ++ DESTINATION share/netgen-mesher/py_tutorials + COMPONENT netgen_tutorial + ) +diff --git a/tutorials/CMakeLists.txt b/tutorials/CMakeLists.txt +index 0fea9d3..293e9a3 100644 +--- a/tutorials/CMakeLists.txt ++++ b/tutorials/CMakeLists.txt +@@ -7,6 +7,6 @@ install( FILES + twobricks.geo twocubes.geo twocyl.geo boundarycondition.geo + hinge.stl part1.stl frame.step screw.step + squarehole.in2d squarecircle.in2d square.in2d +- DESTINATION share/netgen ++ DESTINATION share/netgen-mesher + COMPONENT netgen_tutorial + ) +-- +2.12.2 + diff --git a/0004-Make-some-includes-relative.patch b/0004-Make-some-includes-relative.patch new file mode 100644 index 0000000..00adb6f --- /dev/null +++ b/0004-Make-some-includes-relative.patch @@ -0,0 +1,35 @@ +From 57b8bb49dec9aa9f7eb8a1ea8629388447902bbf Mon Sep 17 00:00:00 2001 +From: Sandro Mani +Date: Mon, 1 May 2017 23:12:52 +0200 +Subject: [PATCH 4/8] Make some includes relative + +--- + libsrc/include/meshing.hpp | 2 +- + libsrc/include/myadt.hpp | 2 +- + libsrc/include/stlgeom.hpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libsrc/include/meshing.hpp b/libsrc/include/meshing.hpp +index e41a88f..3d2cbda 100644 +--- a/libsrc/include/meshing.hpp ++++ b/libsrc/include/meshing.hpp +@@ -1 +1 @@ +-#include <../meshing/meshing.hpp> ++#include "../meshing/meshing.hpp" +diff --git a/libsrc/include/myadt.hpp b/libsrc/include/myadt.hpp +index d36bef0..cd6e43b 100644 +--- a/libsrc/include/myadt.hpp ++++ b/libsrc/include/myadt.hpp +@@ -1 +1 @@ +-#include <../general/myadt.hpp> ++#include "../general/myadt.hpp" +diff --git a/libsrc/include/stlgeom.hpp b/libsrc/include/stlgeom.hpp +index f1eea26..830d4e3 100644 +--- a/libsrc/include/stlgeom.hpp ++++ b/libsrc/include/stlgeom.hpp +@@ -1 +1 @@ +-#include <../stlgeom/stlgeom.hpp> ++#include "../stlgeom/stlgeom.hpp" +-- +2.12.2 + diff --git a/0005-Make-bin-lib-and-pysitearch-dirs-configurable.patch b/0005-Make-bin-lib-and-pysitearch-dirs-configurable.patch new file mode 100644 index 0000000..bfbdbad --- /dev/null +++ b/0005-Make-bin-lib-and-pysitearch-dirs-configurable.patch @@ -0,0 +1,51 @@ +From 7411b098b07d03bfcc734195e177239f2cf8f7ad Mon Sep 17 00:00:00 2001 +From: Sandro Mani +Date: Tue, 2 May 2017 11:02:22 +0200 +Subject: [PATCH 5/8] Make bin, lib and pysitearch dirs configurable + +--- + CMakeLists.txt | 7 +++++-- + cmake/SuperBuild.cmake | 5 +++-- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 04163ea..ff4473a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -97,12 +97,15 @@ include_directories ("${PROJECT_BINARY_DIR}") + set(CMAKE_INCLUDE_CURRENT_DIR ON) + + set(INCDIR include CACHE PATH "install directory for header files") ++set(BINDIR bin CACHE PATH "install directory for binary files") ++set(LIBDIR lib${LIB_SUFFIX} CACHE PATH "install directory for libraries") ++ + if(APPLE) + set(ng_install_dir_bin ../MacOS) + set(ng_install_dir_lib ../MacOS) + else(APPLE) +- set(ng_install_dir_bin bin) +- set(ng_install_dir_lib lib) ++ set(ng_install_dir_bin ${BINDIR}) ++ set(ng_install_dir_lib ${LIBDIR}) + endif(APPLE) + set(ng_install_dir EXPORT netgen-targets RUNTIME DESTINATION ${ng_install_dir_bin} COMPONENT netgen LIBRARY DESTINATION ${ng_install_dir_lib} COMPONENT netgen_devel ARCHIVE DESTINATION ${ng_install_dir_lib} COMPONENT netgen_devel) + install(EXPORT netgen-targets DESTINATION share/cmake) +diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake +index b802b6f..d61c4d5 100644 +--- a/cmake/SuperBuild.cmake ++++ b/cmake/SuperBuild.cmake +@@ -79,8 +79,9 @@ if (USE_PYTHON) + find_package(PythonInterp 3 REQUIRED) + find_package(PythonLibs 3 REQUIRED) + +- execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1,0,''))" OUTPUT_VARIABLE PYTHON_PACKAGES_INSTALL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) +- file(TO_CMAKE_PATH ${PYTHON_PACKAGES_INSTALL_DIR} PYTHON_PACKAGES_INSTALL_DIR) ++ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1,0,''))" OUTPUT_VARIABLE DEFAULT_PYTHON_PACKAGES_INSTALL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) ++ file(TO_CMAKE_PATH ${DEFAULT_PYTHON_PACKAGES_INSTALL_DIR} DEFAULT_PYTHON_PACKAGES_INSTALL_DIR) ++ SET(PYTHON_PACKAGES_INSTALL_DIR ${DEFAULT_PYTHON_PACKAGES_INSTALL_DIR} CACHE PATH "installation directory for python modules") + set_vars(NETGEN_CMAKE_ARGS PYTHON_PACKAGES_INSTALL_DIR PYTHON_INCLUDE_DIRS PYTHON_LIBRARIES PYTHON_EXECUTABLE PYTHON_VERSION PYBIND_INCLUDE_DIR) + endif (USE_PYTHON) + +-- +2.12.2 + diff --git a/0006-Unbundle-togl.patch b/0006-Unbundle-togl.patch new file mode 100644 index 0000000..73b89e8 --- /dev/null +++ b/0006-Unbundle-togl.patch @@ -0,0 +1,52 @@ +From eb36f922af0ae81ce0a1ce2f31d5cf1aecc15d72 Mon Sep 17 00:00:00 2001 +From: Sandro Mani +Date: Tue, 2 May 2017 11:53:03 +0200 +Subject: [PATCH 6/8] Unbundle togl + +--- + CMakeLists.txt | 2 +- + ng/CMakeLists.txt | 1 - + ng/ngpkg.cpp | 2 +- + 3 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ff4473a..005373a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -173,7 +173,7 @@ if (USE_GUI) + add_definitions(-DTCL -DOPENGL -DUSE_TOGL_2) + include_directories(${TCL_INCLUDE_PATH}) + include_directories(${TK_INCLUDE_PATH}) +- set(LIBTOGL togl) ++ set(LIBTOGL togl CACHE PATH "togl library") + + if(WIN32) + add_definitions(-DTOGL_WGL) +diff --git a/ng/CMakeLists.txt b/ng/CMakeLists.txt +index 0f36f43..d98c802 100644 +--- a/ng/CMakeLists.txt ++++ b/ng/CMakeLists.txt +@@ -42,7 +42,6 @@ if(USE_GUI) + occgeom.tcl acisgeom.tcl netgen.ocf + DESTINATION ${ng_install_dir_bin} COMPONENT netgen) + +- add_subdirectory(Togl2.1) + install(FILES drawing.tcl DESTINATION ${ng_install_dir_bin} COMPONENT netgen) + endif(USE_GUI) + +diff --git a/ng/ngpkg.cpp b/ng/ngpkg.cpp +index 76e2b1c..c1de086 100644 +--- a/ng/ngpkg.cpp ++++ b/ng/ngpkg.cpp +@@ -24,7 +24,7 @@ The interface between the GUI and the netgen library + + + // to be sure to include the 'right' togl-version +-#include "Togl2.1/togl.h" ++#include + #include "fonts.hpp" + + extern bool nodisplay; +-- +2.12.2 + diff --git a/0007-Add-missing-USE_JPEG-propagation.patch b/0007-Add-missing-USE_JPEG-propagation.patch new file mode 100644 index 0000000..2940fd4 --- /dev/null +++ b/0007-Add-missing-USE_JPEG-propagation.patch @@ -0,0 +1,24 @@ +From 0813966a905b085303422982eca670432e192ed4 Mon Sep 17 00:00:00 2001 +From: Sandro Mani +Date: Tue, 2 May 2017 13:50:33 +0200 +Subject: [PATCH 7/8] Add missing USE_JPEG propagation + +--- + cmake/SuperBuild.cmake | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake +index d61c4d5..bae8fa1 100644 +--- a/cmake/SuperBuild.cmake ++++ b/cmake/SuperBuild.cmake +@@ -140,6 +140,7 @@ set_vars( NETGEN_CMAKE_ARGS + USE_CCACHE + USE_NATIVE_ARCH + USE_OCC ++ USE_JPEG + USE_MPEG + INSTALL_DIR + INSTALL_PROFILES +-- +2.12.2 + diff --git a/0008-Add-missing-ldl.patch b/0008-Add-missing-ldl.patch new file mode 100644 index 0000000..2bec964 --- /dev/null +++ b/0008-Add-missing-ldl.patch @@ -0,0 +1,43 @@ +From 84772eb208d484600f3edcb105cf0e600fb8b590 Mon Sep 17 00:00:00 2001 +From: Sandro Mani +Date: Tue, 2 May 2017 14:09:21 +0200 +Subject: [PATCH 8/8] Add missing -ldl + +--- + ng/CMakeLists.txt | 4 ++++ + nglib/CMakeLists.txt | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/ng/CMakeLists.txt b/ng/CMakeLists.txt +index d98c802..8860441 100644 +--- a/ng/CMakeLists.txt ++++ b/ng/CMakeLists.txt +@@ -20,6 +20,10 @@ if(USE_GUI) + set_target_properties(netgen PROPERTIES OUTPUT_NAME netgen) + endif(APPLE) + ++ if(USE_MPI) ++ target_link_libraries(netgen -ldl) ++ endif(USE_MPI) ++ + endif(USE_GUI) + + if(USE_PYTHON) +diff --git a/nglib/CMakeLists.txt b/nglib/CMakeLists.txt +index 461515f..c134f51 100644 +--- a/nglib/CMakeLists.txt ++++ b/nglib/CMakeLists.txt +@@ -39,6 +39,10 @@ if(USE_PYTHON) + target_link_libraries(nglib ${PYTHON_LIBRARIES}) + endif(USE_PYTHON) + ++if(USE_MPI) ++ target_link_libraries(nglib -ldl) ++endif(USE_MPI) ++ + # if(NOT WIN32) + # add_executable(ng_vol ng_vol.cpp ${nglib_objects}) + # target_link_libraries( ng_vol nglib ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} ) +-- +2.12.2 + diff --git a/0009-immintrin.patch b/0009-immintrin.patch new file mode 100644 index 0000000..58a9509 --- /dev/null +++ b/0009-immintrin.patch @@ -0,0 +1,14 @@ +diff -rupN netgen-mesher-git-94fd57154f556450a04808b244eb8c83e7a95fb6/libsrc/general/ngsimd.hpp netgen-mesher-git-94fd57154f556450a04808b244eb8c83e7a95fb6-new/libsrc/general/ngsimd.hpp +--- netgen-mesher-git-94fd57154f556450a04808b244eb8c83e7a95fb6/libsrc/general/ngsimd.hpp 2017-04-26 12:15:19.000000000 +0200 ++++ netgen-mesher-git-94fd57154f556450a04808b244eb8c83e7a95fb6-new/libsrc/general/ngsimd.hpp 2017-05-11 10:42:00.287416467 +0200 +@@ -6,7 +6,9 @@ + /* Date: 25. Mar. 16 */ + /**************************************************************************/ + +-#include ++#if defined(__i386__) || defined(__x86_64__) ++# include ++#endif + #include + #include + #include diff --git a/netgen-5.3.0_metis.patch b/netgen-5.3.0_metis.patch deleted file mode 100644 index 96ee961..0000000 --- a/netgen-5.3.0_metis.patch +++ /dev/null @@ -1,94 +0,0 @@ -diff -rupN netgen-5.3.0/libsrc/meshing/parallelmesh.cpp netgen-5.3.0-new/libsrc/meshing/parallelmesh.cpp ---- netgen-5.3.0/libsrc/meshing/parallelmesh.cpp 2014-09-01 20:54:48.987249216 +0200 -+++ netgen-5.3.0-new/libsrc/meshing/parallelmesh.cpp 2014-09-01 21:02:25.783230174 +0200 -@@ -14,7 +14,7 @@ namespace metis { - - #if METIS_VER_MAJOR >= 5 - #define METIS5 -- typedef idx_t idxtype; -+ typedef metis::idx_t idxtype; - #else - #define METIS4 - typedef idxtype idx_t; -@@ -794,10 +794,10 @@ namespace netgen - eptr.Append (eind.Size()); - Array epart(ne), npart(nn); - -- int nparts = ntasks-1; -- int edgecut; -+ metis::idx_t nparts = ntasks-1; -+ metis::idx_t edgecut; - -- int ncommon = 3; -+ metis::idx_t ncommon = 3; - METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], NULL, NULL, &ncommon, &nparts, - NULL, NULL, - &edgecut, &epart[0], &npart[0]); -@@ -1029,11 +1029,11 @@ namespace netgen - eptr.Append (eind.Size()); - Array epart(ne), npart(nn); - -- int nparts = ntasks-1; -- int edgecut; -+ metis::idx_t nparts = ntasks-1; -+ metis::idx_t edgecut; - - -- int ncommon = 3; -+ metis::idx_t ncommon = 3; - METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &nwgt[0], NULL, &ncommon, &nparts, - NULL, NULL, - &edgecut, &epart[0], &npart[0]); -@@ -1266,7 +1266,7 @@ namespace netgen - - for ( int vert = 0; vert < nn; vert++ ) - { -- FlatArray array ( cnt[vert], &adjacency[ xadj[vert] ] ); -+ FlatArray array ( cnt[vert], &adjacency[ xadj[vert] ] ); - BubbleSort(array); - } - -@@ -1377,7 +1377,7 @@ namespace netgen - - for ( int el = 0; el < ne; el++ ) - { -- FlatArray array ( cnt[el], &adjacency[ xadj[el] ] ); -+ FlatArray array ( cnt[el], &adjacency[ xadj[el] ] ); - BubbleSort(array); - } - -@@ -1428,8 +1428,8 @@ namespace netgen - void Mesh :: PartDualHybridMesh2D ( ) - { - #ifdef METIS -- int ne = GetNSE(); -- int nv = GetNV(); -+ metis::idx_t ne = GetNSE(); -+ metis::idx_t nv = GetNV(); - - Array xadj(ne+1); - Array adjacency(ne*4); -@@ -1484,18 +1484,18 @@ namespace netgen - - idxtype *v_weights = NULL, *e_weights = NULL; - -- int weightflag = 0; -- // int numflag = 0; -- int nparts = ntasks - 1; -+ metis::idx_t weightflag = 0; -+ metis::idx_t numflag = 0; -+ metis::idx_t nparts = ntasks - 1; - -- int edgecut; -+ metis::idx_t edgecut; - Array part(ne); - - for ( int el = 0; el < ne; el++ ) - BubbleSort (adjacency.Range (xadj[el], xadj[el+1])); - - #ifdef METIS4 -- int options[5]; -+ metis::idx_t options[5]; - options[0] = 0; - METIS_PartGraphKway ( &ne, &xadj[0], &adjacency[0], v_weights, e_weights, &weightflag, - &numflag, &nparts, options, &edgecut, &part[0] ); diff --git a/netgen-5.3.0_msc-ver.patch b/netgen-5.3.0_msc-ver.patch deleted file mode 100644 index f05c007..0000000 --- a/netgen-5.3.0_msc-ver.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -rupN netgen-5.3.0/ng/ngpkg.cpp netgen-5.3.0-new/ng/ngpkg.cpp ---- netgen-5.3.0/ng/ngpkg.cpp 2014-09-01 20:54:49.423249198 +0200 -+++ netgen-5.3.0-new/ng/ngpkg.cpp 2014-09-01 21:04:13.023225704 +0200 -@@ -3136,13 +3136,11 @@ void PlayAnimFile(const char* name, int - extern "C" int Ng_Init (Tcl_Interp * interp); - extern "C" int Ng_CSG_Init (Tcl_Interp * interp); - --#ifdef _MSC_VER - extern "C" int Ng_stl_Init (Tcl_Interp * interp); - extern "C" int Ng_geom2d_Init (Tcl_Interp * interp); - #ifdef OCCGEOMETRY - extern "C" int Ng_occ_Init (Tcl_Interp * interp); - #endif --#endif - - - // extern "C" int Ng_Geom2d_Init (Tcl_Interp * interp); -@@ -3160,13 +3158,11 @@ void PlayAnimFile(const char* name, int - #endif - - Ng_CSG_Init(interp); --#ifdef _MSC_VER - Ng_stl_Init(interp); - Ng_geom2d_Init (interp); - #ifdef OCCGEOMETRY - Ng_occ_Init (interp); - #endif --#endif - - - // Ng_Geom2d_Init(interp); diff --git a/netgen-5.3.0_netgendir.patch b/netgen-5.3.0_netgendir.patch deleted file mode 100644 index 29687f2..0000000 --- a/netgen-5.3.0_netgendir.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -rupN netgen-5.3.0/ng/ngappinit.cpp netgen-5.3.0-new/ng/ngappinit.cpp ---- netgen-5.3.0/ng/ngappinit.cpp 2014-09-01 20:54:49.511249194 +0200 -+++ netgen-5.3.0-new/ng/ngappinit.cpp 2014-09-01 21:03:21.679227844 +0200 -@@ -148,9 +148,11 @@ int main(int argc, char ** argv) - - if (getenv ("NETGENDIR") && strlen (getenv ("NETGENDIR"))) - ngdir = getenv ("NETGENDIR"); -- else -- ngdir = "."; -- -+ else { -+ ngdir = "/usr/share/netgen-mesher"; -+ setenv("NETGENDIR", ngdir.c_str(), 1); -+ } -+ - verbose = parameters.GetDefineFlag ("V"); - - if (verbose) diff --git a/netgen-5.3.0_relative-includes.patch b/netgen-5.3.0_relative-includes.patch deleted file mode 100644 index 602f9a1..0000000 --- a/netgen-5.3.0_relative-includes.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -rupN netgen-5.1/libsrc/include/meshing.hpp netgen-5.1-new/libsrc/include/meshing.hpp ---- netgen-5.1/libsrc/include/meshing.hpp 2013-06-25 13:28:58.000000000 +0200 -+++ netgen-5.1-new/libsrc/include/meshing.hpp 2014-06-14 14:05:30.481877485 +0200 -@@ -1 +1 @@ --#include <../meshing/meshing.hpp> -+#include "../meshing/meshing.hpp" -diff -rupN netgen-5.1/libsrc/include/myadt.hpp netgen-5.1-new/libsrc/include/myadt.hpp ---- netgen-5.1/libsrc/include/myadt.hpp 2013-06-25 13:28:58.000000000 +0200 -+++ netgen-5.1-new/libsrc/include/myadt.hpp 2014-06-14 14:04:39.274878998 +0200 -@@ -1 +1 @@ --#include <../general/myadt.hpp> -+#include "../general/myadt.hpp" -diff -rupN netgen-5.1/libsrc/include/stlgeom.hpp netgen-5.1-new/libsrc/include/stlgeom.hpp ---- netgen-5.1/libsrc/include/stlgeom.hpp 2013-06-25 13:28:58.000000000 +0200 -+++ netgen-5.1-new/libsrc/include/stlgeom.hpp 2014-06-14 14:05:18.911877827 +0200 -@@ -1 +1 @@ --#include <../stlgeom/stlgeom.hpp> -+#include "../stlgeom/stlgeom.hpp" diff --git a/netgen-5.3.1_build.patch b/netgen-5.3.1_build.patch deleted file mode 100644 index dd8d395..0000000 --- a/netgen-5.3.1_build.patch +++ /dev/null @@ -1,372 +0,0 @@ -diff -rupN netgen-5.3.1/configure.ac netgen-5.3.1-new/configure.ac ---- netgen-5.3.1/configure.ac 2014-10-07 21:38:21.990021106 +0200 -+++ netgen-5.3.1-new/configure.ac 2014-10-07 21:39:14.530034275 +0200 -@@ -35,15 +35,15 @@ AC_ARG_WITH([occ], - [AC_HELP_STRING([--with-occ=dir],[use OpenCascade installed in directory dir])], - [occdir=$withval] - [occon=true], -- [occdir=/opt/OpenCASCADE] -+ [occdir=/usr] - ) - - - - if test a$occon = atrue ; then - -- AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I$occdir/inc -I/usr/include/opencascade"]) -- AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin"]) -+ AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I/usr/include/oce"]) -+ AC_SUBST([OCCLIBS], ["-lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin"]) - - # -lTKDCAF - -@@ -89,18 +89,18 @@ AC_ARG_ENABLE([gui], - [AC_HELP_STRING([--disable-gui],[don't build netgen with GUI])], - [if test "$enableval" = yes; then ngguion=true; else ngguion=false; fi]) - --metisdir=/usr/local -+metisdir=/usr - AC_ARG_WITH([metis], - [AC_HELP_STRING([--with-metis=dir],[path to metis 5.x])], - [metisdir=$withval], -- [metisdir=/usr/local] -+ [metisdir=/usr] - ) - - AC_ARG_ENABLE([parallel], - [AC_HELP_STRING([--enable-parallel],[enable mpi parallelization])], -- [AC_SUBST([MPI_INCLUDES], "-I$metisdir/include -DMETIS")] -+ [AC_SUBST([MPI_INCLUDES], "-DMETIS")] - [CXXFLAGS="$CXXFLAGS -DPARALLEL"] -- [AC_SUBST([MPI_LIBS], "-L$metisdir/lib -lmetis")] -+ [AC_SUBST([MPI_LIBS], "-lmetis")] - ) - # -DVTRACE - # -lvt-hyb -diff -rupN netgen-5.3.1/libsrc/csg/Makefile.am netgen-5.3.1-new/libsrc/csg/Makefile.am ---- netgen-5.3.1/libsrc/csg/Makefile.am 2014-10-07 21:38:21.787017193 +0200 -+++ netgen-5.3.1-new/libsrc/csg/Makefile.am 2014-10-07 21:39:14.530034275 +0200 -@@ -8,24 +8,24 @@ revolution.hpp spline3d.hpp vscsg.hpp - AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) - METASOURCES = AUTO - --lib_LTLIBRARIES = libcsg.la -+lib_LTLIBRARIES = libngcsg.la - - --libcsg_la_SOURCES = algprim.cpp brick.cpp \ -+libngcsg_la_SOURCES = algprim.cpp brick.cpp \ - bspline2d.cpp csgeom.cpp csgparser.cpp curve2d.cpp edgeflw.cpp \ - explicitcurve2d.cpp extrusion.cpp gencyl.cpp genmesh.cpp identify.cpp \ - manifold.cpp meshsurf.cpp polyhedra.cpp revolution.cpp singularref.cpp \ - solid.cpp specpoin.cpp spline3d.cpp surface.cpp triapprox.cpp - --libcsg_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la -+libngcsg_la_LIBADD = $(top_builddir)/libsrc/meshing/libngmesh.la - - - - if NGGUI --lib_LTLIBRARIES += libcsgvis.la -+lib_LTLIBRARIES += libngcsgvis.la - --libcsgvis_la_SOURCES = vscsg.cpp csgpkg.cpp --libcsgvis_la_LIBADD = libcsg.la -+libngcsgvis_la_SOURCES = vscsg.cpp csgpkg.cpp -+libngcsgvis_la_LIBADD = libngcsg.la - endif - - # $(top_builddir)/libsrc/geom2d/libgeom2d.la -diff -rupN netgen-5.3.1/libsrc/general/Makefile.am netgen-5.3.1-new/libsrc/general/Makefile.am ---- netgen-5.3.1/libsrc/general/Makefile.am 2014-10-07 21:38:21.638014320 +0200 -+++ netgen-5.3.1-new/libsrc/general/Makefile.am 2014-10-07 21:39:14.531034296 +0200 -@@ -4,8 +4,8 @@ include_HEADERS = ngexception.hpp - - AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include - METASOURCES = AUTO --noinst_LTLIBRARIES = libgen.la --libgen_la_SOURCES = array.cpp bitarray.cpp dynamicmem.cpp flags.cpp \ -+noinst_LTLIBRARIES = libnggen.la -+libnggen_la_SOURCES = array.cpp bitarray.cpp dynamicmem.cpp flags.cpp \ - hashtabl.cpp mystring.cpp ngexception.cpp optmem.cpp parthreads.cpp \ - profiler.cpp seti.cpp sort.cpp spbita2d.cpp symbolta.cpp table.cpp \ - mpi_interface.cpp gzstream.cpp -diff -rupN netgen-5.3.1/libsrc/geom2d/Makefile.am netgen-5.3.1-new/libsrc/geom2d/Makefile.am ---- netgen-5.3.1/libsrc/geom2d/Makefile.am 2014-10-07 21:38:21.832018060 +0200 -+++ netgen-5.3.1-new/libsrc/geom2d/Makefile.am 2014-10-07 21:39:14.531034296 +0200 -@@ -4,18 +4,18 @@ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/inc - - METASOURCES = AUTO - --lib_LTLIBRARIES = libgeom2d.la -+lib_LTLIBRARIES = libnggeom2d.la - - if NGGUI --lib_LTLIBRARIES += libgeom2dvis.la -+lib_LTLIBRARIES += libnggeom2dvis.la - endif - - - --libgeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp --libgeom2d_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la -+libnggeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp -+libnggeom2d_la_LIBADD = $(top_builddir)/libsrc/meshing/libngmesh.la $(MPI_LIBS) - --libgeom2dvis_la_SOURCES = geom2dpkg.cpp vsgeom2d.cpp --libgeom2dvis_la_LIBADD = libgeom2d.la -+libnggeom2dvis_la_SOURCES = geom2dpkg.cpp vsgeom2d.cpp -+libnggeom2dvis_la_LIBADD = libnggeom2d.la -lGL $(MPI_LIBS) - - -diff -rupN netgen-5.3.1/libsrc/gprim/Makefile.am netgen-5.3.1-new/libsrc/gprim/Makefile.am ---- netgen-5.3.1/libsrc/gprim/Makefile.am 2014-10-07 21:38:21.719015882 +0200 -+++ netgen-5.3.1-new/libsrc/gprim/Makefile.am 2014-10-07 21:39:14.531034296 +0200 -@@ -2,6 +2,6 @@ noinst_HEADERS = adtree.hpp geom3d.hpp - - AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include - METASOURCES = AUTO --noinst_LTLIBRARIES = libgprim.la --libgprim_la_SOURCES = adtree.cpp geom2d.cpp geom3d.cpp geomfuncs.cpp \ -+noinst_LTLIBRARIES = libnggprim.la -+libnggprim_la_SOURCES = adtree.cpp geom2d.cpp geom3d.cpp geomfuncs.cpp \ - geomtest3d.cpp transform3d.cpp spline.cpp splinegeometry.cpp -diff -rupN netgen-5.3.1/libsrc/interface/Makefile.am netgen-5.3.1-new/libsrc/interface/Makefile.am ---- netgen-5.3.1/libsrc/interface/Makefile.am 2014-10-07 21:38:21.846018330 +0200 -+++ netgen-5.3.1-new/libsrc/interface/Makefile.am 2014-10-07 21:44:17.523887314 +0200 -@@ -2,14 +2,14 @@ noinst_HEADERS = writeuser.hpp - - AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface $(MPI_INCLUDES) $(TCL_INCLUDES) -DOPENGL - METASOURCES = AUTO --lib_LTLIBRARIES = libinterface.la --libinterface_la_SOURCES = nginterface.cpp nginterface_v2.cpp \ -+lib_LTLIBRARIES = libnginterface.la -+libnginterface_la_SOURCES = nginterface.cpp nginterface_v2.cpp \ - read_fnf_mesh.cpp readtetmesh.cpp readuser.cpp writeabaqus.cpp writediffpack.cpp \ - writedolfin.cpp writeelmer.cpp writefeap.cpp writefluent.cpp writegmsh.cpp writejcm.cpp \ - writepermas.cpp writetecplot.cpp writetet.cpp writetochnog.cpp writeuser.cpp \ - wuchemnitz.cpp writegmsh2.cpp writeOpenFOAM15x.cpp - - --libinterface_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la -+libnginterface_la_LIBADD = $(top_builddir)/libsrc/meshing/libngmesh.la - - # libinterface_la_LDFLAGS = -rdynamic -diff -rupN netgen-5.3.1/libsrc/linalg/Makefile.am netgen-5.3.1-new/libsrc/linalg/Makefile.am ---- netgen-5.3.1/libsrc/linalg/Makefile.am 2014-10-07 21:38:21.667014879 +0200 -+++ netgen-5.3.1-new/libsrc/linalg/Makefile.am 2014-10-07 21:39:14.532034315 +0200 -@@ -1,8 +1,8 @@ - noinst_HEADERS = densemat.hpp linalg.hpp polynomial.hpp vector.hpp opti.hpp - AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include - METASOURCES = AUTO --noinst_LTLIBRARIES = libla.la --libla_la_SOURCES = densemat.cpp polynomial.cpp bfgs.cpp linopt.cpp linsearch.cpp -+noinst_LTLIBRARIES = libngla.la -+libngla_la_SOURCES = densemat.cpp polynomial.cpp bfgs.cpp linopt.cpp linsearch.cpp - - # vector.cpp - -diff -rupN netgen-5.3.1/libsrc/meshing/Makefile.am netgen-5.3.1-new/libsrc/meshing/Makefile.am ---- netgen-5.3.1/libsrc/meshing/Makefile.am 2014-10-07 21:38:21.895019275 +0200 -+++ netgen-5.3.1-new/libsrc/meshing/Makefile.am 2014-10-07 21:39:14.532034315 +0200 -@@ -15,9 +15,9 @@ clusters.hpp hprefinement.hpp improve3.h - - METASOURCES = AUTO - --lib_LTLIBRARIES = libmesh.la -+lib_LTLIBRARIES = libngmesh.la - --libmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \ -+libngmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \ - clusters.cpp curvedelems.cpp delaunay.cpp delaunay2d.cpp \ - geomsearch.cpp global.cpp hprefinement.cpp improve2.cpp \ - improve2gen.cpp improve3.cpp localh.cpp meshclass.cpp \ -@@ -30,8 +30,8 @@ libmesh_la_SOURCES = adfront2.cpp adfron - topology.cpp triarls.cpp validate.cpp zrefine.cpp bcfunctions.cpp \ - parallelmesh.cpp paralleltop.cpp paralleltop.hpp basegeom.cpp - --libmesh_la_LIBADD = $(top_builddir)/libsrc/linalg/libla.la \ -- $(top_builddir)/libsrc/gprim/libgprim.la \ -- $(top_builddir)/libsrc/general/libgen.la \ -- -lz -+libngmesh_la_LIBADD = $(top_builddir)/libsrc/linalg/libngla.la \ -+ $(top_builddir)/libsrc/gprim/libnggprim.la \ -+ $(top_builddir)/libsrc/general/libnggen.la \ -+ $(MPI_LIBS) -lz - -diff -rupN netgen-5.3.1/libsrc/occ/Makefile.am netgen-5.3.1-new/libsrc/occ/Makefile.am ---- netgen-5.3.1/libsrc/occ/Makefile.am 2014-10-07 21:38:21.739016267 +0200 -+++ netgen-5.3.1-new/libsrc/occ/Makefile.am 2014-10-07 21:39:14.533034334 +0200 -@@ -14,20 +14,20 @@ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/inc - - METASOURCES = AUTO - --lib_LTLIBRARIES = libocc.la -+lib_LTLIBRARIES = libngocc.la - - if NGGUI --lib_LTLIBRARIES += liboccvis.la -+lib_LTLIBRARIES += libngoccvis.la - endif - - --libocc_la_SOURCES = Partition_Inter2d.cxx Partition_Inter3d.cxx \ -+libngocc_la_SOURCES = Partition_Inter2d.cxx Partition_Inter3d.cxx \ - Partition_Loop.cxx Partition_Loop2d.cxx Partition_Loop3d.cxx Partition_Spliter.cxx \ - occconstruction.cpp occgenmesh.cpp occgeom.cpp occmeshsurf.cpp - --libocc_la_LIBADD = $(OCCLIBS) -+libngocc_la_LIBADD = $(OCCLIBS) - --liboccvis_la_SOURCES = occpkg.cpp vsocc.cpp --liboccvis_la_LIBADD = libocc.la -+libngoccvis_la_SOURCES = occpkg.cpp vsocc.cpp -+libngoccvis_la_LIBADD = libngocc.la $(TCL_LIB_SPEC) - - -diff -rupN netgen-5.3.1/libsrc/stlgeom/Makefile.am netgen-5.3.1-new/libsrc/stlgeom/Makefile.am ---- netgen-5.3.1/libsrc/stlgeom/Makefile.am 2014-10-07 21:38:21.683015188 +0200 -+++ netgen-5.3.1-new/libsrc/stlgeom/Makefile.am 2014-10-07 21:39:14.533034334 +0200 -@@ -4,18 +4,18 @@ stltool.hpp stltopology.hpp vsstl.hpp - AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) - METASOURCES = AUTO - --lib_LTLIBRARIES = libstl.la -+lib_LTLIBRARIES = libngstl.la - - if NGGUI --lib_LTLIBRARIES += libstlvis.la -+lib_LTLIBRARIES += libngstlvis.la - endif - --libstl_la_SOURCES = meshstlsurface.cpp stlgeom.cpp stlgeomchart.cpp \ -+libngstl_la_SOURCES = meshstlsurface.cpp stlgeom.cpp stlgeomchart.cpp \ - stlgeommesh.cpp stlline.cpp stltool.cpp stltopology.cpp - - --libstlvis_la_SOURCES = stlpkg.cpp vsstl.cpp --libstlvis_la_LIBADD = libstl.la --libstl_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la -+libngstlvis_la_SOURCES = stlpkg.cpp vsstl.cpp -+libngstlvis_la_LIBADD = libngstl.la -lGL $(MPI_LIBS) $(TCL_LIB_SPEC) -+libngstl_la_LIBADD = $(top_builddir)/libsrc/meshing/libngmesh.la $(MPI_LIBS) - # libstlvis_la_LIBADD = libstl.la $(top_builddir)/libsrc/linalg/libla.la - -diff -rupN netgen-5.3.1/libsrc/visualization/Makefile.am netgen-5.3.1-new/libsrc/visualization/Makefile.am ---- netgen-5.3.1/libsrc/visualization/Makefile.am 2014-10-07 21:38:21.822017867 +0200 -+++ netgen-5.3.1-new/libsrc/visualization/Makefile.am 2014-10-07 21:39:14.533034334 +0200 -@@ -7,11 +7,11 @@ AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_s - METASOURCES = AUTO - - if NGGUI --noinst_LTLIBRARIES = libvisual.la -+noinst_LTLIBRARIES = libngvisual.la - endif - - --libvisual_la_SOURCES = meshdoc.cpp mvdraw.cpp \ -+libngvisual_la_SOURCES = meshdoc.cpp mvdraw.cpp \ - vsfieldlines.cpp vsmesh.cpp vssolution.cpp importsolution.cpp - -- -+libngvisual_la_LIBADD = -lGL -diff -rupN netgen-5.3.1/ng/Makefile.am netgen-5.3.1-new/ng/Makefile.am ---- netgen-5.3.1/ng/Makefile.am 2014-10-07 21:38:21.973020778 +0200 -+++ netgen-5.3.1-new/ng/Makefile.am 2014-10-07 21:39:14.534034353 +0200 -@@ -17,21 +17,18 @@ MKL_LIBS = -L$(MKLROOT)/lib/intel64 -lm - endif - # -lpardiso500-GNU472-X86-64 -lgfortran - --netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.la \ -- $(top_builddir)/libsrc/csg/libcsgvis.la \ -- $(top_builddir)/libsrc/csg/libcsg.la \ -- $(top_builddir)/libsrc/interface/libinterface.la \ -- $(top_builddir)/libsrc/meshing/libmesh.la \ -- -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS) $(MKL_LIBS) -- -- --# --# $(top_builddir)/libsrc/occ/liboccvis.la --# $(top_builddir)/libsrc/occ/libocc.la --# $(top_builddir)/libsrc/stlgeom/libstlvis.la --# $(top_builddir)/libsrc/stlgeom/libstl.la --# $(top_builddir)/libsrc/geom2d/libgeom2d.la --# $(top_builddir)/libsrc/geom2d/libgeom2dvis.la -+netgen_LDADD = $(top_builddir)/libsrc/visualization/libngvisual.la \ -+ $(top_builddir)/libsrc/csg/libngcsgvis.la \ -+ $(top_builddir)/libsrc/csg/libngcsg.la \ -+ $(top_builddir)/libsrc/interface/libnginterface.la \ -+ $(top_builddir)/libsrc/meshing/libngmesh.la \ -+ $(top_builddir)/libsrc/occ/libngoccvis.la \ -+ $(top_builddir)/libsrc/occ/libngocc.la \ -+ $(top_builddir)/libsrc/stlgeom/libngstlvis.la \ -+ $(top_builddir)/libsrc/stlgeom/libngstl.la \ -+ $(top_builddir)/libsrc/geom2d/libnggeom2d.la \ -+ $(top_builddir)/libsrc/geom2d/libnggeom2dvis.la \ -+ -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 -ldl -lX11 $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS) $(MKL_LIBS) - - - # add for static linkage of ngsolve: -diff -rupN netgen-5.3.1/nglib/Makefile.am netgen-5.3.1-new/nglib/Makefile.am ---- netgen-5.3.1/nglib/Makefile.am 2014-10-07 21:38:21.552012662 +0200 -+++ netgen-5.3.1-new/nglib/Makefile.am 2014-10-07 21:39:27.915292493 +0200 -@@ -8,15 +8,15 @@ lib_LTLIBRARIES = libnglib.la - libnglib_la_SOURCES = nglib.cpp - - libnglib_la_LIBADD = \ -- $(top_builddir)/libsrc/interface/libinterface.la \ -- $(top_builddir)/libsrc/geom2d/libgeom2d.la \ -- $(top_builddir)/libsrc/csg/libcsg.la \ -- $(top_builddir)/libsrc/stlgeom/libstl.la \ -- $(top_builddir)/libsrc/occ/libocc.la \ -- $(top_builddir)/libsrc/meshing/libmesh.la \ -+ $(top_builddir)/libsrc/interface/libnginterface.la \ -+ $(top_builddir)/libsrc/geom2d/libnggeom2d.la \ -+ $(top_builddir)/libsrc/csg/libngcsg.la \ -+ $(top_builddir)/libsrc/stlgeom/libngstl.la \ -+ $(top_builddir)/libsrc/occ/libngocc.la \ -+ $(top_builddir)/libsrc/meshing/libngmesh.la \ - $(OCCLIBS) $(MPI_LIBS) - --libnglib_la_LDFLAGS = -avoid-version -+libnglib_la_LDFLAGS = -release $(PACKAGE_VERSION) - # -rdynamic - - -@@ -25,24 +25,24 @@ bin_PROGRAMS = ng_vol ng_stl - - ng_vol_SOURCES = ng_vol.cpp - ng_vol_LDADD = libnglib.la \ -- $(top_builddir)/libsrc/interface/libinterface.la \ -- $(top_builddir)/libsrc/geom2d/libgeom2d.la \ -- $(top_builddir)/libsrc/csg/libcsg.la \ -- $(top_builddir)/libsrc/stlgeom/libstl.la \ -- $(top_builddir)/libsrc/occ/libocc.la \ -- $(top_builddir)/libsrc/meshing/libmesh.la \ -+ $(top_builddir)/libsrc/interface/libnginterface.la \ -+ $(top_builddir)/libsrc/geom2d/libnggeom2d.la \ -+ $(top_builddir)/libsrc/csg/libngcsg.la \ -+ $(top_builddir)/libsrc/stlgeom/libngstl.la \ -+ $(top_builddir)/libsrc/occ/libngocc.la \ -+ $(top_builddir)/libsrc/meshing/libngmesh.la \ - $(OCCLIBS) $(MPI_LIBS) - - - - ng_stl_SOURCES = ng_stl.cpp - ng_stl_LDADD = libnglib.la \ -- $(top_builddir)/libsrc/interface/libinterface.la \ -- $(top_builddir)/libsrc/geom2d/libgeom2d.la \ -- $(top_builddir)/libsrc/csg/libcsg.la \ -- $(top_builddir)/libsrc/stlgeom/libstl.la \ -- $(top_builddir)/libsrc/occ/libocc.la \ -- $(top_builddir)/libsrc/meshing/libmesh.la \ -+ $(top_builddir)/libsrc/interface/libnginterface.la \ -+ $(top_builddir)/libsrc/geom2d/libnggeom2d.la \ -+ $(top_builddir)/libsrc/csg/libngcsg.la \ -+ $(top_builddir)/libsrc/stlgeom/libngstl.la \ -+ $(top_builddir)/libsrc/occ/libngocc.la \ -+ $(top_builddir)/libsrc/meshing/libngmesh.la \ - $(OCCLIBS) $(MPI_LIBS) - - # ng_occ_SOURCES = ng_occ.cpp diff --git a/netgen-mesher.png b/netgen-mesher.png index dcf4477..9adbf7c 100644 Binary files a/netgen-mesher.png and b/netgen-mesher.png differ diff --git a/netgen-mesher.spec b/netgen-mesher.spec index d8ebd94..6cd4f18 100644 --- a/netgen-mesher.spec +++ b/netgen-mesher.spec @@ -1,8 +1,8 @@ %{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)} %{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}} -# Define a macro for calling ../configure instead of ./configure -%global dconfigure %(printf %%s '%configure' | sed 's!\./configure!../configure!g') +# Don't abort on compilation errors of the example python snippets +%global _python_bytecompile_errors_terminate_build 0 %if 0%{?el6} %ifarch ppc64 @@ -14,39 +14,53 @@ %global build_mpich 1 %endif +# Upstream stopped releasing source tarballs, generating directly via snapshot at commit (see Source0).... +# Get commits for version at https://sourceforge.net/p/netgen-mesher/git/ci/master/tree/ +%global commit 94fd57154f556450a04808b244eb8c83e7a95fb6 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +%global togl_ver 2.1 + Name: netgen-mesher -Version: 5.3.1 -Release: 13%{?dist} +Version: 6.2 +Release: 0.1.git%{shortcommit}%{?dist} Summary: Automatic mesh generation tool License: LGPLv2 URL: http://sourceforge.net/projects/netgen-mesher/ -Source0: http://sourceforge.net/projects/netgen-mesher/files/netgen-mesher/5.3/netgen-%{version}.tar.gz +Source0: https://sourceforge.net/code-snapshots/git/n/ne/netgen-mesher/git.git/netgen-mesher-git-%{commit}.zip Source1: netgen-mesher.png Source2: netgen-mesher.desktop -# Fix various configure.ac and Makefiles issues: -# - Fix configure.ac to correctly detect dependencies -# - Fix makefile for togl -# - Rename shared libaries, the original names are often way too generic -# - Add missing libraries to LIBADD -# - Fix nglib invalid soname -Patch0: netgen-5.3.1_build.patch -# Some fixes to the code (taken from salome netgen plugin) -Patch1: netgen-5.3.0_fixes.patch -# Fix build against recent metis -Patch2: netgen-5.3.0_metis.patch -# Set a default NETGENDIR appropriate for the fedora packaging -Patch3: netgen-5.3.0_netgendir.patch -# Remove some MSC_VER ifdefs (why are they there?) -Patch4: netgen-5.3.0_msc-ver.patch -# Make some includes relative (needed for when headers are in -private subpackage) -Patch5: netgen-5.3.0_relative-includes.patch -BuildRequires: autoconf automake libtool +# Don't try to install pybind files +Patch1: 0001-Don-t-install-pybind-files.patch +# Rename shared libaries (the original names are often way too generic), add library version +Patch2: 0002-Rename-libraries-add-library-versions.patch +# Set a default NETGENDIR appropriate for the Fedora packaging +Patch3: 0003-Set-default-NETGENDIR.patch +# Make some includes relative (needed for when headers are in -private subpackage) +Patch4: 0004-Make-some-includes-relative.patch +# Make bin, lib and python sitearch installation directories configurable +Patch5: 0005-Make-bin-lib-and-pysitearch-dirs-configurable.patch +# Unbundle togl (see also %%prep) +Patch6: 0006-Unbundle-togl.patch +# SuperBuild.cmake fails to propagate USE_JPEG +Patch7: 0007-Add-missing-USE_JPEG-propagation.patch +# Add missing -ldl +Patch8: 0008-Add-missing-ldl.patch +# Only include immintrin.h on x86 arches +Patch9: 0009-immintrin.patch + +# TODO Re-evaluate: Some fixes to the code (taken from salome netgen plugin) +# Patch10: netgen-5.3.0_fixes.patch + + +BuildRequires: cmake +BuildRequires: gcc-c++ BuildRequires: tk-devel BuildRequires: OCE-devel BuildRequires: libjpeg-turbo-devel -BuildRequires: tcl-togl-devel +BuildRequires: tcl-togl-devel = %{togl_ver} BuildRequires: metis-devel BuildRequires: mesa-libGLU-devel BuildRequires: libXmu-devel @@ -56,6 +70,9 @@ BuildRequires: dos2unix BuildRequires: mpich-devel %endif BuildRequires: openmpi-devel +BuildRequires: python3-devel +BuildRequires: pybind11-devel + Requires: %{name}-common = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -97,6 +114,14 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release} Private headers of netgen, needed to build certain netgen based software packages. +%package -n python3-%{name} +Summary: Python3 interface for netgen +%{?python_provide:%python_provide python3-netgen} +Requires: %{name}-openmpi-libs%{?_isa} = %{version}-%{release} + +%description -n python3-%{name} +Python3 interface for netgen. + ############################################################################### %package openmpi @@ -123,6 +148,14 @@ Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} %description openmpi-devel Development files for Netgen compiled against openmpi. +%package -n python3-%{name}-openmpi +Summary: Python3 interface for netgen compiled against openmpi +%{?python_provide:%python_provide python3-netgen-openmpi} +Requires: %{name}-openmpi-libs%{?_isa} = %{version}-%{release} + +%description -n python3-%{name}-openmpi +Python3 interface for netgen compiled against openmpi. + ############################################################################### %if %{build_mpich} @@ -149,35 +182,39 @@ Requires: %{name}-mpich%{?_isa} = %{version}-%{release} %description mpich-devel Development files for Netgen compiled against mpich. + +%package -n python3-%{name}-mpich +Summary: Python3 interface for netgen compiled against mpich +%{?python_provide:%python_provide python3-netgen-mpich} +Requires: %{name}-openmpi-libs%{?_isa} = %{version}-%{release} + +%description -n python3-%{name}-mpich +Python3 interface for netgen compiled against mpich. + %endif ############################################################################### %prep -%setup -q -n netgen-%{version} - -# Convert line endings -find . -type f -exec dos2unix {} \; +%autosetup -p1 -n netgen-mesher-git-%{commit} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 +# Remove bundled togl +rm -rf ng/Togl-1.7 +rm -rf ng/Togl2.1 +rm -f ng/togl_1_7.h %build -autoreconf -ifv ### serial version ### mkdir serial (cd serial -%dconfigure --enable-occ --with-togl=%{tcl_sitearch}/Togl1.7 --enable-jpeglib \ - --includedir=%{_includedir}/%{name} --datadir=%{_datadir}/%{name} -# --enable-ffmpeg -# Fix unused-direct-shlib-dependency -sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool -make %{?_smp_mflags} +%cmake -DINSTALL_DIR=%{_prefix} \ + -DUSE_NATIVE_ARCH=OFF \ + -DINCDIR=%{_includedir}/%{name} \ + -DUSE_JPEG=1 -DUSE_OCC=1 \ + -DPYBIND_INCLUDE_DIR=%{_includedir} \ + -DLIBTOGL=%{_libdir}/libTogl%{togl_ver}.so .. +%make_build ) ### openmpi version ### @@ -185,12 +222,16 @@ make %{?_smp_mflags} export CXX=mpicxx mkdir openmpi (cd openmpi -%dconfigure --enable-occ --with-togl=%{tcl_sitearch}/Togl1.7 --enable-jpeglib --enable-parallel \ - --bindir=$MPI_BIN --libdir=$MPI_LIB --includedir=$MPI_INCLUDE/%{name} --datadir=%{_datadir}/%{name} -# --enable-ffmpeg -# Fix unused-direct-shlib-dependency -sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool -make %{?_smp_mflags} +%cmake -DINSTALL_DIR=%{_prefix} \ + -DUSE_NATIVE_ARCH=OFF \ + -DINCDIR=%{_includedir}/openmpi/%{name} \ + -DBINDIR=%{_libdir}/openmpi/bin/ \ + -DLIBDIR=%{_libdir}/openmpi/lib/ \ + -DPYTHON_PACKAGES_INSTALL_DIR=%{_libdir}/openmpi/python%{python3_version}/site-packages \ + -DUSE_JPEG=1 -DUSE_OCC=1 -DUSE_MPI=1 \ + -DPYBIND_INCLUDE_DIR=%{_includedir} \ + -DLIBTOGL=%{_libdir}/libTogl%{togl_ver}.so .. +%make_build ) %{_openmpi_unload} @@ -200,12 +241,16 @@ make %{?_smp_mflags} export CXX=mpicxx mkdir mpich (cd mpich -%dconfigure --enable-occ --with-togl=%{tcl_sitearch}/Togl1.7 --enable-jpeglib --enable-parallel \ - --bindir=$MPI_BIN --libdir=$MPI_LIB --includedir=$MPI_INCLUDE/%{name} --datadir=%{_datadir}/%{name} -# --enable-ffmpeg -# Fix unused-direct-shlib-dependency -sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool -make %{?_smp_mflags} +%cmake -DINSTALL_DIR=%{_prefix} \ + -DUSE_NATIVE_ARCH=OFF \ + -DINCDIR=%{_includedir}/mpich/%{name} \ + -DBINDIR=%{_libdir}/mpich/bin/ \ + -DLIBDIR=%{_libdir}/mpich/lib/ \ + -DPYTHON_PACKAGES_INSTALL_DIR=%{_libdir}/mpich/python%{python3_version}/site-packages \ + -DUSE_JPEG=1 -DUSE_OCC=1 -DUSE_MPI=1 \ + -DPYBIND_INCLUDE_DIR=%{_includedir} \ + -DLIBTOGL=%{_libdir}/libTogl%{togl_ver}.so .. +%make_build ) %{_mpich_unload} %endif @@ -235,7 +280,8 @@ EOF\ %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 +rm -f %{buildroot}/$MPI_BIN/*.tcl +rm -f %{buildroot}/$MPI_BIN/*.ocf %{_openmpi_unload} ### mpich version ### @@ -245,7 +291,8 @@ rm -f %{buildroot}/$MPI_BIN/*.tcl rm -f %{buildroot}/$MPI_BIN/*.ocf %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 +rm -f %{buildroot}/$MPI_BIN/*.tcl +rm -f %{buildroot}/$MPI_BIN/*.ocf %{_mpich_unload} %endif @@ -259,14 +306,12 @@ mv %{buildroot}/%{_bindir}/netgen %{buildroot}/%{_bindir}/%{name} mv %{buildroot}%{_bindir}/*.tcl %{buildroot}%{_bindir}/*.ocf %{buildroot}%{_datadir}/%{name} chmod -x %{buildroot}%{_datadir}/%{name}/*.tcl %{buildroot}%{_datadir}/%{name}/*.ocf -find %{buildroot} -name '*.la' -exec rm -f {} ';' - # Install icon and desktop file install -Dpm 0644 %SOURCE1 %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png desktop-file-install --dir %{buildroot}/%{_datadir}/applications/ %SOURCE2 # Delete the doc folder, the files are in %%doc below -rm -rf %{buildroot}/%{_datadir}/doc +rm -rf %{buildroot}/%{_prefix}/doc # Install private headers ( @@ -309,6 +354,7 @@ fi %files common %doc AUTHORS doc/ng4.pdf +%license LICENSE %{_datadir}/%{name}/ %{_datadir}/icons/hicolor/48x48/apps/%{name}.png %{_datadir}/applications/%{name}.desktop @@ -318,30 +364,37 @@ fi %files libs %{_libdir}/*.so.* -%{_libdir}/libnglib-%{version}.so %files devel %{_includedir}/%{name} %exclude %{_includedir}/%{name}/private %{_libdir}/*.so -%exclude %{_libdir}/libnglib-%{version}.so +%exclude %{_libdir}/libngpy.so %{_libdir}/pkgconfig/%{name}.pc +%{_datadir}/cmake/*.cmake %files devel-private %{_includedir}/%{name}/private +%files -n python3-%{name} +%{python3_sitearch}/netgen/ +%{_libdir}/libngpy.so + %files openmpi %{_libdir}/openmpi/bin/* %files openmpi-libs %{_libdir}/openmpi/lib/*.so.* -%{_libdir}/openmpi/lib/libnglib-%{version}.so %files openmpi-devel %{_includedir}/openmpi*/%{name} %{_libdir}/openmpi/lib/*.so +%exclude %{_libdir}/openmpi/lib/libngpy.so %{_libdir}/openmpi/lib/pkgconfig/%{name}.pc -%exclude %{_libdir}/openmpi/lib/libnglib-%{version}.so + +%files -n python3-%{name}-openmpi +%{_libdir}/openmpi/python%{python3_version}/site-packages/netgen/ +%{_libdir}/openmpi/lib/libngpy.so %if %{build_mpich} %files mpich @@ -349,17 +402,23 @@ fi %files mpich-libs %{_libdir}/mpich/lib/*.so.* -%{_libdir}/mpich/lib/libnglib-%{version}.so %files mpich-devel %{_includedir}/mpich*/%{name} %{_libdir}/mpich/lib/*.so +%exclude %{_libdir}/mpich/lib/libngpy.so %{_libdir}/mpich/lib/pkgconfig/%{name}.pc -%exclude %{_libdir}/mpich/lib/libnglib-%{version}.so + +%files -n python3-%{name}-mpich +%{_libdir}/mpich/python%{python3_version}/site-packages/netgen/ +%{_libdir}/mpich/lib/libngpy.so %endif %changelog +* Mon May 01 2017 Sandro Mani - 6.1.0-1 +- Update to 6.1.0 + * Fri Feb 10 2017 Fedora Release Engineering - 5.3.1-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index fab0ad5..cd51a61 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -afd5a9b0b1296c242a9c554f06af6510 netgen-5.3.1.tar.gz +SHA512 (netgen-mesher-git-94fd57154f556450a04808b244eb8c83e7a95fb6.zip) = c6ae96b2ffcbbd3791e5ddb7c0f782fc6a49a389d032d2f9a4d12a79a444997c1ad98b4242e243e938d2b947ddb74e5bdf6cfac7a9217207e1676369be08472a