[Debian-astro-commits] [saods9] 05/07: Replace compiled ds9 executable by simple wish script.

Ole Streicher olebole at moszumanska.debian.org
Tue Jul 21 12:49:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch experimental
in repository saods9.

commit 81a8b9c023196b5b4a53c791ac5b60aac9ebd156
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Tue Jul 21 14:30:54 2015 +0200

    Replace compiled ds9 executable by simple wish script.
---
 debian/control                              |  15 +-
 debian/patches/ds9_make_linux.patch         |  30 ---
 debian/patches/ds9_use_filesystem.patch     |  92 ---------
 debian/patches/ds9_use_shared_libs.patch    | 304 ----------------------------
 debian/patches/ds9_use_system_libs.patch    | 108 ++++++++++
 debian/patches/ds9_use_tcltk_packages.patch | 104 +++-------
 debian/patches/series                       |   4 +-
 debian/patches/{iis.patch => tcliis.patch}  |   0
 debian/rules                                |   3 +-
 debian/saods9-tcl-packages.install          |   4 +
 debian/saods9.install                       |   6 +-
 11 files changed, 156 insertions(+), 514 deletions(-)

diff --git a/debian/control b/debian/control
index 987de1b..c6f915f 100644
--- a/debian/control
+++ b/debian/control
@@ -34,9 +34,10 @@ Vcs-Git: git://anonscm.debian.org/debian-astro/packages/saods9.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-astro/packages/saods9.git
 
 Package: saods9
-Architecture: any
+Architecture: all
 Depends: blt (>= 2.5.3),
          libtk-img,
+	 saods9-tcl-packages,
          tcl-signal,
          tcl-xpa,
          tcllib,
@@ -90,6 +91,18 @@ Description: Tk widgets for astronomical imaging and data visualization
  environment to build custom data analysis and visualization
  applications.
 
+Package: saods9-tcl-packages
+Architecture: any
+Depends: tcl, tk, ${misc:Depends}, ${shlibs:Depends}
+Recommends: saods9
+Description: Tcl/Tk packages provided with DS9
+ DS9 includes some extra Tcl/Tk packages that it needs for working. These
+ packages are tclcheckdns, tcliis, tkhtml1, tkmpeg.
+ .
+ This package is not meant to be used independently of saods9, since
+ the stability of the API and the presence of the individual packages is not
+ quaranteed.
+
 Package: saods9-doc
 Architecture: all
 Section: doc
diff --git a/debian/patches/ds9_make_linux.patch b/debian/patches/ds9_make_linux.patch
index ad60d7a..e952403 100644
--- a/debian/patches/ds9_make_linux.patch
+++ b/debian/patches/ds9_make_linux.patch
@@ -31,33 +31,3 @@ Description: Set the compile flags according to the Debian environment. We
 +CCOPT	= ${CFLAGS} ${CPPFLAGS} ${OPTS} ${AA}
 +CCNOPT	= ${CFLAGS} ${CPPFLAGS} ${NOPTS} ${AA}
  
---- a/ds9/Makefile
-+++ b/ds9/Makefile
-@@ -9,7 +9,7 @@
- 	cp ds9.$(OS) ds9.C
- 
- $(MAIN).o : $(MAIN).c
--	$(CC) $(CFLAGS) -DTK_LOCAL_APPINIT=SAOAppInit \
-+	$(CC) $(CPPFLAGS) $(CFLAGS) -DTK_LOCAL_APPINIT=SAOAppInit \
- 	-DTK_LOCAL_MAIN_HOOK=SAOLocalMainHook -c $(MAIN).c -o $@
- 
- $(MAIN).c : $(MAINDIR)/$(MAIN).c
---- a/ds9/Makefile.unix
-+++ b/ds9/Makefile.unix
-@@ -1,6 +1,6 @@
- #--------------------------defines
- 
--CFLAGS= $(CCOPT) -I. -I../include -I$(X11INCLUDE)
-+CFLAGS:= $(CCOPT) -I. -I../include -I$(X11INCLUDE)
- 
- MAINDIR	= ../$(TKDIR)/unix
- MAIN	= tkAppInit
-@@ -63,7 +63,7 @@
- 
- ifneq (,$(findstring linux,$(ARCH)))
- 
--CXXFLAGS = $(CXXOPT) -I. -I../include -I$(X11INCLUDE)
-+CXXFLAGS := $(CXXOPT) -I. -I../include -I$(X11INCLUDE)
- 
- ds9	: ds9Base ds9.zip
- 	$(RM) $@
diff --git a/debian/patches/ds9_use_filesystem.patch b/debian/patches/ds9_use_filesystem.patch
index 11ad699..5a1c07f 100644
--- a/debian/patches/ds9_use_filesystem.patch
+++ b/debian/patches/ds9_use_filesystem.patch
@@ -6,98 +6,6 @@ Description: Store all files in the usual FHS directories
  Additionally, we introduce a new environment variable, "DS9_HOME" which
  points to the basedir of the tcl script. This allows relocation of
  ds9, which is used for testing.
