From: "Andrew Ammerlaan" <andrewammerlaan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/, sci-mathematics/netgen/files/
Date: Thu, 13 Jan 2022 14:19:42 +0000 (UTC) [thread overview]
Message-ID: <1642083483.430efe1166a93e1acf87c1980142052339f1ac5a.andrewammerlaan@gentoo> (raw)
commit: 430efe1166a93e1acf87c1980142052339f1ac5a
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 13 14:18:03 2022 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 14:18:03 2022 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=430efe11
sci-mathematics/netgen: add version 6.2.2105
Bug: https://github.com/NGSolve/netgen/issues/72
Bug: https://github.com/NGSolve/netgen/issues/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 <AT> gentoo.org>
.../netgen/files/netgen-6.2.2105-find-tk.patch | 35 +++++++
sci-mathematics/netgen/metadata.xml | 2 +-
sci-mathematics/netgen/netgen-6.2.2105.ebuild | 102 +++++++++++++++++++++
3 files changed, 138 insertions(+), 1 deletion(-)
diff --git a/sci-mathematics/netgen/files/netgen-6.2.2105-find-tk.patch b/sci-mathematics/netgen/files/netgen-6.2.2105-find-tk.patch
new file mode 100644
index 000000000..c638d83a7
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-6.2.2105-find-tk.patch
@@ -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})
diff --git a/sci-mathematics/netgen/metadata.xml b/sci-mathematics/netgen/metadata.xml
index a2cd926a4..cb94caeca 100644
--- a/sci-mathematics/netgen/metadata.xml
+++ b/sci-mathematics/netgen/metadata.xml
@@ -9,6 +9,6 @@
<flag name="opencascade"> Enable OpenCASCADE support</flag>
</use>
<upstream>
- <remote-id type="sourceforge">netgen-mesher</remote-id>
+ <remote-id type="github">NGSolve/netgen</remote-id>
</upstream>
</pkgmetadata>
diff --git a/sci-mathematics/netgen/netgen-6.2.2105.ebuild b/sci-mathematics/netgen/netgen-6.2.2105.ebuild
new file mode 100644
index 000000000..ba602adf6
--- /dev/null
+++ b/sci-mathematics/netgen/netgen-6.2.2105.ebuild
@@ -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
+}
next reply other threads:[~2022-01-13 14:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 14:19 Andrew Ammerlaan [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-11-15 12:15 [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/, sci-mathematics/netgen/files/ Andrew Ammerlaan
2016-02-22 8:38 Justin Lecher
2016-02-22 8:38 Justin Lecher
2016-02-22 8:38 Justin Lecher
2016-02-22 8:38 Justin Lecher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1642083483.430efe1166a93e1acf87c1980142052339f1ac5a.andrewammerlaan@gentoo \
--to=andrewammerlaan@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox