[Debian-astro-commits] [saods9] 03/03: Remove DS9_HOME from scripts, and fix app name

Ole Streicher olebole at moszumanska.debian.org
Fri Jul 24 10:07:02 UTC 2015


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

olebole pushed a commit to branch experimental
in repository saods9.

commit 98c7614c9ccd177958b5fa9dbc023a70c9bf2f0a
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Thu Jul 23 10:02:33 2015 +0200

    Remove DS9_HOME from scripts, and fix app name
---
 debian/patches/ds9_fix_docdir.patch         |  8 +++----
 debian/patches/ds9_make_linux.patch         | 19 +++++++++++++++
 debian/patches/ds9_use_filesystem.patch     | 26 --------------------
 debian/patches/ds9_use_system_libs.patch    | 11 ++++-----
 debian/patches/ds9_use_tcltk_packages.patch | 37 ++++++++++++++++-------------
 debian/patches/series                       |  1 -
 6 files changed, 48 insertions(+), 54 deletions(-)

diff --git a/debian/patches/ds9_fix_docdir.patch b/debian/patches/ds9_fix_docdir.patch
index 183cf68..b378b4f 100644
--- a/debian/patches/ds9_fix_docdir.patch
+++ b/debian/patches/ds9_fix_docdir.patch
@@ -35,10 +35,10 @@ Description: Instead putting the documentation into the common shared
  }
 --- a/src/ds9.tcl
 +++ b/src/ds9.tcl
-@@ -203,6 +203,7 @@
- 	} else {
- 	    set ds9(root) "/usr/share/saods9"
- 	}
+@@ -198,6 +198,7 @@
+ 	# set to absolute path so that if -cd command is used,
+ 	# so we can still find our files
+ 	set ds9(root) [file normalize [file join [file dirname [info script]] ..]]
 +	set ds9(doc) "/usr/share/doc/saods9-doc"
  
  	package require msgcat
diff --git a/debian/patches/ds9_make_linux.patch b/debian/patches/ds9_make_linux.patch
index e952403..46d900f 100644
--- a/debian/patches/ds9_make_linux.patch
+++ b/debian/patches/ds9_make_linux.patch
@@ -31,3 +31,22 @@ Description: Set the compile flags according to the Debian environment. We
 +CCOPT	= ${CFLAGS} ${CPPFLAGS} ${OPTS} ${AA}
 +CCNOPT	= ${CFLAGS} ${CPPFLAGS} ${NOPTS} ${AA}
  
