From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1726524-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id C6BB01582EF
	for <garchives@archives.gentoo.org>; Mon, 10 Mar 2025 23:03:40 +0000 (UTC)
Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	(Authenticated sender: relay-lists.gentoo.org@gentoo.org)
	by smtp.gentoo.org (Postfix) with ESMTPSA id AAA603430F8
	for <garchives@archives.gentoo.org>; Mon, 10 Mar 2025 23:03:40 +0000 (UTC)
Received: from bobolink.gentoo.org (localhost [127.0.0.1])
	by bobolink.gentoo.org (Postfix) with ESMTP id AC52811037F;
	Mon, 10 Mar 2025 23:03:39 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by bobolink.gentoo.org (Postfix) with ESMTPS id 9FCAA11037F
	for <gentoo-commits@lists.gentoo.org>; Mon, 10 Mar 2025 23:03:39 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 4A01F3430AE
	for <gentoo-commits@lists.gentoo.org>; Mon, 10 Mar 2025 23:03:39 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id D6FE41F05
	for <gentoo-commits@lists.gentoo.org>; Mon, 10 Mar 2025 23:03:37 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1741647797.dd23c721e57d589da48232fb656fc59ae0ccb7a9.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/gmsh/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sci-libs/gmsh/gmsh-4.13.1-r2.ebuild
X-VCS-Directories: sci-libs/gmsh/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: dd23c721e57d589da48232fb656fc59ae0ccb7a9
X-VCS-Branch: master
Date: Mon, 10 Mar 2025 23:03:37 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 81971a3a-61e4-4af6-bda5-ec1372819633
X-Archives-Hash: 4c98f62ca12e6b826fc8e2317e19e582

commit:     dd23c721e57d589da48232fb656fc59ae0ccb7a9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 10 23:03:11 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 10 23:03:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd23c721

sci-libs/gmsh: fix USE=python

Thanks to Alex Wranovsky.

Closes: https://bugs.gentoo.org/867520
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/gmsh/gmsh-4.13.1-r2.ebuild | 143 ++++++++++++++++++++++++++++++++++++
 1 file changed, 143 insertions(+)

diff --git a/sci-libs/gmsh/gmsh-4.13.1-r2.ebuild b/sci-libs/gmsh/gmsh-4.13.1-r2.ebuild
new file mode 100644
index 000000000000..c12bdced483b
--- /dev/null
+++ b/sci-libs/gmsh/gmsh-4.13.1-r2.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake desktop fortran-2 python-r1 toolchain-funcs xdg-utils
+
+DESCRIPTION="Three-dimensional finite element mesh generator"
+HOMEPAGE="https://gmsh.info https://gitlab.onelab.info/gmsh/gmsh"
+SRC_URI="https://gmsh.info/src/${P}-source.tgz"
+S="${WORKDIR}/${P}-source"
+
+LICENSE="
+	GPL-2+ free-noncomm
+	alglib? ( MIT )
+	gmm? ( LGPL-2.1+ )
+	metis? ( Apache-2.0 )
+	netgen? ( LGPL-2.1+ )
+	voro? ( BSD )
+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+## cgns is not compiling ATM, maybe fix cgns lib first
+IUSE="+alglib +blas cgns eigen examples +gmm jpeg med metis mpi mumps netgen opencascade petsc pdf png python shared slepc X voro zlib"
+
+REQUIRED_USE="
+	^^ ( blas eigen )
+	mumps? ( blas )
+	slepc? ( petsc )
+	python? ( shared ${PYTHON_REQUIRED_USE} )
+	"
+
+RDEPEND="
+	virtual/fortran
+	X? ( x11-libs/fltk:1=[xft(+)] )
+	alglib? ( sci-libs/alglib )
+	blas? (
+		virtual/blas
+		virtual/lapack
+		sci-libs/fftw:3.0
+	)
+	cgns? (
+		sci-libs/cgnslib
+		sci-libs/hdf5:=[mpi=]
+	)
+	eigen? ( dev-cpp/eigen )
+	gmm? ( sci-mathematics/gmm )
+	jpeg? ( media-libs/libjpeg-turbo )
+	med? (
+		sci-libs/med[mpi=]
+		sci-libs/hdf5:=[mpi=]
+	)
+	metis? ( >=sci-libs/metis-5.2.0 )
+	mpi? ( virtual/mpi[cxx] )
+	mumps? ( sci-libs/mumps[mpi=] )
+	opencascade? ( sci-libs/opencascade:* )
+	pdf? ( app-text/poppler:= )
+	png? ( media-libs/libpng:0 )
+	petsc? ( sci-mathematics/petsc[mpi=] )
+	python? ( ${PYTHON_DEPS} )
+	slepc? ( sci-mathematics/slepc[mpi=] )
+	voro? ( sci-libs/voro++ )
+	zlib? ( sys-libs/zlib )
+	"
+
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	virtual/pkgconfig
+	python? ( dev-lang/swig:0 )
+	"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.9.5-opencascade.patch
+	"${FILESDIR}"/${PN}-4.11.1-metis-5-2.patch
+)
+
+pkg_setup() {
+	fortran-2_pkg_setup
+}
+
+src_configure() {
+	local mycmakeargs=( )
+
+	use blas && \
+		mycmakeargs+=(-DCMAKE_Fortran_COMPILER=$(tc-getF77))
+
+	mycmakeargs+=(
+		-DENABLE_ALGLIB="$(usex alglib)"
+		-DENABLE_BLAS_LAPACK="$(usex blas)"
+		-DENABLE_BUILD_DYNAMIC="$(usex shared)"
+		-DENABLE_CGNS="$(usex cgns)"
+		-DENABLE_EIGEN="$(usex eigen)"
+		-DENABLE_FLTK="$(usex X)"
+		-DENABLE_GMM="$(usex gmm)"
+		-DENABLE_GRAPHICS="$(usex X)"
+		-DENABLE_MED="$(usex med)"
+		-DENABLE_MPI="$(usex mpi)"
+		-DENABLE_METIS="$(usex metis)"
+		-DENABLE_MUMPS="$(usex mumps)"
+		-DENABLE_NETGEN="$(usex netgen)"
+		-DENABLE_OCC="$(usex opencascade)"
+		-DENABLE_PETSC="$(usex petsc)"
+		-DENABLE_POPPLER="$(usex pdf)"
+		-DENABLE_SLEPC="$(usex slepc)"
+		-DENABLE_PRIVATE_API="$(usex shared)"
+		-DENABLE_SYSTEM_CONTRIB="YES"
+		-DENABLE_VOROPP="$(usex voro)"
+		-DENABLE_WRAP_PYTHON="$(usex python)")
+
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+
+	if use examples ; then
+		dodoc -r examples tutorials
+		docompress -x /usr/share/doc/${PF}/{examples,tutorials}
+	fi
+
+	if use python; then
+		python_foreach_impl python_domodule api/gmsh.py
+	fi
+
+	if use X ; then
+		newicon -s 64 "/${S}/utils/icons/gmsh-no-text.png" gmsh.png
+		make_desktop_entry "/usr/bin/gmsh" "Gmsh ${PV}" "gmsh" "Science;Math"
+	fi
+}
+
+pkg_postinst() {
+	if use X ; then
+		xdg_icon_cache_update
+	fi
+}
+
+pkg_postrm() {
+	if use X ; then
+		xdg_icon_cache_update
+	fi
+}