summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-astronomy/wcstools/Manifest3
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.8.3-autotools.patch142
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.8.4-implicits.patch21
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.8.4-overflows.patch11
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.2-additional_pointer_increase.patch14
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.2-ctype_copy_to_wcs.patch19
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.2-off-by-one-allocation.patch15
-rw-r--r--sci-astronomy/wcstools/wcstools-3.8.7.ebuild62
-rw-r--r--sci-astronomy/wcstools/wcstools-3.9.3.ebuild (renamed from sci-astronomy/wcstools/wcstools-3.9.2.ebuild)29
9 files changed, 64 insertions, 252 deletions
diff --git a/sci-astronomy/wcstools/Manifest b/sci-astronomy/wcstools/Manifest
index 3eaca9b180e8..e75229457362 100644
--- a/sci-astronomy/wcstools/Manifest
+++ b/sci-astronomy/wcstools/Manifest
@@ -1,2 +1 @@
-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
+DIST wcstools-3.9.3.tar.gz 8526152 SHA256 1af69a8d524d747f452667689be3272503c4c49d3dc345364dd1e9fdf898aecd SHA512 d2a5a6c13d89ff0d1e79a60fb174a90c152b045d63fd480c282a29226fff81dc80ab3ddc296ba6450e30294f86ac6ece1e0331a7b551ce865d6d8d1c6ea4643a WHIRLPOOL a41de2580592c8471f772e97959336bc5d016aabf9ae2d95f656636da98290703c1e8929298ca0e1d7a49d1e420b5048a11d4574985669ba3e4265b438265d2d
diff --git a/sci-astronomy/wcstools/files/wcstools-3.8.3-autotools.patch b/sci-astronomy/wcstools/files/wcstools-3.8.3-autotools.patch
deleted file mode 100644
index 8293174f466a..000000000000
--- a/sci-astronomy/wcstools/files/wcstools-3.8.3-autotools.patch
+++ /dev/null
@@ -1,142 +0,0 @@
---- configure.ac 1970-01-01 01:00:00.000000000 +0100
-+++ configure.ac 2011-04-10 15:54:07.000000000 +0100
-@@ -0,0 +1,11 @@
-+AC_PREREQ([2.59])
-+AC_INIT(wcstools, 3.8.x , [http://tdc-www.harvard.edu/wcstools/])
-+AM_INIT_AUTOMAKE([foreign])
-+AC_CONFIG_HEADERS([config.h])
-+
-+AC_PROG_CC
-+AC_PROG_LIBTOOL
-+AC_C_CONST
-+AC_CHECK_LIB(m, sin)
-+AC_CONFIG_FILES([libwcs/Makefile libned/Makefile Makefile wcstools.pc])
-+AC_OUTPUT
---- libned/Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ libned/Makefile.am 2011-04-10 15:53:44.000000000 +0100
-@@ -0,0 +1,5 @@
-+lib_LTLIBRARIES = libned.la
-+noinst_HEADERS = nedc.h ned_client.h
-+libned_la_SOURCES = \
-+ ned_cli.c ned_cif.c ned_err.c ned_sk.c
-+EXTRA_DIST = README
---- libwcs/Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ libwcs/Makefile.am 2011-04-10 16:00:15.000000000 +0100
-@@ -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
---- Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ Makefile.am 2011-04-10 15:55:47.000000000 +0100
-@@ -0,0 +1,81 @@
-+SUBDIRS = libwcs libned
-+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 \
-+ simpos nedpos bincat nedname
-+
-+# 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
-+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
-+
-+nedname_SOURCES = nedname.c
-+nedname_LDADD = \
-+ $(top_builddir)/libned/libned.la \
-+ $(top_builddir)/libwcs/libwcstools.la
-+nedpos_SOURCES = nedpos.c
-+nedpos_LDADD = \
-+ $(top_builddir)/libned/libned.la \
-+ $(top_builddir)/libwcs/libwcstools.la
---- wcstools.pc.in 1970-01-01 01:00:00.000000000 +0100
-+++ wcstools.pc.in 2011-04-10 15:53:44.000000000 +0100
-@@ -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/files/wcstools-3.8.4-implicits.patch b/sci-astronomy/wcstools/files/wcstools-3.8.4-implicits.patch
deleted file mode 100644
index a1329cfe355c..000000000000
--- a/sci-astronomy/wcstools/files/wcstools-3.8.4-implicits.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/libned/ned_sk.c
-+++ b/libned/ned_sk.c
-@@ -57,6 +57,7 @@
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
-+#include <arpa/inet.h>
- #include <netdb.h>
-
- #include <sys/resource.h>
---- a/gethead.c
-+++ b/gethead.c
-@@ -32,6 +32,8 @@
- #include "libwcs/fitsfile.h"
- #include "libwcs/wcscat.h"
-
-+void fk425();
-+
- #define MAXKWD 100
- #define MAXFILES 2000
- static int maxnkwd = MAXKWD;
diff --git a/sci-astronomy/wcstools/files/wcstools-3.8.4-overflows.patch b/sci-astronomy/wcstools/files/wcstools-3.8.4-overflows.patch
deleted file mode 100644
index c53fe782ca6a..000000000000
--- a/sci-astronomy/wcstools/files/wcstools-3.8.4-overflows.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/getdate.c
-+++ b/getdate.c
-@@ -444,7 +444,7 @@
- char *fitsdate, *newfdate, *stdate;
- char temp[64];
- char fyear[16];
-- char ts0[8];
-+ char ts0[9];
- char *tchar;
- int its, its1;
- time_t lts;
diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.2-additional_pointer_increase.patch b/sci-astronomy/wcstools/files/wcstools-3.9.2-additional_pointer_increase.patch
new file mode 100644
index 000000000000..7d61f8159b26
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.2-additional_pointer_increase.patch
@@ -0,0 +1,14 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Fix duplicate pointer increase
+ Otherwise, xborder1 may be zero, causing an illegal memory access later.
+--- a/libwcs/findstar.c
++++ b/libwcs/findstar.c
+@@ -212,7 +212,7 @@
+ tx1 = trimsec + 1;
+ tx2 = strchr (trimsec, ':');
+ *tx2 = (char) 0;
+- xborder1 = atoi (tx1+1);
++ xborder1 = atoi (tx1);
+ tx2 = tx2 + 1;
+ tx3 = strchr (tx2, ',');
+ *tx3 = (char) 0;
diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.2-ctype_copy_to_wcs.patch b/sci-astronomy/wcstools/files/wcstools-3.9.2-ctype_copy_to_wcs.patch
new file mode 100644
index 000000000000..63a47300e923
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.2-ctype_copy_to_wcs.patch
@@ -0,0 +1,19 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Fix an off-by-one problem with strcpy
+ Sometimes a string is copied with the length of 8 into an char array with a
+ length of 8, as found in wcs.c, line 392: wcs->ptype is char[8], and ctype1
+ may be "DEC--TAN". This will cause an overwriting of the next entry, or if
+ this is protected (as in Debian) it will cause a crash.
+--- a/libwcs/wcs.c
++++ b/libwcs/wcs.c
+@@ -388,8 +388,8 @@
+ if (!strncmp (ctype1, "LONG",4))
+ strncpy (ctype1, "XLON",4);
+
+- strcpy (wcs->ctype[0], ctype1);
+- strcpy (wcs->ptype, ctype1);
++ strncpy (wcs->ctype[0], ctype1, 16);
++ strncpy (wcs->ptype, ctype1, 8);
+
+ /* Linear coordinates */
+ if (!strncmp (ctype1,"LINEAR",6)) {
diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.2-off-by-one-allocation.patch b/sci-astronomy/wcstools/files/wcstools-3.9.2-off-by-one-allocation.patch
new file mode 100644
index 000000000000..4a9ee8041c86
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.2-off-by-one-allocation.patch
@@ -0,0 +1,15 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Fix an off-by-one memory allocation problem
+ in fitsfile.c, line 331, there is no space for a final '\0' byte
+ allocated. However, there is one expected in ksearch() (hget.c, line 1203).
+--- a/libwcs/fitsfile.c
++++ b/libwcs/fitsfile.c
+@@ -328,7 +328,7 @@
+ nbprim = nrec * FITSBLOCK;
+ headend = ksearch (header,"END");
+ lprim = headend + 80 - header;
+- pheader = (char *) calloc ((unsigned int) nbprim, 1);
++ pheader = (char *) calloc ((unsigned int) nbprim+1, 1);
+ for (i = 0; i < lprim; i++)
+ pheader[i] = header[i];
+ for (i = lprim; i < nbprim; i++)
diff --git a/sci-astronomy/wcstools/wcstools-3.8.7.ebuild b/sci-astronomy/wcstools/wcstools-3.8.7.ebuild
deleted file mode 100644
index 1ad8561fba4d..000000000000
--- a/sci-astronomy/wcstools/wcstools-3.8.7.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit autotools eutils 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="static-libs"
-
-DOCS=( Readme Programs NEWS libned/NED_client )
-
-src_prepare() {
- epatch \
- "${FILESDIR}"/${PN}-3.8.3-autotools.patch \
- "${FILESDIR}"/${PN}-3.8.4-implicits.patch
-
- # 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_configure() {
- econf $(use_enable static-libs static)
-}
-
-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
- use static-libs || rm -rf "${ED}"/usr/$(get_libdir)/*.la
- doman man/man1/*
- newdoc libwcs/Readme Readme.libwcs
- newdoc libwcs/NEWS NEWS.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"
-}
diff --git a/sci-astronomy/wcstools/wcstools-3.9.2.ebuild b/sci-astronomy/wcstools/wcstools-3.9.3.ebuild
index b228fed5c0b4..8d483f01c558 100644
--- a/sci-astronomy/wcstools/wcstools-3.9.2.ebuild
+++ b/sci-astronomy/wcstools/wcstools-3.9.3.ebuild
@@ -2,12 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
-AUTOTOOLS_AUTORECONF=1
-AUTOTOOLS_IN_SOURCE_BUILD=1
-
-inherit eutils autotools-utils multilib
+inherit eutils autotools
DESCRIPTION="World Coordinate System library for astronomical FITS images"
HOMEPAGE="http://tdc-www.harvard.edu/software/wcstools"
@@ -21,16 +18,20 @@ 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
+ "${FILESDIR}"/${PN}-3.9.2-compiler_warnings.patch
+ "${FILESDIR}"/${PN}-3.9.2-mayhem.patch
+ "${FILESDIR}"/${PN}-3.9.2-RASortStars.patch
+ "${FILESDIR}"/${PN}-3.9.2-spelling.patch
+ "${FILESDIR}"/${PN}-3.9.2-sprintf.patch
+ "${FILESDIR}"/${PN}-3.9.2-use_abort.patch
+ "${FILESDIR}"/${PN}-3.9.2-wcsinit_crash.patch
+ "${FILESDIR}"/${PN}-3.9.2-additional_pointer_increase.patch
+ "${FILESDIR}"/${PN}-3.9.2-ctype_copy_to_wcs.patch
+ "${FILESDIR}"/${PN}-3.9.2-off-by-one-allocation.patch
)
src_prepare() {
+ default
einfo "Copying gentoo autotools files"
local f
for f in "${FILESDIR}"/{configure.ac,wcstools.pc.in,Makefile.am}; do
@@ -44,7 +45,7 @@ src_prepare() {
-e 's/remap/wcsremap/' \
-e "s/3.... Programs/${PV} Programs/" \
wcstools || die
- autotools-utils_src_prepare
+ eautoreconf
}
src_test() {
@@ -57,7 +58,7 @@ src_test() {
}
src_install() {
- autotools-utils_src_install
+ default
doman man/man1/*
newdoc libwcs/NEWS NEWS.libwcs
newdoc libwcs/Readme Readme.libwcs