[Debian-astro-commits] [skycat] 01/04: Switch to gbp patch handling

Ole Streicher olebole at moszumanska.debian.org
Sat Aug 5 12:11:33 UTC 2017


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

olebole pushed a commit to branch master
in repository skycat.

commit 53cccf9c32125ebe9ac74c602fbd5798f63ed089
Author: Ole Streicher <olebole at debian.org>
Date:   Sat Aug 5 11:33:52 2017 +0200

    Switch to gbp patch handling
---
 ...paths-so-that-they-correspond-to-the-FHS.patch} | 430 ++++++++++--------
 ...libs-for-hurd-i386-and-kfreeBSD-correctl.patch} |  23 +-
 ...ild_problems.patch => Fix-build-problems.patch} |  74 +--
 ...ove_tclx.patch => Remove-Tclx-dependency.patch} | 340 ++++++++------
 ...e-lines-that-lead-to-crash-with-ImageBias.patch |  26 ++
 ...-with-a-version-that-does-not-need-NR-co.patch} |  72 +--
 .../{use_stubs.patch => Use-Tcl-Tk-stubs.patch}    | 185 +++++---
 .../{use_std_blt.patch => Use-standard-BLT.patch}  | 501 ++++++++++++---------
 ...bwcstools-instead-of-the-convienience-co.patch} |  14 +-
 debian/patches/series                              |  18 +-
 debian/patches/workaround_bias_crash.patch         |  18 -
 11 files changed, 979 insertions(+), 722 deletions(-)

diff --git a/debian/patches/fhs.patch b/debian/patches/Change-the-paths-so-that-they-correspond-to-the-FHS.patch
similarity index 79%
rename from debian/patches/fhs.patch
rename to debian/patches/Change-the-paths-so-that-they-correspond-to-the-FHS.patch
index bbb3401..ce4648d 100644
--- a/debian/patches/fhs.patch
+++ b/debian/patches/Change-the-paths-so-that-they-correspond-to-the-FHS.patch
@@ -1,18 +1,27 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Change the paths so that they correspond to the FHS.
- Also remove the "-star" suffix from the executable.
---- a/skycat/Makefile.in
-+++ b/skycat/Makefile.in
-@@ -22,7 +22,7 @@
- #SAMPLE_NEW_VAR	= @SAMPLE_NEW_VAR@
- 
- # Install these scripts
--PROGS = skycat-star
-+PROGS = skycat
- 
- # Testing applications
- TEST_APPS = 
-@@ -84,8 +84,8 @@
+From: Ole Streicher <debian at liska.ath.cx>
+Date: Sat, 5 Aug 2017 11:30:42 +0200
+Subject: Change the paths so that they correspond to the FHS.
+
+Also remove the "-star" suffix from the executable.
+---
+ astrotcl/Makefile.in  | 10 ++++++----
+ astrotcl/configure.in |  2 +-
+ cat/Makefile.in       | 10 ++++++----
+ rtd/Makefile.in       | 18 ++++++++++--------
+ rtd/rtd.in            | 12 ++++--------
+ skycat/Makefile.in    | 16 +++++++++-------
+ skycat/configure.in   |  4 ++--
+ skycat/skycat.in      | 12 ++++--------
+ tclconfig/tcl.m4      |  7 ++++---
+ tclutil/Makefile.in   | 10 ++++++----
+ tclutil/configure.in  |  2 +-
+ 11 files changed, 53 insertions(+), 50 deletions(-)
+
+diff --git a/astrotcl/Makefile.in b/astrotcl/Makefile.in
+index f2f0eb5..bea5774 100755
+--- a/astrotcl/Makefile.in
++++ b/astrotcl/Makefile.in
+@@ -78,8 +78,8 @@ prefix		= @prefix@
  exec_prefix	= @exec_prefix@
  
  bindir		= @bindir@
@@ -23,24 +32,15 @@ Description: Change the paths so that they correspond to the FHS.
  mandir		= @mandir@
  includedir	= @includedir@
  
