1 |
commit: 27d655b364e26cfb971d655a691f0ffaef96e8f8 |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Mar 2 07:50:25 2020 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 8 06:49:08 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27d655b3 |
7 |
|
8 |
sci-libs/hdf5: add unsupported useflag |
9 |
|
10 |
this will allow unsupported combinations of useflags such as MPI + |
11 |
CXX. |
12 |
|
13 |
link mpi when using mpi. |
14 |
|
15 |
Closes: https://bugs.gentoo.org/710986 |
16 |
Closes: https://github.com/gentoo/gentoo/pull/14821 |
17 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
18 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
19 |
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org> |
20 |
|
21 |
sci-libs/hdf5/hdf5-1.10.5-r1.ebuild | 106 ++++++++++++++++++++++++++++++++++++ |
22 |
sci-libs/hdf5/metadata.xml | 1 + |
23 |
2 files changed, 107 insertions(+) |
24 |
|
25 |
diff --git a/sci-libs/hdf5/hdf5-1.10.5-r1.ebuild b/sci-libs/hdf5/hdf5-1.10.5-r1.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..ef906aa6eef |
28 |
--- /dev/null |
29 |
+++ b/sci-libs/hdf5/hdf5-1.10.5-r1.ebuild |
30 |
@@ -0,0 +1,106 @@ |
31 |
+# Copyright 1999-2020 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI="7" |
35 |
+ |
36 |
+FORTRAN_NEEDED="fortran" |
37 |
+ |
38 |
+inherit autotools eutils fortran-2 flag-o-matic toolchain-funcs multilib prefix |
39 |
+ |
40 |
+MY_P="${PN}-${PV/_p/-patch}" |
41 |
+MAJOR_P="${PN}-$(ver_cut 1-2)" |
42 |
+ |
43 |
+DESCRIPTION="General purpose library and file format for storing scientific data" |
44 |
+HOMEPAGE="http://www.hdfgroup.org/HDF5/" |
45 |
+SRC_URI="http://www.hdfgroup.org/ftp/HDF5/releases/${MAJOR_P}/${MY_P}/src/${MY_P}.tar.bz2" |
46 |
+ |
47 |
+LICENSE="NCSA-HDF" |
48 |
+SLOT="0/${PV%%_p*}" |
49 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" |
50 |
+IUSE="cxx debug examples fortran +hl mpi szip threads unsupported zlib" |
51 |
+ |
52 |
+REQUIRED_USE=" |
53 |
+ !unsupported? ( |
54 |
+ ?? ( cxx mpi ) |
55 |
+ threads? ( !cxx !mpi !fortran !hl ) |
56 |
+ )" |
57 |
+RDEPEND=" |
58 |
+ mpi? ( virtual/mpi[romio] ) |
59 |
+ szip? ( virtual/szip ) |
60 |
+ zlib? ( sys-libs/zlib:0= ) |
61 |
+" |
62 |
+DEPEND="${RDEPEND} |
63 |
+ sys-devel/libtool:2 |
64 |
+ >=sys-devel/autoconf-2.69 |
65 |
+" |
66 |
+S="${WORKDIR}/${MY_P}" |
67 |
+ |
68 |
+PATCHES=( |
69 |
+ "${FILESDIR}/${PN}-1.8.9-static_libgfortran.patch" |
70 |
+ "${FILESDIR}/${PN}-1.8.9-mpicxx.patch" |
71 |
+ "${FILESDIR}/${PN}-1.8.13-no-messing-ldpath.patch" |
72 |
+) |
73 |
+ |
74 |
+pkg_setup() { |
75 |
+ tc-export CXX CC AR # workaround for bug 285148 |
76 |
+ use fortran && fortran-2_pkg_setup |
77 |
+ |
78 |
+ if use mpi; then |
79 |
+ if has_version 'sci-libs/hdf5[-mpi]'; then |
80 |
+ ewarn "Installing hdf5 with mpi enabled with a previous hdf5 with mpi disabled may fail." |
81 |
+ ewarn "Try to uninstall the current hdf5 prior to enabling mpi support." |
82 |
+ fi |
83 |
+ export CC="mpicc" |
84 |
+ use fortran && export FC="mpif90" |
85 |
+ append-ldflags -lmpi |
86 |
+ elif has_version 'sci-libs/hdf5[mpi]'; then |
87 |
+ ewarn "Installing hdf5 with mpi disabled while having hdf5 installed with mpi enabled may fail." |
88 |
+ ewarn "Try to uninstall the current hdf5 prior to disabling mpi support." |
89 |
+ fi |
90 |
+} |
91 |
+ |
92 |
+src_prepare() { |
93 |
+ # respect gentoo examples directory |
94 |
+ sed \ |
95 |
+ -e "s:hdf5_examples:doc/${PF}/examples:g" \ |
96 |
+ -i $(find . -name Makefile.am) $(find . -name "run*.sh.in") || die |
97 |
+ sed \ |
98 |
+ -e '/docdir/d' \ |
99 |
+ -i config/commence.am || die |
100 |
+ if ! use examples; then |
101 |
+ sed -e '/^install:/ s/install-examples//' \ |
102 |
+ -i Makefile.am || die #409091 |
103 |
+ fi |
104 |
+ # enable shared libs by default for h5cc config utility |
105 |
+ sed -i -e "s/SHLIB:-no/SHLIB:-yes/g" tools/src/misc/h5cc.in || die |
106 |
+ hprefixify m4/libtool.m4 |
107 |
+ |
108 |
+ default |
109 |
+ eautomake |
110 |
+} |
111 |
+ |
112 |
+src_configure() { |
113 |
+ local myconf=( |
114 |
+ --disable-static |
115 |
+ --enable-deprecated-symbols |
116 |
+ --enable-build-mode=$(usex debug debug production) |
117 |
+ $(use_enable cxx) |
118 |
+ $(use_enable debug codestack) |
119 |
+ $(use_enable fortran) |
120 |
+ $(use_enable hl) |
121 |
+ $(use_enable mpi parallel) |
122 |
+ $(use_enable threads threadsafe) |
123 |
+ $(use_enable unsupported) |
124 |
+ $(use_with szip szlib) |
125 |
+ $(use_with threads pthread) |
126 |
+ $(use_with zlib) |
127 |
+ ) |
128 |
+ econf "${myconf[@]}" |
129 |
+} |
130 |
+ |
131 |
+src_install() { |
132 |
+ default |
133 |
+ |
134 |
+ # no static archives |
135 |
+ find "${D}" -name '*.la' -delete || die |
136 |
+} |
137 |
|
138 |
diff --git a/sci-libs/hdf5/metadata.xml b/sci-libs/hdf5/metadata.xml |
139 |
index 040542a30ae..2fa4f45de1b 100644 |
140 |
--- a/sci-libs/hdf5/metadata.xml |
141 |
+++ b/sci-libs/hdf5/metadata.xml |
142 |
@@ -13,5 +13,6 @@ |
143 |
</longdescription> |
144 |
<use> |
145 |
<flag name="hl">Enable high level API (https://support.hdfgroup.org/HDF5/doc/HL/index.html)</flag> |
146 |
+ <flag name="unsupported">Enable unsupported combinations of configuration options</flag> |
147 |
</use> |
148 |
</pkgmetadata> |