summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Waibel <waebbl@gmail.com>2019-09-03 09:13:06 +0200
committerMatthias Maier <tamiko@gentoo.org>2019-09-03 17:34:40 -0500
commite9b0b284bd806b5673853cfcfdecabc705702961 (patch)
treedf617d8057ebd34704e0231aa72f751623eac6c2
parentgames-arcade/shovel-knight: New package (diff)
downloadgentoo-e9b0b284bd806b5673853cfcfdecabc705702961.tar.gz
gentoo-e9b0b284bd806b5673853cfcfdecabc705702961.tar.bz2
gentoo-e9b0b284bd806b5673853cfcfdecabc705702961.zip
sci-libs/med: merge libmed into med
* Merge sci-libs/libmed into sci-libs/med, to resolve redundancy. * Changed to use autotools instead of cmake, as sci-libs/gmsh does not build against the cmake built variant. * Remove mpi USE flag, as there's no option to disable mpi support when using autotools to build the package. Closes: https://bugs.gentoo.org/693146 Package-Manager: Portage-2.3.74, Repoman-2.3.17 Signed-off-by: Bernd Waibel <waebbl@gmail.com> Signed-off-by: Matthias Maier <tamiko@gentoo.org>
-rw-r--r--sci-libs/med/files/med-4.0.0-0001-doc-html.doc-Makefile.am-install-into-htmldir.patch50
-rw-r--r--sci-libs/med/med-4.0.0-r1.ebuild119
-rw-r--r--sci-libs/med/metadata.xml15
3 files changed, 183 insertions, 1 deletions
diff --git a/sci-libs/med/files/med-4.0.0-0001-doc-html.doc-Makefile.am-install-into-htmldir.patch b/sci-libs/med/files/med-4.0.0-0001-doc-html.doc-Makefile.am-install-into-htmldir.patch
new file mode 100644
index 000000000000..e9dad6d5febe
--- /dev/null
+++ b/sci-libs/med/files/med-4.0.0-0001-doc-html.doc-Makefile.am-install-into-htmldir.patch
@@ -0,0 +1,50 @@
+From 73a776f76043d122438d716d0958489fc67bab8e Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Sun, 1 Sep 2019 22:02:42 +0200
+Subject: [PATCH] doc/html.doc/Makefile.am: install into $htmldir
+
+Patches the install-data-local target to use $htmldir instead of $docdir
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ doc/html.dox/Makefile.am | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/doc/html.dox/Makefile.am b/doc/html.dox/Makefile.am
+index 9dc5b08..3946777 100644
+--- a/doc/html.dox/Makefile.am
++++ b/doc/html.dox/Makefile.am
+@@ -36,25 +36,25 @@ html-local: $(builddir)/../dox/Doxyfile.cfg
+ diff $(builddir)/htmllistfile2.am.tmp $(srcdir)/htmllistfile2.am || @CP@ $(builddir)/htmllistfile2.am.tmp $(srcdir)/htmllistfile2.am
+
+ install-data-local: $(htmllistfile1) $(htmllistfile2) $(htmllistfile3)
+- test -z "$(DESTDIR)$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
++ test -z "$(DESTDIR)$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ for i in $(htmllistfile1) ; do \
+ $(INSTALL_DATA) \
+ `test -f $$i || echo $(srcdir)/`$$i \
+- $(DESTDIR)$(docdir) ; \
++ $(DESTDIR)$(htmldir) ; \
+ done
+ for i in $(htmllistfile2) ; do \
+ $(INSTALL_DATA) \
+ `test -f $$i || echo $(srcdir)/`$$i \
+- $(DESTDIR)$(docdir) ; \
++ $(DESTDIR)$(htmldir) ; \
+ done
+ for i in $(htmllistfile3) ; do \
+ $(INSTALL_DATA) \
+ `test -f $$i || echo $(srcdir)/`$$i \
+- $(DESTDIR)$(docdir) ; \
++ $(DESTDIR)$(htmldir) ; \
+ done
+
+ uninstall-local: $(htmllistfile1) $(htmllistfile2) $(htmllistfile3)
+- rm -rf $(DESTDIR)$(docdir);
++ rm -rf $(DESTDIR)$(htmldir);
+
+ .PHONY: htmlclean
+
+--
+2.22.0
+
diff --git a/sci-libs/med/med-4.0.0-r1.ebuild b/sci-libs/med/med-4.0.0-r1.ebuild
new file mode 100644
index 000000000000..703179668a8c
--- /dev/null
+++ b/sci-libs/med/med-4.0.0-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{5,6,7} )
+
+inherit autotools flag-o-matic fortran-2 python-single-r1
+
+#DESCRIPTION="A library to store and exchange meshed data or computation results"
+DESCRIPTION="Modeling and Exchange of Data library"
+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"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc fortran hdf5_16_api python test"
+
+# fails to run parallel tests
+RESTRICT="test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+# dev-lang/tk is needed for wish-based xmdump utility
+RDEPEND="
+ !sci-libs/libmed
+ dev-lang/tk:0=
+ >=sci-libs/hdf5-1.10.2:=[fortran=,mpi(+)]
+ virtual/mpi[fortran=]
+ python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="python? ( >=dev-lang/swig-3.0.8 )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-0001-doc-html.doc-Makefile.am-install-into-htmldir.patch"
+)
+
+DOCS=( AUTHORS ChangeLog README )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ use fortran && fortran-2_pkg_setup
+}
+
+src_prepare() {
+ if use hdf5_16_api; then
+ append-cppflags -DH5_USE_16_API
+ fi
+
+ # add flag to produce python 3 code
+ sed -e 's|SWIG_PYTHON_OPT += -c++|SWIG_PYTHON_OPT += -c++ -relativeimport -py3|' \
+ -i ./python/Makefile.am || die "failed to change swig options"
+
+ # don't use version information when linking python libraries
+ sed -e 's|= -module|= -avoid-version -module|' \
+ -i ./python/Makefile.am || die "failed to change python link flags"
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --disable-api23
+ --disable-installtest
+ --disable-static
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ --with-hdf5="${EPREFIX}"/usr
+ --with-hdf5-lib="${EPREFIX}"/usr/$(get_libdir)
+ $(use_enable fortran)
+ $(use_enable python)
+ )
+
+ if ! use fortran; then
+ myconf+=(
+ --with-f90=no
+ )
+ fi
+
+ if use python; then
+ myconf+=(
+ --with-swig="${EPREFIX}/usr"
+ )
+ fi
+
+ export MPICC=mpicc
+ export MPICXX=mpicxx
+ export MPIFC=mpif90
+ export MPIF77=mpif77
+ export FC=mpif90
+ export F77=mpif77
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ use python && python_optimize
+
+ default
+
+ find "${ED}/usr/$(get_libdir)" -type f -name '*.la' -delete || die "failed to delete *.la files"
+
+ # remove unnecessary doc subdirs
+ rm -r "${ED}"/usr/share/doc/${PF}/{gif,jpg,odt,png} || die "failed to remove unneeded doc subdirs"
+ if ! use doc; then
+ rm -r "${ED}"/usr/share/doc/${PF}/html || die "failed to remove html documentation"
+ fi
+
+ # Prevent test executables being installed
+ if use test; then
+ rm -r "${ED}"/usr/bin/{testc,testf,testpy} || die "failed to delete test executables"
+ fi
+
+ # 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"
+
+ rm "${ED}"/usr/$(get_libdir)/libmed3.settings || die "failed to remove libmed3.settings"
+}
diff --git a/sci-libs/med/metadata.xml b/sci-libs/med/metadata.xml
index dd66d18ef4fd..66143a59248b 100644
--- a/sci-libs/med/metadata.xml
+++ b/sci-libs/med/metadata.xml
@@ -5,8 +5,21 @@
<email>tamiko@gentoo.org</email>
<name>Matthias Maier</name>
</maintainer>
+ <maintainer type="person">
+ <email>waebbl@gmail.com</email>
+ <name>Bernd Waibel</name>
+ </maintainer>
<maintainer type="project">
<email>sci@gentoo.org</email>
- <name>Gentoo Science Project</name>
+ <description>Gentoo Science Project</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <description>Gentoo Proxy Maintainers</description>
</maintainer>
+ <use>
+ <flag name="hdf5_16_api">
+ Use -DH5_USE_16_API to build the package against old 1.6 API of HDF5
+ </flag>
+ </use>
</pkgmetadata>