-@@ -112,6 +112,7 @@
- CLEANFILES	= @CLEANFILES@ $(TEST_APPS) *.o tests/*.o
+@@ -106,6 +106,7 @@ CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
+ CLEANFILES	= @CLEANFILES@ $(TEST_APPS) *.result test.fits* tmp.fits *.tmp *.o tests/*.o
  EXEEXT		= @EXEEXT@
  LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
 +LD_SEARCH_FLAGS	= @LD_SEARCH_FLAGS@
- MAKE_LIB	= @MAKE_LIB@ $(MERGE_OBJECTS)
+ MAKE_LIB	= @MAKE_LIB@
  MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
  MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-@@ -211,7 +212,7 @@
- 
- #  Scripts created by configure depend on their .in files and config.status
- #  (since they are cleaned).
--skycat-star: skycat-star.in config.status
-+skycat: skycat.in config.status
- 	./config.status
- 
- #========================================================================
-@@ -346,6 +347,7 @@
+@@ -336,6 +337,7 @@ distclean: clean
  #========================================================================
  
  install-lib-binaries: binaries
@@ -48,8 +48,8 @@ Description: Change the paths so that they correspond to the FHS.
  	@test -d $(DESTDIR)$(pkglibdir) || mkdir -p $(DESTDIR)$(pkglibdir)
  	@list='$(lib_BINARIES)'; for p in $$list; do \
  	  if test -f $$p; then \
-@@ -375,8 +377,8 @@
- 	for p in $$list; do \
+@@ -364,8 +366,8 @@ install-lib-binaries: binaries
+ 	@list='$(PKG_TCL_SOURCES) library/tclIndex'; for p in $$list; do \
  	  if test -f $(srcdir)/$$p; then \
  	    destp=`basename $$p`; \
 -	    echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
@@ -59,18 +59,24 @@ Description: Change the paths so that they correspond to the FHS.
  	  fi; \
  	done
  	@if test "x$(SHARED_BUILD)" = "x1"; then \
-@@ -447,7 +449,7 @@
- # Generate the skycat release
- #========================================================================
- SKYCAT_FILES = \
--	bin/skycat-star \
-+	bin/skycat \
- 	bin/rtd \
- 	bin/rtdServer \
- 	bin/tRtd \
+diff --git a/astrotcl/configure.in b/astrotcl/configure.in
+index 2295491..99bef60 100644
+--- a/astrotcl/configure.in
++++ b/astrotcl/configure.in
+@@ -87,7 +87,7 @@ csources=`cd $srcdir; echo generic/*.[Cc] press/*.[Cc] libwcs/*.[Cc]`
+ changequote([, ])
+ cheaders=`cd $srcdir; echo generic/*.h press/*.h libwcs/*.h`
+ cincludes="-I$srcdir/../tclutil/generic -I$srcdir/generic -I$srcdir/press -I$srcdir/libwcs"
+-tclsources=`cd $srcdir; echo library/*.tcl`
++tclsources=`cd $srcdir; ls library/*.tcl | fgrep -v mkIndex.tcl`
+ 
+ TEA_ADD_SOURCES([${csources}])
+ TEA_ADD_HEADERS([${cheaders}])
+diff --git a/cat/Makefile.in b/cat/Makefile.in
+index f93d514..abc9657 100755
 --- a/cat/Makefile.in
 +++ b/cat/Makefile.in
-@@ -88,8 +88,8 @@
+@@ -88,8 +88,8 @@ prefix		= @prefix@
  exec_prefix	= @exec_prefix@
  
  bindir		= @bindir@
@@ -81,7 +87,7 @@ Description: Change the paths so that they correspond to the FHS.
  mandir		= @mandir@
  includedir	= @includedir@
  
-@@ -116,6 +116,7 @@
+@@ -116,6 +116,7 @@ CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
  CLEANFILES	= @CLEANFILES@ $(TEST_APPS)  *.result *.tmp *.o tests/*.o
  EXEEXT		= @EXEEXT@
  LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
@@ -89,7 +95,7 @@ Description: Change the paths so that they correspond to the FHS.
  MAKE_LIB	= @MAKE_LIB@ $(MERGE_OBJECTS)
  MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
  MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-@@ -346,6 +347,7 @@
+@@ -346,6 +347,7 @@ distclean: clean
  #========================================================================
  
  install-lib-binaries: binaries
@@ -97,7 +103,7 @@ Description: Change the paths so that they correspond to the FHS.
  	@test -d $(DESTDIR)$(pkglibdir) || mkdir -p $(DESTDIR)$(pkglibdir)
  	@list='$(lib_BINARIES)'; for p in $$list; do \
  	  if test -f $$p; then \
-@@ -375,8 +377,8 @@
+@@ -375,8 +377,8 @@ install-lib-binaries: binaries
  	for p in $$list; do \
  	  if test -f $(srcdir)/$$p; then \
  	    destp=`basename $$p`; \
@@ -108,9 +114,20 @@ Description: Change the paths so that they correspond to the FHS.
  	  fi; \
  	done
  	@if test "x$(SHARED_BUILD)" = "x1"; then \
---- a/astrotcl/Makefile.in
-+++ b/astrotcl/Makefile.in
-@@ -78,8 +78,8 @@
+diff --git a/rtd/Makefile.in b/rtd/Makefile.in
+index 9fe2f70..b8c66df 100755
+--- a/rtd/Makefile.in
++++ b/rtd/Makefile.in
+@@ -22,7 +22,7 @@
+ #SAMPLE_NEW_VAR	= @SAMPLE_NEW_VAR@
+ 
+ # Install these scripts
+-PROGS = rtd tRtd
++PROGS = rtd
+ 
+ # Extra static library and binaries for real-time image servers and clients 
+ RTDEVT_LIB = librtdImgEvt.a
+@@ -95,8 +95,8 @@ prefix		= @prefix@
  exec_prefix	= @exec_prefix@
  
  bindir		= @bindir@
@@ -121,15 +138,15 @@ Description: Change the paths so that they correspond to the FHS.
  mandir		= @mandir@
  includedir	= @includedir@
  
-@@ -106,6 +106,7 @@
- CLEANFILES	= @CLEANFILES@ $(TEST_APPS) *.result test.fits* tmp.fits *.tmp *.o tests/*.o
+@@ -123,6 +123,7 @@ CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
+ CLEANFILES	= @CLEANFILES@ $(TEST_APPS) *.o tests/*.o
  EXEEXT		= @EXEEXT@
  LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
 +LD_SEARCH_FLAGS	= @LD_SEARCH_FLAGS@
- MAKE_LIB	= @MAKE_LIB@
+ MAKE_LIB	= @MAKE_LIB@ $(MERGE_OBJECTS)
  MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
  MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-@@ -336,6 +337,7 @@
+@@ -357,6 +358,7 @@ distclean: clean
  #========================================================================
  
  install-lib-binaries: binaries
@@ -137,8 +154,8 @@ Description: Change the paths so that they correspond to the FHS.
  	@test -d $(DESTDIR)$(pkglibdir) || mkdir -p $(DESTDIR)$(pkglibdir)
  	@list='$(lib_BINARIES)'; for p in $$list; do \
  	  if test -f $$p; then \
-@@ -364,8 +366,8 @@
- 	@list='$(PKG_TCL_SOURCES) library/tclIndex'; for p in $$list; do \
+@@ -386,8 +388,8 @@ install-lib-binaries: binaries
+ 	for p in $$list; do \
  	  if test -f $(srcdir)/$$p; then \
  	    destp=`basename $$p`; \
 -	    echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
@@ -148,58 +165,72 @@ Description: Change the paths so that they correspond to the FHS.
  	  fi; \
  	done
  	@if test "x$(SHARED_BUILD)" = "x1"; then \
---- a/tclutil/Makefile.in
-+++ b/tclutil/Makefile.in
-@@ -80,8 +80,8 @@
- exec_prefix	= @exec_prefix@
+@@ -448,13 +450,13 @@ $(RTDEVT_LIB): $(RTDEVT_OBJ)
+ 	$(RANLIB_STUB) $@
  
- bindir		= @bindir@
--libdir		= @libdir@
--datadir		= @datadir@
-+libdir		= @libdir@/skycat
-+datadir		= @datadir@/skycat
- mandir		= @mandir@
- includedir	= @includedir@
+ $(RTD_SERVER): $(RTD_SERVER_OBJS) $(RTDEVT_LIB)
+-	$(CXXCOMPILE) -o $@ $(RTD_SERVER_OBJS) $(RTDEVT_LIB) @LIBS@
++	$(CXXCOMPILE) $(LDFLAGS) -o $@ $(RTD_SERVER_OBJS) $(RTDEVT_LIB) @LIBS@
+ 
+ rtdClient: rtdClient.o $(RTDEVT_LIB)
+-	$(CXXCOMPILE) -o $@ $? $(RTDEVT_LIB) @LIBS@
++	$(CXXCOMPILE) $(LDFLAGS) -o $@ $? $(RTDEVT_LIB) @LIBS@
+ 
+ rtdCubeDisplay: rtdCubeDisplay.o $(RTDEVT_LIB)
+-	$(CXXCOMPILE) -o $@ $? $(RTDEVT_LIB) @LIBS@
++	$(CXXCOMPILE) $(LDFLAGS) -o $@ $? $(RTDEVT_LIB) @LIBS@
  
-@@ -108,6 +108,7 @@
- CLEANFILES	= @CLEANFILES@ $(TEST_APPS) *.result *.tmp *.o
- EXEEXT		= @EXEEXT@
- LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-+LD_SEARCH_FLAGS	= @LD_SEARCH_FLAGS@
- MAKE_LIB	= @MAKE_LIB@
- MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
- MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-@@ -338,6 +339,7 @@
  #========================================================================
+ # RTD Remote access C library
+diff --git a/rtd/rtd.in b/rtd/rtd.in
+index f12228b..47daf6a 100755
+--- a/rtd/rtd.in
++++ b/rtd/rtd.in
+@@ -26,7 +26,7 @@ RTD_BASE=`(cd $DIR; pwd)`
+ cd $cwd
  
- install-lib-binaries: binaries
-+	@test -d $(DESTDIR)$(pkgdatadir) || mkdir -p $(DESTDIR)$(pkgdatadir)
- 	@test -d $(DESTDIR)$(pkglibdir) || mkdir -p $(DESTDIR)$(pkglibdir)
- 	@list='$(lib_BINARIES)'; for p in $$list; do \
- 	  if test -f $$p; then \
-@@ -367,8 +369,8 @@
- 	for p in $$list; do \
- 	  if test -f $(srcdir)/$$p; then \
- 	    destp=`basename $$p`; \
--	    echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
--	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
-+	    echo " Install $$destp $(DESTDIR)$(pkgdatadir)/$$destp"; \
-+	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$destp; \
- 	  fi; \
- 	done
- 	@if test "x$(SHARED_BUILD)" = "x1"; then \
---- a/rtd/Makefile.in
-+++ b/rtd/Makefile.in
+ # If we're NOT ssh'd in
+-if [ ! ${SSH_TTY} ]; then
++if [ ! "${SSH_TTY}" ]; then
+     # make sure X is running (on Mac OS X)
+     if [ `uname` = "Darwin" -a "`ps -x 2>/dev/null | awk '{print $5}' | grep X11`" = "" ]; then
+ 	for i in /Applications/Utilities $HOME/Desktop ; do
+@@ -41,12 +41,8 @@ if [ ! ${SSH_TTY} ]; then
+     fi
+ fi
+ 
+-# Make sure we can find the shared libs
+- at LD_LIBRARY_PATH_VAR@="$RTD_BASE/lib:@BLT_LIB_DIR@:${@LD_LIBRARY_PATH_VAR@}"
+-export @LD_LIBRARY_PATH_VAR@
+-
+-# and the Tcl packages
+-TCLLIBPATH="$RTD_BASE/lib"
++# Make sure we can find the Tcl packages
++TCLLIBPATH="/usr/lib/skycat /usr/share/skycat"
+ export TCLLIBPATH
+ 
+ # Make sure we start the correct wish binary
+@@ -54,5 +50,5 @@ PATH=$RTD_BASE/bin:$PATH
+ export PATH
+ 
+ test -d $HOME/.rtd || mkdir $HOME/.rtd
+-exec wish8.4 $RTD_BASE/lib/rtd at PACKAGE_VERSION@/main.tcl ${1+"$@"} | tee $HOME/.skycat/log 2>&1
++exec wish8.6 /usr/share/skycat/rtd at PACKAGE_VERSION@/main.tcl ${1+"$@"} | tee $HOME/.skycat/log 2>&1
+ 
+diff --git a/skycat/Makefile.in b/skycat/Makefile.in
+index 9bb4036..f44495b 100755
+--- a/skycat/Makefile.in
++++ b/skycat/Makefile.in
 @@ -22,7 +22,7 @@
  #SAMPLE_NEW_VAR	= @SAMPLE_NEW_VAR@
  
  # Install these scripts
--PROGS = rtd tRtd
-+PROGS = rtd
+-PROGS = skycat-star
++PROGS = skycat
  
- # Extra static library and binaries for real-time image servers and clients 
- RTDEVT_LIB = librtdImgEvt.a
-@@ -95,8 +95,8 @@
+ # Testing applications
+ TEST_APPS = 
+@@ -84,8 +84,8 @@ prefix		= @prefix@
  exec_prefix	= @exec_prefix@
  
  bindir		= @bindir@
@@ -210,7 +241,7 @@ Description: Change the paths so that they correspond to the FHS.
  mandir		= @mandir@
  includedir	= @includedir@
  
-@@ -123,6 +123,7 @@
+@@ -112,6 +112,7 @@ CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
  CLEANFILES	= @CLEANFILES@ $(TEST_APPS) *.o tests/*.o
  EXEEXT		= @EXEEXT@
  LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
@@ -218,7 +249,16 @@ Description: Change the paths so that they correspond to the FHS.
  MAKE_LIB	= @MAKE_LIB@ $(MERGE_OBJECTS)
  MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
  MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-@@ -357,6 +358,7 @@
+@@ -211,7 +212,7 @@ tclIndex:
+ 
+ #  Scripts created by configure depend on their .in files and config.status
+ #  (since they are cleaned).
+-skycat-star: skycat-star.in config.status
++skycat: skycat.in config.status
+ 	./config.status
+ 
+ #========================================================================
+@@ -346,6 +347,7 @@ distclean: clean
  #========================================================================
  
  install-lib-binaries: binaries
@@ -226,7 +266,7 @@ Description: Change the paths so that they correspond to the FHS.
  	@test -d $(DESTDIR)$(pkglibdir) || mkdir -p $(DESTDIR)$(pkglibdir)
  	@list='$(lib_BINARIES)'; for p in $$list; do \
  	  if test -f $$p; then \
-@@ -386,8 +388,8 @@
+@@ -375,8 +377,8 @@ install-lib-binaries: binaries
  	for p in $$list; do \
  	  if test -f $(srcdir)/$$p; then \
  	    destp=`basename $$p`; \
@@ -237,56 +277,33 @@ Description: Change the paths so that they correspond to the FHS.
  	  fi; \
  	done
  	@if test "x$(SHARED_BUILD)" = "x1"; then \
-@@ -448,13 +450,13 @@
- 	$(RANLIB_STUB) $@
- 
- $(RTD_SERVER): $(RTD_SERVER_OBJS) $(RTDEVT_LIB)
--	$(CXXCOMPILE) -o $@ $(RTD_SERVER_OBJS) $(RTDEVT_LIB) @LIBS@
-+	$(CXXCOMPILE) $(LDFLAGS) -o $@ $(RTD_SERVER_OBJS) $(RTDEVT_LIB) @LIBS@
- 
- rtdClient: rtdClient.o $(RTDEVT_LIB)
--	$(CXXCOMPILE) -o $@ $? $(RTDEVT_LIB) @LIBS@
-+	$(CXXCOMPILE) $(LDFLAGS) -o $@ $? $(RTDEVT_LIB) @LIBS@
- 
- rtdCubeDisplay: rtdCubeDisplay.o $(RTDEVT_LIB)
--	$(CXXCOMPILE) -o $@ $? $(RTDEVT_LIB) @LIBS@
-+	$(CXXCOMPILE) $(LDFLAGS) -o $@ $? $(RTDEVT_LIB) @LIBS@
- 
+@@ -447,7 +449,7 @@ FORCE:
+ # Generate the skycat release
  #========================================================================
- # RTD Remote access C library
---- a/tclconfig/tcl.m4
-+++ b/tclconfig/tcl.m4
-@@ -673,6 +673,7 @@
-     AC_SUBST(TCL_DBGX)
-     AC_SUBST(CFLAGS_DEFAULT)
-     AC_SUBST(LDFLAGS_DEFAULT)
-+    AC_SUBST(LD_SEARCH_FLAGS)
- 
-     if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
- 	AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
-@@ -1353,8 +1354,8 @@
- 		SHLIB_LD="${CXX} -shared"
- 		DL_OBJS="tclLoadDl.o"
- 		DL_LIBS="-ldl"
--		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
--		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-+		LDFLAGS="$LDFLAGS -Wl,--export-dynamic -Wl,-soname,lib${PACKAGE_NAME}${PACKAGE_VERSION}.so"
-+		LD_SEARCH_FLAGS='-Wl,-rpath,${libdir}'
- 	    else
- 		AC_CHECK_HEADER(dld.h, [
- 		    SHLIB_LD="ld -shared"
-@@ -3176,7 +3177,7 @@
- 	MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)"
-     else
- 	MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
--	MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${LDFLAGS_DEFAULT} \${SHLIB_LD_LIBS}"
-+	MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${LD_SEARCH_FLAGS} \${LDFLAGS_DEFAULT} \${SHLIB_LD_LIBS}"
- 	MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
-     fi
+ SKYCAT_FILES = \
+-	bin/skycat-star \
++	bin/skycat \
+ 	bin/rtd \
+ 	bin/rtdServer \
+ 	bin/tRtd \
+diff --git a/skycat/configure.in b/skycat/configure.in
+index 7d407ec..4a05439 100644
+--- a/skycat/configure.in
++++ b/skycat/configure.in
+@@ -239,6 +239,6 @@ AC_SUBST(OS)
+ # You may alternatively have a special pkgIndex.tcl.in or other files
+ # which require substituting th AC variables in.  Include these here.
+ #--------------------------------------------------------------------
+-AC_OUTPUT([Makefile pkgIndex.tcl skycatConfig.sh skycat-star skycat_version.tcl linux/skycat.spec])
++AC_OUTPUT([Makefile pkgIndex.tcl skycatConfig.sh skycat skycat_version.tcl linux/skycat.spec])
  
+-chmod ugo+rx skycat-star
++chmod ugo+rx skycat
+diff --git a/skycat/skycat.in b/skycat/skycat.in
+index 0be1884..4f8df59 100755
 --- a/skycat/skycat.in
 +++ b/skycat/skycat.in
-@@ -22,7 +22,7 @@
+@@ -22,7 +22,7 @@ DIR=`dirname "$PRG"`/..
  SKYCAT_BASE=`(cd $DIR; pwd)`
  
  # If we're NOT ssh'd in
@@ -295,7 +312,7 @@ Description: Change the paths so that they correspond to the FHS.
      # make sure X is running (on Mac OS X)
      if [ `uname` = "Darwin" ] ; then
  	if [ "`ps -x | awk '{print $5}' | grep X11`" = "" ]; then
-@@ -40,12 +40,8 @@
+@@ -40,12 +40,8 @@ if [ ! ${SSH_TTY} ]; then
      fi
  fi
  
@@ -310,60 +327,92 @@ Description: Change the paths so that they correspond to the FHS.
  export TCLLIBPATH
  
  # Make sure we start the correct wish binary
-@@ -54,5 +50,5 @@
+@@ -54,5 +50,5 @@ export PATH
  
  test -d $HOME/.skycat || mkdir $HOME/.skycat
  echo "`date`: Starting skycat with: $0 ${1+"$@"}" > $HOME/.skycat/log
 -exec wish8.4 $SKYCAT_BASE/lib/skycat at PACKAGE_VERSION@/main.tcl ${1+"$@"} | tee -a $HOME/.skycat/log 2>&1
 +exec wish8.6 /usr/share/skycat/skycat at PACKAGE_VERSION@/main.tcl ${1+"$@"} | tee -a $HOME/.skycat/log 2>&1
  
---- a/skycat/configure.in
-+++ b/skycat/configure.in
-@@ -239,6 +239,6 @@
- # You may alternatively have a special pkgIndex.tcl.in or other files
- # which require substituting th AC variables in.  Include these here.
- #--------------------------------------------------------------------
--AC_OUTPUT([Makefile pkgIndex.tcl skycatConfig.sh skycat-star skycat_version.tcl linux/skycat.spec])
-+AC_OUTPUT([Makefile pkgIndex.tcl skycatConfig.sh skycat skycat_version.tcl linux/skycat.spec])
- 
--chmod ugo+rx skycat-star
-+chmod ugo+rx skycat
---- a/rtd/rtd.in
-+++ b/rtd/rtd.in
-@@ -26,7 +26,7 @@
- cd $cwd
+diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4
+index 35d0bf5..eaa40df 100644
+--- a/tclconfig/tcl.m4
++++ b/tclconfig/tcl.m4
+@@ -673,6 +673,7 @@ AC_DEFUN(TEA_ENABLE_SYMBOLS, [
+     AC_SUBST(TCL_DBGX)
+     AC_SUBST(CFLAGS_DEFAULT)
+     AC_SUBST(LDFLAGS_DEFAULT)
++    AC_SUBST(LD_SEARCH_FLAGS)
  
- # If we're NOT ssh'd in
--if [ ! ${SSH_TTY} ]; then
-+if [ ! "${SSH_TTY}" ]; then
-     # make sure X is running (on Mac OS X)
-     if [ `uname` = "Darwin" -a "`ps -x 2>/dev/null | awk '{print $5}' | grep X11`" = "" ]; then
- 	for i in /Applications/Utilities $HOME/Desktop ; do
-@@ -41,12 +41,8 @@
+     if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+ 	AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
+@@ -1353,8 +1354,8 @@ dnl AC_CHECK_TOOL(AR, ar, :)
+ 		SHLIB_LD="${CXX} -shared"
+ 		DL_OBJS="tclLoadDl.o"
+ 		DL_LIBS="-ldl"
+-		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
++		LDFLAGS="$LDFLAGS -Wl,--export-dynamic -Wl,-soname,lib${PACKAGE_NAME}${PACKAGE_VERSION}.so"
++		LD_SEARCH_FLAGS='-Wl,-rpath,${libdir}'
+ 	    else
+ 		AC_CHECK_HEADER(dld.h, [
+ 		    SHLIB_LD="ld -shared"
+@@ -3176,7 +3177,7 @@ AC_DEFUN(TEA_MAKE_LIB, [
+ 	MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)"
+     else
+ 	MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
+-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${LDFLAGS_DEFAULT} \${SHLIB_LD_LIBS}"
++	MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${LD_SEARCH_FLAGS} \${LDFLAGS_DEFAULT} \${SHLIB_LD_LIBS}"
+ 	MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
      fi
- fi
  
--# Make sure we can find the shared libs
-- at LD_LIBRARY_PATH_VAR@="$RTD_BASE/lib:@BLT_LIB_DIR@:${@LD_LIBRARY_PATH_VAR@}"
--export @LD_LIBRARY_PATH_VAR@
--
--# and the Tcl packages
--TCLLIBPATH="$RTD_BASE/lib"
-+# Make sure we can find the Tcl packages
-+TCLLIBPATH="/usr/lib/skycat /usr/share/skycat"
- export TCLLIBPATH
+diff --git a/tclutil/Makefile.in b/tclutil/Makefile.in
+index 83c0619..bd78f28 100755
+--- a/tclutil/Makefile.in
++++ b/tclutil/Makefile.in
+@@ -80,8 +80,8 @@ prefix		= @prefix@
+ exec_prefix	= @exec_prefix@
  
- # Make sure we start the correct wish binary
-@@ -54,5 +50,5 @@
- export PATH
+ bindir		= @bindir@
+-libdir		= @libdir@
+-datadir		= @datadir@
++libdir		= @libdir@/skycat
++datadir		= @datadir@/skycat
+ mandir		= @mandir@
+ includedir	= @includedir@
  
- test -d $HOME/.rtd || mkdir $HOME/.rtd
--exec wish8.4 $RTD_BASE/lib/rtd at PACKAGE_VERSION@/main.tcl ${1+"$@"} | tee $HOME/.skycat/log 2>&1
-+exec wish8.6 /usr/share/skycat/rtd at PACKAGE_VERSION@/main.tcl ${1+"$@"} | tee $HOME/.skycat/log 2>&1
+@@ -108,6 +108,7 @@ CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
+ CLEANFILES	= @CLEANFILES@ $(TEST_APPS) *.result *.tmp *.o
+ EXEEXT		= @EXEEXT@
+ LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
++LD_SEARCH_FLAGS	= @LD_SEARCH_FLAGS@
+ MAKE_LIB	= @MAKE_LIB@
+ MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
+ MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
+@@ -338,6 +339,7 @@ distclean: clean
+ #========================================================================
  
+ install-lib-binaries: binaries
++	@test -d $(DESTDIR)$(pkgdatadir) || mkdir -p $(DESTDIR)$(pkgdatadir)
+ 	@test -d $(DESTDIR)$(pkglibdir) || mkdir -p $(DESTDIR)$(pkglibdir)
+ 	@list='$(lib_BINARIES)'; for p in $$list; do \
+ 	  if test -f $$p; then \
+@@ -367,8 +369,8 @@ install-lib-binaries: binaries
+ 	for p in $$list; do \
+ 	  if test -f $(srcdir)/$$p; then \
+ 	    destp=`basename $$p`; \
+-	    echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
+-	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
++	    echo " Install $$destp $(DESTDIR)$(pkgdatadir)/$$destp"; \
++	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$destp; \
+ 	  fi; \
+ 	done
+ 	@if test "x$(SHARED_BUILD)" = "x1"; then \
+diff --git a/tclutil/configure.in b/tclutil/configure.in
+index f9ee54b..272f67d 100644
 --- a/tclutil/configure.in
 +++ b/tclutil/configure.in
-@@ -88,7 +88,7 @@
+@@ -88,7 +88,7 @@ csources=`cd $srcdir; echo generic/*.[Cc]`
  changequote([, ])
  cheaders=`cd $srcdir; echo generic/*.h`
  cincludes="-I. -I$srcdir/bitmaps -I$srcdir/generic"
@@ -372,14 +421,3 @@ Description: Change the paths so that they correspond to the FHS.
  
  TEA_ADD_SOURCES([${csources}])
  TEA_ADD_HEADERS([${cheaders}])
---- a/astrotcl/configure.in
-+++ b/astrotcl/configure.in
-@@ -87,7 +87,7 @@
- changequote([, ])
- cheaders=`cd $srcdir; echo generic/*.h press/*.h libwcs/*.h`
- cincludes="-I$srcdir/../tclutil/generic -I$srcdir/generic -I$srcdir/press -I$srcdir/libwcs"
--tclsources=`cd $srcdir; echo library/*.tcl`
-+tclsources=`cd $srcdir; ls library/*.tcl | fgrep -v mkIndex.tcl`
- 
- TEA_ADD_SOURCES([${csources}])
- TEA_ADD_HEADERS([${cheaders}])
diff --git a/debian/patches/nonlinux.patch b/debian/patches/Configure-shared-libs-for-hurd-i386-and-kfreeBSD-correctl.patch
similarity index 70%
rename from debian/patches/nonlinux.patch
rename to debian/patches/Configure-shared-libs-for-hurd-i386-and-kfreeBSD-correctl.patch
index 5b682f3..f217b1c 100644
--- a/debian/patches/nonlinux.patch
+++ b/debian/patches/Configure-shared-libs-for-hurd-i386-and-kfreeBSD-correctl.patch
@@ -1,9 +1,18 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Configure shared libs for hurd-i386 and kfreeBSD-* correctly.
- Also, define the obsolete "MAXPATHLEN" on hurd.
+From: Ole Streicher <debian at liska.ath.cx>
+Date: Sat, 5 Aug 2017 11:30:42 +0200
+Subject: Configure shared libs for hurd-i386 and kfreeBSD-* correctly.
+
+Also, define the obsolete "MAXPATHLEN" on hurd.
+---
+ tclconfig/tcl.m4          | 16 ++++++++--------
+ tclutil/generic/Mem_Map.h |  5 +++++
+ 2 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4
+index eaa40df..989e7ff 100644
 --- a/tclconfig/tcl.m4
 +++ b/tclconfig/tcl.m4
-@@ -1379,17 +1379,17 @@
+@@ -1379,17 +1379,17 @@ dnl AC_CHECK_TOOL(AR, ar, :)
  	    fi
  
  	    ;;
@@ -25,7 +34,7 @@ Description: Configure shared libs for hurd-i386 and kfreeBSD-* correctly.
  	    else
  		AC_CHECK_HEADER(dld.h, [
  		    SHLIB_LD="ld -shared"
-@@ -1481,16 +1481,16 @@
+@@ -1481,16 +1481,16 @@ dnl AC_CHECK_TOOL(AR, ar, :)
  	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
  	    TCL_LIB_VERSIONS_OK=nodots
  	    ;;
@@ -46,9 +55,11 @@ Description: Configure shared libs for hurd-i386 and kfreeBSD-* correctly.
  	    if test "${TCL_THREADS}" = "1" ; then
  		# The -pthread needs to go in the CFLAGS, not LIBS
  		LIBS=`echo $LIBS | sed s/-pthread//`
+diff --git a/tclutil/generic/Mem_Map.h b/tclutil/generic/Mem_Map.h
+index 00be5e4..5ecc087 100644
 --- a/tclutil/generic/Mem_Map.h
 +++ b/tclutil/generic/Mem_Map.h
-@@ -60,6 +60,11 @@
+@@ -60,6 +60,11 @@ extern int munmap(caddr_t, size_t);
  // Default size of mapped page on SunOS, HP and Solaris.
  #define MMAP_PAGE_SIZE 4096
  
diff --git a/debian/patches/fix_build_problems.patch b/debian/patches/Fix-build-problems.patch
similarity index 76%
rename from debian/patches/fix_build_problems.patch
rename to debian/patches/Fix-build-problems.patch
index 1c25cd0..6a96815 100644
--- a/debian/patches/fix_build_problems.patch
+++ b/debian/patches/Fix-build-problems.patch
@@ -1,8 +1,44 @@
-Author: Joseph Wang <joequant at gmail.com>
-Description: Fix build problems. Adopted from the Mageia package.
+From: Joseph Wang <joequant at gmail.com>
+Date: Sat, 5 Aug 2017 11:30:42 +0200
+Subject: Fix build problems.
+
+Adopted from the Mageia package.
+---
+ astrotcl/aclocal.m4           |  7 +++++--
+ rtd/Makefile.in               | 15 +++++++++------
+ rtd/configure.in              |  2 +-
+ rtd/generic/tkCanvasPsImage.c |  7 +++++--
+ 4 files changed, 20 insertions(+), 11 deletions(-)
+
+diff --git a/astrotcl/aclocal.m4 b/astrotcl/aclocal.m4
+index 7cd16a1..4b0b0fe 100644
+--- a/astrotcl/aclocal.m4
++++ b/astrotcl/aclocal.m4
+@@ -162,14 +162,17 @@ AC_DEFUN(ASTROTCL_PATH_CFITSIO, [
+ 	done
+         if test -z "$CFITSIO_LIB_DIR" ; then
+ 	     echo
+-	     AC_MSG_ERROR([could not find $CFITSIO_LIBNAME: Please use the --with-cfitsio=DIR option.])
+ 	fi
+     else 
+         #  Just assume the given value will work. This may not be true if
+         #  CFITSIO itself isn't built yet, so allow the flexibility.
+         CFITSIO_LIB_DIR=$CFITSIO_LIB_DIR/lib
+     fi
+-    CFITSIO_LIB_SPEC="-L$CFITSIO_LIB_DIR $CFITSIO_LIBFLAG"
++    if test "$CFITSIO_LIB_DIR" ; then
++        CFITSIO_LIB_SPEC="-L$CFITSIO_LIB_DIR $CFITSIO_LIBFLAG"
++    else
++        CFITSIO_LIB_SPEC="$CFITSIO_LIBFLAG"
++    fi
+     AC_MSG_RESULT($CFITSIO_LIB_DIR)
+     AC_SUBST(CFITSIO_LIB_DIR)
+     AC_SUBST(CFITSIO_LIB_SPEC)
+diff --git a/rtd/Makefile.in b/rtd/Makefile.in
+index b635564..9fe2f70 100755
 --- a/rtd/Makefile.in
 +++ b/rtd/Makefile.in
-@@ -447,13 +447,13 @@
+@@ -447,13 +447,13 @@ $(RTDEVT_LIB): $(RTDEVT_OBJ)
  	$(AR) r $@ $(RTDEVT_OBJ)
  	$(RANLIB_STUB) $@
  
@@ -19,7 +55,7 @@ Description: Fix build problems. Adopted from the Mageia package.
  	$(CXXCOMPILE) -o $@ $? $(RTDEVT_LIB) @LIBS@
  
  #========================================================================
-@@ -469,15 +469,18 @@
+@@ -469,15 +469,18 @@ $(RTD_REMOTE_LIB): $(RTD_REMOTE_OBJ)
  #========================================================================
  test: binaries libraries $(TEST_APPS)
  
@@ -41,9 +77,11 @@ Description: Fix build problems. Adopted from the Mageia package.
  
  #========================================================================
  # Run Tcl test cases
+diff --git a/rtd/configure.in b/rtd/configure.in
+index b2fb844..da69e2c 100644
 --- a/rtd/configure.in
 +++ b/rtd/configure.in
-@@ -127,7 +127,7 @@
+@@ -127,7 +127,7 @@ AC_SUBST(CLEANFILES)
  if test -f $TK_SRC_DIR/generic/tkCanvas.h ; then
  	AC_DEFINE(HAVE_TKCANVAS_H, 1, 
  		[See if we can include tkCanvas.h, an internal tk header])
@@ -52,6 +90,8 @@ Description: Fix build problems. Adopted from the Mageia package.
  fi
  
  #--------------------------------------------------------------------
+diff --git a/rtd/generic/tkCanvasPsImage.c b/rtd/generic/tkCanvasPsImage.c
+index d901b54..666ed2d 100644
 --- a/rtd/generic/tkCanvasPsImage.c
 +++ b/rtd/generic/tkCanvasPsImage.c
 @@ -35,6 +35,9 @@
@@ -64,7 +104,7 @@ Description: Fix build problems. Adopted from the Mageia package.
  #include "tclInt.h"
  #include "tkCanvas.h"
  #else
-@@ -75,8 +78,8 @@
+@@ -75,8 +78,8 @@ TkCanvasPsImage_Init()
  {
      /*  Need to access the Tk Image type and supercede the Postscript
       *  command. */
