Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Sergio Pascual
ec4dfc7d80 Initial import 2025-11-09 12:33:16 +01:00
6 changed files with 116 additions and 21 deletions

View file

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/sextractor-2.28.2.tar.gz

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: sextractor
# $Id$
NAME := sextractor
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -0,0 +1,65 @@
diff -ur sextractor-2.19.5/src/catout.c sextractor-2.19.5.prep/src/catout.c
--- sextractor-2.19.5/src/catout.c 2013-09-12 14:35:37.000000000 +0200
+++ sextractor-2.19.5.prep/src/catout.c 2014-03-26 18:25:06.390874672 +0100
@@ -999,7 +999,7 @@
break;
case ASCII_SKYCAT:
- fprintf(ascfile, skycattail);
+ fprintf(ascfile, "%s", skycattail);
if (!prefs.pipe_flag)
fclose(ascfile);
break;
diff -ur sextractor-2.19.5/src/xml.c sextractor-2.19.5.prep/src/xml.c
--- sextractor-2.19.5/src/xml.c 2013-04-27 15:22:23.000000000 +0200
+++ sextractor-2.19.5.prep/src/xml.c 2014-03-26 18:29:36.122059320 +0100
@@ -696,7 +696,7 @@
name, ucd);
break;
case P_STRING:
- sprintf(value, (char *)key[i].ptr);
+ sprintf(value, "%s", (char *)key[i].ptr);
fprintf(file, " <PARAM name=\"%s\" datatype=\"char\" arraysize=\"*\""
" ucd=\"%s\" value=\"%s\"/>\n",
name, ucd, *value? value: " ");
@@ -705,13 +705,13 @@
n = *(key[i].nlistptr);
if (n)
{
- sprintf(value, ((char **)key[i].ptr)[0]);
+ sprintf(value, "%s", ((char **)key[i].ptr)[0]);
fprintf(file, " <PARAM name=\"%s\" datatype=\"char\""
" arraysize=\"*\" ucd=\"%s\" value=\"%s",
name, ucd, *value? value: " ");
for (j=1; j<n; j++)
{
- sprintf(value, ((char **)key[i].ptr)[j]);
+ sprintf(value, "%s", ((char **)key[i].ptr)[j]);
fprintf(file, ",%s", *value? value: " ");
}
fprintf(file, "\"/>\n");
@@ -722,7 +722,7 @@
name, ucd);
break;
case P_KEY:
- sprintf(value, key[i].keylist[*((int *)key[i].ptr)]);
+ sprintf(value, "%s", key[i].keylist[*((int *)key[i].ptr)]);
fprintf(file, " <PARAM name=\"%s\" datatype=\"char\" arraysize=\"*\""
" ucd=\"%s\" value=\"%s\"/>\n",
name, ucd, value);
@@ -731,13 +731,13 @@
n = *(key[i].nlistptr);
if (n)
{
- sprintf(value, key[i].keylist[((int *)key[i].ptr)[0]]);
+ sprintf(value, "%s", key[i].keylist[((int *)key[i].ptr)[0]]);
fprintf(file, " <PARAM name=\"%s\" datatype=\"char\""
" arraysize=\"*\" ucd=\"%s\" value=\"%s",
name, ucd, value);
for (j=1; j<n; j++)
{
- sprintf(value, key[i].keylist[((int *)key[i].ptr)[j]]);
+ sprintf(value, "%s", key[i].keylist[((int *)key[i].ptr)[j]]);
fprintf(file, ",%s", value);
}
fprintf(file, "\"/>\n");

49
sextractor.spec Normal file
View file

@ -0,0 +1,49 @@
Name: sextractor
Version: 2.28.2
Release: %autorelease
Summary: Extract catalogs of sources from astronomical images
# Automatically converted from old format: GPLv3+ - review is highly recommended.
License: GPL-3.0-or-later
URL: http://astromatic.iap.fr/software/%{name}
Source0: https://github.com/astromatic/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: sextractor-format-sec.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: automake autoconf libtool
BuildRequires: fftw-devel >= 3.1
BuildRequires: openblas-devel
BuildRequires: cfitsio-devel
%description
SExtractor is a program that builds a catalogue of objects from an
astronomical image. Although it is particularly oriented towards
reduction of large scale galaxy-survey data, it performs rather
well on moderately crowded star fields.
%prep
%setup -q
%patch -P0 -p1
sh ./autogen.sh
%build
%configure --enable-openblas
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}%{_datadir}/%{name}
install -m 644 -p config/*.conv %{buildroot}%{_datadir}/%{name}
install -m 644 -p config/default.nnw %{buildroot}%{_datadir}/%{name}
%files
%doc AUTHORS BUGS COPYRIGHT HISTORY README.md THANKS config/default.sex config/default.param config/README
%license LICENSE
%{_bindir}/*
%{_mandir}/man1/*
%{_mandir}/manx/*
%{_datadir}/%{name}/
%changelog
%autochangelog

View file

@ -0,0 +1 @@
SHA512 (sextractor-2.28.2.tar.gz) = f54b9e69944e582c68769c0d01534fc437f03fa5fc9dcb59bc680baed429983ebaa4c2422570b0f424b25c6c44cdf54a6587819ab2bc524aa33ed5c9f2595e62