---- a/ds9/Makefile.unix
-+++ b/ds9/Makefile.unix
-@@ -65,13 +65,8 @@
- 
- CXXFLAGS := $(CXXOPT) -I. -I../include -I$(X11INCLUDE)
- 
--ds9	: ds9Base ds9.zip
--	$(RM) $@
--	strip ds9Base
--	cat ds9Base ds9.zip > ds9
--	zip -A ds9
--	chmod 755 ds9
--	cp ds9 ../bin/.
-+ds9	: ds9Base $(FILES)
-+	cp ds9Base ../bin/ds9
- 
- debug	: ds9Base ds9.zip
- 	$(RM) $@
---- a/ds9/ds9.unix
-+++ b/ds9/ds9.unix
-@@ -16,10 +16,7 @@
-   int SAOAppInit(Tcl_Interp *interp);
-   int SAOLocalMainHook(int* argc, char*** argv);
- 
--  void TclSetStartupScriptFileName(const char*);
--
--  int Zvfs_Init(Tcl_Interp*);
--  int Zvfs_Mount(Tcl_Interp*, char*, char *);
-+  void Tcl_SetStartupScript(Tcl_Obj *path, const char *encoding);
- 
-   int Tkblt_Init(Tcl_Interp*);
-   int Tktable_Init(Tcl_Interp*);
-@@ -68,13 +65,15 @@
-   // do this first
-   Tcl_FindExecutable((*argvPtr)[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.6");
--  putenv((char*)"TK_LIBRARY=./zvfsmntpt/tk8.6");
--
-   // startup script
--  Tcl_Obj *path = Tcl_NewStringObj("./zvfsmntpt/src/ds9.tcl",-1);
-+  char *env;
-+  if (getenv("DS9_HOME") != NULL) {
-+    env = (char *)alloca(strlen(getenv("DS9_HOME")) + 16);
-+    sprintf(env, "%s/src/ds9.tcl", getenv("DS9_HOME"));
-+  } else {
-+    env = (char *)"/usr/share/saods9/src/ds9.tcl";
-+  }
-+  Tcl_Obj *path = Tcl_NewStringObj(env,-1);
-   Tcl_SetStartupScript(path, NULL);
- 
-   return TCL_OK;
-@@ -85,37 +84,6 @@
-   // 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 ){
--      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.";
--
--      cerr << str << endl;
--      exit(1);
--    }
--#else
--    Zvfs_Mount(interp, (char *)Tcl_GetNameOfExecutable(), 
--	       Tcl_DStringValue(&pwd));
--#endif
--    Tcl_DStringFree(&pwd);
--  }
--
-   // Tcl
-   if (Tcl_Init(interp) == TCL_ERROR)
-     return TCL_ERROR;
 --- a/src/ds9.tcl
 +++ b/src/ds9.tcl
 @@ -195,9 +195,14 @@
