From ce799ac89163111f463683aac14ea32f72e33311 Mon Sep 17 00:00:00 2001 From: Sébastien Fabbro Date: Tue, 6 Sep 2016 17:37:36 +0000 Subject: sci-astronomy/wcstools: version bump Package-Manager: portage-2.3.0 --- sci-astronomy/wcstools/Manifest | 1 + .../files/wcstools-3.9.4-compiler-warning.patch | 34 +++ .../wcstools/files/wcstools-3.9.4-fix-tests.patch | 34 +++ .../wcstools/files/wcstools-3.9.4-haspm.patch | 22 ++ .../wcstools/files/wcstools-3.9.4-spelling.patch | 242 +++++++++++++++++++++ sci-astronomy/wcstools/wcstools-3.9.4.ebuild | 68 ++++++ 6 files changed, 401 insertions(+) create mode 100644 sci-astronomy/wcstools/files/wcstools-3.9.4-compiler-warning.patch create mode 100644 sci-astronomy/wcstools/files/wcstools-3.9.4-fix-tests.patch create mode 100644 sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch create mode 100644 sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch create mode 100644 sci-astronomy/wcstools/wcstools-3.9.4.ebuild (limited to 'sci-astronomy/wcstools') diff --git a/sci-astronomy/wcstools/Manifest b/sci-astronomy/wcstools/Manifest index e75229457362..a9ee4d77424a 100644 --- a/sci-astronomy/wcstools/Manifest +++ b/sci-astronomy/wcstools/Manifest @@ -1 +1,2 @@ DIST wcstools-3.9.3.tar.gz 8526152 SHA256 1af69a8d524d747f452667689be3272503c4c49d3dc345364dd1e9fdf898aecd SHA512 d2a5a6c13d89ff0d1e79a60fb174a90c152b045d63fd480c282a29226fff81dc80ab3ddc296ba6450e30294f86ac6ece1e0331a7b551ce865d6d8d1c6ea4643a WHIRLPOOL a41de2580592c8471f772e97959336bc5d016aabf9ae2d95f656636da98290703c1e8929298ca0e1d7a49d1e420b5048a11d4574985669ba3e4265b438265d2d +DIST wcstools-3.9.4.tar.gz 8528588 SHA256 92aceebb7c4409706bd1d30abe020ab0516a2bf507719e60aede6498ce5e4b7d SHA512 0f46ac82d8f512496b33b43d417e92acc7d7e0710d217895ad464686837b7e08740e64ce1800b6c58c9e326b5fcfd5387d1817ca6898512baaaf86ec6ca72d6e WHIRLPOOL 3a6f50567a9831aa9dc35a4744268dc071f38f853a1299937ba1f4d5cdc84c0d8faa528c4e54a82828cfa00a755e8e69fb2b564186a16ba8fc042dd20f230c12 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 new file mode 100644 index 000000000000..ff81820d404a --- /dev/null +++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-compiler-warning.patch @@ -0,0 +1,34 @@ +From: Ole Streicher +Date: Fri, 5 Aug 2016 16:17:42 +0200 +Subject: Fix some compiler warnings. + +--- + libwcs/imhfile.c | 2 +- + libwcs/webread.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libwcs/imhfile.c b/libwcs/imhfile.c +index b618686..4279d3c 100644 +--- a/libwcs/imhfile.c ++++ b/libwcs/imhfile.c +@@ -1075,7 +1075,7 @@ char *hdrname; /* IRAF image header file pathname */ + + /* add name */ + newpixname[len] = '\0'; +- (void)strncat (newpixname, pixname, SZ_IM2PIXFILE); ++ (void)strncat (newpixname, pixname, SZ_IM2PIXFILE - len); + } + + /* Pixel file has same name as header file, but with .pix extension */ +diff --git a/libwcs/webread.c b/libwcs/webread.c +index 1f5c518..cd9cba9 100644 +--- a/libwcs/webread.c ++++ b/libwcs/webread.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + #include "wcs.h" + #include "fitsfile.h" 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 new file mode 100644 index 000000000000..d8679578f408 --- /dev/null +++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-fix-tests.patch @@ -0,0 +1,34 @@ +From: Ole Streicher +Date: Fri, 5 Aug 2016 16:17:42 +0200 +Subject: Fix several bugs that appear in during the mayhem tests. + +--- + cphead.c | 2 +- + getpix.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/cphead.c b/cphead.c +index 0c025dd..2b34f12 100644 +--- a/cphead.c ++++ b/cphead.c +@@ -148,7 +148,7 @@ char **av; + free (kwd); + kwd = kwdnew; + } +- for (ikwd = nkwd; i < nkwd+nkwd1+32; i++) { ++ for (ikwd = nkwd; ikwd < nkwd+nkwd1+32; ikwd++) { + kwd[ikwd] = (char *) calloc (32, 1); + } + strcpy (kwd[nkwd], "RA"); +diff --git a/getpix.c b/getpix.c +index ccb38f0..64cc571 100644 +--- a/getpix.c ++++ b/getpix.c +@@ -83,6 +83,7 @@ char **av; + char *crange; /* Column range string */ + char *rstr; + char *dstr = NULL; ++ char rastr[32], decstr[32]; + char *cstr; + int systemp; + int i; diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch b/sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch new file mode 100644 index 000000000000..427c476edb95 --- /dev/null +++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch @@ -0,0 +1,22 @@ +From: Ole Streicher +Date: Fri, 5 Aug 2016 16:17:42 +0200 +Subject: Fix uninitialized value for haspm in RASortStars() + +This fixes a crash with 'imstar -s'. +--- + libwcs/sortstar.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libwcs/sortstar.c b/libwcs/sortstar.c +index 0123c64..f77555f 100644 +--- a/libwcs/sortstar.c ++++ b/libwcs/sortstar.c +@@ -856,6 +856,8 @@ int log; /* If >0, log progress every time mod number written */ + hasnum = 1; + if (spra != NULL && spdec != NULL) + haspm = 1; ++ else ++ haspm = 0; + if (sx != NULL && sy != NULL) + hasxy = 1; + else diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch b/sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch new file mode 100644 index 000000000000..d655c345c257 --- /dev/null +++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch @@ -0,0 +1,242 @@ +From: Ole Streicher +Date: Fri, 5 Aug 2016 16:17:42 +0200 +Subject: Spellfixes and manpage fixes + +--- + edhead.c | 2 +- + immatch.c | 2 +- + imwcs.c | 4 ++-- + libwcs/fitsfile.c | 10 +++++----- + libwcs/imhfile.c | 4 ++-- + man/man1/edhead.1 | 2 +- + man/man1/imcat.1 | 2 +- + man/man1/imgsc.1 | 4 ++-- + man/man1/imua2.1 | 2 +- + man/man1/keyhead.1 | 2 +- + man/man1/skycoor.1 | 2 +- + man/man1/sua2.1 | 2 +- + man/man1/susa2.1 | 2 +- + 13 files changed, 20 insertions(+), 20 deletions(-) + +diff --git a/edhead.c b/edhead.c +index 1fe33e2..494cb4d 100644 +--- a/edhead.c ++++ b/edhead.c +@@ -109,7 +109,7 @@ usage () + exit (-1); + fprintf (stderr,"Edit header of FITS or IRAF image file\n"); + fprintf(stderr,"usage: edhead [-nv] [-e editor] file.fits file.imh...\n"); +- fprintf(stderr," -e: Set editor, overiding environment EDITOR \n"); ++ fprintf(stderr," -e: Set editor, overriding environment EDITOR \n"); + fprintf(stderr," -n: write new file, else overwrite \n"); + fprintf(stderr," -v: verbose\n"); + exit (1); +diff --git a/immatch.c b/immatch.c +index 02af222..59b4826 100644 +--- a/immatch.c ++++ b/immatch.c +@@ -383,7 +383,7 @@ char **av; + + /* If reference catalog is not set, exit with an error message */ + if (refcatname == NULL) { +- PrintUsage ("* Must specifiy a reference catalog using -c or alias."); ++ PrintUsage ("* Must specify a reference catalog using -c or alias."); + } + + /* Process image files from list file */ +diff --git a/imwcs.c b/imwcs.c +index c32cffd..6639198 100644 +--- a/imwcs.c ++++ b/imwcs.c +@@ -285,7 +285,7 @@ char **av; + ac--; + break; + +- case 'o': /* Specifiy output image filename */ ++ case 'o': /* Specify output image filename */ + if (ac < 2) + PrintUsage (str); + if (*(av+1)[0] == '-' || *(str+1) != (char)0) +@@ -476,7 +476,7 @@ char **av; + + /* If reference catalog is not set, exit with an error message */ + if (refcatname == NULL && matchfile == NULL) { +- PrintUsage ("* Must specifiy a reference catalog using -c or alias."); ++ PrintUsage ("* Must specify a reference catalog using -c or alias."); + } + + if (!writeheader && !verbose) { +diff --git a/libwcs/fitsfile.c b/libwcs/fitsfile.c +index 2c3e709..a2f0d0f 100644 +--- a/libwcs/fitsfile.c ++++ b/libwcs/fitsfile.c +@@ -1583,7 +1583,7 @@ char *image; /* FITS image pixels */ + if (!access (filename, 0)) { + fd = open (filename, O_WRONLY); + if (fd < 3) { +- snprintf (fitserrmsg,79, "FITSWIMAGE: file %s not writeable\n", filename); ++ snprintf (fitserrmsg,79, "FITSWIMAGE: file %s not writable\n", filename); + return (0); + } + } +@@ -1622,7 +1622,7 @@ char *image; /* FITS image pixels */ + if (!access (filename, 0)) { + fd = open (filename, O_WRONLY); + if (fd < 3) { +- snprintf (fitserrmsg,79, "FITSWEXT: file %s not writeable\n", ++ snprintf (fitserrmsg,79, "FITSWEXT: file %s not writable\n", + filename); + return (0); + } +@@ -1884,7 +1884,7 @@ char *filename0; /* Name of input FITS image file */ + if (!access (filename, 0)) { + fdout = open (filename, O_WRONLY); + if (fdout < 3) { +- snprintf (fitserrmsg,79, "FITSCIMAGE: file %s not writeable\n", filename); ++ snprintf (fitserrmsg,79, "FITSCIMAGE: file %s not writable\n", filename); + return (0); + } + } +@@ -1970,7 +1970,7 @@ char *header; /* FITS image header */ + if (!access (filename, 0)) { + fd = open (filename, O_WRONLY); + if (fd < 3) { +- snprintf (fitserrmsg, 79, "FITSWHEAD: file %s not writeable\n", filename); ++ snprintf (fitserrmsg, 79, "FITSWHEAD: file %s not writable\n", filename); + return (0); + } + } +@@ -2072,7 +2072,7 @@ char *header; /* FITS image header */ + if (ext != NULL) + *ext = cext; + if (fd < 3) { +- snprintf (fitserrmsg, 79, "FITSWEXHEAD: file %s not writeable\n", filename); ++ snprintf (fitserrmsg, 79, "FITSWEXHEAD: file %s not writable\n", filename); + return (-1); + } + +diff --git a/libwcs/imhfile.c b/libwcs/imhfile.c +index 4279d3c..25f82ac 100644 +--- a/libwcs/imhfile.c ++++ b/libwcs/imhfile.c +@@ -896,7 +896,7 @@ char *fitsheader; /* FITS image header */ + if (!access (hdrname, 0)) { + fd = open (hdrname, O_WRONLY); + if (fd < 3) { +- fprintf (stderr, "IRAFWIMAGE: file %s not writeable\n", hdrname); ++ fprintf (stderr, "IRAFWIMAGE: file %s not writable\n", hdrname); + return (0); + } + } +@@ -993,7 +993,7 @@ char *image; /* IRAF image */ + if (!access (pixname, 0)) { + fd = open (pixname, O_WRONLY); + if (fd < 3) { +- fprintf (stderr, "IRAFWIMAGE: file %s not writeable\n", pixname); ++ fprintf (stderr, "IRAFWIMAGE: file %s not writable\n", pixname); + return (0); + } + } +diff --git a/man/man1/edhead.1 b/man/man1/edhead.1 +index 543487c..74dbedf 100644 +--- a/man/man1/edhead.1 ++++ b/man/man1/edhead.1 +@@ -11,7 +11,7 @@ takes care of trailing spaces so they can be ignored while using the editor. + .SH Options + .TP + .B \-e +-Set editor, overiding environment EDITOR ++Set editor, overriding environment EDITOR + .TP + .B \-n + Write a new file with .e before the file type extension. The default is +diff --git a/man/man1/imcat.1 b/man/man1/imcat.1 +index a1cac13..e975af6 100644 +--- a/man/man1/imcat.1 ++++ b/man/man1/imcat.1 +@@ -4,7 +4,7 @@ imcat \- List catalog stars in FITS and IRAF image files + .SH Synopsis + imcat [options] FITS or IRAF file(s) + .SH Description +-Search given catalog withing area described by the world coordinate ++Search given catalog within area described by the world coordinate + system in an image header. May be called as imuac to search the USNO A 1.0 + catalog, imusac to search the USNO SA 1.0 catalog, or imgsc to search + the HST Guide Star Catalog. +diff --git a/man/man1/imgsc.1 b/man/man1/imgsc.1 +index 604b072..aa64b2c 100644 +--- a/man/man1/imgsc.1 ++++ b/man/man1/imgsc.1 +@@ -1,10 +1,10 @@ +-.TH imgsc(1) WCS "14 April 1998" ++.TH imgsc 1 WCSTools "14 April 1998" + .SH Name + imgsc \- Find HST GSC stars in FITS or IRAF image files + .SH Synopsis + imgsc [options] FITS or IRAF file(s) + .SH Description +-Search the HST Guide Star Catalog withing the area described by the world ++Search the HST Guide Star Catalog within the area described by the world + coordinate system in an image header. This is a link to imcat rather than + a separate executable. + .SH Options +diff --git a/man/man1/imua2.1 b/man/man1/imua2.1 +index 4acbc8b..22b896f 100644 +--- a/man/man1/imua2.1 ++++ b/man/man1/imua2.1 +@@ -78,7 +78,7 @@ Sort by RA instead of flux + Tab table to standard output as well as file + .TP + .B \-u +-Accept only stars from thsi plate (default all) ++Accept only stars from this plate (default all) + .TP + .B \-v + Verbose listing of processing intermediate results +diff --git a/man/man1/keyhead.1 b/man/man1/keyhead.1 +index 4d1dfb1..fea7652 100644 +--- a/man/man1/keyhead.1 ++++ b/man/man1/keyhead.1 +@@ -7,7 +7,7 @@ sethead [\-hknv] kw1=kw1a kw2=kwd2a ... kwn=kwdna + Change the names of keywords in FITS or IRAF image headers. Each current + image keyword whose entry is to be modified should be followed by an + equal sign and a second keyword, with no intervening spaces. +-If the \-r option is used, the value of the second keyword is transfered ++If the \-r option is used, the value of the second keyword is transferred + to that of the first. Otherwise, the name of the first keyword is changed + to the second keyword. + To change keywords in a list of files, substitute @ for the file +diff --git a/man/man1/skycoor.1 b/man/man1/skycoor.1 +index c3b3d2b..2126c29 100644 +--- a/man/man1/skycoor.1 ++++ b/man/man1/skycoor.1 +@@ -1,4 +1,4 @@ +-.TH skycoor(1) WCSTools "9 November 2001" ++.TH skycoor 1 WCSTools "9 November 2001" + .SH Name + skycoor \- Convert coordinates + .SH Synopsis +diff --git a/man/man1/sua2.1 b/man/man1/sua2.1 +index b28c89a..d29d126 100644 +--- a/man/man1/sua2.1 ++++ b/man/man1/sua2.1 +@@ -1,6 +1,6 @@ + .TH sua2 1 WCS "19 November 1999" + .SH Name +-Find USNO-A2.0 Catalog stars in a square on the sky ++sua2 \- Find USNO-A2.0 Catalog stars in a square on the sky + .SH Synopsis + sua2 [options] ra dec system + .SH Description +diff --git a/man/man1/susa2.1 b/man/man1/susa2.1 +index 06409e2..8d03886 100644 +--- a/man/man1/susa2.1 ++++ b/man/man1/susa2.1 +@@ -1,6 +1,6 @@ + .TH susa2 1 WCS "9 June 2000" + .SH Name +-Find USNO-SA2.0 Catalog stars in a square on the sky ++susa2 \- Find USNO-SA2.0 Catalog stars in a square on the sky + .SH Synopsis + susac [options] [\-b or \-j] ra dec + .SH Description diff --git a/sci-astronomy/wcstools/wcstools-3.9.4.ebuild b/sci-astronomy/wcstools/wcstools-3.9.4.ebuild new file mode 100644 index 000000000000..fc930b856317 --- /dev/null +++ b/sci-astronomy/wcstools/wcstools-3.9.4.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit eutils autotools + +DESCRIPTION="World Coordinate System library for astronomical FITS images" +HOMEPAGE="http://tdc-www.harvard.edu/software/wcstools" +SRC_URI="${HOMEPAGE}/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +DOCS=( Readme Programs NEWS ) + +PATCHES=( + "${FILESDIR}"/${PN}-3.9.4-spelling.patch + "${FILESDIR}"/${PN}-3.9.4-haspm.patch + "${FILESDIR}"/${PN}-3.9.4-fix-tests.patch + "${FILESDIR}"/${PN}-3.9.4-compiler-warning.patch +) + +src_prepare() { + default + einfo "Copying gentoo autotools files" + local f + for f in "${FILESDIR}"/{configure.ac,wcstools.pc.in,Makefile.am}; do + cp ${f} "${S}"/ || die + done + cp "${FILESDIR}"/Makefile.libwcs.am "${S}"/libwcs/Makefile.am || die + # avoid colliding with fixdos, getdate and remap from other packages + sed -i \ + -e 's/getdate/wcsgetdate/' \ + -e 's/crlf/wcscrlf/' \ + -e 's/remap/wcsremap/' \ + -e "s/3.... Programs/${PV} Programs/" \ + wcstools || die + eautoreconf +} + +src_test() { + einfo "Testing various wcstools programs" + ./newfits -a 10 -j 248 41 -p 0.15 test.fits || die "test newfits failed" + ./sethead test.fits A=1 B=1 || die "test sethead failed" + [[ "$(./gethead test.fits RA)" == "16:32:00.0000" ]] \ + || die "test gethead failed" + rm test.fits +} + +src_install() { + default + doman man/man1/* + newdoc libwcs/NEWS NEWS.libwcs + newdoc libwcs/Readme Readme.libwcs + +} + +pkg_postinst() { + elog "The following execs have been renamed to avoid colliding" + elog "with other packages:" + elog " getdate -> wcsgetdate" + elog " crlf -> wcscrlf" + elog " remap -> wcsremap" +} -- cgit v1.2.3-65-gdbad