From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (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 0398A1581D8 for ; Wed, 4 Dec 2024 18:10:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7269DE07D0; Wed, 4 Dec 2024 18:10:45 +0000 (UTC) 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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 50401E07A9 for ; Wed, 4 Dec 2024 18:10:44 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 40392335D0F for ; Wed, 4 Dec 2024 18:10:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9E3B012D4 for ; Wed, 4 Dec 2024 18:10:41 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1733335835.033f22c78e754f0d025852d7579ee2a0aa3f380f.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/med/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/med/med-4.1.1-r4.ebuild X-VCS-Directories: sci-libs/med/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: 033f22c78e754f0d025852d7579ee2a0aa3f380f X-VCS-Branch: master Date: Wed, 4 Dec 2024 18:10:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 20330716-7c73-4469-a63b-617ff3d3358b X-Archives-Hash: 8ac4cc8066633517a7f3159ca14922c4 commit: 033f22c78e754f0d025852d7579ee2a0aa3f380f Author: Chris Mayo gmail com> AuthorDate: Thu Oct 24 18:49:54 2024 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Wed Dec 4 18:10:35 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=033f22c7 sci-libs/med: Make dev-lang/tk an optfeature Only used by xmdump scripts. Signed-off-by: Chris Mayo gmail.com> Closes: https://github.com/gentoo/gentoo/pull/39102 Signed-off-by: Joonas Niilola gentoo.org> sci-libs/med/med-4.1.1-r4.ebuild | 112 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/sci-libs/med/med-4.1.1-r4.ebuild b/sci-libs/med/med-4.1.1-r4.ebuild new file mode 100644 index 000000000000..ce0d521ecfd1 --- /dev/null +++ b/sci-libs/med/med-4.1.1-r4.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +FORTRAN_NEEDED=fortran + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic fortran-2 optfeature python-single-r1 + +DESCRIPTION="A library to store and exchange meshed data or computation results" +HOMEPAGE="https://www.salome-platform.org/user-section/about/med" +SRC_URI="https://files.salome-platform.org/Salome/other/${P}.tar.gz" +S="${WORKDIR}/${P}_SRC" +LICENSE="LGPL-3" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc fortran mpi python test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( test ) python? ( test )" + +RDEPEND=" + !sci-libs/libmed + >=sci-libs/hdf5-1.10.2:=[fortran?,mpi(+)?] + mpi? ( virtual/mpi[fortran?] ) + python? ( ${PYTHON_DEPS} ) +" +DEPEND="${RDEPEND}" +BDEPEND="python? ( >=dev-lang/swig-3.0.8 )" + +PATCHES=( + "${FILESDIR}/${PN}-4.1.0-0001-Gentoo-specific-Adjust-install-path-for-build-dir.patch" + "${FILESDIR}/${PN}-4.1.0-0002-Re-add-option-for-building-Fortran-library.patch" + "${FILESDIR}/${PN}-4.1.0-0003-build-against-hdf5-1.14.patch" +) + +DOCS=( AUTHORS ChangeLog NEWS README README.CMAKE TODO ) + +pkg_setup() { + use python && python-single-r1_pkg_setup + use fortran && fortran-2_pkg_setup +} + +src_prepare() { + if use python; then + # fixes for correct libdir name + local pysite=$(python_get_sitedir) + pysite="${pysite##/usr/}" + sed \ + -e 's@SET(_install_dir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/med)@SET(_install_dir '${pysite}'/med)@' \ + -i ./python/CMakeLists.txt || die "sed on ./python/CMakeLists.txt failed" + fi + sed -e 's/med-fichier/med/' -i CMakeLists.txt || die "fix paths failed" + sed -e 's|doc/med-${MED_STR_VERSION}|doc/'${PF}'/html|' \ + -i CMakeLists.txt || die "fix doc path failed" + + # bug #862900, already reported upstream. CHECK on updates! + filter-lto + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + # as indicated in the CMakeLists.txt, the shipped documentation is generated by a custom doxygen, + # so let's avoid rebuilding it because it will be different + -DMEDFILE_BUILD_DOC=OFF + -DMEDFILE_BUILD_FORTRAN=$(usex fortran) + -DMEDFILE_BUILD_PYTHON=$(usex python) + -DMEDFILE_BUILD_SHARED_LIBS=ON + -DMEDFILE_BUILD_STATIC_LIBS=OFF + -DMEDFILE_BUILD_TESTS=$(usex test) + -DMEDFILE_INSTALL_DOC=$(usex doc) + -DMEDFILE_USE_MPI=$(usex mpi) + -DMEDFILE_USE_UNICODE=ON + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + + # we don't need old 2.3.6 include files + rm -r "${ED}"/usr/include/2.3.6 || die "failed to delete obsolete include dir" + + # the optimization done in CMakeLists.txt has been disabled so + # we need to do it manually + use python && python_optimize + + # Prevent test executables being installed + if use test; then + rm -r "${ED}"/usr/bin/testc || die "failed to delete C test executables" + if use fortran; then + rm -r "${ED}"/usr/bin/testf || die "failed to delete fortran test executables" + fi + if use python; then + rm -r "${ED}"/usr/bin/testpy || die "failed to delete python test executables" + fi + fi +} + +src_test() { + # override parallel mode only for tests + local myctestargs=( "-j 1" ) + cmake_src_test +} + +pkg_postinst() { + optfeature "xmdump scripts support" dev-lang/tk +}