[SCM] image display tool for astronomy branch, debian, updated. dd0bfa0311e9d88fd08828903f5f9f7e5b218729

Ole Streicher debian at liska.ath.cx
Wed Jun 6 21:03:07 UTC 2012


The following commit has been merged in the debian branch:
commit dd0bfa0311e9d88fd08828903f5f9f7e5b218729
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Wed Jun 6 23:02:10 2012 +0200

    Adjust patches to fit to new version. Delete patches that are included
    in version 7.

diff --git a/debian/patches/add_about_debian.patch b/debian/patches/add_about_debian.patch
index c9eb24d..b365fa8 100644
--- a/debian/patches/add_about_debian.patch
+++ b/debian/patches/add_about_debian.patch
@@ -2,23 +2,12 @@ Author: Ole Streicher <debian at liska.ath.cx>
 Description: Add the Debian packager to the "About" box
 --- a/src/help.tcl
 +++ b/src/help.tcl
-@@ -23,6 +23,8 @@ proc HelpDef {} {
+@@ -23,6 +23,8 @@
  
-     set help(about) "SAOImage DS9\nVersion $ds9(version)\n\nAuthors:\nWilliam Joye (SAO)\nEric Mandel (SAO)\nSteve Murray (SAO)\nJohn Roll (SAO)\n\nContributions:\nD.S. Berry (Starlink)\nL. Brown (HEASARC)\nMark Calabretta (ATNF)\nMike Fitzpatrick (NOAO)\nDoug Mink (SAO)\nDoug Tody (NOAO)\nP.T. Wallace (Starlink)\nR.F. Warren-Smith (Starlink)\nPeter Wilson (HEASARC)\n\nOther Contributors:\nMark Adler, Jean-loup Gailly,\nD. Richard Hip, G. Howlett,\nJan Nijtmans, John Ousterhout\n\nTranslations:\nHans-Jakob Grimm (SAO)\nAllan Hornstrup (DNSC)\nAlberto Martins (Universidade de Sao Paulo)\nManuel Perez Torres (SAO)\nMasahiro Tsujimoto (JAXA ISAS)\nElaine Fortin (SAO)\nAnne Lemiere(SAO)"
+     set help(about) "SAOImage DS9\nVersion $ds9(version)\n\nAuthors:\nWilliam Joye (SAO)\nEric Mandel (SAO)\nSteve Murray (SAO)\nJohn Roll (SAO)\n\nContributions:\nD.S. Berry (Starlink)\nL. Brown (HEASARC)\nMark Calabretta (ATNF)\nMike Fitzpatrick (NOAO)\nDoug Mink (SAO)\nDoug Tody (NOAO)\nP.T. Wallace (Starlink)\nR.F. Warren-Smith (Starlink)\nPeter Wilson (HEASARC)\n\nOther Contributors:\nMark Adler, Jean-loup Gailly,\nD. Richard Hip, G. Howlett,\nJan Nijtmans, John Ousterhout\n\nTranslations:\nHans-Jakob Grimm (SAO)\nAllan Hornstrup (DNSC)\nAlberto Martins (Universidade de Sao Paulo)\nManuel Perez Torres (SAO)\nMasahiro Tsujimoto (JAXA ISAS)\nElaine Fortin (SAO)\nAnne Lemiere(SAO)\nPetr Kubánek"
  
 +    append help(about) "\n\nDebian packaging:\nOle Streicher (AIP)"
 +
      set help(email) "If you encounter any problems or have suggestions with ds9, please contact us at: 
  
  saord at cfa.harvard.edu
---- a/src/util.tcl
-+++ b/src/util.tcl
-@@ -925,7 +925,7 @@ proc AboutBox {} {
- 
-     set w {.abt}
-     set width 400
--    set height 500
-+    set height 570
- 
-     set ed(ok) 0
- 
diff --git a/debian/patches/add_ksearch.patch b/debian/patches/add_ksearch.patch
index a90edb5..3b0d041 100644
--- a/debian/patches/add_ksearch.patch
+++ b/debian/patches/add_ksearch.patch
@@ -3,14 +3,10 @@ Description: Insert the "ksearchh" routine that was originated by Doub Mink
  in wcssubs so that fitsImage.c will compile.
 --- 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
+@@ -28,7 +28,97 @@
  extern "C" {
    FitsHead* wcshead = NULL;
+   FitsHead* wcsprim = NULL;
 -  char* ksearchh(char*, char*);
 +  char* ksearchh(char* hstring, char* keyword)
 +  {
diff --git a/debian/patches/add_psscale.patch b/debian/patches/add_psscale.patch
index 3eadee4..7a9ee2e 100644
--- a/debian/patches/add_psscale.patch
+++ b/debian/patches/add_psscale.patch
@@ -20,7 +20,7 @@ Description: The original code from ds9 uses a patched postscript code to allow
  #endif
  
  // copied from tkCanvPs.c
--#include "../../tk8.5.8/generic/tkCanvas.h"
+-#include "../../tk8.5.9/generic/tkCanvas.h"
 +#include <tk-private/generic/tkCanvas.h>
  
  typedef struct TkPostscriptInfo {
diff --git a/debian/patches/avoid_compile_warnings_saotk.patch b/debian/patches/avoid_compile_warnings_saotk.patch
index b9ea584..e36d483 100644
--- a/debian/patches/avoid_compile_warnings_saotk.patch
+++ b/debian/patches/avoid_compile_warnings_saotk.patch
@@ -33,7 +33,7 @@ Description: Avoid compile time warnings in the saotk subsystem
  
 --- a/saotk/fitsy++/strm.C
 +++ b/saotk/fitsy++/strm.C
-@@ -346,7 +346,7 @@ template<class T> void FitsFitsStream<T>::processExact()
+@@ -344,7 +344,7 @@ template<class T> void FitsFitsStream<T>::processExact()
    if (!(this->pExt_ || (this->pIndex_>0))) {
  
      // we are only looking for a primary image
@@ -42,7 +42,7 @@ Description: Avoid compile time warnings in the saotk subsystem
        this->found();
        return;
      }
-@@ -402,7 +402,7 @@ template<class T> void FitsFitsStream<T>::processExact()
+@@ -400,7 +400,7 @@ template<class T> void FitsFitsStream<T>::processExact()
  	this->head_ = NULL;
        }
  
@@ -51,16 +51,3 @@ Description: Avoid compile time warnings in the saotk subsystem
  	this->ext_++;
  	this->found();
  	return;
---- a/saotk/vector/vector.h
-+++ b/saotk/vector/vector.h
-@@ -16,6 +16,10 @@ using namespace std;
- class Vector3d;
- class Matrix;
- 
-+class Vector;
-+class Matrix;
-+class BBox;
-+
- class Vector {
-  public:
-   double v[3];
diff --git a/debian/patches/fix_bit32_saotk.patch b/debian/patches/fix_bit32_saotk.patch
deleted file mode 100644
index e5d2658..0000000
--- a/debian/patches/fix_bit32_saotk.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: BIT32 is defined in ps.h and is 64 bit on usual machines
- (contrary to its name!). This leads to errornous postscript when bye swapping
- is needed since then the highest bytes are set randomly. This patch fixes
- this.
---- a/saotk/util/ps.C
-+++ b/saotk/util/ps.C
-@@ -288,7 +288,7 @@ Ascii85::Ascii85(int l) : Encode(l)
- 
- BIT32 Ascii85::swap(unsigned BIT32* p)
- {
--  BIT32 r;
-+  BIT32 r = 0;
-   swap4((char*)p, (char*)&r);
-   return r;
- }
diff --git a/debian/patches/fix_blt.patch b/debian/patches/fix_blt.patch
index 09f1fb3..5eab632 100644
--- a/debian/patches/fix_blt.patch
+++ b/debian/patches/fix_blt.patch
@@ -4,28 +4,28 @@ Description: BLT crashes when it reaches this code. This seems to be some
  pragmatic -- I will not guarantee that this is not a memore hole.
  I would very much appreciate if someone could review this and provide 
  a better fix.
---- saods9-6.2+dfsg.orig/saotk/frame/frblt.C
-+++ saods9-6.2+dfsg/saotk/frame/frblt.C
-@@ -315,7 +315,7 @@ void FrameBase::bltCut(char* xname, char
-   if (Blt_GetVector(interp, xname, &xx) != TCL_OK)
+--- a/saotk/frame/frblt.C
++++ b/saotk/frame/frblt.C
+@@ -232,7 +232,7 @@
+   if (Blt_GetVector(interp, xname, &xv) != TCL_OK)
      goto error;
  
--  if (Blt_ResetVector(xx, x, length, length*sizeof(double), TCL_DYNAMIC) != 
-+  if (Blt_ResetVector(xx, x, length, length*sizeof(double), TCL_STATIC) != 
+-  if (Blt_ResetVector(xv, xx, length, length*sizeof(double), TCL_DYNAMIC) != 
++  if (Blt_ResetVector(xv, xx, length, length*sizeof(double), TCL_STATIC) != 
        TCL_OK)
      goto error;
  
-@@ -323,7 +323,7 @@ void FrameBase::bltCut(char* xname, char
-   if (Blt_GetVector(interp, yname, &yy) != TCL_OK)
+@@ -240,7 +240,7 @@
+   if (Blt_GetVector(interp, yname, &yv) != TCL_OK)
      goto error;
  
--  if (Blt_ResetVector(yy, y, length, length*sizeof(double), TCL_DYNAMIC) != 
-+  if (Blt_ResetVector(yy, y, length, length*sizeof(double), TCL_STATIC) != 
+-  if (Blt_ResetVector(yv, yy, length, length*sizeof(double), TCL_DYNAMIC) != 
++  if (Blt_ResetVector(yv, yy, length, length*sizeof(double), TCL_STATIC) != 
        TCL_OK)
      goto error;
  
---- a/blt3.0/src/bltFont.h
-+++ b/blt3.0/src/bltFont.h
+--- a/blt3.0.1/src/bltFont.h
++++ b/blt3.0.1/src/bltFont.h
 @@ -30,6 +30,8 @@
  #ifndef _BLT_FONT_H
  #define _BLT_FONT_H
@@ -35,9 +35,9 @@ Description: BLT crashes when it reaches this code. This seems to be some
  #define FONT_ITALIC	(1<<0)
  #define FONT_BOLD	(1<<1)
  
---- a/blt3.0/src/bltPictCmd.c
-+++ b/blt3.0/src/bltPictCmd.c
-@@ -86,6 +86,8 @@ enum PictureFormats {
+--- a/blt3.0.1/src/bltPictCmd.c
++++ b/blt3.0.1/src/bltPictCmd.c
+@@ -88,6 +88,8 @@
      NUMFMTS
  };
  
@@ -46,9 +46,9 @@ Description: BLT crashes when it reaches this code. This seems to be some
  typedef struct {
      const char *name;			/* Name of format. */
      unsigned int flags;
---- a/blt3.0/src/bltGrMesh.c
-+++ b/blt3.0/src/bltGrMesh.c
-@@ -1708,6 +1708,10 @@ ComparePoints(const void *a, const void *b)
+--- a/blt3.0.1/src/bltGrMesh.c
++++ b/blt3.0.1/src/bltGrMesh.c
+@@ -1708,6 +1708,10 @@
      return 0;
  }
  
@@ -59,38 +59,9 @@ Description: BLT crashes when it reaches this code. This seems to be some
  static void
  Triangulate(Tcl_Interp *interp, Mesh *meshPtr)
  {
---- a/blt3.0/src/bltPaneset.c
-+++ b/blt3.0/src/bltPaneset.c
-@@ -1896,7 +1896,7 @@ PaneCustodyProc(ClientData clientData, Tk_Window tkwin)
-     if (Tk_IsMapped(panePtr->tkwin)) {
- 	Tk_UnmapWindow(panePtr->tkwin);
-     }
--    fprintf(stderr, "PaneCustodyProc: DestoryPane(%x, %s)\n", panePtr, panePtr->name);
-+    fprintf(stderr, "PaneCustodyProc: DestoryPane(%p, %s)\n", panePtr, panePtr->name);
-     DestroyPane(panePtr);
-     setPtr->flags |= LAYOUT_PENDING;
-     EventuallyRedraw(setPtr);
-@@ -2586,7 +2586,7 @@ PaneFreeProc(DestroyData dataPtr)
- {
-     Pane *panePtr = (Pane *)dataPtr;
- 
--    fprintf(stderr, "PaneFreeProc: DestoryPane(%x, %s)\n", panePtr, panePtr->name);
-+    fprintf(stderr, "PaneFreeProc: DestoryPane(%p, %s)\n", panePtr, panePtr->name);
-     DestroyPane(panePtr);
- }
- 
-@@ -2773,7 +2773,7 @@ DestroyPaneset(Paneset *setPtr)		/* Paneset structure */
- 	panePtr->link = NULL;		/* Don't disrupt this chain of
- 					 * entries. */
- 	panePtr->hashPtr = NULL;
--    fprintf(stderr, "PanesetFreeProc: DestoryPane(%x, %s)\n", panePtr, panePtr->name);
-+    fprintf(stderr, "PanesetFreeProc: DestoryPane(%p, %s)\n", panePtr, panePtr->name);
- 	DestroyPane(panePtr);
-     }
-     Tk_FreeCursor(setPtr->display, setPtr->defHorzCursor);
---- a/blt3.0/src/bltBind.c
-+++ b/blt3.0/src/bltBind.c
-@@ -1244,6 +1244,12 @@ static TkStateMap propNotify[] = {
+--- a/blt3.0.1/src/bltBind.c
++++ b/blt3.0.1/src/bltBind.c
+@@ -1244,6 +1244,12 @@
      {-1, NULL}
  };
  
@@ -103,29 +74,9 @@ Description: BLT crashes when it reaches this code. This seems to be some
  /*
   *---------------------------------------------------------------------------
   *
---- a/blt3.0/src/bltImage.c
-+++ b/blt3.0/src/bltImage.c
-@@ -131,7 +131,7 @@ Blt_Image_GetType(Tk_Image tkImage)	/* Token for image. */
- {
-     TkImageMaster *masterPtr;
- 
--    masterPtr = Blt_Image_GetMaster(tkImage);
-+    masterPtr = (TkImageMaster *)Blt_Image_GetMaster(tkImage);
-     return masterPtr->typePtr;
- }
- 
-@@ -149,7 +149,7 @@ Blt_Image_NameOfType(Tk_Image tkImage)
- {
-     TkImageMaster *masterPtr;
- 
--    masterPtr = Blt_Image_GetMaster(tkImage);
-+    masterPtr = (TkImageMaster *)Blt_Image_GetMaster(tkImage);
-     return masterPtr->typePtr->name;
- }
- 
---- a/blt3.0/src/bltCoreInit.c
-+++ b/blt3.0/src/bltCoreInit.c
-@@ -310,7 +310,7 @@ Blt_core_Init(Tcl_Interp *interp) /* Interpreter to add extra commands */
+--- a/blt3.0.1/src/bltCoreInit.c
++++ b/blt3.0.1/src/bltCoreInit.c
+@@ -301,7 +301,7 @@
      Tcl_Namespace *nsPtr;
      Tcl_ValueType args[2];
      const char *result;
@@ -134,9 +85,9 @@ Description: BLT crashes when it reaches this code. This seems to be some
  
  #ifdef USE_TCL_STUBS
      if (Tcl_InitStubs(interp, TCL_VERSION_LOADED, isExact) == NULL) {
---- a/blt3.0/src/bltExtInit.c
-+++ b/blt3.0/src/bltExtInit.c
-@@ -135,7 +135,7 @@ Blt_x_Init(Tcl_Interp *interp) /* Interpreter to add extra commands */
+--- a/blt3.0.1/src/bltExtInit.c
++++ b/blt3.0.1/src/bltExtInit.c
+@@ -142,7 +142,7 @@
  {
      Tcl_Namespace *nsPtr;
      Tcl_AppInitProc **p;
diff --git a/debian/patches/fix_docdir.patch b/debian/patches/fix_docdir.patch
index 2d68a82..40c7db9 100644
--- a/debian/patches/fix_docdir.patch
+++ b/debian/patches/fix_docdir.patch
@@ -4,7 +4,7 @@ Description: Instead putting the documentation into the common shared
  browser to be adjusted.
 --- a/src/help.tcl
 +++ b/src/help.tcl
-@@ -8,18 +8,18 @@ proc HelpDef {} {
+@@ -8,18 +8,18 @@
      global help
      global ds9
  
@@ -14,7 +14,7 @@ Description: Instead putting the documentation into the common shared
 -    set help(keyboard) "$ds9(root)/doc/ref/keyboard.html"
 -    set help(faq) "$ds9(root)/doc/faq.html"
 -    set help(new) "$ds9(root)/doc/new.html"
--    set help(release) "$ds9(root)/doc/release/r6.0.html"
+-    set help(release) "$ds9(root)/doc/release/r7.0.html"
 -    set help(helpdesk) "$ds9(root)/doc/helpdesk.html"
 -    set help(story) "$ds9(root)/doc/story.html"
 -    set help(ack) "$ds9(root)/doc/acknowledgment.html"
@@ -24,7 +24,7 @@ Description: Instead putting the documentation into the common shared
 +    set help(keyboard) "$ds9(doc)/ref/keyboard.html"
 +    set help(faq) "$ds9(doc)/faq.html"
 +    set help(new) "$ds9(doc)/new.html"
-+    set help(release) "$ds9(doc)/release/r6.0.html"
++    set help(release) "$ds9(doc)/release/r7.0.html"
 +    set help(helpdesk) "$ds9(doc)/helpdesk.html"
 +    set help(story) "$ds9(doc)/story.html"
 +    set help(ack) "$ds9(doc)/acknowledgment.html"
@@ -32,21 +32,21 @@ Description: Instead putting the documentation into the common shared
 -    set help(vo) "$ds9(root)/doc/ref/vo.html"
 +    set help(vo) "$ds9(doc)/ref/vo.html"
  
-     set help(about) "SAOImage DS9\nVersion $ds9(version)\n\nAuthors:\nWilliam Joye (SAO)\nEric Mandel (SAO)\nSteve Murray (SAO)\nJohn Roll (SAO)\n\nContributions:\nD.S. Berry (Starlink)\nL. Brown (HEASARC)\nMark Calabretta (ATNF)\nMike Fitzpatrick (NOAO)\nDoug Mink (SAO)\nDoug Tody (NOAO)\nP.T. Wallace (Starlink)\nR.F. Warren-Smith (Starlink)\nPeter Wilson (HEASARC)\n\nOther Contributors:\nMark Adler, Jean-loup Gailly,\nD. Richard Hip, G. Howlett,\nJan Nijtmans, John Ousterhout\n\nTranslations:\nHans-Jakob Grimm (SAO)\nAllan Hornstrup (DNSC)\nAlberto Martins (Universidade de Sao Paulo)\nManuel Perez Torres (SAO)\nMasahiro Tsujimoto (JAXA ISAS)\nElaine Fortin (SAO)\nAnne Lemiere(SAO)"
+     set help(about) "SAOImage DS9\nVersion $ds9(version)\n\nAuthors:\nWilliam Joye (SAO)\nEric Mandel (SAO)\nSteve Murray (SAO)\nJohn Roll (SAO)\n\nContributions:\nD.S. Berry (Starlink)\nL. Brown (HEASARC)\nMark Calabretta (ATNF)\nMike Fitzpatrick (NOAO)\nDoug Mink (SAO)\nDoug Tody (NOAO)\nP.T. Wallace (Starlink)\nR.F. Warren-Smith (Starlink)\nPeter Wilson (HEASARC)\n\nOther Contributors:\nMark Adler, Jean-loup Gailly,\nD. Richard Hip, G. Howlett,\nJan Nijtmans, John Ousterhout\n\nTranslations:\nHans-Jakob Grimm (SAO)\nAllan Hornstrup (DNSC)\nAlberto Martins (Universidade de Sao Paulo)\nManuel Perez Torres (SAO)\nMasahiro Tsujimoto (JAXA ISAS)\nElaine Fortin (SAO)\nAnne Lemiere(SAO)\nPetr Kubánek"
  
 --- a/src/ds9.tcl
 +++ b/src/ds9.tcl
-@@ -36,6 +36,7 @@
+@@ -190,6 +190,7 @@
  # set to absolute path so that if -cd command is used,
  # so we can still find our files
  set ds9(root) "/usr/share/saods9"
 +set ds9(doc) "/usr/share/doc/saods9-doc"
  
  # tcl modules
- package require msgcat
+ if {![namespace exists msgcat]} {
 --- a/src/util.tcl
 +++ b/src/util.tcl
-@@ -940,7 +940,7 @@ proc AboutBox {} {
+@@ -716,7 +716,7 @@
      
      # can't use -file for zvfs
      # set ed(sun) [image create photo -format gif -file $ds9(root)/doc/sun.gif]
diff --git a/debian/patches/fix_funtools_includes.patch b/debian/patches/fix_funtools_includes.patch
index 1e3cca8..f3ad4fb 100644
--- a/debian/patches/fix_funtools_includes.patch
+++ b/debian/patches/fix_funtools_includes.patch
@@ -5,10 +5,10 @@ Description: Since the funtools include files have quite generic names, we
  using the wrong include files. 
 --- a/saotk/fitsy++/compress.C
 +++ b/saotk/fitsy++/compress.C
-@@ -5,7 +5,7 @@
+@@ -4,7 +4,7 @@
+ 
  #include "compress.h"
  #include "head.h"
- #include "util.h"
 -#include "NaN.h"
 +#include <funtools/NaN.h>
  
@@ -16,7 +16,7 @@ Description: Since the funtools include files have quite generic names, we
  {
 --- a/saotk/fitsy++/hist.C
 +++ b/saotk/fitsy++/hist.C
-@@ -13,8 +13,8 @@ using namespace std;
+@@ -13,8 +13,8 @@
  #include "hist.h"
  #include "util.h"
  
@@ -27,17 +27,6 @@ Description: Since the funtools include files have quite generic names, we
  
  #define FILTERSIZE 262144
  #define MULTWCS 27
---- a/saotk/frame/fitsanalysis.C
-+++ b/saotk/frame/fitsanalysis.C
-@@ -4,7 +4,7 @@
- 
- #include "fitsimage.h"
- 
--#include "NaN.h"
-+#include <funtools/NaN.h>
- #include "smooth.h"
- 
- int FitsImage::smooth()
 --- a/saotk/frame/fitsbin.C
 +++ b/saotk/frame/fitsbin.C
 @@ -4,7 +4,7 @@
@@ -58,7 +47,7 @@ Description: Since the funtools include files have quite generic names, we
 -#include "NaN.h"
 +#include <funtools/NaN.h>
  
- #define AUTOCUTSIZE 2048
+ // ZSCALE
  
 --- a/saotk/frame/frame.C
 +++ b/saotk/frame/frame.C
@@ -79,9 +68,9 @@ Description: Since the funtools include files have quite generic names, we
  #include "ps.h"
 -#include "NaN.h"
 +#include <funtools/NaN.h>
- 
  #include "sigbus.h"
  
+ #include <pthread.h>
 --- a/saotk/frame/frame3dtruecolor.C
 +++ b/saotk/frame/frame3dtruecolor.C
 @@ -9,7 +9,7 @@
@@ -140,7 +129,7 @@ Description: Since the funtools include files have quite generic names, we
 --- a/saotk/frame/frblt.C
 +++ b/saotk/frame/frblt.C
 @@ -5,7 +5,7 @@
- #include "framebase.h"
+ #include "base.h"
  #include "context.h"
  #include "fitsimage.h"
 -#include "NaN.h"
@@ -150,15 +139,15 @@ Description: Since the funtools include files have quite generic names, we
  #include "projection.h"
 --- a/saotk/frame/frmarker.C
 +++ b/saotk/frame/frmarker.C
-@@ -12,7 +12,7 @@
- 
+@@ -11,7 +11,7 @@
+ #include "fvcontour.h"
  #include "marker.h"
  #include "basemarker.h"
 -#include "NaN.h"
 +#include <funtools/NaN.h>
+ #include "sigbus.h"
+ #include "parser.H"
  
- #include "annulus.h"
- #include "box.h"
 --- a/saotk/frame/frsave.C
 +++ b/saotk/frame/frsave.C
 @@ -9,7 +9,7 @@
@@ -172,7 +161,7 @@ Description: Since the funtools include files have quite generic names, we
  
 --- a/saotk/frame/fvcontour.C
 +++ b/saotk/frame/fvcontour.C
-@@ -6,7 +6,7 @@
+@@ -7,7 +7,7 @@
  #include "fitsimage.h"
  #include "fvcontour.h"
  
@@ -194,12 +183,12 @@ Description: Since the funtools include files have quite generic names, we
  {
 --- a/saotk/util/smooth.C
 +++ b/saotk/util/smooth.C
-@@ -10,7 +10,7 @@ using namespace std;
+@@ -10,7 +10,7 @@
  #include <math.h>
  
  #include "smooth.h"
 -#include "NaN.h"
 +#include <funtools/NaN.h>
  
- void boxcar(float* kernel, int r)
+ void boxcar(double* kernel, int r)
  {
diff --git a/debian/patches/fix_saotk_fitsy.patch b/debian/patches/fix_saotk_fitsy.patch
deleted file mode 100644
index ac0f94d..0000000
--- a/debian/patches/fix_saotk_fitsy.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Fix compilation errors with gcc 4.7.0
---- a/saotk/fitsy++/strm.C
-+++ b/saotk/fitsy++/strm.C
-@@ -286,7 +286,7 @@ template<class T> void FitsStream<T>::skipEnd()
- template<class T> void FitsStream<T>::found()
- {
-   // only read allbytes, since the data seg maybe short
--  if (!dataRead(head_->allbytes())) {
-+  if (!this->dataRead(head_->allbytes())) {
-     error();
-     return;
-   }
-@@ -361,7 +361,7 @@ template<class T> void FitsFitsStream<T>::processExact()
-       this->error();
-       return;
-     }
--    dataSkip(this->primary_->datablocks()*FTY_BLOCK);
-+    this->dataSkip(this->primary_->datablocks()*FTY_BLOCK);
- 
-     if (this->pExt_) {
-       while (1) {
-@@ -384,7 +384,7 @@ template<class T> void FitsFitsStream<T>::processExact()
- 	  delete [] b;
- 	}
- 
--	dataSkip(this->head_->datablocks()*FTY_BLOCK);
-+	this->dataSkip(this->head_->datablocks()*FTY_BLOCK);
- 	delete this->head_;
- 	this->head_ = NULL;
-       }
-@@ -397,7 +397,7 @@ template<class T> void FitsFitsStream<T>::processExact()
- 	}
- 	this->ext_++;
- 
--	dataSkip(this->head_->datablocks()*FTY_BLOCK);
-+	this->dataSkip(this->head_->datablocks()*FTY_BLOCK);
- 	delete this->head_;
- 	this->head_ = NULL;
-       }
-@@ -434,7 +434,7 @@ template<class T> void FitsFitsStream<T>::processRelax()
-   // ok, no image, save primary and lets check extensions
-   this->primary_ = this->head_;
-   this->managePrimary_ = 1;
--  dataSkip(this->head_->datablocks()*FTY_BLOCK);
-+  this->dataSkip(this->head_->datablocks()*FTY_BLOCK);
-   this->head_ = NULL;
- 
-   // ok, no image, lets check extensions
-@@ -470,7 +470,7 @@ template<class T> void FitsFitsStream<T>::processRelax()
- 	delete [] a;
-     }
- 
--    dataSkip(this->head_->datablocks()*FTY_BLOCK);
-+    this->dataSkip(this->head_->datablocks()*FTY_BLOCK);
-     delete this->head_;
-     this->head_ = NULL;
-   }
-@@ -528,10 +528,10 @@ template<class T> FitsArrStream<T>::FitsArrStream(FitsFile::FlushMode f)
- 
-   // skip header
-   if (this->pSkip_)
--    dataSkip(this->pSkip_);
-+    this->dataSkip(this->pSkip_);
- 
-   // read data
--  if (!dataRead((off_t)this->pWidth_*this->pHeight_*this->pDepth_*abs(this->pBitpix_)/8)) {
-+  if (!this->dataRead((off_t)this->pWidth_*this->pHeight_*this->pDepth_*abs(this->pBitpix_)/8)) {
-     if ((this->flush_ == this->FLUSH) && this->data_)
-       this->skipEnd();
-     this->valid_=0;
-@@ -575,7 +575,7 @@ template<class T> FitsMosaicStream<T>::FitsMosaicStream(FitsFile::FlushMode f)
-     this->error();
-     return;
-   }
--  dataSkip(this->primary_->datablocks()*FTY_BLOCK);
-+  this->dataSkip(this->primary_->datablocks()*FTY_BLOCK);
- 
-   // first extension
-   this->head_  = this->headRead();
-@@ -586,7 +586,7 @@ template<class T> FitsMosaicStream<T>::FitsMosaicStream(FitsFile::FlushMode f)
-   this->ext_++;
- 
-   // be sure to read all blocks, so that the next call starts on a boundary
--  if (!dataRead(this->head_->datablocks()*FTY_BLOCK)) {
-+  if (!this->dataRead(this->head_->datablocks()*FTY_BLOCK)) {
-     this->error();
-     return;
-   }
-@@ -620,7 +620,7 @@ template<class T> FitsMosaicNextStream<T>::FitsMosaicNextStream(FitsFile* p,
-   this->ext_++;
- 
-   // be sure to read all blocks, so that the next call starts on a boundary
--  if (!dataRead(this->head_->datablocks()*FTY_BLOCK)) {
-+  if (!this->dataRead(this->head_->datablocks()*FTY_BLOCK)) {
-     this->error();
-     return;
-   }
diff --git a/debian/patches/fix_wcstools_includes.patch b/debian/patches/fix_wcstools_includes.patch
index c2be562..29b67c1 100644
--- a/debian/patches/fix_wcstools_includes.patch
+++ b/debian/patches/fix_wcstools_includes.patch
@@ -11,5 +11,5 @@ Description: There is a ambiguity in the name "wcs.h" which could either come
 -#include "wcs.h"
 +#include <wcstools/wcs.h>
  
- #define WCSXMAX 7
- 
+ extern "C" {
+   #include "ast.h"
diff --git a/debian/patches/remove_blt_rpath.patch b/debian/patches/remove_blt_rpath.patch
index 7b4fe1f..415a284 100644
--- a/debian/patches/remove_blt_rpath.patch
+++ b/debian/patches/remove_blt_rpath.patch
@@ -2,9 +2,9 @@ Author: Ole Streicher <debian at liska.ath.cx>
 Description: The BLT shared libraries are compiled with the RPATH set. This is 
  against the Debian policy, and is also not needed at all. Also, configure
  kFreebsd and Hurd similarly to Linux.
---- a/blt3.0/configure
-+++ b/blt3.0/configure
-@@ -9767,11 +9767,11 @@ $as_echo "$single_module" >&6; }
+--- a/blt3.0.1/configure
++++ b/blt3.0.1/configure
+@@ -16441,11 +16441,11 @@
      fi
      ;;
  
@@ -18,9 +18,9 @@ Description: The BLT shared libraries are compiled with the RPATH set. This is
  
      LDFLAGS=""
      EXTRA_LIBS="-ldl"
---- a/blt3.0/configure.in
-+++ b/blt3.0/configure.in
-@@ -1459,11 +1459,11 @@ case $target in
+--- a/blt3.0.1/configure.in
++++ b/blt3.0.1/configure.in
+@@ -1485,11 +1485,11 @@
      fi
      ;;
      
diff --git a/debian/patches/series b/debian/patches/series
index c36315b..f2360bd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,6 @@
 checkdns.patch
 iis.patch
 add_ksearch.patch
-add_missing_grf.patch
 add_psscale.patch
 avoid_compile_warnings_saotk.patch
 fix_wcstools_includes.patch
@@ -16,5 +15,4 @@ add_about_debian.patch
 remove_blt_rpath.patch
 htmlwidget.patch
 optional_doc_package.patch
-fix_bit32_saotk.patch
-fix_saotk_fitsy.patch
+
diff --git a/debian/patches/spellfix.patch b/debian/patches/spellfix.patch
index 6a39e9a..fd78a26 100644
--- a/debian/patches/spellfix.patch
+++ b/debian/patches/spellfix.patch
@@ -1,13 +1,13 @@
 Author: Ole Streicher <debian at liska.ath.cx>
 Description: Spellfix; however this is unused at the end.
 --- a/saotk/frame/ds9parser.C
-+++ b/frame/ds9parser.C
-@@ -1014,7 +1014,7 @@ static const char *const yytname[] =
-   "'|'", "'='", "'+'", "'-'", "'&'", "'!'", "$accept", "start", "commands",
++++ b/saotk/frame/ds9parser.C
+@@ -1016,7 +1016,7 @@
+   "'='", "'+'", "'-'", "'&'", "'!'", "$accept", "start", "commands",
    "command", "@1", "@2", "@3", "hash", "@4", "comment", "@5",
    "shapeComment", "@6", "@7", "nonshapeComment", "@8", "@9", "terminator",
 -  "numeric", "debug", "yesno", "sp", "bp", "ep", "conjuction", "optangle",
 +  "numeric", "debug", "yesno", "sp", "bp", "ep", "conjunction", "optangle",
    "angle", "value", "vvalue", "numberof", "sexagesimal", "hms", "dms",
-   "coord", "coordSystem", "wcsSystem", "skyFrame", "skyFormat", "property",
+   "coord", "coordSystem", "wcsSystem", "skyFrame", "skyDist", "property",
    "callBack", "global", "globalProperty", "globalRuler", "globalCompass",
diff --git a/debian/patches/use_external_libs.patch b/debian/patches/use_external_libs.patch
index 1df2993..ef340fa 100644
--- a/debian/patches/use_external_libs.patch
+++ b/debian/patches/use_external_libs.patch
@@ -3,7 +3,7 @@ Description: Compile against external libraries of wcstools, funtools, ast,
  and tk etc. instead of the convienience copies provided by ds9.
 --- a/ds9/Makefile
 +++ b/ds9/Makefile
-@@ -4,13 +4,7 @@ include ../make.pkgs
+@@ -4,13 +4,7 @@
  #--------------------------defines
  
  ZDIR	= zipdir/zvfsmntpt
@@ -18,42 +18,39 @@ Description: Compile against external libraries of wcstools, funtools, ast,
  	$(ZDIR)/src \
  	$(ZDIR)/msgs \
  	$(ZDIR)/doc \
-@@ -24,51 +18,18 @@ FILES	= $(FFILES)
+@@ -25,49 +19,18 @@
  endif
  
- ifeq ($(OS),unix)
--  MAINDIR = ../$(TKDIR)/unix
-+  MAINDIR = /usr/share/tcltk/tk8.5
-   MAIN	= tkAppInit
+ # for unix, macosx
+-MAINDIR = ../$(TKDIR)/unix
++MAINDIR = /usr/share/tcltk/tk8.5
+ MAIN	= tkAppInit
  
-   LIBS	= \
+ LIBS	= \
 -	../lib/libsaotk.a \
  	../lib/libtkhtml.a \
  	../lib/libtkmpeg.a \
 -	../lib/$(TCLXMLVER)/libTclxml3.2.a \
--	../lib/$(TKIMGVER)/libtkimgwindow1.3.a \
--	../lib/$(TKIMGVER)/libtkimgjpeg1.3.a \
--	../lib/$(TKIMGVER)/libjpegtcl1.0.a \
--	../lib/$(TKIMGVER)/libtkimgtiff1.3.a \
--	../lib/$(TKIMGVER)/libtifftcl3.6.1.a \
--	../lib/$(TKIMGVER)/libtkimgpng1.3.a \
--	../lib/$(TKIMGVER)/libpngtcl1.2.6.a \
--	../lib/$(TKIMGVER)/libtkimgppm1.3.a \
--	../lib/$(TKIMGVER)/libtkimggif1.3.a \
--	../lib/$(TKIMGVER)/libtkimgbmp1.3.a \
--	../lib/$(TKIMGVER)/libtkimgxbm1.3.a \
--	../lib/$(TKIMGVER)/libzlibtcl1.2.1.a \
--	../lib/$(TKIMGVER)/libtkimg1.3.a \
--	../lib/$(TKTABLEVER)/libTktable2.9.a \
+-	../lib/$(TKTABLEVER)/libTktable2.10.a \
+-	../lib/$(TKIMGVER)/libtkimgpng1.4.a \
+-	../lib/$(TKIMGVER)/libpngtcl1.4.3.a \
+-	../lib/$(TKIMGVER)/libtkimgtiff1.4.a \
+-	../lib/$(TKIMGVER)/libtifftcl3.9.4.a \
+-	../lib/$(TKIMGVER)/libtkimgjpeg1.4.a \
+-	../lib/$(TKIMGVER)/libjpegtcl8.2.a \
+-	../lib/$(TKIMGVER)/libtkimggif1.4.a \
+-	../lib/$(TKIMGVER)/libtkimgppm1.4.a \
+-	../lib/$(TKIMGVER)/libtkimgwindow1.4.a \
+-	../lib/$(TKIMGVER)/libzlibtcl1.2.5.a \
+-	../lib/$(TKIMGVER)/libtkimg1.4.a \
+-	../lib/libtiff.a \
 -	../lib/libfuntools.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/libwcs.a \
 -	../lib/libsla.a \
@@ -64,15 +61,16 @@ Description: Compile against external libraries of wcstools, funtools, ast,
  	../lib/libiis.a \
 -	../lib/libcheckdns.a \
 -	../lib/libsignal_ext.a \
+-	../lib/libxxlib.a \
 -	../lib/libBLTX30.a \
 -	../lib/libBLTCore30.a \
 -	../lib/libtk8.5.a \
 -	../lib/libtcl8.5.a
 +	../lib/libcheckdns.a
- endif
  
+ # if windows, redefine
  ifeq ($(OS),windows)
-@@ -389,17 +349,16 @@ endif
+@@ -354,18 +317,14 @@
  #--------------------------linux
  
  ifneq (,$(findstring linux,$(ARCH)))
@@ -85,11 +83,10 @@ Description: Compile against external libraries of wcstools, funtools, ast,
 -	-o $@ $(OBJS) $(LIBS) \
 -	-Wl,-Bstatic -L. -lstdc++ \
 -	-Wl,-Bdynamic \
--	-L$(X11LIB) -lX11 -lXss -lXext -lXft -lXrandr -lXrender \
--	-ldl -lpthread -lxml2
+-	-L$(X11LIB) -lX11 -lXext -lXft -lXrender -lXss \
+-	-lxml2 \
+-	-ldl -lpthread 
 -	rm -f libstdc++.a
-+#	rm -f libstdc++.a
-+#	ln -s `$(CXX) -print-file-name=libstdc++.a` .
 +	$(CXX) $(OPTS) $(LDFLAGS) -o ds9Base ds9.o tkAppInit.o ../lib/libsaotk.a \
 +	-Wl,-Bdynamic -lstarlink_ast -lstarlink_ast_err -lstarlink_ast_grf3d \
 +	-lstdc++ -Wl,-Bstatic -L../lib -lsaotk -lhcomp -lrice -lplio \
@@ -101,7 +98,7 @@ Description: Compile against external libraries of wcstools, funtools, ast,
  #--------------------------darwin
 --- a/ds9/ds9.C
 +++ b/ds9/ds9.C
-@@ -18,36 +18,13 @@ extern "C" {
+@@ -22,34 +22,13 @@
  
    int Blt_core_Init(Tcl_Interp*);
    int Blt_x_Init(Tcl_Interp*);
@@ -121,8 +118,6 @@ Description: Compile against external libraries of wcstools, funtools, ast,
 -  int Tkimgpng_Init(Tcl_Interp*);
 -  int Tkimggif_Init(Tcl_Interp*);
 -  int Tkimgppm_Init(Tcl_Interp*);
--  int Tkimgbmp_Init(Tcl_Interp*);
--  int Tkimgxbm_Init(Tcl_Interp*);
 -  int Tkimgwindow_Init(Tcl_Interp*);
 -
 -  int Tclxpa_Init(Tcl_Interp*);
@@ -138,7 +133,7 @@ Description: Compile against external libraries of wcstools, funtools, ast,
  #ifdef _MACOSX
    int Tkmacosx_Init(Tcl_Interp*);
  #endif
-@@ -131,7 +108,6 @@ int SAOAppInit(Tcl_Interp *interp)
+@@ -156,7 +135,6 @@
    // Tk
    if (Tk_Init(interp))
      return TCL_ERROR;
@@ -146,7 +141,7 @@ Description: Compile against external libraries of wcstools, funtools, ast,
  
    {
      Tcl_DString pwd;
-@@ -150,12 +126,6 @@ int SAOAppInit(Tcl_Interp *interp)
+@@ -175,12 +153,6 @@
    Tcl_StaticPackage(interp, "blt_extra", Blt_x_Init,
  		    (Tcl_PackageInitProc*)NULL);
  
@@ -159,9 +154,9 @@ Description: Compile against external libraries of wcstools, funtools, ast,
    // Checkdns
    if (Checkdns_Init(interp) == TCL_ERROR)
      return TCL_ERROR;
-@@ -174,12 +144,6 @@ int SAOAppInit(Tcl_Interp *interp)
+@@ -199,12 +171,6 @@
    Tcl_StaticPackage (interp, "tkhtml", Tkhtml_Init,
- 		     (Tcl_PackageInitProc*)NULL);
+   		     (Tcl_PackageInitProc*)NULL);
  
 -  // Tclxpa
 -  if (Tclxpa_Init(interp) == TCL_ERROR)
@@ -172,7 +167,7 @@ Description: Compile against external libraries of wcstools, funtools, ast,
    // IIS
    if (Iis_Init(interp) == TCL_ERROR)
      return TCL_ERROR;
-@@ -192,96 +156,6 @@ int SAOAppInit(Tcl_Interp *interp)
+@@ -217,84 +183,6 @@
    Tcl_StaticPackage (interp, "tkmpeg", Tkmpeg_Init, 
  		     (Tcl_PackageInitProc*)NULL);
  
@@ -183,8 +178,8 @@ Description: Compile against external libraries of wcstools, funtools, ast,
 -  // Tkimg
 -  if (Tkimg_Init(interp) == TCL_ERROR)
 -    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "img", 
--		     Tkimg_Init,(Tcl_PackageInitProc*)NULL);
+-  Tcl_StaticPackage (interp, "img", Tkimg_Init,
+-		     (Tcl_PackageInitProc*)NULL);
 -
 -  // zlibtcl
 -  if (Zlibtcl_Init(interp) == TCL_ERROR)
@@ -240,18 +235,6 @@ Description: Compile against external libraries of wcstools, funtools, ast,
 -  Tcl_StaticPackage (interp, "ppm", Tkimgppm_Init,
 -		     (Tcl_PackageInitProc*)NULL);
 -
--  // Tkimgbmp
--  if (Tkimgbmp_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "bmp", Tkimgbmp_Init,
--		     (Tcl_PackageInitProc*)NULL);
--
--  // Tkimgxbm
--  if (Tkimgxbm_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "xbm", Tkimgxbm_Init,
--		     (Tcl_PackageInitProc*)NULL);
--
 -  // Tkimgwindow
 -  if (Tkimgwindow_Init(interp) == TCL_ERROR)
 -    return TCL_ERROR;
@@ -271,59 +254,61 @@ Description: Compile against external libraries of wcstools, funtools, ast,
      return TCL_ERROR;
 --- a/Makefile
 +++ b/Makefile
-@@ -286,7 +286,7 @@ else
+@@ -282,7 +282,7 @@
+ 
  blt	: FORCE
- endif
  	@echo "Installing BLT..."
--	cd $(BLTDIR); CC='$(CC)' CFLAGS='$(OPTS)' LDFLAGS='$(LIBS)' ./configure --prefix $(root) --with-tcl=$(root)/$(TCLDIR)/unix --with-tk=$(root)/$(TKDIR)/unix $(BLTFLAGS) 
-+	cd $(BLTDIR); CC='$(CC)' CFLAGS='$(OPTS)' LDFLAGS='$(LIBS)' ./configure --prefix $(root) --exec_prefix $(root) $(BLTFLAGS) --enable-shared
- 	cd $(BLTDIR); $(MAKE); $(MAKE) install
- 
- zlib  : FORCE
-@@ -301,23 +301,23 @@ tclxml	: FORCE
- 
- tkimg	: FORCE
+-	cd $(BLTDIR); CC='$(CC)' CFLAGS='$(OPTS)' LDFLAGS='$(LIBS)' ./configure --prefix $(root) --with-tcl=$(root)/$(TCLDIR) --with-tk=$(root)/$(TKDIR) $(BLTFLAGS) --disable-shared --cache-file=$(CACHE)
++	cd $(BLTDIR); CC='$(CC)' CFLAGS='$(OPTS)' LDFLAGS='$(LIBS)' ./configure --prefix $(root) --exec_prefix $(root) $(BLTFLAGS) --enable-shared --cache-file=$(CACHE)
+ 	cd $(BLTDIR)/src; $(MAKE) -j $(JOBS) build_static
+ 	cp $(BLTDIR)/src/*.a lib/.
+ 	cd $(BLTDIR)/src; cp $(BLTINCL) ../../include/.
+@@ -299,7 +299,7 @@
+ 
+ tkimg	: libtiff
  	@echo "Installing TKIMG..."
--	cd $(TKIMGDIR); CC='$(CC)' CFLAGS='$(OPTS) -DPNG_NO_WRITE_gAMA' LDFLAGS='$(LIBS)' ./configure --prefix $(root) --with-tcl=$(root)/$(TCLDIRDIR) --with-tk=$(root)/$(TKDIRDIR) $(TKIMGFLAGS) --disable-shared
-+	cd $(TKIMGDIR); CC='$(CC)' CFLAGS='$(OPTS) -DPNG_NO_WRITE_gAMA' LDFLAGS='$(LIBS)' ./configure --prefix $(root) $(TKIMGFLAGS) --disable-shared
- 	cd $(TKIMGDIR); $(MAKE) install
+-	cd $(TKIMGDIR); CC='$(CC)' CFLAGS='$(OPTS) -DPNG_NO_WRITE_gAMA' LDFLAGS='$(LIBS)' ./configure --prefix $(root) --with-tcl=$(root)/$(TCLDIRDIR) --with-tk=$(root)/$(TKDIRDIR) $(TKIMGFLAGS) --disable-shared --disable-threads --cache-file=$(LOCALCACHE)
++	cd $(TKIMGDIR); CC='$(CC)' CFLAGS='$(OPTS) -DPNG_NO_WRITE_gAMA' LDFLAGS='$(LIBS)' ./configure --prefix $(root) $(TKIMGFLAGS) --disable-shared --disable-threads --cache-file=$(LOCALCACHE)
+ 	cd $(TKIMGDIR); $(MAKE) -j $(JOBS) all; $(MAKE) install
+ 
+ libtiff	: FORCE
+@@ -309,18 +309,19 @@
  
  tkmpeg	: FORCE
  	@echo "Installing TKMPEG..."
--	cd $(TKMPEGDIR); $(MAKE)
-+	cd $(TKMPEGDIR); $(MAKE) CXXOPT="$(CXXOPT)"
+-	cd $(TKMPEGDIR); $(MAKE) -j $(JOBS)
++	cd $(TKMPEGDIR); $(MAKE) -j $(JOBS) CXXOPT="$(CXXOPT)"
  	cd $(TKMPEGDIR); $(MAKE) install
  
  html	: FORCE
  	@echo "Installing HTMLWIDGET..."
--	cd $(HTMLDIR); CC='$(CC)' CFLAGS='$(OPTS)' LDFLAGS='$(LIBS)' $(PREHTMLFLAGS) $(root)/htmlwidget/configure --prefix $(root) --with-tcl=$(root)/$(TCLDIR) --with-tk=$(root)/$(TKDIR) $(XFLAGS) --enable-shared=no
--	cd $(HTMLDIR); $(MAKE)
-+	cd $(HTMLDIR); CC='$(CC)' CFLAGS='$(CXXOPTS)' LDFLAGS='$(LIBS)' $(PREHTMLFLAGS) $(root)/htmlwidget/configure --prefix $(root) $(XFLAGS) --enable-shared=no
-+	cd $(HTMLDIR); $(MAKE) headers libtkhtml.a
+ 	cd $(HTMLDIR); CC='$(CC)' CFLAGS='$(OPTS)' LDFLAGS='$(LIBS)' $(PREHTMLFLAGS) $(root)/htmlwidget/configure --prefix $(root) --with-tcl=$(root)/$(TCLDIR) --with-tk=$(root)/$(TKDIR) $(XFLAGS) --enable-shared=no --cache-file=$(CACHE)
++	cd $(HTMLDIR); CC='$(CC)' CFLAGS='$(CXXOPTS)' LDFLAGS='$(LIBS)' $(PREHTMLFLAGS) $(root)/htmlwidget/configure --prefix $(root) $(XFLAGS) --enable-shared=no --cache-file=$(CACHE)
+ 	cd $(HTMLDIR); $(MAKE) headers libtkhtml.a
  	cp $(HTMLDIR)/libtkhtml.a lib/.
  
  xpa	: FORCE
  	@echo "Installing XPA..."
--	cd $(XPADIR); CC='$(CC)' CFLAGS='$(OPTS)' LDFLAGS='$(OPTS) $(LIBS)' ./configure --prefix $(root) --with-tcl=$(root)/$(TCLDIRDIR) $(XPAFLAGS) --disable-shared
-+	cd $(XPADIR); CC='$(CC)' CFLAGS='$(CCOPTS)' LDFLAGS='$(OPTS) $(LIBS)' ./configure --prefix $(root) $(XPAFLAGS) --disable-shared
- 	cd $(XPADIR); $(MAKE); $(MAKE) install
+-	cd $(XPADIR); CC='$(CC)' CFLAGS='$(OPTS)' LDFLAGS='$(LIBS)' ./configure --prefix $(root) --with-tcl=$(root)/$(TCLDIRDIR) $(XPAFLAGS) --disable-shared --cache-file=$(CACHE)
++	cd $(XPADIR); CC='$(CC)' CFLAGS='$(CCOPTS)' LDFLAGS='$(OPTS) $(LIBS)' ./configure --prefix $(root) $(XPAFLAGS) --disable-shared --cache-file=$(CACHE)
+ 	cd $(XPADIR); $(MAKE) -j $(JOBS); $(MAKE) install
  	cd bin; strip xpa*
  
-@@ -378,7 +378,7 @@ endif
+@@ -379,7 +380,7 @@
  
  saotk	: FORCE
  	@echo "Installing SAOTK..."
--	cd $(SAOTKDIR); $(MAKE) install
-+	cd $(SAOTKDIR); $(MAKE) CXX="$(CXX)" install
+-	cd $(SAOTKDIR); $(MAKE) -j $(JOBS) install
++	cd $(SAOTKDIR); $(MAKE) CXX="$(CXX)" -j $(JOBS) install
  
  zip	: FORCE
  	@echo "Installing ZIP..."
-@@ -398,76 +398,26 @@ zvfs	: FORCE
- scrub : FORCE
- 	find . -name "*[~#]" -exec rm {} \;
+@@ -403,15 +404,9 @@
+ endif
  
--distclean : tclclean tkclean \
--	tktableclean tcllibclean bltclean \
+ distclean : filesclean \
+-	tclclean tkclean \
+-	tktableclean bltclean \
 -	zlibclean tclxmlclean tkimgclean tkmpegclean htmlclean \
 -	xpaclean iisclean checkdnsclean $(SIGNALCLEAN) funtoolsclean \
 -	slaclean astclean wcssubsclean \
@@ -331,11 +316,13 @@ Description: Compile against external libraries of wcstools, funtools, ast,
 -	$(OPTDIRCLEAN) \
 -	saotkclean zipclean zvfsclean ds9clean srcclean \
 -	dirsclean 
-+distclean :  bltclean tkmpegclean iisclean checkdnsclean  \
++	bltclean tkmpegclean iisclean checkdnsclean  \
 +	riceclean hcompressclean plioclean $(OPTDIRCLEAN) \
 +	saotkclean ds9clean srcclean dirsclean 
- 	$(RM) core *~ *#
  
+ filesclean: FORCE
+ 	find . -name "myconfig.cache" -exec rm {} \;
+@@ -420,62 +415,18 @@
  dirsclean: FORCE
  	@for d in $(DIRS); do rm -rf $$d; done
  
@@ -348,9 +335,6 @@ Description: Compile against external libraries of wcstools, funtools, ast,
 -tktableclean: FORCE
 -	cd $(TKTABLEDIR); $(MAKE) distclean
 -
--tcllibclean: FORCE
--	cd $(TCLLIBDIR); $(MAKE) distclean
--
  bltclean: FORCE
 -	cd $(BLTDIR); $(MAKE) distclean
 -
@@ -360,10 +344,13 @@ Description: Compile against external libraries of wcstools, funtools, ast,
 -tclxmlclean: FORCE
 -	cd $(TCLXMLDIR); $(MAKE) distclean
 -
--tkimgclean: FORCE
+-tkimgclean: libtiffclean
 -	rm -fr $(TKIMGDIR)/Img/*
--	rm -fr $(LIB)/Img1.3
+-	rm -fr $(LIB)/Img1.*
 -	cd $(TKIMGDIR); $(MAKE) distclean
+-
+-libtiffclean: FORCE
+-	cd $(TKIMGDIR)/compat/libtiff; $(MAKE) distclean
 +	cd $(BLTDIR); $(MAKE) distclean || true
  
  tkmpegclean: FORCE
@@ -399,7 +386,7 @@ Description: Compile against external libraries of wcstools, funtools, ast,
  riceclean: FORCE
  	cd $(RICEDIR); $(MAKE) distclean
  
-@@ -483,9 +433,6 @@ saotkclean : FORCE
+@@ -491,9 +442,6 @@
  zipclean: FORCE
  	cd $(ZIPDIR); PREFIX=$(root) $(MAKE) -f unix/Makefile clean
  
@@ -411,13 +398,10 @@ Description: Compile against external libraries of wcstools, funtools, ast,
  
 --- a/src/ds9.tcl
 +++ b/src/ds9.tcl
-@@ -38,24 +38,33 @@ option add {*Listbox*background} #d9d9d9
- set ds9(root) "[pwd]/zvfsmntpt"
+@@ -199,22 +199,34 @@
+     source $ds9(root)/tcl8/8.4/http-2.7.5.tm
+ }
  
- # tcl modules
--source $ds9(root)/tcl8/8.5/msgcat-1.4.2.tm
--source $ds9(root)/tcl8/8.4/http-2.7.5.tm
--
 -source $ds9(root)/tk8.5/tearoff.tcl
 -source $ds9(root)/tk8.5/comdlg.tcl
 -source $ds9(root)/tk8.5/focus.tcl
@@ -428,18 +412,19 @@ Description: Compile against external libraries of wcstools, funtools, ast,
 -source $ds9(root)/tcllib1.10/ftp/ftp.tcl
 -source $ds9(root)/tcllib1.10/textutil/repeat.tcl
 -source $ds9(root)/tcllib1.10/textutil/tabify.tcl
--
--source $ds9(root)/tkcon2.5/tkcon.tcl
--source $ds9(root)/xmlrpc0.3/xmlrpc.tcl
+-source $ds9(root)/tcllib1.10/math/fuzzy.tcl
 +package require msgcat
 +package require http
 +package require xml
-+
+ 
+-source $ds9(root)/tkcon2.5/tkcon.tcl
+-source $ds9(root)/xmlrpc0.3/xmlrpc.tcl
 +package require base64
 +package require log
 +package require ftp
 +package require textutil::repeat
 +package require textutil::tabify
++package require math::fuzzy
 +
 +package require tkcon
  source $ds9(root)/blt3.0/graph.tcl
@@ -463,7 +448,7 @@ Description: Compile against external libraries of wcstools, funtools, ast,
  # fix ::tk and msgcat
 --- a/src/source.tcl
 +++ b/src/source.tcl
-@@ -122,12 +122,10 @@ source $ds9(root)/src/stdfbox.tcl
+@@ -135,12 +135,10 @@
  source $ds9(root)/src/stsci.tcl
  source $ds9(root)/src/template.tcl
  source $ds9(root)/src/text.tcl
@@ -478,7 +463,7 @@ Description: Compile against external libraries of wcstools, funtools, ast,
  switch [tk windowingsystem] {
 --- a/src/Makefile
 +++ b/src/Makefile
-@@ -119,12 +119,10 @@ SCRIPTS = \
+@@ -132,12 +132,10 @@
  	stsci.tcl \
  	template.tcl \
  	text.tcl \
diff --git a/debian/patches/use_filesystem.patch b/debian/patches/use_filesystem.patch
index 371aed6..7e49ada 100644
--- a/debian/patches/use_filesystem.patch
+++ b/debian/patches/use_filesystem.patch
@@ -3,7 +3,7 @@ Description: Store all files in the usual FHS directories instead of
  building a zipfile and using a special tcl filesystem driver to access it.
 --- a/ds9/Makefile
 +++ b/ds9/Makefile
-@@ -142,12 +142,9 @@
+@@ -94,12 +94,9 @@
  
  all: ds9
  
@@ -18,26 +18,24 @@ Description: Store all files in the usual FHS directories instead of
  	cd ../bin; $(CODESIGN) -s "SAOImage DS9" ds9
  
  debug	: ds9Base ds9.zip
-@@ -163,14 +160,9 @@
+@@ -190,12 +187,9 @@
  
  all: ds9
  
--ds9	: null.zip ds9Base $(FILES)
+-ds9	: ds9Base ds9.zip
 +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 ds9Base ds9
+-	strip ds9
 -	cp ds9 ../bin/.
-+	cp ds9Base ../bin/ds9
+-	cp ds9.zip ../bin/.
++	cp ds9.Base ../bin/ds9
  
- debug	: null.zip ds9Base $(FILES)
+ debug	: ds9Base ds9.zip
  	$(RM) $@
 --- a/ds9/ds9.C
 +++ b/ds9/ds9.C
-@@ -13,9 +13,6 @@
+@@ -17,9 +17,6 @@
  
    void TclSetStartupScriptFileName(const char*);
  
@@ -47,7 +45,7 @@ Description: Store all files in the usual FHS directories instead of
    int Blt_core_Init(Tcl_Interp*);
    int Blt_x_Init(Tcl_Interp*);
    int Checkdns_Init(Tcl_Interp*);
-@@ -49,13 +46,8 @@
+@@ -66,13 +63,8 @@
    char** argv = *argvPtr;
    appname = dupstr(argv[0]);
  
@@ -61,8 +59,8 @@ Description: Store all files in the usual FHS directories instead of
 +  TclSetStartupScriptFileName("/usr/share/saods9/src/ds9.tcl");
  }
  
- Tcl_Interp *global_interp;
-@@ -71,35 +63,6 @@
+ int SAOAppInit(Tcl_Interp *interp)
+@@ -86,48 +78,6 @@
    // save interp for cputs function
    global_interp = interp;
  
@@ -71,9 +69,10 @@ Description: Store all files in the usual FHS directories instead of
 -  // its startup script files.
 -  if (Zvfs_Init(interp) == TCL_ERROR)
 -    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "zvfs", Zvfs_Init, 
+-    Tcl_StaticPackage (interp, "zvfs", Zvfs_Init, 
 -		     (Tcl_PackageInitProc*)NULL);
 -
+-
 -  // find current working directory, and set as mount point
 -  {
 -    Tcl_DString pwd;
@@ -81,11 +80,23 @@ Description: Store all files in the usual FHS directories instead of
 -    Tcl_GetCwd(interp, &pwd);
 -#ifdef ZIPFILE
 -    ostringstream str;
+-#ifndef _WIN32
 -    str << (char *)Tcl_GetNameOfExecutable() 
 -	<< ".zip" 
 -	<<  ends;
+-#else
+-    str << (char *)Tcl_GetNameOfExecutable() 
+-	<< "/../ds9.zip" 
+-	<<  ends;
+-#endif
 -    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;
+-      char str[] = "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.";
+-
+-#ifndef _WIN32
+-      cerr << str << endl;
+-#else
+-      MessageBox(NULL, str, "SAOImage DS9", MB_ICONSTOP | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND);
+-#endif
 -      exit(1);
 -    }
 -#else
@@ -98,12 +109,12 @@ Description: Store all files in the usual FHS directories instead of
    // Initialize Tcl and Tk
    if (Tcl_Init(interp))
      return TCL_ERROR;
-@@ -163,15 +126,6 @@
+@@ -197,15 +147,6 @@
  		     (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, "auto_path", "./zvfsmntpt/tcl8.5 ./zvfsmntpt/tcl8/8.3 ./zvfsmntpt/tcl8/8.4 ./zvfsmntpt/tcl8/8.5 ./zvfsmntpt/tk8.5 ./zvfsmntpt/blt3.0 ./zvfsmntpt/tcllib1.10 ./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);
@@ -116,7 +127,7 @@ Description: Store all files in the usual FHS directories instead of
  
 --- a/src/ds9.tcl
 +++ b/src/ds9.tcl
-@@ -35,7 +35,7 @@ option add {*Listbox*background} #d9d9d9
+@@ -189,7 +189,7 @@
  
  # set to absolute path so that if -cd command is used,
  # so we can still find our files
@@ -124,4 +135,4 @@ Description: Store all files in the usual FHS directories instead of
 +set ds9(root) "/usr/share/saods9"
  
  # tcl modules
- package require msgcat
+ if {![namespace exists msgcat]} {

-- 
image display tool for astronomy



More information about the debian-science-commits mailing list