1 |
commit: e4bd2f6d1e878c5075eaebeab1a66b073cc1f43e |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 29 00:00:17 2022 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 29 00:00:17 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4bd2f6d |
7 |
|
8 |
sci-chemistry/mpqc: fix build system and MPI |
9 |
|
10 |
Closes: https://bugs.gentoo.org/710822 |
11 |
Closes: https://bugs.gentoo.org/801682 |
12 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
13 |
|
14 |
sci-chemistry/mpqc/files/mpqc-2.3.1-MPI-3.0.patch | 37 +++++++++++++++++ |
15 |
sci-chemistry/mpqc/mpqc-2.3.1-r4.ebuild | 48 +++++++++++------------ |
16 |
2 files changed, 61 insertions(+), 24 deletions(-) |
17 |
|
18 |
diff --git a/sci-chemistry/mpqc/files/mpqc-2.3.1-MPI-3.0.patch b/sci-chemistry/mpqc/files/mpqc-2.3.1-MPI-3.0.patch |
19 |
new file mode 100644 |
20 |
index 000000000000..d03d1f9b0566 |
21 |
--- /dev/null |
22 |
+++ b/sci-chemistry/mpqc/files/mpqc-2.3.1-MPI-3.0.patch |
23 |
@@ -0,0 +1,37 @@ |
24 |
+https://bugs.gentoo.org/801682 |
25 |
+rename MPI 1.0 to 3.0+ functions: |
26 |
+- MPI_Errhandler_set -> MPI_Comm_set_errhandler |
27 |
+ |
28 |
+--- a/src/lib/util/group/memmtmpi.cc |
29 |
++++ b/src/lib/util/group/memmtmpi.cc |
30 |
+@@ -241,8 +241,8 @@ |
31 |
+ MPI_Comm_dup(comm, &comp_comm_); |
32 |
+ MPI_Comm_dup(comm, &comm_comm_); |
33 |
+ |
34 |
+- MPI_Errhandler_set(comp_comm_, MPI_ERRORS_ARE_FATAL); |
35 |
+- MPI_Errhandler_set(comm_comm_, MPI_ERRORS_ARE_FATAL); |
36 |
++ MPI_Comm_set_errhandler(comp_comm_, MPI_ERRORS_ARE_FATAL); |
37 |
++ MPI_Comm_set_errhandler(comm_comm_, MPI_ERRORS_ARE_FATAL); |
38 |
+ |
39 |
+ serial_ = 0; |
40 |
+ req_tag_ = 15001; |
41 |
+--- a/src/lib/util/group/messmpi.cc |
42 |
++++ b/src/lib/util/group/messmpi.cc |
43 |
+@@ -129,7 +129,7 @@ |
44 |
+ if (keyval->booleanvalue("errors_return")) { |
45 |
+ if (me()==0) |
46 |
+ ExEnv::outn() << indent << "MPIMessageGrp: errors_return is true" << endl; |
47 |
+- MPI_Errhandler_set(commgrp, MPI_ERRORS_RETURN); |
48 |
++ MPI_Comm_set_errhandler(commgrp, MPI_ERRORS_RETURN); |
49 |
+ } |
50 |
+ |
51 |
+ if (debug_) { |
52 |
+@@ -200,7 +200,7 @@ |
53 |
+ MPI_Comm_dup(comm, &commgrp); |
54 |
+ global_commgrp = commgrp; |
55 |
+ |
56 |
+- MPI_Errhandler_set(commgrp, MPI_ERRORS_ARE_FATAL); |
57 |
++ MPI_Comm_set_errhandler(commgrp, MPI_ERRORS_ARE_FATAL); |
58 |
+ |
59 |
+ if (!nmpi_grps) { |
60 |
+ threadgrp = ThreadGrp::get_default_threadgrp(); |
61 |
|
62 |
diff --git a/sci-chemistry/mpqc/mpqc-2.3.1-r4.ebuild b/sci-chemistry/mpqc/mpqc-2.3.1-r4.ebuild |
63 |
index bdf7bcdcce0a..fc84f06b4f82 100644 |
64 |
--- a/sci-chemistry/mpqc/mpqc-2.3.1-r4.ebuild |
65 |
+++ b/sci-chemistry/mpqc/mpqc-2.3.1-r4.ebuild |
66 |
@@ -1,7 +1,7 @@ |
67 |
-# Copyright 1999-2016 Gentoo Foundation |
68 |
+# Copyright 1999-2022 Gentoo Authors |
69 |
# Distributed under the terms of the GNU General Public License v2 |
70 |
|
71 |
-EAPI=6 |
72 |
+EAPI=8 |
73 |
|
74 |
inherit autotools toolchain-funcs |
75 |
|
76 |
@@ -12,30 +12,31 @@ SRC_URI="mirror://sourceforge/mpqc/${P}.tar.bz2" |
77 |
LICENSE="GPL-2" |
78 |
SLOT="0" |
79 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
80 |
-IUSE="doc mpi threads static-libs tk" |
81 |
+IUSE="doc mpi threads tk" |
82 |
|
83 |
RDEPEND=" |
84 |
virtual/blas |
85 |
virtual/lapack |
86 |
mpi? ( virtual/mpi[cxx] ) |
87 |
tk? ( dev-lang/tk:0 )" |
88 |
-DEPEND="${RDEPEND} |
89 |
+DEPEND="${RDEPEND}" |
90 |
+BDEPEND=" |
91 |
dev-lang/perl |
92 |
sys-devel/flex |
93 |
- sys-apps/sed |
94 |
virtual/pkgconfig |
95 |
doc? ( |
96 |
app-doc/doxygen |
97 |
- media-gfx/graphviz )" |
98 |
+ media-gfx/graphviz |
99 |
+ )" |
100 |
|
101 |
PATCHES=( |
102 |
- "${FILESDIR}/${P}-as-needed.patch" |
103 |
- "${FILESDIR}/${P}-respect-ldflags.patch" |
104 |
- "${FILESDIR}/${P}-test-failure-hack.patch" |
105 |
- "${FILESDIR}/${P}-blas.patch" |
106 |
- "${FILESDIR}/${P}-wformat-security.patch" |
107 |
+ "${FILESDIR}"/${P}-as-needed.patch |
108 |
+ "${FILESDIR}"/${P}-respect-ldflags.patch |
109 |
+ "${FILESDIR}"/${P}-test-failure-hack.patch |
110 |
+ "${FILESDIR}"/${P}-blas.patch |
111 |
+ "${FILESDIR}"/${P}-wformat-security.patch |
112 |
+ "${FILESDIR}"/${P}-MPI-3.0.patch |
113 |
) |
114 |
-DOCS=(CHANGES CITATION README) |
115 |
|
116 |
src_prepare() { |
117 |
# do not install tkmolrender if not requested |
118 |
@@ -48,7 +49,7 @@ src_prepare() { |
119 |
|| die "failed to disable tkmolrender" |
120 |
fi |
121 |
default |
122 |
- mv configure.{in,ac} || die |
123 |
+ |
124 |
eautoreconf |
125 |
} |
126 |
|
127 |
@@ -60,40 +61,40 @@ src_configure() { |
128 |
fi |
129 |
|
130 |
econf \ |
131 |
+ --enable-shared \ |
132 |
$(use_enable threads) \ |
133 |
- $(use_enable mpi parallel) \ |
134 |
- $(use_enable static-libs static) |
135 |
+ $(use_enable mpi parallel) |
136 |
|
137 |
sed \ |
138 |
- -e "s:^CFLAGS =.*$:CFLAGS=${CFLAGS}:" \ |
139 |
- -e "s:^FFLAGS =.*$:FFLAGS=${FFLAGS:- -O2}:" \ |
140 |
- -e "s:^CXXFLAGS =.*$:CXXFLAGS=${CXXFLAGS}:" \ |
141 |
+ -e "s|^CFLAGS =.*$|CFLAGS=${CFLAGS}|" \ |
142 |
+ -e "s|^FFLAGS =.*$|FFLAGS=${FFLAGS:- -O2}|" \ |
143 |
+ -e "s|^CXXFLAGS =.*$|CXXFLAGS=${CXXFLAGS}|" \ |
144 |
-i lib/LocalMakefile || die |
145 |
} |
146 |
|
147 |
src_test() { |
148 |
- cd src/bin/mpqc/validate || die |
149 |
- |
150 |
# we'll only run the small test set, since the |
151 |
# medium and large ones take >10h and >24h on my |
152 |
# 1.8Ghz P4M |
153 |
- emake -j1 check1 |
154 |
+ emake -C src/bin/mpqc/validate -j1 check1 |
155 |
} |
156 |
|
157 |
src_install() { |
158 |
emake installroot="${D}" install install_devel install_inc |
159 |
+ dodoc CHANGES CITATION README |
160 |
|
161 |
# make extended docs |
162 |
if use doc; then |
163 |
cd doc || die |
164 |
emake all |
165 |
doman man/man1/* man/man3/* |
166 |
- dodoc -r html/ |
167 |
+ dodoc -r html |
168 |
fi |
169 |
+ |
170 |
+ find "${ED}" -name '*.la' -delete || die |
171 |
} |
172 |
|
173 |
pkg_postinst() { |
174 |
- echo |
175 |
einfo "MPQC can be picky with regard to compilation flags." |
176 |
einfo "If during mpqc runs you have trouble converging or " |
177 |
einfo "experience oscillations during SCF interations, " |
178 |
@@ -101,5 +102,4 @@ pkg_postinst() { |
179 |
einfo "Particularly, replacing -march=pentium4 by -march=pentium3" |
180 |
einfo "might help if you encounter problems with correlation " |
181 |
einfo "consistent basis sets." |
182 |
- echo |
183 |
} |