-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sci-mathematics/netgen: add version 6.2.2105
Bug: NGSolve/netgen#72 Bug: NGSolve/netgen#77 Closes: https://bugs.gentoo.org/155424 Closes: https://bugs.gentoo.org/756214 Package-Manager: Portage-3.0.30, Repoman-3.0.3 RepoMan-Options: --force Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
- Loading branch information
1 parent
59ad8d0
commit 430efe1
Showing
4 changed files
with
139 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
DIST netgen-5.3.1.tar.gz 1857185 BLAKE2B 943c0d94f9f74d9d83674bde416ad63d2b0b1eb1029d901504d95285530998e03a92b6e71b4d844aab541c3e6a533613f0e90e4343c38f20f28321118b8e73c5 SHA512 6f5b5b8ab47fc3bf57281b26f26b13675aa719146c90a928eda3d704163e20a0a3baf27d520978ec6c4828ee6323eaef65deb851988eefef5d768a9ecad69fc8 | ||
DIST netgen-6.0-beta.tar.gz 1914050 BLAKE2B c7549d7344e3f514c3df6c6f213720fd2fdf1d0f403ffa4225ff470b3a1a7235bfea695de56e8718a1e1e9f0aebf311063bf1aae85f5cddd3df6d8b38e70077b SHA512 ce540f609a50ec7bb01aa2494a4a46885929367f2cdf4ee5842149ba0dec7a6b913cb92b283fd2b3fc9b5ba653ad2628ce5ea4423f94c6339a4f54941be02cf4 | ||
DIST netgen-6.2.2105.tar.gz 3372181 BLAKE2B 73ce8aff6e73a6a0ab79b0511c6c32c41240b9b6a743b8132cf27565b3c9f68820ad8337a9e761a37b74ffd7623a0321495a31dd868986ab4b90ff0dde66e9a8 SHA512 ed2727b7779af1ba564b0a7d9cc52fad5d3dccd478dcb71a4a77c7b9768a17eedfb6bfc2555f839cf592a7fc4ded5057f0e649239582e3d366d37ccfd030f4e9 |
35 changes: 35 additions & 0 deletions
35
sci-mathematics/netgen/files/netgen-6.2.2105-find-tk.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index dcc24af..24f444e 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -246,7 +246,8 @@ if (USE_GUI) | ||
|
||
add_definitions(-DTCL -DOPENGL -DUSE_TOGL_2) | ||
include_directories(${TCL_INCLUDE_PATH}) | ||
- include_directories(${TK_INCLUDE_PATH}) | ||
+ include_directories(${TK_INCLUDE_PATH}/generic) | ||
+ include_directories(${TK_INCLUDE_PATH}/unix) | ||
set(LIBTOGL togl) | ||
|
||
if(WIN32) | ||
@@ -268,7 +269,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}") | ||
diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake | ||
index c24b631..2354a09 100644 | ||
--- a/cmake/SuperBuild.cmake | ||
+++ b/cmake/SuperBuild.cmake | ||
@@ -39,7 +39,6 @@ endif(NOT WIN32) | ||
####################################################################### | ||
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}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
PYTHON_COMPAT=( python3_{8..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 jpeg mpi opencascade openmp python +gui" | ||
REQUIRED_USE="${PYTHON_REQUIRED_USE}" | ||
|
||
DEPEND=" | ||
dev-lang/tcl:0/8.6 | ||
dev-lang/tk:0/8.6 | ||
dev-tcltk/tix | ||
dev-tcltk/togl:0 | ||
gui? ( | ||
virtual/opengl | ||
x11-libs/libX11 | ||
x11-libs/libXmu | ||
) | ||
python? ( | ||
${PYTHON_DEPS} | ||
$(python_gen_cond_dep ' | ||
dev-python/pybind11[${PYTHON_USEDEP}] | ||
dev-python/pybind11-stubgen[${PYTHON_USEDEP}] | ||
' | ||
) | ||
mpi? ( | ||
$(python_gen_cond_dep 'dev-python/mpi4py[${PYTHON_USEDEP}]' ) | ||
) | ||
) | ||
opencascade? ( sci-libs/opencascade:* ) | ||
ffmpeg? ( media-video/ffmpeg ) | ||
jpeg? ( virtual/jpeg:0= ) | ||
mpi? ( virtual/mpi sci-libs/parmetis opencascade? ( sci-libs/hdf5[mpi] ) ) | ||
" | ||
RDEPEND="${DEPEND}" | ||
BDEPEND="dev-vcs/git" | ||
|
||
PATCHES=( "${FILESDIR}/${P}-find-tk.patch" ) | ||
|
||
src_prepare() { | ||
# https://github.com/NGSolve/netgen/issues/72 | ||
git init -q || die | ||
git config --global user.email "you@example.com" || die | ||
git config --global user.name "Your Name" || die | ||
git add . || die | ||
git commit -qm 'init' || die | ||
git tag "${PV}" || die | ||
|
||
cmake_src_prepare | ||
} | ||
|
||
src_configure() { | ||
local mycmakeargs=( | ||
-DUSE_MPI="$(usex mpi)" | ||
-DUSE_JPEG="$(usex jpeg)" | ||
-DUSE_MPEG="$(usex ffmpeg)" | ||
-DUSE_GUI="$(usex gui)" | ||
-DUSE_OCC="$(usex opencascade)" | ||
-DUSE_PYTHON="$(usex python)" | ||
-DTK_INCLUDE_PATH="/usr/$(get_libdir)/tk8.6/include" | ||
-DNG_INSTALL_DIR_LIB="$(get_libdir)" | ||
-DINSTALL_PROFILES=ON | ||
-DUSE_INTERNAL_TCL=OFF | ||
) | ||
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 | ||
local NETGENDIR="/usr/share/netgen" | ||
|
||
echo -e "NETGENDIR=${NETGENDIR} \nLDPATH=/usr/$(get_libdir)/Togl2.0" > ./99netgen | ||
doenvd 99netgen | ||
|
||
mv "${D}"/usr/bin/{*.tcl,*.ocf} "${D}${NETGENDIR}" || die | ||
|
||
# Install icon and .desktop for menu entry | ||
doicon "${FILESDIR}"/${PN}.png | ||
domenu "${FILESDIR}"/${PN}.desktop | ||
} |