summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2019-03-02 10:48:51 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2019-03-02 10:49:27 +0100
commit19d8a60bca95451a1f424d6ef313ff14f6ea9d34 (patch)
tree02ebfb023d8f8aed78dd7898dd891917815686a1 /sci-libs
parentdev-libs/boehm-gc: bump up to 8.0.4 (diff)
downloadgentoo-19d8a60bca95451a1f424d6ef313ff14f6ea9d34.tar.gz
gentoo-19d8a60bca95451a1f424d6ef313ff14f6ea9d34.tar.bz2
gentoo-19d8a60bca95451a1f424d6ef313ff14f6ea9d34.zip
sci-libs/libmed-4.0.0: bump (bug #678824)
Signed-off-By: Fabio Rossi <rossi.f@inwind.it> Closes: https://bugs.gentoo.org/678824 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/libmed/Manifest1
-rw-r--r--sci-libs/libmed/files/libmed-3.3.1-cmake-fortran.patch21
-rw-r--r--sci-libs/libmed/files/libmed-3.3.1-disable-python-compile.patch17
-rw-r--r--sci-libs/libmed/files/libmed-3.3.1-mpi.patch23
-rw-r--r--sci-libs/libmed/files/libmed-4.0.0-cmakelist.patch59
-rw-r--r--sci-libs/libmed/files/libmed-4.0.0-hdf5-1.8-support.patch15
-rw-r--r--sci-libs/libmed/files/libmed-4.0.0-installdoc.patch15
-rw-r--r--sci-libs/libmed/files/libmed-4.0.0-tests.patch17
-rw-r--r--sci-libs/libmed/libmed-4.0.0.ebuild100
9 files changed, 268 insertions, 0 deletions
diff --git a/sci-libs/libmed/Manifest b/sci-libs/libmed/Manifest
index 42dd35aa740c..796dff296118 100644
--- a/sci-libs/libmed/Manifest
+++ b/sci-libs/libmed/Manifest
@@ -1,2 +1,3 @@
DIST libmed-3.3.1-r1-gentoo.tar.bz2 36127 BLAKE2B c112215932ac5c84cc75911c20712fcf428a8fc6e8adfd497066315fbc99a70816e0276196ff6366f34eeb3bf6d40586a735dd35cc13579640d7128f563fbf2b SHA512 e55dc96b8282dfba0dc9746dba7ef2ea8616d5617deabd3164d0134ca680e27c2a121432ae22f38fc53a52ffb0ac66a9a17c131488a9d01a757601afbcdc0bff
DIST med-3.3.1.tar.gz 43379218 BLAKE2B 101033a766b3b8f184de8b18437a020129da3a11fd947742c30d8b9d274542e7445f1ee1d5827194a1ebc02c701ea6911105102f7b61c24d9d07bb15dbfe45f7 SHA512 f1eba3bc69520b862bdab89ce76694f91ed0e6be42c037df8ec655b6314e8ae776083d5ead61fb34097eb8440302969229d1859b6d8fcce51e7551b75d8ebf5f
+DIST med-4.0.0.tar.gz 47849098 BLAKE2B 0bc6710f7b5156e09962e3125349573989429e614a203f649843f00dea06217040ebee70e481eed9c0dd304cb7d167efcd216c3600f6954a74f262cc845fff63 SHA512 2840437010481fc5f12a56e3282f8ca5e94df541899e2b511756702f86d0f87dbf2f6e086d8e591e2bd370d8f4bab8089e7f7f939fea16354a23e2b5a4d96cd7
diff --git a/sci-libs/libmed/files/libmed-3.3.1-cmake-fortran.patch b/sci-libs/libmed/files/libmed-3.3.1-cmake-fortran.patch
new file mode 100644
index 000000000000..1f475d584843
--- /dev/null
+++ b/sci-libs/libmed/files/libmed-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/libmed/files/libmed-3.3.1-disable-python-compile.patch b/sci-libs/libmed/files/libmed-3.3.1-disable-python-compile.patch
new file mode 100644
index 000000000000..642b404ba880
--- /dev/null
+++ b/sci-libs/libmed/files/libmed-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/libmed/files/libmed-3.3.1-mpi.patch b/sci-libs/libmed/files/libmed-3.3.1-mpi.patch
new file mode 100644
index 000000000000..0516b344a0bf
--- /dev/null
+++ b/sci-libs/libmed/files/libmed-3.3.1-mpi.patch
@@ -0,0 +1,23 @@
+--- a/include/med.h.in 2018-07-06 10:55:49.247164591 +0200
++++ a/include/med.h.in.new 2018-07-06 10:55:29.559164666 +0200
+@@ -19,6 +19,11 @@
+ #ifndef MED_H
+ #define MED_H
+
++@MED_DEFINE_MED_HAVE_MPI@
++#ifdef MED_HAVE_MPI
++#include <mpi.h>
++#endif
++
+ #include <hdf5.h>
+ #ifdef HAVE_STDINT_H
+ #include <stdint.h> // Use the C99 official header
+@@ -66,8 +71,6 @@
+ #define _MED_VERSION(x,y,z) STR(x) "." STR(y) "." STR(z)
+ #define MED_VERSION_STR _MED_VERSION(MED_NUM_MAJEUR,MED_NUM_MINEUR,MED_NUM_RELEASE)
+
+-@MED_DEFINE_MED_HAVE_MPI@
+-
+ #define MED_NULL (void *) NULL
+ #define MED_MAX_PARA 20
+
diff --git a/sci-libs/libmed/files/libmed-4.0.0-cmakelist.patch b/sci-libs/libmed/files/libmed-4.0.0-cmakelist.patch
new file mode 100644
index 000000000000..4c023cf24b31
--- /dev/null
+++ b/sci-libs/libmed/files/libmed-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/libmed/files/libmed-4.0.0-hdf5-1.8-support.patch b/sci-libs/libmed/files/libmed-4.0.0-hdf5-1.8-support.patch
new file mode 100644
index 000000000000..72838c3dee90
--- /dev/null
+++ b/sci-libs/libmed/files/libmed-4.0.0-hdf5-1.8-support.patch
@@ -0,0 +1,15 @@
+--- ./config/cmake_files/medMacros.cmake 2019-01-09 17:16:00.951884862 +0100
++++ ./config/cmake_files/medMacros.cmake.new 2019-01-09 17:18:48.753888600 +0100
+@@ -396,10 +396,10 @@
+ ##
+ ## 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)
+- MESSAGE(FATAL_ERROR "HDF5 version is ${HDF_VERSION_REF}. Only versions >= 1.10.2 are supported.")
+- ENDIF()
++ #IF (NOT HDF_VERSION_MAJOR_REF EQUAL 1 OR NOT HDF_VERSION_MINOR_REF EQUAL 10 OR NOT HDF_VERSION_RELEASE_REF GREATER 1)
++ # MESSAGE(FATAL_ERROR "HDF5 version is ${HDF_VERSION_REF}. Only versions >= 1.10.2 are supported.")
++ #ENDIF()
+ ##
+ ##
+
diff --git a/sci-libs/libmed/files/libmed-4.0.0-installdoc.patch b/sci-libs/libmed/files/libmed-4.0.0-installdoc.patch
new file mode 100644
index 000000000000..2d9361c42657
--- /dev/null
+++ b/sci-libs/libmed/files/libmed-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/libmed/files/libmed-4.0.0-tests.patch b/sci-libs/libmed/files/libmed-4.0.0-tests.patch
new file mode 100644
index 000000000000..91041fb4c126
--- /dev/null
+++ b/sci-libs/libmed/files/libmed-4.0.0-tests.patch
@@ -0,0 +1,17 @@
+--- ./tests/python/CMakeLists.txt.orig 2018-11-05 14:22:25.000000000 +0100
++++ ./tests/python/CMakeLists.txt 2019-01-09 17:37:17.142913290 +0100
+@@ -33,11 +33,13 @@
+ UseCase_MEDinterp_3.py
+ )
+
++FILE(COPY tests_params.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
++
+ FOREACH(_s IN LISTS _tst_scripts)
+ STRING(REPLACE ".py" "_Python" _tst_name ${_s})
+ FILE(COPY ${_s} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+ ADD_TEST(NAME ${_tst_name}
+- COMMAND "/usr/bin/env" "PYTHONPATH=${PROJECT_BINARY_DIR}/python" "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/${_s}")
++ COMMAND "/usr/bin/env" "PYTHONPATH=${PROJECT_BINARY_DIR}/python:${PROJECT_BINARY_DIR}/python/med" "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/${_s}")
+ ENDFOREACH()
+
+ INSTALL(FILES ${_to_install} DESTINATION bin/testpy)
diff --git a/sci-libs/libmed/libmed-4.0.0.ebuild b/sci-libs/libmed/libmed-4.0.0.ebuild
new file mode 100644
index 000000000000..06e007ccb4da
--- /dev/null
+++ b/sci-libs/libmed/libmed-4.0.0.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"
+
+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}
+
+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}/${PN}-3.3.1-mpi.patch"
+ "${FILESDIR}/${P}-hdf5-1.8-support.patch"
+ "${FILESDIR}/${P}-cmakelist.patch"
+ "${FILESDIR}/${P}-tests.patch" # disable a few tests not running
+ "${FILESDIR}/${P}-installdoc.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
+ # 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
+ )
+ 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
+}