Gentoo Archives: gentoo-commits

From: Sebastien Fabbro <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-astronomy/wcstools/, sci-astronomy/wcstools/files/
Date: Tue, 06 Sep 2016 21:34:49
Message-Id: 1473197478.ce799ac89163111f463683aac14ea32f72e33311.bicatali@gentoo
1 commit: ce799ac89163111f463683aac14ea32f72e33311
2 Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 6 17:37:36 2016 +0000
4 Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 6 21:31:18 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce799ac8
7
8 sci-astronomy/wcstools: version bump
9
10 Package-Manager: portage-2.3.0
11
12 sci-astronomy/wcstools/Manifest | 1 +
13 .../files/wcstools-3.9.4-compiler-warning.patch | 34 +++
14 .../wcstools/files/wcstools-3.9.4-fix-tests.patch | 34 +++
15 .../wcstools/files/wcstools-3.9.4-haspm.patch | 22 ++
16 .../wcstools/files/wcstools-3.9.4-spelling.patch | 242 +++++++++++++++++++++
17 sci-astronomy/wcstools/wcstools-3.9.4.ebuild | 68 ++++++
18 6 files changed, 401 insertions(+)
19
20 diff --git a/sci-astronomy/wcstools/Manifest b/sci-astronomy/wcstools/Manifest
21 index e752294..a9ee4d7 100644
22 --- a/sci-astronomy/wcstools/Manifest
23 +++ b/sci-astronomy/wcstools/Manifest
24 @@ -1 +1,2 @@
25 DIST wcstools-3.9.3.tar.gz 8526152 SHA256 1af69a8d524d747f452667689be3272503c4c49d3dc345364dd1e9fdf898aecd SHA512 d2a5a6c13d89ff0d1e79a60fb174a90c152b045d63fd480c282a29226fff81dc80ab3ddc296ba6450e30294f86ac6ece1e0331a7b551ce865d6d8d1c6ea4643a WHIRLPOOL a41de2580592c8471f772e97959336bc5d016aabf9ae2d95f656636da98290703c1e8929298ca0e1d7a49d1e420b5048a11d4574985669ba3e4265b438265d2d
26 +DIST wcstools-3.9.4.tar.gz 8528588 SHA256 92aceebb7c4409706bd1d30abe020ab0516a2bf507719e60aede6498ce5e4b7d SHA512 0f46ac82d8f512496b33b43d417e92acc7d7e0710d217895ad464686837b7e08740e64ce1800b6c58c9e326b5fcfd5387d1817ca6898512baaaf86ec6ca72d6e WHIRLPOOL 3a6f50567a9831aa9dc35a4744268dc071f38f853a1299937ba1f4d5cdc84c0d8faa528c4e54a82828cfa00a755e8e69fb2b564186a16ba8fc042dd20f230c12
27
28 diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.4-compiler-warning.patch b/sci-astronomy/wcstools/files/wcstools-3.9.4-compiler-warning.patch
29 new file mode 100644
30 index 00000000..ff81820
31 --- /dev/null
32 +++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-compiler-warning.patch
33 @@ -0,0 +1,34 @@
34 +From: Ole Streicher <debian@×××××××××.cx>
35 +Date: Fri, 5 Aug 2016 16:17:42 +0200
36 +Subject: Fix some compiler warnings.
37 +
38 +---
39 + libwcs/imhfile.c | 2 +-
40 + libwcs/webread.c | 1 +
41 + 2 files changed, 2 insertions(+), 1 deletion(-)
42 +
43 +diff --git a/libwcs/imhfile.c b/libwcs/imhfile.c
44 +index b618686..4279d3c 100644
45 +--- a/libwcs/imhfile.c
46 ++++ b/libwcs/imhfile.c
47 +@@ -1075,7 +1075,7 @@ char *hdrname; /* IRAF image header file pathname */
48 +
49 + /* add name */
50 + newpixname[len] = '\0';
51 +- (void)strncat (newpixname, pixname, SZ_IM2PIXFILE);
52 ++ (void)strncat (newpixname, pixname, SZ_IM2PIXFILE - len);
53 + }
54 +
55 + /* Pixel file has same name as header file, but with .pix extension */
56 +diff --git a/libwcs/webread.c b/libwcs/webread.c
57 +index 1f5c518..cd9cba9 100644
58 +--- a/libwcs/webread.c
59 ++++ b/libwcs/webread.c
60 +@@ -32,6 +32,7 @@
61 + #include <stdlib.h>
62 + #include <unistd.h>
63 + #include <string.h>
64 ++#include <ctype.h>
65 + #include <math.h>
66 + #include "wcs.h"
67 + #include "fitsfile.h"
68
69 diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.4-fix-tests.patch b/sci-astronomy/wcstools/files/wcstools-3.9.4-fix-tests.patch
70 new file mode 100644
71 index 00000000..d867957
72 --- /dev/null
73 +++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-fix-tests.patch
74 @@ -0,0 +1,34 @@
75 +From: Ole Streicher <debian@×××××××××.cx>
76 +Date: Fri, 5 Aug 2016 16:17:42 +0200
77 +Subject: Fix several bugs that appear in during the mayhem tests.
78 +
79 +---
80 + cphead.c | 2 +-
81 + getpix.c | 1 +
82 + 2 files changed, 2 insertions(+), 1 deletion(-)
83 +
84 +diff --git a/cphead.c b/cphead.c
85 +index 0c025dd..2b34f12 100644
86 +--- a/cphead.c
87 ++++ b/cphead.c
88 +@@ -148,7 +148,7 @@ char **av;
89 + free (kwd);
90 + kwd = kwdnew;
91 + }
92 +- for (ikwd = nkwd; i < nkwd+nkwd1+32; i++) {
93 ++ for (ikwd = nkwd; ikwd < nkwd+nkwd1+32; ikwd++) {
94 + kwd[ikwd] = (char *) calloc (32, 1);
95 + }
96 + strcpy (kwd[nkwd], "RA");
97 +diff --git a/getpix.c b/getpix.c
98 +index ccb38f0..64cc571 100644
99 +--- a/getpix.c
100 ++++ b/getpix.c
101 +@@ -83,6 +83,7 @@ char **av;
102 + char *crange; /* Column range string */
103 + char *rstr;
104 + char *dstr = NULL;
105 ++ char rastr[32], decstr[32];
106 + char *cstr;
107 + int systemp;
108 + int i;
109
110 diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch b/sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch
111 new file mode 100644
112 index 00000000..427c476
113 --- /dev/null
114 +++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch
115 @@ -0,0 +1,22 @@
116 +From: Ole Streicher <olebole@××××××.org>
117 +Date: Fri, 5 Aug 2016 16:17:42 +0200
118 +Subject: Fix uninitialized value for haspm in RASortStars()
119 +
120 +This fixes a crash with 'imstar -s'.
121 +---
122 + libwcs/sortstar.c | 2 ++
123 + 1 file changed, 2 insertions(+)
124 +
125 +diff --git a/libwcs/sortstar.c b/libwcs/sortstar.c
126 +index 0123c64..f77555f 100644
127 +--- a/libwcs/sortstar.c
128 ++++ b/libwcs/sortstar.c
129 +@@ -856,6 +856,8 @@ int log; /* If >0, log progress every time mod number written */
130 + hasnum = 1;
131 + if (spra != NULL && spdec != NULL)
132 + haspm = 1;
133 ++ else
134 ++ haspm = 0;
135 + if (sx != NULL && sy != NULL)
136 + hasxy = 1;
137 + else
138
139 diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch b/sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch
140 new file mode 100644
141 index 00000000..d655c34
142 --- /dev/null
143 +++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch
144 @@ -0,0 +1,242 @@
145 +From: Ole Streicher <debian@×××××××××.cx>
146 +Date: Fri, 5 Aug 2016 16:17:42 +0200
147 +Subject: Spellfixes and manpage fixes
148 +
149 +---
150 + edhead.c | 2 +-
151 + immatch.c | 2 +-
152 + imwcs.c | 4 ++--
153 + libwcs/fitsfile.c | 10 +++++-----
154 + libwcs/imhfile.c | 4 ++--
155 + man/man1/edhead.1 | 2 +-
156 + man/man1/imcat.1 | 2 +-
157 + man/man1/imgsc.1 | 4 ++--
158 + man/man1/imua2.1 | 2 +-
159 + man/man1/keyhead.1 | 2 +-
160 + man/man1/skycoor.1 | 2 +-
161 + man/man1/sua2.1 | 2 +-
162 + man/man1/susa2.1 | 2 +-
163 + 13 files changed, 20 insertions(+), 20 deletions(-)
164 +
165 +diff --git a/edhead.c b/edhead.c
166 +index 1fe33e2..494cb4d 100644
167 +--- a/edhead.c
168 ++++ b/edhead.c
169 +@@ -109,7 +109,7 @@ usage ()
170 + exit (-1);
171 + fprintf (stderr,"Edit header of FITS or IRAF image file\n");
172 + fprintf(stderr,"usage: edhead [-nv] [-e editor] file.fits file.imh...\n");
173 +- fprintf(stderr," -e: Set editor, overiding environment EDITOR \n");
174 ++ fprintf(stderr," -e: Set editor, overriding environment EDITOR \n");
175 + fprintf(stderr," -n: write new file, else overwrite \n");
176 + fprintf(stderr," -v: verbose\n");
177 + exit (1);
178 +diff --git a/immatch.c b/immatch.c
179 +index 02af222..59b4826 100644
180 +--- a/immatch.c
181 ++++ b/immatch.c
182 +@@ -383,7 +383,7 @@ char **av;
183 +
184 + /* If reference catalog is not set, exit with an error message */
185 + if (refcatname == NULL) {
186 +- PrintUsage ("* Must specifiy a reference catalog using -c or alias.");
187 ++ PrintUsage ("* Must specify a reference catalog using -c or alias.");
188 + }
189 +
190 + /* Process image files from list file */
191 +diff --git a/imwcs.c b/imwcs.c
192 +index c32cffd..6639198 100644
193 +--- a/imwcs.c
194 ++++ b/imwcs.c
195 +@@ -285,7 +285,7 @@ char **av;
196 + ac--;
197 + break;
198 +
199 +- case 'o': /* Specifiy output image filename */
200 ++ case 'o': /* Specify output image filename */
201 + if (ac < 2)
202 + PrintUsage (str);
203 + if (*(av+1)[0] == '-' || *(str+1) != (char)0)
204 +@@ -476,7 +476,7 @@ char **av;
205 +
206 + /* If reference catalog is not set, exit with an error message */
207 + if (refcatname == NULL && matchfile == NULL) {
208 +- PrintUsage ("* Must specifiy a reference catalog using -c or alias.");
209 ++ PrintUsage ("* Must specify a reference catalog using -c or alias.");
210 + }
211 +
212 + if (!writeheader && !verbose) {
213 +diff --git a/libwcs/fitsfile.c b/libwcs/fitsfile.c
214 +index 2c3e709..a2f0d0f 100644
215 +--- a/libwcs/fitsfile.c
216 ++++ b/libwcs/fitsfile.c
217 +@@ -1583,7 +1583,7 @@ char *image; /* FITS image pixels */
218 + if (!access (filename, 0)) {
219 + fd = open (filename, O_WRONLY);
220 + if (fd < 3) {
221 +- snprintf (fitserrmsg,79, "FITSWIMAGE: file %s not writeable\n", filename);
222 ++ snprintf (fitserrmsg,79, "FITSWIMAGE: file %s not writable\n", filename);
223 + return (0);
224 + }
225 + }
226 +@@ -1622,7 +1622,7 @@ char *image; /* FITS image pixels */
227 + if (!access (filename, 0)) {
228 + fd = open (filename, O_WRONLY);
229 + if (fd < 3) {
230 +- snprintf (fitserrmsg,79, "FITSWEXT: file %s not writeable\n",
231 ++ snprintf (fitserrmsg,79, "FITSWEXT: file %s not writable\n",
232 + filename);
233 + return (0);
234 + }
235 +@@ -1884,7 +1884,7 @@ char *filename0; /* Name of input FITS image file */
236 + if (!access (filename, 0)) {
237 + fdout = open (filename, O_WRONLY);
238 + if (fdout < 3) {
239 +- snprintf (fitserrmsg,79, "FITSCIMAGE: file %s not writeable\n", filename);
240 ++ snprintf (fitserrmsg,79, "FITSCIMAGE: file %s not writable\n", filename);
241 + return (0);
242 + }
243 + }
244 +@@ -1970,7 +1970,7 @@ char *header; /* FITS image header */
245 + if (!access (filename, 0)) {
246 + fd = open (filename, O_WRONLY);
247 + if (fd < 3) {
248 +- snprintf (fitserrmsg, 79, "FITSWHEAD: file %s not writeable\n", filename);
249 ++ snprintf (fitserrmsg, 79, "FITSWHEAD: file %s not writable\n", filename);
250 + return (0);
251 + }
252 + }
253 +@@ -2072,7 +2072,7 @@ char *header; /* FITS image header */
254 + if (ext != NULL)
255 + *ext = cext;
256 + if (fd < 3) {
257 +- snprintf (fitserrmsg, 79, "FITSWEXHEAD: file %s not writeable\n", filename);
258 ++ snprintf (fitserrmsg, 79, "FITSWEXHEAD: file %s not writable\n", filename);
259 + return (-1);
260 + }
261 +
262 +diff --git a/libwcs/imhfile.c b/libwcs/imhfile.c
263 +index 4279d3c..25f82ac 100644
264 +--- a/libwcs/imhfile.c
265 ++++ b/libwcs/imhfile.c
266 +@@ -896,7 +896,7 @@ char *fitsheader; /* FITS image header */
267 + if (!access (hdrname, 0)) {
268 + fd = open (hdrname, O_WRONLY);
269 + if (fd < 3) {
270 +- fprintf (stderr, "IRAFWIMAGE: file %s not writeable\n", hdrname);
271 ++ fprintf (stderr, "IRAFWIMAGE: file %s not writable\n", hdrname);
272 + return (0);
273 + }
274 + }
275 +@@ -993,7 +993,7 @@ char *image; /* IRAF image */
276 + if (!access (pixname, 0)) {
277 + fd = open (pixname, O_WRONLY);
278 + if (fd < 3) {
279 +- fprintf (stderr, "IRAFWIMAGE: file %s not writeable\n", pixname);
280 ++ fprintf (stderr, "IRAFWIMAGE: file %s not writable\n", pixname);
281 + return (0);
282 + }
283 + }
284 +diff --git a/man/man1/edhead.1 b/man/man1/edhead.1
285 +index 543487c..74dbedf 100644
286 +--- a/man/man1/edhead.1
287 ++++ b/man/man1/edhead.1
288 +@@ -11,7 +11,7 @@ takes care of trailing spaces so they can be ignored while using the editor.
289 + .SH Options
290 + .TP
291 + .B \-e <editor path>
292 +-Set editor, overiding environment EDITOR
293 ++Set editor, overriding environment EDITOR
294 + .TP
295 + .B \-n
296 + Write a new file with .e before the file type extension. The default is
297 +diff --git a/man/man1/imcat.1 b/man/man1/imcat.1
298 +index a1cac13..e975af6 100644
299 +--- a/man/man1/imcat.1
300 ++++ b/man/man1/imcat.1
301 +@@ -4,7 +4,7 @@ imcat \- List catalog stars in FITS and IRAF image files
302 + .SH Synopsis
303 + imcat [options] FITS or IRAF file(s)
304 + .SH Description
305 +-Search given catalog withing area described by the world coordinate
306 ++Search given catalog within area described by the world coordinate
307 + system in an image header. May be called as imuac to search the USNO A 1.0
308 + catalog, imusac to search the USNO SA 1.0 catalog, or imgsc to search
309 + the HST Guide Star Catalog.
310 +diff --git a/man/man1/imgsc.1 b/man/man1/imgsc.1
311 +index 604b072..aa64b2c 100644
312 +--- a/man/man1/imgsc.1
313 ++++ b/man/man1/imgsc.1
314 +@@ -1,10 +1,10 @@
315 +-.TH imgsc(1) WCS "14 April 1998"
316 ++.TH imgsc 1 WCSTools "14 April 1998"
317 + .SH Name
318 + imgsc \- Find HST GSC stars in FITS or IRAF image files
319 + .SH Synopsis
320 + imgsc [options] FITS or IRAF file(s)
321 + .SH Description
322 +-Search the HST Guide Star Catalog withing the area described by the world
323 ++Search the HST Guide Star Catalog within the area described by the world
324 + coordinate system in an image header. This is a link to imcat rather than
325 + a separate executable.
326 + .SH Options
327 +diff --git a/man/man1/imua2.1 b/man/man1/imua2.1
328 +index 4acbc8b..22b896f 100644
329 +--- a/man/man1/imua2.1
330 ++++ b/man/man1/imua2.1
331 +@@ -78,7 +78,7 @@ Sort by RA instead of flux
332 + Tab table to standard output as well as file
333 + .TP
334 + .B \-u <plate>
335 +-Accept only stars from thsi plate (default all)
336 ++Accept only stars from this plate (default all)
337 + .TP
338 + .B \-v
339 + Verbose listing of processing intermediate results
340 +diff --git a/man/man1/keyhead.1 b/man/man1/keyhead.1
341 +index 4d1dfb1..fea7652 100644
342 +--- a/man/man1/keyhead.1
343 ++++ b/man/man1/keyhead.1
344 +@@ -7,7 +7,7 @@ sethead [\-hknv] <FITS or IRAF file> kw1=kw1a kw2=kwd2a ... kwn=kwdna
345 + Change the names of keywords in FITS or IRAF image headers. Each current
346 + image keyword whose entry is to be modified should be followed by an
347 + equal sign and a second keyword, with no intervening spaces.
348 +-If the \-r option is used, the value of the second keyword is transfered
349 ++If the \-r option is used, the value of the second keyword is transferred
350 + to that of the first. Otherwise, the name of the first keyword is changed
351 + to the second keyword.
352 + To change keywords in a list of files, substitute @<listfile> for the file
353 +diff --git a/man/man1/skycoor.1 b/man/man1/skycoor.1
354 +index c3b3d2b..2126c29 100644
355 +--- a/man/man1/skycoor.1
356 ++++ b/man/man1/skycoor.1
357 +@@ -1,4 +1,4 @@
358 +-.TH skycoor(1) WCSTools "9 November 2001"
359 ++.TH skycoor 1 WCSTools "9 November 2001"
360 + .SH Name
361 + skycoor \- Convert coordinates
362 + .SH Synopsis
363 +diff --git a/man/man1/sua2.1 b/man/man1/sua2.1
364 +index b28c89a..d29d126 100644
365 +--- a/man/man1/sua2.1
366 ++++ b/man/man1/sua2.1
367 +@@ -1,6 +1,6 @@
368 + .TH sua2 1 WCS "19 November 1999"
369 + .SH Name
370 +-Find USNO-A2.0 Catalog stars in a square on the sky
371 ++sua2 \- Find USNO-A2.0 Catalog stars in a square on the sky
372 + .SH Synopsis
373 + sua2 [options] ra dec system
374 + .SH Description
375 +diff --git a/man/man1/susa2.1 b/man/man1/susa2.1
376 +index 06409e2..8d03886 100644
377 +--- a/man/man1/susa2.1
378 ++++ b/man/man1/susa2.1
379 +@@ -1,6 +1,6 @@
380 + .TH susa2 1 WCS "9 June 2000"
381 + .SH Name
382 +-Find USNO-SA2.0 Catalog stars in a square on the sky
383 ++susa2 \- Find USNO-SA2.0 Catalog stars in a square on the sky
384 + .SH Synopsis
385 + susac [options] [\-b or \-j] ra dec
386 + .SH Description
387
388 diff --git a/sci-astronomy/wcstools/wcstools-3.9.4.ebuild b/sci-astronomy/wcstools/wcstools-3.9.4.ebuild
389 new file mode 100644
390 index 00000000..fc930b8
391 --- /dev/null
392 +++ b/sci-astronomy/wcstools/wcstools-3.9.4.ebuild
393 @@ -0,0 +1,68 @@
394 +# Copyright 1999-2016 Gentoo Foundation
395 +# Distributed under the terms of the GNU General Public License v2
396 +# $Id$
397 +
398 +EAPI=6
399 +
400 +inherit eutils autotools
401 +
402 +DESCRIPTION="World Coordinate System library for astronomical FITS images"
403 +HOMEPAGE="http://tdc-www.harvard.edu/software/wcstools"
404 +SRC_URI="${HOMEPAGE}/${P}.tar.gz"
405 +
406 +LICENSE="GPL-2 LGPL-2.1"
407 +SLOT="0"
408 +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
409 +IUSE=""
410 +
411 +DOCS=( Readme Programs NEWS )
412 +
413 +PATCHES=(
414 + "${FILESDIR}"/${PN}-3.9.4-spelling.patch
415 + "${FILESDIR}"/${PN}-3.9.4-haspm.patch
416 + "${FILESDIR}"/${PN}-3.9.4-fix-tests.patch
417 + "${FILESDIR}"/${PN}-3.9.4-compiler-warning.patch
418 +)
419 +
420 +src_prepare() {
421 + default
422 + einfo "Copying gentoo autotools files"
423 + local f
424 + for f in "${FILESDIR}"/{configure.ac,wcstools.pc.in,Makefile.am}; do
425 + cp ${f} "${S}"/ || die
426 + done
427 + cp "${FILESDIR}"/Makefile.libwcs.am "${S}"/libwcs/Makefile.am || die
428 + # avoid colliding with fixdos, getdate and remap from other packages
429 + sed -i \
430 + -e 's/getdate/wcsgetdate/' \
431 + -e 's/crlf/wcscrlf/' \
432 + -e 's/remap/wcsremap/' \
433 + -e "s/3.... Programs/${PV} Programs/" \
434 + wcstools || die
435 + eautoreconf
436 +}
437 +
438 +src_test() {
439 + einfo "Testing various wcstools programs"
440 + ./newfits -a 10 -j 248 41 -p 0.15 test.fits || die "test newfits failed"
441 + ./sethead test.fits A=1 B=1 || die "test sethead failed"
442 + [[ "$(./gethead test.fits RA)" == "16:32:00.0000" ]] \
443 + || die "test gethead failed"
444 + rm test.fits
445 +}
446 +
447 +src_install() {
448 + default
449 + doman man/man1/*
450 + newdoc libwcs/NEWS NEWS.libwcs
451 + newdoc libwcs/Readme Readme.libwcs
452 +
453 +}
454 +
455 +pkg_postinst() {
456 + elog "The following execs have been renamed to avoid colliding"
457 + elog "with other packages:"
458 + elog " getdate -> wcsgetdate"
459 + elog " crlf -> wcscrlf"
460 + elog " remap -> wcsremap"
461 +}