diff --git a/debian/patches/ds9_use_shared_libs.patch b/debian/patches/ds9_use_shared_libs.patch
deleted file mode 100644
index 20997c2..0000000
--- a/debian/patches/ds9_use_shared_libs.patch
+++ /dev/null
@@ -1,304 +0,0 @@
-Author: Ole Streicher <olebole at debian.org>
-Description: Link against shared libraries.
- Use system provided libs of funtools, ast etc. instead of the convienience copies
- provided by ds9, and use tcl/tk packages wherever possible.
---- a/ds9/Makefile.unix
-+++ b/ds9/Makefile.unix
-@@ -2,20 +2,13 @@
- 
- CFLAGS:= $(CCOPT) -I. -I../include -I$(X11INCLUDE)
- 
--MAINDIR	= ../$(TKDIR)/unix
-+MAINDIR	= /usr/share/tcltk/tk$(shell . /usr/lib/tkConfig.sh ; echo $$TK_VERSION)
- MAIN	= tkAppInit
- 
- ZDIR = zipdir/zvfsmntpt
- OBJS	= ds9.o $(MAIN).o
- 
- FILES	= \
--	$(ZDIR)/$(TCLVER) \
--	$(ZDIR)/tcl8 \
--	$(ZDIR)/$(TKVER) \
--	$(ZDIR)/$(TKBLTDIR) \
--	$(ZDIR)/$(TCLLIBVER) \
--	$(ZDIR)/$(TKCONVER) \
--	$(ZDIR)/$(XMLRPCVER) \
- 	$(ZDIR)/src \
- 	$(ZDIR)/msgs \
- 	$(ZDIR)/doc \
-@@ -23,37 +16,11 @@
- 	$(ZDIR)/template
- 
- LIBS	= \
--	../lib/$(TKSAODIR)/libtksao1.0.a \
- 	../lib/$(TKHTMLDIR)/libtkhtml1.0.a \
- 	../lib/$(TKMPEGDIR)/libtkmpeg1.0.a \
--	../lib/$(TCLXMLVER)/libTclxml3.2.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)/libtkimgwindow1.4.a \
--	../lib/$(TKIMGVER)/libzlibtcl1.2.5.a \
--	../lib/$(TKIMGVER)/libtkimg1.4.a \
--	../lib/libtiff.a \
--	../lib/libfuntools.a \
--	../lib/libast.a \
--	../lib/libast_err.a \
--	../lib/libast_pal.a \
- 	../lib/$(TKSAODIR)/libtksao1.0.a \
--	../lib/$(TCLZVFSDIR)/libtclzvfs1.0.a \
--	../lib/libxpa.a \
- 	../lib/$(TCLIISDIR)/libtcliis1.0.a \
--	../lib/$(TCLCHECKDNSDIR)/libtclcheckdns1.1.a \
--	../lib/$(TCLSIGNALDIR)/libtclsignal1.4.a \
--	../lib/$(TKBLTDIR)/libtkblt3.0.a \
--	../lib/libtk8.6.a \
--	../lib/libtkstub8.6.a \
--	../lib/libtcl8.6.a \
--	../lib/libtclstub8.6.a
-+	../lib/$(TCLCHECKDNSDIR)/libtclcheckdns1.1.a
- 
- #--------------------------main
- 
-@@ -76,11 +43,9 @@
- 
- ds9Base	: $(OBJS) $(LIBS)
- 	$(RM) $@
--	$(CXX) ${OPTS} \
--	-o $@ $(OBJS) $(LIBS) \
--	-L$(X11LIB) -lX11 -lXext -lXft -lXrender -lXss \
--	-lxml2 \
--	-lz -lpthread 
-+	$(CXX) $(OPTS) $(LDFLAGS) -o $@ ds9.o tkAppInit.o \
-+	-Wl,-Bstatic -L../lib/$(TKHTMLDIR)/ -ltkhtml1.0 -Wl,-Bdynamic -ltk -ltcl \
-+	-L/usr/X11R6/lib -lX11
- 
- endif
- 
---- a/Makefile.unix
-+++ b/Makefile.unix
-@@ -29,13 +29,9 @@
- 	--enable-symbols
- 	$(MAKE) -C $(TKDIRDIR) -j $(JOBS) install
- 
--distclean : tclclean tkclean \
--	tktableclean tkbltclean \
--	tclxmlclean tkimgclean tkmpegclean tkhtmlclean \
--	xpaclean tcliisclean tclcheckdnsclean tclsignalclean funtoolsclean \
--	astclean \
--	tksaoclean tclzvfsclean ds9clean \
--	srcclean filesclean dirsclean
-+distclean : filesclean \
-+	tkmpegclean tkhtmlclean tcliisclean tclcheckdnsclean \
-+	saotkclean ds9clean srcclean dirsclean
- 
- #--------------------------distribution
- 
---- a/ds9/ds9.unix
-+++ b/ds9/ds9.unix
-@@ -18,31 +18,11 @@
- 
-   void Tcl_SetStartupScript(Tcl_Obj *path, const char *encoding);
- 
--  int Tkblt_Init(Tcl_Interp*);
--  int Tktable_Init(Tcl_Interp*);
-   int Tclcheckdns_Init(Tcl_Interp*);
-   int Tksao_Init(Tcl_Interp*);
-   int Tkhtml_Init(Tcl_Interp*);
-   int Tkmpeg_Init(Tcl_Interp*);
--
--  int Tkimg_Init(Tcl_Interp*);
--  int Zlibtcl_Init(Tcl_Interp*);
--  int Jpegtcl_Init(Tcl_Interp*);
--  int Tkimgjpeg_Init(Tcl_Interp*);
--  int Tifftcl_Init(Tcl_Interp*);
--  int Tkimgtiff_Init(Tcl_Interp*);
--  int Pngtcl_Init(Tcl_Interp*);
--  int Tkimgpng_Init(Tcl_Interp*);
--  int Tkimggif_Init(Tcl_Interp*);
--  int Tkimgwindow_Init(Tcl_Interp*);
--
--  int Tclxpa_Init(Tcl_Interp*);
-   int Tcliis_Init(Tcl_Interp*);
--
--  int Tclxml_Init(Tcl_Interp*);
--  int Tclxml_libxml2_Init(Tcl_Interp*);
--
--  int Signal_ext_Init(Tcl_Interp*);
- }
- 
- Tcl_Interp *global_interp;
-@@ -93,18 +73,6 @@
-     return TCL_ERROR;
-   Tcl_StaticPackage(interp,"Tk", Tk_Init, Tk_SafeInit);
- 
--  // Tkblt
--  if (Tkblt_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage(interp, "tkblt", Tkblt_Init, 
--		    (Tcl_PackageInitProc*)NULL);
--
--  // Tktable
--  if (Tktable_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "Tktable", Tktable_Init, 
--		     (Tcl_PackageInitProc*)NULL);
--
-   // Tclcheckdns
-   if (Tclcheckdns_Init(interp) == TCL_ERROR)
-     return TCL_ERROR;
-@@ -123,12 +91,6 @@
-   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);
--
-   // Tcliis
-   if (Tcliis_Init(interp) == TCL_ERROR)
-     return TCL_ERROR;
-@@ -141,75 +103,6 @@
-   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;
--  Tcl_StaticPackage (interp, "img", Tkimg_Init,
--		     (Tcl_PackageInitProc*)NULL);
--
--  // zlibtcl
--  if (Zlibtcl_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "zlibtcl", Zlibtcl_Init,
--		     (Tcl_PackageInitProc*)NULL);
--
--  // jpegtcl
--  if (Jpegtcl_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "jpegtcl", Jpegtcl_Init,
--		     (Tcl_PackageInitProc*)NULL);
--
--  // Tkimgjpeg
--  if (Tkimgjpeg_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "jpeg", Tkimgjpeg_Init,
--		     (Tcl_PackageInitProc*)NULL);
--
--  // Tifftcl
--  if (Tifftcl_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "tifftcl", Tifftcl_Init,
--		     (Tcl_PackageInitProc*)NULL);
--
--  // Tkimgtiff
--  if (Tkimgtiff_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "tiff", Tkimgtiff_Init,
--		     (Tcl_PackageInitProc*)NULL);
--
--  // Pngtcl
--  if (Pngtcl_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "pngtcl", Pngtcl_Init,
--  		     (Tcl_PackageInitProc*)NULL);
--
--  // Tkimgpng
--  if (Tkimgpng_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "png", Tkimgpng_Init,
--  		     (Tcl_PackageInitProc*)NULL);
--
--  // Tkimggif
--  if (Tkimggif_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "gif", Tkimggif_Init,
--		     (Tcl_PackageInitProc*)NULL);
--
--  // Tkimgwindow
--  if (Tkimgwindow_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "window", Tkimgwindow_Init,
--		     (Tcl_PackageInitProc*)NULL);
--
--  // Signal_Ext
--  if (Signal_ext_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "signal", Signal_ext_Init, 
--		     (Tcl_PackageInitProc*)NULL);
- 
-   return TCL_OK;
- }
---- a/src/ds9.tcl
-+++ b/src/ds9.tcl
-@@ -204,31 +204,33 @@
- 	    set ds9(root) "/usr/share/saods9"
- 	}
- 
--	if {![namespace exists msgcat]} {
--	    source $ds9(root)/tcl8/8.5/msgcat-1.5.2.tm
--	}
--	if {![namespace exists http]} {
--	    source $ds9(root)/tcl8/8.6/http-2.8.8.tm
--	}
--
--	source $ds9(root)/tk8.6/tearoff.tcl
--	source $ds9(root)/tk8.6/comdlg.tcl
--	source $ds9(root)/tk8.6/focus.tcl
--	source $ds9(root)/tk8.6/mkpsenc.tcl
--	source $ds9(root)/tk8.6/msgbox.tcl
--	source $ds9(root)/tk8.6/optMenu.tcl
--	source $ds9(root)/tk8.6/unsupported.tcl
--
--	source $ds9(root)/tcllib1.15/base64/base64.tcl
--	source $ds9(root)/tcllib1.15/log/log.tcl
--	source $ds9(root)/tcllib1.15/ftp/ftp.tcl
--	source $ds9(root)/tcllib1.15/textutil/repeat.tcl
--	source $ds9(root)/tcllib1.15/textutil/tabify.tcl
--	source $ds9(root)/tcllib1.15/math/fuzzy.tcl
--
--	source $ds9(root)/tkcon2.5/tkcon.tcl
--	source $ds9(root)/xmlrpc0.3/xmlrpc.tcl
--	source $ds9(root)/tkblt3.0/graph.tcl
-+	package require msgcat
-+	package require http
-+	package require xml
-+
-+	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)/src/xmlrpc.tcl
-+	package require BLT
-+	package require Tktable
-+	package require tclxpa
-+	package require Signal
-+
-+	package require img::base
-+	package require img::jpeg
-+	package require img::tiff
-+	package require img::png
-+	package require img::gif
-+	package require img::ppm
-+	package require img::bmp
-+	package require img::xbm
-+	package require img::window
- 
- 	source $ds9(root)/src/source.tcl
- 
diff --git a/debian/patches/ds9_use_system_libs.patch b/debian/patches/ds9_use_system_libs.patch
new file mode 100644
index 0000000..d717f84
--- /dev/null
+++ b/debian/patches/ds9_use_system_libs.patch
@@ -0,0 +1,108 @@
+Author: Ole Streicher <olebole at debian.org>
+Description: Link against system libraries.
+ Use system provided libs of funtools, ast etc. instead of the convienience
+ copies provided by ds9, and use tcl/tk packages wherever possible.
+--- a/ds9/Makefile.unix
++++ b/ds9/Makefile.unix
+@@ -2,20 +2,13 @@
+ 
+ CFLAGS= $(CCOPT) -I. -I../include -I$(X11INCLUDE)
+ 
+-MAINDIR	= ../$(TKDIR)/unix
++MAINDIR	= /usr/share/tcltk/tk$(shell . /usr/lib/tkConfig.sh ; echo $$TK_VERSION)
+ MAIN	= tkAppInit
+ 
+ ZDIR = zipdir/zvfsmntpt
+ OBJS	= ds9.o $(MAIN).o
+ 
+ FILES	= \
+-	$(ZDIR)/$(TCLVER) \
+-	$(ZDIR)/tcl8 \
+-	$(ZDIR)/$(TKVER) \
+-	$(ZDIR)/$(TKBLTDIR) \
+-	$(ZDIR)/$(TCLLIBVER) \
+-	$(ZDIR)/$(TKCONVER) \
+-	$(ZDIR)/$(XMLRPCVER) \
+ 	$(ZDIR)/src \
+ 	$(ZDIR)/msgs \
+ 	$(ZDIR)/doc \
+--- a/Makefile.unix
++++ b/Makefile.unix
+@@ -29,13 +29,9 @@
+ 	--enable-symbols
+ 	$(MAKE) -C $(TKDIRDIR) -j $(JOBS) install
+ 
+-distclean : tclclean tkclean \
+-	tktableclean tkbltclean \
+-	tclxmlclean tkimgclean tkmpegclean tkhtmlclean \
+-	xpaclean tcliisclean tclcheckdnsclean tclsignalclean funtoolsclean \
+-	astclean \
+-	tksaoclean tclzvfsclean ds9clean \
+-	srcclean filesclean dirsclean
++distclean : filesclean \
++	tkmpegclean tkhtmlclean tcliisclean tclcheckdnsclean \
++	saotkclean ds9clean srcclean dirsclean
+ 
+ #--------------------------distribution
+ 
+--- a/src/ds9.tcl
++++ b/src/ds9.tcl
+@@ -204,31 +204,33 @@
+ 	    set ds9(root) "/usr/share/saods9"
+ 	}
+ 
+-	if {![namespace exists msgcat]} {
+-	    source $ds9(root)/tcl8/8.5/msgcat-1.5.2.tm
+-	}
+-	if {![namespace exists http]} {
+-	    source $ds9(root)/tcl8/8.6/http-2.8.8.tm
+-	}
+-
+-	source $ds9(root)/tk8.6/tearoff.tcl
+-	source $ds9(root)/tk8.6/comdlg.tcl
+-	source $ds9(root)/tk8.6/focus.tcl
+-	source $ds9(root)/tk8.6/mkpsenc.tcl
+-	source $ds9(root)/tk8.6/msgbox.tcl
+-	source $ds9(root)/tk8.6/optMenu.tcl
+-	source $ds9(root)/tk8.6/unsupported.tcl
+-
+-	source $ds9(root)/tcllib1.15/base64/base64.tcl
+-	source $ds9(root)/tcllib1.15/log/log.tcl
+-	source $ds9(root)/tcllib1.15/ftp/ftp.tcl
+-	source $ds9(root)/tcllib1.15/textutil/repeat.tcl
+-	source $ds9(root)/tcllib1.15/textutil/tabify.tcl
+-	source $ds9(root)/tcllib1.15/math/fuzzy.tcl
+-
+-	source $ds9(root)/tkcon2.5/tkcon.tcl
+-	source $ds9(root)/xmlrpc0.3/xmlrpc.tcl
+-	source $ds9(root)/tkblt3.0/graph.tcl
++	package require msgcat
++	package require http
++	package require xml
++
++	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)/src/xmlrpc.tcl
++	package require BLT
++	package require Tktable
++	package require tclxpa
++	package require Signal
++
++	package require img::base
++	package require img::jpeg
++	package require img::tiff
++	package require img::png
++	package require img::gif
++	package require img::ppm
++	package require img::bmp
++	package require img::xbm
++	package require img::window
+ 
+ 	source $ds9(root)/src/source.tcl
+ 
diff --git a/debian/patches/ds9_use_tcltk_packages.patch b/debian/patches/ds9_use_tcltk_packages.patch
index acb3ed2..68f4953 100644
--- a/debian/patches/ds9_use_tcltk_packages.patch
+++ b/debian/patches/ds9_use_tcltk_packages.patch
@@ -1,92 +1,38 @@
 Author: Ole Streicher <olebole at debian.org>
