summaryrefslogtreecommitdiff
path: root/sci-libs/med
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-05 02:07:17 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-05 02:07:17 +0000
commita6764d56b1c85c8272783500983011c143c72d80 (patch)
tree4012d67c099814931c6188b22a6b5eb4e77f1d6a /sci-libs/med
parent38ecaf88ae0891dd2d7f2bdd9a7acdcd45835724 (diff)
gentoo auto-resync : 05:12:2024 - 02:07:17
Diffstat (limited to 'sci-libs/med')
-rw-r--r--sci-libs/med/Manifest1
-rw-r--r--sci-libs/med/med-4.1.1-r4.ebuild112
2 files changed, 113 insertions, 0 deletions
diff --git a/sci-libs/med/Manifest b/sci-libs/med/Manifest
index 0cc83975addd..8ae14bfd34e8 100644
--- a/sci-libs/med/Manifest
+++ b/sci-libs/med/Manifest
@@ -5,4 +5,5 @@ AUX med-4.1.0-0003-build-against-hdf5-1.14.patch 4749 BLAKE2B 2968edac958b96a66c
DIST med-4.1.1.tar.gz 50506725 BLAKE2B fb9bc3239c18c53fa42c5dd1101559746e8d38db2a3cb5fb47d1bf0cb578facc4ab95409af8524f5c20251848842cc1a331f6a816ce0754e9a6c95f507174ed1 SHA512 8917e7ecfe30e1259b0927c8e1c3d6efd86ed2386813f6d90217bd95589199478e587f0815031ab65cacf7901a30b77a6307414f9073caffe6e7f013e710d768
EBUILD med-4.1.1-r1.ebuild 3420 BLAKE2B 57dd4c3ffd7c3d9cd7413252ae04a58f0cbe86223e7bca74eafc4caf808c7c194232ada980d652528f727e19a9a12a8e9d098d805d00d7b63169d30b05113de1 SHA512 30c185c5e7b88b8756af77c207138900745e7906721ab9fe675f663c01670754774ce34f366dc154bc128803f614453d1c448ea828f06d03320c39c8f2a31a2d
EBUILD med-4.1.1-r3.ebuild 3187 BLAKE2B a0507b98b5f91eca0fad6a99f85e1ca886248deeacc00f6174774fc3d8fe3b5345fb7a7e3e43c05c56604e7aa6e5b20feed3dcf4cf91ca5c02785da2e26f4c07 SHA512 ead43d7ba64af6ee56ea6060294f194939d5311790e5b326b2c4f4d1ae54980e848c3812c8b341523a807afd6e2f7615ac2b2b456d15461004a927f420a2870d
+EBUILD med-4.1.1-r4.ebuild 3252 BLAKE2B eff71ed92899dfdc8434e0dd9c0bab6cc1c8f41b54dfb7c735a53e3e6ce837a7c5029f74c187bd9b3bd007628b24e28482db451115eaf6fecf061b742ebe8b13 SHA512 a825b4327303a4132a21a2689b6c8ed69f67426a2b797a8134460114a8360d45018c2f7d383c0922b031970eb424efa72a4417c1a72c8258cfeb8a86d3807814
MISC metadata.xml 636 BLAKE2B de5e1c1d3f715459d5ca0945d0d795c1c549e6e20c27283140190bdc24289f4ccc0c12940e00aa689b90fd9af53749f0eabab44cecaf6815ef37adc1795f43e9 SHA512 60a3c3afd0db34569993b73d795830d86eb51778f9a7f0375d0b196c6f0862ca10a77c4c33ad2c906c56c6715be6f4452b61ffab5a25c254e480e50b64c021e4
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
+}