summaryrefslogtreecommitdiff
path: root/sci-astronomy/wcstools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-astronomy/wcstools
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-astronomy/wcstools')
-rw-r--r--sci-astronomy/wcstools/Manifest13
-rw-r--r--sci-astronomy/wcstools/files/Makefile.am73
-rw-r--r--sci-astronomy/wcstools/files/Makefile.libwcs.am17
-rw-r--r--sci-astronomy/wcstools/files/configure.ac9
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.4-compiler-warning.patch34
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.4-fix-tests.patch34
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch22
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch242
-rw-r--r--sci-astronomy/wcstools/files/wcstools.pc.in13
-rw-r--r--sci-astronomy/wcstools/metadata.xml20
-rw-r--r--sci-astronomy/wcstools/wcstools-3.9.5.ebuild67
11 files changed, 544 insertions, 0 deletions
diff --git a/sci-astronomy/wcstools/Manifest b/sci-astronomy/wcstools/Manifest
new file mode 100644
index 000000000000..115405cbbaf4
--- /dev/null
+++ b/sci-astronomy/wcstools/Manifest
@@ -0,0 +1,13 @@
+AUX Makefile.am 2016 SHA256 529ff2dade6922561c0be9ca8b57167e9aad95a10eaa4df14bddb4831d18007e SHA512 13f516405481b358c8a9e4a9e83fee28b6f846a000c0143c2e1dca61cf2afacea9aade3ccf3fa5cd9b7f1a4d6b965c4ec1ce002c614e9b5e52137cbf1abcd60b WHIRLPOOL 4b846faf6a6b2cd5ebd9d6aa4ade18c4dd02bab97a0872385ee27cc4b773ae72535ec027e83f2b6fd93e1c82ac554f8d3a39984cb7e3d1ae014a1228b0b07094
+AUX Makefile.libwcs.am 709 SHA256 77cfe0d3ce8293354d3133e20c29839fef702d7c7634bdce6f448d58be1f03a3 SHA512 7fc901ec0daa55e11028c457a9d8f1735ba559bcf5dcc1fb18cd6ffca121b01c17be6c938f89c599298c45be166ef8917b6ddd0bc5ce86f461c0668deb8d8918 WHIRLPOOL 460bd1d34da9db9aa96bd897c91baefb8320b5c7eb5967a2dc4ce934120013daf7ca72ff311174f21bd5501269629cdea249314810906a332fb62a93dbcce21d
+AUX configure.ac 257 SHA256 c5a87aae4699b5f3eff1451e52403386e15925d9841806ad7a15c3699b07d50d SHA512 7f8bb86cb9fa1cb57b8a53b150021e0c49929497f6a75d4d5638e4fd9592d07f9fe32ffdf204c72aae60b0ea980552b16b3940bd208982476cebb72ebf5267b4 WHIRLPOOL 2ea127bf9a881657ce72f43c798ead1b8f48e48bcead1981756fb603f2ff96707b421f4394c08da7ef0b836f7eaf732be62ee48994175b1d963114b5adcbb4cf
+AUX wcstools-3.9.4-compiler-warning.patch 947 SHA256 70e442c2a3a22629fbb6fd210437b593139f20abf126f3dd8a0151d165dc381f SHA512 28a190fa0df08d4950577ca821bd98a1633d93ba25e8ca81733dc453de24d32ad7a892e1deb1951796a5bf4398ab65e70aabbcde14c4d2b9ea7b604a53aed339 WHIRLPOOL cfcd6a687f27d7f8d956e2232dfd7da60ff57d49f0360277840f78e5e64e7a4255aaca0a6efa66a095512ddaf57c3ca713d2362c208cbd8800fc59b9611c0c76
+AUX wcstools-3.9.4-fix-tests.patch 879 SHA256 3408788b52807b1566aa8a8ea8bff93f08b62cfc4241593b1a2a792671d05724 SHA512 16d34c8c968ad4da3eee50be2202625ccc0a930aa88fcaec7e5c54d68f247557199e914e8b93b8143486cf33d7b2b1ade7157428ba723b03194055a0423febf6 WHIRLPOOL 53146f3832f255d89943e71b9423c1ad1753bf287722225ef586b53e894eac57da421eec2fff12fec1a50669d2ef1cc023351e54682fc0d958d516ec8fb31db2
+AUX wcstools-3.9.4-haspm.patch 603 SHA256 fb295db1562ab9074d97525f94d2ed9ae479cce52e3c07f4732f69a7e9eca8f1 SHA512 d06834b250ae8ee0fe630ec614c6252af9e5ad8e029745d394fb5dfc2edacb08ff5e8927d0e58bb477d36fa382937504321bf7df32cbe9b7daf4036882b3d843 WHIRLPOOL 30a723c0d59810c07898301d3ddd6480c5bfe5a65259545bfc30559b1d651f74cc9c70d3d6ea275692af514a89d1dcfa2a22432860a24e28faca031b5b63f4d9
+AUX wcstools-3.9.4-spelling.patch 8559 SHA256 968115c55f72fc0b05b0714b0c5c453315d0a2267a2f048928519900603716ea SHA512 d8065c8619ceddc879a0fe0fa55e0ddd6eff504eead917a2a7009f83151a7618c0e74cda8a58e4ef5206318806afd35792cb605dbea74e8f4a77b2a67bdcf9a0 WHIRLPOOL 5336998f92ea84a4888a7585f843001b8eec99c8e9c77c34b38450b171afc0ece5194a41978b480b14f65cf892a0c1a7c1e4fb8ef94d6183bba28e77b66013d1
+AUX wcstools.pc.in 304 SHA256 eca3c0de4606aea4f2809bee8191fe4b5009ce8e8d89079f3472656eee15fcbe SHA512 bfa61066f0a6993f0848925b40ba35fe02e444c37b5cd9b02c99c5d331566fa21165858c53ffb9a9cdc2461ad096b87c8bd53e8eb9c13bab8f4404a5fe6f2d90 WHIRLPOOL 74a17b1467d9db9b5111580395d1206a168db371140e9f8db4ec68410bf2f5a583a0ef034f358702411bcee0f51604c714bd60726052accc3c5d50532ccf4546
+DIST wcstools-3.9.5.tar.gz 8538612 SHA256 b2f9be55fdec29f0c640028a9986771bfd6ab3d2f633953e4c7cc3b410e5fe9c SHA512 aa48081b6f5dc12ed8d64eae5275c27aaa279856f588a3eb429ec0a4943dc482788cb7f84820233f0e2ee4fefeda7ab9bb85c4513a9942c48f5d97a0bde1581d WHIRLPOOL 9df23431c0a5364e736aa24bed93cb3ff76a76f3849d663460db248cad031eefeb8362877b464495c0188129d7236a67261128a2ad3a6e3fc5e9452ef549c052
+EBUILD wcstools-3.9.5.ebuild 1714 SHA256 e9f1f5e0b6588feeda54a82d953d9d069d8a6069aa66f8550ff7e2fa832f7909 SHA512 2770b2a10393d265bf30963db92730f6cbd394db39126e0613d31d5cabfcd57eb374875886b65e65f8d7edbe9c652c13fbfa6dd6e200fce7ef4cab90b9847bb8 WHIRLPOOL 270edc1aabf57bf43d3e3e0da0030b2aaad2548b1babe9052ef873bd9db9abb5821c97cf6e73299552ffed80a51ef46d33823fadf42efdb2c65cef567fbdd329
+MISC ChangeLog 4023 SHA256 8fda30fbde31a45489f06232a16a4423b82f477747d30bc703566260285ce8be SHA512 52757533f196e1a0e75a6f4593b7f26fd7852c443fad5abc71888c0d8cc9f0960f0bc5dcc7a66daa35ba543753498226820157b140f7452c113a2208398ac611 WHIRLPOOL 978e1da67e995bae4b4c2eb97664a9e5bc49f8798a767a2a7ad87f2852cb14a5b1ed92f82d6d04860dd44a68c023602bb31e234d5f34f3ef9cb006e49b0f84f0
+MISC ChangeLog-2015 6586 SHA256 7b468614ff6192e7251cac01c3606a0ec9bd05c723bf1d6fadd47a5b390a4c8c SHA512 3c17a931f5007df43bff606cab9c464cd0e166a180e7d9a6dec759ab2152f18382d73c0bb5865f0e5458e4ca1e13c029f6cd039fd2c0dbb0493aadcb9df222d1 WHIRLPOOL 51f587384f56ab3a288150ad79afed0d0c47f0477182b63e693ca569fb24cd2cc6e2986592cef7a863db394388b20866b36f763695fb79d0d517ff98950d3b46
+MISC metadata.xml 939 SHA256 05200c076ad726e34e3f4d1e5d1d62766b16b1b90feda0b7fe62bc204bae118d SHA512 64fd473a4907fda99216104b83feba7242a06a59e80c2a6ed2bd38dd2687aec74c6a5c5e64038321ccffd0755f7a0a9c9aad26ed0e8051632139a3ffad7ac954 WHIRLPOOL cd7a738f1c368fa8215d6b44a1f5b113a4919755354cb16e3a34238fc9c531806c374bd2f1a11fe5d5ac9017b2e49a81a7a365cecb65a04c1d69c0785a1d4404
diff --git a/sci-astronomy/wcstools/files/Makefile.am b/sci-astronomy/wcstools/files/Makefile.am
new file mode 100644
index 000000000000..46abf6d39ae0
--- /dev/null
+++ b/sci-astronomy/wcstools/files/Makefile.am
@@ -0,0 +1,73 @@
+SUBDIRS = libwcs
+INCLUDES = -I$(top_srcdir)/libwcs
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = wcstools.pc
+
+bin_SCRIPTS = wcstools
+
+EXTRA_DIST = wcstools COPYING Readme NEWS Programs
+
+bin_PROGRAMS = \
+ cphead delwcs delhead edhead fixpix gethead i2f imcat imhead immatch \
+ imrot imsize imstar imwcs scat sethead addpix getpix setpix sky2xy \
+ keyhead skycoor subpix xy2sky wcshead conpix gettab newfits getfits \
+ imstack imextract sumpix wcsremap getcol wcsgetdate imfill imsmooth imresize \
+ fileroot filename filext char2sp sp2char wcscrlf isnum isrange isfits \
+ isfile simpos bincat
+
+# these ones don't need libwcs
+wcscrlf_SOURCES = crlf.c
+filename_SOURCES = filename.c
+filedir_SOURCES = filedir.c
+fileroot_SOURCES = fileroot.c
+filext_SOURCES = filext.c
+isrange_SOURCES = isrange.c
+
+LDADD = $(top_builddir)/libwcs/libwcstools.la
+
+bincat_SOURCES = bincat.c
+getcol_SOURCES = getcol.c
+wcsgetdate_SOURCES = getdate.c
+gethead_SOURCES = gethead.c
+getfits_SOURCES = getfits.c
+getpix_SOURCES = getpix.c
+gettab_SOURCES = gettab.c
+imcat_SOURCES = imcat.c
+imsize_SOURCES = imsize.c
+imstar_SOURCES = imstar.c
+imwcs_SOURCES = imwcs.c
+immatch_SOURCES = immatch.c
+scat_SOURCES = scat.c
+setpix_SOURCES = setpix.c
+skycoor_SOURCES = skycoor.c
+sumpix_SOURCES = sumpix.c
+xy2sky_SOURCES = xy2sky.c
+simpos_SOURCES = simpos.c
+
+addpix_SOURCES = addpix.c
+char2sp_SOURCES = char2sp.c
+conpix_SOURCES = conpix.c
+cphead_SOURCES = cphead.c
+delwcs_SOURCES = delwcs.c
+delhead_SOURCES = delhead.c
+edhead_SOURCES = edhead.c
+fixpix_SOURCES = fixpix.c
+i2f_SOURCES = i2f.c
+imfill_SOURCES = imfill.c
+imresize_SOURCES = imresize.c
+imsmooth_SOURCES = imsmooth.c
+imhead_SOURCES = imhead.c
+imrot_SOURCES = imrot.c
+imstack_SOURCES = imstack.c
+imextract_SOURCES = imextract.c
+isfile_SOURCES = isfile.c
+isnum_SOURCES = isnum.c
+keyhead_SOURCES = keyhead.c
+newfits_SOURCES = newfits.c
+wcsremap_SOURCES = remap.c
+sethead_SOURCES = sethead.c
+sky2xy_SOURCES = sky2xy.c
+sp2char_SOURCES = sp2char.c
+subpix_SOURCES = subpix.c
+wcshead_SOURCES = wcshead.c
diff --git a/sci-astronomy/wcstools/files/Makefile.libwcs.am b/sci-astronomy/wcstools/files/Makefile.libwcs.am
new file mode 100644
index 000000000000..5905aa3d7955
--- /dev/null
+++ b/sci-astronomy/wcstools/files/Makefile.libwcs.am
@@ -0,0 +1,17 @@
+lib_LTLIBRARIES = libwcstools.la
+libwcstools_la_SOURCES = \
+ imsetwcs.c imgetwcs.c matchstar.c findstar.c daoread.c wcscon.c \
+ fitswcs.c wcsinit.c wcs.c ty2read.c webread.c tmcread.c \
+ gscread.c gsc2read.c ujcread.c uacread.c ubcread.c ucacread.c \
+ sdssread.c tabread.c binread.c ctgread.c actread.c catutil.c \
+ skybotread.c imrotate.c fitsfile.c imhfile.c \
+ hget.c hput.c imio.c dateutil.c imutil.c \
+ worldpos.c tnxpos.c zpxpos.c dsspos.c platepos.c \
+ sortstar.c platefit.c iget.c fileutil.c \
+ wcslib.c lin.c cel.c proj.c sph.c wcstrig.c distort.c poly.c
+
+wcsdir = $(includedir)/wcs
+wcs_HEADERS = \
+ wcscat.h wcslib.h wcs.h lwcs.h fitshead.h fitsfile.h imio.h
+
+noinst_HEADERS = fitsfile1.h wcscat1.h
diff --git a/sci-astronomy/wcstools/files/configure.ac b/sci-astronomy/wcstools/files/configure.ac
new file mode 100644
index 000000000000..3a46108cd304
--- /dev/null
+++ b/sci-astronomy/wcstools/files/configure.ac
@@ -0,0 +1,9 @@
+AC_INIT([wcstools], [3.9.x] , [http://tdc-www.harvard.edu/wcstools/])
+AM_INIT_AUTOMAKE([foreign])
+AC_CONFIG_HEADERS([config.h])
+
+AC_PROG_CC
+LT_INIT([disable-static])
+AC_CHECK_LIB([m], [sin])
+AC_CONFIG_FILES([libwcs/Makefile Makefile wcstools.pc])
+AC_OUTPUT
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 <debian@liska.ath.cx>
+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 <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
++#include <ctype.h>
+ #include <math.h>
+ #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 <debian@liska.ath.cx>
+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 <olebole@debian.org>
+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 <debian@liska.ath.cx>
+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 <editor path>
+-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 <plate>
+-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] <FITS or IRAF file> 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 @<listfile> 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/files/wcstools.pc.in b/sci-astronomy/wcstools/files/wcstools.pc.in
new file mode 100644
index 000000000000..c8eb8b094a0a
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: World Coordinate System Library and Tools
+Version: @PACKAGE_VERSION@
+URL: http://tdc-www.harvard.edu/wcstools/
+Libs: -L${libdir} -lwcstools
+Libs.private: -lm
+Cflags: -I${includedir}/wcs
+
diff --git a/sci-astronomy/wcstools/metadata.xml b/sci-astronomy/wcstools/metadata.xml
new file mode 100644
index 000000000000..94f4f60be350
--- /dev/null
+++ b/sci-astronomy/wcstools/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+</maintainer>
+<longdescription lang="en">
+ Astronomers often need to relate positions on an image of the sky to
+ positions on the real sky to identify catalogued objects in images,
+ tell other people where to look to find an identified object, or to
+ compute motions of planets, satellites, asteroids, or comets. WCSTools
+ is a package of programs and a library of utility subroutines for
+ setting and using the world coordinate systems (WCS) in the headers of
+ the most common astronomical image formats, FITS and IRAF .imh, to
+ relate image pixels to sky coordinates.
+ The Gentoo package is using GNU autotools to produce portable shared
+ and static libraried.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/wcstools/wcstools-3.9.5.ebuild b/sci-astronomy/wcstools/wcstools-3.9.5.ebuild
new file mode 100644
index 000000000000..641bebc84fb2
--- /dev/null
+++ b/sci-astronomy/wcstools/wcstools-3.9.5.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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"
+}