-Description: Don't load TclTk extensions as shared libs, but as packages
+Description: Don't load TclTk extensions as shared libs, but as packages.
+ This allows to start DS9 as a normal tk application without special
+ initialization.
 --- a/ds9/Makefile.unix
 +++ b/ds9/Makefile.unix
-@@ -15,12 +15,7 @@
- 	$(ZDIR)/cmaps \
- 	$(ZDIR)/template
- 
--LIBS	= \
--	../lib/$(TKHTMLDIR)/libtkhtml1.0.a \
--	../lib/$(TKMPEGDIR)/libtkmpeg1.0.a \
--	../lib/$(TKSAODIR)/libtksao1.0.a \
--	../lib/$(TCLIISDIR)/libtcliis1.0.a \
--	../lib/$(TCLCHECKDNSDIR)/libtclcheckdns1.1.a
-+LIBS	=
+@@ -1,7 +1,5 @@
+ #--------------------------defines
+ 
+-CFLAGS= $(CCOPT) -I. -I../include -I$(X11INCLUDE)
+-
+ MAINDIR	= /usr/share/tcltk/tk$(shell . /usr/lib/tkConfig.sh ; echo $$TK_VERSION)
+ MAIN	= tkAppInit
+ 
+@@ -50,14 +48,12 @@
  
  #--------------------------main
  
