[med-svn] [amide] 03/04: install help files

Gert Wollny gewo at moszumanska.debian.org
Sun Sep 24 15:50:56 UTC 2017


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

gewo pushed a commit to branch master
in repository amide.

commit 3e80a7d09bd90c62bb24b1c8b8c70267afe6a0e6
Author: Gert Wollny <gewo at debian.org>
Date:   Sun Sep 24 12:39:58 2017 +0000

    install help files
---
 debian/changelog                                  |   2 +-
 debian/control                                    |   1 +
 debian/patches/remove-autdated-gnome-macros.patch | 107 +++++++++++++++++++++-
 debian/rules                                      |   1 +
 4 files changed, 106 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 59787a8..898dfaa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-amide (1.0.5-9) UNRELEASED; urgency=medium
+amide (1.0.5-8) unstable; urgency=medium
 
   [ Gert Wollny ]
   * remove autdated gnome macros and switch to yelp 
diff --git a/debian/control b/debian/control
index b05b6ae..3c7c58d 100644
--- a/debian/control
+++ b/debian/control
@@ -32,6 +32,7 @@ Package: amide
 Architecture: any
 Depends: ${shlibs:Depends},
          ${misc:Depends}
+Suggests: yelp
 Description: software for Medical Imaging
  AMIDE: (Amide's a Medical Imaging Data Examiner)
  AMIDE is a tool for viewing and analyzing medical image data sets.
diff --git a/debian/patches/remove-autdated-gnome-macros.patch b/debian/patches/remove-autdated-gnome-macros.patch
index 8730402..e97d61d 100644
--- a/debian/patches/remove-autdated-gnome-macros.patch
+++ b/debian/patches/remove-autdated-gnome-macros.patch
@@ -58,20 +58,19 @@ Description: Remove use of deprecated gnome-common macros/variables
  	etc \
 --- a/help/Makefile.am
 +++ b/help/Makefile.am
-@@ -1,15 +1,16 @@
+@@ -1,15 +1,15 @@
  ## Process this file with automake to produce Makefile.in.
  
 -include $(top_srcdir)/gnome-doc-utils.make
+-dist-hook: doc-dist-hook
 + at YELP_HELP_RULES@
-+
- dist-hook: doc-dist-hook
  
 -DOC_MODULE = amide
 -DOC_ENTITIES = legal.xml
 -DOC_INCLUDES =
 -DOC_FIGURES = \
 +HELP_ID = amide
-+HELP_FILES = legal.xml
++HELP_FILES = legal.xml index.docbook
 +HELP_EXTRA =
 +HELP_MEDIA = \
  	figures/amide_main_window.png \
@@ -81,3 +80,103 @@ Description: Remove use of deprecated gnome-common macros/variables
 +HELP_LINGUAS = es
  
  DISTCLEANFILES = *~ */*~
++
+--- a/src/amide_gnome.c
++++ b/src/amide_gnome.c
+@@ -297,7 +297,7 @@
+   i=0;
+   j=0;
+   while (dirs[i] != NULL) {
+-    buf = g_strdup_printf ("%s%s%s%s%s%s%s", dirs[i], G_DIR_SEPARATOR_S,"gnome",G_DIR_SEPARATOR_S, "help", G_DIR_SEPARATOR_S,file_name);
++    buf = g_strdup_printf ("%s%s%s%s%s", dirs[i], G_DIR_SEPARATOR_S, "help", G_DIR_SEPARATOR_S,file_name);
+     
+     if (!only_if_exists || g_file_test (buf, G_FILE_TEST_EXISTS)) {
+       retvals[j] = buf;
+@@ -336,79 +336,17 @@
+ 
+ gboolean amide_gnome_help_display (const char *file_name, const char *link_id, GError **error) {
+ 
+-  gchar ** help_paths;
+-  gchar *file=NULL;
+-  struct stat help_st;
++  gboolean success; 
+   gchar *uri=NULL;
+-  gboolean retval;
+-  const char    *doc_id = PACKAGE;
+-  gint i;
+-  gchar * temp_str=NULL;
+-  
+-  g_return_val_if_fail (file_name != NULL, FALSE);
+-  
+-  retval = FALSE;
+-  
+-  help_paths = amide_gnome_program_locate_help_file (doc_id,FALSE);
+-  
+-  if (help_paths == NULL) {
+-    g_set_error (error, AMIDE_GNOME_HELP_ERROR, AMIDE_GNOME_HELP_ERROR_INTERNAL,
+-		 _("Unable to find the app or global HELP domain"));
+-    goto out;
+-  }
+-  
+-  /* Try to access the help paths, first the app-specific help path
+-   * and then falling back to the global help path if the first one fails.
+-   */
+-  
+-  i=0;
+-  while ((help_paths[i] != NULL) && (file == NULL)) {
+-    if (g_stat (help_paths[i], &help_st) == 0) {
+-      if (!S_ISDIR (help_st.st_mode)) 
+-	goto error;
+-      file = locate_help_file (help_paths[i], file_name);
+-    }
+-    i++;
+-  }
+-  if (file == NULL) goto error;
+-
+-  /* Now that we have a file name, try to display it in the help browser */
+-  if (link_id)
+-    uri = g_strconcat ("ghelp://", file, "?", link_id, NULL);
+-  else
+-    uri = g_strconcat ("ghelp://", file, NULL);
+-  
+-  retval = amide_gnome_help_display_uri_with_env (uri, NULL, error);
+ 
+-  goto out;
+-
+- error:
+-  
+-  i=0;
+-  while (help_paths[i] != NULL) {
+-    amitk_append_str(&temp_str, "%s;", help_paths[i]);
+-    i++;
++  if (link_id)  {
++    uri = g_strconcat ("yelp help:amide/", link_id, NULL);
++    success = g_spawn_command_line_async (uri, error);
++  } else {
++    success = g_spawn_command_line_async ("yelp help:amide", error);
+   }
+-  g_set_error (error, AMIDE_GNOME_HELP_ERROR, AMIDE_GNOME_HELP_ERROR_NOT_FOUND,
+-	       _("Unable to find the help files in any of the following directories, "
+-                 " or these are not valid directories: %s "
+-		 ":  Please check your installation"),
+-	       temp_str);
+-  g_free(temp_str);
+-
+- out:
+-  if (help_paths != NULL) {
+-    i=0;
+-    while (help_paths[i] != NULL) {
+-      g_free(help_paths[i]);
+-      i++;
+-    }
+-    g_free(help_paths);
+-  }
+-  if (file != NULL) g_free (file);
+-  if (uri != NULL) g_free (uri);
+-
+-  return retval;
++ 
++  return success;
+ }
+ 
+ 
diff --git a/debian/rules b/debian/rules
index 5795e55..4edad0a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,7 @@ export ACLOCAL = aclocal -I m4
 	dh $@ --no-parallel
 
 override_dh_auto_configure:
+	mv help/C/amide.xml help/C/index.docbook
 	dh_auto_configure -- \
 		--disable-amide-debug \
 		--config-cache \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/amide.git



More information about the debian-med-commit mailing list