+--- a/ds9/Makefile.unix
++++ b/ds9/Makefile.unix
+@@ -1,7 +1,5 @@
+ #--------------------------defines
+ 
+-CFLAGS= $(CCOPT) -I. -I../include -I$(X11INCLUDE)
+-
+ MAINDIR	= ../$(TKDIR)/unix
+ MAIN	= tkAppInit
+ 
+@@ -63,8 +61,6 @@
+ 
+ ifneq (,$(findstring linux,$(ARCH)))
+ 
+-CXXFLAGS = $(CXXOPT) -I. -I../include -I$(X11INCLUDE)
+-
+ ds9	: ds9Base ds9.zip
+ 	$(RM) $@
+ 	strip ds9Base
diff --git a/debian/patches/ds9_use_filesystem.patch b/debian/patches/ds9_use_filesystem.patch
deleted file mode 100644
index 5a1c07f..0000000
--- a/debian/patches/ds9_use_filesystem.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Store all files in the usual FHS directories
- The original way was to build a zipfile and use a special tcl filesystem
- driver to access it.
- .
- Additionally, we introduce a new environment variable, "DS9_HOME" which
- points to the basedir of the tcl script. This allows relocation of
- ds9, which is used for testing.
---- a/src/ds9.tcl
-+++ b/src/ds9.tcl
-@@ -195,9 +195,14 @@
- 
- switch $ds9(wm) {
-     x11 {
-+	global env
- 	# set to absolute path so that if -cd command is used,
- 	# so we can still find our files
--	set ds9(root) [file normalize [file join [pwd] zvfsmntpt]]
-+	if { [info exists env(DS9_HOME) ] } {
-+	    set ds9(root) $env(DS9_HOME)
-+	} else {
-+	    set ds9(root) "/usr/share/saods9"
-+	}
- 
- 	if {![namespace exists msgcat]} {
- 	    source $ds9(root)/tcl8/8.5/msgcat-1.5.2.tm
diff --git a/debian/patches/ds9_use_system_libs.patch b/debian/patches/ds9_use_system_libs.patch
index d717f84..9bc28ce 100644
--- a/debian/patches/ds9_use_system_libs.patch
+++ b/debian/patches/ds9_use_system_libs.patch
@@ -4,9 +4,8 @@ Description: Link against system libraries.
  copies provided by ds9, and use tcl/tk packages wherever possible.
 --- a/ds9/Makefile.unix
 +++ b/ds9/Makefile.unix
-@@ -2,20 +2,13 @@
- 
- CFLAGS= $(CCOPT) -I. -I../include -I$(X11INCLUDE)
+@@ -1,19 +1,12 @@
+ #--------------------------defines
  
 -MAINDIR	= ../$(TKDIR)/unix
 +MAINDIR	= /usr/share/tcltk/tk$(shell . /usr/lib/tkConfig.sh ; echo $$TK_VERSION)
@@ -47,9 +46,9 @@ Description: Link against system libraries.
  
 --- a/src/ds9.tcl
 +++ b/src/ds9.tcl
-@@ -204,31 +204,33 @@
- 	    set ds9(root) "/usr/share/saods9"
- 	}
+@@ -199,31 +199,33 @@
+ 	# so we can still find our files
+ 	set ds9(root) [file normalize [file join [pwd] zvfsmntpt]]
  
 -	if {![namespace exists msgcat]} {
 -	    source $ds9(root)/tcl8/8.5/msgcat-1.5.2.tm
diff --git a/debian/patches/ds9_use_tcltk_packages.patch b/debian/patches/ds9_use_tcltk_packages.patch
index 294e5ab..135a459 100644
--- a/debian/patches/ds9_use_tcltk_packages.patch
+++ b/debian/patches/ds9_use_tcltk_packages.patch
@@ -4,15 +4,7 @@ Description: Don't load TclTk extensions as shared libs, but as packages.
  initialization.
 --- a/ds9/Makefile.unix
 +++ b/ds9/Makefile.unix
-@@ -1,7 +1,5 @@
- #--------------------------defines
- 
--CFLAGS= $(CCOPT) -I. -I../include -I$(X11INCLUDE)
--
- MAINDIR	= /usr/share/tcltk/tk$(shell . /usr/lib/tkConfig.sh ; echo $$TK_VERSION)
- MAIN	= tkAppInit
- 
-@@ -50,14 +48,12 @@
+@@ -48,7 +48,7 @@
  
  #--------------------------main
  
@@ -21,13 +13,6 @@ Description: Don't load TclTk extensions as shared libs, but as packages.
  
  #--------------------------linux
  
- ifneq (,$(findstring linux,$(ARCH)))
- 
--CXXFLAGS = $(CXXOPT) -I. -I../include -I$(X11INCLUDE)
--
- ds9	: ds9Base ds9.zip
- 	$(RM) $@
- 	strip ds9Base
 --- /dev/null
 +++ b/ds9/ds9
 @@ -0,0 +1,2 @@
@@ -35,7 +20,25 @@ Description: Don't load TclTk extensions as shared libs, but as packages.
 +exec wish8.6 -f ${DS9_HOME-/usr/share/saods9}/src/ds9.tcl $*
 --- a/src/ds9.tcl
 +++ b/src/ds9.tcl
-@@ -218,6 +218,11 @@
+@@ -166,7 +166,7 @@
+ }
+ 
+ # who are we?
+-set ds9(app) [file tail [info nameofexecutable]]
++set ds9(app) [file rootname [file tail [info script]]]
+ 
+ # Themes are now hardcoded
+ switch $ds9(wm) {
+@@ -197,7 +197,7 @@
+     x11 {
+ 	# set to absolute path so that if -cd command is used,
+ 	# so we can still find our files
+-	set ds9(root) [file normalize [file join [pwd] zvfsmntpt]]
++	set ds9(root) [file normalize [file join [file dirname [info script]] ..]]
+ 
+ 	package require msgcat
+ 	package require http
+@@ -213,6 +213,11 @@
  	package require tkcon
  	source $ds9(root)/src/xmlrpc.tcl
  	package require BLT
diff --git a/debian/patches/series b/debian/patches/series
index 4d75c42..d0a3463 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
 ds9_make_linux.patch
-ds9_use_filesystem.patch
 ds9_use_system_libs.patch
 ds9_use_tcltk_packages.patch
 ds9_support_blt.patch

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



More information about the Debian-astro-commits mailing list