public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/med/, sci-libs/med/files/
@ 2019-09-03 22:35 Matthias Maier
  0 siblings, 0 replies; 5+ messages in thread
From: Matthias Maier @ 2019-09-03 22:35 UTC (permalink / raw
  To: gentoo-commits

commit:     e9b0b284bd806b5673853cfcfdecabc705702961
Author:     Bernd Waibel <waebbl <AT> gmail <DOT> com>
AuthorDate: Tue Sep  3 07:13:06 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Tue Sep  3 22:34:40 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9b0b284

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 <AT> gmail.com>
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 ...html.doc-Makefile.am-install-into-htmldir.patch |  50 +++++++++
 sci-libs/med/med-4.0.0-r1.ebuild                   | 119 +++++++++++++++++++++
 sci-libs/med/metadata.xml                          |  15 ++-
 3 files changed, 183 insertions(+), 1 deletion(-)

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 00000000000..e9dad6d5feb
--- /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 00000000000..703179668a8
--- /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 dd66d18ef4f..66143a59248 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>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/med/, sci-libs/med/files/
@ 2019-10-13 11:22 Joonas Niilola
  0 siblings, 0 replies; 5+ messages in thread
From: Joonas Niilola @ 2019-10-13 11:22 UTC (permalink / raw
  To: gentoo-commits

commit:     650bfa08aad0ce31430f6a848b6c6631eada41be
Author:     Bernd Waibel <waebbl <AT> gmail <DOT> com>
AuthorDate: Sun Sep 15 13:06:18 2019 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Oct 13 11:21:58 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=650bfa08

sci-libs/med: switch to cmake based build

The patch moves back to the cmake based build used in sci-libs/libmed.
The issues with sci-libs/gmsh not building with cmake built med have
been resolved. See https://bugs.gentoo.org/693146 comments 19-22

Closes: https://bugs.gentoo.org/694468
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Bernd Waibel <waebbl <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/12930
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sci-libs/med/files/med-3.3.1-cmake-fortran.patch   |  21 ++++
 .../files/med-3.3.1-disable-python-compile.patch   |  17 +++
 sci-libs/med/files/med-4.0.0-cmakelist.patch       |  59 +++++++++++
 sci-libs/med/files/med-4.0.0-installdoc.patch      |  15 +++
 sci-libs/med/med-4.0.0-r2.ebuild                   | 117 +++++++++++++++++++++
 5 files changed, 229 insertions(+)

diff --git a/sci-libs/med/files/med-3.3.1-cmake-fortran.patch b/sci-libs/med/files/med-3.3.1-cmake-fortran.patch
new file mode 100644
index 00000000000..1f475d58484
--- /dev/null
+++ b/sci-libs/med/files/med-3.3.1-cmake-fortran.patch
@@ -0,0 +1,21 @@
+Make cmake properly disable fortran upon user requirments
+
+--- ./CMakeLists.txt.orig	2016-07-01 15:28:57.139304608 +0300
++++ ./CMakeLists.txt	2016-07-01 15:34:22.295899455 +0300
+@@ -8,10 +8,13 @@
+ 
+ INCLUDE(CheckLanguage)
+ CHECK_LANGUAGE(Fortran)
+-IF(CMAKE_Fortran_COMPILER)
++OPTION (MEDFILE_BUILD_FORTRAN "Build fortran library" ON)
++IF(MEDFILE_BUILD_FORTRAN)
+   ENABLE_LANGUAGE(Fortran)
++  IF(NOT CMAKE_Fortran_COMPILER)
++      MESSAGE(FATAL_EROOR "Fortran support was requested but not found")
++  ENDIF()
+ ELSE()
+-  MESSAGE(STATUS "No Fortran support")
+ ENDIF()
+ 
+ ## Version number 
+

diff --git a/sci-libs/med/files/med-3.3.1-disable-python-compile.patch b/sci-libs/med/files/med-3.3.1-disable-python-compile.patch
new file mode 100644
index 00000000000..642b404ba88
--- /dev/null
+++ b/sci-libs/med/files/med-3.3.1-disable-python-compile.patch
@@ -0,0 +1,17 @@
+--- ./config/cmake_files/medMacros.cmake	2016-10-24 09:55:35.000000000 +0200
++++ ./config/cmake_files/medMacros.cmake.new	2018-01-24 10:50:15.146953227 +0100
+@@ -412,9 +412,9 @@
+   FOREACH(input ${PYFILE2COMPINST})
+     GET_FILENAME_COMPONENT(inputname ${input} NAME)
+     INSTALL(FILES ${input} DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYFILELOC})
+-    INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")")
+-    INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")")
+-    INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")
+-    INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")")
++	#INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")")
++	#INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")")
++	#INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")
++	#INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")")
+   ENDFOREACH(input ${PYFILE2COMPINST})
+ ENDMACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC)
+