-@@ -44,7 +39,7 @@
- ds9Base	: $(OBJS) $(LIBS)
- 	$(RM) $@
- 	$(CXX) $(OPTS) $(LDFLAGS) -o $@ ds9.o tkAppInit.o \
--	-Wl,-Bstatic -L../lib/$(TKHTMLDIR)/ -ltkhtml1.0 -Wl,-Bdynamic -ltk -ltcl \
-+	-ltk -ltcl \
- 	-L/usr/X11R6/lib -lX11
- 
- endif
---- a/ds9/ds9.unix
-+++ b/ds9/ds9.unix
-@@ -17,22 +17,10 @@
-   int SAOLocalMainHook(int* argc, char*** argv);
- 
-   void Tcl_SetStartupScript(Tcl_Obj *path, const char *encoding);
--
--  int Tclcheckdns_Init(Tcl_Interp*);
--  int Tksao_Init(Tcl_Interp*);
--  int Tkhtml_Init(Tcl_Interp*);
--  int Tkmpeg_Init(Tcl_Interp*);
--  int Tcliis_Init(Tcl_Interp*);
- }
+-all: ds9
++all: $(FILES)
  
- Tcl_Interp *global_interp;
+ #--------------------------linux
  
--void internalError(const char* msg)
--{
--  Tcl_SetVar2(global_interp, "ds9", "msg", msg, TCL_GLOBAL_ONLY);
--  Tcl_SetVar2(global_interp, "ds9", "msg,level", "error", TCL_GLOBAL_ONLY);
--}
--
- // currently use relative path
- // using full path with spaces causes problems 
- // with htmwidget and tcl/tk
-@@ -73,36 +61,5 @@
-     return TCL_ERROR;
-   Tcl_StaticPackage(interp,"Tk", Tk_Init, Tk_SafeInit);
+ ifneq (,$(findstring linux,$(ARCH)))
  