@@ -75,25 +115,3 @@ Description: Fix build problems. Adopted from the Mageia package.
  }
  
  /*
---- a/astrotcl/aclocal.m4
-+++ b/astrotcl/aclocal.m4
-@@ -162,14 +162,17 @@
- 	done
-         if test -z "$CFITSIO_LIB_DIR" ; then
- 	     echo
--	     AC_MSG_ERROR([could not find $CFITSIO_LIBNAME: Please use the --with-cfitsio=DIR option.])
- 	fi
-     else 
-         #  Just assume the given value will work. This may not be true if
-         #  CFITSIO itself isn't built yet, so allow the flexibility.
-         CFITSIO_LIB_DIR=$CFITSIO_LIB_DIR/lib
-     fi
--    CFITSIO_LIB_SPEC="-L$CFITSIO_LIB_DIR $CFITSIO_LIBFLAG"
-+    if test "$CFITSIO_LIB_DIR" ; then
-+        CFITSIO_LIB_SPEC="-L$CFITSIO_LIB_DIR $CFITSIO_LIBFLAG"
-+    else
-+        CFITSIO_LIB_SPEC="$CFITSIO_LIBFLAG"
-+    fi
-     AC_MSG_RESULT($CFITSIO_LIB_DIR)
-     AC_SUBST(CFITSIO_LIB_DIR)
-     AC_SUBST(CFITSIO_LIB_SPEC)
diff --git a/debian/patches/remove_tclx.patch b/debian/patches/Remove-Tclx-dependency.patch
similarity index 66%
rename from debian/patches/remove_tclx.patch
rename to debian/patches/Remove-Tclx-dependency.patch
index a26f94b..074d696 100644
--- a/debian/patches/remove_tclx.patch
+++ b/debian/patches/Remove-Tclx-dependency.patch
@@ -1,10 +1,34 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Remove Tclx dependency
- The package seems to have only little dependencies of tclx. Since
- Tclx is not available for tcl8.6 and up, the depenency is removed.
- To get the "fork" call, we additionally need the "expect" package.
-Note: For backporting to tcl8.5 and before, remove this patch and add
- Tclx to the dependencies.
+From: Ole Streicher <debian at liska.ath.cx>
+Date: Sat, 5 Aug 2017 11:30:42 +0200
+Subject: Remove Tclx dependency
+
+The package seems to have only little dependencies of tclx. Since Tclx
+is not available for tcl8.6 and up, the depenency is removed. To get
+the "fork" call, we additionally need the "expect" package.
+---
+ astrotcl/library/AstrotclInit.tcl  |  2 +-
+ cat/library/AstroCat.tcl           |  2 +-
+ cat/library/AstroImage.tcl         |  2 +-
+ cat/library/CatInit.tcl            |  2 +-
+ rtd/library/Rtd.tcl                |  2 +-
+ rtd/library/RtdImageBias.tcl       |  6 ++++++
+ rtd/library/RtdImageFitsHeader.tcl | 10 ++++++----
+ rtd/library/RtdImageHduChooser.tcl |  3 ++-
+ rtd/library/RtdImagePerf.tcl       |  1 +
+ rtd/library/RtdImagePick2.tcl      |  3 ++-
+ rtd/library/RtdInit.tcl            |  2 +-
+ rtd/library/tRtd.tcl               |  1 +
+ rtd/util/rmipc.tcl                 |  2 +-
+ skycat/library/SkycatInit.tcl      |  4 +++-
+ tclutil/library/Batch.tcl          |  5 +++--
+ tclutil/library/TclutilInit.tcl    |  3 +--
+ tclutil/library/canvastext.tcl     |  4 ++--
+ tclutil/library/itcldoc.tcl        |  1 -
+ tclutil/library/list.tcl           |  6 ++++++
+ 19 files changed, 40 insertions(+), 21 deletions(-)
+
+diff --git a/astrotcl/library/AstrotclInit.tcl b/astrotcl/library/AstrotclInit.tcl
+index bced84d..106a597 100644
 --- a/astrotcl/library/AstrotclInit.tcl
 +++ b/astrotcl/library/AstrotclInit.tcl
 @@ -15,7 +15,7 @@
@@ -16,9 +40,37 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
      lappend auto_path $astrotcl_library
  }
  
+diff --git a/cat/library/AstroCat.tcl b/cat/library/AstroCat.tcl
+index b872fe0..be55726 100644
+--- a/cat/library/AstroCat.tcl
++++ b/cat/library/AstroCat.tcl
+@@ -155,7 +155,7 @@ itcl::class cat::AstroCat {
+ 	    return
+ 	}
+ 	if {"$onoff" == "on"} {
+-	    lassign [pipe] rfd_ wfd_
++	    lassign [chan pipe] rfd_ wfd_
+ 	    fileevent $rfd_ readable [code $this feedback]
+ 	    $w_.cat feedback $wfd_
+ 	} elseif {[info exists rfd_]} {
+diff --git a/cat/library/AstroImage.tcl b/cat/library/AstroImage.tcl
+index b1177fc..636c626 100644
+--- a/cat/library/AstroImage.tcl
++++ b/cat/library/AstroImage.tcl
+@@ -401,7 +401,7 @@ itcl::class cat::AstroImage {
+ 	    return
+ 	}
+ 	if {"$onoff" == "on"} {
+-	    lassign [pipe] rfd_ wfd_
++	    lassign [chan pipe] rfd_ wfd_
+ 	    fileevent $rfd_ readable [code $this feedback]
+ 	    $w_.im feedback $wfd_
+ 	} elseif {[info exists rfd_]} {
+diff --git a/cat/library/CatInit.tcl b/cat/library/CatInit.tcl
+index e0dca90..38f9da6 100644
 --- a/cat/library/CatInit.tcl
 +++ b/cat/library/CatInit.tcl
-@@ -14,7 +14,7 @@
+@@ -14,7 +14,7 @@ package require img::xpm
  package require Tclutil
  package require Astrotcl
  
@@ -27,9 +79,11 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
      lappend auto_path $cat_library
  }
  
+diff --git a/rtd/library/Rtd.tcl b/rtd/library/Rtd.tcl
+index 27a28ca..211fe04 100644
 --- a/rtd/library/Rtd.tcl
 +++ b/rtd/library/Rtd.tcl
-@@ -650,7 +650,7 @@
+@@ -650,7 +650,7 @@ itcl::class rtd::Rtd {
  	set t6 "Tcl version:\t[info patchlevel]"
  	set t7 "Tcl package path:\t$tcl_pkgPath"
  	set t8 "Package versions:\t"
@@ -38,66 +92,8 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  	    set t8 "$t8$el[package versions $el] "
  	}
          DialogWidget $w_.rtd_about \
---- a/rtd/library/RtdInit.tcl
-+++ b/rtd/library/RtdInit.tcl
-@@ -14,7 +14,7 @@
- package require Tclutil
- package require Astrotcl
- 
--if {![lcontain $auto_path $rtd_library]} {
-+if { $auto_path ni $rtd_library} {
-     lappend auto_path $rtd_library
- }
- 
---- a/rtd/util/rmipc.tcl
-+++ b/rtd/util/rmipc.tcl
-@@ -20,7 +20,7 @@
-     }
-     set f [open "|ipcs $opt"]
-     while {[gets $f line] != -1} {
--        if { ![lcontain $line $env(USER)]} { continue }
-+        if { $line ni $env(USER) } { continue }
- 	set num [lindex $line 1]
- 	if {![catch {expr $num}]} {
- 	    if {[catch {exec ipcrm $opt $num} msg]} {
---- a/skycat/library/SkycatInit.tcl
-+++ b/skycat/library/SkycatInit.tcl
-@@ -15,9 +15,11 @@
- package require Astrotcl
- package require Cat
- 
--if {![lcontain $auto_path $skycat_library]} {
-+if { $auto_path ni $skycat_library } {
-     lappend auto_path $skycat_library
- }
- 
- namespace eval skycat {namespace export *}
- namespace import -force skycat::*
-+namespace import ::tcl::mathfunc::max
-+namespace import ::tcl::mathfunc::min
---- a/tclutil/library/TclutilInit.tcl
-+++ b/tclutil/library/TclutilInit.tcl
-@@ -16,9 +16,8 @@
- 
- package require Itcl
- package require Itk
--package require Tclx
- 
--if {![lcontain $auto_path $tclutil_library]} {
-+if {$auto_path ni $tclutil_library} {
-     lappend auto_path $tclutil_library
- }
- 
---- a/tclutil/library/itcldoc.tcl
-+++ b/tclutil/library/itcldoc.tcl
-@@ -36,7 +36,6 @@
- # A.Brighton 07 Jan 98   created
- 
- package require Itcl
--package require Tclx
- 
- itcl::class ItclDoc {
- 
+diff --git a/rtd/library/RtdImageBias.tcl b/rtd/library/RtdImageBias.tcl
+index 856ad74..a305e2f 100644
 --- a/rtd/library/RtdImageBias.tcl
 +++ b/rtd/library/RtdImageBias.tcl
 @@ -10,6 +10,12 @@
@@ -113,6 +109,8 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  # RtdImageBias is a class for controlling the subtraction of
  # a bias frame.
  
+diff --git a/rtd/library/RtdImageFitsHeader.tcl b/rtd/library/RtdImageFitsHeader.tcl
+index 2452d2f..2e439b0 100644
 --- a/rtd/library/RtdImageFitsHeader.tcl
 +++ b/rtd/library/RtdImageFitsHeader.tcl
 @@ -14,6 +14,8 @@
@@ -124,7 +122,7 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  
  itk::usual RtdImageFitsHeader {}
  
-@@ -160,7 +162,7 @@
+@@ -160,7 +162,7 @@ itcl::class rtd::RtdImageFitsHeader {
  	set tconfig_(sort_cols) $sort_cols
  	set tconfig_(sort_order) $sort_order
  
@@ -133,7 +131,7 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
              $tabnotebook_(table$i) config -sort_cols $sort_cols \
  		    -sort_order $sort_order
  	    $tabnotebook_(table$i) new_info
-@@ -173,7 +175,7 @@
+@@ -173,7 +175,7 @@ itcl::class rtd::RtdImageFitsHeader {
  	global $var
  	set val [set $var]
  	set tconfig_($label) $val
@@ -142,7 +140,7 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  	    $tabnotebook_(table$i) set_option $label Show $val
  	    $tabnotebook_(table$i) new_info
  	}
-@@ -220,7 +222,7 @@
+@@ -220,7 +222,7 @@ itcl::class rtd::RtdImageFitsHeader {
  
  	set length [string length [$listbox get 0]]
  
@@ -151,7 +149,7 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  	    set row [string tolower [$listbox get $n]]
              if {[catch {regexp -indices $string $row indices} idx] } { continue }
  	    if { $idx > 0 } {
-@@ -278,7 +280,7 @@
+@@ -278,7 +280,7 @@ itcl::class rtd::RtdImageFitsHeader {
  	set hlist [$image_ hdu list]
  
  	set ExtName "HDU 1"
@@ -160,6 +158,8 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  	    set hdu [expr {$i + 1}]
  	    set list [lindex $hlist $i]
  	    
+diff --git a/rtd/library/RtdImageHduChooser.tcl b/rtd/library/RtdImageHduChooser.tcl
+index 9ffd96b..64b42a1 100644
 --- a/rtd/library/RtdImageHduChooser.tcl
 +++ b/rtd/library/RtdImageHduChooser.tcl
 @@ -17,6 +17,7 @@
@@ -170,7 +170,7 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  
  itk::usual RtdImageHduChooser {}
  
-@@ -443,7 +444,7 @@
+@@ -443,7 +444,7 @@ itcl::class rtd::RtdImageHduChooser {
      
      private method svinfo {} {
  	set list [array get ext_ *NAXIS*]
@@ -179,6 +179,20 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  	    lappend newlist "[lindex $list $i] [lindex $list [expr {$i+1}]]"
  	}
  	set newlist [lsort -increasing -index 0 $newlist]
+diff --git a/rtd/library/RtdImagePerf.tcl b/rtd/library/RtdImagePerf.tcl
+index c26d97c..5d7f6ac 100644
+--- a/rtd/library/RtdImagePerf.tcl
++++ b/rtd/library/RtdImagePerf.tcl
+@@ -9,6 +9,7 @@
+ # D. Hopkinson    31 Jan 97  Created
+ # P.Biereichel    21/07/97   % display is the default + some bug fixes
+ # P.Biereichel    01/03/01   Only % display suported + code revised
++package require Tclutil
+ 
+ itk::usual RtdImagePerf {}
+ 
+diff --git a/rtd/library/RtdImagePick2.tcl b/rtd/library/RtdImagePick2.tcl
+index e4bfbbb..6c28d6e 100644
 --- a/rtd/library/RtdImagePick2.tcl
 +++ b/rtd/library/RtdImagePick2.tcl
 @@ -62,6 +62,7 @@
@@ -189,7 +203,7 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  
  itk::usual RtdImagePick2 { }
  
-@@ -127,7 +128,7 @@
+@@ -127,7 +128,7 @@ itcl::class rtd::RtdImagePick2 {
  		{Set the magnification factor of the zoom} \
  		-menu [menu $magMenu_]
  
@@ -198,26 +212,63 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  	    $m.mag add radiobutton -label " ${i}x" \
  		    -command [code $this scaleZoom $i] \
  		    -variable $magMenu_
---- a/tclutil/library/canvastext.tcl
-+++ b/tclutil/library/canvastext.tcl
-@@ -21,7 +21,7 @@
- proc ct_search_forward_char {canvas item char} {
-     if {![lempty $item]} {
- 	set text [lindex [$canvas itemconfigure $item -text] 4]
--	loop i [$canvas index $item insert] [$canvas index $item end] {
-+	for {set i [$canvas index $item insert]} {$i < [$canvas index $item end]} {incr i} {
- 	    if {$char == [string index $text $i]} {
- 		return $i
- 	    }
-@@ -37,7 +37,7 @@
- proc ct_search_backward_char {canvas item char} {
-     if {![lempty $item]} {
- 	set text  [lindex [$canvas itemconfigure $item -text] 4]
--	loop i [expr {[$canvas index $item insert] - 1}] 0 -1 {
-+	for {set i [expr {[$canvas index $item insert] - 1}]} {$i > 0} {decr i} {
- 	    if {$char == [string index $text $i]} {
- 		return $i
- 	    }
+diff --git a/rtd/library/RtdInit.tcl b/rtd/library/RtdInit.tcl
+index e86fc22..0c1288a 100644
+--- a/rtd/library/RtdInit.tcl
++++ b/rtd/library/RtdInit.tcl
+@@ -14,7 +14,7 @@
+ package require Tclutil
+ package require Astrotcl
+ 
+-if {![lcontain $auto_path $rtd_library]} {
++if { $auto_path ni $rtd_library} {
+     lappend auto_path $rtd_library
+ }
+ 
+diff --git a/rtd/library/tRtd.tcl b/rtd/library/tRtd.tcl
+index eca4c26..34e6507 100644
+--- a/rtd/library/tRtd.tcl
++++ b/rtd/library/tRtd.tcl
+@@ -10,6 +10,7 @@
+ # who             when       what
+ # --------------  ---------  ----------------------------------------
+ # pbiereic        01/03/01   Created
++package require Tclutil
+ 
+ itk::usual tRtd {}
+ 
+diff --git a/rtd/util/rmipc.tcl b/rtd/util/rmipc.tcl
+index b1282c6..6a64ade 100644
+--- a/rtd/util/rmipc.tcl
++++ b/rtd/util/rmipc.tcl
+@@ -20,7 +20,7 @@ foreach opt $opts {
+     }
+     set f [open "|ipcs $opt"]
+     while {[gets $f line] != -1} {
+-        if { ![lcontain $line $env(USER)]} { continue }
++        if { $line ni $env(USER) } { continue }
+ 	set num [lindex $line 1]
+ 	if {![catch {expr $num}]} {
+ 	    if {[catch {exec ipcrm $opt $num} msg]} {
+diff --git a/skycat/library/SkycatInit.tcl b/skycat/library/SkycatInit.tcl
+index 4ad1732..741efc6 100644
+--- a/skycat/library/SkycatInit.tcl
++++ b/skycat/library/SkycatInit.tcl
+@@ -15,9 +15,11 @@ package require Tclutil
+ package require Astrotcl
+ package require Cat
+ 
+-if {![lcontain $auto_path $skycat_library]} {
++if { $auto_path ni $skycat_library } {
+     lappend auto_path $skycat_library
+ }
+ 
+ namespace eval skycat {namespace export *}
+ namespace import -force skycat::*
++namespace import ::tcl::mathfunc::max
++namespace import ::tcl::mathfunc::min
+diff --git a/tclutil/library/Batch.tcl b/tclutil/library/Batch.tcl
+index 5798aa7..f08777c 100644
 --- a/tclutil/library/Batch.tcl
 +++ b/tclutil/library/Batch.tcl
 @@ -40,6 +40,7 @@
@@ -228,7 +279,7 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  
  itk::usual Batch {}
  
-@@ -81,7 +82,7 @@
+@@ -81,7 +82,7 @@ itcl::class util::Batch {
  	}
  	flush stdout
  	flush stderr
@@ -237,7 +288,7 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  	set pid [fork]
  	if {$pid == 0} {
  	    # child
-@@ -98,7 +99,7 @@
+@@ -98,7 +99,7 @@ itcl::class util::Batch {
  	    puts $wfd $status
  	    flush $wfd
  	    close $wfd
@@ -246,31 +297,60 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
  	} else {
  	    set bg_pid_ $pid
  	    fileevent $rfd readable [code $this read_pipe $rfd $wfd]
---- a/cat/library/AstroImage.tcl
-+++ b/cat/library/AstroImage.tcl
-@@ -401,7 +401,7 @@
- 	    return
- 	}
- 	if {"$onoff" == "on"} {
--	    lassign [pipe] rfd_ wfd_
-+	    lassign [chan pipe] rfd_ wfd_
- 	    fileevent $rfd_ readable [code $this feedback]
- 	    $w_.im feedback $wfd_
- 	} elseif {[info exists rfd_]} {
---- a/cat/library/AstroCat.tcl
-+++ b/cat/library/AstroCat.tcl
-@@ -155,7 +155,7 @@
- 	    return
- 	}
- 	if {"$onoff" == "on"} {
--	    lassign [pipe] rfd_ wfd_
-+	    lassign [chan pipe] rfd_ wfd_
- 	    fileevent $rfd_ readable [code $this feedback]
- 	    $w_.cat feedback $wfd_
- 	} elseif {[info exists rfd_]} {
+diff --git a/tclutil/library/TclutilInit.tcl b/tclutil/library/TclutilInit.tcl
+index d984882..56ec479 100644
+--- a/tclutil/library/TclutilInit.tcl
++++ b/tclutil/library/TclutilInit.tcl
+@@ -16,9 +16,8 @@ set tcl_precision 17
+ 
+ package require Itcl
+ package require Itk
+-package require Tclx
+ 
+-if {![lcontain $auto_path $tclutil_library]} {
++if {$auto_path ni $tclutil_library} {
+     lappend auto_path $tclutil_library
+ }
+ 
+diff --git a/tclutil/library/canvastext.tcl b/tclutil/library/canvastext.tcl
+index f08ca43..4275564 100644
+--- a/tclutil/library/canvastext.tcl
++++ b/tclutil/library/canvastext.tcl
+@@ -21,7 +21,7 @@ proc ct_cursor_position_in_line {canvas item} {
+ proc ct_search_forward_char {canvas item char} {
+     if {![lempty $item]} {
+ 	set text [lindex [$canvas itemconfigure $item -text] 4]
+-	loop i [$canvas index $item insert] [$canvas index $item end] {
++	for {set i [$canvas index $item insert]} {$i < [$canvas index $item end]} {incr i} {
+ 	    if {$char == [string index $text $i]} {
+ 		return $i
+ 	    }
+@@ -37,7 +37,7 @@ proc ct_search_forward_char {canvas item char} {
+ proc ct_search_backward_char {canvas item char} {
+     if {![lempty $item]} {
+ 	set text  [lindex [$canvas itemconfigure $item -text] 4]
+-	loop i [expr {[$canvas index $item insert] - 1}] 0 -1 {
++	for {set i [expr {[$canvas index $item insert] - 1}]} {$i > 0} {decr i} {
+ 	    if {$char == [string index $text $i]} {
+ 		return $i
+ 	    }
+diff --git a/tclutil/library/itcldoc.tcl b/tclutil/library/itcldoc.tcl
+index 02f7a33..388e763 100644
+--- a/tclutil/library/itcldoc.tcl
++++ b/tclutil/library/itcldoc.tcl
+@@ -36,7 +36,6 @@ exec tclsh $0 ${1+"$@"}
+ # A.Brighton 07 Jan 98   created
+ 
+ package require Itcl
+-package require Tclx
+ 
+ itcl::class ItclDoc {
+ 
+diff --git a/tclutil/library/list.tcl b/tclutil/library/list.tcl
+index 49c614c..a0d33a8 100644
 --- a/tclutil/library/list.tcl
 +++ b/tclutil/library/list.tcl
-@@ -50,3 +50,9 @@
+@@ -50,3 +50,9 @@ proc lreverse {list} {
      }
      return $l
  }
@@ -280,23 +360,3 @@ Note: For backporting to tcl8.5 and before, remove this patch and add
 +    return [expr {$len == 0}]
 +}
 +
---- a/rtd/library/RtdImagePerf.tcl
-+++ b/rtd/library/RtdImagePerf.tcl
-@@ -9,6 +9,7 @@
- # D. Hopkinson    31 Jan 97  Created
- # P.Biereichel    21/07/97   % display is the default + some bug fixes
- # P.Biereichel    01/03/01   Only % display suported + code revised
-+package require Tclutil
- 
- itk::usual RtdImagePerf {}
- 
---- a/rtd/library/tRtd.tcl
-+++ b/rtd/library/tRtd.tcl
-@@ -10,6 +10,7 @@
- # who             when       what
- # --------------  ---------  ----------------------------------------
- # pbiereic        01/03/01   Created
-+package require Tclutil
- 
- itk::usual tRtd {}
- 
diff --git a/debian/patches/Remove-lines-that-lead-to-crash-with-ImageBias.patch b/debian/patches/Remove-lines-that-lead-to-crash-with-ImageBias.patch
new file mode 100644
index 0000000..8d2b5c9
--- /dev/null
+++ b/debian/patches/Remove-lines-that-lead-to-crash-with-ImageBias.patch
@@ -0,0 +1,26 @@
+From: Ole Streicher <olebole at debian.org>
+Date: Sat, 5 Aug 2017 11:30:42 +0200
+Subject: Remove lines that lead to crash with ImageBias
+
+This is a *very* pragmatic workaround: it is unclear why the crash happens
+---
+ rtd/library/RtdImageBias.tcl | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/rtd/library/RtdImageBias.tcl b/rtd/library/RtdImageBias.tcl
+index a305e2f..c1358f8 100644
+--- a/rtd/library/RtdImageBias.tcl
++++ b/rtd/library/RtdImageBias.tcl
+@@ -134,12 +134,6 @@ itcl::class rtd::RtdImageBias {
+ 	}
+ 	blt::table configure $itk_component(status) c5 -resize expand
+ 
+-	foreach el "Load Copy Clear" {
+-	    set s [string tolower $el]
+-	    catch {bitmap compose $s $el -rotate 90.0 -font $itk_option(-valuefont)}
+-	    $itk_component(label$s) config -bitmap $s -anchor w
+-	}
+-
+ 	for {set i 0} {$i < $maxbias_} {incr i} {
+ 	    set n [expr {$i+1}]
+ 
diff --git a/debian/patches/iqefunc_from_midas.patch b/debian/patches/Replace-iqefunc.c-with-a-version-that-does-not-need-NR-co.patch
similarity index 98%
rename from debian/patches/iqefunc_from_midas.patch
rename to debian/patches/Replace-iqefunc.c-with-a-version-that-does-not-need-NR-co.patch
index 0d55897..428995a 100644
--- a/debian/patches/iqefunc_from_midas.patch
+++ b/debian/patches/Replace-iqefunc.c-with-a-version-that-does-not-need-NR-co.patch
@@ -1,9 +1,34 @@
-Author: Ole Streicher <olebole at debian.org>
-Url: https://github.com/Starlink/skycat/pull/3
-Description: Replace iqefunc.c with a version that does not need NR code
- This patch replaces iqefunc.c by the version from ESO-MIDAS 15SEPpl1.0 which
- uses mpfit.c instead of mrqfit.c. Differently to the solution in ESO-MIDAS,
- the sort function was replaced by the libc qsort().
+From: Ole Streicher <olebole at debian.org>
+Date: Sat, 5 Aug 2017 11:30:42 +0200
+Subject: Replace iqefunc.c with a version that does not need NR code
+
+This patch replaces iqefunc.c by the version from ESO-MIDAS 15SEPpl1.0
+which uses mpfit.c instead of mrqfit.c. Differently to the solution in
+ESO-MIDAS, the sort function was replaced by the libc qsort().
+---
+ rtd/generic/ImageData.C |    2 +-
+ rtd/generic/iqefunc.c   |  222 +++--
+ rtd/generic/mpfit.c     | 2292 +++++++++++++++++++++++++++++++++++++++++++++++
+ rtd/generic/mpfit.h     |  197 ++++
+ 4 files changed, 2652 insertions(+), 61 deletions(-)
+ create mode 100644 rtd/generic/mpfit.c
+ create mode 100644 rtd/generic/mpfit.h
+
+diff --git a/rtd/generic/ImageData.C b/rtd/generic/ImageData.C
+index 48425f2..51a1943 100644
+--- a/rtd/generic/ImageData.C
++++ b/rtd/generic/ImageData.C
+@@ -89,7 +89,7 @@ static const char* const rcsId="@(#) $Id: ImageData.C,v 1.1.1.1 2009/03/31 14:11
+ #endif
+ #include "define.h"
+ #include "Fits_IO.h"
+-#include "fitshead.h"
++#include <wcstools/fitshead.h>
+ #include "NativeImageData.h"
+ #include "ByteImageData.h"
+ #include "XImageData.h"
+diff --git a/rtd/generic/iqefunc.c b/rtd/generic/iqefunc.c
+index 3a8896d..cdb741d 100644
 --- a/rtd/generic/iqefunc.c
 +++ b/rtd/generic/iqefunc.c
 @@ -1,5 +1,5 @@
@@ -39,7 +64,7 @@ Description: Replace iqefunc.c with a version that does not need NR code
  
  static double  hsq2 = 0.7071067811865475244;    /* constant 0.5*sqrt(2) */
  
