Date: Saturday, January 30, 2010 @ 08:53:41 Author: ibiru Revision: 65497
upgpkg: yelp 2.28.1-2 xulrunner 1.9.2 rebuild Added: yelp/trunk/libxul192.patch Modified: yelp/trunk/PKGBUILD -----------------+ PKGBUILD | 11 +++-- libxul192.patch | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+), 4 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2010-01-30 13:13:02 UTC (rev 65496) +++ PKGBUILD 2010-01-30 13:53:41 UTC (rev 65497) @@ -3,21 +3,24 @@ pkgname=yelp pkgver=2.28.1 -pkgrel=1 +pkgrel=2 pkgdesc="A help browser for GNOME" arch=('i686' 'x86_64') -depends=('xulrunner>=1.9.1' 'gnome-doc-utils>=0.18.1' 'startup-notification>=0.10' 'libxslt' 'hicolor-icon-theme' 'rarian>=0.8.1' 'gconf>=2.28.0') +depends=('xulrunner>=1.9.2' 'gnome-doc-utils>=0.18.1' 'startup-notification>=0.10' 'libxslt' 'hicolor-icon-theme' 'rarian>=0.8.1' 'gconf>=2.28.0') makedepends=('intltool' 'pkgconfig') groups=('gnome') license=('GPL') options=('!emptydirs') url="http://www.gnome.org" install=yelp.install -source=(http://ftp.gnome.org/pub/gnome/sources/yelp/2.28/yelp-${pkgver}.tar.bz2) -sha256sums=('860cfb348cbe199bca64203c82858d012fe505194573f8290be7a85de6c80a22') +source=(http://ftp.gnome.org/pub/gnome/sources/yelp/2.28/yelp-${pkgver}.tar.bz2 + libxul192.patch) +sha256sums=('860cfb348cbe199bca64203c82858d012fe505194573f8290be7a85de6c80a22' + '004648d03f24b40d162ace2b38f836e989abd1f8d7e17f26d7240c0d043c5939') build() { cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i ${srcdir}/libxul192.patch || return 1 ./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var \ --with-search=basic --with-gecko=libxul-embedding || return 1 Added: libxul192.patch =================================================================== --- libxul192.patch (rev 0) +++ libxul192.patch 2010-01-30 13:53:41 UTC (rev 65497) @@ -0,0 +1,109 @@ +From a5588114ed94d00ca64913aa5b248e09a5e13edc Mon Sep 17 00:00:00 2001 +From: Shaun McCance <sha...@gnome.org> +Date: Mon, 25 Jan 2010 20:21:10 +0000 +Subject: Fixing issues introduced by xulrunner 1.9.2 + +API changes in a stable release are not fun. With 1.9.2, setting the base +URI when opening a stream causes a uri_selected callback. So we compare +the URI to what we know we're loading to prevent an infinite loop. + +Also, #fragment links no longer trigger a uri_selected callback. So I've +halfway backported the xref: method used in the yelp-3-0 branch. It's not +pervasive. We rewrite it pretty much immediately. So we still use the +slash hack, instead of the nicer method in yelp-3-0. This should be enough +to keep 2.x alive. +--- +diff --git a/src/yelp-html.cpp b/src/yelp-html.cpp +index edd8788..aa9371d 100644 +--- a/src/yelp-html.cpp ++++ b/src/yelp-html.cpp +@@ -24,6 +24,8 @@ + #include <mozilla-config.h> + #include <config.h> + ++#include <string.h> ++ + #include "yelp-gecko-services.h" + #include "yelp-gecko-utils.h" + #include "yelp-marshal.h" +@@ -90,13 +92,20 @@ static gint + html_open_uri (GtkMozEmbed *embed, const gchar *uri) + { + YelpHtml *html = YELP_HTML (embed); +- gboolean block_load; ++ gboolean block_load = FALSE; + + g_return_val_if_fail (uri != NULL, FALSE); + + debug_print (DB_FUNCTION, "entering\n"); + debug_print (DB_ARG, " uri = \"%s\"\n", uri); + ++ if (g_str_equal (html->priv->base_uri, uri)) { ++ /* As of xulrunner 1.6.2, open_uri is called in response ++ to the base URI we pass in. ++ */ ++ return FALSE; ++ } ++ + if (!html->priv->frames_enabled) { + g_signal_emit (html, signals[URI_SELECTED], 0, uri, FALSE); + block_load = TRUE; +diff --git a/src/yelp-window.c b/src/yelp-window.c +index d436f24..401e059 100644 +--- a/src/yelp-window.c ++++ b/src/yelp-window.c +@@ -1849,14 +1849,21 @@ html_uri_selected_cb (YelpHtml *html, + gboolean handled, + gpointer user_data) + { ++ gchar *new_uri = uri; + YelpWindow *window = YELP_WINDOW (user_data); + + debug_print (DB_FUNCTION, "entering\n"); + debug_print (DB_ARG, " uri = \"%s\"\n", uri); + ++ if (g_str_has_prefix (uri, "xref:")) ++ new_uri = g_strconcat (window->priv->base_uri, "#", uri + 5, NULL); ++ + if (!handled) { +- yelp_window_load (window, uri); ++ yelp_window_load (window, new_uri); + } ++ ++ if (new_uri != uri) ++ g_free (new_uri); + } + + static gboolean +diff --git a/stylesheets/db2html.xsl.in b/stylesheets/db2html.xsl.in +index 1ebf44e..b68f153 100644 +--- a/stylesheets/db2html.xsl.in ++++ b/stylesheets/db2html.xsl.in +@@ -68,7 +68,7 @@ FIXME: yelp:cache no longer works + <!-- == db.xref.target == --> + <xsl:template name="db.xref.target"> + <xsl:param name="linkend"/> +- <xsl:value-of select="concat('#', $linkend)"/> ++ <xsl:value-of select="concat('xref:', $linkend)"/> + </xsl:template> + + <!-- == db2html.css.custom == --> +diff --git a/stylesheets/mal2html.xsl.in b/stylesheets/mal2html.xsl.in +index 37560a7..9a55fcc 100644 +--- a/stylesheets/mal2html.xsl.in ++++ b/stylesheets/mal2html.xsl.in +@@ -44,10 +44,10 @@ + <xsl:when test="contains($xref, '#')"> + <xsl:variable name="pageid" select="substring-before($xref, '#')"/> + <xsl:variable name="sectionid" select="substring-after($xref, '#')"/> +- <xsl:value-of select="concat('#', $pageid, '/', $sectionid)"/> ++ <xsl:value-of select="concat('xref:', $pageid, '/', $sectionid)"/> + </xsl:when> + <xsl:otherwise> +- <xsl:value-of select="concat('#', $xref)"/> ++ <xsl:value-of select="concat('xref:', $xref)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> +-- +cgit v0.8.3.1