1 |
commit: 01d2250e0e1ae030ca8f51470e0c0d844452c963 |
2 |
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 18 12:35:17 2021 +0000 |
4 |
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 18 12:35:26 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01d2250e |
7 |
|
8 |
sci-chemistry/gromacs: Fix manual use |
9 |
|
10 |
Closes: https://bugs.gentoo.org/796497 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
12 |
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org> |
13 |
|
14 |
sci-chemistry/gromacs/gromacs-2020.4.ebuild | 6 ++- |
15 |
sci-chemistry/gromacs/gromacs-2020.6.ebuild | 6 ++- |
16 |
sci-chemistry/gromacs/gromacs-2021.2.ebuild | 6 ++- |
17 |
sci-chemistry/gromacs/gromacs-2021.9999.ebuild | 6 ++- |
18 |
sci-chemistry/gromacs/gromacs-9999.ebuild | 61 +++++++++++++++----------- |
19 |
5 files changed, 52 insertions(+), 33 deletions(-) |
20 |
|
21 |
diff --git a/sci-chemistry/gromacs/gromacs-2020.4.ebuild b/sci-chemistry/gromacs/gromacs-2020.4.ebuild |
22 |
index 266941a81e3..4a9027a2d18 100644 |
23 |
--- a/sci-chemistry/gromacs/gromacs-2020.4.ebuild |
24 |
+++ b/sci-chemistry/gromacs/gromacs-2020.4.ebuild |
25 |
@@ -74,7 +74,7 @@ RDEPEND="${CDEPEND}" |
26 |
|
27 |
REQUIRED_USE=" |
28 |
|| ( single-precision double-precision ) |
29 |
- || ( doc build-manual ) |
30 |
+ doc? ( !build-manual ) |
31 |
cuda? ( single-precision ) |
32 |
cuda? ( !opencl ) |
33 |
mkl? ( !blas !fftw !lapack ) |
34 |
@@ -317,7 +317,9 @@ src_install() { |
35 |
fi |
36 |
|
37 |
if use doc; then |
38 |
- newdoc "${DISTDIR}/manual-${PV}.pdf" "${PN}-manual-${PV}.pdf" |
39 |
+ if [[ ${PV} != *9999* ]]; then |
40 |
+ newdoc "${DISTDIR}/manual-${PV}.pdf" "${PN}-manual-${PV}.pdf" |
41 |
+ fi |
42 |
fi |
43 |
|
44 |
use mpi || continue |
45 |
|
46 |
diff --git a/sci-chemistry/gromacs/gromacs-2020.6.ebuild b/sci-chemistry/gromacs/gromacs-2020.6.ebuild |
47 |
index 41ac7771497..0e2baeb3b30 100644 |
48 |
--- a/sci-chemistry/gromacs/gromacs-2020.6.ebuild |
49 |
+++ b/sci-chemistry/gromacs/gromacs-2020.6.ebuild |
50 |
@@ -74,7 +74,7 @@ RDEPEND="${CDEPEND}" |
51 |
|
52 |
REQUIRED_USE=" |
53 |
|| ( single-precision double-precision ) |
54 |
- || ( doc build-manual ) |
55 |
+ doc? ( !build-manual ) |
56 |
cuda? ( single-precision ) |
57 |
cuda? ( !opencl ) |
58 |
mkl? ( !blas !fftw !lapack ) |
59 |
@@ -317,7 +317,9 @@ src_install() { |
60 |
fi |
61 |
|
62 |
if use doc; then |
63 |
- newdoc "${DISTDIR}/manual-${PV}.pdf" "${PN}-manual-${PV}.pdf" |
64 |
+ if [[ ${PV} != *9999* ]]; then |
65 |
+ newdoc "${DISTDIR}/manual-${PV}.pdf" "${PN}-manual-${PV}.pdf" |
66 |
+ fi |
67 |
fi |
68 |
|
69 |
use mpi || continue |
70 |
|
71 |
diff --git a/sci-chemistry/gromacs/gromacs-2021.2.ebuild b/sci-chemistry/gromacs/gromacs-2021.2.ebuild |
72 |
index 7b257ee4f40..d3299c25bab 100644 |
73 |
--- a/sci-chemistry/gromacs/gromacs-2021.2.ebuild |
74 |
+++ b/sci-chemistry/gromacs/gromacs-2021.2.ebuild |
75 |
@@ -74,7 +74,7 @@ RDEPEND="${CDEPEND}" |
76 |
|
77 |
REQUIRED_USE=" |
78 |
|| ( single-precision double-precision ) |
79 |
- || ( doc build-manual ) |
80 |
+ doc? ( !build-manual ) |
81 |
cuda? ( single-precision ) |
82 |
cuda? ( !opencl ) |
83 |
mkl? ( !blas !fftw !lapack ) |
84 |
@@ -324,7 +324,9 @@ src_install() { |
85 |
fi |
86 |
|
87 |
if use doc; then |
88 |
- newdoc "${DISTDIR}/manual-${PV}.pdf" "${PN}-manual-${PV}.pdf" |
89 |
+ if [[ ${PV} != *9999* ]]; then |
90 |
+ newdoc "${DISTDIR}/manual-${PV}.pdf" "${PN}-manual-${PV}.pdf" |
91 |
+ fi |
92 |
fi |
93 |
|
94 |
use mpi || continue |
95 |
|
96 |
diff --git a/sci-chemistry/gromacs/gromacs-2021.9999.ebuild b/sci-chemistry/gromacs/gromacs-2021.9999.ebuild |
97 |
index 16825937690..40f115d6a10 100644 |
98 |
--- a/sci-chemistry/gromacs/gromacs-2021.9999.ebuild |
99 |
+++ b/sci-chemistry/gromacs/gromacs-2021.9999.ebuild |
100 |
@@ -74,7 +74,7 @@ RDEPEND="${CDEPEND}" |
101 |
|
102 |
REQUIRED_USE=" |
103 |
|| ( single-precision double-precision ) |
104 |
- || ( doc build-manual ) |
105 |
+ doc? ( !build-manual ) |
106 |
cuda? ( single-precision ) |
107 |
cuda? ( !opencl ) |
108 |
mkl? ( !blas !fftw !lapack ) |
109 |
@@ -319,7 +319,9 @@ src_install() { |
110 |
fi |
111 |
|
112 |
if use doc; then |
113 |
- newdoc "${DISTDIR}/manual-${PV}.pdf" "${PN}-manual-${PV}.pdf" |
114 |
+ if [[ ${PV} != *9999* ]]; then |
115 |
+ newdoc "${DISTDIR}/manual-${PV}.pdf" "${PN}-manual-${PV}.pdf" |
116 |
+ fi |
117 |
fi |
118 |
|
119 |
use mpi || continue |
120 |
|
121 |
diff --git a/sci-chemistry/gromacs/gromacs-9999.ebuild b/sci-chemistry/gromacs/gromacs-9999.ebuild |
122 |
index 19c3097b599..40f115d6a10 100644 |
123 |
--- a/sci-chemistry/gromacs/gromacs-9999.ebuild |
124 |
+++ b/sci-chemistry/gromacs/gromacs-9999.ebuild |
125 |
@@ -7,6 +7,7 @@ CMAKE_MAKEFILE_GENERATOR="ninja" |
126 |
|
127 |
PYTHON_COMPAT=( python3_{7,8,9} ) |
128 |
|
129 |
+DISTUTILS_USE_SETUPTOOLS=no |
130 |
DISTUTILS_SINGLE_IMPL=1 |
131 |
|
132 |
inherit bash-completion-r1 cmake cuda distutils-r1 flag-o-matic multilib readme.gentoo-r1 toolchain-funcs xdg-utils |
133 |
@@ -21,6 +22,7 @@ if [[ ${PV} = *9999* ]]; then |
134 |
else |
135 |
SRC_URI=" |
136 |
http://ftp.gromacs.org/gromacs/${PN}-${PV/_/-}.tar.gz |
137 |
+ doc? ( https://ftp.gromacs.org/manual/manual-${PV/_/-}.pdf ) |
138 |
test? ( http://ftp.gromacs.org/regressiontests/regressiontests-${PV/_/-}.tar.gz )" |
139 |
KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux ~x64-macos" |
140 |
fi |
141 |
@@ -35,7 +37,7 @@ HOMEPAGE="http://www.gromacs.org/" |
142 |
# base, vmd plugins, fftpack from numpy, blas/lapck from netlib, memtestG80 library, mpi_thread lib |
143 |
LICENSE="LGPL-2.1 UoI-NCSA !mkl? ( !fftw? ( BSD ) !blas? ( BSD ) !lapack? ( BSD ) ) cuda? ( LGPL-3 ) threads? ( BSD )" |
144 |
SLOT="0/${PV}" |
145 |
-IUSE="X blas cuda +custom-cflags +doc double-precision +fftw +gmxapi +gmxapi-legacy +hwloc lapack +lmfit mkl mpi +offensive opencl openmp +python +single-precision test +threads +tng ${ACCE_IUSE}" |
146 |
+IUSE="X blas cuda +custom-cflags +doc build-manual double-precision +fftw +gmxapi +gmxapi-legacy +hwloc lapack +lmfit mkl mpi +offensive opencl openmp +python +single-precision test +threads +tng ${ACCE_IUSE}" |
147 |
|
148 |
CDEPEND=" |
149 |
X? ( |
150 |
@@ -57,7 +59,7 @@ CDEPEND=" |
151 |
" |
152 |
BDEPEND="${CDEPEND} |
153 |
virtual/pkgconfig |
154 |
- doc? ( |
155 |
+ build-manual? ( |
156 |
app-doc/doxygen |
157 |
$(python_gen_cond_dep ' |
158 |
dev-python/sphinx[${PYTHON_MULTI_USEDEP}] |
159 |
@@ -72,6 +74,7 @@ RDEPEND="${CDEPEND}" |
160 |
|
161 |
REQUIRED_USE=" |
162 |
|| ( single-precision double-precision ) |
163 |
+ doc? ( !build-manual ) |
164 |
cuda? ( single-precision ) |
165 |
cuda? ( !opencl ) |
166 |
mkl? ( !blas !fftw !lapack ) |
167 |
@@ -131,28 +134,29 @@ src_prepare() { |
168 |
fi |
169 |
|
170 |
DOC_CONTENTS="Gromacs can use sci-chemistry/vmd to read additional file formats" |
171 |
- |
172 |
- # try to create policy for imagemagik |
173 |
- mkdir -p ${HOME}/.config/ImageMagick |
174 |
- cat >> ${HOME}/.config/ImageMagick/policy.xml <<- EOF |
175 |
- <?xml version="1.0" encoding="UTF-8"?> |
176 |
- <!DOCTYPE policymap [ |
177 |
- <!ELEMENT policymap (policy)+> |
178 |
- !ATTLIST policymap xmlns CDATA #FIXED ''> |
179 |
- <!ELEMENT policy EMPTY> |
180 |
- <!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED |
181 |
+ if use build-manual; then |
182 |
+ # try to create policy for imagemagik |
183 |
+ mkdir -p ${HOME}/.config/ImageMagick |
184 |
+ cat >> ${HOME}/.config/ImageMagick/policy.xml <<- EOF |
185 |
+ <?xml version="1.0" encoding="UTF-8"?> |
186 |
+ <!DOCTYPE policymap [ |
187 |
+ <!ELEMENT policymap (policy)+> |
188 |
+ !ATTLIST policymap xmlns CDATA #FIXED ''> |
189 |
+ <!ELEMENT policy EMPTY> |
190 |
+ <!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED |
191 |
name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED |
192 |
stealth NMTOKEN #IMPLIED value CDATA #IMPLIED> |
193 |
- ]> |
194 |
- <policymap> |
195 |
- <policy domain="coder" rights="read | write" pattern="PS" /> |
196 |
- <policy domain="coder" rights="read | write" pattern="PS2" /> |
197 |
- <policy domain="coder" rights="read | write" pattern="PS3" /> |
198 |
- <policy domain="coder" rights="read | write" pattern="EPS" /> |
199 |
- <policy domain="coder" rights="read | write" pattern="PDF" /> |
200 |
- <policy domain="coder" rights="read | write" pattern="XPS" /> |
201 |
- </policymap> |
202 |
- EOF |
203 |
+ ]> |
204 |
+ <policymap> |
205 |
+ <policy domain="coder" rights="read | write" pattern="PS" /> |
206 |
+ <policy domain="coder" rights="read | write" pattern="PS2" /> |
207 |
+ <policy domain="coder" rights="read | write" pattern="PS3" /> |
208 |
+ <policy domain="coder" rights="read | write" pattern="EPS" /> |
209 |
+ <policy domain="coder" rights="read | write" pattern="PDF" /> |
210 |
+ <policy domain="coder" rights="read | write" pattern="XPS" /> |
211 |
+ </policymap> |
212 |
+ EOF |
213 |
+ fi |
214 |
} |
215 |
|
216 |
src_configure() { |
217 |
@@ -213,7 +217,7 @@ src_configure() { |
218 |
-DGMX_OPENMP=$(usex openmp) |
219 |
-DGMX_COOL_QUOTES=$(usex offensive) |
220 |
-DGMX_USE_TNG=$(usex tng) |
221 |
- -DGMX_BUILD_MANUAL=$(usex doc) |
222 |
+ -DGMX_BUILD_MANUAL=$(usex build-manual) |
223 |
-DGMX_HWLOC=$(usex hwloc) |
224 |
-DGMX_DEFAULT_SUFFIX=off |
225 |
-DGMX_SIMD="$acce" |
226 |
@@ -284,7 +288,7 @@ src_compile() { |
227 |
distutils-r1_src_compile |
228 |
fi |
229 |
# not 100% necessary for rel ebuilds as available from website |
230 |
- if use doc; then |
231 |
+ if use build-manual; then |
232 |
BUILD_DIR="${WORKDIR}/${P}_${x}"\ |
233 |
cmake_src_compile manual |
234 |
fi |
235 |
@@ -310,9 +314,16 @@ src_install() { |
236 |
BUILD_DIR="${WORKDIR}/${P}_${x}" \ |
237 |
cmake_src_install python_packaging/install |
238 |
fi |
239 |
- if use doc; then |
240 |
+ if use build-manual; then |
241 |
newdoc "${WORKDIR}/${P}_${x}"/docs/manual/gromacs.pdf "${PN}-manual-${PV}.pdf" |
242 |
fi |
243 |
+ |
244 |
+ if use doc; then |
245 |
+ if [[ ${PV} != *9999* ]]; then |
246 |
+ newdoc "${DISTDIR}/manual-${PV}.pdf" "${PN}-manual-${PV}.pdf" |
247 |
+ fi |
248 |
+ fi |
249 |
+ |
250 |
use mpi || continue |
251 |
BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \ |
252 |
cmake_src_install |