summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Waibel <waebbl-gentoo@posteo.net>2023-01-28 11:13:58 +0100
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2023-02-10 10:57:21 +0100
commit21fcf832e7b40659f66e721844561a970a2f73be (patch)
tree822ddb9a6fa426031f199d95a362a7cc3265be8e /media-gfx/netgen/files
parentjava-utils-2.eclass: ECLASS_VARIABLE JAVA_PKG_NO_CLEAN (diff)
downloadgentoo-21fcf832e7b40659f66e721844561a970a2f73be.tar.gz
gentoo-21fcf832e7b40659f66e721844561a970a2f73be.tar.bz2
gentoo-21fcf832e7b40659f66e721844561a970a2f73be.zip
media-gfx/netgen: new package, add 6.2.2204
The media-gfx/freecad package has support for meshing using Netgen. Talked about in https://github.com/gentoo/sci/pull/1180#issuecomment-1315854894 Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/29315 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'media-gfx/netgen/files')
-rw-r--r--media-gfx/netgen/files/netgen-6.2.2204-disable-failing-tests.patch19
-rw-r--r--media-gfx/netgen/files/netgen-6.2.2204-disable-python-tests.patch17
-rw-r--r--media-gfx/netgen/files/netgen-6.2.2204-find-Tk-include-directories.patch21
-rw-r--r--media-gfx/netgen/files/netgen-6.2.2204-find-libjpeg-turbo-library.patch34
-rw-r--r--media-gfx/netgen/files/netgen-6.2.2204-link-against-ffmpeg.patch20
-rw-r--r--media-gfx/netgen/files/netgen-6.2.2204-use-external-pybind11.patch30
-rw-r--r--media-gfx/netgen/files/netgen-6.2.2204-use-system-catch.patch40
-rw-r--r--media-gfx/netgen/files/netgen-6.2.2204-use-system-spdlog.patch40
8 files changed, 221 insertions, 0 deletions
diff --git a/media-gfx/netgen/files/netgen-6.2.2204-disable-failing-tests.patch b/media-gfx/netgen/files/netgen-6.2.2204-disable-failing-tests.patch
new file mode 100644
index 000000000000..a11df8e3d427
--- /dev/null
+++ b/media-gfx/netgen/files/netgen-6.2.2204-disable-failing-tests.patch
@@ -0,0 +1,19 @@
+From 21bfc56e76a448170dc4bb305c97b8f957b6e75d Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Wed, 14 Dec 2022 07:12:04 +0100
+Subject: [PATCH] disable failing tests
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/tests/catch/CMakeLists.txt
++++ b/tests/catch/CMakeLists.txt
+@@ -34,7 +34,6 @@ add_unit_test(archive archive.cpp)
+ target_link_libraries(test_archive netgen_python)
+ add_unit_test(array array.cpp)
+ add_unit_test(ranges ranges.cpp)
+-add_unit_test(symboltable symboltable.cpp)
+ add_unit_test(utils utils.cpp)
+ add_unit_test(version version.cpp)
+
+--
+2.38.1
+
diff --git a/media-gfx/netgen/files/netgen-6.2.2204-disable-python-tests.patch b/media-gfx/netgen/files/netgen-6.2.2204-disable-python-tests.patch
new file mode 100644
index 000000000000..7a6def41898b
--- /dev/null
+++ b/media-gfx/netgen/files/netgen-6.2.2204-disable-python-tests.patch
@@ -0,0 +1,17 @@
+From 2c402f3b552ce18483119de1d3a91fd457c9c170 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Wed, 14 Dec 2022 08:50:07 +0100
+Subject: [PATCH] disable python tests
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,5 +1,4 @@
+ add_subdirectory(catch)
+-add_subdirectory(pytest)
+
+ # this code goes here, because tests is the last add_subdirectory (otherwise it gets executed too early)
+ if(APPLE AND BUILD_FOR_CONDA)
+--
+2.38.1
+
diff --git a/media-gfx/netgen/files/netgen-6.2.2204-find-Tk-include-directories.patch b/media-gfx/netgen/files/netgen-6.2.2204-find-Tk-include-directories.patch
new file mode 100644
index 000000000000..cf7b9d31ef07
--- /dev/null
+++ b/media-gfx/netgen/files/netgen-6.2.2204-find-Tk-include-directories.patch
@@ -0,0 +1,21 @@
+From 53c45343f5a26841be10d930467e215da4a779f2 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 30 Oct 2022 15:17:55 +0100
+Subject: [PATCH] find Tk include directories
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -270,6 +270,9 @@ if (USE_GUI)
+ endif(APPLE)
+ find_package(OpenGL REQUIRED)
+
++ include_directories(${TK_INCLUDE_PATH}/generic)
++ include_directories(${TK_INCLUDE_PATH}/unix)
++
+ target_compile_definitions(netgen_gui INTERFACE -DTCL -DOPENGL -DUSE_TOGL_2 -DUSE_TCL_STUBS -DUSE_TK_STUBS)
+ target_include_directories(netgen_gui INTERFACE ${TCL_INCLUDE_PATH} ${TK_INCLUDE_PATH})
+ target_link_libraries(netgen_gui INTERFACE ${TCL_STUB_LIBRARY} ${TK_STUB_LIBRARY})
+--
+2.38.1
+
diff --git a/media-gfx/netgen/files/netgen-6.2.2204-find-libjpeg-turbo-library.patch b/media-gfx/netgen/files/netgen-6.2.2204-find-libjpeg-turbo-library.patch
new file mode 100644
index 000000000000..c45f5a4e4bdb
--- /dev/null
+++ b/media-gfx/netgen/files/netgen-6.2.2204-find-libjpeg-turbo-library.patch
@@ -0,0 +1,34 @@
+From 39160b692fd051f2638f1a6e1df38eb616b6d6cb Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 30 Oct 2022 16:09:43 +0100
+Subject: [PATCH] find libjpeg-turbo library
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/libsrc/visualization/CMakeLists.txt
++++ b/libsrc/visualization/CMakeLists.txt
+@@ -7,7 +7,7 @@ target_sources(nggui PRIVATE
+ vssolution.cpp
+ visualpkg.cpp
+ )
+-target_link_libraries( nggui PUBLIC "$<BUILD_INTERFACE:netgen_python>" ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} )
++target_link_libraries( nggui PUBLIC "$<BUILD_INTERFACE:netgen_python>" ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${JPEG_LIBRARIES} )
+
+ install(FILES
+ meshdoc.hpp mvdraw.hpp visual_api.hpp
+--- a/nglib/CMakeLists.txt
++++ b/nglib/CMakeLists.txt
+@@ -7,6 +7,11 @@ endif(USE_OCC)
+
+ target_link_libraries(nglib PUBLIC ngcore)
+
++if(TARGET JPEG::JPEG)
++ get_target_property(JPEG_LIBRARIES JPEG::JPEG IMPORTED_LOCATION_RELEASE)
++else()
++ set(JPEG_LIBRARIES ${JPEG_LIBRARY_RELEASE})
++endif()
+ target_link_libraries( nglib PRIVATE ${MPI_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ${OCC_LIBRARIES} netgen_cgns )
+
+ install(TARGETS nglib netgen_cgns ${NG_INSTALL_DIR})
+--
+2.38.1
+
diff --git a/media-gfx/netgen/files/netgen-6.2.2204-link-against-ffmpeg.patch b/media-gfx/netgen/files/netgen-6.2.2204-link-against-ffmpeg.patch
new file mode 100644
index 000000000000..6f7a8bc3cd9a
--- /dev/null
+++ b/media-gfx/netgen/files/netgen-6.2.2204-link-against-ffmpeg.patch
@@ -0,0 +1,20 @@
+From 69d9c2da29adc9b7a209e78aae950d9834683f58 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Mon, 31 Oct 2022 13:07:05 +0100
+Subject: [PATCH] link against ffmpeg
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/ng/CMakeLists.txt
++++ b/ng/CMakeLists.txt
+@@ -28,7 +28,7 @@ if(USE_GUI)
+ if(APPLE)
+ set_target_properties(netgen PROPERTIES OUTPUT_NAME netgen)
+ endif(APPLE)
+- target_link_libraries( netgen ${PYTHON_LIBRARIES} ${TCL_LIBRARY} ${TK_LIBRARY})
++ target_link_libraries( netgen ${PYTHON_LIBRARIES} ${TCL_LIBRARY} ${TK_LIBRARY} ${FFMPEG_LIBRARIES})
+ endif(NOT BUILD_FOR_CONDA)
+
+ install(TARGETS nggui ${NG_INSTALL_DIR})
+--
+2.38.1
+
diff --git a/media-gfx/netgen/files/netgen-6.2.2204-use-external-pybind11.patch b/media-gfx/netgen/files/netgen-6.2.2204-use-external-pybind11.patch
new file mode 100644
index 000000000000..ef11c8b0821a
--- /dev/null
+++ b/media-gfx/netgen/files/netgen-6.2.2204-use-external-pybind11.patch
@@ -0,0 +1,30 @@
+From c3c55fe646ad6934e429edd080aceae54260551c Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 30 Oct 2022 14:50:48 +0100
+Subject: [PATCH] use external pybind11
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -302,7 +302,7 @@ else()
+ endif()
+
+ if (USE_PYTHON)
+- add_subdirectory(external_dependencies/pybind11)
++ find_package(pybind11)
+ find_path(PYBIND_INCLUDE_DIR pybind11/pybind11.h HINTS ${PYTHON_INCLUDE_DIR})
+ if( PYBIND_INCLUDE_DIR )
+ message(STATUS "Found Pybind11: ${PYBIND_INCLUDE_DIR}")
+--- a/cmake/SuperBuild.cmake
++++ b/cmake/SuperBuild.cmake
+@@ -154,7 +154,6 @@ endif()
+ #######################################################################
+ if (USE_PYTHON)
+ find_path(PYBIND_INCLUDE_DIR pybind11/pybind11.h PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies/pybind11/include NO_DEFAULT_PATH)
+- set(NG_INSTALL_PYBIND ON)
+ if( NOT PYBIND_INCLUDE_DIR )
+ # if the pybind submodule is missing, try to initialize and update all submodules
+ execute_process(COMMAND git submodule update --init --recursive WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+--
+2.38.1
+
diff --git a/media-gfx/netgen/files/netgen-6.2.2204-use-system-catch.patch b/media-gfx/netgen/files/netgen-6.2.2204-use-system-catch.patch
new file mode 100644
index 000000000000..1c08e49e7524
--- /dev/null
+++ b/media-gfx/netgen/files/netgen-6.2.2204-use-system-catch.patch
@@ -0,0 +1,40 @@
+From 6eaa13cc02ccd5f1bfa448fbcff3a1d9af8ba90a Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Wed, 14 Dec 2022 07:04:29 +0100
+Subject: [PATCH] use system catch
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -474,7 +474,7 @@ enable_testing()
+ include(CTest)
+
+ if(ENABLE_UNIT_TESTS)
+- include(${CMAKE_CURRENT_LIST_DIR}/cmake/external_projects/catch.cmake)
++ find_package(Catch2 REQUIRED)
+ endif(ENABLE_UNIT_TESTS)
+
+
+--- a/tests/catch/CMakeLists.txt
++++ b/tests/catch/CMakeLists.txt
+@@ -3,11 +3,15 @@ if(ENABLE_UNIT_TESTS)
+ add_custom_target(unit_tests)
+
+ # Build catch_main test object
+-include_directories(${CATCH_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../../libsrc/include ${SPDLOG_INCLUDE_DIR})
++if(TARGET Catch2::Catch2)
++ get_target_property(CATCH_INCLUDE_DIR Catch2::Catch2 INTERFACE_INCLUDE_DIRECTORIES)
++ include_directories(${CATCH_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../../libsrc/include ${SPDLOG_INCLUDE_DIR})
++else()
++ message(SEND_ERROR "Catch header files couldn't be found.")
++endif()
+ add_library(catch_main STATIC main.cpp)
+ set_target_properties(catch_main PROPERTIES CXX_STANDARD 17)
+ add_dependencies(unit_tests catch_main)
+-add_dependencies(catch_main project_catch)
+
+ # ensure the test targets are built before testing
+ add_test(NAME unit_tests_built COMMAND ${CMAKE_COMMAND} --build . --target unit_tests --config ${CMAKE_BUILD_TYPE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../.. )
+--
+2.38.1
+
diff --git a/media-gfx/netgen/files/netgen-6.2.2204-use-system-spdlog.patch b/media-gfx/netgen/files/netgen-6.2.2204-use-system-spdlog.patch
new file mode 100644
index 000000000000..cbd45ca07f3f
--- /dev/null
+++ b/media-gfx/netgen/files/netgen-6.2.2204-use-system-spdlog.patch
@@ -0,0 +1,40 @@
+From e20e1e2e2109f1ce6580587f63ad000ac6bdd877 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Tue, 13 Dec 2022 08:14:12 +0100
+Subject: [PATCH] use system spdlog
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -481,8 +481,13 @@ endif(ENABLE_UNIT_TESTS)
+ #######################################################################
+
+ if(USE_SPDLOG)
+- include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/external_projects/spdlog.cmake)
+- include_directories(${SPDLOG_INCLUDE_DIR})
++ find_package(spdlog REQUIRED CONFIG)
++ if(TARGET spdlog::spdlog)
++ get_target_property(SPDLOG_INCLUDE_DIR spdlog::spdlog INTERFACE_INCLUDE_DIRECTORIES)
++ include_directories(${SPDLOG_INCLUDE_DIR})
++ else()
++ message(SEND_ERROR "You enabled USE_SPDLOG, but the spdlog package could not be found.")
++ endif()
+ endif(USE_SPDLOG)
+
+ if(ENABLE_CPP_CORE_GUIDELINES_CHECK)
+--- a/libsrc/core/CMakeLists.txt
++++ b/libsrc/core/CMakeLists.txt
+@@ -50,10 +50,6 @@ endif(TRACE_MEMORY)
+
+ if(USE_SPDLOG)
+ include_directories(${SPDLOG_INCLUDE_DIR})
+- install(DIRECTORY ${SPDLOG_INCLUDE_DIR}
+- DESTINATION ${NG_INSTALL_DIR_INCLUDE}
+- )
+- add_dependencies(ngcore project_spdlog)
+ target_compile_definitions(ngcore PUBLIC NETGEN_USE_SPDLOG)
+ if(DEBUG_LOG)
+ target_compile_definitions(ngcore PUBLIC NETGEN_LOG_DEBUG)
+--
+2.38.1
+