-@@ -137,6 +137,11 @@
+@@ -137,6 +137,11 @@ return 0;
  

  */
  
@@ -51,7 +76,7 @@ Description: Replace iqefunc.c with a version that does not need NR code
  int iqebgv(pfm, pwm, mx, my, bgm, bgs, nbg)
  /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  .PURPOSE   Estimate background level for subimage
-@@ -150,12 +155,15 @@
+@@ -150,12 +155,15 @@ float      *bgm;
  float      *bgs;
  int        *nbg;
  {
@@ -73,7 +98,7 @@ Description: Replace iqefunc.c with a version that does not need NR code
  
    *bgm = 0.0;
    *bgs = 0.0;
-@@ -224,7 +232,7 @@
+@@ -224,7 +232,7 @@ int        *nbg;
       mt = nt;
       while (n--) *pw++ = 1.0;
     }
@@ -82,7 +107,7 @@ Description: Replace iqefunc.c with a version that does not need NR code
    nt = mt;
  
  /* first estimate of mean and rms   */
-@@ -285,14 +293,20 @@
+@@ -285,14 +293,20 @@ float      bgv;
  float      bgs;
  float      *amm;
  {
@@ -104,7 +129,7 @@ Description: Replace iqefunc.c with a version that does not need NR code
  dv = 5.0*bgs;
  xm = mx - 1.0;
  ym = my - 1.0;
-@@ -432,6 +446,51 @@
+@@ -432,6 +446,51 @@ amm[0] = pfm[nx+ny*mx] - bgv;
  return 0;
  }
   
