sci-astronomy/wcstools: version bump to 3.9.7, limit C version to C17

Too many K&R function definitions for normal fix.
New version includes new tool, fixhead and removes some non-installable
headers.

Closes: https://bugs.gentoo.org/943830
Closes: https://bugs.gentoo.org/939082
Closes: https://bugs.gentoo.org/924305
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40851
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
NHOrus
2025-03-02 21:23:31 +04:00
committed by Sam James
parent 7a00645049
commit 716b5d9712
4 changed files with 167 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST wcstools-3.9.5.tar.gz 8538612 BLAKE2B 79e1c544408595a3147c7a6c4e86ca18f8a1851b8e036fa87e34d1979cbb04e9fe13db1a3ec8b18689a00d726d85131cd2c90add5e2685f80a8dcb5b20981065 SHA512 aa48081b6f5dc12ed8d64eae5275c27aaa279856f588a3eb429ec0a4943dc482788cb7f84820233f0e2ee4fefeda7ab9bb85c4513a9942c48f5d97a0bde1581d
DIST wcstools-3.9.7.tar.gz 8652114 BLAKE2B 8e61d141bd4df5b72e1bf362e9b1a3ca1533888559ccd955929204655c3f0e8f383e98ec329d4d3b457e326ba0fed8dc2f602bd0e5576eab2a8e4e9b5b46612b SHA512 b731d21b34d7f914465083ba0545516f8e8bbca3b3a8b1c987264b66225a813af2a6acd78ebc67c6869f774e40d6845f0eaddfe93f1b20d25335df22da180450

View File

@@ -0,0 +1,74 @@
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 fixhead
# 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
fixhead_SOURCES = fixhead.c

View File

@@ -0,0 +1,16 @@
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

View File

@@ -0,0 +1,76 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools flag-o-matic
DESCRIPTION="World Coordinate System library for astronomical FITS images"
HOMEPAGE="http://tdc-www.harvard.edu/software/wcstools/"
SRC_URI="http://tdc-www.harvard.edu/software/wcstools/${P}.tar.gz
http://tdc-www.harvard.edu/software/wcstools/Old/${P}.tar.gz"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
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}; do
cp -v ${f} "${S}"/ || die
done
cp -v "${FILESDIR}"/Makefile.${PV}.am "${S}"/Makefile.am || die
cp -v "${FILESDIR}"/Makefile.libwcs.${PV}.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_configure() {
# bug #943830
append-cflags -std=gnu17
default
}
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
find "${ED}" -name '*.la' -delete || die
}
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"
}