Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/threeV/files/, sci-chemistry/threeV/
Date: Fri, 14 Apr 2017 19:00:16
Message-Id: 1492196397.8b50a13b56cc9ac53dd7c6770432e1b2155bdc79.jlec@gentoo
1 commit: 8b50a13b56cc9ac53dd7c6770432e1b2155bdc79
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 14 18:35:30 2017 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 14 18:59:57 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b50a13b
7
8 sci-chemistry/threeV: Bump EAPI to 6
9
10 fix format-security problems
11
12 Package-Manager: Portage-2.3.5, Repoman-2.3.2
13 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
14
15 .../threeV/files/threeV-1.2-format-security.patch | 198 +++++++++++++++++++++
16 .../{1.2-gentoo.patch => threeV-1.2-gentoo.patch} | 6 +-
17 .../{threeV-1.2.ebuild => threeV-1.2-r1.ebuild} | 23 ++-
18 3 files changed, 216 insertions(+), 11 deletions(-)
19
20 diff --git a/sci-chemistry/threeV/files/threeV-1.2-format-security.patch b/sci-chemistry/threeV/files/threeV-1.2-format-security.patch
21 new file mode 100644
22 index 00000000000..b693559900a
23 --- /dev/null
24 +++ b/sci-chemistry/threeV/files/threeV-1.2-format-security.patch
25 @@ -0,0 +1,198 @@
26 + cavities.cpp | 8 ++++----
27 + channel.cpp | 10 +++++-----
28 + fsv_calc.cpp | 8 ++++----
29 + solvent.cpp | 8 ++++----
30 + tunnel.cpp | 8 ++++----
31 + vdw.cpp | 8 ++++----
32 + volume.cpp | 8 ++++----
33 + 7 files changed, 29 insertions(+), 29 deletions(-)
34 +
35 +diff --git a/cavities.cpp b/cavities.cpp
36 +index 418a1a7..96b6a15 100644
37 +--- a/cavities.cpp
38 ++++ b/cavities.cpp
39 +@@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
40 +
41 + while(argc > 1 && argv[1][0] == '-') {
42 + if(argv[1][1] == 'i') {
43 +- sprintf(file,&argv[2][0]);
44 ++ sprintf(file,"%s",&argv[2][0]);
45 + } else if(argv[1][1] == 'g') {
46 + GRID = atof(&argv[2][0]);
47 + } else if(argv[1][1] == 's') {
48 +@@ -45,11 +45,11 @@ int main(int argc, char *argv[]) {
49 + } else if(argv[1][1] == 't') {
50 + trim_rad = atof(&argv[2][0]);
51 + } else if(argv[1][1] == 'e') {
52 +- sprintf(ezdfile,&argv[2][0]);
53 ++ sprintf(ezdfile,"%s",&argv[2][0]);
54 + } else if(argv[1][1] == 'm') {
55 +- sprintf(mrcfile,&argv[2][0]);
56 ++ sprintf(mrcfile,"%s",&argv[2][0]);
57 + } else if(argv[1][1] == 'o') {
58 +- sprintf(pdbfile,&argv[2][0]);
59 ++ sprintf(pdbfile,"%s",&argv[2][0]);
60 + } else if(argv[1][1] == 'h') {
61 + cerr << "./Cavities.exe -i <file> -g <grid spacing> -s <shell radius> " << endl
62 + << "\t-p <probe radius> -t <trim_probe_rad> " << endl
63 +diff --git a/channel.cpp b/channel.cpp
64 +index c5acd20..9040631 100644
65 +--- a/channel.cpp
66 ++++ b/channel.cpp
67 +@@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
68 +
69 + while(argc > 1 && argv[1][0] == '-') {
70 + if(argv[1][1] == 'i') {
71 +- sprintf(file,&argv[2][0]);
72 ++ sprintf(file,"%s",&argv[2][0]);
73 + } else if(argv[1][1] == 'b') {
74 + BIGPROBE = atof(&argv[2][0]);
75 + } else if(argv[1][1] == 's') {
76 +@@ -49,13 +49,13 @@ int main(int argc, char *argv[]) {
77 + } else if(argv[1][1] == 'z') {
78 + z = atof(&argv[2][0]);
79 + } else if(argv[1][1] == 'i') {
80 +- sprintf(file,&argv[2][0]);
81 ++ sprintf(file,"%s",&argv[2][0]);
82 + } else if(argv[1][1] == 'o') {
83 +- sprintf(pdbfile,&argv[2][0]);
84 ++ sprintf(pdbfile,"%s",&argv[2][0]);
85 + } else if(argv[1][1] == 'e') {
86 +- sprintf(ezdfile,&argv[2][0]);
87 ++ sprintf(ezdfile,"%s",&argv[2][0]);
88 + } else if(argv[1][1] == 'm') {
89 +- sprintf(mrcfile,&argv[2][0]);
90 ++ sprintf(mrcfile,"%s",&argv[2][0]);
91 + } else if(argv[1][1] == 'g') {
92 + GRID = atof(&argv[2][0]);
93 + } else if(argv[1][1] == 'h') {
94 +diff --git a/fsv_calc.cpp b/fsv_calc.cpp
95 +index 9f81347..ef765b8 100644
96 +--- a/fsv_calc.cpp
97 ++++ b/fsv_calc.cpp
98 +@@ -34,7 +34,7 @@ int main(int argc, char *argv[]) {
99 +
100 + while(argc > 1 && argv[1][0] == '-') {
101 + if(argv[1][1] == 'i') {
102 +- sprintf(file,&argv[2][0]);
103 ++ sprintf(file,"%s",&argv[2][0]);
104 + } else if(argv[1][1] == 's') {
105 + SMPROBE = atof(&argv[2][0]);
106 + } else if(argv[1][1] == 'b') {
107 +@@ -44,11 +44,11 @@ int main(int argc, char *argv[]) {
108 + } else if(argv[1][1] == 'g') {
109 + GRID = atof(&argv[2][0]);
110 + } else if(argv[1][1] == 'o') {
111 +- sprintf(pdbfile,&argv[2][0]);
112 ++ sprintf(pdbfile,"%s",&argv[2][0]);
113 + } else if(argv[1][1] == 'e') {
114 +- sprintf(ezdfile,&argv[2][0]);
115 ++ sprintf(ezdfile,"%s",&argv[2][0]);
116 + } else if(argv[1][1] == 'm') {
117 +- sprintf(mrcfile,&argv[2][0]);
118 ++ sprintf(mrcfile,"%s",&argv[2][0]);
119 + } else if(argv[1][1] == 'h') {
120 + cerr << "./FsvCalc.exe -i <file> -b <big_probe> -s <small_probe> " << endl
121 + << "\t-t <trim probe> -g <gridspace> " << endl
122 +diff --git a/solvent.cpp b/solvent.cpp
123 +index d857696..bc9d67f 100644
124 +--- a/solvent.cpp
125 ++++ b/solvent.cpp
126 +@@ -34,7 +34,7 @@ int main(int argc, char *argv[]) {
127 +
128 + while(argc > 1 && argv[1][0] == '-') {
129 + if(argv[1][1] == 'i') {
130 +- sprintf(file,&argv[2][0]);
131 ++ sprintf(file,"%s",&argv[2][0]);
132 + } else if(argv[1][1] == 's') {
133 + SMPROBE = atof(&argv[2][0]);
134 + } else if(argv[1][1] == 'b') {
135 +@@ -42,11 +42,11 @@ int main(int argc, char *argv[]) {
136 + } else if(argv[1][1] == 't') {
137 + TRIMPROBE = atof(&argv[2][0]);
138 + } else if(argv[1][1] == 'e') {
139 +- sprintf(ezdfile,&argv[2][0]);
140 ++ sprintf(ezdfile,"%s",&argv[2][0]);
141 + } else if(argv[1][1] == 'm') {
142 +- sprintf(mrcfile,&argv[2][0]);
143 ++ sprintf(mrcfile,"%s",&argv[2][0]);
144 + } else if(argv[1][1] == 'o') {
145 +- sprintf(pdbfile,&argv[2][0]);
146 ++ sprintf(pdbfile,"%s",&argv[2][0]);
147 + } else if(argv[1][1] == 'g') {
148 + GRID = atof(&argv[2][0]);
149 + } else if(argv[1][1] == 'h') {
150 +diff --git a/tunnel.cpp b/tunnel.cpp
151 +index 0094d05..7472aaa 100644
152 +--- a/tunnel.cpp
153 ++++ b/tunnel.cpp
154 +@@ -40,7 +40,7 @@ int main(int argc, char *argv[]) {
155 +
156 + while(argc > 1 && argv[1][0] == '-') {
157 + if(argv[1][1] == 'i') {
158 +- sprintf(file,&argv[2][0]);
159 ++ sprintf(file,"%s",&argv[2][0]);
160 + } else if(argv[1][1] == 'g') {
161 + GRID = atof(&argv[2][0]);
162 + } else if(argv[1][1] == 's') {
163 +@@ -50,11 +50,11 @@ int main(int argc, char *argv[]) {
164 + } else if(argv[1][1] == 't') {
165 + trim_prb = atof(&argv[2][0]);
166 + } else if(argv[1][1] == 'e') {
167 +- sprintf(ezdfile,&argv[2][0]);
168 ++ sprintf(ezdfile,"%s",&argv[2][0]);
169 + } else if(argv[1][1] == 'm') {
170 +- sprintf(mrcfile,&argv[2][0]);
171 ++ sprintf(mrcfile,"%s",&argv[2][0]);
172 + } else if(argv[1][1] == 'o') {
173 +- sprintf(pdbfile,&argv[2][0]);
174 ++ sprintf(pdbfile,"%s",&argv[2][0]);
175 + } else if(argv[1][1] == 'h') {
176 + cerr << "./Tunnel.exe -i <file> -g <grid spacing> -p <tunnel probe radius>" << endl
177 + << "\t-e <EZD outfile> -o <PDB outfile> -m <MRC outfile>" << endl
178 +diff --git a/vdw.cpp b/vdw.cpp
179 +index 4df73f5..0e26edc 100644
180 +--- a/vdw.cpp
181 ++++ b/vdw.cpp
182 +@@ -32,13 +32,13 @@ int main(int argc, char *argv[]) {
183 +
184 + while(argc > 1 && argv[1][0] == '-') {
185 + if(argv[1][1] == 'i') {
186 +- sprintf(file,&argv[2][0]);
187 ++ sprintf(file,"%s",&argv[2][0]);
188 + } else if(argv[1][1] == 'o') {
189 +- sprintf(pdbfile,&argv[2][0]);
190 ++ sprintf(pdbfile,"%s",&argv[2][0]);
191 + } else if(argv[1][1] == 'e') {
192 +- sprintf(ezdfile,&argv[2][0]);
193 ++ sprintf(ezdfile,"%s",&argv[2][0]);
194 + } else if(argv[1][1] == 'm') {
195 +- sprintf(mrcfile,&argv[2][0]);
196 ++ sprintf(mrcfile,"%s",&argv[2][0]);
197 + } else if(argv[1][1] == 'g') {
198 + GRID = atof(&argv[2][0]);
199 + } else if(argv[1][1] == 'h') {
200 +diff --git a/volume.cpp b/volume.cpp
201 +index a2ca9ad..c304b94 100644
202 +--- a/volume.cpp
203 ++++ b/volume.cpp
204 +@@ -32,15 +32,15 @@ int main(int argc, char *argv[]) {
205 +
206 + while(argc > 1 && argv[1][0] == '-') {
207 + if(argv[1][1] == 'i') {
208 +- sprintf(file,&argv[2][0]);
209 ++ sprintf(file,"%s",&argv[2][0]);
210 + } else if(argv[1][1] == 'p') {
211 + PROBE = atof(&argv[2][0]);
212 + } else if(argv[1][1] == 'o') {
213 +- sprintf(pdbfile,&argv[2][0]);
214 ++ sprintf(pdbfile,"%s",&argv[2][0]);
215 + } else if(argv[1][1] == 'e') {
216 +- sprintf(ezdfile,&argv[2][0]);
217 ++ sprintf(ezdfile,"%s",&argv[2][0]);
218 + } else if(argv[1][1] == 'm') {
219 +- sprintf(mrcfile,&argv[2][0]);
220 ++ sprintf(mrcfile,"%s",&argv[2][0]);
221 + } else if(argv[1][1] == 'g') {
222 + GRID = atof(&argv[2][0]);
223 + } else if(argv[1][1] == 'h') {
224
225 diff --git a/sci-chemistry/threeV/files/1.2-gentoo.patch b/sci-chemistry/threeV/files/threeV-1.2-gentoo.patch
226 similarity index 97%
227 rename from sci-chemistry/threeV/files/1.2-gentoo.patch
228 rename to sci-chemistry/threeV/files/threeV-1.2-gentoo.patch
229 index 0827551599b..556e928d581 100644
230 --- a/sci-chemistry/threeV/files/1.2-gentoo.patch
231 +++ b/sci-chemistry/threeV/files/threeV-1.2-gentoo.patch
232 @@ -1,7 +1,7 @@
233 -diff --git a/src/Makefile b/src/Makefile
234 +diff --git a/Makefile b/Makefile
235 index a58462c..616f51a 100644
236 ---- a/src/Makefile
237 -+++ b/src/Makefile
238 +--- a/Makefile
239 ++++ b/Makefile
240 @@ -1,7 +1,7 @@
241 -CC = g++
242 -EXT=$(shell ./cpuflags.pl --opt )
243
244 diff --git a/sci-chemistry/threeV/threeV-1.2.ebuild b/sci-chemistry/threeV/threeV-1.2-r1.ebuild
245 similarity index 58%
246 rename from sci-chemistry/threeV/threeV-1.2.ebuild
247 rename to sci-chemistry/threeV/threeV-1.2-r1.ebuild
248 index 8ed375a4876..1d4a1e1f346 100644
249 --- a/sci-chemistry/threeV/threeV-1.2.ebuild
250 +++ b/sci-chemistry/threeV/threeV-1.2-r1.ebuild
251 @@ -1,9 +1,9 @@
252 -# Copyright 1999-2010 Gentoo Foundation
253 +# Copyright 1999-2017 Gentoo Foundation
254 # Distributed under the terms of the GNU General Public License v2
255
256 -EAPI="3"
257 +EAPI=6
258
259 -inherit eutils toolchain-funcs
260 +inherit toolchain-funcs
261
262 DESCRIPTION="3V: Voss Volume Voxelator"
263 HOMEPAGE="http://geometry.molmovdb.org/3v/"
264 @@ -19,15 +19,22 @@ PDEPEND="sci-chemistry/msms-bin"
265
266 S="${WORKDIR}/3v-${PV}/src"
267
268 +PATCHES=(
269 + "${FILESDIR}"/${P}-gentoo.patch
270 + "${FILESDIR}"/${P}-format-security.patch
271 +)
272 +
273 src_prepare() {
274 - epatch "${FILESDIR}"/${PV}-gentoo.patch
275 + default
276 tc-export CXX
277 - emake distclean || die
278 + emake distclean
279 +
280 + export MAKEOPTS+=" V=1"
281 }
282
283 src_install() {
284 - emake DESTDIR="${ED}" install || die
285 + emake DESTDIR="${ED}" install
286
287 - cd ..
288 - dodoc AUTHORS ChangeLog QUICKSTART README TODO VERSION || die
289 + cd .. || die
290 + dodoc AUTHORS ChangeLog QUICKSTART README TODO VERSION
291 }