Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-astronomy/sextractor/, sci-astronomy/sextractor/files/
Date: Sun, 04 Oct 2020 13:23:48
Message-Id: 1601817679.f168985a2c3d92aa131dea9393a9e3f29dcabdc1.soap@gentoo
1 commit: f168985a2c3d92aa131dea9393a9e3f29dcabdc1
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 4 13:21:19 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 4 13:21:19 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f168985a
7
8 sci-astronomy/sextractor: Fix -fno-common
9
10 Closes: https://bugs.gentoo.org/707468
11 Package-Manager: Portage-3.0.8, Repoman-3.0.1
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 .../files/sextractor-2.19.5-fno-common.patch | 277 +++++++++++++++++++++
15 .../sextractor/sextractor-2.19.5-r1.ebuild | 64 ++---
16 2 files changed, 311 insertions(+), 30 deletions(-)
17
18 diff --git a/sci-astronomy/sextractor/files/sextractor-2.19.5-fno-common.patch b/sci-astronomy/sextractor/files/sextractor-2.19.5-fno-common.patch
19 new file mode 100644
20 index 00000000000..1150fe366f5
21 --- /dev/null
22 +++ b/sci-astronomy/sextractor/files/sextractor-2.19.5-fno-common.patch
23 @@ -0,0 +1,277 @@
24 +--- a/src/clean.c
25 ++++ b/src/clean.c
26 +@@ -44,6 +44,7 @@
27 +
28 + /*------------------------------- variables ---------------------------------*/
29 +
30 ++objliststruct *cleanobjlist;
31 + static LONG *cleanvictim;
32 +
33 +
34 +--- a/src/clean.h
35 ++++ b/src/clean.h
36 +@@ -33,7 +33,7 @@
37 +
38 + /*------------------------------- variables ---------------------------------*/
39 +
40 +-objliststruct *cleanobjlist; /* laconic, isn't it? */
41 ++extern objliststruct *cleanobjlist; /* laconic, isn't it? */
42 +
43 + /*------------------------------- functions ---------------------------------*/
44 +
45 +--- a/src/extract.c
46 ++++ b/src/extract.c
47 +@@ -40,6 +40,8 @@
48 + #include "extract.h"
49 + #include "plist.h"
50 +
51 ++PIXTYPE *dumscan;
52 ++
53 + /*------------------------- Static buffers for lutz() -----------------------*/
54 +
55 + static infostruct *info, *store;
56 +--- a/src/extract.h
57 ++++ b/src/extract.h
58 +@@ -37,7 +37,7 @@
59 + status; /* Extraction status */
60 +
61 + /*--------------------------------- variables -------------------------------*/
62 +-PIXTYPE *dumscan;
63 ++extern PIXTYPE *dumscan;
64 +
65 + /*------------------------------- structures --------------------------------*/
66 + /* Temporary object parameters during extraction */
67 +--- a/src/filter.c
68 ++++ b/src/filter.c
69 +@@ -44,6 +44,8 @@
70 + #include "filter.h"
71 + #include "image.h"
72 +
73 ++filterstruct *thefilter;
74 ++
75 + /******************************** convolve ***********************************/
76 + /*
77 + Convolve a scan line with an array.
78 +--- a/src/filter.h
79 ++++ b/src/filter.h
80 +@@ -43,7 +43,7 @@
81 + struct structbpann *bpann;
82 + } filterstruct;
83 +
84 +-filterstruct *thefilter;
85 ++extern filterstruct *thefilter;
86 +
87 + /*------------------------------- functions ---------------------------------*/
88 + void convolve(picstruct *, PIXTYPE *, int y),
89 +--- a/src/fits/fitscat.c
90 ++++ b/src/fits/fitscat.c
91 +@@ -42,6 +42,10 @@
92 + #include "fitscat_defs.h"
93 + #include "fitscat.h"
94 +
95 ++float ctg[37], stg[37];
96 ++char gstr[MAXCHAR];
97 ++int bswapflag;
98 ++
99 + /****** about_cat **************************************************************
100 + PROTO int about_cat(catstruct *cat, FILE *stream)
101 + PURPOSE Print some info about a catalog.
102 +--- a/src/fits/fitscat_defs.h
103 ++++ b/src/fits/fitscat_defs.h
104 +@@ -86,7 +86,7 @@
105 + typedef int LONG; /* for DEC-Alpha... */
106 +
107 + /*----------------------------- Internal constants --------------------------*/
108 +-char gstr[MAXCHAR];
109 ++extern char gstr[MAXCHAR];
110 +
111 + /*----------------------------- External constants --------------------------*/
112 +
113 +--- a/src/fits/fitscat.h
114 ++++ b/src/fits/fitscat.h
115 +@@ -333,6 +333,6 @@
116 + warning(char *msg1, char *msg2);
117 +
118 +
119 +-int bswapflag;
120 ++extern int bswapflag;
121 +
122 + #endif
123 +--- a/src/globals.h
124 ++++ b/src/globals.h
125 +@@ -30,13 +30,13 @@
126 +
127 + /*----------------------- miscellaneous variables ---------------------------*/
128 +
129 +-sexcatstruct thecat;
130 +-picstruct thefield1,thefield2, thewfield1,thewfield2;
131 +-objstruct flagobj;
132 +-obj2struct flagobj2;
133 ++extern sexcatstruct thecat;
134 ++extern picstruct thefield1,thefield2, thewfield1,thewfield2;
135 ++extern objstruct flagobj;
136 ++extern obj2struct flagobj2;
137 + extern obj2struct outobj2;
138 +-float ctg[37], stg[37];
139 +-char gstr[MAXCHAR];
140 ++extern float ctg[37], stg[37];
141 ++extern char gstr[MAXCHAR];
142 +
143 + /*------------------------------- functions ---------------------------------*/
144 + extern void alloccatparams(void),
145 +--- a/src/plist.c
146 ++++ b/src/plist.c
147 +@@ -38,6 +38,11 @@
148 + #include "prefs.h"
149 + #include "plist.h"
150 +
151 ++int plistexist_value, plistexist_dvalue, plistexist_cdvalue,
152 ++ plistexist_flag, plistexist_wflag, plistexist_dthresh, plistexist_var,
153 ++ plistoff_value, plistoff_dvalue, plistoff_cdvalue,
154 ++ plistoff_flag[MAXFLAG], plistoff_wflag, plistoff_dthresh, plistoff_var,
155 ++ plistsize;
156 +
157 + /******************************** createblank *******************************
158 + PROTO int createblank(int no, objliststruct *objlist)
159 +--- a/src/plist.h
160 ++++ b/src/plist.h
161 +@@ -47,7 +47,7 @@
162 +
163 + /*-------------------------------- globals ----------------------------------*/
164 +
165 +-int plistexist_value, plistexist_dvalue, plistexist_cdvalue,
166 ++extern int plistexist_value, plistexist_dvalue, plistexist_cdvalue,
167 + plistexist_flag, plistexist_wflag, plistexist_dthresh, plistexist_var,
168 + plistoff_value, plistoff_dvalue, plistoff_cdvalue,
169 + plistoff_flag[MAXFLAG], plistoff_wflag, plistoff_dthresh, plistoff_var,
170 +--- a/src/preflist.h
171 ++++ b/src/preflist.h
172 +@@ -39,7 +39,7 @@
173 + #endif
174 +
175 + /*-------------------------------- initialization ---------------------------*/
176 +- int idummy;
177 ++extern int idummy;
178 +
179 + pkeystruct key[] =
180 + {
181 +--- a/src/prefs.c
182 ++++ b/src/prefs.c
183 +@@ -56,6 +56,9 @@
184 + #include "preflist.h"
185 + #include "fits/fitscat.h"
186 +
187 ++prefstruct prefs;
188 ++double ddummy;
189 ++int idummy;
190 +
191 + /********************************* dumpprefs ********************************/
192 + /*
193 +--- a/src/prefs.h
194 ++++ b/src/prefs.h
195 +@@ -249,7 +249,7 @@
196 + int nthreads; /* Number of active threads */
197 + } prefstruct;
198 +
199 +- prefstruct prefs;
200 ++extern prefstruct prefs;
201 +
202 + /*-------------------------------- protos -----------------------------------*/
203 + extern int cistrcmp(char *cs, char *ct, int mode);
204 +--- a/src/psf.c
205 ++++ b/src/psf.c
206 +@@ -47,6 +47,9 @@
207 +
208 + /*------------------------------- variables ---------------------------------*/
209 +
210 ++psfstruct *psf,*thedpsf,*thepsf;
211 ++psfitstruct *thepsfit,*thedpsfit;
212 ++PIXTYPE *checkmask;
213 +
214 + extern keystruct objkey[];
215 + extern objstruct outobj;
216 +--- a/src/psf.h
217 ++++ b/src/psf.h
218 +@@ -102,9 +102,9 @@
219 + } psfitstruct;
220 +
221 + /*----------------------------- Global variables ----------------------------*/
222 +-psfstruct *psf,*thedpsf,*thepsf;
223 +-psfitstruct *thepsfit,*thedpsfit;
224 +-PIXTYPE *checkmask;
225 ++extern psfstruct *psf,*thedpsf,*thepsf;
226 ++extern psfitstruct *thepsfit,*thedpsfit;
227 ++extern PIXTYPE *checkmask;
228 +
229 + /*-------------------------------- functions --------------------------------*/
230 + extern void compute_pos(int *pnpsf,int *pconvflag,int *pnpsfflag,
231 +--- a/src/retina.c
232 ++++ b/src/retina.c
233 +@@ -42,6 +42,7 @@
234 + #include "image.h"
235 + #include "retina.h"
236 +
237 ++retistruct *theretina;
238 +
239 + /******************************** readretina *********************************/
240 + /*
241 +--- a/src/retina.h
242 ++++ b/src/retina.h
243 +@@ -38,7 +38,7 @@
244 + struct structbpann *bpann; /* The neural network */
245 + } retistruct;
246 +
247 +-retistruct *theretina;
248 ++extern retistruct *theretina;
249 +
250 + /*------------------------------- functions ---------------------------------*/
251 +
252 +--- a/src/sexhead1.h
253 ++++ b/src/sexhead1.h
254 +@@ -26,8 +26,8 @@
255 + *
256 + *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
257 +
258 +-int idummy;
259 +-double ddummy;
260 ++extern int idummy;
261 ++extern double ddummy;
262 +
263 + keystruct headkey1[] = {
264 + {"EPOCH ", "",
265 +--- a/src/som.c
266 ++++ b/src/som.c
267 +@@ -41,6 +41,8 @@
268 + #include "prefs.h"
269 + #include "som.h"
270 +
271 ++somstruct *thesom;
272 ++
273 + /********************************* som_phot **********************************/
274 + /*
275 + Perform SOM-fitting on a detected source: returns node number of the
276 +--- a/src/som.h
277 ++++ b/src/som.h
278 +@@ -70,7 +70,7 @@
279 + float stderror; /* Global reduced error */
280 + } somstruct;
281 +
282 +-somstruct *thesom;
283 ++extern somstruct *thesom;
284 +
285 + /*---------------------------------- protos --------------------------------*/
286 +
287 +--- a/src/xml.c
288 ++++ b/src/xml.c
289 +@@ -50,6 +50,11 @@
290 + xmlstruct *xmlstack = NULL;
291 + int nxml=0, nxmlmax=0;
292 +
293 ++sexcatstruct thecat;
294 ++picstruct thefield1,thefield2, thewfield1,thewfield2;
295 ++objstruct flagobj;
296 ++obj2struct flagobj2;
297 ++
298 + /****** init_xml ************************************************************
299 + PROTO int init_xml(void)
300 + PURPOSE Initialize a set of meta-data kept in memory before being written to the
301
302 diff --git a/sci-astronomy/sextractor/sextractor-2.19.5-r1.ebuild b/sci-astronomy/sextractor/sextractor-2.19.5-r1.ebuild
303 index 834a57a2649..784c9d8c33f 100644
304 --- a/sci-astronomy/sextractor/sextractor-2.19.5-r1.ebuild
305 +++ b/sci-astronomy/sextractor/sextractor-2.19.5-r1.ebuild
306 @@ -1,7 +1,7 @@
307 # Copyright 1999-2020 Gentoo Authors
308 # Distributed under the terms of the GNU General Public License v2
309
310 -EAPI=6
311 +EAPI=7
312
313 AUTOTOOLS_AUTO_DEPEND=no
314
315 @@ -10,65 +10,69 @@ inherit autotools
316 DESCRIPTION="Extract catalogs of sources from astronomical FITS images"
317 HOMEPAGE="http://www.astromatic.net/software/sextractor"
318 SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz"
319 -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
320
321 LICENSE="GPL-3"
322 SLOT="0"
323 -
324 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
325 IUSE="doc modelfit test threads"
326 +REQUIRED_USE="test? ( modelfit )"
327 RESTRICT="!test? ( test )"
328
329 RDEPEND="
330 !games-misc/sex
331 - modelfit? ( sci-libs/atlas[lapack,threads=] sci-libs/fftw:3.0 )"
332 + modelfit? (
333 + sci-libs/atlas[lapack,threads=]
334 + sci-libs/fftw:3.0=
335 + )"
336 DEPEND="${RDEPEND}
337 modelfit? ( ${AUTOTOOLS_DEPEND} )"
338
339 -REQUIRED_USE="test? ( modelfit )"
340 -
341 PATCHES=(
342 - "${FILESDIR}/${P}-fix-format-errors.patch"
343 - "${FILESDIR}/${P}-have-malloc.patch"
344 - "${FILESDIR}/${P}-have-mmap.patch"
345 - "${FILESDIR}/${P}-sigbus.patch"
346 + "${FILESDIR}"/${P}-fix-format-errors.patch
347 + "${FILESDIR}"/${P}-have-malloc.patch
348 + "${FILESDIR}"/${P}-have-mmap.patch
349 + "${FILESDIR}"/${P}-sigbus.patch
350 + "${FILESDIR}"/${P}-fno-common.patch
351 )
352
353 src_prepare() {
354 default
355 +
356 if use modelfit; then
357 - local mycblas=atlcblas myclapack=atlclapack
358 - if use threads; then
359 - [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptcblas.so ]] && \
360 - mycblas=ptcblas
361 - [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptclapack.so ]] && \
362 - myclapack=ptclapack
363 - fi
364 - sed -i \
365 - -e "s/-lcblas/-l${mycblas}/g" \
366 - -e "s/AC_CHECK_LIB(cblas/AC_CHECK_LIB(${mycblas}/g" \
367 - -e "s/-llapack/-l${myclapack}/g" \
368 - -e "s/AC_CHECK_LIB(lapack/AC_CHECK_LIB(${myclapack}/g" \
369 - acx_atlas.m4 || die
370 - eautoreconf
371 + local mycblas=atlcblas
372 + local myclapack=atlclapack
373 + if use threads; then
374 + [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptcblas.so ]] && \
375 + mycblas=ptcblas
376 + [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptclapack.so ]] && \
377 + myclapack=ptclapack
378 + fi
379 + sed -i \
380 + -e "s/-lcblas/-l${mycblas}/g" \
381 + -e "s/AC_CHECK_LIB(cblas/AC_CHECK_LIB(${mycblas}/g" \
382 + -e "s/-llapack/-l${myclapack}/g" \
383 + -e "s/AC_CHECK_LIB(lapack/AC_CHECK_LIB(${myclapack}/g" \
384 + acx_atlas.m4 || die
385 + eautoreconf
386 fi
387 }
388
389 src_configure() {
390 econf \
391 - --with-atlas-incdir="${EPREFIX}/usr/include/atlas" \
392 + --with-atlas-incdir="${EPREFIX}"/usr/include/atlas \
393 $(use_enable modelfit model-fitting) \
394 $(use_enable threads)
395 }
396
397 src_install() {
398 default
399 - CONFDIR=/usr/share/sextractor
400 - insinto ${CONFDIR}
401 - doins config/*
402 - use doc && dodoc doc/*
403 +
404 + insinto /usr/share/sextractor
405 + doins -r config/.
406 + use doc && dodoc -r doc/.
407 }
408
409 pkg_postinst() {
410 elog "SExtractor examples configuration files are located in"
411 - elog "${EROOT%/}/${CONFDIR} and are not loaded anymore by default."
412 + elog "${EROOT}/usr/share/sextractor and are not loaded anymore by default."
413 }