devhelp: New package, version 0.23.
authorStanislav Brabec <utx@penguin.cz>
Wed, 22 Jul 2009 17:17:17 +0000 (17:17 +0000)
committerutx@penguin.cz <utx@penguin.cz>
Wed, 22 Jul 2009 17:17:17 +0000 (17:17 +0000)
conf/checksums.ini
recipes/devhelp/devhelp_0.23.bb [new file with mode: 0644]
recipes/devhelp/files/devhelp-includes.patch [new file with mode: 0644]
recipes/devhelp/files/devhelp-webkit.patch [new file with mode: 0644]

index 30a83b8..68dba8a 100644 (file)
@@ -4678,6 +4678,10 @@ sha256=9ae500ffb1af6e29da00114bad18b776c2f24872c254ee62f6283948beaefc15
 md5=e52d681c5ca11f4a9491624ab8c4fa90
 sha256=e9f0cd45a82d2f60af7e927b1740b5971e9007bf7d05e39a900db2dcb7871916
 
+[http://ftp.gnome.org/pub/GNOME/sources/devhelp/0.23/devhelp-0.23.tar.bz2]
+md5=704c0c90616aeb1c52ca3af1df93fde6
+sha256=60f336ac396f67a0cce70d71ea931545727ab48e9d09bf36415098965f9a7ef2
+
 [ftp://sources.redhat.com/pub/dm/device-mapper.1.01.04.tgz]
 md5=42dd0610e24d4b4f2409a32a04e6e37f
 sha256=49c8303f58abf3a0efbbd42decdc5968688df32c154cffb20a1c3c1ae8b92048
diff --git a/recipes/devhelp/devhelp_0.23.bb b/recipes/devhelp/devhelp_0.23.bb
new file mode 100644 (file)
index 0000000..4cfcece
--- /dev/null
@@ -0,0 +1,16 @@
+DESCRIPTION = "API documentation browser for GTK+ and GNOME"
+HOMEPAGE = "http://live.gnome.org/devhelp"
+DEPENDS = "gconf glib-2.0 gtk+ libwnck webkit-gtk zlib"
+PR = "r0"
+
+inherit gnome
+
+SRC_URI += "file://devhelp-includes.patch;patch=1 \
+           file://devhelp-webkit.patch;patch=1"
+
+PACKAGES += "gedit-plugin-${PN}"
+FILES_gedit-plugin-${PN} += "${libdir}/gedit-2"
+
+do_stage() {
+       autotools_stage_all
+}
diff --git a/recipes/devhelp/files/devhelp-includes.patch b/recipes/devhelp/files/devhelp-includes.patch
new file mode 100644 (file)
index 0000000..154dd8d
--- /dev/null
@@ -0,0 +1,12 @@
+g_mapped_file_free() is deprecated since glib-2.22.
+================================================================================
+--- devhelp-0.23/src/Makefile.am
++++ devhelp-0.23/src/Makefile.am
+@@ -6,7 +6,6 @@
+       -DLOCALEDIR=\""$(datadir)/locale"\"             \
+       -DDATADIR=\""$(datadir)"\"                      \
+       -DG_LOG_DOMAIN=\"Devhelp\"                      \
+-      -DG_DISABLE_DEPRECATED                          \
+       -DGDK_DISABLE_DEPRECATED                        \
+       -DGTK_DISABLE_DEPRECATED                        \
+       -DG_DISABLE_SINGLE_INCLUDES                     \
diff --git a/recipes/devhelp/files/devhelp-webkit.patch b/recipes/devhelp/files/devhelp-webkit.patch
new file mode 100644 (file)
index 0000000..5ba3f3d
--- /dev/null
@@ -0,0 +1,71 @@
+http://bugzilla.gnome.org/show_bug.cgi?id=586559
+Comment #6 from Daniel Macks    (reporter, points: 15)
+2009-07-15 17:27 UTC [reply]
+
+Created an attachment (id=138458) [edit]
+Prepend file://
+
+Here's the patch we're using in fink. Not "complete" (only minimal change to
+work, not *every* use of webkit_web_view_open()) and doesn't resolve the
+inconsistent meaning of "uri", but also doesn't change anything in webkit lib
+API or behavior so no interface chaos (unlike webkit:)
+
+diff -Nurd -x'*~' devhelp-0.23.orig/src/dh-window.c devhelp-0.23/src/dh-window.c
+--- devhelp-0.23.orig/src/dh-window.c  2008-11-28 10:56:04.000000000 -0500
++++ devhelp-0.23/src/dh-window.c       2009-07-08 03:36:23.000000000 -0400
+@@ -133,6 +133,20 @@
+ #define GET_PRIVATE(instance) G_TYPE_INSTANCE_GET_PRIVATE \
+   (instance, DH_TYPE_WINDOW, DhWindowPriv);
++
++static void
++_webkit_web_view_open_compat (WebKitWebView *view,
++                              const gchar   *uri)
++{
++        gchar *real_uri;
++        if (g_path_is_absolute(uri))
++                real_uri = g_strdup_printf ("file://%s", uri);
++        else
++                real_uri = g_strdup (uri);
++        webkit_web_view_load_uri (view, real_uri);
++        g_free(real_uri);
++}
++
+ static void
+ window_activate_new_window (GtkAction *action,
+                             DhWindow  *window)
+@@ -803,7 +817,7 @@
+                                          window);
+         uri = dh_link_get_uri (link);
+-        webkit_web_view_open (view, uri);
++        _webkit_web_view_open_compat (view, uri);
+         g_free (uri);
+         g_signal_handlers_unblock_by_func (view,
+@@ -827,7 +841,7 @@
+         view = window_get_active_web_view (window);
+         uri = dh_link_get_uri (link);
+-        webkit_web_view_open (view, uri);
++        _webkit_web_view_open_compat (view, uri);
+         g_free (uri);
+         window_check_history (window, view);
+@@ -1093,7 +1107,7 @@
+         }
+         if (location) {
+-                webkit_web_view_open (WEBKIT_WEB_VIEW (view), location);
++                _webkit_web_view_open_compat (WEBKIT_WEB_VIEW (view), location);
+         } else {
+                 webkit_web_view_open (WEBKIT_WEB_VIEW (view), "about:blank");
+         }
+@@ -1357,6 +1371,6 @@
+         priv = window->priv;
+         web_view = window_get_active_web_view (window);
+-        webkit_web_view_open (web_view, uri);
++        _webkit_web_view_open_compat (web_view, uri);
+         dh_book_tree_select_uri (DH_BOOK_TREE (priv->book_tree), uri);
+ }