summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2016-02-22 23:14:00 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2016-02-22 23:14:00 +0000
commit6e199350e865ee5cbb5aa6d7f3de3f7735eba0e0 (patch)
tree7d9f5867ac9b51107e32eb674489fc2871ca2d3f /sci-astronomy
parentapp-misc/vifm: Bump to version 0.8.1a (diff)
downloadgentoo-6e199350e865ee5cbb5aa6d7f3de3f7735eba0e0.tar.gz
gentoo-6e199350e865ee5cbb5aa6d7f3de3f7735eba0e0.tar.bz2
gentoo-6e199350e865ee5cbb5aa6d7f3de3f7735eba0e0.zip
sci-astronomy/wcstools: version bump
Package-Manager: portage-2.2.27
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/wcstools/Manifest1
-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.2-RASortStars.patch14
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.2-compiler_warnings.patch13
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.2-mayhem.patch69
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.2-spelling.patch69
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.2-sprintf.patch36
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.2-use_abort.patch14
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.2-wcsinit_crash.patch20
-rw-r--r--sci-astronomy/wcstools/files/wcstools.pc.in13
-rw-r--r--sci-astronomy/wcstools/wcstools-3.9.2.ebuild73
13 files changed, 421 insertions, 0 deletions
diff --git a/sci-astronomy/wcstools/Manifest b/sci-astronomy/wcstools/Manifest
index f2f342485a1c..3eaca9b180e8 100644
--- a/sci-astronomy/wcstools/Manifest
+++ b/sci-astronomy/wcstools/Manifest
@@ -1 +1,2 @@
DIST wcstools-3.8.7.tar.gz 961222 SHA256 8e4140fc6d691a0555d5aaa41dbe0253c2edc5775f4a8eebc9667933091b1c28 SHA512 f076c31dd64dad0bda77ec5ae2483035617b69378cfdcf286084c83677c7cb35788769de62f17459e65198107ce534fdee3e38403dd6a44f9881a7631f107187 WHIRLPOOL ca73eeba30c378a3a25621a9371d24683dd3933821cbaf4d5a445e72c63d3ac60af93ca69933f9ec9747b404d67658fdfdcf99f0713357acaa223ffd29c03204
+DIST wcstools-3.9.2.tar.gz 8523655 SHA256 481fe357cf755426fb8e25f4f890e827cce5de657a4e5044d4e31ce27bef1c8b SHA512 b9030cdcaf3f87ab761362a2b8c4a76557694ec4e683371a05e8d58823179d320a2859e883c4ca2c3d65d5adb70ad1ac859587f4c210cd315ced26288fbe107a WHIRLPOOL 257e54e5c545a0584c9ff52f2e3298db73f7d1b4e8d71e0621db18aed8f138dbb0093773883351cbb56ea8a35998ec3b0a2b8e7fc5334dc8d2ebb1c3c4410af4
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.2-RASortStars.patch b/sci-astronomy/wcstools/files/wcstools-3.9.2-RASortStars.patch
new file mode 100644
index 000000000000..27a912f5a902
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.2-RASortStars.patch
@@ -0,0 +1,14 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Fix uninitialized value for haspm in RASortStars()
+ This fixes a crash with 'imstar -s'.
+--- a/libwcs/sortstar.c
++++ b/libwcs/sortstar.c
+@@ -417,6 +417,8 @@
+ 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.2-compiler_warnings.patch b/sci-astronomy/wcstools/files/wcstools-3.9.2-compiler_warnings.patch
new file mode 100644
index 000000000000..57bb8cb99324
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.2-compiler_warnings.patch
@@ -0,0 +1,13 @@
+Author: Ole Streicher <debian@liska.ath.cx>
+Description: Fix some compiler warnings.
+--- a/imcat.c
++++ b/imcat.c
+@@ -1778,7 +1778,7 @@
+ if (refcat == UCAC2 || refcat == UCAC3 || refcat == UCAC4) {
+ nim = gc[i] / 1000;
+ nct = gc[i] % 1000;
+- sprintf (temp, " ni nc", nim, nct);
++ sprintf (temp, " ni%i nc%i", nim, nct);
+ strcat (headline, temp);
+ }
+ else if (gcset)
diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.2-mayhem.patch b/sci-astronomy/wcstools/files/wcstools-3.9.2-mayhem.patch
new file mode 100644
index 000000000000..694c0720ab93
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.2-mayhem.patch
@@ -0,0 +1,69 @@
+Author: Ole Streicher <debian@liska.ath.cx>
+Description: Fix several bugs that appear in during the mayhem tests.
+Bug: http://bugs.debian.org/715682
+Bug: http://bugs.debian.org/715755
+Bug: http://bugs.debian.org/715905
+Bug: http://bugs.debian.org/715956
+Bug: http://bugs.debian.org/715957
+--- a/getfits.c
++++ b/getfits.c
+@@ -108,6 +108,7 @@
+ usage ("Right ascension given but no declination");
+ else {
+ strcpy (rastr, *av);
++ ac--;
+ strcpy (decstr, *++av);
+ ra0 = str2ra (rastr);
+ dec0 = str2dec (decstr);
+--- a/getpix.c
++++ b/getpix.c
+@@ -83,6 +83,7 @@
+ char *crange; /* Column range string */
+ char *rstr;
+ char *dstr = NULL;
++ char rastr[32], decstr[32];
+ char *cstr;
+ int systemp;
+ int i;
+--- a/bincat.c
++++ b/bincat.c
+@@ -156,7 +156,7 @@
+ if (ac < 3)
+ usage((char)0, "3 arguments needed for center coordinate");
+ else {
+- strcpy (rastr, *++av);
++ strcpy (rastr, *av);
+ ac--;
+ strcpy (decstr, *++av);
+ setcenter (rastr, decstr);
+--- a/cphead.c
++++ b/cphead.c
+@@ -137,7 +137,7 @@
+ break;
+
+ case 'w': /* Copy entire WCS */
+- nkwd1 = 87;
++ nkwd1 = 236;
+ if (nkwd + nkwd1 > maxnkwd) {
+ maxnkwd = nkwd + nkwd1 + 32;
+ kwdnew = (char **) calloc (maxnkwd, sizeof (void *));
+@@ -148,7 +148,7 @@
+ free (kwd);
+ kwd = kwdnew;
+ }
+- for (ikwd = nkwd; i < nkwd+nkwd1; i++) {
++ for (ikwd = nkwd; ikwd < nkwd+nkwd1+32; ikwd++) {
+ kwd[ikwd] = (char *) calloc (32, 1);
+ }
+ strcpy (kwd[nkwd], "RA");
+--- a/filext.c
++++ b/filext.c
+@@ -80,7 +80,7 @@
+ ext = ext + 1;
+ }
+ }
+- printf ("%s\n", ext);
++ printf ("%s\n", (ext)?ext:"");
+ }
+
+ return (0);
diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.2-spelling.patch b/sci-astronomy/wcstools/files/wcstools-3.9.2-spelling.patch
new file mode 100644
index 000000000000..7c666c1277b3
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.2-spelling.patch
@@ -0,0 +1,69 @@
+Author: Ole Streicher <debian@liska.ath.cx>
+Description: Spellfixes to make lintian happy
+--- a/libwcs/fitsfile.c
++++ b/libwcs/fitsfile.c
+@@ -1583,7 +1583,7 @@
+ 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 @@
+ 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 @@
+ 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 @@
+ 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 @@
+ 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);
+ }
+
+--- a/libwcs/imhfile.c
++++ b/libwcs/imhfile.c
+@@ -896,7 +896,7 @@
+ 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 @@
+ 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/sci-astronomy/wcstools/files/wcstools-3.9.2-sprintf.patch b/sci-astronomy/wcstools/files/wcstools-3.9.2-sprintf.patch
new file mode 100644
index 000000000000..4ec5993cb5f5
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.2-sprintf.patch
@@ -0,0 +1,36 @@
+Author: Ole Streicher <olebole@debian.net>
+Description: Fix overlappong buffers in sprintf
+ In sprintf, overlapping buffers lead to undefined behaviour.
+ This causes different results on Debian and Ubuntu.
+--- a/imstar.c
++++ b/imstar.c
+@@ -818,7 +818,7 @@
+ sprintf (headline, "%7.2f %7.2f %6.2f %d",
+ sx[i],sy[i],smag[i],sp[i]);
+ if (iswcs (wcs))
+- sprintf (headline, "%s %s %s", headline, rastr, decstr);
++ sprintf (headline + strlen(headline), " %s %s", rastr, decstr);
+ if (wfile)
+ fprintf (fd, "%s\n", headline);
+ else
+@@ -827,14 +827,14 @@
+ else {
+ sprintf (headline, "%3d %s %s %6.2f", i+1,rastr,decstr,smag[i]);
+ if (wcs->nxpix < 100.0 && wcs->nypix > 100.0)
+- sprintf (headline, "%s %5.2f %5.2f %d",
+- headline, sx[i],sy[i], sp[i]);
++ sprintf (headline + strlen(headline), " %5.2f %5.2f %d",
++ sx[i],sy[i], sp[i]);
+ else if (wcs->nxpix < 1000.0 && wcs->nypix < 1000.0)
+- sprintf (headline, "%s %6.2f %6.2f %d",
+- headline, sx[i],sy[i], sp[i]);
++ sprintf (headline + strlen(headline), " %6.2f %6.2f %d",
++ sx[i],sy[i], sp[i]);
+ else
+- sprintf (headline, "%s %7.2f %7.2f %d",
+- headline, sx[i],sy[i], sp[i]);
++ sprintf (headline + strlen(headline), " %7.2f %7.2f %d",
++ sx[i],sy[i], sp[i]);
+ if (wfile)
+ fprintf (fd, "%s\n", headline);
+ else
diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.2-use_abort.patch b/sci-astronomy/wcstools/files/wcstools-3.9.2-use_abort.patch
new file mode 100644
index 000000000000..4ebc20609b6f
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.2-use_abort.patch
@@ -0,0 +1,14 @@
+Author: Ole Streicher <debian@liska.ath.cx>
+Description: If a unrecoverable error occurred, abort() instead of exit()
+ to allow the user for tracing the problem.
+--- a/libwcs/poly.c
++++ b/libwcs/poly.c
+@@ -43,7 +43,7 @@
+ void qerror(char *msg1, char *msg2)
+ {
+ fprintf(stderr, "\n> %s%s\n\n",msg1,msg2);
+- exit(-1);
++ abort();
+ }
+
+
diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.2-wcsinit_crash.patch b/sci-astronomy/wcstools/files/wcstools-3.9.2-wcsinit_crash.patch
new file mode 100644
index 000000000000..f8de3da5ad01
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.2-wcsinit_crash.patch
@@ -0,0 +1,20 @@
+Author: Ole Streicher <olebole@debian.net>
+Description: Increase c*type and ptype field string lengths
+ This is needed to allow C1TYPE='RA---TAN-SIP'
+Bug: https://bugs.launchpad.net/ubuntu/+source/saods9/+bug/1458333
+--- a/libwcs/wcsinit.c
++++ b/libwcs/wcsinit.c
+@@ -399,11 +399,11 @@
+ }
+
+ /* World coordinate system reference coordinate information */
+- if (hgetsc (hstring, "CTYPE1", &mchar, 16, ctype1)) {
++ if (hgetsc (hstring, "CTYPE1", &mchar, 9, ctype1)) {
+
+ /* Read second coordinate type */
+ strcpy (ctype2, ctype1);
+- if (!hgetsc (hstring, "CTYPE2", &mchar, 16, ctype2))
++ if (!hgetsc (hstring, "CTYPE2", &mchar, 9, ctype2))
+ twod = 0;
+ else
+ twod = 1;
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/wcstools-3.9.2.ebuild b/sci-astronomy/wcstools/wcstools-3.9.2.ebuild
new file mode 100644
index 000000000000..b228fed5c0b4
--- /dev/null
+++ b/sci-astronomy/wcstools/wcstools-3.9.2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit eutils autotools-utils multilib
+
+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}"/wcstools-3.9.2-compiler_warnings.patch
+ "${FILESDIR}"/wcstools-3.9.2-mayhem.patch
+ "${FILESDIR}"/wcstools-3.9.2-RASortStars.patch
+ "${FILESDIR}"/wcstools-3.9.2-spelling.patch
+ "${FILESDIR}"/wcstools-3.9.2-sprintf.patch
+ "${FILESDIR}"/wcstools-3.9.2-use_abort.patch
+ "${FILESDIR}"/wcstools-3.9.2-wcsinit_crash.patch
+)
+
+src_prepare() {
+ 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
+ autotools-utils_src_prepare
+}
+
+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() {
+ autotools-utils_src_install
+ 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"
+}