diff --git a/sci-libs/med/files/med-4.0.0-cmakelist.patch b/sci-libs/med/files/med-4.0.0-cmakelist.patch
new file mode 100644
index 00000000000..4c023cf24b3
--- /dev/null
+++ b/sci-libs/med/files/med-4.0.0-cmakelist.patch
@@ -0,0 +1,59 @@
+--- a/src/CMakeLists.txt	2018-07-28 16:37:01.180598992 +0200
++++ a/src/CMakeLists.txt.new	2018-07-28 17:14:49.147775461 +0200
+@@ -1,7 +1,3 @@
+-INCLUDE_DIRECTORIES(
+-  ${HDF5_INCLUDE_DIRS}
+-  ${MPI_INCLUDE_DIRS})
+-
+ # On Win platform, we need to make sure symbols are properly exported in
+ # the intermediary OBJECT targes built in the sub-directories:
+ # The definition "-D<target>_EXPORTS" is normally added automatically by CMake
+@@ -19,6 +15,12 @@
+ INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include 
+     ${PROJECT_SOURCE_DIR}/include)
+
++# these includes must go after project ones to avoid masking by
++# previous versions already installed
++INCLUDE_DIRECTORIES(
++  ${HDF5_INCLUDE_DIRS}
++  ${MPI_INCLUDE_DIRS})
++
+ # Get pure C intermediary targets:
+ ADD_SUBDIRECTORY(hdfi)
+ ADD_SUBDIRECTORY(ci)
+--- a/tools/mdump/CMakeLists.txt	2018-07-29 09:24:35.714930029 +0200
++++ a/tools/mdump/CMakeLists.txt.new	2018-07-29 09:58:48.667089767 +0200
+@@ -33,6 +33,6 @@
+ CONFIGURE_FILE(xmdump3.in ${PROJECT_BINARY_DIR}/xmdump3 @ONLY)
+ 
+ INSTALL(PROGRAMS ${PROJECT_BINARY_DIR}/xmdump2 ${PROJECT_BINARY_DIR}/xmdump3 DESTINATION bin)
+-INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink mdump3 mdump WORKING_DIRECTORY ${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin)")
+-INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink xmdump3 xmdump WORKING_DIRECTORY ${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin)")
++INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink mdump3 mdump WORKING_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin\")")
++INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink xmdump3 xmdump WORKING_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin\")")
+ 
+--- a/src/2.3.6/CMakeLists.txt	2018-07-30 22:45:56.205079148 +0200
++++ a/src/2.3.6/CMakeLists.txt.new	2018-07-30 22:49:43.520096835 +0200
+@@ -1,8 +1,3 @@
+-INCLUDE_DIRECTORIES(
+-  ${HDF5_INCLUDE_DIRS}
+-  ${MPI_INCLUDE_DIRS}
+-)
+- 
+ SET(med236_SOURCES MEDaffiche.c)
+ 
+ # Definitions
+@@ -13,6 +8,13 @@
+     "${PROJECT_BINARY_DIR}/include/2.3.6"
+     "${PROJECT_SOURCE_DIR}/include/2.3.6")
+ 
++# these includes must go after project ones to avoid masking by
++# previous versions already installed
++INCLUDE_DIRECTORIES(
++  ${HDF5_INCLUDE_DIRS}
++  ${MPI_INCLUDE_DIRS}
++)
++ 
+ # Build intermediate targets _cfi236, _hdfi236, _misc236 and _ci236 
+ # (and their static counterpart):
+ ADD_SUBDIRECTORY(cfi)

