Gentoo Archives: gentoo-commits

From: Sebastien Fabbro <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-astronomy/funtools/, sci-astronomy/funtools/files/
Date: Sat, 27 Feb 2016 02:18:28
Message-Id: 1456542871.c7618af3f2a38be30eb8ab77db404ddfc3a1c89d.bicatali@gentoo
1 commit: c7618af3f2a38be30eb8ab77db404ddfc3a1c89d
2 Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 27 03:13:53 2016 +0000
4 Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 27 03:14:31 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7618af3
7
8 sci-astronomy/funtools: Version bum
9
10 Some cleanup of really unused version.
11 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=536630
12
13 Package-Manager: portage-2.2.27
14
15 sci-astronomy/funtools/Manifest | 2 +-
16 .../funtools/files/funtools-1.4.4-ds9-fixes.patch | 292 ----------
17 .../files/funtools-1.4.4-fix-autoheader.patch | 121 -----
18 .../files/funtools-1.4.4-fix-crashes.patch | 99 ----
19 .../files/funtools-1.4.4-fix-hardening.patch | 68 ---
20 .../files/funtools-1.4.4-fix-includes.patch | 602 ---------------------
21 .../funtools/files/funtools-1.4.4-makefiles.patch | 341 ------------
22 sci-astronomy/funtools/funtools-1.4.4-r4.ebuild | 62 ---
23 sci-astronomy/funtools/funtools-1.4.6.ebuild | 69 +++
24 9 files changed, 70 insertions(+), 1586 deletions(-)
25
26 diff --git a/sci-astronomy/funtools/Manifest b/sci-astronomy/funtools/Manifest
27 index 3e5326a..ea1b1e4 100644
28 --- a/sci-astronomy/funtools/Manifest
29 +++ b/sci-astronomy/funtools/Manifest
30 @@ -1 +1 @@
31 -DIST funtools-1.4.4.tar.gz 3475367 SHA256 f47a00e774b557931a7ff00ddd0852e32ae5d2a2f0d3a227f8ba81d3db1e863b SHA512 3a58ad008bc33836109327add15eabaf95e9dc3f9e70a678fe9a8176dae87ccf0faf439e775b6efcb50e536afb022b9e4c226cbb98e56997960380e06012b5c2 WHIRLPOOL 5b89cb7280a4e1087c13103a813e9220432419215d8bc7e6463f5f08f2a5ba3731e7693f16d79ff4ec705665809cc33e81dbd36cd07a00d786aac35bbb975f71
32 +DIST funtools-1.4.6.tar.gz 3104626 SHA256 902d55682fb57a387311eef1ad2953ddc081ecea3a32ab6153ad50e7b4822c49 SHA512 0ff70649c60337faa247e38e4dc40252b0092db39fe22b2869a764d01b2d7f1c584980ab891bf6e97c66edda3a0ad4b70bc588f2c9df392d87797795b8b22413 WHIRLPOOL 26f5ca1ea34c10503e9023df05a1f1a1f8ae34e5b261a9d0a87923a2de0935e8b5ce4baf24906604cda29e59ace54f180182d86d5a0a065c6c84b84bef629aae
33
34 diff --git a/sci-astronomy/funtools/files/funtools-1.4.4-ds9-fixes.patch b/sci-astronomy/funtools/files/funtools-1.4.4-ds9-fixes.patch
35 deleted file mode 100644
36 index 6a08915..0000000
37 --- a/sci-astronomy/funtools/files/funtools-1.4.4-ds9-fixes.patch
38 +++ /dev/null
39 @@ -1,292 +0,0 @@
40 -Origin: http://hea-www.harvard.edu/saord/download/ds9/source/ds9.7.0.tar.gz
41 -Description: Fixes that were applied to the package included in the saods9
42 - source. Only the patches that affect the Debian distribution are included here.
43 - These patches are not specific for DS9, however.
44 - .
45 - From the changelog:
46 - * Fixed -J funcone, which was not properly outputting all rows.
47 - * Fixed bug in funim.c which broke vcol functionality.
48 - .
49 ---- a/filter/filter.c
50 -+++ b/filter/filter.c
51 -@@ -326,24 +326,31 @@ Filter FilterOpen(header, string, mode)
52 - }
53 -
54 - /* determine which type of process execution we do */
55 -- filter->ptype = DEFAULT_FILTER_PTYPE;
56 -- *tbuf = '\0';
57 -- if( (s=(char *)getenv("FILTER_PTYPE")) ){
58 -- strcpy(tbuf, s);
59 -- }
60 -- if( !*tbuf && (s=xstrdup(filter->mode)) ){
61 -- keyword(s, "ptype", tbuf, SZ_LINE);
62 -- if( s ) xfree(s);
63 -- }
64 -- if( *tbuf ){
65 -- if( *tbuf == 'p' )
66 -- filter->ptype = PTYPE_PROCESS;
67 -- else if( *tbuf == 'c' )
68 -- filter->ptype = PTYPE_CONTAINED;
69 -+ switch(filter->method){
70 -+ case METHOD_C:
71 -+ filter->ptype = DEFAULT_FILTER_PTYPE;
72 -+ *tbuf = '\0';
73 -+ if( (s=(char *)getenv("FILTER_PTYPE")) ){
74 -+ strcpy(tbuf, s);
75 -+ }
76 -+ if( !*tbuf && (s=xstrdup(filter->mode)) ){
77 -+ keyword(s, "ptype", tbuf, SZ_LINE);
78 -+ if( s ) xfree(s);
79 -+ }
80 -+ if( *tbuf ){
81 -+ if( *tbuf == 'p' )
82 -+ filter->ptype = PTYPE_PROCESS;
83 -+ else if( *tbuf == 'c' )
84 -+ filter->ptype = PTYPE_CONTAINED;
85 - #ifdef USE_DL
86 -- else if( *tbuf == 'd' )
87 -- filter->ptype = PTYPE_DYNAMIC;
88 -+ else if( *tbuf == 'd' )
89 -+ filter->ptype = PTYPE_DYNAMIC;
90 - #endif
91 -+ }
92 -+ break;
93 -+ default:
94 -+ filter->ptype = PTYPE_PROCESS;
95 -+ break;
96 - }
97 -
98 - /* determine region paint mode */
99 -@@ -470,7 +477,10 @@ Filter FilterOpen(header, string, mode)
100 - if( !FilterProgCompile(filter) )
101 - goto error;
102 -
103 -- if( filter->debug < 2 ){
104 -+ if( filter->debug >= 2 ) goto done;
105 -+
106 -+ switch(filter->method){
107 -+ case METHOD_C:
108 - switch(filter->ptype){
109 - case PTYPE_PROCESS:
110 - case PTYPE_CONTAINED:
111 -@@ -478,7 +488,7 @@ Filter FilterOpen(header, string, mode)
112 - case PIPE_WIN32:
113 - #if HAVE_CYGWIN
114 - if( !WinProcessOpen(filter->prog,
115 -- &(filter->ihandle), &(filter->ohandle), &(filter->process)) )
116 -+ &(filter->ihandle), &(filter->ohandle), &(filter->process)) )
117 - goto error;
118 - #else
119 - gerror(stderr, "internal error: no WinProcess without Windows");
120 -@@ -487,20 +497,23 @@ Filter FilterOpen(header, string, mode)
121 - break;
122 - default:
123 - if( !ProcessOpen(filter->prog,
124 -- &(filter->ichan), &(filter->ochan), &(filter->pid)) )
125 -+ &(filter->ichan), &(filter->ochan), &(filter->pid)) )
126 - goto error;
127 - break;
128 - }
129 - break;
130 - #ifdef USE_DL
131 - case PTYPE_DYNAMIC:
132 -- if( !(filter->dl=DLOpen(filter->prog)) )
133 -- goto error;
134 -- break;
135 -+ if( !(filter->dl=DLOpen(filter->prog)) )
136 -+ goto error;
137 -+ break;
138 - #endif
139 - default:
140 -- goto error;
141 -+ goto error;
142 - }
143 -+ break;
144 -+ default:
145 -+ goto error;
146 - }
147 -
148 - /* return the good news */
149 ---- a/filter/filt.l
150 -+++ b/filter/filt.l
151 -@@ -871,6 +871,26 @@ compass { BEGIN COMM; }
152 - *
153 - */
154 -
155 -+
156 -+#ifdef YY_USE_PROTOS
157 -+static void floatprefix(void)
158 -+#else
159 -+static void floatprefix()
160 -+#endif
161 -+{
162 -+ if( filt->method == METHOD_C )
163 -+ _FiltLexCat("(double)");
164 -+}
165 -+
166 -+#ifdef YY_USE_PROTOS
167 -+static void floatsuffix(void)
168 -+#else
169 -+static void floatsuffix()
170 -+#endif
171 -+{
172 -+ return;
173 -+}
174 -+
175 - #ifdef YY_USE_PROTOS
176 - static void
177 - bin2num(char *d, char *s, int maxlen)
178 -@@ -1414,7 +1434,14 @@ static void _FiltLexRegionStart(docols)
179 - FilterSymbolDefaults(filt, 0);
180 - /* initialize wcs for default image case */
181 - _FiltLexWcsCols(filt->fhd, filt->xbin, filt->ybin);
182 -- _FiltLexCat(",(double)x,(double)y");
183 -+ _FiltLexCat(",");
184 -+ floatprefix();
185 -+ _FiltLexCat("x");
186 -+ floatsuffix();
187 -+ _FiltLexCat(",");
188 -+ floatprefix();
189 -+ _FiltLexCat("y");
190 -+ floatsuffix();
191 - break;
192 - case 1:
193 - if( !initbindefs ){
194 -@@ -1427,16 +1454,24 @@ static void _FiltLexRegionStart(docols)
195 - if( !filt->xbin || !filt->ybin ){
196 - _filterror("two binning columns are required for regions");
197 - }
198 -- _FiltLexCat(",(double)");
199 -+ _FiltLexCat(",");
200 -+ floatprefix();
201 - _FiltLexCat(filt->xbin);
202 -- _FiltLexCat(",(double)");
203 -+ floatsuffix();
204 -+ _FiltLexCat(",");
205 -+ floatprefix();
206 - _FiltLexCat(filt->ybin);
207 -+ floatsuffix();
208 - break;
209 - case 2:
210 -- _FiltLexCat(",(double)");
211 -+ _FiltLexCat(",");
212 -+ floatprefix();
213 - _FiltLexCat(colnames[0]);
214 -- _FiltLexCat(",(double)");
215 -+ floatsuffix();
216 -+ _FiltLexCat(",");
217 -+ floatprefix();
218 - _FiltLexCat(colnames[1]);
219 -+ floatsuffix();
220 - break;
221 - }
222 - if( s ) xfree(s);
223 ---- a/filter/filtprog_c.c
224 -+++ b/filter/filtprog_c.c
225 -@@ -198,7 +198,8 @@ static int FilterProgOpen_C(filter)
226 - ccstr = "gcc";
227 - }
228 - /* make sure we have a compiler */
229 -- if( !(filter->cc = Find(ccstr, "x", NULL, FilterPath())) &&
230 -+ if( !(filter->cc = Access(ccstr, "x")) &&
231 -+ !(filter->cc = Find(ccstr, "x", NULL, FilterPath())) &&
232 - !(filter->cc = Find("gcc", "x", NULL, FilterPath())) &&
233 - !(filter->cc = Find("cc", "x", NULL, FilterPath())) &&
234 - !(filter->cc = Find("cc", "x", NULL, ".")) &&
235 -@@ -212,6 +213,9 @@ static int FilterProgOpen_C(filter)
236 - #if HAVE_CYGWIN
237 - if( (s=strrchr(filter->cc, '/')) ){
238 - s++;
239 -+ }
240 -+ else if( (s=strrchr(filter->cc, '\\')) ){
241 -+ s++;
242 - } else {
243 - s = filter->cc;
244 - }
245 ---- a/funcone.c
246 -+++ b/funcone.c
247 -@@ -1036,6 +1036,9 @@ main(argc, argv)
248 - strncpy(decstr, argv[optind+ioff++], SZ_LINE-1);
249 - strncpy(radstr, argv[optind+ioff++], SZ_LINE-1);
250 -
251 -+ /* dolimfilt does not work with doall */
252 -+ if( doall ) dolimfilt = 0;
253 -+
254 - /* process list arguments */
255 - if( dolist ){
256 - if( !(list=OpenList(lname, rastr, decstr, radstr)) ){
257 -@@ -1085,6 +1088,8 @@ main(argc, argv)
258 - if( !(adbuf=xcalloc(nrow+1, sizeof(char))) ){
259 - gerror(stderr, "can't allocate all (-J|-X) buffer of size %d\n", nrow);
260 - }
261 -+ /* must read one event at a time, or else we can't tell the event num */
262 -+ maxrow = 1;
263 - }
264 -
265 - /* activate columns specified by user, if necessary */
266 -@@ -1371,7 +1376,7 @@ done:
267 - while( (ebuf = (Ev)FunTableRowGet(fun, NULL, maxrow, NULL, &got)) ){
268 - /* if we have a filter, then we don't know the row number til after
269 - we read the event, i.e. now */
270 -- if( doall & ALL_FILT ) FunInfoGet(fun, FUN_ROW, &irow, 0);
271 -+ FunInfoGet(fun, FUN_ROW, &irow, 0);
272 - /* process all rows */
273 - for(i=0; i<got; i++){
274 - /* skip rows that already were written out */
275 ---- a/funtab.c
276 -+++ b/funtab.c
277 -@@ -1386,7 +1386,7 @@ int FunTableRowPut(fun, rows, nrow, idx, plist)
278 - off_t
279 - FunTableRowSeek(Fun fun, int nrow, char *plist)
280 - #else
281 --off_t FunTableRowPut(fun, nrow, plist)
282 -+off_t FunTableRowSeek(fun, nrow, plist)
283 - Fun fun;
284 - int nrow;
285 - char *plist;
286 ---- a/funim.c
287 -+++ b/funim.c
288 -@@ -111,9 +111,9 @@ static void *_FunTableBin(fun, buf, plist)
289 - /* optional value column for binning */
290 - if( fun->vbin >= 0 ){
291 - dovcol = 1;
292 -- voffset = fun->header->table->col[fun->bin[2]].offset;
293 -- vsize = fun->header->table->col[fun->bin[2]].size;
294 -- vtype = fun->header->table->col[fun->bin[2]].type;
295 -+ voffset = fun->header->table->col[fun->vbin].offset;
296 -+ vsize = fun->header->table->col[fun->vbin].size;
297 -+ vtype = fun->header->table->col[fun->vbin].type;
298 - }
299 - else{
300 - dovcol = 0;
301 ---- a/calc.l
302 -+++ b/calc.l
303 -@@ -284,7 +284,7 @@ static char *_CalcCB(name, client_data)
304 - {
305 - CalcCols cur;
306 - char tbuf[SZ_LINE];
307 -- char tbuf2[SZ_LINE];
308 -+ char tbuf2[SZ_LINE*2];
309 - char tbuf3[SZ_LINE];
310 - int i, got, ip;
311 -
312 ---- a/util/gio.c
313 -+++ b/util/gio.c
314 -@@ -2209,7 +2209,7 @@ void gerror(va_alist) va_dcl
315 - vsnprintf(_gerrors, SZ_LINE-1, tbuf, args);
316 - /* if the error flag is positive, we output immediately */
317 - if( (fd != NULL) && _gerror ){
318 -- fprintf(fd, _gerrors);
319 -+ fputs(_gerrors, fd);
320 - fflush(fd);
321 - }
322 - /* if the error flag is set high, we exit */
323 -@@ -2281,7 +2281,7 @@ void gwarning(va_alist) va_dcl
324 - vsnprintf(_gwarnings, SZ_LINE-1, tbuf, args);
325 - /* if the warning flag is positive, we output immediately */
326 - if( (fd != NULL) && _gwarning ){
327 -- fprintf(fd, _gwarnings);
328 -+ fputs(_gwarnings, fd);
329 - fflush(fd);
330 - }
331 - }
332
333 diff --git a/sci-astronomy/funtools/files/funtools-1.4.4-fix-autoheader.patch b/sci-astronomy/funtools/files/funtools-1.4.4-fix-autoheader.patch
334 deleted file mode 100644
335 index 7004080..0000000
336 --- a/sci-astronomy/funtools/files/funtools-1.4.4-fix-autoheader.patch
337 +++ /dev/null
338 @@ -1,121 +0,0 @@
339 -Author: Ole Streicher <debian@×××××××××.cx>
340 -Description: Fix the AC_DEFINE lines so that autoheader (and therefore
341 - dh_autoreconf) works
342 ---- a/configure.ac
343 -+++ b/configure.ac
344 -@@ -193,7 +193,7 @@ AC_MSG_RESULT($fun_ok)
345 -
346 - SC_PATH_TCLCONFIG
347 - if test x"${no_tcl}" = x ; then
348 -- AC_DEFINE(HAVE_TCL)
349 -+ AC_DEFINE([HAVE_TCL], [1], [Define if tcl is used.])
350 - fi
351 -
352 - AC_PROG_AWK
353 -@@ -218,7 +218,7 @@ POST="|\& cat"
354 - case $host_os in
355 - *cygwin*|*Cygwin* )
356 - CFLAGS="$CFLAGS -enable-auto-import"
357 -- AC_DEFINE(HAVE_CYGWIN)
358 -+ AC_DEFINE([HAVE_CYGWIN], [], [Define if the cygwin compiler is used.])
359 - AC_MSG_RESULT(flagging Cygwin)
360 - PRE="sh -c {"
361 - POST="}"
362 -@@ -226,7 +226,7 @@ case $host_os in
363 - *mingw32*|*Mingw32*)
364 - CFLAGS="$CFLAGS -mconsole"
365 - EXTRA_LIBS="$EXTRA_LIBS -lwsock32"
366 -- AC_DEFINE(HAVE_MINGW32)
367 -+ AC_DEFINE([HAVE_MINGW32], [], [Define if the mingw32 compiler is used.])
368 - AC_MSG_RESULT(flagging MinGW)
369 - ;;
370 - *osf*|*Osf*)
371 ---- a/filter/configure.ac
372 -+++ b/filter/configure.ac
373 -@@ -150,7 +150,7 @@ PRE=""
374 - POST="|\& cat"
375 - case $host_os in
376 - *cygwin*|*Cygwin* )
377 -- AC_DEFINE(HAVE_CYGWIN)
378 -+ AC_DEFINE([HAVE_CYGWIN], [], [Define if the cygwin compiler is used.])
379 - AC_MSG_RESULT(flagging Cygwin)
380 - PRE="sh -c {"
381 - POST="}"
382 -@@ -158,7 +158,7 @@ case $host_os in
383 - *mingw32*|*Mingw32*)
384 - CFLAGS="$CFLAGS -mconsole"
385 - EXTRA_LIBS="$EXTRA_LIBS -lwsock32"
386 -- AC_DEFINE(HAVE_MINGW32)
387 -+ AC_DEFINE([HAVE_MINGW32], [], [Define if the mingw32 compiler is used.])
388 - AC_MSG_RESULT(flagging MinGW)
389 - ;;
390 - *osf*|*Osf*)
391 ---- a/fitsy/configure.ac
392 -+++ b/fitsy/configure.ac
393 -@@ -121,7 +121,7 @@ PRE=""
394 - POST="|\& cat"
395 - case $host_os in
396 - *cygwin*|*Cygwin* )
397 -- AC_DEFINE(HAVE_CYGWIN)
398 -+ AC_DEFINE([HAVE_CYGWIN], [], [Define if the cygwin compiler is used.])
399 - AC_MSG_RESULT(flagging Cygwin)
400 - PRE="sh -c {"
401 - POST="}"
402 -@@ -129,7 +129,7 @@ case $host_os in
403 - *mingw32*|*Mingw32*)
404 - CFLAGS="$CFLAGS -mconsole"
405 - EXTRA_LIBS="$EXTRA_LIBS -lwsock32"
406 -- AC_DEFINE(HAVE_MINGW32)
407 -+ AC_DEFINE([HAVE_MINGW32], [], [Define if the mingw32 compiler is used.])
408 - AC_MSG_RESULT(flagging MinGW)
409 - ;;
410 - *darwin*|*Darwin*)
411 ---- a/util/configure.ac
412 -+++ b/util/configure.ac
413 -@@ -133,7 +133,7 @@ fi
414 -
415 - SC_PATH_TCLCONFIG
416 - if test x"${no_tcl}" = x ; then
417 -- AC_DEFINE(HAVE_TCL)
418 -+ AC_DEFINE([HAVE_TCL], [1], [Define if tcl is used.])
419 - fi
420 -
421 - AC_MSG_CHECKING(for external zlib)
422 -@@ -146,7 +146,7 @@ PRE=""
423 - POST="|\& cat"
424 - case $host_os in
425 - *cygwin*|*Cygwin* )
426 -- AC_DEFINE(HAVE_CYGWIN)
427 -+ AC_DEFINE([HAVE_CYGWIN], [], [Define if the cygwin compiler is used.])
428 - AC_MSG_RESULT(flagging Cygwin)
429 - PRE="sh -c {"
430 - POST="}"
431 -@@ -154,7 +154,7 @@ case $host_os in
432 - *mingw32*|*Mingw32*)
433 - CFLAGS="$CFLAGS -mconsole"
434 - EXTRA_LIBS="$EXTRA_LIBS -lwsock32"
435 -- AC_DEFINE(HAVE_MINGW32)
436 -+ AC_DEFINE([HAVE_MINGW32], [], [Define if the mingw32 compiler is used.])
437 - AC_MSG_RESULT(flagging MinGW)
438 - ;;
439 - *osf*|*Osf*)
440 ---- a/wcs/configure.ac
441 -+++ b/wcs/configure.ac
442 -@@ -125,7 +125,7 @@ PRE=""
443 - POST="|\& cat"
444 - case $host_os in
445 - *cygwin*|*Cygwin* )
446 -- AC_DEFINE(HAVE_CYGWIN)
447 -+ AC_DEFINE([HAVE_CYGWIN], [], [Define if the cygwin compiler is used.])
448 - AC_MSG_RESULT(flagging Cygwin)
449 - PRE="sh -c {"
450 - POST="}"
451 -@@ -133,7 +133,7 @@ case $host_os in
452 - *mingw32*|*Mingw32*)
453 - CFLAGS="$CFLAGS -mconsole"
454 - EXTRA_LIBS="$EXTRA_LIBS -lwsock32"
455 -- AC_DEFINE(HAVE_MINGW32)
456 -+ AC_DEFINE([HAVE_MINGW32], [], [Define if the mingw32 compiler is used.])
457 - AC_MSG_RESULT(flagging MinGW)
458 - ;;
459 - *osf*|*Osf*)
460
461 diff --git a/sci-astronomy/funtools/files/funtools-1.4.4-fix-crashes.patch b/sci-astronomy/funtools/files/funtools-1.4.4-fix-crashes.patch
462 deleted file mode 100644
463 index 75d6908..0000000
464 --- a/sci-astronomy/funtools/files/funtools-1.4.4-fix-crashes.patch
465 +++ /dev/null
466 @@ -1,99 +0,0 @@
467 -Author: Ole Streicher <debian@×××××××××.cx>
468 -Description: Check cmd line arguments for illegal input that caused crashes
469 - found with the "Mayhem" tool.
470 -Bug: http://bugs.debian.org/715928
471 -Bug: http://bugs.debian.org/715929
472 ---- a/funjoin.c
473 -+++ b/funjoin.c
474 -@@ -737,7 +737,7 @@ main(argc, argv)
475 - case 'a':
476 - if( argv[i][2] ){
477 - j = atoi(&argv[i][2])-1;
478 -- if( (j >= 0) && (j < MAXIFILE) ){
479 -+ if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){
480 - files[j].actstr = argv[++i];
481 - }
482 - else{
483 -@@ -751,7 +751,7 @@ main(argc, argv)
484 - case 'b':
485 - if( argv[i][2] ){
486 - j = atoi(&argv[i][2])-1;
487 -- if( (j >= 0) && (j < MAXIFILE) ){
488 -+ if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){
489 - files[j].bstr = argv[++i];
490 - }
491 - else{
492 -@@ -765,7 +765,7 @@ main(argc, argv)
493 - case 'j':
494 - if( argv[i][2] ){
495 - j = atoi(&argv[i][2])-1;
496 -- if( (j >= 0) && (j < MAXIFILE) ){
497 -+ if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){
498 - files[j].jname = argv[++i];
499 - }
500 - else{
501 -@@ -773,25 +773,35 @@ main(argc, argv)
502 - }
503 - }
504 - else{
505 -- defcol = argv[++i];
506 -+ if (i < argc-1) {
507 -+ defcol = argv[++i];
508 -+ }
509 - }
510 - break;
511 - case 'm':
512 -- minmatch = atoi(argv[++i])+1;
513 -+ if (i < argc-1) {
514 -+ minmatch = atoi(argv[++i])+1;
515 -+ }
516 - if( minmatch < 1 ) minmatch = 1;
517 - break;
518 - case 'M':
519 -- maxmatch = atoi(argv[++i])+1;
520 -+ if (i < argc-1) {
521 -+ maxmatch = atoi(argv[++i])+1;
522 -+ }
523 - if( maxmatch < 1 ) maxmatch = 1;
524 - break;
525 - case 's':
526 - jfiles = JFILES_COL;
527 - break;
528 - case 'S':
529 -- jfiles = argv[++i];
530 -+ if (i < argc-1) {
531 -+ jfiles = argv[++i];
532 -+ }
533 - break;
534 - case 't':
535 -- tol = atof(argv[++i]);
536 -+ if (i < argc-1) {
537 -+ tol = atof(argv[++i]);
538 -+ }
539 - if( tol <= 0 ){
540 - gerror(stderr, "tolerance value must be positive\n");
541 - }
542 ---- a/funimage.c
543 -+++ b/funimage.c
544 -@@ -338,12 +338,16 @@ main(argc, argv)
545 - t = strchr(s, ',');
546 - strncat(newname, s, t-s);
547 - strncat(newname, ",y:", SZ_LINE-strlen(newname));
548 -- s = ++t;
549 -- t = strchr(s, ',');
550 -- strncat(newname, s, t-s);
551 -+ if (t != NULL) {
552 -+ s = ++t;
553 -+ t = strchr(s, ',');
554 -+ strncat(newname, s, t-s);
555 -+ }
556 - strncat(newname, "),", SZ_LINE-strlen(newname));
557 -- s = ++t;
558 -- strncat(newname, s, SZ_LINE-strlen(newname));
559 -+ if (t != NULL) {
560 -+ s = ++t;
561 -+ strncat(newname, s, SZ_LINE-strlen(newname));
562 -+ }
563 - iname = newname;
564 - }
565 -
566
567 diff --git a/sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch b/sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch
568 deleted file mode 100644
569 index 2f24268..0000000
570 --- a/sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch
571 +++ /dev/null
572 @@ -1,68 +0,0 @@
573 -Author: Ole Streicher <debian@×××××××××.cx>
574 -Description: Fix the format string for fprintf
575 ---- a/gnu/sort.c
576 -+++ b/gnu/sort.c
577 -@@ -2775,7 +2775,7 @@
578 - xfwrite (buf, 1, cc, ofp);
579 - if (ferror (fp))
580 - {
581 -- fprintf (stderr, files[i]);
582 -+ fprintf (stderr, "%s", files[i]);
583 - cleanup ();
584 - exit (2);
585 - }
586 ---- a/Makefile.in
587 -+++ b/Makefile.in
588 -@@ -137,7 +137,7 @@
589 -
590 - CC = @CC@
591 -
592 --CC_SWITCHES = -I. ${CFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS}
593 -+CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS}
594 -
595 - DEPEND_SWITCHES = -I. ${CFLAGS} ${INCLUDES} ${AC_FLAGS}
596 -
597 ---- a/filter/Makefile.in
598 -+++ b/filter/Makefile.in
599 -@@ -114,7 +114,7 @@
600 -
601 - CC = @CC@
602 -
603 --CC_SWITCHES = -I. ${CFLAGS} -DFILT_VERSION="\"$(VERSION)\"" @USE_DL@ \
604 -+CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} -DFILT_VERSION="\"$(VERSION)\"" @USE_DL@ \
605 - ${INCLUDES} ${AC_FLAGS}
606 -
607 - DEPEND_SWITCHES = -I. ${CFLAGS} -I. ${INCLUDES} ${AC_FLAGS}
608 ---- a/gnu/Makefile.in
609 -+++ b/gnu/Makefile.in
610 -@@ -87,7 +87,7 @@
611 -
612 - CC = @CC@
613 -
614 --CC_SWITCHES = ${CFLAGS} ${INCLUDES} ${AC_FLAGS}
615 -+CC_SWITCHES = ${CFLAGS} ${CPPFLAGS} ${INCLUDES} ${AC_FLAGS}
616 -
617 - DEPEND_SWITCHES = ${CFLAGS} ${INCLUDES} ${AC_FLAGS}
618 -
619 ---- a/util/Makefile.in
620 -+++ b/util/Makefile.in
621 -@@ -105,7 +105,7 @@
622 -
623 - CC = @CC@
624 -
625 --CC_SWITCHES = -I. ${CFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS}
626 -+CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS}
627 -
628 - DEPEND_SWITCHES = -I. ${CFLAGS} ${INCLUDES} ${AC_FLAGS}
629 -
630 ---- a/mklib
631 -+++ b/mklib
632 -@@ -169,7 +169,7 @@
633 - rm -f ${LIBNAME}.so
634 -
635 - # make lib
636 -- ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
637 -+ ${LINK} ${LDFLAGS} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
638 - # make usual symlinks
639 - ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
640 - ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
641
642 diff --git a/sci-astronomy/funtools/files/funtools-1.4.4-fix-includes.patch b/sci-astronomy/funtools/files/funtools-1.4.4-fix-includes.patch
643 deleted file mode 100644
644 index 4068ace..0000000
645 --- a/sci-astronomy/funtools/files/funtools-1.4.4-fix-includes.patch
646 +++ /dev/null
647 @@ -1,602 +0,0 @@
648 -Author: Ole Streicher <debian@×××××××××.cx>
649 -Description: The include files are going to be installed in
650 - /usr/include/funtools. So, they should refer to each other by using ""
651 - instead of <> which also searches in the current directory.
652 ---- a/filter/column.h
653 -+++ b/filter/column.h
654 -@@ -12,14 +12,14 @@
655 - #define __column_h
656 -
657 - #if HAVE_CONFIG_H
658 --#include <conf.h>
659 -+#include "conf.h"
660 - #endif
661 -
662 - #ifdef HAVE_STRING_H
663 - #include <string.h>
664 - #endif
665 -
666 --#include <prsetup.h>
667 -+#include "prsetup.h"
668 - _PRbeg
669 -
670 - void ColumnLoad _PRx((char *ibuf, int size, int n, int convert, void *obuf));
671 ---- a/filter/dl.h
672 -+++ b/filter/dl.h
673 -@@ -2,14 +2,14 @@
674 - #define __dl_h
675 -
676 - #if HAVE_CONFIG_H
677 --#include <conf.h>
678 -+#include "conf.h"
679 - #endif
680 -
681 - #ifdef HAVE_DLFCN_H
682 - #include <dlfcn.h>
683 - #endif
684 -
685 --#include <prsetup.h>
686 -+#include "prsetup.h"
687 -
688 - _PRbeg
689 -
690 ---- a/filter/filter.h
691 -+++ b/filter/filter.h
692 -@@ -12,7 +12,7 @@
693 - #define __filter_h
694 -
695 - #if HAVE_CONFIG_H
696 --#include <conf.h>
697 -+#include "conf.h"
698 - #endif
699 -
700 - /* avoid use of system -- its not secure */
701 -@@ -34,28 +34,28 @@
702 - #include <string.h>
703 - #endif
704 - #include <sys/types.h>
705 --#include <prsetup.h>
706 --#include <gio.h>
707 --#include <file.h>
708 --#include <find.h>
709 --#include <macro.h>
710 --#include <word.h>
711 --#include <xalloc.h>
712 --#include <strtod.h>
713 -+#include "prsetup.h"
714 -+#include "gio.h"
715 -+#include "file.h"
716 -+#include "find.h"
717 -+#include "macro.h"
718 -+#include "word.h"
719 -+#include "xalloc.h"
720 -+#include "strtod.h"
721 - #define USE_XFILEIO 1
722 --#include <fitsy.h>
723 -+#include "fitsy.h"
724 - #undef USE_XFILEIO
725 --#include <idx.h>
726 --#include <wcs.h>
727 --#include <column.h>
728 --#include <tl.h>
729 --#include <dl.h>
730 --#include <mkrtemp.h>
731 --#include <zprocess.h>
732 --#include <winprocess.h>
733 --#include <parse.h>
734 -+#include "idx.h"
735 -+#include "wcs.h"
736 -+#include "column.h"
737 -+#include "tl.h"
738 -+#include "dl.h"
739 -+#include "mkrtemp.h"
740 -+#include "zprocess.h"
741 -+#include "winprocess.h"
742 -+#include "parse.h"
743 - #ifdef USE_LAUNCH
744 --#include <xlaunch.h>
745 -+#include "xlaunch.h"
746 - #endif
747 -
748 - #ifndef OBJPATH
749 ---- a/filter/idx.h
750 -+++ b/filter/idx.h
751 -@@ -11,9 +11,9 @@
752 - #define __idx_h
753 -
754 - #if HAVE_CONFIG_H
755 --#include <conf.h>
756 -+#include "conf.h"
757 - #endif
758 --#include <prsetup.h>
759 -+#include "prsetup.h"
760 - #include <stdio.h>
761 - #include <ctype.h>
762 - #ifdef HAVE_UNISTD_H
763 -@@ -22,10 +22,10 @@
764 - #ifdef HAVE_STRING_H
765 - #include <string.h>
766 - #endif
767 --#include <fitsy.h>
768 --#include <gio.h>
769 --#include <xalloc.h>
770 --#include <strtod.h>
771 -+#include "fitsy.h"
772 -+#include "gio.h"
773 -+#include "xalloc.h"
774 -+#include "strtod.h"
775 -
776 - /* binary search edge */
777 - #define IDX_EDGE_LEFT 1
778 ---- a/filter/tl.h
779 -+++ b/filter/tl.h
780 -@@ -11,7 +11,7 @@
781 - #ifndef __tl_h
782 - #define __tl_h
783 -
784 --#include <prsetup.h>
785 -+#include "prsetup.h"
786 -
787 - _PRbeg
788 -
789 ---- a/fitsy/fitsy.h
790 -+++ b/fitsy/fitsy.h
791 -@@ -5,13 +5,13 @@
792 - #define FITSY_H
793 -
794 - #if HAVE_CONFIG_H
795 --#include <conf.h>
796 -+#include "conf.h"
797 - #endif
798 -
799 - #if USE_XFILEIO
800 --#include <xfileio.h>
801 -+#include "xfileio.h"
802 - #else
803 --#include <xfile.h>
804 -+#include "xfile.h"
805 - #endif
806 -
807 - #ifdef __STDC__
808 -@@ -30,7 +30,7 @@
809 -
810 - #include <ctype.h>
811 -
812 --#include <longlong.h>
813 -+#include "longlong.h"
814 -
815 - #ifndef NULL
816 - #define NULL 0
817 ---- a/funtools.h
818 -+++ b/funtools.h
819 -@@ -27,11 +27,11 @@
820 - #define FUN_VERSION "1.4.4"
821 -
822 - #ifndef FUNTOOLS_PRIVATE
823 --#include <prsetup.h>
824 -+#include "prsetup.h"
825 - #define USE_XFILEIO 1
826 --#include <fitsy.h>
827 -+#include "fitsy.h"
828 - #undef USE_XFILEIO
829 --#include <wcs.h>
830 -+#include "wcs.h"
831 - typedef void *Fun;
832 - #endif
833 -
834 ---- a/funtoolsP.h
835 -+++ b/funtoolsP.h
836 -@@ -12,7 +12,7 @@
837 - #define __funtoolsP_h
838 -
839 - #if HAVE_CONFIG_H
840 --#include <conf.h>
841 -+#include "conf.h"
842 - #endif
843 -
844 - #include <stdio.h>
845 -@@ -32,20 +32,20 @@
846 - #include <getopt.h>
847 - #endif
848 - #include <sys/types.h>
849 --#include <prsetup.h>
850 -+#include "prsetup.h"
851 - #define USE_XFILEIO 1
852 --#include <fitsy.h>
853 -+#include "fitsy.h"
854 - #undef USE_XFILEIO
855 --#include <wcs.h>
856 --#include <filter.h>
857 --#include <file.h>
858 --#include <swap.h>
859 --#include <word.h>
860 --#include <parse.h>
861 --#include <xalloc.h>
862 --#include <mkrtemp.h>
863 --#include <NaN.h>
864 --#include <xlaunch.h>
865 -+#include "wcs.h"
866 -+#include "filter.h"
867 -+#include "file.h"
868 -+#include "swap.h"
869 -+#include "word.h"
870 -+#include "parse.h"
871 -+#include "xalloc.h"
872 -+#include "mkrtemp.h"
873 -+#include "NaN.h"
874 -+#include "xlaunch.h"
875 -
876 - #ifndef MAXINT
877 - #define MAXINT 2147483647
878 -@@ -338,6 +338,6 @@ int FunView _PRx((Fun fun, char *view, char *vmode, char *fname, int fmax));
879 -
880 - _PRend
881 -
882 --#include <funtools.h>
883 -+#include "funtools.h"
884 -
885 - #endif /* __funtoolsP.h */
886 ---- a/ofuntools.h
887 -+++ b/ofuntools.h
888 -@@ -27,11 +27,11 @@
889 - #define FUN_VERSION "1.4.4"
890 -
891 - #ifndef FUNTOOLS_PRIVATE
892 --#include <prsetup.h>
893 -+#include "prsetup.h"
894 - #define USE_XFILEIO 1
895 --#include <fitsy.h>
896 -+#include "fitsy.h"
897 - #undef USE_XFILEIO
898 --#include <wcs.h>
899 -+#include "wcs.h"
900 - typedef void *Fun;
901 - #endif
902 -
903 ---- a/util/NaN.h.in
904 -+++ b/util/NaN.h.in
905 -@@ -20,7 +20,7 @@
906 - #ifndef __nan_h
907 - #define __nan_h
908 -
909 --#include <prsetup.h>
910 -+#include "prsetup.h"
911 -
912 - #define BIGENDIAN @BIGENDIAN@
913 -
914 ---- a/util/file.h
915 -+++ b/util/file.h
916 -@@ -12,7 +12,7 @@
917 - #define __file_h
918 -
919 - #if HAVE_CONFIG_H
920 --#include <conf.h>
921 -+#include "conf.h"
922 - #endif
923 -
924 - #include <stdio.h>
925 -@@ -28,9 +28,9 @@
926 - #endif
927 - #include <sys/types.h>
928 - #include <sys/stat.h>
929 --#include <prsetup.h>
930 --#include <macro.h>
931 --#include <xalloc.h>
932 -+#include "prsetup.h"
933 -+#include "macro.h"
934 -+#include "xalloc.h"
935 -
936 - _PRbeg
937 - int FileExists _PRx((char *filename));
938 ---- a/util/find.h
939 -+++ b/util/find.h
940 -@@ -12,7 +12,7 @@
941 - #define __find_h
942 -
943 - #if HAVE_CONFIG_H
944 --#include <conf.h>
945 -+#include "conf.h"
946 - #endif
947 -
948 - #include <stdio.h>
949 -@@ -25,8 +25,8 @@
950 - #endif
951 - #include <sys/types.h>
952 - #include <sys/stat.h>
953 --#include <xalloc.h>
954 --#include <prsetup.h>
955 -+#include "xalloc.h"
956 -+#include "prsetup.h"
957 -
958 - _PRbeg
959 -
960 ---- a/util/gio.h
961 -+++ b/util/gio.h
962 -@@ -11,10 +11,10 @@
963 - #ifndef _gio_h
964 -
965 - #if HAVE_CONFIG_H
966 --#include <conf.h>
967 -+#include "conf.h"
968 - #endif
969 -
970 --#include <xport.h>
971 -+#include "xport.h"
972 -
973 - #include <stdio.h>
974 - #ifdef HAVE_STRING_H
975 -@@ -46,8 +46,8 @@
976 - #include <sys/stat.h>
977 - #include <sys/time.h>
978 -
979 --#include <prsetup.h>
980 --#include <xalloc.h>
981 -+#include "prsetup.h"
982 -+#include "xalloc.h"
983 -
984 - /* use ftello/fseeko (assuming its available) if we are using 64-bit offsets */
985 - #if _FILE_OFFSET_BITS == 64
986 ---- a/util/macro.h
987 -+++ b/util/macro.h
988 -@@ -12,7 +12,7 @@
989 - #define __macro_h
990 -
991 - #if HAVE_CONFIG_H
992 --#include <conf.h>
993 -+#include "conf.h"
994 - #endif
995 -
996 - #include <stdio.h>
997 -@@ -26,7 +26,7 @@
998 - #ifdef HAVE_STDLIB_H
999 - #include <stdlib.h>
1000 - #endif
1001 --#include <prsetup.h>
1002 -+#include "prsetup.h"
1003 -
1004 - typedef char *(*MacroCall)(
1005 - #ifdef ANSI_FUNC
1006 ---- a/util/mainlib.h
1007 -+++ b/util/mainlib.h
1008 -@@ -12,7 +12,7 @@
1009 - #define __mainlib_h
1010 -
1011 - #if HAVE_CONFIG_H
1012 --#include <conf.h>
1013 -+#include "conf.h"
1014 - #endif
1015 - #ifdef HAVE_STRING_H
1016 - #include <string.h>
1017 -@@ -29,11 +29,11 @@
1018 - #include <stdio.h>
1019 - #include <errno.h>
1020 - #include <sys/types.h>
1021 --#include <prsetup.h>
1022 --#include <xalloc.h>
1023 --#include <word.h>
1024 --#include <find.h>
1025 --#include <gio.h>
1026 -+#include "prsetup.h"
1027 -+#include "xalloc.h"
1028 -+#include "word.h"
1029 -+#include "find.h"
1030 -+#include "gio.h"
1031 -
1032 - /* types of mainlibs we recognize */
1033 - #define MAINLIB_ERROR 0
1034 ---- a/util/mkrtemp.h
1035 -+++ b/util/mkrtemp.h
1036 -@@ -12,7 +12,7 @@
1037 - #define __mkrtemp_h
1038 -
1039 - #if HAVE_CONFIG_H
1040 --#include <conf.h>
1041 -+#include "conf.h"
1042 - #endif
1043 -
1044 - #include <sys/types.h>
1045 -@@ -31,9 +31,9 @@
1046 - #ifdef HAVE_STDLIB_H
1047 - #include <stdlib.h>
1048 - #endif
1049 --#include <prsetup.h>
1050 --#include <word.h>
1051 --#include <xalloc.h>
1052 -+#include "prsetup.h"
1053 -+#include "word.h"
1054 -+#include "xalloc.h"
1055 -
1056 - #ifdef __APPLE__
1057 - #define lrand48 random
1058 ---- a/util/parse.h
1059 -+++ b/util/parse.h
1060 -@@ -12,7 +12,7 @@
1061 - #define __parse_h
1062 -
1063 - #if HAVE_CONFIG_H
1064 --#include <conf.h>
1065 -+#include "conf.h"
1066 - #endif
1067 -
1068 - #include <stdio.h>
1069 -@@ -33,12 +33,12 @@
1070 - #endif
1071 - #include <ctype.h>
1072 -
1073 --#include <prsetup.h>
1074 --#include <strtod.h>
1075 --#include <xalloc.h>
1076 --#include <word.h>
1077 --#include <gio.h>
1078 --#include <longlong.h>
1079 -+#include "prsetup.h"
1080 -+#include "strtod.h"
1081 -+#include "xalloc.h"
1082 -+#include "word.h"
1083 -+#include "gio.h"
1084 -+#include "longlong.h"
1085 -
1086 - #define PARSE_DEBUG 1
1087 - #if PARSE_DEBUG
1088 ---- a/util/strtod.h
1089 -+++ b/util/strtod.h
1090 -@@ -11,7 +11,7 @@
1091 - #ifndef __strtod_h
1092 - #define __strtod_h
1093 -
1094 --#include <prsetup.h>
1095 -+#include "prsetup.h"
1096 -
1097 - extern int SAOdtype;
1098 -
1099 ---- a/util/swap.h
1100 -+++ b/util/swap.h
1101 -@@ -11,7 +11,7 @@
1102 - #ifndef __swap_h
1103 - #define __swap_h
1104 -
1105 --#include <prsetup.h>
1106 -+#include "prsetup.h"
1107 -
1108 - /* data types */
1109 - #define TY_CHAR 1
1110 ---- a/util/tclmainlib.h
1111 -+++ b/util/tclmainlib.h
1112 -@@ -1,4 +1,4 @@
1113 --#include <mainlib.h>
1114 -+#include "mainlib.h"
1115 -
1116 - #if HAVE_TCL
1117 -
1118 ---- a/util/winprocess.h
1119 -+++ b/util/winprocess.h
1120 -@@ -13,7 +13,7 @@
1121 - #define __winprocess_h
1122 -
1123 - #if HAVE_CONFIG_H
1124 --#include <conf.h>
1125 -+#include "conf.h"
1126 - #endif
1127 - #include <stdio.h>
1128 - #ifdef HAVE_UNISTD_H
1129 -@@ -25,7 +25,7 @@
1130 - #ifdef HAVE_STDLIB_H
1131 - #include <stdlib.h>
1132 - #endif
1133 --#include <prsetup.h>
1134 -+#include "prsetup.h"
1135 -
1136 - #if defined(HAVE_CYGWIN) || defined(WIN32)
1137 -
1138 ---- a/util/word.h
1139 -+++ b/util/word.h
1140 -@@ -12,7 +12,7 @@
1141 - #define __word_h
1142 -
1143 - #if HAVE_CONFIG_H
1144 --#include <conf.h>
1145 -+#include "conf.h"
1146 - #endif
1147 - #ifdef HAVE_STRING_H
1148 - #include <string.h>
1149 -@@ -23,8 +23,8 @@
1150 - #if HAVE_STDLIB_H
1151 - #include <stdlib.h>
1152 - #endif
1153 --#include <prsetup.h>
1154 --#include <xalloc.h>
1155 -+#include "prsetup.h"
1156 -+#include "xalloc.h"
1157 -
1158 - /* defines the types of callback procedure we use */
1159 - typedef char *(*MacroCB)(
1160 ---- a/util/xalloc.h
1161 -+++ b/util/xalloc.h
1162 -@@ -12,7 +12,7 @@
1163 - #define __xalloc_h
1164 -
1165 - #if HAVE_CONFIG_H
1166 --#include <conf.h>
1167 -+#include "conf.h"
1168 - #endif
1169 -
1170 - #include <sys/types.h>
1171 -@@ -33,7 +33,7 @@
1172 - #include <setjmp.h>
1173 - #endif
1174 -
1175 --#include <prsetup.h>
1176 -+#include "prsetup.h"
1177 -
1178 - _PRbeg
1179 -
1180 ---- a/util/xfileio.h
1181 -+++ b/util/xfileio.h
1182 -@@ -7,7 +7,7 @@
1183 - #ifndef XFILEIO_H
1184 - #define XFILEIO_H
1185 -
1186 --#include <gio.h>
1187 -+#include "gio.h"
1188 -
1189 - /* define the basic IO routines */
1190 - typedef GIO File;
1191 ---- a/util/xlaunch.h
1192 -+++ b/util/xlaunch.h
1193 -@@ -12,7 +12,7 @@
1194 - #define __xlaunch_h
1195 -
1196 - #if HAVE_CONFIG_H
1197 --#include <conf.h>
1198 -+#include "conf.h"
1199 - #endif
1200 -
1201 - #include <stdio.h>
1202 -@@ -33,10 +33,10 @@
1203 - #if HAVE_POSIX_SPAWN
1204 - #include <spawn.h>
1205 - #endif
1206 --#include <xport.h>
1207 --#include <word.h>
1208 --#include <xalloc.h>
1209 --#include <prsetup.h>
1210 -+#include "xport.h"
1211 -+#include "word.h"
1212 -+#include "xalloc.h"
1213 -+#include "prsetup.h"
1214 -
1215 - #define LAUNCH_ARGS 1024
1216 -
1217 ---- a/util/xport.h
1218 -+++ b/util/xport.h
1219 -@@ -11,7 +11,7 @@
1220 - #define __xport_h
1221 -
1222 - #if HAVE_CONFIG_H
1223 --#include <conf.h>
1224 -+#include "conf.h"
1225 - #endif
1226 -
1227 - #if HAVE_MINGW32
1228 ---- a/util/zprocess.h
1229 -+++ b/util/zprocess.h
1230 -@@ -14,7 +14,7 @@
1231 - #define __zprocess_h
1232 -
1233 - #if HAVE_CONFIG_H
1234 --#include <conf.h>
1235 -+#include "conf.h"
1236 - #endif
1237 - #include <stdio.h>
1238 - #ifdef HAVE_UNISTD_H
1239 -@@ -28,8 +28,8 @@
1240 - #endif
1241 - #include <sys/time.h>
1242 - #include <signal.h>
1243 --#include <xlaunch.h>
1244 --#include <find.h>
1245 -+#include "xlaunch.h"
1246 -+#include "find.h"
1247 -
1248 - _PRbeg
1249 -
1250
1251 diff --git a/sci-astronomy/funtools/files/funtools-1.4.4-makefiles.patch b/sci-astronomy/funtools/files/funtools-1.4.4-makefiles.patch
1252 deleted file mode 100644
1253 index d1045b6..0000000
1254 --- a/sci-astronomy/funtools/files/funtools-1.4.4-makefiles.patch
1255 +++ /dev/null
1256 @@ -1,341 +0,0 @@
1257 -diff -Nur funtools-1.4.4.orig/filter/Makefile.in funtools-1.4.4/filter/Makefile.in
1258 ---- funtools-1.4.4.orig/filter/Makefile.in 2014-03-04 08:35:59.665478514 -0800
1259 -+++ funtools-1.4.4/filter/Makefile.in 2014-03-04 08:36:38.196760766 -0800
1260 -@@ -29,6 +29,9 @@
1261 -
1262 - prefix = @prefix@
1263 - exec_prefix = @exec_prefix@
1264 -+bindir = @bindir@
1265 -+includedir = @includedir@
1266 -+libdir = @libdir@
1267 -
1268 - # The following definition can be set to non-null for special systems
1269 - # like AFS with replication. It allows the pathnames used for installation
1270 -@@ -38,13 +41,13 @@
1271 - INSTALL_ROOT =
1272 -
1273 - # Directory in which to install the .a, .so, and .o files:
1274 --LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
1275 -+LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
1276 -
1277 - # Directory in which to install the programs:
1278 --BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
1279 -+BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir)
1280 -
1281 - # Directory in which to install the include files:
1282 --INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
1283 -+INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)/funtools/filter
1284 -
1285 - # util files are in the util directory at same level
1286 - UTIL_INC = -I../util
1287 -@@ -55,7 +58,7 @@
1288 - #FITSY_LIBS = -L../fitsy
1289 -
1290 - # wcs files are in the wcs subdirectory
1291 --WCS_INC = -I../wcs
1292 -+#WCS_INC = -I../wcs
1293 - #WCS_LIBS = -L../wcs -lwcs
1294 -
1295 - # extra includes for compiling
1296 -@@ -161,7 +164,7 @@
1297 - do \
1298 - if [ ! -d $$i ] ; then \
1299 - echo "Making directory $$i"; \
1300 -- mkdir $$i; \
1301 -+ mkdir -p $$i; \
1302 - chmod 755 $$i; \
1303 - else true; \
1304 - fi; \
1305 -@@ -228,6 +231,10 @@
1306 -
1307 - swap_c.h: swap.c inc.sed
1308 - $(RM) swap_c.h
1309 -+ ./inc.sed SWAP_C < swap.c > swap_c.h
1310 -+
1311 -+swap_c.h: swap.c inc.sed
1312 -+ $(RM) swap_c.h
1313 - ./inc.sed SWAP_C < swap.c > swap_c.h
1314 -
1315 - events_c.h: evfilter.c inc.sed
1316 -diff -Nur funtools-1.4.4.orig/fitsy/Makefile.in funtools-1.4.4/fitsy/Makefile.in
1317 ---- funtools-1.4.4.orig/fitsy/Makefile.in 2014-03-04 08:35:59.638478312 -0800
1318 -+++ funtools-1.4.4/fitsy/Makefile.in 2014-03-04 08:36:38.197760773 -0800
1319 -@@ -28,6 +28,11 @@
1320 -
1321 - prefix = @prefix@
1322 - exec_prefix = @exec_prefix@
1323 -+bindir = @bindir@
1324 -+includedir = @includedir@
1325 -+mandir = @mandir@
1326 -+datadir = @datadir@
1327 -+libdir = @libdir@
1328 -
1329 - # The following definition can be set to non-null for special systems
1330 - # like AFS with replication. It allows the pathnames used for installation
1331 -@@ -37,13 +42,13 @@
1332 - INSTALL_ROOT =
1333 -
1334 - # Directory in which to install the .a, .so, and .o files:
1335 --LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
1336 -+LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
1337 -
1338 - # Directory in which to install the programs:
1339 --BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
1340 -+BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir)
1341 -
1342 - # Directory in which to install the include files:
1343 --INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
1344 -+INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)/funtools/fitsy
1345 -
1346 - # There are just too many different versions of "install" around;
1347 - # better to use the install-sh script that comes with the distribution,
1348 -@@ -187,7 +192,7 @@
1349 - do \
1350 - if [ ! -d $$i ] ; then \
1351 - echo "Making directory $$i"; \
1352 -- mkdir $$i; \
1353 -+ mkdir -p $$i; \
1354 - chmod 755 $$i; \
1355 - else true; \
1356 - fi; \
1357 -diff -Nur funtools-1.4.4.orig/gnu/Makefile.in funtools-1.4.4/gnu/Makefile.in
1358 ---- funtools-1.4.4.orig/gnu/Makefile.in 2014-03-04 08:35:59.642478341 -0800
1359 -+++ funtools-1.4.4/gnu/Makefile.in 2014-03-04 08:36:38.197760773 -0800
1360 -@@ -21,6 +21,11 @@
1361 -
1362 - prefix = @prefix@
1363 - exec_prefix = @exec_prefix@
1364 -+bindir = @bindir@
1365 -+includedir = @includedir@
1366 -+mandir = @mandir@
1367 -+datadir = @datadir@
1368 -+libdir = @libdir@
1369 -
1370 - # The following definition can be set to non-null for special systems
1371 - # like AFS with replication. It allows the pathnames used for installation
1372 -@@ -53,13 +58,13 @@
1373 - EXTRA_OBJS = @EXTRA_OBJS@
1374 -
1375 - # Directory in which to install the .a, .so, and .o files:
1376 --LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
1377 -+LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
1378 -
1379 - # Directory in which to install the programs:
1380 --BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
1381 -+BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir)
1382 -
1383 - # Directory in which to install the include files:
1384 --INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
1385 -+INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)
1386 -
1387 - # There are just too many different versions of "install" around;
1388 - # better to use the install-sh script that comes with the distribution,
1389 -diff -Nur funtools-1.4.4.orig/Makefile.in funtools-1.4.4/Makefile.in
1390 ---- funtools-1.4.4.orig/Makefile.in 2014-03-04 08:35:59.665478514 -0800
1391 -+++ funtools-1.4.4/Makefile.in 2014-03-04 08:37:40.214224788 -0800
1392 -@@ -28,28 +28,33 @@
1393 -
1394 - prefix = @prefix@
1395 - exec_prefix = @exec_prefix@
1396 -+bindir = @bindir@
1397 -+includedir = @includedir@
1398 -+mandir = @mandir@
1399 -+datadir = @datadir@
1400 -+libdir = @libdir@
1401 -
1402 - # The following definition can be set to non-null for special systems
1403 - # like AFS with replication. It allows the pathnames used for installation
1404 - # to be different than those used for actually reference files at
1405 - # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
1406 - # when installing files.
1407 --INSTALL_ROOT =
1408 -+INSTALL_ROOT = $(DESTDIR)
1409 -
1410 - # Directory in which to install the .a or .so binary for the FUNTOOLS library:
1411 --LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
1412 -+LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
1413 -
1414 - # Directory in which to install the program wish:
1415 --BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
1416 -+BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir)
1417 -
1418 - # Directory in which to install the funtools.h include file:
1419 --INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
1420 -+INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)/funtools
1421 -
1422 - # Top-level directory for manual entries:
1423 --MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man
1424 -+MAN_INSTALL_DIR = $(INSTALL_ROOT)$(mandir)
1425 -
1426 - # Top-level directory for share entries:
1427 --MAN_SHARE_DIR = $(INSTALL_ROOT)$(prefix)/share/funtools
1428 -+MAN_SHARE_DIR = $(INSTALL_ROOT)$(datadir)/funtools
1429 -
1430 - # util files are in the util subdirectory
1431 - UTIL_INC = -I./util
1432 -@@ -60,8 +65,8 @@
1433 - # FITSY_LIBS = -L./fitsy -lfitsy
1434 -
1435 - # wcs files are in the wcs subdirectory
1436 --WCS_INC = -I./wcs
1437 --# WCS_LIBS = -L./wcs -lwcs
1438 -+#WCS_INC = -I../wcs
1439 -+#WCS_LIBS = -L./wcs -lwcs
1440 -
1441 - # filter files are in the filter subdirectory
1442 - FILTER_INC = -I./filter
1443 -@@ -160,7 +165,7 @@
1444 -
1445 - # this is used in the link line
1446 - # LLIB = $(LIB)
1447 --LLIB = @LLIB@
1448 -+LLIB = -L. -lfuntools
1449 -
1450 - # libraries containing main as subroutines
1451 - MAINLIB = lib$(PACKAGE)MainLib.a
1452 -@@ -188,7 +193,7 @@
1453 -
1454 - # Subdirectories to run make in for the primary targets.
1455 -
1456 --SUBLIBS = util fitsy wcs filter
1457 -+SUBLIBS = util fitsy filter
1458 -
1459 - SUBDIRS = $(SUBLIBS) gnu funtest faq
1460 -
1461 -@@ -225,10 +230,10 @@
1462 - echo $(PROGS) | ./mkfunmainlib > funmainlib.c;
1463 -
1464 - shlib: sublib $(LIBOBJS)
1465 -- @(rm -rf $(PACKAGE)tmp; mkdir $(PACKAGE)tmp; \
1466 -+ @(rm -rf $(PACKAGE)tmp; mkdir -p $(PACKAGE)tmp; \
1467 - (cd $(PACKAGE)tmp && ar x ../$(LIB)); \
1468 - CC='$(CC)' CXX=$(CXX) \
1469 -- ./mklib -o $(PACKAGE) $(PACKAGE)tmp/*.o; \
1470 -+ ./mklib $(PACKAGE)tmp/*.o $(LIBS) -o $(PACKAGE) ; \
1471 - rm -rf $(PACKAGE)tmp;)
1472 -
1473 - mainlib: $(MAINLIBOBJS) funmainlib.o lex.calc.o
1474 -@@ -237,7 +242,7 @@
1475 - $(RANLIB) lib$(PACKAGE)MainLib.a)
1476 -
1477 - shmainlib: mainlib
1478 -- @(rm -rf $(PACKAGE)tmp; mkdir $(PACKAGE)tmp; \
1479 -+ @(rm -rf $(PACKAGE)tmp; mkdir -p $(PACKAGE)tmp; \
1480 - (cd $(PACKAGE)tmp && ar x ../lib$(PACKAGE)MainLib.a); \
1481 - CC='$(CC)' CXX='$(CXX)' \
1482 - ./mklib -o $(PACKAGE)MainLib -L. -lfuntools $(PACKAGE)tmp/*.o;\
1483 -@@ -248,7 +253,7 @@
1484 - $(RANLIB) libtclfun.a)
1485 -
1486 - shtclfun: tclfun
1487 -- @(rm -rf $(PACKAGE)tmp; mkdir $(PACKAGE)tmp; \
1488 -+ @(rm -rf $(PACKAGE)tmp; mkdir -p $(PACKAGE)tmp; \
1489 - (cd $(PACKAGE)tmp && ar x ../$(LIB) && ar x ../libtclfun.a); \
1490 - CC='$(CC)' CXX='$(CXX)' \
1491 - ./mklib -o tclfun $(PACKAGE)tmp/*.o; \
1492 -@@ -386,7 +391,7 @@
1493 - @for dir in $(SUBDIRS); do \
1494 - echo " "; \
1495 - echo Installing in $$dir ...; \
1496 -- (cd $$dir; $(MAKE) $@) ; \
1497 -+ (cd $$dir; $(MAKE) INSTALL_ROOT=$(INSTALL_ROOT) INCLUDE_INSTALL_DIR=$(INCLUDE_INSTALL_DIR) $@) ; \
1498 - done
1499 -
1500 - install:: install-man
1501 -@@ -422,7 +427,7 @@
1502 - do \
1503 - if [ ! -d $$i ] ; then \
1504 - echo "Making directory $$i"; \
1505 -- mkdir $$i; \
1506 -+ mkdir -p $$i; \
1507 - chmod 755 $$i; \
1508 - else true; \
1509 - fi; \
1510 -@@ -462,7 +467,7 @@
1511 - install-man:
1512 - @if [ ! -d $(MAN_INSTALL_DIR) ] ; then \
1513 - echo "Making directory $(MAN_INSTALL_DIR)"; \
1514 -- mkdir $(MAN_INSTALL_DIR); \
1515 -+ mkdir -p $(MAN_INSTALL_DIR); \
1516 - chmod 755 $(MAN_INSTALL_DIR); \
1517 - else true; \
1518 - fi;
1519 -@@ -473,7 +478,7 @@
1520 - M="$(MAN_INSTALL_DIR)/man$$E"; \
1521 - if [ ! -d $$M ] ; then \
1522 - echo "Making directory $$M"; \
1523 -- mkdir $$M; \
1524 -+ mkdir -p $$M; \
1525 - chmod 755 $$M; \
1526 - else true; \
1527 - fi; \
1528 -diff -Nur funtools-1.4.4.orig/util/Makefile.in funtools-1.4.4/util/Makefile.in
1529 ---- funtools-1.4.4.orig/util/Makefile.in 2014-03-04 08:35:59.653478425 -0800
1530 -+++ funtools-1.4.4/util/Makefile.in 2014-03-04 08:36:38.197760773 -0800
1531 -@@ -29,6 +29,11 @@
1532 -
1533 - prefix = @prefix@
1534 - exec_prefix = @exec_prefix@
1535 -+bindir = @bindir@
1536 -+includedir = @includedir@
1537 -+mandir = @mandir@
1538 -+datadir = @datadir@
1539 -+libdir = @libdir@
1540 -
1541 - # The following definition can be set to non-null for special systems
1542 - # like AFS with replication. It allows the pathnames used for installation
1543 -@@ -38,13 +43,13 @@
1544 - INSTALL_ROOT =
1545 -
1546 - # Directory in which to install the .a, .so, and .o files:
1547 --LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
1548 -+LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
1549 -
1550 - # Directory in which to install the programs:
1551 --BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
1552 -+BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir)
1553 -
1554 - # Directory in which to install the include files:
1555 --INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
1556 -+INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)/funtools/util
1557 -
1558 - # extra includes for compiling
1559 - INCLUDES =
1560 -@@ -200,12 +205,24 @@
1561 - tlaunch2: tlaunch2.o
1562 - $(CC) $(LDFLAGS) tlaunch2.o -o tlaunch2
1563 -
1564 -+tlaunch.o: tlaunch.c
1565 -+
1566 -+tlaunch: tlaunch.o launch.o $(LIB)
1567 -+ $(CC) $(LDFLAGS) tlaunch.o launch.o -o tlaunch $(LIB) $(LIBS) \
1568 -+ $(EXTRA_LIBS)
1569 -+
1570 -+tlaunch2.o: tlaunch2.c
1571 -+
1572 -+tlaunch2: tlaunch2.o
1573 -+ $(CC) $(LDFLAGS) tlaunch2.o -o tlaunch2
1574 -+
1575 -+
1576 - install-binaries: $(LIB) $(PROGS)
1577 - @for i in $(LIB_INSTALL_DIR) $(INCLUDE_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
1578 - do \
1579 - if [ ! -d $$i ] ; then \
1580 - echo "Making directory $$i"; \
1581 -- mkdir $$i; \
1582 -+ mkdir -p $$i; \
1583 - chmod 755 $$i; \
1584 - else true; \
1585 - fi; \
1586 -@@ -272,4 +289,11 @@
1587 - purift $(CC) $(LDFLAGS) tlaunch.o xlaunch.o -o tlaunch \
1588 - $(LIB) $(LIBS) $(EXTRA_LIBS)
1589 -
1590 -+pure: tlaunch.pure
1591 -+
1592 -+tlaunch.pure: tlaunch.o launch.o $(LIB)
1593 -+ purift $(CC) $(LDFLAGS) tlaunch.o launch.o -o tlaunch \
1594 -+ $(LIB) $(LIBS) $(EXTRA_LIBS)
1595 -+
1596 -+
1597 - # DO NOT DELETE THIS LINE -- make depend depends on it.
1598
1599 diff --git a/sci-astronomy/funtools/funtools-1.4.4-r4.ebuild b/sci-astronomy/funtools/funtools-1.4.4-r4.ebuild
1600 deleted file mode 100644
1601 index dff3ed4..0000000
1602 --- a/sci-astronomy/funtools/funtools-1.4.4-r4.ebuild
1603 +++ /dev/null
1604 @@ -1,62 +0,0 @@
1605 -# Copyright 1999-2014 Gentoo Foundation
1606 -# Distributed under the terms of the GNU General Public License v2
1607 -# $Id$
1608 -
1609 -EAPI=5
1610 -inherit eutils toolchain-funcs multilib autotools
1611 -
1612 -DESCRIPTION="FITS library and utlities for astronomical images"
1613 -HOMEPAGE="http://www.cfa.harvard.edu/~john/funtools/"
1614 -SRC_URI="http://cfa-www.harvard.edu/~john/${PN}/${P}.tar.gz"
1615 -
1616 -LICENSE="LGPL-2.1"
1617 -SLOT="0"
1618 -KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
1619 -IUSE="doc static-libs"
1620 -
1621 -RDEPEND="
1622 - sys-libs/zlib
1623 - sci-astronomy/wcstools
1624 - sci-visualization/gnuplot"
1625 -DEPEND="${RDEPEND}
1626 - virtual/pkgconfig"
1627 -
1628 -src_prepare() {
1629 - epatch \
1630 - "${FILESDIR}"/${P}-ds9-fixes.patch \
1631 - "${FILESDIR}"/${P}-fix-autoheader.patch \
1632 - "${FILESDIR}"/${P}-fix-includes.patch \
1633 - "${FILESDIR}"/${P}-fix-hardening.patch \
1634 - "${FILESDIR}"/${P}-fix-crashes.patch \
1635 - "${FILESDIR}"/${P}-makefiles.patch
1636 - sed -i -e "s:/usr:${EPREFIX}/usr:g" filter/Makefile.in || die
1637 - sed -i \
1638 - -e "s:\${LINK}:\${LINK} ${LDFLAGS}:" \
1639 - mklib || die "sed for ldflags failed"
1640 - eautoreconf
1641 -}
1642 -
1643 -src_configure() {
1644 - econf \
1645 - --enable-shared \
1646 - --enable-dl \
1647 - --enable-mainlib \
1648 - --with-wcslib="$($(tc-getPKG_CONFIG) --libs wcstools)" \
1649 - --with-zlib="$($(tc-getPKG_CONFIG) --libs zlib)" \
1650 - --with-tcl=-ltcl
1651 -}
1652 -
1653 -src_compile() {
1654 - emake WCS_INC="$($(tc-getPKG_CONFIG) --cflags wcstools)"
1655 - emake shtclfun
1656 -}
1657 -
1658 -src_install () {
1659 - default
1660 - dosym libtclfun.so.1 /usr/$(get_libdir)/libtclfun.so
1661 - # install missing includes
1662 - insinto /usr/include/funtools/fitsy
1663 - doins fitsy/*.h
1664 - use static-libs || rm "${ED}"/usr/$(get_libdir)/lib*.a
1665 - use doc && cd doc && dodoc *.pdf && dohtml *html *c
1666 -}
1667
1668 diff --git a/sci-astronomy/funtools/funtools-1.4.6.ebuild b/sci-astronomy/funtools/funtools-1.4.6.ebuild
1669 new file mode 100644
1670 index 0000000..355501c
1671 --- /dev/null
1672 +++ b/sci-astronomy/funtools/funtools-1.4.6.ebuild
1673 @@ -0,0 +1,69 @@
1674 +# Copyright 1999-2016 Gentoo Foundation
1675 +# Distributed under the terms of the GNU General Public License v2
1676 +# $Id$
1677 +
1678 +EAPI=6
1679 +
1680 +inherit toolchain-funcs autotools
1681 +
1682 +DESCRIPTION="FITS library and utlities for astronomical images"
1683 +HOMEPAGE="https://github.com/ericmandel/funtools"
1684 +SRC_URI="https://github.com/ericmandel/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
1685 +
1686 +LICENSE="GPL-2"
1687 +SLOT="0/1"
1688 +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
1689 +IUSE="doc"
1690 +
1691 +RDEPEND="
1692 + sys-libs/zlib:0=
1693 + sci-astronomy/wcstools:0=
1694 + sci-visualization/gnuplot"
1695 +DEPEND="${RDEPEND}
1696 + virtual/pkgconfig"
1697 +
1698 +src_prepare() {
1699 + default
1700 + # respect libdir, dont build wcs, respect toolchain
1701 + sed -e "/INSTALL/s|/lib|/$(get_libdir)|g" \
1702 + -e 's|${OBJS}|$(OBJS)|g' \
1703 + -e '/^SUBLIBS/s|wcs||g' \
1704 + -e 's/mkdir/mkdir -p/g' \
1705 + -e '/mklib/s|-o $(PACKAGE)|-o $(PACKAGE) $(LIBS)|g' \
1706 + -e "s| ar| $(tc-getAR)|g" \
1707 + -e "s|ar cruv|$(tc-getAR) cruv|g" \
1708 + -e "s|WCS_INC.*=.*|WCS_INC = $($(tc-getPKG_CONFIG) --cflags wcstools)|g" \
1709 + -i Makefile.in */Makefile.in || die
1710 + # fix race condition (when ccache is on)
1711 + sed -e 's|$(LIB):|$(LIB): FORCE|g' \
1712 + -e '$aFORCE:' \
1713 + -i */Makefile.in || die
1714 + eautoreconf
1715 +}
1716 +
1717 +src_configure() {
1718 + econf \
1719 + --exec-prefix="${EPREFIX}/usr" \
1720 + --enable-shared \
1721 + --enable-dl \
1722 + --with-wcslib="$($(tc-getPKG_CONFIG) --libs wcstools)" \
1723 + --with-zlib="$($(tc-getPKG_CONFIG) --libs zlib)" \
1724 + --with-tcl="${EPREFIX}/usr/$(get_libdir)"
1725 +}
1726 +
1727 +src_compile() {
1728 + emake
1729 + emake shtclfun
1730 +}
1731 +
1732 +src_install () {
1733 + default
1734 + # install missing includes
1735 + insinto /usr/include/funtools/fitsy
1736 + doins fitsy/*.h
1737 + # fix bug #536630
1738 + mv "${ED}"/usr/share/man/man3/funopen.3 \
1739 + "${ED}"/usr/share/man/man7/funopen.7 \
1740 + || die
1741 + use doc && cd doc && dodoc *.pdf *html *c
1742 +}