@@ -156,7 +181,7 @@ Description: Replace iqefunc.c with a version that does not need NR code
  /*
  

  */
-@@ -454,9 +513,6 @@
+@@ -454,9 +513,6 @@ float      *dy;
  int      n, nt, ix, iy, idx[9];
  float    a, am;
  float    *pfb, *pwb, fb[9], wb[9];
@@ -166,7 +191,7 @@ Description: Replace iqefunc.c with a version that does not need NR code
  
  /* check if 3x3 region is fully within frame   */
  
-@@ -496,12 +552,13 @@
+@@ -496,12 +552,13 @@ else
        pfm += mx - 3;
        }
     }
@@ -182,7 +207,7 @@ Description: Replace iqefunc.c with a version that does not need NR code
  
  nt = 0;
  am = 0.0;
-@@ -868,9 +925,53 @@
+@@ -868,9 +925,53 @@ int        ma;
    return 0;
  }
  
@@ -239,7 +264,7 @@ Description: Replace iqefunc.c with a version that does not need NR code
  
  int g2efit(val, wght, nx, ny, ap, cv, pchi)
  /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-@@ -886,43 +987,44 @@
+@@ -886,43 +987,44 @@ float      ap[MA];
  float      cv[MA];
  double     *pchi;
  {
@@ -323,6 +348,9 @@ Description: Replace iqefunc.c with a version that does not need NR code
 +    return result.niter;
  }
 -
+diff --git a/rtd/generic/mpfit.c b/rtd/generic/mpfit.c
+new file mode 100644
+index 0000000..3bea82e
 --- /dev/null
 +++ b/rtd/generic/mpfit.c
 @@ -0,0 +1,2292 @@
@@ -2618,6 +2646,9 @@ Description: Replace iqefunc.c with a version that does not need NR code
 +
 +  return 0;
 +}
+diff --git a/rtd/generic/mpfit.h b/rtd/generic/mpfit.h
+new file mode 100644
+index 0000000..516e086
 --- /dev/null
 +++ b/rtd/generic/mpfit.h
 @@ -0,0 +1,197 @@
@@ -2818,14 +2849,3 @@ Description: Replace iqefunc.c with a version that does not need NR code
 +#endif
 +
 +#endif /* MPFIT_H */
---- a/rtd/generic/ImageData.C
-+++ b/rtd/generic/ImageData.C
-@@ -89,7 +89,7 @@
- #endif
- #include "define.h"
- #include "Fits_IO.h"
--#include "fitshead.h"
-+#include <wcstools/fitshead.h>
- #include "NativeImageData.h"
- #include "ByteImageData.h"
- #include "XImageData.h"
diff --git a/debian/patches/use_stubs.patch b/debian/patches/Use-Tcl-Tk-stubs.patch
similarity index 68%
rename from debian/patches/use_stubs.patch
rename to debian/patches/Use-Tcl-Tk-stubs.patch
index 5b0fb6c..87f9d93 100644
--- a/debian/patches/use_stubs.patch
+++ b/debian/patches/Use-Tcl-Tk-stubs.patch
@@ -1,10 +1,27 @@
-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).
+From: Ole Streicher <olebole at debian.org>
+Date: Sat, 5 Aug 2017 11:30:42 +0200
+Subject: 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).
+---
+ astrotcl/configure.in       | 4 ++--
+ astrotcl/generic/Astrotcl.C | 5 +++++
+ cat/configure.in            | 4 ++--
+ cat/generic/TclAstroCat.C   | 7 +++++++
+ rtd/configure.in            | 4 ++--
+ rtd/generic/RtdImage.C      | 5 +++++
+ skycat/configure.in         | 4 ++--
+ skycat/generic/Skycat.C     | 5 +++++
+ tclconfig/tcl.m4            | 4 ++--
+ tclutil/generic/Tclutil.C   | 5 +++++
+ 10 files changed, 37 insertions(+), 10 deletions(-)
+
+diff --git a/astrotcl/configure.in b/astrotcl/configure.in
+index 8dbc12d..6c203f9 100644
 --- a/astrotcl/configure.in
 +++ b/astrotcl/configure.in
-@@ -181,8 +181,8 @@
+@@ -181,8 +181,8 @@ TEA_ENABLE_SYMBOLS
  #--------------------------------------------------------------------
  
  # allan: can't use stubs, due to BLT dependency
@@ -15,9 +32,27 @@ Description: Use Tcl/Tk stubs
  
  #--------------------------------------------------------------------
  # This macro generates a line to use when building a library.  It
