File: remove-autdated-gnome-macros.patch

package info (click to toggle)
amide 1.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,548 kB
  • sloc: ansic: 51,606; cpp: 2,331; xml: 1,655; makefile: 652; sh: 121
file content (176 lines) | stat: -rw-r--r-- 4,820 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
Author: Gert Wollny <gw.fossdev@gmail.com>
Last-Update: 2016-07-14 11:17:55 +0200
Bug-Debian: https://bugs.debian.org/830051
Description: Switch to yelp help system to remove gnome-common dependency
 The patch replaces the creation installation of the applicationdocumentation
 to use the yelp and changes to code to call yelp directly.
 It also disables the unused gtk-doc completely.
--- amide.orig/amide-current/configure.ac
+++ amide/amide-current/configure.ac
@@ -459,7 +459,7 @@
 ################################################################
 
 dnl if we define --enable-gtk-doc, we build the library documentation
-GTK_DOC_CHECK([1.10])
+#GTK_DOC_CHECK([1.10])
 
 dnl the following is for the application documentation
 AC_ARG_ENABLE(doc,
@@ -477,11 +477,9 @@
 fi
 AM_CONDITIONAL(DISABLE_DOC, test ${enable_doc} = no)
 
-if test ${enable_doc} = yes; then
-   dnl building documentatin
-   GNOME_DOC_INIT
+YELP_HELP_INIT
 
-else
+if test x${enable_doc} = xno; then
   dnl not building documentation
   ENABLE_SK_TRUE="#"
   ENABLE_SK_FALSE=""  
@@ -502,9 +500,6 @@
 win32/Makefile
 macosx/Makefile
 macosx/amide.plist
-doc/Makefile
-doc/reference/Makefile
-doc/reference/version.xml
 help/Makefile
 etc/Makefile
 etc/amide-$VERSION-1.info:etc/amide.info.in
--- amide.orig/amide-current/Makefile.am
+++ amide/amide-current/Makefile.am
@@ -14,7 +14,6 @@
 	win32 \
 	macosx \
 	src \
-	doc \
 	man \
 	po \
 	etc \
--- amide.orig/amide-current/help/Makefile.am
+++ amide/amide-current/help/Makefile.am
@@ -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
+@YELP_HELP_RULES@
 
-DOC_MODULE = amide
-DOC_ENTITIES = legal.xml
-DOC_INCLUDES =
-DOC_FIGURES = \
+HELP_ID = amide
+HELP_FILES = legal.xml index.docbook
+HELP_EXTRA =
+HELP_MEDIA = \
 	figures/amide_main_window.png \
 	figures/study_tree.png
 
-DOC_LINGUAS = es
+HELP_LINGUAS = es
 
 DISTCLEANFILES = *~ */*~
+
--- amide.orig/amide-current/src/amide_gnome.c
+++ amide/amide-current/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;
 }