diff --git a/sci-libs/med/files/med-4.0.0-installdoc.patch b/sci-libs/med/files/med-4.0.0-installdoc.patch
new file mode 100644
index 00000000000..2d9361c4265
--- /dev/null
+++ b/sci-libs/med/files/med-4.0.0-installdoc.patch
@@ -0,0 +1,15 @@
+--- ./CMakeLists.txt	2019-02-26 11:59:15.276962751 +0100
++++ ./CMakeLists.txt.new	2019-02-26 11:59:26.660962707 +0100
+@@ -137,9 +137,10 @@
+ ENDIF()
+ 
+ ## Installation of the doc
++set(MEDFILE_DOC_DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/doc/med-fichier-${MED_STR_VERSION} CACHE PATH "install dir for documentation")
+ IF(MEDFILE_INSTALL_DOC  OR MEDFILE_BUILD_DOC)
+-  INSTALL(DIRECTORY doc/html.dox/ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/med-fichier-${MED_STR_VERSION} REGEX "Makefile*" EXCLUDE PATTERN "*.am" EXCLUDE)
+-  INSTALL(DIRECTORY doc/gif doc/jpg doc/png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/med-fichier-${MED_STR_VERSION} FILES_MATCHING PATTERN "*.gif" PATTERN "*.jpg" PATTERN "*.svg" PATTERN "*.png")
++  INSTALL(DIRECTORY doc/html.dox/ DESTINATION ${MEDFILE_DOC_DIRECTORY} REGEX "Makefile*" EXCLUDE PATTERN "*.am" EXCLUDE)
++  INSTALL(DIRECTORY doc/gif doc/jpg doc/png DESTINATION ${MEDFILE_DOC_DIRECTORY} FILES_MATCHING PATTERN "*.gif" PATTERN "*.jpg" PATTERN "*.svg" PATTERN "*.png")
+ ENDIF()
+ 
+ #######################

