summaryrefslogtreecommitdiff
path: root/sci-libs/libmed
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-02-10 15:40:27 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-02-10 15:40:27 +0000
commit6bc2e4d7c5906e46a8f275a876ead6ec41aca5bb (patch)
treecee0a97398040001220ece3cd48c3d568bcddb4a /sci-libs/libmed
parent1db00cc6e94b90c08090bb5b8c406622946c4ae5 (diff)
gentoo resync : 10.02.2019
Diffstat (limited to 'sci-libs/libmed')
-rw-r--r--sci-libs/libmed/Manifest4
-rw-r--r--sci-libs/libmed/libmed-3.3.1.ebuild100
-rw-r--r--sci-libs/libmed/metadata.xml8
3 files changed, 112 insertions, 0 deletions
diff --git a/sci-libs/libmed/Manifest b/sci-libs/libmed/Manifest
new file mode 100644
index 000000000000..34aaee76f1e3
--- /dev/null
+++ b/sci-libs/libmed/Manifest
@@ -0,0 +1,4 @@
+DIST libmed-3.3.1-gentoo.tar.bz2 36111 BLAKE2B 2e09f73da8c0e07701abeb699e34c322bca591a2417e84c68deafb821c64caeaef4e356b7a9e6ead782da5059824e69ec4c47009532a716a00ac0a3a403ca4b4 SHA512 dfd2052a2e2201d6c0b55f24dbe22f6ffbd7bdf0cfe436e1a3f556eea23aeb4a8470bd330fa7caecf8bbb8fd491b0490f357cee063622b7aa1e39ce807e3b847
+DIST med-3.3.1.tar.gz 43379218 BLAKE2B 101033a766b3b8f184de8b18437a020129da3a11fd947742c30d8b9d274542e7445f1ee1d5827194a1ebc02c701ea6911105102f7b61c24d9d07bb15dbfe45f7 SHA512 f1eba3bc69520b862bdab89ce76694f91ed0e6be42c037df8ec655b6314e8ae776083d5ead61fb34097eb8440302969229d1859b6d8fcce51e7551b75d8ebf5f
+EBUILD libmed-3.3.1.ebuild 2960 BLAKE2B 989c6d9ca3881626f636b3b4590aca42de9ca496c9c616395159f600fcdd7e1593b92374c38789c19daa0e5c309228c20c42b5f95cc15343c30b87e5d66857e2 SHA512 f7d3ea804544ebe0fae8127d21cb95f3b3ed685d790f9408c179bede30321ff9c0738bb2c22d1f8c8678c6f3be691bcffd5669567f736b2f2dce66fa986820a1
+MISC metadata.xml 249 BLAKE2B 54d645d97d1d7247d704241142448ad8492c53d9aa7d69a7fcc51df476d08b6226fef93ec880696d52d90af056a1b296006eeb1798b58799d5b66b8edc336d81 SHA512 8ff95dedc1dff6414020296e10ae064acd622ded48000f43fa5e43bc834699f8cab267d48b382f087942a42fbefc343ced091b1c6db0feab95551ebe2cf18d25
diff --git a/sci-libs/libmed/libmed-3.3.1.ebuild b/sci-libs/libmed/libmed-3.3.1.ebuild
new file mode 100644
index 000000000000..c938f50de352
--- /dev/null
+++ b/sci-libs/libmed/libmed-3.3.1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# EAPI=7 uses ninja generator by default but it's incompatible with USE=fortran
+# https://github.com/Kitware/ninja/tree/features-for-fortran#readme
+CMAKE_MAKEFILE_GENERATOR=emake
+
+FORTRAN_NEEDED=fortran
+# NOTE:The build for multiple python versions should be possible but complecated for the build system
+PYTHON_COMPAT=( python2_7 python3_{3,4,5,6} )
+
+inherit cmake-utils fortran-2 python-single-r1
+
+MY_P="med-${PV}"
+
+DESCRIPTION="A library to store and exchange meshed data or computation results"
+HOMEPAGE="https://www.salome-platform.org/"
+SRC_URI="http://files.salome-platform.org/Salome/other/${MY_P}.tar.gz
+ https://dev.gentoo.org/~fordfrog/distfiles/${P}-gentoo.tar.bz2"
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc fortran mpi python static-libs test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RDEPEND="
+ sci-libs/hdf5[fortran=,mpi=]
+ mpi? ( virtual/mpi[fortran=] )
+ python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${RDEPEND}
+ python? ( >=dev-lang/swig-2.0.9:0 )
+"
+
+S="${WORKDIR}"/${MY_P}_SRC
+
+PATCHES=(
+ "${WORKDIR}/${P}-cmake-fortran.patch"
+ "${WORKDIR}/${P}-disable-python-compile.patch" # managed by function of python eclass
+ "${WORKDIR}/${P}-mpi.patch"
+ "${WORKDIR}/${P}-hdf5-1.10-support.patch" # taken from Debian
+ "${WORKDIR}/${P}-cmakelist.patch"
+ "${WORKDIR}/${P}-tests.patch" # disable a few tests not running
+ "${WORKDIR}/${P}-tests-python3.patch"
+ "${WORKDIR}/${P}-installdoc.patch"
+ "${WORKDIR}/${P}-python-imports.patch"
+)
+
+DOCS=( AUTHORS COPYING COPYING.LESSER ChangeLog NEWS README TODO )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ use fortran && fortran-2_pkg_setup
+}
+
+src_prepare() {
+ # fixes for correct libdir name
+ sed -i -e "s@SET(_install_dir lib/python@SET(_install_dir $(get_libdir)/python@" \
+ ./python/CMakeLists.txt || die "sed failed"
+ 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
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DMEDFILE_BUILD_FORTRAN=$(usex fortran)
+ -DMEDFILE_BUILD_STATIC_LIBS=$(usex static-libs)
+ -DMEDFILE_BUILD_PYTHON=$(usex python)
+ -DMEDFILE_BUILD_TESTS=$(usex test)
+ -DMEDFILE_INSTALL_DOC=$(usex doc)
+ -DMEDFILE_USE_MPI=$(usex mpi)
+ -DMEDFILE_DOC_DIRECTORY="${EPREFIX}"/usr/share/doc/${PF}/html # custom var created by patches
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # 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
+ use test && rm -rf "${D}"/usr/bin/{testc,testf,testpy}
+}
+
+src_test() {
+ # override parallel mode only for tests
+ local myctestargs=( "-j 1" )
+ cmake-utils_src_test
+}
diff --git a/sci-libs/libmed/metadata.xml b/sci-libs/libmed/metadata.xml
new file mode 100644
index 000000000000..11287d1296cc
--- /dev/null
+++ b/sci-libs/libmed/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>fordfrog@gentoo.org</email>
+ <name>Miroslav Ć ulc</name>
+ </maintainer>
+</pkgmetadata>