diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-02-12 09:56:54 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-02-12 09:56:54 +0000 |
commit | ebc282ef4dfa408accac685565b8ee5f6faec119 (patch) | |
tree | c0a4f713228cda0ab17eed46f0bb7ca8cb8be2f6 /media-gfx/netgen | |
parent | 6c8694a707151d59555b0e4e48235f085ce166c3 (diff) |
gentoo auto-resync : 12:02:2023 - 09:56:54
Diffstat (limited to 'media-gfx/netgen')
11 files changed, 406 insertions, 0 deletions
diff --git a/media-gfx/netgen/Manifest b/media-gfx/netgen/Manifest new file mode 100644 index 000000000000..1a0bb67781ba --- /dev/null +++ b/media-gfx/netgen/Manifest @@ -0,0 +1,11 @@ +AUX netgen-6.2.2204-disable-failing-tests.patch 612 BLAKE2B e5fad5fcc21942ece9fbc69a0a66fbcdb46dc9233000fe27c6321e4f30210c0f7951adb820a9f05f7131dab7cdd908cb315b101ac7078b036fbdce3c5c46f736 SHA512 81504313f1b7d4b317e54aa03f4c8b5a63505db8fb25e135c51b5c811fe31eeade4455efbb69053df841eba32bc0104d2f6c66791f9b59b5a9ba6c97d861942a +AUX netgen-6.2.2204-disable-python-tests.patch 521 BLAKE2B ed98bd8c54d3a7e77fdbe3e74ad381bf6d807d47b887e4f7aa9813b65b1d6440a6429faf365a1a463f294788545c7b6aaae86aafd7c69ac4e050d31d464bcdce SHA512 af99b5b1a1d6d0b999fc524ce7d72285b30c040d25846c177c019a7bdf0d7823c3ca2457f9bc2a90a1ae6f8594e9c7513d324451cf4054f57fcb3a299607c1f7 +AUX netgen-6.2.2204-find-Tk-include-directories.patch 797 BLAKE2B b1d049ef7e05936f762bfe0b409f8c8dde4730718007fd62e4ab0ca7178336d439aa52eadabce6bd6a9ccf56c61dcbc23e416cf3e18dec68e2fe9b36b23f0d3c SHA512 cc144615fb3ef4df21aa0f39c370d716a1afdf2a35d570ab92a80a14aeebffd79b7ff24d61378a363faad2024f90a1a672441fdc2578efd45cfaefe166552b5e +AUX netgen-6.2.2204-find-libjpeg-turbo-library.patch 1270 BLAKE2B b48245414ba9864f896a37913cb3b7268a0958c47d3d793f48a44ccfe3e60383b62419b74426f851fa2582009b297061f56775c20addebf9b3041bfda386f3b0 SHA512 ae28d6509039d027c1848530fc4bc3303a5069d7c2c2453d299f6ab839fbcd2f80ea032585a7d459364c6469e5a9fffb7b0a0e896f38d53b76059e091a82eba4 +AUX netgen-6.2.2204-link-against-ffmpeg.patch 710 BLAKE2B 28b01b18480af48c4967a25b8de303dbc21b52a63d3a441d5d8d8463c4498198868c8b96049b68ad5e1302c30d15c6d3a028a0cbd593d608d3d865a4b51abcc0 SHA512 df42aaf831ade1cb4bd36b59bcdee69f7f1b1f7c25f3e668e90fc391fccff6861cbcb58807189d5051bbfae0035c0f42a93c144caf44c89a636fa43c802d02ab +AUX netgen-6.2.2204-use-external-pybind11.patch 1209 BLAKE2B f1fbb7ecc9f07d5d0ccb6cef5ff8a5e6cd0866e12c47ad005f34b088d78d43f400a2b40543e6d34273b88f327dd11d46825c28a40655e608fb3692bee90319e1 SHA512 ca755f4074424feba97b5882e86b2645c7edb24bcb163594eb2dbb98fbcd38f86713e66d0f3b249adc50e896f4ae8c55ebe1a01937b79e94910cdfe7e2156232 +AUX netgen-6.2.2204-use-system-catch.patch 1521 BLAKE2B 34ee6fedced5381a1e2152fdd215774ac4dfd5d349ca4f342030cc98cd8370de4db260e7c4a6091785056766f652d4cd621964c0b68134bea56b6cd56903dcb8 SHA512 973fa6e6ce38567343548db09d1f7d56b2ef78b3c77aa11c94eda72f03e2c97ab495d9975df15bbdd3545fc3346059ef6d91a1cf1632744459c08bc4a8ac7d40 +AUX netgen-6.2.2204-use-system-spdlog.patch 1390 BLAKE2B 541725d179a0b3f9f9430f1268478adfdf378940b4503e962dd59071e8ac0dba60c5445d036d73103f6ec25017a1335f6eb7bfc38debb0ccff810229d5466890 SHA512 1519ce3628f2c5f17afea34bd4ebf102f2688c9440504f6828c611b749b0ae5b7d80b2b688c13769f6bd911faeb3d9d4f83e1ba663d8d5bdb2ef5bc2076f873c +DIST netgen-6.2.2204.tar.gz 3394806 BLAKE2B 2b99854cab0890662f1ab7ffee6fb444b60a28ba0bfe9970a89c80c0e4c930c40b8034f9c600ddd61c9b60f542d1cae758a8c220a1ba76949bf9f97fb2fe9020 SHA512 964c40753613c111b0372b0e403b19734cc0c559d1e7e45bbe6b452f4daba10c6bde8abaa5c9541c92b4bccff02d32ea6ba8e8e06ba64f11fec1733f2e374cbf +EBUILD netgen-6.2.2204.ebuild 3974 BLAKE2B d57636eef686e9bcc95d48b54d4a37d1879bfa96d005e24fff43777f71a422c207f14e660dd1bfcba73cf89d62eb541a164cd7021d0e6cc84c16bb7023043196 SHA512 18aac8d8f61e9c6e2d53273cad48254707bda9d7af4aa64bdb301350a077669997de18257e39f8ffbb9887b8755b1b4b3abf52c8c5e2aae7def7c21065866f39 +MISC metadata.xml 647 BLAKE2B bbd454b748f78fe5a95e956b00a4ada9d46ba38c98f6d763c63d2c09541fe8243f6d7d033ff7b96dd2a00ae14e2d9dbac5150015d950ba74c5c1b69a68678f2a SHA512 334ef398fa5da9f565c1a8b53c67b223fb710ce4b47b2bae5561695ff46c159c56ccaf43afc0ac7810e651e73953f609f04909ae3a1300cd411b8125341222a2 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 + diff --git a/media-gfx/netgen/metadata.xml b/media-gfx/netgen/metadata.xml new file mode 100644 index 000000000000..3c583c643516 --- /dev/null +++ b/media-gfx/netgen/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project" proxied="proxy"> + <email>sci-mathematics@gentoo.org</email> + <name>Gentoo Mathematics Project</name> + </maintainer> + <maintainer type="person" proxied="yes"> + <email>waebbl-gentoo@posteo.net</email> + <name>Bernd Waibel</name> + </maintainer> + <use> + <flag name="logging">Enable logging through <pkg>dev-libs/spdlog</pkg></flag> + <flag name="opencascade">Enable OpenCASCADE support</flag> + </use> + <upstream> + <remote-id type="github">NGSolve/netgen</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-gfx/netgen/netgen-6.2.2204.ebuild b/media-gfx/netgen/netgen-6.2.2204.ebuild new file mode 100644 index 000000000000..f4a8413a9832 --- /dev/null +++ b/media-gfx/netgen/netgen-6.2.2204.ebuild @@ -0,0 +1,155 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_10 ) +inherit cmake desktop python-single-r1 xdg + +DESCRIPTION="Automatic 3d tetrahedral mesh generator" +HOMEPAGE="https://ngsolve.org/ https://github.com/NGSolve/netgen" +SRC_URI="https://github.com/NGSolve/netgen/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="LGPL-2.1" +KEYWORDS="~amd64 ~x86" + +IUSE="ffmpeg gui jpeg logging mpi opencascade python test" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + ffmpeg? ( gui ) + jpeg? ( gui ) + python? ( gui ) +" + +DEPEND=" + sys-libs/zlib + ffmpeg? ( media-video/ffmpeg:= ) + gui? ( + dev-lang/tcl:0/8.6 + dev-lang/tk:0/8.6 + media-libs/glu + virtual/opengl + x11-libs/libX11 + x11-libs/libXmu + x11-libs/libxcb:= + ) + jpeg? ( media-libs/libjpeg-turbo:0= ) + logging? ( dev-libs/spdlog:= ) + mpi? ( + sci-libs/metis + virtual/mpi + ) + opencascade? ( sci-libs/opencascade:= ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/pybind11[${PYTHON_USEDEP}] + ' + ) + mpi? ( + $(python_gen_cond_dep 'dev-python/mpi4py[${PYTHON_USEDEP}]' ) + ) + ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + sys-apps/lsb-release + virtual/pkgconfig + gui? ( virtual/imagemagick-tools[png] ) + test? ( + <dev-cpp/catch-3:0 + python? ( $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]') ) + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-6.2.2204-use-external-pybind11.patch" + "${FILESDIR}/${PN}-6.2.2204-find-Tk-include-directories.patch" + "${FILESDIR}/${PN}-6.2.2204-find-libjpeg-turbo-library.patch" + "${FILESDIR}/${PN}-6.2.2204-link-against-ffmpeg.patch" + "${FILESDIR}/${PN}-6.2.2204-use-system-spdlog.patch" + "${FILESDIR}/${PN}-6.2.2204-use-system-catch.patch" + "${FILESDIR}/${PN}-6.2.2204-disable-failing-tests.patch" + "${FILESDIR}/${PN}-6.2.2204-disable-python-tests.patch" +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # NOTE: need to manually check and update this string on version bumps! + cat <<- EOF > "${S}/version.txt" || die + v${PV}-0-gde0d706e + EOF + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + # currently not working in a sandbox, expects netgen to be installed + # see https://github.com/NGSolve/netgen/issues/132 + -DBUILD_STUB_FILES=OFF + -DENABLE_UNIT_TESTS=$(usex test) + -DINSTALL_PROFILES=OFF + -DNG_INSTALL_DIR_CMAKE="$(get_libdir)/cmake/${PN}" + -DNG_INSTALL_DIR_INCLUDE="include/${PN}" + -DNG_INSTALL_DIR_LIB="$(get_libdir)" + -DUSE_CCACHE=OFF + # doesn't build with this version + -DUSE_CGNS=OFF + -DUSE_GUI=$(usex gui) + -DUSE_INTERNAL_TCL=OFF + -DUSE_JPEG=$(usex jpeg) + -DUSE_MPEG=$(usex ffmpeg) + # respect users -march= choice + -DUSE_NATIVE_ARCH=OFF + -DUSE_MPI=$(usex mpi) + -DUSE_OCC=$(usex opencascade) + -DUSE_PYTHON=$(usex python) + -DUSE_SPDLOG=$(usex logging) + -DUSE_SUPERBUILD=OFF + ) + # no need to set this, if we only build the library + if use gui; then + mycmakeargs+=( -DTK_INCLUDE_PATH="/usr/$(get_libdir)/tk8.6/include" ) + fi + if use python; then + mycmakeargs+=( + -DPYBIND_INCLUDE_DIR="/usr/lib/${EPYTHON}/site-packages/pybind11/include/" + -DNG_INSTALL_PYBIND=OFF + ) + fi + if use mpi && use python; then + mycmakeargs+=( -DUSE_MPI4PY=ON ) + else + mycmakeargs+=( -DUSE_MPI4PY=OFF ) + fi + cmake_src_configure +} + +src_install() { + cmake_src_install + use python && python_optimize + + local NETGENDIR="/usr/share/${PN}" + echo -e "NETGENDIR=${NETGENDIR}" > ./99netgen || die + doenvd 99netgen + + if use gui; then + mv "${ED}"/usr/bin/{*.tcl,*.ocf} "${ED}${NETGENDIR}" || die + + convert -deconstruct "${S}/windows/${PN}.ico" netgen.png || die + newicon -s 32 "${S}"/${PN}-2.png ${PN}.png + newicon -s 16 "${S}"/${PN}-3.png ${PN}.png + make_desktop_entry ${PN} "Netgen" netgen Graphics + fi + + mv "${ED}"/usr/share/${PN}/doc/ng4.pdf "${ED}"/usr/share/doc/${PF} || die + dosym -r /usr/share/doc/${PF}/ng4.pdf /usr/share/${PN}/doc/ng4.pdf + + use python || rm -r "${ED}${NETGENDIR}"/py_tutorials || die +} |