[Debian-astro-commits] [skycat] 01/01: Use Tcl/Tk stubs

Ole Streicher olebole at moszumanska.debian.org
Sat Jun 11 13:43:00 UTC 2016


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

olebole pushed a commit to branch debian
in repository skycat.

commit 300b259d099f0d8b8ddcd6c28735dc46bcbba83d
Author: Ole Streicher <olebole at debian.org>
Date:   Sat Jun 11 15:42:51 2016 +0200

    Use Tcl/Tk stubs
---
 debian/changelog               |   1 +
 debian/patches/series          |   1 +
 debian/patches/use_stubs.patch | 149 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 151 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 80fba41..8cc76e0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 skycat (3.1.2+starlink1~b+dfsg-3) UNRELEASED; urgency=low
 
   * Install .desktop file
+  * Use Tcl/Tk stubs
 
  -- Ole Streicher <olebole at debian.org>  Sun, 08 May 2016 17:55:38 -0300
 
diff --git a/debian/patches/series b/debian/patches/series
index 7a3eecb..ea52214 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ nonlinux.patch
 remove_tclx.patch
 iqefunc_from_midas.patch
 workaround_bias_crash.patch
+use_stubs.patch
diff --git a/debian/patches/use_stubs.patch b/debian/patches/use_stubs.patch
new file mode 100644
index 0000000..5b0fb6c
--- /dev/null
+++ b/debian/patches/use_stubs.patch
@@ -0,0 +1,149 @@
+Author: Ole Streicher <olebole at debian.org>
+Description: Use Tcl/Tk stubs
+ This will allow to make skycat independent of the Tcl version once
+ BLT uses stubs as well (which is not the case in the moment).
+--- a/astrotcl/configure.in
++++ b/astrotcl/configure.in
+@@ -181,8 +181,8 @@
+ #--------------------------------------------------------------------
+ 
+ # allan: can't use stubs, due to BLT dependency
+-#AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
+-#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
++AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
++AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
+ 
+ #--------------------------------------------------------------------
+ # This macro generates a line to use when building a library.  It
+--- a/cat/configure.in
++++ b/cat/configure.in
+@@ -172,8 +172,8 @@
+ #--------------------------------------------------------------------
+ 
+ # allan: can't use stubs, due to BLT dependency
+-#AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
+-#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
++AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
++AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
+ 
+ #--------------------------------------------------------------------
+ # This macro generates a line to use when building a library.  It
+--- a/rtd/configure.in
++++ b/rtd/configure.in
+@@ -182,8 +182,8 @@
+ #--------------------------------------------------------------------
+ 
+ # allan: can't use stubs, due to BLT dependency
+-#AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
+-#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
++AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
++AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
+ 
+ #--------------------------------------------------------------------
+ # This macro generates a line to use when building a library.  It
+--- a/skycat/configure.in
++++ b/skycat/configure.in
+@@ -172,8 +172,8 @@
+ #--------------------------------------------------------------------
+ 
+ # allan: can't use stubs, due to BLT dependency
+-#AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
+-#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
++AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
++AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
+ 
+ #--------------------------------------------------------------------
+ # This macro generates a line to use when building a library.  It
+--- a/tclconfig/tcl.m4
++++ b/tclconfig/tcl.m4
+@@ -3213,9 +3213,9 @@
+     else
+ 	RANLIB_STUB="${RANLIB}"
+ 	if test "${SHARED_BUILD}" = "1" ; then
+-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_LIB_SPEC}"
++	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
+ 	    if test x"${TK_BIN_DIR}" != x ; then
+-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_LIB_SPEC}"
++		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
+ 	    fi
+ 	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+ 	    RANLIB=:
+--- a/astrotcl/generic/Astrotcl.C
++++ b/astrotcl/generic/Astrotcl.C
+@@ -64,6 +64,11 @@
+     if (initialized++)
+ 	return TCL_OK;
+ 
++    if (Tcl_InitStubs(interp, TCL_PATCH_LEVEL, 0) == NULL)
++      return TCL_ERROR;
++    if (Tk_InitStubs(interp, TK_PATCH_LEVEL, 0) == NULL)
++      return TCL_ERROR;
++
+     // set up Tcl package
+     if (Tcl_PkgProvide (interp, "Astrotcl", PACKAGE_VERSION) != TCL_OK) {
+ 	return TCL_ERROR;
+--- a/rtd/generic/RtdImage.C
++++ b/rtd/generic/RtdImage.C
+@@ -329,6 +329,11 @@
+ {
+     // Initialize the local packages that rtd depends on
+ 
++    if (Tcl_InitStubs(interp, TCL_PATCH_LEVEL, 0) == NULL)
++      return TCL_ERROR;
++    if (Tk_InitStubs(interp, TK_PATCH_LEVEL, 0) == NULL)
++      return TCL_ERROR;
++
+     // PWD: enable postscript printing for images (local ext)
+     TkCanvasPsImage_Init();
+ 
+--- a/tclutil/generic/Tclutil.C
++++ b/tclutil/generic/Tclutil.C
+@@ -72,6 +72,11 @@
+     if (initialized++)
+ 	return TCL_OK;
+ 
++    if (Tcl_InitStubs(interp, TCL_PATCH_LEVEL, 0) == NULL)
++      return TCL_ERROR;
++    if (Tk_InitStubs(interp, TK_PATCH_LEVEL, 0) == NULL)
++      return TCL_ERROR;
++
+     // initialize the required BLT package 
+     if (Blt_Init(interp) == TCL_ERROR) {
+ 	return TCL_ERROR; 
+--- a/cat/generic/TclAstroCat.C
++++ b/cat/generic/TclAstroCat.C
+@@ -33,6 +33,8 @@
+ #endif
+ #include "TabTable.h"
+ #include "Mem.h"
++#include "tcl.h"
++#include "tk.h"
+ #include "error.h"
+ #include "util.h"
+ #include "LocalCatalog.h"
+@@ -188,6 +190,11 @@
+     // object files from these packages directly, to avoid having the
+     // extra dependencies.)
+ 
++    if (Tcl_InitStubs(interp, TCL_PATCH_LEVEL, 0) == NULL)
++      return TCL_ERROR;
++    if (Tk_InitStubs(interp, TK_PATCH_LEVEL, 0) == NULL)
++      return TCL_ERROR;
++
+     // initialize the tclutil package
+     if (Tclutil_Init(interp) == TCL_ERROR) {
+ 	return TCL_ERROR;
+--- a/skycat/generic/Skycat.C
++++ b/skycat/generic/Skycat.C
+@@ -109,6 +109,11 @@
+ extern "C"
+ int Skycat_Init(Tcl_Interp* interp)  
+ {
++    if (Tcl_InitStubs(interp, TCL_PATCH_LEVEL, 0) == NULL)
++      return TCL_ERROR;
++    if (Tk_InitStubs(interp, TK_PATCH_LEVEL, 0) == NULL)
++      return TCL_ERROR;
++
+     // initialize the Rtd package 
+     if (Rtd_Init(interp) == TCL_ERROR) {
+ 	return TCL_ERROR;

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



More information about the Debian-astro-commits mailing list