summaryrefslogtreecommitdiff
path: root/sci-libs/med
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
commit2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch)
tree8c816148bcbd22757d892089c989ae614eae4f5a /sci-libs/med
parent0f558761aa2dee1017b4751e4017205e015a9560 (diff)
gentoo resync : 09.07.2022
Diffstat (limited to 'sci-libs/med')
-rw-r--r--sci-libs/med/Manifest2
-rw-r--r--sci-libs/med/med-4.1.1.ebuild111
2 files changed, 113 insertions, 0 deletions
diff --git a/sci-libs/med/Manifest b/sci-libs/med/Manifest
index e2e8b64076ee..c6d9a303950a 100644
--- a/sci-libs/med/Manifest
+++ b/sci-libs/med/Manifest
@@ -2,5 +2,7 @@ AUX med-4.1.0-0001-Gentoo-specific-Adjust-install-path-for-build-dir.patch 1412
AUX med-4.1.0-0002-Re-add-option-for-building-Fortran-library.patch 1061 BLAKE2B 1856be8c2189e5d7541f041182e48315d686cadfeb409872eee25a90ff657cf1b6a5c76a4632a6d3d12af29b2f7ee67201d67c40cbc98927702ce1c905aa2509 SHA512 c40235bed175f84615115c899fad9f78a03205a7192bdf68f1b79a1711a7a15c58145102fce9850898f463d6d7ad16bbb89416f689d4013364955036628e7263
AUX med-4.1.0-0003-build-against-hdf5-1.12.patch 4749 BLAKE2B 3a606c27bce6130e83989dd4e16733ced50da0ef21dd40226ffb6f64abbd5f2eca2174f971b4bbf3204df0e6040b86706c007dbf6b821a5bb287b648078d9113 SHA512 ba2fa24e3aeb2be6fa1e7365d7ac57c9ebd8706dd19de7dba67507baafe1f48b7b00051169f27164b4a9e749816220619490d5f0796a0c02f25644569b26f366
DIST med-4.1.0.tar.gz 50375039 BLAKE2B 514ca19baf15e349ecbce870b318b37c51bfb57ac9b03c2b2c1b28836fec7fcf2dce573b9ea155f358d5e0bcee120c12a31598cd4f1e44837eca787553bb70d4 SHA512 94d07663c2f6a3cd497f54b480c3d742476d2a25172feb567980c9e75d49f4661aa2c6aaf570470938265997154e348bc1608065b86d42afda52d4e6361fedf8
+DIST med-4.1.1.tar.gz 50506725 BLAKE2B fb9bc3239c18c53fa42c5dd1101559746e8d38db2a3cb5fb47d1bf0cb578facc4ab95409af8524f5c20251848842cc1a331f6a816ce0754e9a6c95f507174ed1 SHA512 8917e7ecfe30e1259b0927c8e1c3d6efd86ed2386813f6d90217bd95589199478e587f0815031ab65cacf7901a30b77a6307414f9073caffe6e7f013e710d768
EBUILD med-4.1.0.ebuild 3341 BLAKE2B 8228252546d19d0e40db39d95c64f369249bc613b329f2f3e0f1abdc40a1562313330b0d4a5cd3d8aa9b4c6945a12eb783835940f67bc3d28d3b8ae6bf15c65c SHA512 498fcb9efafb20912faac9ca627aa6c2ac16bc288d2043043ead1c5a479f23142001f02d71b9e7a5e796f0536bbc2d2273624e7d7c95845cb7e54f6b95a23474
+EBUILD med-4.1.1.ebuild 3335 BLAKE2B 9e42135cba6f9861aa3a136eebd5824719d04f20bf87f372ebced24f477ed2cfc692e6b28e7ae39f0f6d140aa9488c410abf6fd1e7decf812b24a203f2df32c5 SHA512 762d5fa162671d8cf96b45c52419c8954431c35771cfcdae62d9838606f62d2d4502928744b9907f6a60aef3602860d7da222e1ea0be0248abb30ca9a5cd0c4e
MISC metadata.xml 636 BLAKE2B de5e1c1d3f715459d5ca0945d0d795c1c549e6e20c27283140190bdc24289f4ccc0c12940e00aa689b90fd9af53749f0eabab44cecaf6815ef37adc1795f43e9 SHA512 60a3c3afd0db34569993b73d795830d86eb51778f9a7f0375d0b196c6f0862ca10a77c4c33ad2c906c56c6715be6f4452b61ffab5a25c254e480e50b64c021e4
diff --git a/sci-libs/med/med-4.1.1.ebuild b/sci-libs/med/med-4.1.1.ebuild
new file mode 100644
index 000000000000..636cb55f6c71
--- /dev/null
+++ b/sci-libs/med/med-4.1.1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FORTRAN_NEEDED=fortran
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit cmake fortran-2 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"
+LICENSE="LGPL-3"
+S="${WORKDIR}/${P}_SRC"
+
+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
+ dev-lang/tk:0=
+ >=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.12.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
+ for cm in ./src/CMakeLists.txt ./tools/medimport/CMakeLists.txt
+ do
+ sed -i -e "s@INSTALL(TARGETS \(.*\) DESTINATION lib)@INSTALL(TARGETS \1 DESTINATION $(get_libdir))@" \
+ "${cm}" || die "sed on ${cm} failed"
+ done
+ sed -e 's/med-fichier/med/' -i CMakeLists.txt || die "fix paths failed"
+ sed -e 's|doc/med-${MED_STR_VERSION}|doc/med-${MED_STR_VERSION}/html|' \
+ -i CMakeLists.txt || die "fix doc path failed"
+
+ 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
+}