diff -Naur insight-6.8.orig/gdb/gdbtk/generic/gdbtk.c insight-6.8.new/gdb/gdbtk/generic/gdbtk.c --- insight-6.8.orig/gdb/gdbtk/generic/gdbtk.c 2008-08-19 20:23:44.000000000 +0200 +++ insight-6.8.new/gdb/gdbtk/generic/gdbtk.c 2008-08-19 20:44:08.000000000 +0200 @@ -514,7 +514,7 @@ { static char set_gdbtk_library_script[] = "\ if {![info exists env(GDBTK_LIBRARY)]} {\n\ - set env(GDBTK_LIBRARY) [file join [file dirname [file dirname $Paths(guidir)]] insight1.0]\n\ + set env(GDBTK_LIBRARY) [file join [file dirname [file dirname $Paths(guidir)]] insight]\n\ }\n"; command_obj = Tcl_NewStringObj (set_gdbtk_library_script, -1); @@ -600,7 +600,7 @@ proc gdbtk_find_main {} {\n\ global Paths GDBTK_LIBRARY\n\ rename gdbtk_find_main {}\n\ - tcl_findLibrary insight 1.0 {} main.tcl GDBTK_LIBRARY GDBTKLIBRARY\n\ + tcl_findLibrary insight {} {} main.tcl GDBTK_LIBRARY GDBTKLIBRARY\n\ set Paths(appdir) $GDBTK_LIBRARY\n\ }\n\ gdbtk_find_main"; @@ -616,7 +616,7 @@ } else {\n\ set debug_startup 0\n\ }\n\ - tcl_findLibrary insight 1.0 {} main.tcl GDBTK_LIBRARY GDBTK_LIBRARY\n\ + tcl_findLibrary insight {} {} main.tcl GDBTK_LIBRARY GDBTK_LIBRARY\n\ set Paths(appdir) $GDBTK_LIBRARY\n\ }\n\ gdbtk_find_main"; diff -Naur insight-6.8.orig/gdb/gdbtk/library/main.tcl insight-6.8.new/gdb/gdbtk/library/main.tcl --- insight-6.8.orig/gdb/gdbtk/library/main.tcl 2008-08-19 20:23:44.000000000 +0200 +++ insight-6.8.new/gdb/gdbtk/library/main.tcl 2008-08-19 21:15:56.000000000 +0200 @@ -38,9 +38,15 @@ lappend auto_path $GDBTK_LIBRARY } - # Add default plugins directory, which will be [name of exe]/../../lib/insight1.0 + # Add default plugins directory, which will be [name of exe]/../../lib/insight set exename [info nameofexecutable] - set dir [file join [file dirname [file dirname $exename]] lib insight1.0] + set dir [file join [file dirname [file dirname $exename]] lib insight] + if {[file exists $dir]} { + lappend gdb_plugins $dir + lappend auto_path $dir + } + # Add extra plugins directory, which will be [name of exe]/../../share/insight + set dir [file join [file dirname [file dirname $exename]] share insight] if {[file exists $dir]} { lappend gdb_plugins $dir lappend auto_path $dir diff -Naur insight-6.8.orig/gdb/gdbtk/plugins/HOW-TO insight-6.8.new/gdb/gdbtk/plugins/HOW-TO --- insight-6.8.orig/gdb/gdbtk/plugins/HOW-TO 2002-08-14 20:06:06.000000000 +0200 +++ insight-6.8.new/gdb/gdbtk/plugins/HOW-TO 2008-08-19 19:55:08.000000000 +0200 @@ -81,7 +81,7 @@ be loaded. ** FIXME: don't need to create the directory -- install will do it ** -i) First, locate the $(EXEC-PREFIX)/lib/insight1.0 directory. This is the +i) First, locate the $(EXEC-PREFIX)/lib/insight directory. This is the directory which contains the plug-in code used by Insight. Create a this directory if it does not exist yet (i.e., if your plug-in is the first to be installed). @@ -92,7 +92,7 @@ auto_mkindex to create it. For instance, in the sample case we would have: - $(EXEC-PREFIX)/lib/insight1.0/rhabout + $(EXEC-PREFIX)/lib/insight/rhabout ** FIXME: this shows unix. show cygwin, too. ** and it would contain: @@ -133,7 +133,7 @@ ** FIXME: install will do this, too. ALL plugins should be mentioned in the global plugins.tcl file ** v) Create/append the file "plugins.tcl" in the plugins directory -($(EXEC-PREFIX/lib/insight1.0) if it does not yet exist. This is a file +($(EXEC-PREFIX/lib/insight) if it does not yet exist. This is a file shared by all plug-ins so make sure your install script does not overwrite, but append to it. diff -Naur insight-6.8.orig/gdb/gdbtk/plugins/Make-rules insight-6.8.new/gdb/gdbtk/plugins/Make-rules --- insight-6.8.orig/gdb/gdbtk/plugins/Make-rules 2008-08-19 20:23:44.000000000 +0200 +++ insight-6.8.new/gdb/gdbtk/plugins/Make-rules 2008-08-19 19:55:44.000000000 +0200 @@ -104,12 +104,12 @@ install: $(INSTALL_TARGET) install-generic: - $(mkinstalldirs) $(libdir)/insight1.0/$(PLUGIN) + $(mkinstalldirs) $(libdir)/insight/$(PLUGIN) for i in $(ALL_INSTALL); do \ - $(INSTALL_DATA) $$i $(libdir)/insight1.0/$(PLUGIN)/$$i ; \ + $(INSTALL_DATA) $$i $(libdir)/insight/$(PLUGIN)/$$i ; \ done ; for i in pkgIndex.tcl tclIndex $(PLUGIN_INSTALL_SRCDIR) ; do \ - $(INSTALL_DATA) $(srcdir)/$$i $(libdir)/insight1.0/$(PLUGIN)/$$i ; \ + $(INSTALL_DATA) $(srcdir)/$$i $(libdir)/insight/$(PLUGIN)/$$i ; \ done ; html: diff -Naur insight-6.8.orig/gdb/gdbtk/README insight-6.8.new/gdb/gdbtk/README --- insight-6.8.orig/gdb/gdbtk/README 2008-03-28 17:46:16.000000000 +0100 +++ insight-6.8.new/gdb/gdbtk/README 2008-08-19 19:54:25.000000000 +0200 @@ -123,7 +123,7 @@ To make more serious changes to the interface, such as adding a new window or changing the framework, you will have to hack the tcl code (and probably the C code as well). The tcl library install directory is $(libdir) (probably -/usr/local/lib/insight1.0). But, you will probably want to hack on your own +/usr/local/lib/insight). But, you will probably want to hack on your own private copy before putting it up for the rest of the users. To find the GDB tcl code, GDB first checks for the environment variable GDBTK_LIBRARY. GDB will check this directory for the file "main.tcl". If GDBTK_LIBRARY is not set, GDB will diff -Naur insight-6.8.orig/gdb/Makefile.in insight-6.8.new/gdb/Makefile.in --- insight-6.8.orig/gdb/Makefile.in 2008-03-17 13:15:08.000000000 +0100 +++ insight-6.8.new/gdb/Makefile.in 2008-08-19 21:17:52.000000000 +0200 @@ -301,7 +301,7 @@ # The version of gdbtk we're building. This should be kept # in sync with GDBTK_VERSION and friends in gdbtk.h. GDBTK_VERSION = 1.0 -GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION) +GDBTK_LIBRARY = $(datadir)/insight # Gdbtk requires an absolute path to the source directory or # the testsuite won't run properly. @@ -3053,10 +3053,11 @@ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ $(SHELL) $(srcdir)/../mkinstalldirs \ $(DESTDIR)$(GDBTK_LIBRARY) ; \ + # Use alternate directory. $(SHELL) $(srcdir)/../mkinstalldirs \ - $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \ + $(DESTDIR)$(datadir)/insight ; \ $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \ - $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \ + $(DESTDIR)$(datadir)/insight/plugins.tcl ; \ $(SHELL) $(srcdir)/../mkinstalldirs \ $(DESTDIR)$(GDBTK_LIBRARY)/images \ $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \ diff -Naur insight-6.8.orig/libgui/library/Makefile.am insight-6.8.new/libgui/library/Makefile.am --- insight-6.8.orig/libgui/library/Makefile.am 2008-08-19 20:23:44.000000000 +0200 +++ insight-6.8.new/libgui/library/Makefile.am 2008-08-19 19:52:49.000000000 +0200 @@ -14,7 +14,7 @@ PACKAGES = combobox.tcl ## This directory is also referenced in paths.c, which see. -guidir = $(datadir)/redhat/gui +guidir = $(datadir)/insight/gui gui_DATA = tclIndex pkgIndex.tcl $(TCL) $(PACKAGES) diff -Naur insight-6.8.orig/libgui/src/Makefile.am insight-6.8.new/libgui/src/Makefile.am --- insight-6.8.orig/libgui/src/Makefile.am 2008-08-19 20:23:44.000000000 +0200 +++ insight-6.8.new/libgui/src/Makefile.am 2008-08-19 19:52:10.000000000 +0200 @@ -12,7 +12,7 @@ endif datadir = @datadir@ -guidir = $(datadir)/redhat/gui +guidir = $(datadir)/insight/gui # tkTable version info include $(srcdir)/tkTable_version.in diff -Naur insight-6.8.orig/libgui/src/paths.c insight-6.8.new/libgui/src/paths.c --- insight-6.8.orig/libgui/src/paths.c 2008-08-19 20:23:44.000000000 +0200 +++ insight-6.8.new/libgui/src/paths.c 2008-08-19 19:51:54.000000000 +0200 @@ -13,13 +13,13 @@ We first look for the gui library. This can be set by the REDHAT_GUI_LIBRARY environment variable. Otherwise, it is named - gui, and is found in $prefix/share/redhat, where $prefix is + gui, and is found in $prefix/share/insight, where $prefix is determined by looking at the directory where the running executable is installed. We then look for the ide library. This can be set by the REDHAT_IDE_LIBRARY environment variable. Otherwise, it is named - ide, and is also found in $prefix/share/redhat. + ide, and is also found in $prefix/share/insight. It is OK if only one of these libraries exist. If neither exists, we report an error. @@ -36,7 +36,7 @@ bitmapdir -- see below Paths(appdir) is set based on the ide_initialize_paths APPNAME - parameter. If a directory $prefix/share/redhat/APPNAME exists, we + parameter. If a directory $prefix/share/insight/APPNAME exists, we set Paths(appdir) to it. More precisely, we set Paths(appdir) if an APPNAME directory exists which is a sibling directory of the gui or ide directory. For convenience of some tools, we also check for @@ -69,13 +69,13 @@ # Handle build with --exec-prefix and build without.\n\ set d [file join [file dirname [pwd]] usr share]\n\ lappend prefdirs $d\n\ - lappend guidirs [file join $d redhat gui]\n\ + lappend guidirs [file join $d insight gui]\n\ set d [file join [file dirname [pwd]] share]\n\ lappend prefdirs $d\n\ - lappend guidirs [file join $d redhat gui]\n\ + lappend guidirs [file join $d insight gui]\n\ set d [file join [file dirname [file dirname [pwd]]] share]\n\ lappend prefdirs $d\n\ - lappend guidirs [file join $d redhat gui]\n\ + lappend guidirs [file join $d insight gui]\n\ set Paths(bindir) [pwd]\n\ # Base `prefix' on where the `share' dir is found\n\ foreach sd $prefdirs {\n\ @@ -110,7 +110,7 @@ lappend idedirs $env(REDHAT_IDE_LIBRARY)\n\ }\n\ foreach d $prefdirs {\n\ - lappend idedirs [file join $d redhat ide]\n\ + lappend idedirs [file join $d insight ide]\n\ }\n\ # Try to handle running from the build tree:\n\ lappend idedirs [file join [file dirname [file dirname $::tcl_library]] libide library]\n\ @@ -180,9 +180,9 @@ set here [pwd]\n\ cd [file dirname [info nameofexecutable]]\n\ set d [file join [file dirname [pwd]] share]\n\ - lappend guidirs [file join $d redhat gui]\n\ + lappend guidirs [file join $d insight gui]\n\ set d [file join [file dirname [file dirname [pwd]]] share]\n\ - lappend guidirs [file join $d redhat gui]\n\ + lappend guidirs [file join $d insight gui]\n\ lappend guidirs [file join [file dirname [file dirname $tcl_library]] libgui library]\n\ foreach sd $guidirs {\n\ if {[file exists [file join $sd tclIndex]]} {\n\