[SCM] image display tool for astronomy branch, master, updated. 5986e40007ce888b63f697f6b6a11584b8d7ac2d
Ole Streicher
debian at liska.ath.cx
Wed Apr 4 21:44:54 UTC 2012
The following commit has been merged in the master branch:
commit 5986e40007ce888b63f697f6b6a11584b8d7ac2d
Author: Ole Streicher <debian at liska.ath.cx>
Date: Wed Apr 4 23:42:56 2012 +0200
Fix compilation errors; rewrite rules to "dh"
diff --git a/debian/clean b/debian/clean
index aaf104c..bf26cdb 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,4 +1,6 @@
-funtools-1.4.4/util/config.status
-funtools-1.4.4/wcs/config.status
-funtools-1.4.4/filter/config.status
-funtools-1.4.4/fitsy/config.status
+ds9/tkAppInit.c
+ds9/ds9Base
+ds9/ds9tk.c
+ds9/ds9tk.h
+bin/ds9
+make.include
diff --git a/debian/control b/debian/control
index 719979e..0b98a22 100644
--- a/debian/control
+++ b/debian/control
@@ -3,9 +3,9 @@ Section: science
Priority: extra
Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
Uploaders: Ole Streicher <debian at liska.ath.cx>
-Build-Depends: debhelper (>= 4.0.0), libtk-img-dev, zlib1g-dev, blt-dev,
+Build-Depends: debhelper (>= 7.0.50), libtk-img-dev, zlib1g-dev, blt-dev,
tcl-dev, tcllib, tk-dev, libxt-dev, tk-table (>= 2.9), libxml2-dev,
- wcstools-dev, funtools-dev, slalib-dev, autotools-dev, zip
+ libwcstools-dev, libfuntools-dev, autotools-dev, tcl-signal, zip
Standards-Version: 3.9.3
Homepage: http://hea-www.harvard.edu/RD/ds9/
Vcs-Git: git://git.debian.org/git/debian-science/packages/saods9.git
diff --git a/debian/patches/main-ds9.patch b/debian/patches/main-ds9.patch
index 40d80a6..9d9b986 100644
--- a/debian/patches/main-ds9.patch
+++ b/debian/patches/main-ds9.patch
@@ -1,13 +1,32 @@
--- a/ds9/Makefile
+++ b/ds9/Makefile
-@@ -27,48 +27,12 @@ ifeq ($(OS),unix)
- MAINDIR = ../$(TKDIR)/unix
+@@ -4,13 +4,7 @@ include ../make.pkgs
+ #--------------------------defines
+
+ ZDIR = zipdir/zvfsmntpt
+-FFILES = $(ZDIR)/$(TCLVER) \
+- $(ZDIR)/tcl8 \
+- $(ZDIR)/$(TKVER) \
+- $(ZDIR)/$(BLTVER) \
+- $(ZDIR)/$(TCLLIBVER) \
+- $(ZDIR)/$(TKCONVER) \
+- $(ZDIR)/$(XMLRPCVER) \
++FFILES = \
+ $(ZDIR)/src \
+ $(ZDIR)/msgs \
+ $(ZDIR)/doc \
+@@ -24,51 +18,18 @@ FILES = $(FFILES)
+ endif
+
+ ifeq ($(OS),unix)
+- MAINDIR = ../$(TKDIR)/unix
++ MAINDIR = /usr/share/tcltk/tk8.5
MAIN = tkAppInit
-- LIBS = \
-- ../lib/libsaotk.a \
+ LIBS = \
+ ../lib/libsaotk.a \
- ../lib/libtkhtml.a \
-- ../lib/libtkmpeg.a \
+ ../lib/libtkmpeg.a \
- ../lib/$(TCLXMLVER)/libTclxml3.2.a \
- ../lib/$(TKIMGVER)/libtkimgwindow1.3.a \
- ../lib/$(TKIMGVER)/libtkimgjpeg1.3.a \
@@ -24,61 +43,105 @@
- ../lib/$(TKIMGVER)/libtkimg1.3.a \
- ../lib/$(TKTABLEVER)/libTktable2.9.a \
- ../lib/libfuntools.a \
-- ../lib/librice.a \
-- ../lib/libhcomp.a \
-- ../lib/libplio.a \
+ ../lib/librice.a \
+ ../lib/libhcomp.a \
+ ../lib/libplio.a \
- ../lib/libast.a \
- ../lib/libast_err.a \
- ../lib/libast_grf3d.a \
- ../lib/libast_pal.a \
- ../lib/libast_wcslib.a \
-- ../lib/libsaotk.a \
+ ../lib/libsaotk.a \
- ../lib/libwcs.a \
- ../lib/libsla.a \
- ../lib/libzvfs.a \
- ../lib/libzip.a \
- ../lib/libz.a \
- ../lib/libxpa.a \
-- ../lib/libiis.a \
+ ../lib/libiis.a \
- ../lib/libcheckdns.a \
- ../lib/libsignal_ext.a \
- ../lib/libBLTX30.a \
- ../lib/libBLTCore30.a \
- ../lib/libtk8.5.a \
- ../lib/libtcl8.5.a
-+ LIBS = \
-+ -L /usr/lib/Tktable2.10 -lTktable2.10 \
-+ -lz -lBLT -ltk -ltcl -lxml2 \
-+ -L../lib -lsaotk -ltkhtml -ltkmpeg -lsla -last_pal -last_err -last_grf3d -last_wcslib -last \
-+ -liis -lcheckdns -lxpa -lcheckdns -lsignal_ext -lrice -lfuntools -lhcomp -lplio -lwcs -lzvfs \
-+ -lgfortran
++ ../lib/libcheckdns.a
endif
ifeq ($(OS),windows)
-@@ -389,17 +353,9 @@ endif
+@@ -182,12 +143,9 @@ CXXFLAGS = $(CXXOPT) -I. -I../include -I$(X11INCLUDE) -DZIPFILE
+
+ all: ds9
+
+-ds9 : ds9Base ds9.zip
++ds9 : ds9Base
+ $(RM) $@
+- cp ds9Base ds9
+- strip ds9
+- cp ds9 ../bin/.
+- cp ds9.zip ../bin/.
++ cp ds9Base ../bin/ds9
+ cd ../bin; $(CODESIGN) -s "SAOImage DS9" ds9
+
+ debug : ds9Base ds9.zip
+@@ -203,14 +161,9 @@ CXXFLAGS = $(CXXOPT) -I. -I../include -I$(X11INCLUDE)
+
+ all: ds9
+
+-ds9 : null.zip ds9Base $(FILES)
++ds9 : ds9Base $(FILES)
+ $(RM) $@
+- cp ds9Base ds9.zip
+- strip ds9.zip
+- cat null.zip >> ds9.zip
+- cd zipdir; zip -rA9 ../ds9.zip *
+- mv ds9.zip ds9
+- cp ds9 ../bin/.
++ cp ds9Base ../bin/ds9
+
+ debug : null.zip ds9Base $(FILES)
+ $(RM) $@
+@@ -389,17 +342,16 @@ endif
#--------------------------linux
ifneq (,$(findstring linux,$(ARCH)))
-ds9Base : $(OBJS) $(LIBS)
-+ds9Base : $(OBJS)
++ds9Base : $(MAIN).o $(OBJS) $(LIBS)
$(RM) $@
- rm -f libstdc++.a
- ln -s `$(CXX) ${OPTS} -print-file-name=libstdc++.a` .
- $(CXX) ${OPTS} -static-libgcc -Wl,--export-dynamic \
- -o $@ $(OBJS) $(LIBS) \
-- -Wl,-Bstatic -L. -lstdc++ \
++# rm -f libstdc++.a
++# ln -s `$(CXX) -print-file-name=libstdc++.a` .
++ $(CXX) $(OPTS) $(LDFLAGS) -o $@ ds9.o $(MAIN).o $(LIBS) \
+ -Wl,-Bstatic -L. -lstdc++ \
- -Wl,-Bdynamic \
- -L$(X11LIB) -lX11 -lXss -lXext -lXft -lXrandr -lXrender \
- -ldl -lpthread -lxml2
- rm -f libstdc++.a
-+ $(CXX) $(OPTS) -o $@ ds9.o $(LIBS)
++ -Wl,-Bdynamic -L$(X11LIB) -lX11 \
++ -ldl -lpthread -lxml2 \
++ -lstarlink_ast -lstarlink_ast_err -lstarlink_ast_grf3d \
++ -lz -lBLT -ltk -ltcl -lwcstools -lfuntools -L../lib -lsaotk
endif
#--------------------------darwin
--- a/ds9/ds9.C
+++ b/ds9/ds9.C
-@@ -24,20 +24,6 @@ extern "C" {
- int Tkhtml_Init(Tcl_Interp*);
+@@ -13,41 +13,12 @@ extern "C" {
+
+ void TclSetStartupScriptFileName(const char*);
+
+- int Zvfs_Init(Tcl_Interp*);
+- int Zvfs_Mount(Tcl_Interp*, char*, char *);
+-
+- int Blt_core_Init(Tcl_Interp*);
+- int Blt_x_Init(Tcl_Interp*);
+- int Tktable_Init(Tcl_Interp*);
+ int Checkdns_Init(Tcl_Interp*);
+ int Saotk_Init(Tcl_Interp*);
+- int Tkhtml_Init(Tcl_Interp*);
int Tkmpeg_Init(Tcl_Interp*);
- int Tkimg_Init(Tcl_Interp*);
@@ -95,13 +158,128 @@
- int Tkimgxbm_Init(Tcl_Interp*);
- int Tkimgwindow_Init(Tcl_Interp*);
-
- int Tclxpa_Init(Tcl_Interp*);
+- int Tclxpa_Init(Tcl_Interp*);
int Iis_Init(Tcl_Interp*);
-@@ -196,83 +182,8 @@ int SAOAppInit(Tcl_Interp *interp)
- if (Tclxml_Init(interp) == TCL_ERROR)
+- int Tclxml_Init(Tcl_Interp*);
+- int Tclxml_libxml2_Init(Tcl_Interp*);
+-
+-#ifndef _WIN32
+- int Signal_ext_Init(Tcl_Interp*);
+-#endif
+-
+ #ifdef _MACOSX
+ int Tkmacosx_Init(Tcl_Interp*);
+ #endif
+@@ -73,13 +44,8 @@ int SAOLocalMainHook(int* argcPtr, char*** argvPtr)
+ char** argv = *argvPtr;
+ appname = dupstr(argv[0]);
+
+- // so that tcl and tk know where to find their libs
+- // we do it here before InitLibraryPath is called
+- putenv((char*)"TCL_LIBRARY=./zvfsmntpt/tcl8.5");
+- putenv((char*)"TK_LIBRARY=./zvfsmntpt/tk8.5");
+-
+ // invoke startup script
+- TclSetStartupScriptFileName("./zvfsmntpt/src/ds9.tcl");
++ TclSetStartupScriptFileName("/usr/share/ds9/src/ds9.tcl");
+ }
+
+ Tcl_Interp *global_interp;
+@@ -95,35 +61,6 @@ int SAOAppInit(Tcl_Interp *interp)
+ // save interp for cputs function
+ global_interp = interp;
+
+- // We have to initialize the virtual filesystem before calling
+- // Tcl_Init(). Otherwise, Tcl_Init() will not be able to find
+- // its startup script files.
+- if (Zvfs_Init(interp) == TCL_ERROR)
+- return TCL_ERROR;
+- Tcl_StaticPackage (interp, "zvfs", Zvfs_Init,
+- (Tcl_PackageInitProc*)NULL);
+-
+- // find current working directory, and set as mount point
+- {
+- Tcl_DString pwd;
+- Tcl_DStringInit(&pwd);
+- Tcl_GetCwd(interp, &pwd);
+-#ifdef ZIPFILE
+- ostringstream str;
+- str << (char *)Tcl_GetNameOfExecutable()
+- << ".zip"
+- << ends;
+- if( Zvfs_Mount(interp, (char*)str.str().c_str(), Tcl_DStringValue(&pwd)) != TCL_OK ){
+- cerr << "ERROR: Unable to open the auxiliary ds9 file 'ds9.zip'. If you moved the ds9 program from its original location, please also move the zip file to the same place." << endl;
+- exit(1);
+- }
+-#else
+- Zvfs_Mount(interp, (char *)Tcl_GetNameOfExecutable(),
+- Tcl_DStringValue(&pwd));
+-#endif
+- Tcl_DStringFree(&pwd);
+- }
+-
+ // Initialize Tcl and Tk
+ if (Tcl_Init(interp))
+ return TCL_ERROR;
+@@ -131,7 +68,6 @@ int SAOAppInit(Tcl_Interp *interp)
+ // Tk
+ if (Tk_Init(interp))
+ return TCL_ERROR;
+- Tcl_StaticPackage(interp,"Tk", Tk_Init, Tk_SafeInit);
+
+ {
+ Tcl_DString pwd;
+@@ -140,22 +76,6 @@ int SAOAppInit(Tcl_Interp *interp)
+ Tcl_DStringFree(&pwd);
+ }
+
+- // Blt
+- if (Blt_core_Init(interp) == TCL_ERROR)
+- return TCL_ERROR;
+- Tcl_StaticPackage(interp, "blt_core", Blt_core_Init,
+- (Tcl_PackageInitProc*)NULL);
+- if (Blt_x_Init(interp) == TCL_ERROR)
+- return TCL_ERROR;
+- Tcl_StaticPackage(interp, "blt_extra", Blt_x_Init,
+- (Tcl_PackageInitProc*)NULL);
+-
+- // Tktable
+- if (Tktable_Init(interp) == TCL_ERROR)
+- return TCL_ERROR;
+- Tcl_StaticPackage (interp, "Tktable", Tktable_Init,
+- (Tcl_PackageInitProc*)NULL);
+-
+ // Checkdns
+ if (Checkdns_Init(interp) == TCL_ERROR)
+ return TCL_ERROR;
+@@ -168,18 +88,6 @@ int SAOAppInit(Tcl_Interp *interp)
+ Tcl_StaticPackage (interp, "saotk", Saotk_Init,
+ (Tcl_PackageInitProc*)NULL);
+
+- // Tkhtml
+- if (Tkhtml_Init(interp) == TCL_ERROR)
+- return TCL_ERROR;
+- Tcl_StaticPackage (interp, "tkhtml", Tkhtml_Init,
+- (Tcl_PackageInitProc*)NULL);
+-
+- // Tclxpa
+- if (Tclxpa_Init(interp) == TCL_ERROR)
+- return TCL_ERROR;
+- Tcl_StaticPackage (interp, "Tclxpa", Tclxpa_Init,
+- (Tcl_PackageInitProc*)NULL);
+-
+ // IIS
+ if (Iis_Init(interp) == TCL_ERROR)
return TCL_ERROR;
+@@ -192,96 +100,6 @@ int SAOAppInit(Tcl_Interp *interp)
+ Tcl_StaticPackage (interp, "tkmpeg", Tkmpeg_Init,
+ (Tcl_PackageInitProc*)NULL);
+- // Tclxml
+- if (Tclxml_Init(interp) == TCL_ERROR)
+- return TCL_ERROR;
+-
- // Tkimg
- if (Tkimg_Init(interp) == TCL_ERROR)
- return TCL_ERROR;
@@ -116,8 +294,7 @@
-
- // jpegtcl
- if (Jpegtcl_Init(interp) == TCL_ERROR)
-+ if (Tcl_PkgRequire (interp, "Img", NULL, 0) == NULL)
- return TCL_ERROR;
+- return TCL_ERROR;
- Tcl_StaticPackage (interp, "jpegtcl", Jpegtcl_Init,
- (Tcl_PackageInitProc*)NULL);
-
@@ -180,9 +357,34 @@
- return TCL_ERROR;
- Tcl_StaticPackage (interp, "window", Tkimgwindow_Init,
- (Tcl_PackageInitProc*)NULL);
+-
+- // Signal_Ext
+-#ifndef _WIN32
+- if (Signal_ext_Init(interp) == TCL_ERROR)
+- return TCL_ERROR;
+- Tcl_StaticPackage (interp, "signal", Signal_ext_Init,
+- (Tcl_PackageInitProc*)NULL);
+-#endif
+-
+ #ifdef _MACOSX
+ if (Tkmacosx_Init(interp) == TCL_ERROR)
+ return TCL_ERROR;
+@@ -296,15 +114,6 @@ int SAOAppInit(Tcl_Interp *interp)
+ (Tcl_PackageInitProc*)NULL);
+ #endif
+
+- // Variables
+- Tcl_SetVar(interp, "auto_path", "./zvfsmntpt/tcl8.5 ./zvfsmntpt/tk8.5 ./zvfsmntpt/blt3.0 ./zvfsmntpt/tcllib1.6 ./zvfsmntpt/src", TCL_GLOBAL_ONLY);
+- Tcl_SetVar(interp, "tcl_libPath", "./zvfsmntpt/tcl8.5", TCL_GLOBAL_ONLY);
+- Tcl_SetVar(interp, "blt_library", "./zvfsmntpt/blt3.0", TCL_GLOBAL_ONLY);
+- Tcl_SetVar(interp, "blt_libPath", "./zvfsmntpt/blt3.0", TCL_GLOBAL_ONLY);
+- Tcl_SetVar2(interp, "env", "TK_TABLE_LIBRARY", "", TCL_GLOBAL_ONLY);
+-
+- //Tcl_SetVar(interp, "tcl_rcFileName", "~/.wishrc", TCL_GLOBAL_ONLY);
+-
+ return TCL_OK;
+ }
- // Signal_Ext
- #ifndef _WIN32
--- a/make.linux
+++ b/make.linux
@@ -1,29 +1,26 @@
@@ -271,3 +473,93 @@
zip : FORCE
@echo "Installing ZIP..."
+@@ -398,76 +398,23 @@ zvfs : FORCE
+ scrub : FORCE
+ find . -name "*[~#]" -exec rm {} \;
+
+-distclean : tclclean tkclean \
+- tktableclean tcllibclean bltclean \
+- zlibclean tclxmlclean tkimgclean tkmpegclean htmlclean \
+- xpaclean iisclean checkdnsclean $(SIGNALCLEAN) funtoolsclean \
+- slaclean astclean wcssubsclean \
+- riceclean hcompressclean plioclean \
+- $(OPTDIRCLEAN) \
+- saotkclean zipclean zvfsclean ds9clean srcclean \
+- dirsclean
++distclean : tkmpegclean iisclean checkdnsclean \
++ hcompressclean plioclean $(OPTDIRCLEAN) \
++ saotkclean ds9clean srcclean dirsclean
+ $(RM) core *~ *#
+
+ dirsclean: FORCE
+ @for d in $(DIRS); do rm -rf $$d; done
+
+-tclclean : FORCE
+- cd $(TCLDIRDIR); $(MAKE) distclean
+-
+-tkclean : FORCE
+- cd $(TKDIRDIR); $(MAKE) distclean
+-
+-tktableclean: FORCE
+- cd $(TKTABLEDIR); $(MAKE) distclean
+-
+-tcllibclean: FORCE
+- cd $(TCLLIBDIR); $(MAKE) distclean
+-
+-bltclean: FORCE
+- cd $(BLTDIR); $(MAKE) distclean
+-
+-zlibclean: FORCE
+- cd $(ZLIBDIR); $(MAKE) distclean
+-
+-tclxmlclean: FORCE
+- cd $(TCLXMLDIR); $(MAKE) distclean
+-
+-tkimgclean: FORCE
+- rm -fr $(TKIMGDIR)/Img/*
+- rm -fr $(LIB)/Img1.3
+- cd $(TKIMGDIR); $(MAKE) distclean
+-
+ tkmpegclean: FORCE
+ cd $(TKMPEGDIR); $(MAKE) distclean
+
+-htmlclean: FORCE
+- cd $(HTMLDIR); $(MAKE) distclean
+-
+-xpaclean : FORCE
+- cd $(XPADIR); $(MAKE) distclean
+-
+ iisclean : FORCE
+ cd $(IISDIR); $(MAKE) distclean
+
+ checkdnsclean : FORCE
+ cd $(CHECKDNSDIR); $(MAKE) distclean
+
+-signalclean : FORCE
+- cd $(SIGNALDIR); $(MAKE) distclean
+-
+-funtoolsclean: FORCE
+- cd $(FUNTOOLSDIR); $(MAKE) distclean
+-
+-slaclean: FORCE
+- cd $(SLADIR); $(MAKE) distclean
+-
+-astclean: FORCE
+- cd $(ASTDIR); $(MAKE) distclean
+-
+-wcssubsclean: FORCE
+- cd $(WCSSUBSDIR); $(MAKE) distclean
+-
+ riceclean: FORCE
+ cd $(RICEDIR); $(MAKE) distclean
+
+@@ -483,9 +430,6 @@ saotkclean : FORCE
+ zipclean: FORCE
+ cd $(ZIPDIR); PREFIX=$(root) $(MAKE) -f unix/Makefile clean
+
+-zvfsclean: FORCE
+- cd $(ZVFSDIR); $(MAKE) distclean
+-
+ ds9clean : FORCE
+ cd $(DS9DIR); $(MAKE) distclean
+
diff --git a/debian/patches/saotk.patch b/debian/patches/saotk.patch
index 21db352..fb0f1b0 100644
--- a/debian/patches/saotk.patch
+++ b/debian/patches/saotk.patch
@@ -8,6 +8,20 @@ index 011d443..04bcfde 100644
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"
+diff --git a/saotk/fitsy++/Makefile b/saotk/fitsy++/Makefile
+index 5be79cc..f36d98d 100644
+--- a/saotk/fitsy++/Makefile
++++ b/saotk/fitsy++/Makefile
+@@ -3,8 +3,7 @@ include ../../make.pkgs
+
+ CXXFLAGS = $(CXXOPT) -I. -I.. -I../vector -I../util \
+ -I../../include -I$(X11INCLUDE) \
+- -I../../$(FUNTOOLSDIR)/filter -I../../$(FUNTOOLSDIR)/fitsy \
+- -I../../$(FUNTOOLSDIR)/util
++ -I/usr/include/funtools -I/usr/include/wcstools
+
+ SS = \
+ alloc.C \
diff --git a/saotk/fitsy++/outchannel.C b/saotk/fitsy++/outchannel.C
index 20d7eff..f4e98e0 100644
--- a/saotk/fitsy++/outchannel.C
@@ -65,6 +79,22 @@ index 0474bf3..50a37b8 100644
this->ext_++;
this->found();
return;
+diff --git a/saotk/frame/Makefile b/saotk/frame/Makefile
+index 17702d7..f09a666 100644
+--- a/saotk/frame/Makefile
++++ b/saotk/frame/Makefile
+@@ -4,9 +4,8 @@ include ../../make.pkgs
+ CXXFLAGS = $(CXXOPT) -w \
+ -I. -I.. -I../widget -I../vector -I../list -I../fitsy++ -I../util \
+ -I../../include -I$(X11INCLUDE) \
+- -I../../$(FUNTOOLSDIR)/util \
+- -I/usr/include/libxml2 \
+- -I../../$(ASTDIR)
++ -I/usr/include/funtools \
++ -I/usr/include/libxml2
+
+ SS = \
+ annulus.C \
diff --git a/saotk/frame/ciaolex.C b/saotk/frame/ciaolex.C
index 1755c2a..5b3b774 100644
--- a/saotk/frame/ciaolex.C
@@ -89,6 +119,126 @@ index 48c82f6..c149f83 100644
/* Returned upon end-of-file. */
#define YY_NULL 0
+diff --git a/saotk/frame/fitsimage.C b/saotk/frame/fitsimage.C
+index 830882a..0cd5733 100644
+--- a/saotk/frame/fitsimage.C
++++ b/saotk/frame/fitsimage.C
+@@ -23,10 +23,101 @@
+
+ // wcs coordinate system strings (for use with wcssubs)
+
++
+ // this is kluge to speed up doug minks wcssubs 'ksearch' routine
+ extern "C" {
+ FitsHead* wcshead = NULL;
+- char* ksearchh(char*, char*);
++ char* ksearchh(char* hstring, char* keyword)
++ {
++/* Find entry for keyword keyword in FITS header string hstring.
++ (the keyword may have a maximum of eight letters)
++ NULL is returned if the keyword is not found */
++
++/* char *hstring; character string containing fits-style header
++ information in the format <keyword>= <value> {/ <comment>}
++ the default is that each entry is 80 characters long;
++ however, lines may be of arbitrary length terminated by
++ nulls, carriage returns or linefeeds, if packed is true. */
++/*char *keyword; character string containing the name of the variable
++ to be returned. ksearch searches for a line beginning
++ with this string. The string may be a character
++ literal or a character variable terminated by a null
++ or '$'. it is truncated to 8 characters. */
++ char *loc, *headnext, *headlast, *pval, *lc, *line;
++ int icol, nextchar, lkey, nleft, lhead, lmax;
++
++#ifdef USE_SAOLIB
++ int iel=1, ip=1, nel, np, ier;
++ char *get_fits_head_str();
++
++ if( !use_saolib ){
++#endif
++
++ pval = 0;
++static int lhead0 = 0;
++/* Find current length of header string */
++ if (lhead0)
++ lmax = lhead0;
++ else
++ lmax = 256000;
++ for (lhead = 0; lhead < lmax; lhead++) {
++ if (hstring[lhead] == (char) 0)
++ break;
++ }
++
++/* Search header string for variable name */
++ headlast = hstring + lhead;
++ headnext = hstring;
++ pval = NULL;
++ while (headnext < headlast) {
++ nleft = headlast - headnext;
++ loc = strncsrch (headnext, keyword, nleft);
++
++ /* Exit if keyword is not found */
++ if (loc == NULL) {
++ break;
++ }
++
++ icol = (loc - hstring) % 80;
++ lkey = strlen (keyword);
++ nextchar = (int) *(loc + lkey);
++
++ /* If this is not in the first 8 characters of a line, keep searching */
++ if (icol > 7)
++ headnext = loc + 1;
++
++ /* If parameter name in header is longer, keep searching */
++ else if (nextchar != 61 && nextchar > 32 && nextchar < 127)
++ headnext = loc + 1;
++
++ /* If preceeding characters in line are not blanks, keep searching */
++ else {
++ line = loc - icol;
++ for (lc = line; lc < loc; lc++) {
++ if (*lc != ' ')
++ headnext = loc + 1;
++ }
++
++ /* Return pointer to start of line if match */
++ if (loc >= headnext) {
++ pval = line;
++ break;
++ }
++ }
++ }
++/* Return pointer to calling program */
++ return (pval);
++
++#ifdef USE_SAOLIB
++ }
++ else {
++ if (get_fits_head_str(keyword,iel,ip,&nel,&np,&ier,hstring) != NULL)
++ return(hstring);
++ else
++ return(NULL);
++ }
++#endif
++ }
+
+ char* findit(char* cards, char* key)
+ {
+diff --git a/saotk/frame/fitsimage.h b/saotk/frame/fitsimage.h
+index 9fef1db..db48136 100644
+--- a/saotk/frame/fitsimage.h
++++ b/saotk/frame/fitsimage.h
+@@ -10,7 +10,7 @@
+ #include "fitsdata.h"
+ #include "coord.h"
+ #include "file.h"
+-#include "wcs.h"
++#include "wcstools/wcs.h"
+
+ #define WCSXMAX 7
+
diff --git a/saotk/frame/lex.C b/saotk/frame/lex.C
index c7f7739..6aff81d 100644
--- a/saotk/frame/lex.C
@@ -149,6 +299,36 @@ index 1364bf0..cf19fef 100644
/* Returned upon end-of-file. */
#define YY_NULL 0
+diff --git a/saotk/util/Makefile b/saotk/util/Makefile
+index 089787f..92be85e 100644
+--- a/saotk/util/Makefile
++++ b/saotk/util/Makefile
+@@ -3,8 +3,7 @@ include ../../make.pkgs
+
+ CXXFLAGS = $(CXXOPT) -I. -I.. -I../widget -I../vector \
+ -I../../include -I$(X11INCLUDE) \
+- -I../../$(FUNTOOLSDIR)/util \
+- -I../../$(ASTDIR)
++ -I/usr/include/funtools
+
+ SRC = attribute.C \
+ grf.C \
+diff --git a/saotk/util/grf.C b/saotk/util/grf.C
+index 2788692..36e50c2 100644
+--- a/saotk/util/grf.C
++++ b/saotk/util/grf.C
+@@ -534,3 +534,11 @@ int astGCap(int cap, int value)
+ {
+ return astGridPtr->gCap(cap,value);
+ }
++
++int astGBBuf( void ){
++ return 0;
++}
++
++int astGEBuf( void ){
++ return 0;
++}
diff --git a/saotk/util/tkpostscript.h b/saotk/util/tkpostscript.h
index d23708d..d72b3e7 100644
--- a/saotk/util/tkpostscript.h
@@ -177,3 +357,16 @@ index 5466083..6041b66 100644
class Vector {
public:
double v[3];
+diff --git a/saotk/widget/widget.C b/saotk/widget/widget.C
+index ca078d0..8e88e8e 100644
+--- a/saotk/widget/widget.C
++++ b/saotk/widget/widget.C
+@@ -5,6 +5,8 @@
+ #include "widget.h"
+ #include "util.h"
+
++float psScale = 1.0;
++
+ // Tk Canvas Widget Functions Declaration
+
+ int WidgetConfigProc(Tcl_Interp* interp, Tk_Canvas canvas, Tk_Item* item,
diff --git a/debian/rules b/debian/rules
index c7ba229..e4974db 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,89 +1,20 @@
#!/usr/bin/make -f
-# Build rules for saods9.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-# Modifications are a work of Justin Pryzby during 2005 and are hereby
-# placed in the public domain.
-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-BUILDPARTS:=dirs checkdns tkmpeg iis rice hcompress plio zvfs saotk ds9
-
-FLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- FLAGS += -O0
-else
- FLAGS += -O2
-endif
+BUILDPARTS:=dirs checkdns tkmpeg iis rice hcompress plio saotk ds9
get-orig-source:
sh ./debian/repack;
-regenerate-man:
- perl ./debian/generate-man >./debian/ds9.1;
+%:
+ dh $@
-build: build-stamp
-build-stamp:
- dh_testdir
+override_dh_auto_build:
ln -sf make.linux make.include
- $(MAKE) FLAGS="$(FLAGS)" $(BUILDPARTS)
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
-
- set -e; if [ -e xpa-2.1.6/Makefile ];\
- then $(MAKE) -C xpa-2.1.6 distclean; fi;
-
- rm -fr htmlwidget/tests/ html/ bin/ lib/ share/ man/ include/;
- find -name conf.h |xargs rm -f;
- find -name config.log |xargs rm -f;
- find -name config.status |xargs rm -f;
- find -name '*.d' -type f |xargs rm -f;
- find funtools-1.3.0b9/ xpa-2.1.6/ -name Makefile |xargs rm -f;
- find -name '*.[ao]' |xargs rm -f;
- find -name '*.so' |xargs rm -f;
- set -e; cd ./ds9/; rm -f ds9 ds9tk.c ds9tk.h;
- dh_clean ./build ./make.include ;
-
-#dh_clean -k
-
-binary: binary-indep binary-arch
-binary-indep: build
-binary-arch: build
- dh_testdir
- dh_testroot
-
- dh_installchangelogs
- html2text -nobs -o ./debian/saods9/usr/share/doc/saods9/changelog ./xpa-2.1.6/doc/changelog.html
- gzip -9 ./debian/saods9/usr/share/doc/saods9/changelog
- # Keep the HTML copy uncompressed so the href works.
-
- mkdir xpadoc ds9doc;
- cp xpa-2.1.6/doc/*.html xpadoc/;
- cp ds9/doc/*.html ds9doc/;
- dh_installdocs xpadoc/ ds9doc/ ds9/doc/ref/ ds9/doc/release/;
- rm -fr xpadoc/ ds9doc/;
-
- dh_install ./ds9/ds9 bin/xpa* usr/bin/
- dh_install debian/saods9.desktop usr/share/applications
- dh_install debian/ds9.xpm usr/share/pixmaps
- dh_installmenu
-# dh_installmime
- dh_installman ./xpa-2.1.6/man/man1/* ./debian/ds9.1
- dh_link
- dh_strip
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
+ dh_auto_build -- $(BUILDPARTS)
-.PHONY: clean binary-indep binary-arch binary get-orig-source regenerate-man
+override_dh_clean:
+ rm -fr bin/ lib/ share/ man/ include/
+ find -name '*.[ao]' |xargs rm -f
+ dh_clean
diff --git a/debian/saods9.install b/debian/saods9.install
new file mode 100644
index 0000000..e674d79
--- /dev/null
+++ b/debian/saods9.install
@@ -0,0 +1,4 @@
+bin/ds9 usr/bin/
+debian/saods9.desktop usr/share/applications
+debian/ds9.xpm usr/share/pixmaps
+ds9/zipdir/zvfsmntpt/src/* /usr/share/ds9/src/
--
image display tool for astronomy
More information about the debian-science-commits
mailing list