Updated libmed

This commit is contained in:
layman 2018-02-02 00:04:08 +01:00
parent a748ae043e
commit 9104bfd423
4 changed files with 129 additions and 5 deletions

View File

@ -1,5 +1,9 @@
AUX libmed-3.2.0-cmake-fortran.patch 587 SHA256 75f68c00f9dec0fa8c1f5177db0ba75a84eeefe047f42c28a2bd7d1c5e5cb358 SHA512 f534e88c6cfd9f0c68b280b6093dd90ebd5cb99f27f8259d7addde91875bdfb56ea4535133da81d3915870a950ba53d30789c2fe1e522a052209366792fde077 WHIRLPOOL 1fa7a99d4ebb4452583ee68222ce03db91e7c8c9a1a55909ebdda530b2c155baaf83dc2fd7d5af87f8cc925fe85a47bd7711733cd16276caccb903be699223e5
AUX libmed-3.2.0-fix-swig-build.patch 512 SHA256 4cd223b5df3aaf8905fc5ce9612199d0c49aefeab7c09abb29d2d75b85cb40a7 SHA512 21e7d319883be4ce29e4fe1c97cc75a3782c5a50c2a471434f03257921c5b231eb407c22e12ed268f61fda3031c5897c5a9dc08f774130417b535d3f242ee0c8 WHIRLPOOL 783946318565e9ea43da182bed8c23299ad742540ccf7d4c8172a8e1164c33dc2700ccc9ca751d35ebd847e5205bf193035b3a5d2eb42b4afe5fbe4f891e7fe6
DIST med-3.2.0.tar.gz 57197710 SHA256 d52e9a1bdd10f31aa154c34a5799b48d4266dc6b4a5ee05a9ceda525f2c6c138 SHA512 5a40d1fe454d5a1ec90dc192fe4a914433841928ffde668aeb7fd78d0aea1083f98c8c895b7bd8dbc28e91ed455cb8e7f1235fa9bce43e1e7feaf6abf20c94a8 WHIRLPOOL 5f74a31c73d3752a8ec09dbbfe1e2d49fc4460a1915b93fba9771130e7ff9d70aa6f303580a1d3996222010164487973f9813a4f357af9cebefb7f77a532514c
EBUILD libmed-3.2.0.ebuild 1564 SHA256 cf657c966cfec46cf5ae1dd9f51035c2169b065d734c2053a3246a6b36cf14c2 SHA512 eec0acc8c4fbf8118e8d5fe64380cdc8498d1351bc03315e6ee53ce309a0d6a45414030c59a5a3eef54d2f800fb775241eb677c17c1dee43181095fd0f528b87 WHIRLPOOL d05e06ed14095269a36964094fd69d57ca63f2e850203981729e27c9189cd087023c80820c9b01fb9057f24b8977fcb65be63dddb0c6cf96d28eee5d2290c76a
MISC metadata.xml 259 SHA256 bbfbeb80ffccffa8e7f837d2c93e994bbe024d565ae3a31d30c6646e80a684c8 SHA512 19fb78cf4029c154954a40df40e28fc8d98a8b7e6b42f97259f664d44c29b284feffb9d073cadc7f90b5654a64b2466e186cb677d3a11830206f173eb9057706 WHIRLPOOL 75b8dd1a97dde63f9cc9f73b5951eaf54579460763ef7cbe6f3a9a0739070601d762152ea00df8b476b80e92e5c29b611a494bac5ab747298942530cabe0ee84
AUX libmed-3.2.0-cmake-fortran.patch 587 BLAKE2B 67cfc65e724b249318a19eef9113a7e75cc2b505f4ac3c956bd04102fd7e5816513f72bb63f304f4105e8730ddfb860b9b6e61b6153767b78552eeea7cf9a50a SHA512 f534e88c6cfd9f0c68b280b6093dd90ebd5cb99f27f8259d7addde91875bdfb56ea4535133da81d3915870a950ba53d30789c2fe1e522a052209366792fde077
AUX libmed-3.2.0-fix-swig-build.patch 512 BLAKE2B 83bcf82752a3e95cac69b89d79b0649add20ff7a03d58a4cad16b3737d72a29056f3972ea37b1ddf7133e43e086455d273147ce9d4d7738717ae3a9a2276e8fb SHA512 21e7d319883be4ce29e4fe1c97cc75a3782c5a50c2a471434f03257921c5b231eb407c22e12ed268f61fda3031c5897c5a9dc08f774130417b535d3f242ee0c8
AUX libmed-3.2.1-cmake-fortran.patch 587 BLAKE2B 67cfc65e724b249318a19eef9113a7e75cc2b505f4ac3c956bd04102fd7e5816513f72bb63f304f4105e8730ddfb860b9b6e61b6153767b78552eeea7cf9a50a SHA512 f534e88c6cfd9f0c68b280b6093dd90ebd5cb99f27f8259d7addde91875bdfb56ea4535133da81d3915870a950ba53d30789c2fe1e522a052209366792fde077
AUX libmed-3.2.1-disable-python-compile.patch 1241 BLAKE2B 8d802e15f0bfae750b4a996b8b6c631a222e77e9cd15b850f9619c34f600e2d23b28d3843e55d2cf1a0c1c530d5898705a41ddf2f8cf5f492c7c510993bba418 SHA512 75d2f898f9c9609d28764681bada0921daee4e8dac911a6b7719d15f01747851c80f8439a371ead3fd52b41e9deacb22d2cd10a08cf64e7b832ffc27a14c08f2
DIST med-3.2.0.tar.gz 57197710 BLAKE2B 5b12879966badac112026da594a60073078d140acfc9973d60ef116d8fe22d6c8fac22cb5e019934a8ab79f24d9f6d9837a2ae67958f24d4f89415f1ba1ea4ec SHA512 5a40d1fe454d5a1ec90dc192fe4a914433841928ffde668aeb7fd78d0aea1083f98c8c895b7bd8dbc28e91ed455cb8e7f1235fa9bce43e1e7feaf6abf20c94a8
DIST med-3.2.1.tar.gz 46999306 BLAKE2B 02cf3e895494015305afa17533625fbc42ce6c5f82f91fd09eab8ce8d9a9da82281ba9117a43d57c148dc1e8765f5eee77623c16db7de9bb4dd673168851f938 SHA512 80f37295aee51960d4c5f52fecd7ac1cdaed05325ad9d8a950601dddbac7a8b252f8a81fe6e0b06d29acf9324fb9e28d42176b58a91a396602a6c6741c307140
EBUILD libmed-3.2.0.ebuild 1564 BLAKE2B 1b5c93cdeb975600864e014592fe2c4b46ba65042ea0463648deb3cfd89783d7f100ef2493d984edc731bb14da483e6f96bc0ebd80b42d39df5cab6fbe26c3e7 SHA512 eec0acc8c4fbf8118e8d5fe64380cdc8498d1351bc03315e6ee53ce309a0d6a45414030c59a5a3eef54d2f800fb775241eb677c17c1dee43181095fd0f528b87
EBUILD libmed-3.2.1.ebuild 2213 BLAKE2B ffa7b65b0a90a9bb86cfb3f62416429c107e19388d2b1a39831ce8be00da5b3522f2c3208b9dccd12644cc3d1be0bf0b215db0a72ef36fd04cd7782bc89e3323 SHA512 03c1a1434cb67094c4b13ece07ae2408f0cc1d77270998c62f6cbe3a5f389156e9e9515d86919fbc7bf34c7d56887604c74e96c0117b7197c9382ef77ad7b8eb
MISC metadata.xml 259 BLAKE2B dfc879984b6adce945d0e0a50f6ede2bca87147b9db99491359cdeccc2e74a20d56e14ae8903dbb80c94854f89bee539f14a4e3ce864204e277accf3f124a748 SHA512 19fb78cf4029c154954a40df40e28fc8d98a8b7e6b42f97259f664d44c29b284feffb9d073cadc7f90b5654a64b2466e186cb677d3a11830206f173eb9057706

View File

@ -0,0 +1,20 @@
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

View File

@ -0,0 +1,16 @@
--- ./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)

View File

@ -0,0 +1,84 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
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} )
inherit eutils toolchain-funcs fortran-2 python-single-r1 cmake-utils
MY_P="med-${PV}"
DESCRIPTION="A library to store and exchange meshed data or computation results"
HOMEPAGE="http://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 python static-libs test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
=sci-libs/hdf5-1.8*[fortran=]
sys-cluster/openmpi[fortran=]
python? ( ${PYTHON_DEPS} )
"
DEPEND="${RDEPEND}
python? ( >=dev-lang/swig-2.0.9:0 )
"
S=${WORKDIR}/${MY_P}_SRC
PATCHES=(
"${FILESDIR}/${P}-cmake-fortran.patch"
"${FILESDIR}/${P}-disable-python-compile.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_INSTALL_DOC="$(usex doc)"
-DMEDFILE_BUILD_PYTHON="$(usex python)"
-DMEDFILE_BUILD_TESTS="$(usex test)"
)
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
python_optimize
# Remove documentation
! use doc && rm -rf "${D}/usr/share/doc"
# Prevent test executables being installed
use test && rm -rf "${D}/usr/bin/"{testc,testf,usescases}
}