+diff --git a/astrotcl/generic/Astrotcl.C b/astrotcl/generic/Astrotcl.C
+index 552f2db..ad6bbc3 100644
+--- a/astrotcl/generic/Astrotcl.C
++++ b/astrotcl/generic/Astrotcl.C
+@@ -64,6 +64,11 @@ int Astrotcl_Init(Tcl_Interp* interp)
+     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;
+diff --git a/cat/configure.in b/cat/configure.in
+index 11f8f72..c540f23 100644
 --- a/cat/configure.in
 +++ b/cat/configure.in
-@@ -172,8 +172,8 @@
+@@ -172,8 +172,8 @@ TEA_ENABLE_SYMBOLS
  #--------------------------------------------------------------------
  
  # allan: can't use stubs, due to BLT dependency
@@ -28,9 +63,36 @@ Description: Use Tcl/Tk stubs
  
  #--------------------------------------------------------------------
  # This macro generates a line to use when building a library.  It
+diff --git a/cat/generic/TclAstroCat.C b/cat/generic/TclAstroCat.C
+index f12ecbd..a4412f2 100644
+--- a/cat/generic/TclAstroCat.C
++++ b/cat/generic/TclAstroCat.C
+@@ -33,6 +33,8 @@ using namespace std;
+ #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 @@ int Cat_Init(Tcl_Interp* interp)
+     // 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;
+diff --git a/rtd/configure.in b/rtd/configure.in
+index da69e2c..bd692de 100644
 --- a/rtd/configure.in
 +++ b/rtd/configure.in
-@@ -182,8 +182,8 @@
+@@ -182,8 +182,8 @@ TEA_ENABLE_SYMBOLS
  #--------------------------------------------------------------------
  
  # allan: can't use stubs, due to BLT dependency
@@ -41,9 +103,27 @@ Description: Use Tcl/Tk stubs
  
  #--------------------------------------------------------------------
  # This macro generates a line to use when building a library.  It
