debian/0000755000000000000000000000000012233244270007165 5ustar debian/clean0000644000000000000000000000027512233243666010206 0ustar config.status config.status.lineno Makefile */Makefile */config.status util/NaN.h util/config.status.lineno pkgIndex.tcl-old wcs/config.log gnu/_funsort gnu/sort.o conf.h */conf.h tclfun.c debian/libfuntools1.lintian-overrides0000644000000000000000000000004311764420163015170 0ustar spelling-error-in-binary * ang and debian/libfuntools1.install0000644000000000000000000000007012233243666013203 0ustar usr/lib/*/libfuntools.so.1 usr/lib/*/libfuntools.so.1.0 debian/compat0000644000000000000000000000000212173312222010357 0ustar 9 debian/changelog0000644000000000000000000000245412233243767011056 0ustar funtools (1.4.4-6) unstable; urgency=low * update config.{sub,guess} for the AArch64 port. Closes: #727381 -- Ole Streicher Sun, 27 Oct 2013 18:02:49 +0100 funtools (1.4.4-5) unstable; urgency=low * Enable multiarch for library (not for tcl yet). -- Ole Streicher Sun, 29 Sep 2013 15:15:17 +0200 funtools (1.4.4-4) unstable; urgency=low * Check command line input for funjoin and funimage. Closes: #715928, #715929 * Push standards version. No changes needed. * Use hardening flags. * Remove now-unneeded DMUA flag. -- Ole Streicher Mon, 22 Jul 2013 22:03:24 +0200 funtools (1.4.4-3) unstable; urgency=low * Update ds9 patches from version 7.0 * Set DM-Upload-Allowed: yes -- Ole Streicher Sun, 10 Jun 2012 10:00:00 +0200 funtools (1.4.4-2) unstable; urgency=low * Add dependency of libwcstools-dev to libfuntools-dev * Build on HURD and GNU/KFreeBSD * Update copyright and policy versions * Allow to include funtools/funtools.h without -I/usr/include/funtools -- Ole Streicher Tue, 10 Apr 2012 16:30:00 +0200 funtools (1.4.4-1) unstable; urgency=low * Initial release. (Closes: #655653) -- Ole Streicher Mon, 06 Feb 2012 09:20:00 +0100 debian/control0000644000000000000000000000755612233243666010615 0ustar Source: funtools Section: science Priority: optional Maintainer: Debian Science Maintainers Uploaders: Ole Streicher Build-Depends: autotools-dev, debhelper (>= 9), dh-autoreconf, gawk, libwcstools-dev, tcl-dev, zlib1g-dev Standards-Version: 3.9.4 Homepage: https://www.cfa.harvard.edu/~john/funtools/ Vcs-Git: git://anonscm.debian.org/debian-science/packages/funtools.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/funtools.git Package: funtools Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: Minimal buy-in FITS utility package Funtools, is a "minimal buy-in" FITS library and utility package developed at the High Energy Astrophysics Division of SAO. The Funtools library provides simplified access to a wide array of file types: standard astronomical FITS images and binary tables, raw arrays and binary event lists, and even tables of ASCII column data. A sophisticated region filtering library (compatible with ds9) filters images and tables using boolean operations between geometric shapes, support world coordinates, etc. Funtools also supports advanced capabilities such as optimized data searching using index files. . This package contains the tools. Package: libfuntools1 Section: libs Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same Description: Minimal buy-in FITS library Funtools, is a "minimal buy-in" FITS library and utility package developed at the High Energy Astrophysics Division of SAO. The Funtools library provides simplified access to a wide array of file types: standard astronomical FITS images and binary tables, raw arrays and binary event lists, and even tables of ASCII column data. A sophisticated region filtering library (compatible with ds9) filters images and tables using boolean operations between geometric shapes, support world coordinates, etc. Funtools also supports advanced capabilities such as optimized data searching using index files. . This library contains the shared library. Package: libfuntools-dev Section: libdevel Architecture: any Depends: libfuntools1 (= ${binary:Version}), libwcstools-dev, ${misc:Depends} Description: Minimal buy-in FITS library (development files) Funtools, is a "minimal buy-in" FITS library and utility package developed at the High Energy Astrophysics Division of SAO. The Funtools library provides simplified access to a wide array of file types: standard astronomical FITS images and binary tables, raw arrays and binary event lists, and even tables of ASCII column data. A sophisticated region filtering library (compatible with ds9) filters images and tables using boolean operations between geometric shapes, support world coordinates, etc. Funtools also supports advanced capabilities such as optimized data searching using index files. . This package contains the development files. Package: tcl-funtools Section: interpreters Architecture: any Depends: libfuntools1 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Description: Minimal buy-in FITS library (Tcl interface) Funtools, is a "minimal buy-in" FITS library and utility package developed at the High Energy Astrophysics Division of SAO. The Funtools library provides simplified access to a wide array of file types: standard astronomical FITS images and binary tables, raw arrays and binary event lists, and even tables of ASCII column data. A sophisticated region filtering library (compatible with ds9) filters images and tables using boolean operations between geometric shapes, support world coordinates, etc. Funtools also supports advanced capabilities such as optimized data searching using index files. . This package contains the Tcl interface. debian/copyright0000644000000000000000000000664211764427005011137 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: funtools Upstream-Author: Eric Mandel Source: http://hea-www.harvard.edu/saord/funtools/ Files: * Copyright: Copyright (c) 1998-2007 Smithsonian Astrophysical Observatory, Cambridge, MA, USA Copyright (c) 1991-2003 John B. Roll jr. Copyright (C) 1988-1995 Free Software Foundation, Inc. License: GPLv2 Funtools is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . Correspondence concerning Funtools should be addressed as follows: . Eric Mandel Smithsonian Astrophysical Observatory MS 3 60 Garden St. Cambridge, MA 02138 USA eric@cfa.harvard.edu . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. Files: wcs/* Copyright: Copyright (C) 1994-2002, Mark Calabretta Copyright (c) 1998-2007 Smithsonian Astrophysical Observatory, Cambridge, MA, USA License: LGPLv2+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. . On Debian systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL-2'. . Remark by Ole Streicher: These source files are not used to build the package. Instead, the distributed debian package libwcstools-dev is used. Files: util/zlib-1.2.3/* Copyright: Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler License: BSD This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. . Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: . 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. . Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu . Remark by Ole Streicher: These source files are not used to build the package. Instead, the distributed debian package zlib-dev is used. Files: debian/* Copyright: not applicable License: public-domain Debian packaging by Ole Streicher debian/libfuntools-dev.install0000644000000000000000000000023012233243666013674 0ustar usr/include/funtools/*.h usr/lib/*/libfuntools.a usr/lib/*/libfuntools.so usr/lib/*/pkgconfig/funtools.pc usr/share/man/man3/*.3 usr/share/man/man7/*.7 debian/watch0000644000000000000000000000011511764420163010220 0ustar version=3 http://cfa-www.harvard.edu/~john/funtools .+funtools-(.+)\.tar\.gz debian/funtools.install0000644000000000000000000000040711764420163012434 0ustar usr/bin/funcalc usr/bin/funcen usr/bin/funcnts usr/bin/funcone usr/bin/fundisp usr/bin/funds9 usr/bin/funhead usr/bin/funhist usr/bin/funimage usr/bin/funindex usr/bin/funjoin usr/bin/funmerge usr/bin/funsky usr/bin/funtable usr/bin/funtbl usr/share/man/man1/*.1 debian/patches/0000755000000000000000000000000012233243666010624 5ustar debian/patches/fix_includes.patch0000644000000000000000000002435411764420163014326 0ustar Author: Ole Streicher Description: The include files are going to be installed in /usr/include/funtools. So, they should refer to each other by using "" instead of <> which also searches in the current directory. --- a/filter/column.h +++ b/filter/column.h @@ -12,14 +12,14 @@ #define __column_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #ifdef HAVE_STRING_H #include #endif -#include +#include "prsetup.h" _PRbeg void ColumnLoad _PRx((char *ibuf, int size, int n, int convert, void *obuf)); --- a/filter/dl.h +++ b/filter/dl.h @@ -2,14 +2,14 @@ #define __dl_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #ifdef HAVE_DLFCN_H #include #endif -#include +#include "prsetup.h" _PRbeg --- a/filter/filter.h +++ b/filter/filter.h @@ -12,7 +12,7 @@ #define __filter_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif /* avoid use of system -- its not secure */ @@ -34,28 +34,28 @@ #include #endif #include -#include -#include -#include -#include -#include -#include -#include -#include +#include "prsetup.h" +#include "gio.h" +#include "file.h" +#include "find.h" +#include "macro.h" +#include "word.h" +#include "xalloc.h" +#include "strtod.h" #define USE_XFILEIO 1 -#include +#include "fitsy.h" #undef USE_XFILEIO -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "idx.h" +#include "wcs.h" +#include "column.h" +#include "tl.h" +#include "dl.h" +#include "mkrtemp.h" +#include "zprocess.h" +#include "winprocess.h" +#include "parse.h" #ifdef USE_LAUNCH -#include +#include "xlaunch.h" #endif #ifndef OBJPATH --- a/filter/idx.h +++ b/filter/idx.h @@ -11,9 +11,9 @@ #define __idx_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif -#include +#include "prsetup.h" #include #include #ifdef HAVE_UNISTD_H @@ -22,10 +22,10 @@ #ifdef HAVE_STRING_H #include #endif -#include -#include -#include -#include +#include "fitsy.h" +#include "gio.h" +#include "xalloc.h" +#include "strtod.h" /* binary search edge */ #define IDX_EDGE_LEFT 1 --- a/filter/tl.h +++ b/filter/tl.h @@ -11,7 +11,7 @@ #ifndef __tl_h #define __tl_h -#include +#include "prsetup.h" _PRbeg --- a/fitsy/fitsy.h +++ b/fitsy/fitsy.h @@ -5,13 +5,13 @@ #define FITSY_H #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #if USE_XFILEIO -#include +#include "xfileio.h" #else -#include +#include "xfile.h" #endif #ifdef __STDC__ @@ -30,7 +30,7 @@ #include -#include +#include "longlong.h" #ifndef NULL #define NULL 0 --- a/funtools.h +++ b/funtools.h @@ -27,11 +27,11 @@ #define FUN_VERSION "1.4.4" #ifndef FUNTOOLS_PRIVATE -#include +#include "prsetup.h" #define USE_XFILEIO 1 -#include +#include "fitsy.h" #undef USE_XFILEIO -#include +#include "wcs.h" typedef void *Fun; #endif --- a/funtoolsP.h +++ b/funtoolsP.h @@ -12,7 +12,7 @@ #define __funtoolsP_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #include @@ -32,20 +32,20 @@ #include #endif #include -#include +#include "prsetup.h" #define USE_XFILEIO 1 -#include +#include "fitsy.h" #undef USE_XFILEIO -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "wcs.h" +#include "filter.h" +#include "file.h" +#include "swap.h" +#include "word.h" +#include "parse.h" +#include "xalloc.h" +#include "mkrtemp.h" +#include "NaN.h" +#include "xlaunch.h" #ifndef MAXINT #define MAXINT 2147483647 @@ -338,6 +338,6 @@ int FunView _PRx((Fun fun, char *view, char *vmode, char *fname, int fmax)); _PRend -#include +#include "funtools.h" #endif /* __funtoolsP.h */ --- a/ofuntools.h +++ b/ofuntools.h @@ -27,11 +27,11 @@ #define FUN_VERSION "1.4.4" #ifndef FUNTOOLS_PRIVATE -#include +#include "prsetup.h" #define USE_XFILEIO 1 -#include +#include "fitsy.h" #undef USE_XFILEIO -#include +#include "wcs.h" typedef void *Fun; #endif --- a/util/NaN.h.in +++ b/util/NaN.h.in @@ -20,7 +20,7 @@ #ifndef __nan_h #define __nan_h -#include +#include "prsetup.h" #define BIGENDIAN @BIGENDIAN@ --- a/util/file.h +++ b/util/file.h @@ -12,7 +12,7 @@ #define __file_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #include @@ -28,9 +28,9 @@ #endif #include #include -#include -#include -#include +#include "prsetup.h" +#include "macro.h" +#include "xalloc.h" _PRbeg int FileExists _PRx((char *filename)); --- a/util/find.h +++ b/util/find.h @@ -12,7 +12,7 @@ #define __find_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #include @@ -25,8 +25,8 @@ #endif #include #include -#include -#include +#include "xalloc.h" +#include "prsetup.h" _PRbeg --- a/util/gio.h +++ b/util/gio.h @@ -11,10 +11,10 @@ #ifndef _gio_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif -#include +#include "xport.h" #include #ifdef HAVE_STRING_H @@ -46,8 +46,8 @@ #include #include -#include -#include +#include "prsetup.h" +#include "xalloc.h" /* use ftello/fseeko (assuming its available) if we are using 64-bit offsets */ #if _FILE_OFFSET_BITS == 64 --- a/util/macro.h +++ b/util/macro.h @@ -12,7 +12,7 @@ #define __macro_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #include @@ -26,7 +26,7 @@ #ifdef HAVE_STDLIB_H #include #endif -#include +#include "prsetup.h" typedef char *(*MacroCall)( #ifdef ANSI_FUNC --- a/util/mainlib.h +++ b/util/mainlib.h @@ -12,7 +12,7 @@ #define __mainlib_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #ifdef HAVE_STRING_H #include @@ -29,11 +29,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include "prsetup.h" +#include "xalloc.h" +#include "word.h" +#include "find.h" +#include "gio.h" /* types of mainlibs we recognize */ #define MAINLIB_ERROR 0 --- a/util/mkrtemp.h +++ b/util/mkrtemp.h @@ -12,7 +12,7 @@ #define __mkrtemp_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #include @@ -31,9 +31,9 @@ #ifdef HAVE_STDLIB_H #include #endif -#include -#include -#include +#include "prsetup.h" +#include "word.h" +#include "xalloc.h" #ifdef __APPLE__ #define lrand48 random --- a/util/parse.h +++ b/util/parse.h @@ -12,7 +12,7 @@ #define __parse_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #include @@ -33,12 +33,12 @@ #endif #include -#include -#include -#include -#include -#include -#include +#include "prsetup.h" +#include "strtod.h" +#include "xalloc.h" +#include "word.h" +#include "gio.h" +#include "longlong.h" #define PARSE_DEBUG 1 #if PARSE_DEBUG --- a/util/strtod.h +++ b/util/strtod.h @@ -11,7 +11,7 @@ #ifndef __strtod_h #define __strtod_h -#include +#include "prsetup.h" extern int SAOdtype; --- a/util/swap.h +++ b/util/swap.h @@ -11,7 +11,7 @@ #ifndef __swap_h #define __swap_h -#include +#include "prsetup.h" /* data types */ #define TY_CHAR 1 --- a/util/tclmainlib.h +++ b/util/tclmainlib.h @@ -1,4 +1,4 @@ -#include +#include "mainlib.h" #if HAVE_TCL --- a/util/winprocess.h +++ b/util/winprocess.h @@ -13,7 +13,7 @@ #define __winprocess_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #include #ifdef HAVE_UNISTD_H @@ -25,7 +25,7 @@ #ifdef HAVE_STDLIB_H #include #endif -#include +#include "prsetup.h" #if defined(HAVE_CYGWIN) || defined(WIN32) --- a/util/word.h +++ b/util/word.h @@ -12,7 +12,7 @@ #define __word_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #ifdef HAVE_STRING_H #include @@ -23,8 +23,8 @@ #if HAVE_STDLIB_H #include #endif -#include -#include +#include "prsetup.h" +#include "xalloc.h" /* defines the types of callback procedure we use */ typedef char *(*MacroCB)( --- a/util/xalloc.h +++ b/util/xalloc.h @@ -12,7 +12,7 @@ #define __xalloc_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #include @@ -33,7 +33,7 @@ #include #endif -#include +#include "prsetup.h" _PRbeg --- a/util/xfileio.h +++ b/util/xfileio.h @@ -7,7 +7,7 @@ #ifndef XFILEIO_H #define XFILEIO_H -#include +#include "gio.h" /* define the basic IO routines */ typedef GIO File; --- a/util/xlaunch.h +++ b/util/xlaunch.h @@ -12,7 +12,7 @@ #define __xlaunch_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #include @@ -33,10 +33,10 @@ #if HAVE_POSIX_SPAWN #include #endif -#include -#include -#include -#include +#include "xport.h" +#include "word.h" +#include "xalloc.h" +#include "prsetup.h" #define LAUNCH_ARGS 1024 --- a/util/xport.h +++ b/util/xport.h @@ -11,7 +11,7 @@ #define __xport_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #if HAVE_MINGW32 --- a/util/zprocess.h +++ b/util/zprocess.h @@ -14,7 +14,7 @@ #define __zprocess_h #if HAVE_CONFIG_H -#include +#include "conf.h" #endif #include #ifdef HAVE_UNISTD_H @@ -28,8 +28,8 @@ #endif #include #include -#include -#include +#include "xlaunch.h" +#include "find.h" _PRbeg debian/patches/fix_hardening.patch0000644000000000000000000000352312173316012014442 0ustar Author: Ole Streicher Description: Fix the format string for fprintf --- a/gnu/sort.c +++ b/gnu/sort.c @@ -2775,7 +2775,7 @@ xfwrite (buf, 1, cc, ofp); if (ferror (fp)) { - fprintf (stderr, files[i]); + fprintf (stderr, "%s", files[i]); cleanup (); exit (2); } --- a/Makefile.in +++ b/Makefile.in @@ -137,7 +137,7 @@ CC = @CC@ -CC_SWITCHES = -I. ${CFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS} +CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS} DEPEND_SWITCHES = -I. ${CFLAGS} ${INCLUDES} ${AC_FLAGS} --- a/filter/Makefile.in +++ b/filter/Makefile.in @@ -114,7 +114,7 @@ CC = @CC@ -CC_SWITCHES = -I. ${CFLAGS} -DFILT_VERSION="\"$(VERSION)\"" @USE_DL@ \ +CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} -DFILT_VERSION="\"$(VERSION)\"" @USE_DL@ \ ${INCLUDES} ${AC_FLAGS} DEPEND_SWITCHES = -I. ${CFLAGS} -I. ${INCLUDES} ${AC_FLAGS} --- a/gnu/Makefile.in +++ b/gnu/Makefile.in @@ -87,7 +87,7 @@ CC = @CC@ -CC_SWITCHES = ${CFLAGS} ${INCLUDES} ${AC_FLAGS} +CC_SWITCHES = ${CFLAGS} ${CPPFLAGS} ${INCLUDES} ${AC_FLAGS} DEPEND_SWITCHES = ${CFLAGS} ${INCLUDES} ${AC_FLAGS} --- a/util/Makefile.in +++ b/util/Makefile.in @@ -105,7 +105,7 @@ CC = @CC@ -CC_SWITCHES = -I. ${CFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS} +CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS} DEPEND_SWITCHES = -I. ${CFLAGS} ${INCLUDES} ${AC_FLAGS} --- a/mklib +++ b/mklib @@ -169,7 +169,7 @@ rm -f ${LIBNAME}.so # make lib - ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} + ${LINK} ${LDFLAGS} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} # make usual symlinks ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so debian/patches/use_shared_libwcstools.patch0000644000000000000000000000375311764420163016420 0ustar Author: Ole Streicher Description: Use the shared libwcstools package instead of the convienence copy. --- sao-funtools-1.4.4.orig/Makefile.in +++ sao-funtools-1.4.4/Makefile.in @@ -60,8 +60,8 @@ FITSY_INC = -I./fitsy # FITSY_LIBS = -L./fitsy -lfitsy # wcs files are in the wcs subdirectory -WCS_INC = -I./wcs -# WCS_LIBS = -L./wcs -lwcs +WCS_INC = +WCS_LIBS = -lwcstools # filter files are in the filter subdirectory FILTER_INC = -I./filter @@ -188,7 +188,7 @@ DEVEL = # Subdirectories to run make in for the primary targets. -SUBLIBS = util fitsy wcs filter +SUBLIBS = util fitsy filter SUBDIRS = $(SUBLIBS) gnu funtest faq --- a/funcen.c +++ b/funcen.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #define MAXROW 8192 --- a/funmerge.c +++ b/funmerge.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include --- a/funtools.h +++ b/funtools.h @@ -31,7 +31,7 @@ #define USE_XFILEIO 1 #include "fitsy.h" #undef USE_XFILEIO -#include "wcs.h" +#include typedef void *Fun; #endif --- a/funwcs.c +++ b/funwcs.c @@ -3,7 +3,7 @@ */ #include -#include +#include /* * --- a/ofuntools.h +++ b/ofuntools.h @@ -31,7 +31,7 @@ #define USE_XFILEIO 1 #include "fitsy.h" #undef USE_XFILEIO -#include "wcs.h" +#include typedef void *Fun; #endif --- a/funtoolsP.h +++ b/funtoolsP.h @@ -36,7 +36,7 @@ #define USE_XFILEIO 1 #include "fitsy.h" #undef USE_XFILEIO -#include "wcs.h" +#include #include "filter.h" #include "file.h" #include "swap.h" --- a/filter/filter.h +++ b/filter/filter.h @@ -46,7 +46,7 @@ #include "fitsy.h" #undef USE_XFILEIO #include "idx.h" -#include "wcs.h" +#include #include "column.h" #include "tl.h" #include "dl.h" debian/patches/fix_autoheader.patch0000644000000000000000000000723611764420163014641 0ustar Author: Ole Streicher Description: Fix the AC_DEFINE lines so that autoheader (and therefore dh_autoreconf) works --- a/configure.ac +++ b/configure.ac @@ -193,7 +193,7 @@ AC_MSG_RESULT($fun_ok) SC_PATH_TCLCONFIG if test x"${no_tcl}" = x ; then - AC_DEFINE(HAVE_TCL) + AC_DEFINE([HAVE_TCL], [1], [Define if tcl is used.]) fi AC_PROG_AWK @@ -218,7 +218,7 @@ POST="|\& cat" case $host_os in *cygwin*|*Cygwin* ) CFLAGS="$CFLAGS -enable-auto-import" - AC_DEFINE(HAVE_CYGWIN) + AC_DEFINE([HAVE_CYGWIN], [], [Define if the cygwin compiler is used.]) AC_MSG_RESULT(flagging Cygwin) PRE="sh -c {" POST="}" @@ -226,7 +226,7 @@ case $host_os in *mingw32*|*Mingw32*) CFLAGS="$CFLAGS -mconsole" EXTRA_LIBS="$EXTRA_LIBS -lwsock32" - AC_DEFINE(HAVE_MINGW32) + AC_DEFINE([HAVE_MINGW32], [], [Define if the mingw32 compiler is used.]) AC_MSG_RESULT(flagging MinGW) ;; *osf*|*Osf*) --- a/filter/configure.ac +++ b/filter/configure.ac @@ -150,7 +150,7 @@ PRE="" POST="|\& cat" case $host_os in *cygwin*|*Cygwin* ) - AC_DEFINE(HAVE_CYGWIN) + AC_DEFINE([HAVE_CYGWIN], [], [Define if the cygwin compiler is used.]) AC_MSG_RESULT(flagging Cygwin) PRE="sh -c {" POST="}" @@ -158,7 +158,7 @@ case $host_os in *mingw32*|*Mingw32*) CFLAGS="$CFLAGS -mconsole" EXTRA_LIBS="$EXTRA_LIBS -lwsock32" - AC_DEFINE(HAVE_MINGW32) + AC_DEFINE([HAVE_MINGW32], [], [Define if the mingw32 compiler is used.]) AC_MSG_RESULT(flagging MinGW) ;; *osf*|*Osf*) --- a/fitsy/configure.ac +++ b/fitsy/configure.ac @@ -121,7 +121,7 @@ PRE="" POST="|\& cat" case $host_os in *cygwin*|*Cygwin* ) - AC_DEFINE(HAVE_CYGWIN) + AC_DEFINE([HAVE_CYGWIN], [], [Define if the cygwin compiler is used.]) AC_MSG_RESULT(flagging Cygwin) PRE="sh -c {" POST="}" @@ -129,7 +129,7 @@ case $host_os in *mingw32*|*Mingw32*) CFLAGS="$CFLAGS -mconsole" EXTRA_LIBS="$EXTRA_LIBS -lwsock32" - AC_DEFINE(HAVE_MINGW32) + AC_DEFINE([HAVE_MINGW32], [], [Define if the mingw32 compiler is used.]) AC_MSG_RESULT(flagging MinGW) ;; *darwin*|*Darwin*) --- a/util/configure.ac +++ b/util/configure.ac @@ -133,7 +133,7 @@ fi SC_PATH_TCLCONFIG if test x"${no_tcl}" = x ; then - AC_DEFINE(HAVE_TCL) + AC_DEFINE([HAVE_TCL], [1], [Define if tcl is used.]) fi AC_MSG_CHECKING(for external zlib) @@ -146,7 +146,7 @@ PRE="" POST="|\& cat" case $host_os in *cygwin*|*Cygwin* ) - AC_DEFINE(HAVE_CYGWIN) + AC_DEFINE([HAVE_CYGWIN], [], [Define if the cygwin compiler is used.]) AC_MSG_RESULT(flagging Cygwin) PRE="sh -c {" POST="}" @@ -154,7 +154,7 @@ case $host_os in *mingw32*|*Mingw32*) CFLAGS="$CFLAGS -mconsole" EXTRA_LIBS="$EXTRA_LIBS -lwsock32" - AC_DEFINE(HAVE_MINGW32) + AC_DEFINE([HAVE_MINGW32], [], [Define if the mingw32 compiler is used.]) AC_MSG_RESULT(flagging MinGW) ;; *osf*|*Osf*) --- a/wcs/configure.ac +++ b/wcs/configure.ac @@ -125,7 +125,7 @@ PRE="" POST="|\& cat" case $host_os in *cygwin*|*Cygwin* ) - AC_DEFINE(HAVE_CYGWIN) + AC_DEFINE([HAVE_CYGWIN], [], [Define if the cygwin compiler is used.]) AC_MSG_RESULT(flagging Cygwin) PRE="sh -c {" POST="}" @@ -133,7 +133,7 @@ case $host_os in *mingw32*|*Mingw32*) CFLAGS="$CFLAGS -mconsole" EXTRA_LIBS="$EXTRA_LIBS -lwsock32" - AC_DEFINE(HAVE_MINGW32) + AC_DEFINE([HAVE_MINGW32], [], [Define if the mingw32 compiler is used.]) AC_MSG_RESULT(flagging MinGW) ;; *osf*|*Osf*) debian/patches/series0000644000000000000000000000034612233243666012044 0ustar fix_hardening.patch fix_paths.patch fix_manpages.patch fix_autoheader.patch link_to_so.patch fix_includes.patch use_shared_libwcstools.patch build_tclfun.patch build_bsd+hurd.patch ds9_fixes.diff fix_crashes.patch multiarch.patch debian/patches/fix_manpages.patch0000644000000000000000000002474111764420163014313 0ustar Author: Ole Streicher Description: Fix manpages (section and name) so that lintian does not complain --- a/Makefile.in +++ b/Makefile.in @@ -462,14 +462,19 @@ install-binaries: lib $(PROGS) $(SCRIPTS) $(DS9HELPERS) install-man: @if [ ! -d $(MAN_INSTALL_DIR) ] ; then \ echo "Making directory $(MAN_INSTALL_DIR)"; \ - mkdir $(MAN_INSTALL_DIR); \ + mkdir -p $(MAN_INSTALL_DIR); \ chmod 755 $(MAN_INSTALL_DIR); \ else true; \ fi; @-(for i in `ls ./man/man?/*.?` ; \ do \ - B=`basename $$i`; \ - E=`echo $$i | awk -F. '{print $$NF}'`; \ + B=`basename $$i|sed s/\\\\.n/.7/`; \ + E=`echo $$i | awk -F. '{print $$NF}' | sed s/n/7/`; \ + case $$B in \ + funds9.7) \ + B=funds9.1; \ + E=1;; \ + esac; \ M="$(MAN_INSTALL_DIR)/man$$E"; \ if [ ! -d $$M ] ; then \ echo "Making directory $$M"; \ @@ -479,6 +484,9 @@ fi; \ echo "Installing $$B" ; \ $(INSTALL_DATA) $$i $$M/$$B; \ + sed -i "s/\([ \"\']\)\(-[A-Za-z0-9]\)/\1\\\\\2/g" $$M/$$B ; \ + sed -i "s/^\\\&\\\fB\(.*\):\(.*\)\\\fR/\1 \- \2/g" $$M/$$B ;\ + sed -i "s/funtools(n)/funtools(7)/g" $$M/$$B ; \ done;) install-share: --- a/man/man1/fundisp.1 +++ b/man/man1/fundisp.1 @@ -530,7 +530,6 @@ such as sed, at the cost of generating unaligned columns. For example: .PP fundisp \-F',' snr.ev'[cir 512 512 .1]' X, Y, \s-1PHA\s0, \s-1PI\s0, \s-1TIME\s0, \s-1DX\s0, \s-1DY\s0 -\&\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\- 512, 512, 6, 7, 79493997.45854475, 578, 574 512, 512, 8, 9, 79494575.58943175, 579, 573 512, 512, 5, 6, 79493631.03866175, 578, 575 @@ -539,7 +538,6 @@ fundisp \-F',' snr.ev'[cir 512 512 .1]' .PP fundisp \-F',' snr.ev'[cir 512 512 .1]' | sed 's/ *, */,/g' X,Y,PHA,PI,TIME,DX,DY -\&\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\-,\-\-\-\-\-\-\-\- 512,512,6,7,79493997.45854475,578,574 512,512,8,9,79494575.58943175,579,573 512,512,5,6,79493631.03866175,578,575 --- a/man/mann/funcombine.n +++ b/man/mann/funcombine.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "funcombine n" -.TH funcombine n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "funcombine 7" +.TH funcombine 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBFunCombine: Combining Region and Table Filters\fR .SH "SYNOPSIS" --- a/man/mann/funds9.n +++ b/man/mann/funds9.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "funds9 n" -.TH funds9 n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "funds9 1" +.TH funds9 1 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBFunDS9: Funtools and DS9 Image Display\fR .SH "SYNOPSIS" --- a/man/mann/funenv.n +++ b/man/mann/funenv.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "funenv n" -.TH funenv n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "funenv 7" +.TH funenv 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBFunEnv: Funtools Environment Variables\fR .SH "SYNOPSIS" --- a/man/mann/funfiles.n +++ b/man/mann/funfiles.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "funfiles n" -.TH funfiles n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "funfiles 7" +.TH funfiles 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBFunFiles: Funtools Data Files\fR .SH "SYNOPSIS" --- a/man/mann/funfilters.n +++ b/man/mann/funfilters.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "funfilters n" -.TH funfilters n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "funfilters 7" +.TH funfilters 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBFunfilters: Filtering Rows in a Table\fR .SH "SYNOPSIS" --- a/man/mann/funidx.n +++ b/man/mann/funidx.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "funidx n" -.TH funidx n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "funidx 7" +.TH funidx 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBFunidx: Using Indexes to Filter Rows in a Table\fR .SH "SYNOPSIS" --- a/man/mann/funregions.n +++ b/man/mann/funregions.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "funregions n" -.TH funregions n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "funregions 7" +.TH funregions 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBRegions: Spatial Region Filtering\fR .SH "SYNOPSIS" --- a/man/mann/funtext.n +++ b/man/mann/funtext.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "funtext n" -.TH funtext n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "funtext 7" +.TH funtext 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBFuntext: Support for Column\-based Text Files\fR .SH "SYNOPSIS" --- a/man/mann/funtools.n +++ b/man/mann/funtools.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "funtools n" -.TH funtools n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "funtools 7" +.TH funtools 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBFuntools: FITS Users Need Tools\fR .SH "SYNOPSIS" @@ -208,7 +208,7 @@ Funtools \s-1ASCII\s0 output [\fIfuntbl\fR\|(1)] .IP "\(bu" 4 funtools and ds9 image display -[funds9(n)] +[funds9(7)] .RE .RS 4 .RE @@ -302,7 +302,7 @@ imblank: blank out image values below a threshold .RE .IP "\(bu" 4 Funtools Data Files -[funfiles(n)] +[funfiles(7)] .RS 4 .IP "\(bu" 4 Supported Data Formats @@ -334,35 +334,35 @@ Funtools Data Filtering .RS 4 .IP "\(bu" 4 Table Filtering -[funfilters(n)] +[funfilters(7)] .IP "\(bu" 4 Fast Table Filtering using Indexes -[funidx(n)] +[funidx(7)] .IP "\(bu" 4 Spatial Region Filtering -[funregions(n)] +[funregions(7)] .RS 4 .IP "\(bu" 4 Region Geometry -[reggeometry(n)] +[reggeometry(7)] .IP "\(bu" 4 Region Algebra -[regalgebra(n)] +[regalgebra(7)] .IP "\(bu" 4 Region Coordinates -[regcoords(n)] +[regcoords(7)] .IP "\(bu" 4 Region Boundaries -[regbounds(n)] +[regbounds(7)] .IP "\(bu" 4 Differences Between Funtools and \s-1IRAF\s0 Regions -[regdiff(n)] +[regdiff(7)] .RE .RS 4 .RE .IP "\(bu" 4 Combining Table and Region Filters -[funcombine(n)] +[funcombine(7)] .RE .RS 4 .RE @@ -371,7 +371,7 @@ Miscellaneous .RS 4 .IP "\(bu" 4 Funtools Environment Variables -[funenv(n)] +[funenv(7)] .IP "\(bu" 4 Funtools ChangeLog .RE diff --git a/man/mann/funview.n b/man/mann/funview.n index 187eb6e..8c2da90 100644 --- a/man/mann/funview.n +++ b/man/mann/funview.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "funview n" -.TH funview n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "funview 7" +.TH funview 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBFunview: Database View Support for Tables\fR .SH "SYNOPSIS" --- a/man/mann/regalgebra.n +++ b/man/mann/regalgebra.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "regalgebra n" -.TH regalgebra n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "regalgebra 7" +.TH regalgebra 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBRegAlgebra: Boolean Algebra on Spatial Regions\fR .SH "SYNOPSIS" --- a/man/mann/regbounds.n +++ b/man/mann/regbounds.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "regbounds n" -.TH regbounds n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "regbounds 7" +.TH regbounds 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBRegBounds: Region Boundaries\fR .SH "SYNOPSIS" --- a/man/mann/regcoords.n +++ b/man/mann/regcoords.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "regcoords n" -.TH regcoords n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "regcoords 7" +.TH regcoords 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBRegCoords: Spatial Region Coordinates\fR .SH "SYNOPSIS" --- a/man/mann/regdiff.n +++ b/man/mann/regdiff.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "regdiff n" -.TH regdiff n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "regdiff 7" +.TH regdiff 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBRegDiff:Differences Between Funtools and IRAF Regions\fR .SH "SYNOPSIS" --- a/man/mann/reggeometry.n +++ b/man/mann/reggeometry.n @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "reggeometry n" -.TH reggeometry n "January 2, 2008" "version 1.4.2" "SAORD Documentation" +.IX Title "reggeometry 7" +.TH reggeometry 7 "January 2, 2008" "version 1.4.2" "SAORD Documentation" .SH "NAME" \&\fBRegGeometry: Geometric Shapes in Spatial Region Filtering\fR .SH "SYNOPSIS" --- a/man/man3/funcolumnselect.3 +++ b/man/man3/funcolumnselect.3 @@ -593,7 +593,7 @@ .PP Note that the only modification to the call is in the plist string. .PP -Of course, instead of using staticly allocated arrays, you also can specify +Of course, instead of using statically allocated arrays, you also can specify dynamically allocated pointers: .PP .Vb 7 debian/patches/fix_crashes.patch0000644000000000000000000000451712173310505014140 0ustar Author: Ole Streicher Description: Check cmd line arguments for illegal input that caused crashes found with the "Mayhem" tool. Bug: http://bugs.debian.org/715928 Bug: http://bugs.debian.org/715929 --- a/funjoin.c +++ b/funjoin.c @@ -737,7 +737,7 @@ main(argc, argv) case 'a': if( argv[i][2] ){ j = atoi(&argv[i][2])-1; - if( (j >= 0) && (j < MAXIFILE) ){ + if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){ files[j].actstr = argv[++i]; } else{ @@ -751,7 +751,7 @@ main(argc, argv) case 'b': if( argv[i][2] ){ j = atoi(&argv[i][2])-1; - if( (j >= 0) && (j < MAXIFILE) ){ + if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){ files[j].bstr = argv[++i]; } else{ @@ -765,7 +765,7 @@ main(argc, argv) case 'j': if( argv[i][2] ){ j = atoi(&argv[i][2])-1; - if( (j >= 0) && (j < MAXIFILE) ){ + if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){ files[j].jname = argv[++i]; } else{ @@ -773,25 +773,35 @@ main(argc, argv) } } else{ - defcol = argv[++i]; + if (i < argc-1) { + defcol = argv[++i]; + } } break; case 'm': - minmatch = atoi(argv[++i])+1; + if (i < argc-1) { + minmatch = atoi(argv[++i])+1; + } if( minmatch < 1 ) minmatch = 1; break; case 'M': - maxmatch = atoi(argv[++i])+1; + if (i < argc-1) { + maxmatch = atoi(argv[++i])+1; + } if( maxmatch < 1 ) maxmatch = 1; break; case 's': jfiles = JFILES_COL; break; case 'S': - jfiles = argv[++i]; + if (i < argc-1) { + jfiles = argv[++i]; + } break; case 't': - tol = atof(argv[++i]); + if (i < argc-1) { + tol = atof(argv[++i]); + } if( tol <= 0 ){ gerror(stderr, "tolerance value must be positive\n"); } --- a/funimage.c +++ b/funimage.c @@ -338,12 +338,16 @@ main(argc, argv) t = strchr(s, ','); strncat(newname, s, t-s); strncat(newname, ",y:", SZ_LINE-strlen(newname)); - s = ++t; - t = strchr(s, ','); - strncat(newname, s, t-s); + if (t != NULL) { + s = ++t; + t = strchr(s, ','); + strncat(newname, s, t-s); + } strncat(newname, "),", SZ_LINE-strlen(newname)); - s = ++t; - strncat(newname, s, SZ_LINE-strlen(newname)); + if (t != NULL) { + s = ++t; + strncat(newname, s, SZ_LINE-strlen(newname)); + } iname = newname; } debian/patches/link_to_so.patch0000644000000000000000000000142611764420163014005 0ustar Author: Ole Streicher Description: Link the executables agains libfuntools.so and link libfuntools.so against the needed libs. --- sao-funtools-1.4.4.orig/Makefile.in +++ sao-funtools-1.4.4/Makefile.in @@ -160,7 +160,7 @@ LIB = @LIB@ # this is used in the link line # LLIB = $(LIB) -LLIB = @LLIB@ +LLIB = -L. -lfuntools # libraries containing main as subroutines MAINLIB = lib$(PACKAGE)MainLib.a @@ -228,7 +228,7 @@ shlib: sublib $(LIBOBJS) @(rm -rf $(PACKAGE)tmp; mkdir $(PACKAGE)tmp; \ (cd $(PACKAGE)tmp && ar x ../$(LIB)); \ CC='$(CC)' CXX=$(CXX) \ - ./mklib -o $(PACKAGE) $(PACKAGE)tmp/*.o; \ + ./mklib -o $(PACKAGE) -ldl $(WCS_LIBS) -lm -lz $(PACKAGE)tmp/*.o; \ rm -rf $(PACKAGE)tmp;) mainlib: $(MAINLIBOBJS) funmainlib.o lex.calc.o debian/patches/multiarch.patch0000644000000000000000000000244012233243666013635 0ustar Author: Ole Streicher Description: Copy files to the correct destinations according to multiarch. The corresponding variables are set with debhelper compat 9. tcl-funtools is not multiarch yet. --- a/Makefile.in +++ b/Makefile.in @@ -37,20 +37,20 @@ INSTALL_ROOT = $(DESTDIR) # Directory in which to install the .a or .so binary for the FUNTOOLS library: -LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib -TCL_LIB_INSTALL_DIR = $(LIB_INSTALL_DIR)/tcltk/funtools +LIB_INSTALL_DIR = $(INSTALL_ROOT)@libdir@ +TCL_LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib/tcltk/funtools # Directory in which to install the program wish: -BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin +BIN_INSTALL_DIR = $(INSTALL_ROOT)@bindir@ # Directory in which to install the funtools.h include file: -INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include/funtools +INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)@includedir@/funtools # Top-level directory for manual entries: -MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/share/man +MAN_INSTALL_DIR = $(INSTALL_ROOT)@mandir@ # Top-level directory for share entries: -MAN_SHARE_DIR = $(INSTALL_ROOT)$(prefix)/share/funtools +MAN_SHARE_DIR = $(INSTALL_ROOT)@datadir@/funtools # util files are in the util subdirectory UTIL_INC = -I./util debian/patches/build_bsd+hurd.patch0000644000000000000000000000150611764420163014531 0ustar Author: Ole Streicher Description: Extend the mklib script so that it (hopefully) builds shared libraries on GNU/kFreeBSD and Hurd --- a/mklib +++ b/mklib @@ -113,7 +113,7 @@ fi # case $ARCH in - 'Linux' | 'OpenBSD') + 'Linux' | 'OpenBSD' | 'GNU' | GNU/*) # GCC-based environment if [ $NOPREFIX = 1 ] ; then @@ -144,11 +144,13 @@ case $ARCH in FINAL_LIBS=${LIBNAME}.a else LIBNAME="lib${LIBNAME}" # prefix with "lib" - if [ $ARCH = 'Linux' ] ; then + case $ARCH in 'Linux' | 'GNU' | GNU/*) OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" - else + ;; + *) OPTS="-shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" - fi + ;; + esac if [ x${PATCH} = "x" ] ; then VERSION="${MAJOR}.${MINOR}" else debian/patches/build_tclfun.patch0000644000000000000000000000521011765051165014315 0ustar Author: Ole Streicher Description: Build the Tcl extension as a shared library. --- a/Makefile.in +++ b/Makefile.in @@ -38,6 +38,7 @@ # Directory in which to install the .a or .so binary for the FUNTOOLS library: LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib +TCL_LIB_INSTALL_DIR = $(LIB_INSTALL_DIR)/tcltk/funtools # Directory in which to install the program wish: BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin @@ -67,8 +68,12 @@ FILTER_INC = -I./filter # FILTER_LIBS = -L./filter -lfilter +# tcl include files +TCL_INC = -I/usr/include/tcl +TCL_LIBS = @TCL_LIBS@ + # extra includes for compiling -INCLUDES = $(UTIL_INC) $(FILTER_INC) $(WCS_INC) $(FITSY_INC) +INCLUDES = $(UTIL_INC) $(FILTER_INC) $(WCS_INC) $(FITSY_INC) $(TCL_INC) # extra libs EXTRA_LIBS = @EXTRA_LIBS@ @@ -249,9 +254,9 @@ shtclfun: tclfun @(rm -rf $(PACKAGE)tmp; mkdir $(PACKAGE)tmp; \ - (cd $(PACKAGE)tmp && ar x ../$(LIB) && ar x ../libtclfun.a); \ + (cd $(PACKAGE)tmp && ar x ../libtclfun.a); \ CC='$(CC)' CXX='$(CXX)' \ - ./mklib -o tclfun $(PACKAGE)tmp/*.o; \ + ./mklib -o tclfun -L. -lfuntools $(PACKAGE)tmp/*.o $(TCL_LIBS); \ rm -rf $(PACKAGE)tmp; \ test -r pkgIndex.tcl && mv pkgIndex.tcl pkgIndex.tcl-old; \ SHLIB=libtclfun.so; \ @@ -393,6 +398,8 @@ install:: install-share +install:: tclfun_install + install:: install-data FORCE: @@ -405,7 +412,7 @@ _install: shlib_install: - @-(for i in `ls *.so* *.dylib *.sl 2>/dev/null` ; \ + @-(for i in `ls libfuntools.so* *.dylib *.sl 2>/dev/null` ; \ do \ if [ -h $$i ] ; then \ echo "Installing link $$i" ; \ @@ -417,6 +424,11 @@ fi; \ done;) +tclfun_install: tclfun + mkdir -p $(TCL_LIB_INSTALL_DIR) + $(INSTALL_DATA) libtclfun.so $(TCL_LIB_INSTALL_DIR) + $(INSTALL_DATA) pkgIndex.tcl $(TCL_LIB_INSTALL_DIR) + install-binaries: lib $(PROGS) $(SCRIPTS) $(DS9HELPERS) @for i in $(LIB_INSTALL_DIR) $(INCLUDE_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \ do \ --- a/configure.ac +++ b/configure.ac @@ -194,6 +194,9 @@ SC_PATH_TCLCONFIG if test x"${no_tcl}" = x ; then AC_DEFINE([HAVE_TCL], [1], [Define if tcl is used.]) + SC_LOAD_TCLCONFIG + TCL_LIBS="$TCL_LIB_SPEC" + AC_SUBST(TCL_LIBS) fi AC_PROG_AWK --- a/util/tclmainlib.c +++ b/util/tclmainlib.c @@ -280,7 +280,7 @@ else{ Tcl_Channel chan; /* create a tcl channel corresponding to the pipe */ - if( !(chan = Tcl_MakeFileChannel((ClientData)got, TCL_READABLE)) ){ + if( !(chan = Tcl_MakeFileChannel((ClientData)(intptr_t)got, TCL_READABLE)) ){ Tcl_SetResult(interp, "can't create Tcl chan for pipe", TCL_STATIC); return TCL_ERROR; } debian/patches/ds9_fixes.diff0000644000000000000000000002015011765051165013351 0ustar Origin: http://hea-www.harvard.edu/saord/download/ds9/source/ds9.7.0.tar.gz Description: Fixes that were applied to the package included in the saods9 source. Only the patches that affect the Debian distribution are included here. These patches are not specific for DS9, however. . From the changelog: * Fixed -J funcone, which was not properly outputting all rows. * Fixed bug in funim.c which broke vcol functionality. . --- a/filter/filter.c +++ b/filter/filter.c @@ -326,24 +326,31 @@ Filter FilterOpen(header, string, mode) } /* determine which type of process execution we do */ - filter->ptype = DEFAULT_FILTER_PTYPE; - *tbuf = '\0'; - if( (s=(char *)getenv("FILTER_PTYPE")) ){ - strcpy(tbuf, s); - } - if( !*tbuf && (s=xstrdup(filter->mode)) ){ - keyword(s, "ptype", tbuf, SZ_LINE); - if( s ) xfree(s); - } - if( *tbuf ){ - if( *tbuf == 'p' ) - filter->ptype = PTYPE_PROCESS; - else if( *tbuf == 'c' ) - filter->ptype = PTYPE_CONTAINED; + switch(filter->method){ + case METHOD_C: + filter->ptype = DEFAULT_FILTER_PTYPE; + *tbuf = '\0'; + if( (s=(char *)getenv("FILTER_PTYPE")) ){ + strcpy(tbuf, s); + } + if( !*tbuf && (s=xstrdup(filter->mode)) ){ + keyword(s, "ptype", tbuf, SZ_LINE); + if( s ) xfree(s); + } + if( *tbuf ){ + if( *tbuf == 'p' ) + filter->ptype = PTYPE_PROCESS; + else if( *tbuf == 'c' ) + filter->ptype = PTYPE_CONTAINED; #ifdef USE_DL - else if( *tbuf == 'd' ) - filter->ptype = PTYPE_DYNAMIC; + else if( *tbuf == 'd' ) + filter->ptype = PTYPE_DYNAMIC; #endif + } + break; + default: + filter->ptype = PTYPE_PROCESS; + break; } /* determine region paint mode */ @@ -470,7 +477,10 @@ Filter FilterOpen(header, string, mode) if( !FilterProgCompile(filter) ) goto error; - if( filter->debug < 2 ){ + if( filter->debug >= 2 ) goto done; + + switch(filter->method){ + case METHOD_C: switch(filter->ptype){ case PTYPE_PROCESS: case PTYPE_CONTAINED: @@ -478,7 +488,7 @@ Filter FilterOpen(header, string, mode) case PIPE_WIN32: #if HAVE_CYGWIN if( !WinProcessOpen(filter->prog, - &(filter->ihandle), &(filter->ohandle), &(filter->process)) ) + &(filter->ihandle), &(filter->ohandle), &(filter->process)) ) goto error; #else gerror(stderr, "internal error: no WinProcess without Windows"); @@ -487,20 +497,23 @@ Filter FilterOpen(header, string, mode) break; default: if( !ProcessOpen(filter->prog, - &(filter->ichan), &(filter->ochan), &(filter->pid)) ) + &(filter->ichan), &(filter->ochan), &(filter->pid)) ) goto error; break; } break; #ifdef USE_DL case PTYPE_DYNAMIC: - if( !(filter->dl=DLOpen(filter->prog)) ) - goto error; - break; + if( !(filter->dl=DLOpen(filter->prog)) ) + goto error; + break; #endif default: - goto error; + goto error; } + break; + default: + goto error; } /* return the good news */ --- a/filter/filt.l +++ b/filter/filt.l @@ -871,6 +871,26 @@ compass { BEGIN COMM; } * */ + +#ifdef YY_USE_PROTOS +static void floatprefix(void) +#else +static void floatprefix() +#endif +{ + if( filt->method == METHOD_C ) + _FiltLexCat("(double)"); +} + +#ifdef YY_USE_PROTOS +static void floatsuffix(void) +#else +static void floatsuffix() +#endif +{ + return; +} + #ifdef YY_USE_PROTOS static void bin2num(char *d, char *s, int maxlen) @@ -1414,7 +1434,14 @@ static void _FiltLexRegionStart(docols) FilterSymbolDefaults(filt, 0); /* initialize wcs for default image case */ _FiltLexWcsCols(filt->fhd, filt->xbin, filt->ybin); - _FiltLexCat(",(double)x,(double)y"); + _FiltLexCat(","); + floatprefix(); + _FiltLexCat("x"); + floatsuffix(); + _FiltLexCat(","); + floatprefix(); + _FiltLexCat("y"); + floatsuffix(); break; case 1: if( !initbindefs ){ @@ -1427,16 +1454,24 @@ static void _FiltLexRegionStart(docols) if( !filt->xbin || !filt->ybin ){ _filterror("two binning columns are required for regions"); } - _FiltLexCat(",(double)"); + _FiltLexCat(","); + floatprefix(); _FiltLexCat(filt->xbin); - _FiltLexCat(",(double)"); + floatsuffix(); + _FiltLexCat(","); + floatprefix(); _FiltLexCat(filt->ybin); + floatsuffix(); break; case 2: - _FiltLexCat(",(double)"); + _FiltLexCat(","); + floatprefix(); _FiltLexCat(colnames[0]); - _FiltLexCat(",(double)"); + floatsuffix(); + _FiltLexCat(","); + floatprefix(); _FiltLexCat(colnames[1]); + floatsuffix(); break; } if( s ) xfree(s); --- a/filter/filtprog_c.c +++ b/filter/filtprog_c.c @@ -198,7 +198,8 @@ static int FilterProgOpen_C(filter) ccstr = "gcc"; } /* make sure we have a compiler */ - if( !(filter->cc = Find(ccstr, "x", NULL, FilterPath())) && + if( !(filter->cc = Access(ccstr, "x")) && + !(filter->cc = Find(ccstr, "x", NULL, FilterPath())) && !(filter->cc = Find("gcc", "x", NULL, FilterPath())) && !(filter->cc = Find("cc", "x", NULL, FilterPath())) && !(filter->cc = Find("cc", "x", NULL, ".")) && @@ -212,6 +213,9 @@ static int FilterProgOpen_C(filter) #if HAVE_CYGWIN if( (s=strrchr(filter->cc, '/')) ){ s++; + } + else if( (s=strrchr(filter->cc, '\\')) ){ + s++; } else { s = filter->cc; } --- a/funcone.c +++ b/funcone.c @@ -1036,6 +1036,9 @@ main(argc, argv) strncpy(decstr, argv[optind+ioff++], SZ_LINE-1); strncpy(radstr, argv[optind+ioff++], SZ_LINE-1); + /* dolimfilt does not work with doall */ + if( doall ) dolimfilt = 0; + /* process list arguments */ if( dolist ){ if( !(list=OpenList(lname, rastr, decstr, radstr)) ){ @@ -1085,6 +1088,8 @@ main(argc, argv) if( !(adbuf=xcalloc(nrow+1, sizeof(char))) ){ gerror(stderr, "can't allocate all (-J|-X) buffer of size %d\n", nrow); } + /* must read one event at a time, or else we can't tell the event num */ + maxrow = 1; } /* activate columns specified by user, if necessary */ @@ -1371,7 +1376,7 @@ done: while( (ebuf = (Ev)FunTableRowGet(fun, NULL, maxrow, NULL, &got)) ){ /* if we have a filter, then we don't know the row number til after we read the event, i.e. now */ - if( doall & ALL_FILT ) FunInfoGet(fun, FUN_ROW, &irow, 0); + FunInfoGet(fun, FUN_ROW, &irow, 0); /* process all rows */ for(i=0; ivbin >= 0 ){ dovcol = 1; - voffset = fun->header->table->col[fun->bin[2]].offset; - vsize = fun->header->table->col[fun->bin[2]].size; - vtype = fun->header->table->col[fun->bin[2]].type; + voffset = fun->header->table->col[fun->vbin].offset; + vsize = fun->header->table->col[fun->vbin].size; + vtype = fun->header->table->col[fun->vbin].type; } else{ dovcol = 0; --- a/calc.l +++ b/calc.l @@ -284,7 +284,7 @@ static char *_CalcCB(name, client_data) { CalcCols cur; char tbuf[SZ_LINE]; - char tbuf2[SZ_LINE]; + char tbuf2[SZ_LINE*2]; char tbuf3[SZ_LINE]; int i, got, ip; --- a/util/gio.c +++ b/util/gio.c @@ -2209,7 +2209,7 @@ void gerror(va_alist) va_dcl vsnprintf(_gerrors, SZ_LINE-1, tbuf, args); /* if the error flag is positive, we output immediately */ if( (fd != NULL) && _gerror ){ - fprintf(fd, _gerrors); + fputs(_gerrors, fd); fflush(fd); } /* if the error flag is set high, we exit */ @@ -2281,7 +2281,7 @@ void gwarning(va_alist) va_dcl vsnprintf(_gwarnings, SZ_LINE-1, tbuf, args); /* if the warning flag is positive, we output immediately */ if( (fd != NULL) && _gwarning ){ - fprintf(fd, _gwarnings); + fputs(_gwarnings, fd); fflush(fd); } } debian/patches/fix_paths.patch0000644000000000000000000000312111764420163013624 0ustar Author: Ole Streicher Description: Fix the paths for a chroot build and for FHS --- sao-funtools-1.4.4.orig/Makefile.in +++ sao-funtools-1.4.4/Makefile.in @@ -34,7 +34,7 @@ exec_prefix = @exec_prefix@ # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. -INSTALL_ROOT = +INSTALL_ROOT = $(DESTDIR) # Directory in which to install the .a or .so binary for the FUNTOOLS library: LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib @@ -43,10 +43,10 @@ LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_ BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin # Directory in which to install the funtools.h include file: -INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include +INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include/funtools # Top-level directory for manual entries: -MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man +MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/share/man # Top-level directory for share entries: MAN_SHARE_DIR = $(INSTALL_ROOT)$(prefix)/share/funtools @@ -386,7 +386,7 @@ install:: @for dir in $(SUBDIRS); do \ echo " "; \ echo Installing in $$dir ...; \ - (cd $$dir; $(MAKE) $@) ; \ + (cd $$dir; $(MAKE) INSTALL_ROOT=$(INSTALL_ROOT) INCLUDE_INSTALL_DIR=$(INCLUDE_INSTALL_DIR) $@) ; \ done install:: install-man @@ -422,7 +422,7 @@ install-binaries: lib $(PROGS) $(SCRIPTS do \ if [ ! -d $$i ] ; then \ echo "Making directory $$i"; \ - mkdir $$i; \ + mkdir -p $$i; \ chmod 755 $$i; \ else true; \ fi; \ debian/rules0000755000000000000000000000072612233243672010257 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ --with autoreconf,autotools_dev override_dh_auto_configure: dh_auto_configure -- --enable-shared --with-zlib=-lz --with-wcslib=-lwcstools --with-tcl=/usr/lib --enable-dl override_dh_auto_build: dh_auto_build -- all shtclfun override_dh_installchangelogs: dh_installchangelogs doc/changelog.html override_dh_makeshlibs: dh_makeshlibs -Xlibtclfun.so debian/README.Debian0000644000000000000000000000076011765051165011241 0ustar funtools for Debian =================== This source is patched mainly for the use with saods9. In DS9, this version has version number 1.4.5; however no official 1.4.5 version is release yet from upstream. Other use than for DS9 is discouraged, since its upstream development is limited to DS9 since 2008. No other fixes or enhancements will be made. See http://hea-www.harvard.edu/RD/funtools/ for the announcement. -- Ole Streicher , Fri, 08 Jun 2012 19:00:00 +0200 debian/libfuntools-dev.lintian-overrides0000644000000000000000000000004411764420163015664 0ustar spelling-error-in-manpage * ang and debian/source/0000755000000000000000000000000011764420163010472 5ustar debian/source/lintian-overrides0000644000000000000000000000015111764420163014050 0ustar # The files are removed in clean; however lintian cannot detect this. configure-generated-file-in-source debian/source/format0000644000000000000000000000001411764420163011700 0ustar 3.0 (quilt) debian/tcl-funtools.install0000644000000000000000000000011011764420163013203 0ustar usr/lib/tcltk/funtools/libtclfun.so usr/lib/tcltk/funtools/pkgIndex.tcl