summaryrefslogtreecommitdiff
path: root/sci-libs/med
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-10-13 22:19:36 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-10-14 23:22:23 +0100
commit4b19be30aa626b327c885dae62c559ec0e9fb935 (patch)
tree76e74807bc479502e13866b581b6bf86734ec634 /sci-libs/med
parent30d6f67c98d149508509d5e86f176d558793acc0 (diff)
gentoo resync : 13.10.2019
Diffstat (limited to 'sci-libs/med')
-rw-r--r--sci-libs/med/Manifest5
-rw-r--r--sci-libs/med/files/med-3.3.1-cmake-fortran.patch21
-rw-r--r--sci-libs/med/files/med-3.3.1-disable-python-compile.patch17
-rw-r--r--sci-libs/med/files/med-4.0.0-cmakelist.patch59
-rw-r--r--sci-libs/med/files/med-4.0.0-installdoc.patch15
-rw-r--r--sci-libs/med/med-4.0.0-r2.ebuild117
6 files changed, 234 insertions, 0 deletions
diff --git a/sci-libs/med/Manifest b/sci-libs/med/Manifest
index be3be43db4b2..bf623c874aa0 100644
--- a/sci-libs/med/Manifest
+++ b/sci-libs/med/Manifest
@@ -1,4 +1,9 @@
+AUX med-3.3.1-cmake-fortran.patch 588 BLAKE2B 7fbd1619692702edb395402d30ee5ae7b44a801be010547a89ac777db7e86a11975f170eb1713e190b367bf5c5c3bf156dbf3522d263fe480387a7b40af572c3 SHA512 5c23d7afc8aad0c91b96d10953fe4c39cd079e798f0cbc5efdd9f5beb3967af1582f1c47f53d8be8a291222194f05205f06d19b1a3c3192fd4cce778052846b1
+AUX med-3.3.1-disable-python-compile.patch 1242 BLAKE2B 5c0a500376665cea4429820b3c41eac1d8bf25b1a172a236327e74768891ca1ec7ed143e0d7c803eac5194a6b762538731c068aca53cc5f2b8071d9b0ce08b57 SHA512 29dd13933412b19a4bb003d2337cfd3d35bedff430325809947d41b276690a3413976b39487e4577ad74a6c6ca1c611e63ee09873f0ea2acae1a21475a6bb2e5
AUX med-4.0.0-0001-doc-html.doc-Makefile.am-install-into-htmldir.patch 1683 BLAKE2B 7b5c58e14c36d08e534139df2deba0cd3dd14bc3b66ed3472f89c8693aad73b7215806b4a4a6e3696e5e54855e4deea428309cea48519c85bf99f94f6355f5ba SHA512 4175e0c4b89e541cf27932392333e08960849ebd8e2897a340bce09c7500782064afadfaa51ff8dea89d420636e8bbb28a60fa8fe23432531b233da4462f568a
+AUX med-4.0.0-cmakelist.patch 2421 BLAKE2B 38991513aabbb8237a8b0d9456d9bb76f38cffecff9b1b4c906c0f9d17abd6c02ec150420403d8c1b36310b871f5354e100d1038d5620f6ba8719074e0ccd665 SHA512 405669dedc95b3776a2f4f6d64f8a608c914adb7d0666690f1f8b4a0598d6d85c7398622f50c50ead0295ee965fa993c36eb9e4217985079b528714682ea8b5d
+AUX med-4.0.0-installdoc.patch 1045 BLAKE2B ddc44d986743a4bf1fa59ab20d34835117f2213283ad13ce1e8e16358b87fe64888facb2f32da76a025cc283a5d942554700cc8816c25cb6f0eeaa54970f1f9a SHA512 486eb41af086d2dc92463aa8f64f074f70a39920b4954e4c272bc6b92c960efe198255975b7c594ff801be43e9eb6a31d007f55451901107db90ed6b3389eee6
DIST med-4.0.0.tar.gz 47849098 BLAKE2B 0bc6710f7b5156e09962e3125349573989429e614a203f649843f00dea06217040ebee70e481eed9c0dd304cb7d167efcd216c3600f6954a74f262cc845fff63 SHA512 2840437010481fc5f12a56e3282f8ca5e94df541899e2b511756702f86d0f87dbf2f6e086d8e591e2bd370d8f4bab8089e7f7f939fea16354a23e2b5a4d96cd7
EBUILD med-4.0.0-r1.ebuild 2955 BLAKE2B 0ec34136f384fd172b7cf07fb8d0ed896f363f4a05b2a784bce784fb7747258aef27894c3850988536b1eb9d27c02729aa14609b4a76988eb7b4a4beafe6801b SHA512 b07717aa5cebf4421b9caa11a48adfd303ef661cc75d656f60ee0315134387028067e2d420556277248bbe408f8a97b6b0bd31f3c2726ca4a27dc0fca381e3ec
+EBUILD med-4.0.0-r2.ebuild 3509 BLAKE2B 4a73a8220662c5039d2acb54f9b76ca8b0902b8f6c6a837a07bc168998af732f4c9447f87545f649b5d81ae23abf2e1d1d48a44bb22b2415bd512050dd453a4a SHA512 480b25ae9249214602af7129b34d1b64303700a97452440fb4e5703051632ca36fe87ec68ae422c79b046750eed18b21fd9aaa68bbcb596eed9b33ec8b55cb49
MISC metadata.xml 743 BLAKE2B 26b8d89344c704c98c0819d9c10818667619f77ac704086ee645cbae2d15a59c36533edfe13e787da7e20f0611ddedbc2d761e33277d5a0b1f3328f2704971f9 SHA512 65a7ccf699c82ba6830d0172c87e83651f7d02182f3974fbd725e027046e4a2496fbdab9be852d1796f254622a73f697a3677fbb771a30a06a0b8d9c0a54c4bf
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 000000000000..1f475d584843
--- /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 000000000000..642b404ba880
--- /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 000000000000..4c023cf24b31
--- /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 000000000000..2d9361c42657
--- /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 000000000000..837437559bdc
--- /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
+}