+diff --git a/rtd/generic/RtdImage.C b/rtd/generic/RtdImage.C
+index 801e1c6..66afe85 100644
+--- a/rtd/generic/RtdImage.C
++++ b/rtd/generic/RtdImage.C
+@@ -329,6 +329,11 @@ int Rtd_Init(Tcl_Interp* interp)
+ {
+     // 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();
+ 
+diff --git a/skycat/configure.in b/skycat/configure.in
+index 4a05439..423a0a6 100644
 --- a/skycat/configure.in
 +++ b/skycat/configure.in
-@@ -172,8 +172,8 @@
+@@ -172,8 +172,8 @@ TEA_ENABLE_SYMBOLS
  #--------------------------------------------------------------------
  
  # allan: can't use stubs, due to BLT dependency
@@ -54,9 +134,27 @@ Description: Use Tcl/Tk stubs
  
  #--------------------------------------------------------------------
  # This macro generates a line to use when building a library.  It
+diff --git a/skycat/generic/Skycat.C b/skycat/generic/Skycat.C
+index 64bb48c..56ecc85 100644
+--- a/skycat/generic/Skycat.C
++++ b/skycat/generic/Skycat.C
+@@ -109,6 +109,11 @@ static Tk_ImageType skycatImageType = {
+ 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;
+diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4
+index 989e7ff..8b7edd8 100644
 --- a/tclconfig/tcl.m4
 +++ b/tclconfig/tcl.m4
-@@ -3213,9 +3213,9 @@
+@@ -3213,9 +3213,9 @@ AC_DEFUN(TEA_MAKE_LIB, [
      else
  	RANLIB_STUB="${RANLIB}"
  	if test "${SHARED_BUILD}" = "1" ; then
@@ -68,37 +166,11 @@ Description: Use Tcl/Tk stubs
  	    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();
- 
+diff --git a/tclutil/generic/Tclutil.C b/tclutil/generic/Tclutil.C
+index 4e9603f..18d6238 100644
 --- a/tclutil/generic/Tclutil.C
 +++ b/tclutil/generic/Tclutil.C
-@@ -72,6 +72,11 @@
+@@ -72,6 +72,11 @@ int Tclutil_Init(Tcl_Interp* interp)
      if (initialized++)
  	return TCL_OK;
  
@@ -110,40 +182,3 @@ Description: Use Tcl/Tk stubs
      // 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;
diff --git a/debian/patches/use_std_blt.patch b/debian/patches/Use-standard-BLT.patch
similarity index 76%
rename from debian/patches/use_std_blt.patch
rename to debian/patches/Use-standard-BLT.patch
index bef1576..679c748 100644
--- a/debian/patches/use_std_blt.patch
+++ b/debian/patches/Use-standard-BLT.patch
@@ -1,33 +1,34 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Use standard BLT.
- This reverts patch 4b228b...1d3dea on github.
---- a/tclutil/aclocal.m4
-+++ b/tclutil/aclocal.m4
-@@ -26,8 +26,8 @@
-        [AC_HELP_STRING([--with-blt=DIR],[link with BLT library installed in DIR])],
-        BLT_LIB_DIR=$withval)
- 
--    BLT_LIBNAME=libBLT25${SHLIB_SUFFIX}
--    BLT_LIBFLAG="-lBLT25"
-+    BLT_LIBNAME=libBLT${SHLIB_SUFFIX}
-+    BLT_LIBFLAG="-lBLT"
- 
-     if test -z "$BLT_LIB_DIR" ; then
- 	# If --with-blt=dir was not specified, try the Tcl lib dir and the exec-prefix/lib dir
---- a/rtd/library/RtdImageHduChooser.tcl
-+++ b/rtd/library/RtdImageHduChooser.tcl
-@@ -472,7 +472,7 @@
- 	
- 
- 	# position the images in the table
--	catch {blt::blttable forget $itk_component(imagetab)}
-+	catch {blt::table forget $itk_component(imagetab)}
- 
- 	set hdu [$image_ hdu]
- 	set idx [expr {$hdu -1}]
+From: Ole Streicher <debian at liska.ath.cx>
+Date: Sat, 5 Aug 2017 11:30:42 +0200
+Subject: Use standard BLT.
+
+This reverts patch 4b228b...1d3dea on github.
+---
+ cat/library/AstroImage.tcl         |  6 +++---
+ cat/library/AstroQuery.tcl         |  8 ++++----
+ rtd/library/RtdImageBias.tcl       | 14 +++++++-------
+ rtd/library/RtdImageCut.tcl        |  4 ++--
+ rtd/library/RtdImageHduChooser.tcl |  2 +-
+ rtd/library/RtdImagePanel.tcl      | 30 +++++++++++++++---------------
+ rtd/library/RtdImagePick2.tcl      | 24 ++++++++++++------------
+ rtd/library/RtdImagePickView.tcl   |  2 +-
+ rtd/library/RtdImagePixTable.tcl   |  6 +++---
+ rtd/library/RtdImagePrint.tcl      |  2 +-
+ rtd/library/RtdRecorder.tcl        |  8 ++++----
+ tclutil/aclocal.m4                 |  4 ++--
+ tclutil/library/Batch.tcl          |  5 +----
+ tclutil/library/CanvasDraw.tcl     |  2 +-
+ tclutil/library/EntryForm.tcl      | 10 +++++-----
+ tclutil/library/GraphPrint.tcl     |  7 ++++++-
+ tclutil/library/LabelCheck.tcl     |  4 ++--
+ tclutil/library/LabelChoice.tcl    |  4 ++--
+ 18 files changed, 72 insertions(+), 70 deletions(-)
+
+diff --git a/cat/library/AstroImage.tcl b/cat/library/AstroImage.tcl
+index 8cf135c..b1177fc 100644
 --- a/cat/library/AstroImage.tcl
 +++ b/cat/library/AstroImage.tcl
-@@ -183,9 +183,9 @@
+@@ -183,9 +183,9 @@ itcl::class cat::AstroImage {
  
  	pack [set f [frame $w_.main.top.f -relief groove -borderwidth 2]] \
  	    -side top -fill x -pady 1m
@@ -39,7 +40,7 @@ Description: Use standard BLT.
  	    [set name_ [LabelEntry $f.name \
  		 -text "Object Name:" \
  		 -command [code $this getimage] \
-@@ -269,7 +269,7 @@
+@@ -269,7 +269,7 @@ itcl::class cat::AstroImage {
  	    -side right -padx 1m -pady 2m
  
  
@@ -48,9 +49,11 @@ Description: Use standard BLT.
  
  	# dialog buttons
  	pack [frame $w_.buttons -borderwidth 2 -relief groove] \
+diff --git a/cat/library/AstroQuery.tcl b/cat/library/AstroQuery.tcl
+index 338f927..eeebb3d 100644
 --- a/cat/library/AstroQuery.tcl
 +++ b/cat/library/AstroQuery.tcl
-@@ -87,7 +87,7 @@
+@@ -87,7 +87,7 @@ itcl::class cat::AstroQuery {
  	pack [set f [frame $w_.options.f]] \
  	    -side top -fill x
  	
@@ -59,7 +62,7 @@ Description: Use standard BLT.
  	set search_opts_row_ 0
  
  	# if we are using world coords, display name, equinox, ra, dec
-@@ -262,7 +262,7 @@
+@@ -262,7 +262,7 @@ itcl::class cat::AstroQuery {
  				      -valuefont $itk_option(-valuefont) \
  				      -labelfont $itk_option(-labelfont)]]
  	    }
@@ -68,7 +71,7 @@ Description: Use standard BLT.
  	} else {
  	    # no options
  	    destroy $w_.options
-@@ -277,7 +277,7 @@
+@@ -277,7 +277,7 @@ itcl::class cat::AstroQuery {
      protected method add_copyright {} {
  	set s [$astrocat copyright]
  	if {"$s" != "" && [winfo exists $search_opts_]} {
@@ -77,7 +80,7 @@ Description: Use standard BLT.
  		[LabelValue $search_opts_.copyright \
  		     -anchor w -relief flat \
  		     -labelwidth 0 -valuewidth 0 \
-@@ -297,7 +297,7 @@
+@@ -297,7 +297,7 @@ itcl::class cat::AstroQuery {
  	set col 0
  	foreach w $args {
  	    if {"$w" != ""} {
@@ -86,9 +89,67 @@ Description: Use standard BLT.
  		    -fill x -pady 1m
  	    }
  	    incr col
+diff --git a/rtd/library/RtdImageBias.tcl b/rtd/library/RtdImageBias.tcl
+index 5014cfa..856ad74 100644
+--- a/rtd/library/RtdImageBias.tcl
++++ b/rtd/library/RtdImageBias.tcl
+@@ -110,7 +110,7 @@ itcl::class rtd::RtdImageBias {
+                 -command [code $this onOff]
+         } { keep -state }
+ 
+-        blt::blttable $itk_component(bias) \
++        blt::table $itk_component(bias) \
+             $itk_component(onoff)         0,0 -pady 3 \
+             $itk_component(copy)          0,1 -pady 3
+ 
+@@ -121,12 +121,12 @@ itcl::class rtd::RtdImageBias {
+ 		label $w_.label$comp \
+ 			-anchor c
+ 	    }
+-	    blt::blttable $itk_component(status) \
++	    blt::table $itk_component(status) \
+ 		    $itk_component(label$comp)      0,$i
+-	    blt::blttable configure $itk_component(status) c$i -resize none
++	    blt::table configure $itk_component(status) c$i -resize none
+ 	    incr i
+ 	}
+-	blt::blttable configure $itk_component(status) c5 -resize expand
++	blt::table configure $itk_component(status) c5 -resize expand
+ 
+ 	foreach el "Load Copy Clear" {
+ 	    set s [string tolower $el]
+@@ -205,7 +205,7 @@ itcl::class rtd::RtdImageBias {
+ 	    }
+             $itk_component(filename$i) component entry config -highlightthickness 0 -takefocus 0
+ 
+-	    blt::blttable $itk_component(status) \
++	    blt::table $itk_component(status) \
+ 		    $itk_component(labelnr$i)     $n,0 \
+ 		    $itk_component(select$i)      $n,1 \
+ 		    $itk_component(choose$i)      $n,2 \
+@@ -244,7 +244,7 @@ itcl::class rtd::RtdImageBias {
+                     -command [code $this auto_set_cut_levels]       
+ 	}
+ 
+-        blt::blttable $itk_component(cuts) \
++        blt::table $itk_component(cuts) \
+ 		$itk_component(labelcut)     0,0 -columnspan 3 -pady 4 \
+ 		$itk_component(low)          1,0 -anchor w -ipady 3 -pady 2 \
+ 		$itk_component(high)         1,1 -anchor w -ipady 3 -pady 2 \
+@@ -257,7 +257,7 @@ itcl::class rtd::RtdImageBias {
+ 		    -command [code $this close]
+ 	}
+ 
+-        blt::blttable $itk_component(buttons) \
++        blt::table $itk_component(buttons) \
+             $itk_component(close)        0,0 -pady 3
+ 
+     }
+diff --git a/rtd/library/RtdImageCut.tcl b/rtd/library/RtdImageCut.tcl
+index 272f1e1..fd14b53 100644
 --- a/rtd/library/RtdImageCut.tcl
 +++ b/rtd/library/RtdImageCut.tcl
-@@ -226,7 +226,7 @@
+@@ -226,7 +226,7 @@ itcl::class rtd::RtdImageCut {
  	    pack $itk_component(${el}cut) -padx 1m
  	}
  
@@ -97,7 +158,7 @@ Description: Use standard BLT.
              $itk_component(lowscale)       1,0 -anchor w -fill x -padx 1m -pady 1m \
              $itk_component(highscale)      1,1 -anchor w -fill x -padx 1m -pady 1m \
              $itk_component(percent)        2,0 -anchor c -fill x -columnspan 2 -padx 1m \
-@@ -249,7 +249,7 @@
+@@ -249,7 +249,7 @@ itcl::class rtd::RtdImageCut {
  	add_button update Update update_graph
  	add_button close Close quit
  	
@@ -106,6 +167,133 @@ Description: Use standard BLT.
              $itk_component(set)       1,0 -anchor w -fill x -padx 1m -pady 2m \
              $itk_component(reset)     1,1 -anchor w -fill x -padx 1m -pady 2m \
              $itk_component(median)    1,2 -anchor w -fill x -padx 1m -pady 2m \
+diff --git a/rtd/library/RtdImageHduChooser.tcl b/rtd/library/RtdImageHduChooser.tcl
+index 2a8f23a..9ffd96b 100644
+--- a/rtd/library/RtdImageHduChooser.tcl
++++ b/rtd/library/RtdImageHduChooser.tcl
+@@ -472,7 +472,7 @@ itcl::class rtd::RtdImageHduChooser {
+ 	
+ 
+ 	# position the images in the table
+-	catch {blt::blttable forget $itk_component(imagetab)}
++	catch {blt::table forget $itk_component(imagetab)}
+ 
+ 	set hdu [$image_ hdu]
+ 	set idx [expr {$hdu -1}]
+diff --git a/rtd/library/RtdImagePanel.tcl b/rtd/library/RtdImagePanel.tcl
+index 66866ed..ff92bcc 100644
+--- a/rtd/library/RtdImagePanel.tcl
++++ b/rtd/library/RtdImagePanel.tcl
+@@ -56,7 +56,7 @@ itcl::class rtd::RtdImagePanel {
+     # do the widget layout, aligning the items in rows and colums
+ 
+     protected method make_layout {} {
+-	blt::blttable $w_
++	blt::table $w_
+ 	add_short_help $w_ {Image information area}
+ 
+ 	# frame at the lower right of the panel that optionally
+@@ -102,9 +102,9 @@ itcl::class rtd::RtdImagePanel {
+ 		    -relief groove
+ 	    } 
+ 	    if { "$itk_option(-panel_orient)" == "vertical" } {
+-		blt::blttable $w_ $itk_component(object)  [incr row],0 -fill x -anchor e
++		blt::table $w_ $itk_component(object)  [incr row],0 -fill x -anchor e
+ 	    } else {
+-		blt::blttable $w_ $itk_component(object)  [incr row],0 -fill x -anchor e -columnspan 3
++		blt::table $w_ $itk_component(object)  [incr row],0 -fill x -anchor e -columnspan 3
+ 	    }
+ 
+ 	    add_short_help $itk_component(object) \
+@@ -151,12 +151,12 @@ itcl::class rtd::RtdImagePanel {
+ 		    -anchor e
+ 	    } 
+ 	    if { "$itk_option(-panel_orient)" == "vertical" } {
+-		blt::blttable $w_ \
++		blt::table $w_ \
+ 			$itk_component(x)       [incr row],0 -fill x -anchor w \
+ 			$itk_component(y)       [incr row],0 -fill x -anchor w \
+ 			$itk_component(value)   [incr row],0 -fill x -anchor w
+ 	    } else {
+-		blt::blttable $w_ \
++		blt::table $w_ \
+ 			$itk_component(x)       [incr row],0 -fill x -anchor w \
+ 			$itk_component(y)       $row,1 -fill x -anchor w \
+ 			$itk_component(value)   $row,2 -fill x -anchor w
+@@ -214,12 +214,12 @@ itcl::class rtd::RtdImagePanel {
+ 		    -anchor e
+ 	    } 
+ 	    if { "$itk_option(-panel_orient)" == "vertical" } {
+-		blt::blttable $w_ \
++		blt::table $w_ \
+ 		    $itk_component(ra)      [incr row],0 -fill x -anchor w \
+ 		    $itk_component(dec)     [incr row],0 -fill x -anchor w \
+ 		    $itk_component(equinox) [incr row],0 -fill x -anchor w
+ 	    } else {
+-		blt::blttable $w_ \
++		blt::table $w_ \
+ 		    $itk_component(ra)      [incr row],0 -fill x -anchor w \
+ 		    $itk_component(dec)     $row,1 -fill x -anchor w \
+ 		    $itk_component(equinox) $row,2 -fill x -anchor w
+@@ -271,12 +271,12 @@ itcl::class rtd::RtdImagePanel {
+ 		    -anchor e
+ 	    } 
+ 	    if { "$itk_option(-panel_orient)" == "vertical" } {
+-		blt::blttable $w_ \
++		blt::table $w_ \
+ 			$itk_component(min)     [incr row],0 -fill x -anchor w \
+ 			$itk_component(max)     [incr row],0 -fill x -anchor w \
+ 			$itk_component(bitpix)  [incr row],0 -fill x -anchor w
+ 	    } else {
+-		blt::blttable $w_ \
++		blt::table $w_ \
+ 			$itk_component(min)     [incr row],0 -fill x -anchor w \
+ 			$itk_component(max)     $row,1 -fill x -anchor w \
+ 			$itk_component(bitpix)  $row,2 -fill x -anchor w
+@@ -320,12 +320,12 @@ itcl::class rtd::RtdImagePanel {
+ 		keep -state
+ 	    }
+ 	    if { "$itk_option(-panel_orient)" == "vertical" } {
+-		blt::blttable $w_ \
++		blt::table $w_ \
+ 			$itk_component(low)     [incr row],0 -fill x -anchor w \
+ 			$itk_component(high)    [incr row],0 -fill x -anchor w \
+ 			$itk_component(lrframe) [incr row],0 -fill x -anchor w
+ 	    } else {
+-		blt::blttable $w_ \
++		blt::table $w_ \
+ 			$itk_component(low)     [incr row],0 -fill x -anchor w \
+ 			$itk_component(high)    $row,1 -fill x -anchor w \
+ 			$itk_component(lrframe) $row,2 -fill x -anchor w
+@@ -355,7 +355,7 @@ itcl::class rtd::RtdImagePanel {
+ 	    } {
+ 		keep -state
+ 	    }
+-	    blt::blttable $w_ \
++	    blt::table $w_ \
+ 		$itk_component(trans)   [incr row],0 -fill x -anchor w -columnspan 2
+ 	}
+ 
+@@ -364,14 +364,14 @@ itcl::class rtd::RtdImagePanel {
+ 	    canvas $w_.status -height 0 -width 0
+ 	}
+ 	if { "$itk_option(-panel_orient)" == "vertical" } {
+-	    blt::blttable $w_ \
++	    blt::table $w_ \
+ 		    $itk_component(cameraStatus)  [incr row],0 -fill both -anchor nw
+ 	} else {
+-	    blt::blttable $w_ \
++	    blt::table $w_ \
+ 		    $itk_component(cameraStatus)  $row,2 -fill both -anchor nw
+ 	}
+ 
+-	blt::blttable configure $w_ c2 -padx 1m
++	blt::table configure $w_ c2 -padx 1m
+     }
+     
+     public method camSts { args } {
+diff --git a/rtd/library/RtdImagePick2.tcl b/rtd/library/RtdImagePick2.tcl
+index 0552382..e4bfbbb 100644
 --- a/rtd/library/RtdImagePick2.tcl
 +++ b/rtd/library/RtdImagePick2.tcl
 @@ -51,13 +51,13 @@
@@ -124,7 +312,7 @@ Description: Use standard BLT.
  #
  # NOTES
  # - In contrast to RtdImagePick, RtdImagePick2 does not use tkwait which may
-@@ -170,7 +170,7 @@
+@@ -170,7 +170,7 @@ itcl::class rtd::RtdImagePick2 {
  	}
  	eval $methd $itk_component($compo)
  	if { $map } {
@@ -133,7 +321,7 @@ Description: Use standard BLT.
  	}
      }
  
-@@ -197,7 +197,7 @@
+@@ -197,7 +197,7 @@ itcl::class rtd::RtdImagePick2 {
  	    [$wdg component entry] config -justify right -highlightthickness 0
  	    [$wdg component label] config -pady 0
  	}
@@ -142,7 +330,7 @@ Description: Use standard BLT.
      }
  
      # Create the widgets for displaying the statistics
-@@ -237,7 +237,7 @@
+@@ -237,7 +237,7 @@ itcl::class rtd::RtdImagePick2 {
  		    -factor        $itk_option(-zoomFact) \
  		    -command       [code $this zoomScaledCb]
  	}
@@ -151,7 +339,7 @@ Description: Use standard BLT.
      }
  
      # Add a button and add to blt table
-@@ -246,7 +246,7 @@
+@@ -246,7 +246,7 @@ itcl::class rtd::RtdImagePick2 {
  	itk_component add $compo {
  	    button $w.$compo -text $text -command $command
  	}
@@ -160,7 +348,7 @@ Description: Use standard BLT.
      }
  
      # Add an application specific button
-@@ -256,13 +256,13 @@
+@@ -256,13 +256,13 @@ itcl::class rtd::RtdImagePick2 {
  
  	if { "[cget -panel_orient]" == "horizontal" } {
  	    # add button and redo packing
@@ -176,7 +364,7 @@ Description: Use standard BLT.
  	    }
  	} else {
  	    add_button $w $compo $text 1,$idx $command
-@@ -312,7 +312,7 @@
+@@ -312,7 +312,7 @@ itcl::class rtd::RtdImagePick2 {
  		-entrycommand [code $this update_rect]
  	[$sldWdg component label] config -justify left
  
@@ -185,7 +373,7 @@ Description: Use standard BLT.
  		[$sldWdg component label]      0,0 -anchor w -fill x \
  		[$sldWdg component entry]      0,1 -anchor e \
  		[$sldWdg component scaleframe] 1,0 -fill x -columnspan 2 -padx 1m
-@@ -322,7 +322,7 @@
+@@ -322,7 +322,7 @@ itcl::class rtd::RtdImagePick2 {
  
      protected method make_sldframe { w } {
  	make_slider $w
@@ -194,7 +382,7 @@ Description: Use standard BLT.
      }
  
      # Create pick control frame
-@@ -370,13 +370,13 @@
+@@ -370,13 +370,13 @@ itcl::class rtd::RtdImagePick2 {
  	    label $zoomctrlf.label -text "" -width 3 -font $itk_option(-labelfont) 
  	}
  
@@ -210,9 +398,11 @@ Description: Use standard BLT.
  		$itk_component(rbChoice)  0,0 -fill both \
  		$itk_component(zoomctrlf) 0,1 -fill both
      }
+diff --git a/rtd/library/RtdImagePickView.tcl b/rtd/library/RtdImagePickView.tcl
+index af0f936..8bbd8cb 100644
 --- a/rtd/library/RtdImagePickView.tcl
 +++ b/rtd/library/RtdImagePickView.tcl
-@@ -46,7 +46,7 @@
+@@ -46,7 +46,7 @@ itcl::class rtd::RtdImagePickView {
  	catch {pack forget [$w_.image component hscrollf] \
  		[$w_.image component vscrollf]}
  
@@ -221,9 +411,11 @@ Description: Use standard BLT.
  		$itk_component(image) 0,0 -fill both
  	
  	set image_  [$itk_component(image) get_image]
+diff --git a/rtd/library/RtdImagePixTable.tcl b/rtd/library/RtdImagePixTable.tcl
+index f39762d..fb08945 100644
 --- a/rtd/library/RtdImagePixTable.tcl
 +++ b/rtd/library/RtdImagePixTable.tcl
-@@ -73,13 +73,13 @@
+@@ -73,13 +73,13 @@ itcl::class rtd::RtdImagePixTable {
  	    set f [frame $w_.tab]
  	}
  	pack $f -side top -fill both -expand 1
@@ -239,7 +431,7 @@ Description: Use standard BLT.
  		    [label $f.p$row,$col \
  			 -font $itk_option(-valuefont) \
  			 -borderwidth 1 \
-@@ -158,7 +158,7 @@
+@@ -158,7 +158,7 @@ itcl::class rtd::RtdImagePixTable {
  		    -valuewidth $itk_option(-valuewidth) \
  		    -relief groove \
  		    -anchor w}
@@ -248,9 +440,11 @@ Description: Use standard BLT.
  		$row,$col -fill both
  	    incr col
  	    if {$col >= $ncols} {
+diff --git a/rtd/library/RtdImagePrint.tcl b/rtd/library/RtdImagePrint.tcl
+index e46149a..6e6fbdf 100644
 --- a/rtd/library/RtdImagePrint.tcl
 +++ b/rtd/library/RtdImagePrint.tcl
-@@ -116,7 +116,7 @@
+@@ -116,7 +116,7 @@ itcl::class rtd::RtdImagePrint {
  	    -text "Page height" \
  	    -value $itk_option(-pageheight) \
  	    -valuewidth 6
@@ -259,9 +453,11 @@ Description: Use standard BLT.
  	    $w_.pagesize.fit      1,0 -anchor w \
  	    $w_.pagesize.footer   1,1 -anchor e \
  	    $w_.pagesize.width    2,0 -anchor w \
+diff --git a/rtd/library/RtdRecorder.tcl b/rtd/library/RtdRecorder.tcl
+index 96c290a..1b5f091 100644
 --- a/rtd/library/RtdRecorder.tcl
 +++ b/rtd/library/RtdRecorder.tcl
-@@ -260,21 +260,21 @@
+@@ -260,21 +260,21 @@ itcl::class rtd::RtdRecorderTool {
  
  	# do the packing
  
@@ -287,9 +483,26 @@ Description: Use standard BLT.
   	    $itk_component(play)        1,0 -anchor w -fill none \
   	    $itk_component(rewind)      1,1 -anchor w -fill none \
   	    $itk_component(ff)          1,2 -anchor w -fill none \
+diff --git a/tclutil/aclocal.m4 b/tclutil/aclocal.m4
+index db2ea8b..1c2371d 100644
+--- a/tclutil/aclocal.m4
++++ b/tclutil/aclocal.m4
+@@ -26,8 +26,8 @@ AC_DEFUN(TCLUTIL_PATH_BLT, [
+        [AC_HELP_STRING([--with-blt=DIR],[link with BLT library installed in DIR])],
+        BLT_LIB_DIR=$withval)
+ 
+-    BLT_LIBNAME=libBLT25${SHLIB_SUFFIX}
+-    BLT_LIBFLAG="-lBLT25"
++    BLT_LIBNAME=libBLT${SHLIB_SUFFIX}
++    BLT_LIBFLAG="-lBLT"
+ 
+     if test -z "$BLT_LIB_DIR" ; then
+ 	# If --with-blt=dir was not specified, try the Tcl lib dir and the exec-prefix/lib dir
+diff --git a/tclutil/library/Batch.tcl b/tclutil/library/Batch.tcl
+index 31a734f..5798aa7 100644
 --- a/tclutil/library/Batch.tcl
 +++ b/tclutil/library/Batch.tcl
-@@ -98,10 +98,7 @@
+@@ -98,10 +98,7 @@ itcl::class util::Batch {
  	    puts $wfd $status
  	    flush $wfd
  	    close $wfd
@@ -301,9 +514,11 @@ Description: Use standard BLT.
  	} else {
  	    set bg_pid_ $pid
  	    fileevent $rfd readable [code $this read_pipe $rfd $wfd]
+diff --git a/tclutil/library/CanvasDraw.tcl b/tclutil/library/CanvasDraw.tcl
+index e513c43..5944b47 100644
 --- a/tclutil/library/CanvasDraw.tcl
 +++ b/tclutil/library/CanvasDraw.tcl
-@@ -322,7 +322,7 @@
+@@ -322,7 +322,7 @@ itcl::class util::CanvasDraw {
  			   -command [code $this set_drawing_mode $drawing_mode]]
  	    }
  	    add_short_help $b "set the drawing mode to $drawing_mode"
@@ -312,9 +527,11 @@ Description: Use standard BLT.
  		-fill x -ipadx 1m -ipady 1m
  	    if {$col < $maxcol} {
  		incr col
+diff --git a/tclutil/library/EntryForm.tcl b/tclutil/library/EntryForm.tcl
+index 5e3dc0f..f307dc2 100644
 --- a/tclutil/library/EntryForm.tcl
 +++ b/tclutil/library/EntryForm.tcl
-@@ -79,10 +79,10 @@
+@@ -79,10 +79,10 @@ itcl::class util::EntryForm {
  		    -padx 1m -pady 1m -ipadx 1m -ipady 1m
  	}
  
@@ -327,7 +544,7 @@ Description: Use standard BLT.
  		[label $f.label$row -text $label] \
  		$row,0 -anchor e \
  		[set entries_($label) [entry $f.entry$row -relief sunken]] \
-@@ -93,9 +93,9 @@
+@@ -93,9 +93,9 @@ itcl::class util::EntryForm {
  
  	    incr row
  	}
@@ -340,9 +557,11 @@ Description: Use standard BLT.
  
  	wm title $w_ {Entry Form}
  	set initialized_ 1
+diff --git a/tclutil/library/GraphPrint.tcl b/tclutil/library/GraphPrint.tcl
+index bce0e71..e7808a4 100644
 --- a/tclutil/library/GraphPrint.tcl
 +++ b/tclutil/library/GraphPrint.tcl
-@@ -35,13 +35,18 @@
+@@ -35,13 +35,18 @@ itcl::class util::GraphPrint {
          } else {
             set fit no
          }
@@ -362,9 +581,11 @@ Description: Use standard BLT.
  		-paperwidth [$w_.pagesize.width get] \
  		-paperheight [$w_.pagesize.height get] \
  		-landscape [set $w_.rotate] \
+diff --git a/tclutil/library/LabelCheck.tcl b/tclutil/library/LabelCheck.tcl
+index ea77115..d05f4ab 100644
 --- a/tclutil/library/LabelCheck.tcl
 +++ b/tclutil/library/LabelCheck.tcl
-@@ -27,7 +27,7 @@
+@@ -27,7 +27,7 @@ itcl::class util::LabelCheck {
  	    keep -background -relief -borderwidth
  	}
  
@@ -373,7 +594,7 @@ Description: Use standard BLT.
   	eval itk_initialize $args
      }
  
-@@ -87,7 +87,7 @@
+@@ -87,7 +87,7 @@ itcl::class util::LabelCheck {
  		    rename -font -valuefont valueFont Font
  		    rename -width -valuewidth valueWidth Width
  		}
@@ -382,9 +603,11 @@ Description: Use standard BLT.
  		if {[incr i] == $n} {
  		    break
  		}
+diff --git a/tclutil/library/LabelChoice.tcl b/tclutil/library/LabelChoice.tcl
+index a6e68d6..ee2beda 100644
 --- a/tclutil/library/LabelChoice.tcl
 +++ b/tclutil/library/LabelChoice.tcl
-@@ -27,7 +27,7 @@
+@@ -27,7 +27,7 @@ itcl::class util::LabelChoice {
  	    keep -background -relief -borderwidth
  	}
  
@@ -393,7 +616,7 @@ Description: Use standard BLT.
   	eval itk_initialize $args
      }
  
-@@ -87,7 +87,7 @@
+@@ -87,7 +87,7 @@ itcl::class util::LabelChoice {
  		    rename -font -valuefont valueFont Font
  		    rename -width -valuewidth valueWidth Width
  		}
@@ -402,167 +625,3 @@ Description: Use standard BLT.
  		if {[incr i] == $n} {
  		    break
  		}
---- a/rtd/library/RtdImagePanel.tcl
-+++ b/rtd/library/RtdImagePanel.tcl
-@@ -56,7 +56,7 @@
-     # do the widget layout, aligning the items in rows and colums
- 
-     protected method make_layout {} {
--	blt::blttable $w_
-+	blt::table $w_
- 	add_short_help $w_ {Image information area}
- 
- 	# frame at the lower right of the panel that optionally
-@@ -102,9 +102,9 @@
- 		    -relief groove
- 	    } 
- 	    if { "$itk_option(-panel_orient)" == "vertical" } {
--		blt::blttable $w_ $itk_component(object)  [incr row],0 -fill x -anchor e
-+		blt::table $w_ $itk_component(object)  [incr row],0 -fill x -anchor e
- 	    } else {
--		blt::blttable $w_ $itk_component(object)  [incr row],0 -fill x -anchor e -columnspan 3
-+		blt::table $w_ $itk_component(object)  [incr row],0 -fill x -anchor e -columnspan 3
- 	    }
- 
- 	    add_short_help $itk_component(object) \
-@@ -151,12 +151,12 @@
- 		    -anchor e
- 	    } 
- 	    if { "$itk_option(-panel_orient)" == "vertical" } {
--		blt::blttable $w_ \
-+		blt::table $w_ \
- 			$itk_component(x)       [incr row],0 -fill x -anchor w \
- 			$itk_component(y)       [incr row],0 -fill x -anchor w \
- 			$itk_component(value)   [incr row],0 -fill x -anchor w
- 	    } else {
--		blt::blttable $w_ \
-+		blt::table $w_ \
- 			$itk_component(x)       [incr row],0 -fill x -anchor w \
- 			$itk_component(y)       $row,1 -fill x -anchor w \
- 			$itk_component(value)   $row,2 -fill x -anchor w
-@@ -214,12 +214,12 @@
- 		    -anchor e
- 	    } 
- 	    if { "$itk_option(-panel_orient)" == "vertical" } {
--		blt::blttable $w_ \
-+		blt::table $w_ \
- 		    $itk_component(ra)      [incr row],0 -fill x -anchor w \
- 		    $itk_component(dec)     [incr row],0 -fill x -anchor w \
- 		    $itk_component(equinox) [incr row],0 -fill x -anchor w
- 	    } else {
--		blt::blttable $w_ \
-+		blt::table $w_ \
- 		    $itk_component(ra)      [incr row],0 -fill x -anchor w \
- 		    $itk_component(dec)     $row,1 -fill x -anchor w \
- 		    $itk_component(equinox) $row,2 -fill x -anchor w
-@@ -271,12 +271,12 @@
- 		    -anchor e
- 	    } 
- 	    if { "$itk_option(-panel_orient)" == "vertical" } {
--		blt::blttable $w_ \
-+		blt::table $w_ \
- 			$itk_component(min)     [incr row],0 -fill x -anchor w \
- 			$itk_component(max)     [incr row],0 -fill x -anchor w \
- 			$itk_component(bitpix)  [incr row],0 -fill x -anchor w
- 	    } else {
--		blt::blttable $w_ \
-+		blt::table $w_ \
- 			$itk_component(min)     [incr row],0 -fill x -anchor w \
- 			$itk_component(max)     $row,1 -fill x -anchor w \
- 			$itk_component(bitpix)  $row,2 -fill x -anchor w
-@@ -320,12 +320,12 @@
- 		keep -state
- 	    }
- 	    if { "$itk_option(-panel_orient)" == "vertical" } {
--		blt::blttable $w_ \
-+		blt::table $w_ \
- 			$itk_component(low)     [incr row],0 -fill x -anchor w \
- 			$itk_component(high)    [incr row],0 -fill x -anchor w \
- 			$itk_component(lrframe) [incr row],0 -fill x -anchor w
- 	    } else {
--		blt::blttable $w_ \
-+		blt::table $w_ \
- 			$itk_component(low)     [incr row],0 -fill x -anchor w \
- 			$itk_component(high)    $row,1 -fill x -anchor w \
- 			$itk_component(lrframe) $row,2 -fill x -anchor w
-@@ -355,7 +355,7 @@
- 	    } {
- 		keep -state
- 	    }
--	    blt::blttable $w_ \
-+	    blt::table $w_ \
- 		$itk_component(trans)   [incr row],0 -fill x -anchor w -columnspan 2
- 	}
- 
-@@ -364,14 +364,14 @@
- 	    canvas $w_.status -height 0 -width 0
- 	}
- 	if { "$itk_option(-panel_orient)" == "vertical" } {
--	    blt::blttable $w_ \
-+	    blt::table $w_ \
- 		    $itk_component(cameraStatus)  [incr row],0 -fill both -anchor nw
- 	} else {
--	    blt::blttable $w_ \
-+	    blt::table $w_ \
- 		    $itk_component(cameraStatus)  $row,2 -fill both -anchor nw
- 	}
- 
--	blt::blttable configure $w_ c2 -padx 1m
-+	blt::table configure $w_ c2 -padx 1m
-     }
-     
-     public method camSts { args } {
---- a/rtd/library/RtdImageBias.tcl
-+++ b/rtd/library/RtdImageBias.tcl
-@@ -110,7 +110,7 @@
-                 -command [code $this onOff]
-         } { keep -state }
- 
--        blt::blttable $itk_component(bias) \
-+        blt::table $itk_component(bias) \
-             $itk_component(onoff)         0,0 -pady 3 \
-             $itk_component(copy)          0,1 -pady 3
- 
-@@ -121,12 +121,12 @@
- 		label $w_.label$comp \
- 			-anchor c
- 	    }
--	    blt::blttable $itk_component(status) \
-+	    blt::table $itk_component(status) \
- 		    $itk_component(label$comp)      0,$i
--	    blt::blttable configure $itk_component(status) c$i -resize none
-+	    blt::table configure $itk_component(status) c$i -resize none
- 	    incr i
- 	}
--	blt::blttable configure $itk_component(status) c5 -resize expand
-+	blt::table configure $itk_component(status) c5 -resize expand
- 
- 	foreach el "Load Copy Clear" {
- 	    set s [string tolower $el]
-@@ -205,7 +205,7 @@
- 	    }
-             $itk_component(filename$i) component entry config -highlightthickness 0 -takefocus 0
- 
--	    blt::blttable $itk_component(status) \
-+	    blt::table $itk_component(status) \
- 		    $itk_component(labelnr$i)     $n,0 \
- 		    $itk_component(select$i)      $n,1 \
- 		    $itk_component(choose$i)      $n,2 \
-@@ -244,7 +244,7 @@
-                     -command [code $this auto_set_cut_levels]       
- 	}
- 
--        blt::blttable $itk_component(cuts) \
-+        blt::table $itk_component(cuts) \
- 		$itk_component(labelcut)     0,0 -columnspan 3 -pady 4 \
- 		$itk_component(low)          1,0 -anchor w -ipady 3 -pady 2 \
- 		$itk_component(high)         1,1 -anchor w -ipady 3 -pady 2 \
-@@ -257,7 +257,7 @@
- 		    -command [code $this close]
- 	}
- 
--        blt::blttable $itk_component(buttons) \
-+        blt::table $itk_component(buttons) \
-             $itk_component(close)        0,0 -pady 3
- 
-     }
diff --git a/debian/patches/use_wcstools.patch b/debian/patches/Use-the-system-libwcstools-instead-of-the-convienience-co.patch
similarity index 73%
rename from debian/patches/use_wcstools.patch
rename to debian/patches/Use-the-system-libwcstools-instead-of-the-convienience-co.patch
index 5096fee..39833e2 100644
--- a/debian/patches/use_wcstools.patch
+++ b/debian/patches/Use-the-system-libwcstools-instead-of-the-convienience-co.patch
@@ -1,8 +1,16 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Use the system libwcstools instead of the convienience copy
+From: Ole Streicher <debian at liska.ath.cx>
+Date: Sat, 5 Aug 2017 11:30:42 +0200
+Subject: Use the system libwcstools instead of the convienience copy
+
+---
+ astrotcl/configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/astrotcl/configure.in b/astrotcl/configure.in
+index 99bef60..8dbc12d 100644
 --- a/astrotcl/configure.in
 +++ b/astrotcl/configure.in
-@@ -83,16 +83,16 @@
+@@ -83,16 +83,16 @@ ASTROTCL_CONFIG
  #-----------------------------------------------------------------------
  
  changequote(<<, >>)
diff --git a/debian/patches/series b/debian/patches/series
index ea52214..3b6e8b6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,9 +1,9 @@
-fix_build_problems.patch
-use_std_blt.patch
-fhs.patch
-use_wcstools.patch
-nonlinux.patch
-remove_tclx.patch
-iqefunc_from_midas.patch
-workaround_bias_crash.patch
-use_stubs.patch
+Fix-build-problems.patch
+Use-standard-BLT.patch
+Change-the-paths-so-that-they-correspond-to-the-FHS.patch
+Use-the-system-libwcstools-instead-of-the-convienience-co.patch
+Configure-shared-libs-for-hurd-i386-and-kfreeBSD-correctl.patch
+Remove-Tclx-dependency.patch
+Replace-iqefunc.c-with-a-version-that-does-not-need-NR-co.patch
+Remove-lines-that-lead-to-crash-with-ImageBias.patch
+Use-Tcl-Tk-stubs.patch
diff --git a/debian/patches/workaround_bias_crash.patch b/debian/patches/workaround_bias_crash.patch
deleted file mode 100644
index 465f67d..0000000
--- a/debian/patches/workaround_bias_crash.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Author: Ole Streicher <olebole at debian.org>
-Description: Remove lines that lead to crash with ImageBias
- This is a *very* pragmatic workaround: it is unclear why the crash happens
---- a/rtd/library/RtdImageBias.tcl
-+++ b/rtd/library/RtdImageBias.tcl
-@@ -134,12 +134,6 @@
- 	}
- 	blt::table configure $itk_component(status) c5 -resize expand
- 
--	foreach el "Load Copy Clear" {
--	    set s [string tolower $el]
--	    catch {bitmap compose $s $el -rotate 90.0 -font $itk_option(-valuefont)}
--	    $itk_component(label$s) config -bitmap $s -anchor w
--	}
--
- 	for {set i 0} {$i < $maxbias_} {incr i} {
- 	    set n [expr {$i+1}]
- 

-- 
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