--  // Tclcheckdns
--  if (Tclcheckdns_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "tclcheckdns", Tclcheckdns_Init, 
--		     (Tcl_PackageInitProc*)NULL);
+-CXXFLAGS = $(CXXOPT) -I. -I../include -I$(X11INCLUDE)
 -
--  // Tksao
--  if (Tksao_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "tksao", Tksao_Init,
--  		     (Tcl_PackageInitProc*)NULL);
--
--  // Tkhtml
--  if (Tkhtml_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "tkhtml", Tkhtml_Init,
--  		     (Tcl_PackageInitProc*)NULL);
--
--  // Tcliis
--  if (Tcliis_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "Tcliis", Tcliis_Init, 
--		     (Tcl_PackageInitProc*)NULL);
--
--  // Tkmpeg
--  if (Tkmpeg_Init(interp) == TCL_ERROR)
--    return TCL_ERROR;
--  Tcl_StaticPackage (interp, "tkmpeg", Tkmpeg_Init, 
--		     (Tcl_PackageInitProc*)NULL);
--
--
-   return TCL_OK;
- }
+ ds9	: ds9Base ds9.zip
+ 	$(RM) $@
+ 	strip ds9Base
+--- /dev/null
++++ b/ds9/ds9
+@@ -0,0 +1,2 @@
++#!/bin/sh
++exec wish -f ${DS9_HOME-/usr/share/saods9}/src/ds9.tcl $*
 --- a/src/ds9.tcl
 +++ b/src/ds9.tcl
 @@ -218,6 +218,11 @@