diff --git a/sci-libs/med/med-4.0.0-r2.ebuild b/sci-libs/med/med-4.0.0-r2.ebuild
new file mode 100644
index 00000000000..837437559bd
--- /dev/null
+++ b/sci-libs/med/med-4.0.0-r2.ebuild
@@ -0,0 +1,117 @@
+# 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
+# complicated for the build system
+PYTHON_COMPAT=( python3_{5,6,7} )
+
+inherit cmake-utils 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"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc fortran mpi python test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RESTRICT="python? ( test )"
+
+# 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?]
+	mpi? ( virtual/mpi[fortran=] )
+	python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="python? ( >=dev-lang/swig-3.0.8 )"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-3.3.1-cmake-fortran.patch"
+	"${FILESDIR}/${PN}-3.3.1-disable-python-compile.patch"  # managed by function of python eclass
+	"${FILESDIR}/${P}-cmakelist.patch"
+	"${FILESDIR}/${P}-installdoc.patch"
+)
+
+DOCS=( AUTHORS ChangeLog NEWS README 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
+
+	cmake-utils_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_DOC_DIRECTORY="${EPREFIX}"/usr/share/doc/${PF}/html   # custom var created by patches
+		-DMEDFILE_INSTALL_DOC=$(usex doc)
+		-DMEDFILE_USE_MPI=$(usex mpi)
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_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-utils_src_test
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/med/, sci-libs/med/files/
@ 2020-12-01  7:56 Joonas Niilola
  0 siblings, 0 replies; 5+ messages in thread
From: Joonas Niilola @ 2020-12-01  7:56 UTC (permalink / raw
  To: gentoo-commits

commit:     d380deae6f2c8296632406cf6f461d10aab9749a
Author:     Bernd Waibel <waebbl <AT> gmail <DOT> com>
AuthorDate: Thu Nov 26 00:03:13 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Dec  1 07:56:02 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d380deae

sci-libs/med: drop old

Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Bernd Waibel <waebbl <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/18408
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ...html.doc-Makefile.am-install-into-htmldir.patch |  50 ---------
 sci-libs/med/med-4.0.0-r1.ebuild                   | 118 ---------------------
 sci-libs/med/metadata.xml                          |   5 -
 3 files changed, 173 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
deleted file mode 100644
index e9dad6d5feb..00000000000
--- a/sci-libs/med/files/med-4.0.0-0001-doc-html.doc-Makefile.am-install-into-htmldir.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-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
deleted file mode 100644
index 267105d848a..00000000000
--- a/sci-libs/med/med-4.0.0-r1.ebuild
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{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
-		--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 508afc5ef9c..9f49ce730ae 100644
--- a/sci-libs/med/metadata.xml
+++ b/sci-libs/med/metadata.xml
@@ -17,9 +17,4 @@
 		<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>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/med/, sci-libs/med/files/
@ 2021-08-25  6:17 Andrew Ammerlaan
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Ammerlaan @ 2021-08-25  6:17 UTC (permalink / raw
  To: gentoo-commits

commit:     350ea3e89d0e87e35a3a4b5f2ce92b55aae9d226
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Tue Aug 24 15:45:11 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Wed Aug 25 06:13:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=350ea3e8

sci-libs/med: fix build against hdf5-1.12

Thanks to Alexandre Ferreira for providing the patch.

Closes: https://bugs.gentoo.org/809008
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/22096
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../med-4.1.0-0003-build-against-hdf5-1.12.patch   | 117 +++++++++++++++++++++
 sci-libs/med/med-4.1.0.ebuild                      |   6 +-
 2 files changed, 121 insertions(+), 2 deletions(-)

diff --git a/sci-libs/med/files/med-4.1.0-0003-build-against-hdf5-1.12.patch b/sci-libs/med/files/med-4.1.0-0003-build-against-hdf5-1.12.patch
new file mode 100644
index 00000000000..46d7ed21af8
--- /dev/null
+++ b/sci-libs/med/files/med-4.1.0-0003-build-against-hdf5-1.12.patch
@@ -0,0 +1,117 @@
+From 5c9c1ce9911290283d39e16b1ed4c1d4ea5a5678 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Tue, 24 Aug 2021 08:32:13 +0200
+Subject: [PATCH] build against hdf5-1.12
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ config/cmake_files/medMacros.cmake | 4 ++--
+ src/ci/MEDfileCompatibility.c      | 2 +-
+ src/hdfi/_MEDfileCreate.c          | 2 +-
+ src/hdfi/_MEDfileOpen.c            | 2 +-
+ src/hdfi/_MEDmemFileOpen.c         | 2 +-
+ src/hdfi/_MEDparFileCreate.c       | 2 +-
+ src/hdfi/_MEDparFileOpen.c         | 2 +-
+ 7 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/config/cmake_files/medMacros.cmake b/config/cmake_files/medMacros.cmake
+index 957c59b..d73c7af 100644
+--- a/config/cmake_files/medMacros.cmake
++++ b/config/cmake_files/medMacros.cmake
+@@ -447,13 +447,13 @@ MACRO(MED_FIND_HDF5)
+     ##
+     ## Requires 1.10.x version
+     ##
+-    IF (NOT HDF_VERSION_MAJOR_REF EQUAL 1 OR NOT HDF_VERSION_MINOR_REF EQUAL 10 OR NOT HDF_VERSION_RELEASE_REF GREATER 1)
++    IF(HDF5_VERSION VERSION_LESS 1.10.2)
+         MESSAGE(FATAL_ERROR "HDF5 version is ${HDF_VERSION_REF}. Only versions >= 1.10.2 are supported.")
+     ENDIF()
+     ##
+     ##
+ 
+-    ADD_DEFINITIONS(-DH5_USE_16_API)  
++    ADD_DEFINITIONS(-DH5_USE_18_API -DH5_USE_16_API)
+     IF(WIN32 AND MEDFILE_BUILD_SHARED_LIBS)
+       ADD_DEFINITIONS(-D_HDF5USEDLL_ -DH5_BUILT_AS_DYNAMIC_LIB=1)   
+     ENDIF()
+diff --git a/src/ci/MEDfileCompatibility.c b/src/ci/MEDfileCompatibility.c
+index 1d6cabf..43b5b50 100644
+--- a/src/ci/MEDfileCompatibility.c
++++ b/src/ci/MEDfileCompatibility.c
+@@ -113,7 +113,7 @@ MEDfileCompatibility(const char* const filename,
+ #if MED_NUM_MAJEUR != 4
+ #error "Don't forget to update the test version here when you change the major version of the library !"
+ #endif
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to check the compatibility version of the library, depending on the internal hdf model choice !"
+ #error "Cf. _MEDfileCreate ..."
+ #endif
+diff --git a/src/hdfi/_MEDfileCreate.c b/src/hdfi/_MEDfileCreate.c
+index 4bc9551..b670c92 100644
+--- a/src/hdfi/_MEDfileCreate.c
++++ b/src/hdfi/_MEDfileCreate.c
+@@ -159,7 +159,7 @@ med_idt _MEDfileCreate(const char * const filename, const med_access_mode access
+    * En HDF5-1.10.0p1 cela n'a aucun effet ! 
+    * Un test autoconf permet de fixer un intervalle de version HDF à MED.
+    */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+    
+diff --git a/src/hdfi/_MEDfileOpen.c b/src/hdfi/_MEDfileOpen.c
+index 8ace00e..ebd875b 100644
+--- a/src/hdfi/_MEDfileOpen.c
++++ b/src/hdfi/_MEDfileOpen.c
+@@ -72,7 +72,7 @@ med_idt _MEDfileOpen(const char * const filename,const med_access_mode accessmod
+ 
+    •   The creation order tracking property, H5P_CRT_ORDER_TRACKED, has been set in the group creation property list (see H5Pset_link_creation_order). 
+   */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+ /* L'avantage de bloquer le modèle interne HDF5 
+diff --git a/src/hdfi/_MEDmemFileOpen.c b/src/hdfi/_MEDmemFileOpen.c
+index ae92ba7..4a929ff 100644
+--- a/src/hdfi/_MEDmemFileOpen.c
++++ b/src/hdfi/_MEDmemFileOpen.c
+@@ -434,7 +434,7 @@ med_idt _MEDmemFileOpen(const char * const filename, med_memfile * const memfile
+     goto ERROR;
+   }
+ 
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+   if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_18, H5F_LIBVER_18) ) {
+diff --git a/src/hdfi/_MEDparFileCreate.c b/src/hdfi/_MEDparFileCreate.c
+index f0b77be..b7d1b78 100644
+--- a/src/hdfi/_MEDparFileCreate.c
++++ b/src/hdfi/_MEDparFileCreate.c
+@@ -64,7 +64,7 @@ med_idt _MEDparFileCreate(const char * const filename, const med_access_mode acc
+    * En HDF5-1.10.0p1 cela n'a aucun effet ! 
+    * Un test autoconf permet de fixer un intervalle de version HDF à MED.
+    */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+    
+diff --git a/src/hdfi/_MEDparFileOpen.c b/src/hdfi/_MEDparFileOpen.c
+index 0a9700d..4933692 100644
+--- a/src/hdfi/_MEDparFileOpen.c
++++ b/src/hdfi/_MEDparFileOpen.c
+@@ -55,7 +55,7 @@ med_idt _MEDparFileOpen(const char * const filename,const med_access_mode access
+     MED_ERR_(_fid,MED_ERR_INIT,MED_ERR_PROPERTY,MED_ERR_PARALLEL_MSG);
+     goto ERROR;
+   }
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+   if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_18, H5F_LIBVER_18 ) ) {
+-- 
+2.32.0
+

diff --git a/sci-libs/med/med-4.1.0.ebuild b/sci-libs/med/med-4.1.0.ebuild
index ab5056e4a4d..ec6eef42dc1 100644
--- a/sci-libs/med/med-4.1.0.ebuild
+++ b/sci-libs/med/med-4.1.0.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
 FORTRAN_NEEDED=fortran
 
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
 
 inherit cmake fortran-2 python-single-r1
 
@@ -30,9 +30,11 @@ RDEPEND="
 DEPEND="${RDEPEND}"
 BDEPEND="python? ( >=dev-lang/swig-3.0.8 )"
 
+#	"${FILESDIR}/${P}-0003-fix-hdf5-version-check.patch"
 PATCHES=(
 	"${FILESDIR}/${P}-0001-Gentoo-specific-Adjust-install-path-for-build-dir.patch"
 	"${FILESDIR}/${P}-0002-Re-add-option-for-building-Fortran-library.patch"
+	"${FILESDIR}/${P}-0003-build-against-hdf5-1.12.patch"
 )
 
 DOCS=( AUTHORS ChangeLog NEWS README README.CMAKE TODO )


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/med/, sci-libs/med/files/
@ 2023-04-22  7:54 Andrew Ammerlaan
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Ammerlaan @ 2023-04-22  7:54 UTC (permalink / raw
  To: gentoo-commits

commit:     2001255cec8591e8fc18e821fdf40dad753cedea
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 22 07:53:12 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Apr 22 07:53:59 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2001255c

sci-libs/med: extend patch to hdf5 1.14

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../med-4.1.0-0003-build-against-hdf5-1.14.patch   | 117 +++++++++++++++++++++
 sci-libs/med/med-4.1.1-r2.ebuild                   | 114 ++++++++++++++++++++
 2 files changed, 231 insertions(+)

diff --git a/sci-libs/med/files/med-4.1.0-0003-build-against-hdf5-1.14.patch b/sci-libs/med/files/med-4.1.0-0003-build-against-hdf5-1.14.patch
new file mode 100644
index 000000000000..8a95866b7b0a
--- /dev/null
+++ b/sci-libs/med/files/med-4.1.0-0003-build-against-hdf5-1.14.patch
@@ -0,0 +1,117 @@
+From 5c9c1ce9911290283d39e16b1ed4c1d4ea5a5678 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Tue, 24 Aug 2021 08:32:13 +0200
+Subject: [PATCH] build against hdf5-1.12
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ config/cmake_files/medMacros.cmake | 4 ++--
+ src/ci/MEDfileCompatibility.c      | 2 +-
+ src/hdfi/_MEDfileCreate.c          | 2 +-
+ src/hdfi/_MEDfileOpen.c            | 2 +-
+ src/hdfi/_MEDmemFileOpen.c         | 2 +-
+ src/hdfi/_MEDparFileCreate.c       | 2 +-
+ src/hdfi/_MEDparFileOpen.c         | 2 +-
+ 7 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/config/cmake_files/medMacros.cmake b/config/cmake_files/medMacros.cmake
+index 957c59b..d73c7af 100644
+--- a/config/cmake_files/medMacros.cmake
++++ b/config/cmake_files/medMacros.cmake
+@@ -447,13 +447,13 @@ MACRO(MED_FIND_HDF5)
+     ##
+     ## Requires 1.10.x version
+     ##
+-    IF (NOT HDF_VERSION_MAJOR_REF EQUAL 1 OR NOT HDF_VERSION_MINOR_REF EQUAL 10 OR NOT HDF_VERSION_RELEASE_REF GREATER 1)
++    IF(HDF5_VERSION VERSION_LESS 1.10.2)
+         MESSAGE(FATAL_ERROR "HDF5 version is ${HDF_VERSION_REF}. Only versions >= 1.10.2 are supported.")
+     ENDIF()
+     ##
+     ##
+ 
+-    ADD_DEFINITIONS(-DH5_USE_16_API)  
++    ADD_DEFINITIONS(-DH5_USE_18_API -DH5_USE_16_API)
+     IF(WIN32 AND MEDFILE_BUILD_SHARED_LIBS)
+       ADD_DEFINITIONS(-D_HDF5USEDLL_ -DH5_BUILT_AS_DYNAMIC_LIB=1)   
+     ENDIF()
+diff --git a/src/ci/MEDfileCompatibility.c b/src/ci/MEDfileCompatibility.c
+index 1d6cabf..43b5b50 100644
+--- a/src/ci/MEDfileCompatibility.c
++++ b/src/ci/MEDfileCompatibility.c
+@@ -113,7 +113,7 @@ MEDfileCompatibility(const char* const filename,
+ #if MED_NUM_MAJEUR != 4
+ #error "Don't forget to update the test version here when you change the major version of the library !"
+ #endif
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to check the compatibility version of the library, depending on the internal hdf model choice !"
+ #error "Cf. _MEDfileCreate ..."
+ #endif
+diff --git a/src/hdfi/_MEDfileCreate.c b/src/hdfi/_MEDfileCreate.c
+index 4bc9551..b670c92 100644
+--- a/src/hdfi/_MEDfileCreate.c
++++ b/src/hdfi/_MEDfileCreate.c
+@@ -159,7 +159,7 @@ med_idt _MEDfileCreate(const char * const filename, const med_access_mode access
+    * En HDF5-1.10.0p1 cela n'a aucun effet ! 
+    * Un test autoconf permet de fixer un intervalle de version HDF à MED.
+    */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+    
+diff --git a/src/hdfi/_MEDfileOpen.c b/src/hdfi/_MEDfileOpen.c
+index 8ace00e..ebd875b 100644
+--- a/src/hdfi/_MEDfileOpen.c
++++ b/src/hdfi/_MEDfileOpen.c
+@@ -72,7 +72,7 @@ med_idt _MEDfileOpen(const char * const filename,const med_access_mode accessmod
+ 
+    •   The creation order tracking property, H5P_CRT_ORDER_TRACKED, has been set in the group creation property list (see H5Pset_link_creation_order). 
+   */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+ /* L'avantage de bloquer le modèle interne HDF5 
+diff --git a/src/hdfi/_MEDmemFileOpen.c b/src/hdfi/_MEDmemFileOpen.c
+index ae92ba7..4a929ff 100644
+--- a/src/hdfi/_MEDmemFileOpen.c
++++ b/src/hdfi/_MEDmemFileOpen.c
+@@ -434,7 +434,7 @@ med_idt _MEDmemFileOpen(const char * const filename, med_memfile * const memfile
+     goto ERROR;
+   }
+ 
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+   if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_18, H5F_LIBVER_18) ) {
+diff --git a/src/hdfi/_MEDparFileCreate.c b/src/hdfi/_MEDparFileCreate.c
+index f0b77be..b7d1b78 100644
+--- a/src/hdfi/_MEDparFileCreate.c
++++ b/src/hdfi/_MEDparFileCreate.c
+@@ -64,7 +64,7 @@ med_idt _MEDparFileCreate(const char * const filename, const med_access_mode acc
+    * En HDF5-1.10.0p1 cela n'a aucun effet ! 
+    * Un test autoconf permet de fixer un intervalle de version HDF à MED.
+    */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+    
+diff --git a/src/hdfi/_MEDparFileOpen.c b/src/hdfi/_MEDparFileOpen.c
+index 0a9700d..4933692 100644
+--- a/src/hdfi/_MEDparFileOpen.c
++++ b/src/hdfi/_MEDparFileOpen.c
+@@ -55,7 +55,7 @@ med_idt _MEDparFileOpen(const char * const filename,const med_access_mode access
+     MED_ERR_(_fid,MED_ERR_INIT,MED_ERR_PROPERTY,MED_ERR_PARALLEL_MSG);
+     goto ERROR;
+   }
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+   if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_18, H5F_LIBVER_18 ) ) {
+-- 
+2.32.0
+

diff --git a/sci-libs/med/med-4.1.1-r2.ebuild b/sci-libs/med/med-4.1.1-r2.ebuild
new file mode 100644
index 000000000000..6b6346b2560b
--- /dev/null
+++ b/sci-libs/med/med-4.1.1-r2.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FORTRAN_NEEDED=fortran
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit cmake flag-o-matic 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.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
+	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"
+
+	# 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
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-04-22  7:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-22  7:54 [gentoo-commits] repo/gentoo:master commit in: sci-libs/med/, sci-libs/med/files/ Andrew Ammerlaan
  -- strict thread matches above, loose matches on Subject: below --
2021-08-25  6:17 Andrew Ammerlaan
2020-12-01  7:56 Joonas Niilola
2019-10-13 11:22 Joonas Niilola
2019-09-03 22:35 Matthias Maier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox