1 |
commit: eee60ddc06b828a650e90eb01ecd6ec5e7de1249 |
2 |
Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net> |
3 |
AuthorDate: Wed Jun 22 22:05:24 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 3 09:18:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eee60ddc |
7 |
|
8 |
sci-libs/med: add 4.1.1 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/853694 |
11 |
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/26047 |
13 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
14 |
|
15 |
sci-libs/med/Manifest | 1 + |
16 |
sci-libs/med/med-4.1.1.ebuild | 111 ++++++++++++++++++++++++++++++++++++++++++ |
17 |
2 files changed, 112 insertions(+) |
18 |
|
19 |
diff --git a/sci-libs/med/Manifest b/sci-libs/med/Manifest |
20 |
index a9596fd783e7..1f5c46481418 100644 |
21 |
--- a/sci-libs/med/Manifest |
22 |
+++ b/sci-libs/med/Manifest |
23 |
@@ -1 +1,2 @@ |
24 |
DIST med-4.1.0.tar.gz 50375039 BLAKE2B 514ca19baf15e349ecbce870b318b37c51bfb57ac9b03c2b2c1b28836fec7fcf2dce573b9ea155f358d5e0bcee120c12a31598cd4f1e44837eca787553bb70d4 SHA512 94d07663c2f6a3cd497f54b480c3d742476d2a25172feb567980c9e75d49f4661aa2c6aaf570470938265997154e348bc1608065b86d42afda52d4e6361fedf8 |
25 |
+DIST med-4.1.1.tar.gz 50506725 BLAKE2B fb9bc3239c18c53fa42c5dd1101559746e8d38db2a3cb5fb47d1bf0cb578facc4ab95409af8524f5c20251848842cc1a331f6a816ce0754e9a6c95f507174ed1 SHA512 8917e7ecfe30e1259b0927c8e1c3d6efd86ed2386813f6d90217bd95589199478e587f0815031ab65cacf7901a30b77a6307414f9073caffe6e7f013e710d768 |
26 |
|
27 |
diff --git a/sci-libs/med/med-4.1.1.ebuild b/sci-libs/med/med-4.1.1.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000000..636cb55f6c71 |
30 |
--- /dev/null |
31 |
+++ b/sci-libs/med/med-4.1.1.ebuild |
32 |
@@ -0,0 +1,111 @@ |
33 |
+# Copyright 1999-2022 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=8 |
37 |
+ |
38 |
+FORTRAN_NEEDED=fortran |
39 |
+ |
40 |
+PYTHON_COMPAT=( python3_{8..11} ) |
41 |
+ |
42 |
+inherit cmake fortran-2 python-single-r1 |
43 |
+ |
44 |
+DESCRIPTION="A library to store and exchange meshed data or computation results" |
45 |
+HOMEPAGE="https://www.salome-platform.org/user-section/about/med" |
46 |
+SRC_URI="https://files.salome-platform.org/Salome/other/${P}.tar.gz" |
47 |
+LICENSE="LGPL-3" |
48 |
+S="${WORKDIR}/${P}_SRC" |
49 |
+ |
50 |
+SLOT="0" |
51 |
+KEYWORDS="~amd64 ~x86" |
52 |
+IUSE="doc fortran mpi python test" |
53 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
54 |
+RESTRICT="!test? ( test ) python? ( test )" |
55 |
+ |
56 |
+RDEPEND=" |
57 |
+ !sci-libs/libmed |
58 |
+ dev-lang/tk:0= |
59 |
+ >=sci-libs/hdf5-1.10.2:=[fortran?,mpi(+)?] |
60 |
+ mpi? ( virtual/mpi[fortran?] ) |
61 |
+ python? ( ${PYTHON_DEPS} ) |
62 |
+" |
63 |
+DEPEND="${RDEPEND}" |
64 |
+BDEPEND="python? ( >=dev-lang/swig-3.0.8 )" |
65 |
+ |
66 |
+PATCHES=( |
67 |
+ "${FILESDIR}/${PN}-4.1.0-0001-Gentoo-specific-Adjust-install-path-for-build-dir.patch" |
68 |
+ "${FILESDIR}/${PN}-4.1.0-0002-Re-add-option-for-building-Fortran-library.patch" |
69 |
+ "${FILESDIR}/${PN}-4.1.0-0003-build-against-hdf5-1.12.patch" |
70 |
+) |
71 |
+ |
72 |
+DOCS=( AUTHORS ChangeLog NEWS README README.CMAKE TODO ) |
73 |
+ |
74 |
+pkg_setup() { |
75 |
+ use python && python-single-r1_pkg_setup |
76 |
+ use fortran && fortran-2_pkg_setup |
77 |
+} |
78 |
+ |
79 |
+src_prepare() { |
80 |
+ if use python; then |
81 |
+ # fixes for correct libdir name |
82 |
+ local pysite=$(python_get_sitedir) |
83 |
+ pysite="${pysite##/usr/}" |
84 |
+ sed \ |
85 |
+ -e 's@SET(_install_dir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/med)@SET(_install_dir '${pysite}'/med)@' \ |
86 |
+ -i ./python/CMakeLists.txt || die "sed on ./python/CMakeLists.txt failed" |
87 |
+ fi |
88 |
+ for cm in ./src/CMakeLists.txt ./tools/medimport/CMakeLists.txt |
89 |
+ do |
90 |
+ sed -i -e "s@INSTALL(TARGETS \(.*\) DESTINATION lib)@INSTALL(TARGETS \1 DESTINATION $(get_libdir))@" \ |
91 |
+ "${cm}" || die "sed on ${cm} failed" |
92 |
+ done |
93 |
+ sed -e 's/med-fichier/med/' -i CMakeLists.txt || die "fix paths failed" |
94 |
+ sed -e 's|doc/med-${MED_STR_VERSION}|doc/med-${MED_STR_VERSION}/html|' \ |
95 |
+ -i CMakeLists.txt || die "fix doc path failed" |
96 |
+ |
97 |
+ cmake_src_prepare |
98 |
+} |
99 |
+ |
100 |
+src_configure() { |
101 |
+ local mycmakeargs=( |
102 |
+ # as indicated in the CMakeLists.txt, the shipped documentation is generated by a custom doxygen, |
103 |
+ # so let's avoid rebuilding it because it will be different |
104 |
+ -DMEDFILE_BUILD_DOC=OFF |
105 |
+ -DMEDFILE_BUILD_FORTRAN=$(usex fortran) |
106 |
+ -DMEDFILE_BUILD_PYTHON=$(usex python) |
107 |
+ -DMEDFILE_BUILD_SHARED_LIBS=ON |
108 |
+ -DMEDFILE_BUILD_STATIC_LIBS=OFF |
109 |
+ -DMEDFILE_BUILD_TESTS=$(usex test) |
110 |
+ -DMEDFILE_INSTALL_DOC=$(usex doc) |
111 |
+ -DMEDFILE_USE_MPI=$(usex mpi) |
112 |
+ -DMEDFILE_USE_UNICODE=ON |
113 |
+ ) |
114 |
+ cmake_src_configure |
115 |
+} |
116 |
+ |
117 |
+src_install() { |
118 |
+ cmake_src_install |
119 |
+ |
120 |
+ # we don't need old 2.3.6 include files |
121 |
+ rm -r "${ED}"/usr/include/2.3.6 || die "failed to delete obsolete include dir" |
122 |
+ |
123 |
+ # the optimization done in CMakeLists.txt has been disabled so |
124 |
+ # we need to do it manually |
125 |
+ use python && python_optimize |
126 |
+ |
127 |
+ # Prevent test executables being installed |
128 |
+ if use test; then |
129 |
+ rm -r "${ED}"/usr/bin/testc || die "failed to delete C test executables" |
130 |
+ if use fortran; then |
131 |
+ rm -r "${ED}"/usr/bin/testf || die "failed to delete fortran test executables" |
132 |
+ fi |
133 |
+ if use python; then |
134 |
+ rm -r "${ED}"/usr/bin/testpy || die "failed to delete python test executables" |
135 |
+ fi |
136 |
+ fi |
137 |
+} |
138 |
+ |
139 |
+src_test() { |
140 |
+ # override parallel mode only for tests |
141 |
+ local myctestargs=( "-j 1" ) |
142 |
+ cmake_src_test |
143 |
+} |