diff --git a/debian/patches/series b/debian/patches/series
index 21244bf..19377db 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,6 @@
 ds9_make_linux.patch
 ds9_use_filesystem.patch
-ds9_use_shared_libs.patch
+ds9_use_system_libs.patch
 ds9_use_tcltk_packages.patch
 ds9_support_blt.patch
 ds9_fix_docdir.patch
@@ -12,4 +12,4 @@ saotk_add_psscale.patch
 saotk_avoid_compile_warnings.patch
 saotk_use_system_libs.patch
 saotk_spellfix.patch
-iis.patch
+tcliis.patch
diff --git a/debian/patches/iis.patch b/debian/patches/tcliis.patch
similarity index 100%
rename from debian/patches/iis.patch
rename to debian/patches/tcliis.patch
diff --git a/debian/rules b/debian/rules
index fabff6b..9001929 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,13 +24,14 @@ override_dh_auto_build: make.include
 	dh_auto_build -- $(BUILDPARTS)
 	cp xmlrpc-0.3/xmlrpc.tcl ds9/zipdir/zvfsmntpt/src
 	chmod ugo-x ds9/zipdir/zvfsmntpt/src/*.tcl
+	chmod ugo+x ds9/ds9
 	perl -w debian/generate-man > ds9/ds9.1
 
 override_dh_auto_test:
 	DS9_HOME=ds9/zipdir/zvfsmntpt \
 	TCLLIBPATH=lib/ \
 	xvfb-run --server-args="-screen 0 1024x768x24" \
-	./bin/ds9 -quit
+	./ds9/ds9 -quit
 
 override_dh_installchangelogs:
 	dh_installchangelogs doc/release/r7.0.html
diff --git a/debian/saods9-tcl-packages.install b/debian/saods9-tcl-packages.install
new file mode 100644
index 0000000..6bc7781
--- /dev/null
+++ b/debian/saods9-tcl-packages.install
@@ -0,0 +1,4 @@
+lib/tclcheckdns* /usr/lib/tcltk/
+lib/tcliis* /usr/lib/tcltk/
+lib/tkmpeg* /usr/lib/tcltk/
+lib/tkhtml* /usr/lib/tcltk/
diff --git a/debian/saods9.install b/debian/saods9.install
index 5580b2f..c085a00 100644
--- a/debian/saods9.install
+++ b/debian/saods9.install
@@ -1,4 +1,4 @@
-bin/ds9 usr/bin/
+ds9/ds9 /usr/bin
 debian/ds9.xpm usr/share/pixmaps
 debian/saods9.desktop usr/share/applications
 ds9/zipdir/zvfsmntpt/cmaps /usr/share/saods9/
@@ -6,7 +6,3 @@ ds9/zipdir/zvfsmntpt/doc/sun.gif /usr/share/saods9
 ds9/zipdir/zvfsmntpt/msgs /usr/share/saods9/
 ds9/zipdir/zvfsmntpt/src /usr/share/saods9/
 ds9/zipdir/zvfsmntpt/template /usr/share/saods9/
-lib/tclcheckdns* /usr/lib/tcltk/
-lib/tcliis* /usr/lib/tcltk/
-lib/tkmpeg* /usr/lib/tcltk/
-lib/tkhtml* /usr/lib/tcltk/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/saods9.git



More information about the Debian-astro-commits mailing list