diff options
author | Pacho Ramos <pacho@gentoo.org> | 2011-03-26 20:04:29 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2011-03-26 20:04:29 +0000 |
commit | 4492f4931ea571d5519d8be0be1d0726805cbb84 (patch) | |
tree | de4be26f7349d6bb0c821dc074f59b6d69a1d766 /gnome-extra/yelp | |
parent | Stable on amd64 wrt bug #360625 (diff) | |
download | gentoo-2-4492f4931ea571d5519d8be0be1d0726805cbb84.tar.gz gentoo-2-4492f4931ea571d5519d8be0be1d0726805cbb84.tar.bz2 gentoo-2-4492f4931ea571d5519d8be0be1d0726805cbb84.zip |
Include upstream patches and opensuse fixes for crashes when printing and freezing problems.
(Portage version: 2.1.9.44/cvs/Linux x86_64)
Diffstat (limited to 'gnome-extra/yelp')
-rw-r--r-- | gnome-extra/yelp/ChangeLog | 11 | ||||
-rw-r--r-- | gnome-extra/yelp/files/yelp-2.30.2-freeze-move.patch | 116 | ||||
-rw-r--r-- | gnome-extra/yelp/files/yelp-2.30.2-html-print.patch | 41 | ||||
-rw-r--r-- | gnome-extra/yelp/files/yelp-2.30.2-missing-slash.patch | 33 | ||||
-rw-r--r-- | gnome-extra/yelp/files/yelp-2.30.2-print-crash.patch | 38 | ||||
-rw-r--r-- | gnome-extra/yelp/files/yelp-2.30.2-uri-handler.patch | 28 | ||||
-rw-r--r-- | gnome-extra/yelp/metadata.xml | 6 | ||||
-rw-r--r-- | gnome-extra/yelp/yelp-2.30.2-r3.ebuild | 80 |
8 files changed, 346 insertions, 7 deletions
diff --git a/gnome-extra/yelp/ChangeLog b/gnome-extra/yelp/ChangeLog index dbd68349270b..daa43859efba 100644 --- a/gnome-extra/yelp/ChangeLog +++ b/gnome-extra/yelp/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for gnome-extra/yelp # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/yelp/ChangeLog,v 1.258 2011/03/23 14:38:58 nirbheek Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/yelp/ChangeLog,v 1.259 2011/03/26 20:04:29 pacho Exp $ + +*yelp-2.30.2-r3 (26 Mar 2011) + + 26 Mar 2011; Pacho Ramos <pacho@gentoo.org> +yelp-2.30.2-r3.ebuild, + +files/yelp-2.30.2-freeze-move.patch, +files/yelp-2.30.2-html-print.patch, + +files/yelp-2.30.2-missing-slash.patch, +files/yelp-2.30.2-print-crash.patch, + +files/yelp-2.30.2-uri-handler.patch: + Include upstream patches and opensuse fixes for crashes when printing and + freezing problems. *yelp-2.30.2-r2 (23 Mar 2011) diff --git a/gnome-extra/yelp/files/yelp-2.30.2-freeze-move.patch b/gnome-extra/yelp/files/yelp-2.30.2-freeze-move.patch new file mode 100644 index 000000000000..2b5e1840fde5 --- /dev/null +++ b/gnome-extra/yelp/files/yelp-2.30.2-freeze-move.patch @@ -0,0 +1,116 @@ +commit fd70739a133053042360d14fd7e6bc9db884e021 +Author: Vincent Untz <vuntz@gnome.org> +Date: Sun Feb 20 16:00:00 2011 +0100 + + Fix small freezes when moving window + + This is similar to ce9025ff: we only save the window size after a + timeout, to stop always saving a file which calls fsync() and is + therefore slow. + + We also don't save the size if it hasn't changed. + + https://bugzilla.gnome.org/show_bug.cgi?id=642813 + +diff --git a/src/yelp-window.c b/src/yelp-window.c +index abad787..ea57576 100644 +--- a/src/yelp-window.c ++++ b/src/yelp-window.c +@@ -284,6 +284,10 @@ struct _YelpWindowPriv { + gulong cancel_handler; + gulong finish_handler; + ++ guint resize_timeout; ++ gint saved_width; ++ gint saved_height; ++ + gint toc_pause; + + GtkActionGroup *action_group; +@@ -510,8 +514,12 @@ window_init (YelpWindow *window) + width = YELP_CONFIG_WIDTH_DEFAULT; + if (height == 0) + height = YELP_CONFIG_HEIGHT_DEFAULT; ++ + } + ++ window->priv->saved_width = width; ++ window->priv->saved_height = height; ++ + g_free (config_path); + g_key_file_free (keyfile); + +@@ -538,6 +546,10 @@ window_finalize (GObject *object) + YelpWindow *window = YELP_WINDOW (object); + YelpWindowPriv *priv = window->priv; + ++ if (window->priv->resize_timeout) ++ g_source_remove (window->priv->resize_timeout); ++ window->priv->resize_timeout = 0; ++ + g_object_unref (priv->action_group); + g_object_unref (priv->ui_manager); + +@@ -1810,26 +1822,22 @@ window_set_loading (YelpWindow *window) + /** Window Callbacks **********************************************************/ + + static gboolean +-window_configure_cb (GtkWidget *widget, +- GdkEventConfigure *event, +- gpointer data) ++save_window_size (YelpWindow *window, ++ gpointer data) + { +- gint width, height; + GKeyFile *keyfile; + GError *config_error = NULL; + gchar *sdata, *config_path; + gsize config_size; + +- gtk_window_get_size (GTK_WINDOW (widget), &width, &height); +- + keyfile = g_key_file_new(); + + config_path = g_strconcat (g_get_home_dir(), YELP_CONFIG_PATH, NULL); + + g_key_file_set_integer (keyfile, YELP_CONFIG_GEOMETRY_GROUP, +- YELP_CONFIG_WIDTH, width); ++ YELP_CONFIG_WIDTH, window->priv->saved_width); + g_key_file_set_integer (keyfile, YELP_CONFIG_GEOMETRY_GROUP, +- YELP_CONFIG_HEIGHT, height); ++ YELP_CONFIG_HEIGHT, window->priv->saved_height); + + sdata = g_key_file_to_data (keyfile, &config_size, NULL); + +@@ -1846,6 +1854,31 @@ window_configure_cb (GtkWidget *widget, + return FALSE; + } + ++static gboolean ++window_configure_cb (GtkWidget *widget, ++ GdkEventConfigure *event, ++ gpointer data) ++{ ++ gint width, height; ++ YelpWindow *window = YELP_WINDOW (widget); ++ ++ gtk_window_get_size (GTK_WINDOW (widget), &width, &height); ++ ++ if (width == window->priv->saved_width && ++ height == window->priv->saved_height) ++ return FALSE; ++ ++ window->priv->saved_width = width; ++ window->priv->saved_height = height; ++ ++ if (window->priv->resize_timeout) ++ g_source_remove (window->priv->resize_timeout); ++ ++ window->priv->resize_timeout = g_timeout_add (200, (GSourceFunc) save_window_size, widget); ++ ++ return FALSE; ++} ++ + /** Gecko Callbacks ***********************************************************/ + + static void diff --git a/gnome-extra/yelp/files/yelp-2.30.2-html-print.patch b/gnome-extra/yelp/files/yelp-2.30.2-html-print.patch new file mode 100644 index 000000000000..a6a7c44a0f4b --- /dev/null +++ b/gnome-extra/yelp/files/yelp-2.30.2-html-print.patch @@ -0,0 +1,41 @@ +commit ea6d2b724ae5b868e08b8ba3593ff79666912b81 +Author: Vincent Untz <vuntz@gnome.org> +Date: Sun Feb 20 15:55:13 2011 +0100 + + Fix crash and infinite loop when printing HTML document + + https://bugzilla.gnome.org/show_bug.cgi?id=642811 + +diff --git a/src/yelp-window.c b/src/yelp-window.c +index 1221ba3..abad787 100644 +--- a/src/yelp-window.c ++++ b/src/yelp-window.c +@@ -1181,6 +1181,8 @@ yelp_window_load (YelpWindow *window, const gchar *uri) + (void *) window); + g_free (faux_frag_id); + priv->current_document = doc; ++ } else { ++ window->priv->current_document = NULL; + } + + Exit: +@@ -2190,6 +2192,8 @@ window_print_page_cb (GtkAction *action, YelpWindow *window) + * There are more sinister forces at work... + */ + ++ yelp_html_set_base_uri (html, priv->uri); ++ + switch (priv->current_type) { + case YELP_RRN_TYPE_HTML: + yelp_html_open_stream (html, "text/html"); +@@ -2204,8 +2208,8 @@ window_print_page_cb (GtkAction *action, YelpWindow *window) + g_assert_not_reached (); + } + +- while ((g_input_stream_read_all +- ((GInputStream *)stream, buffer, BUFFER_SIZE, &n, NULL, NULL))) { ++ while ((n = g_input_stream_read ++ ((GInputStream *)stream, buffer, BUFFER_SIZE, NULL, NULL))) { + yelp_html_write (html, buffer, n); + } + diff --git a/gnome-extra/yelp/files/yelp-2.30.2-missing-slash.patch b/gnome-extra/yelp/files/yelp-2.30.2-missing-slash.patch new file mode 100644 index 000000000000..787476f9dcff --- /dev/null +++ b/gnome-extra/yelp/files/yelp-2.30.2-missing-slash.patch @@ -0,0 +1,33 @@ +From d8a0c136b10d174beae8fd5cfeeb83ef18e83846 Mon Sep 17 00:00:00 2001 +From: Shaun McCance <shaunm@gnome.org> +Date: Thu, 18 Nov 2010 16:41:43 +0000 +Subject: [yelp-utils] Use g_build_filename to avoid missing slash problem + +We were assuming the results of g_get_system_data_dirs have a trailing +slash. They might not, if you set XDG_DATA_DIRS without them. +--- +diff --git a/src/yelp-utils.c b/src/yelp-utils.c +index 7fb79e5..0027e08 100644 +--- a/src/yelp-utils.c ++++ b/src/yelp-utils.c +@@ -116,15 +116,15 @@ resolve_process_ghelp (char *uri, gchar **result) + hash = NULL; + } + for (i = 0; type != YELP_RRN_TYPE_MAL && dirs[i]; i++) { +- gchar *path = g_strdup_printf ("%sgnome/help/%s", dirs[i], dir); ++ gchar *path = g_build_filename (dirs[i], "gnome", "help", dir, NULL); + if (g_file_test (path, G_FILE_TEST_IS_DIR)) { + const gchar * const *langs = g_get_language_names (); + gint j; + for (j = 0; type != YELP_RRN_TYPE_MAL && langs[j]; j++) { +- gchar *index = g_strdup_printf ("%sgnome/help/%s/%s/index.page", dirs[i], dir, langs[j]); ++ gchar *index = g_build_filename (dirs[i], "gnome", "help", dir, langs[j], "index.page", NULL); + if (g_file_test (index, G_FILE_TEST_IS_REGULAR)) { + type = YELP_RRN_TYPE_MAL; +- *result = g_strdup_printf ("%sgnome/help/%s/%s/", dirs[i], dir, langs[j]); ++ *result = g_build_filename (dirs[i], "gnome", "help", dir, langs[j], NULL); + } + g_free (index); + } +-- +cgit v0.9 diff --git a/gnome-extra/yelp/files/yelp-2.30.2-print-crash.patch b/gnome-extra/yelp/files/yelp-2.30.2-print-crash.patch new file mode 100644 index 000000000000..a0833c9cdda1 --- /dev/null +++ b/gnome-extra/yelp/files/yelp-2.30.2-print-crash.patch @@ -0,0 +1,38 @@ +commit b1b83204de2eef17e746c82138325b997d1684fd +Author: Vincent Untz <vuntz@gnome.org> +Date: Sun Feb 20 14:48:40 2011 +0100 + + Fix crash when printing a whole document + + We use g_strfreev() on an array with const strings. That's bad :-) + + https://bugzilla.gnome.org/show_bug.cgi?id=642808 + +diff --git a/src/yelp-db-print.c b/src/yelp-db-print.c +index b85eea6..6a48f84 100644 +--- a/src/yelp-db-print.c ++++ b/src/yelp-db-print.c +@@ -477,17 +477,17 @@ dbprint_process (YelpDbprint *dbprint) + params_max += 20; + params = g_renew (gchar *, params, params_max); + } +- params[params_i++] = "db.chunk.extension"; ++ params[params_i++] = g_strdup ("db.chunk.extension"); + params[params_i++] = g_strdup ("\"\""); +- params[params_i++] = "db.chunk.info_basename"; ++ params[params_i++] = g_strdup ("db.chunk.info_basename"); + params[params_i++] = g_strdup ("\"index\""); +- params[params_i++] = "db.chunk.max_depth"; ++ params[params_i++] = g_strdup ("db.chunk.max_depth"); + params[params_i++] = g_strdup ("0"); +- params[params_i++] = "db2html.navbar.top"; ++ params[params_i++] = g_strdup ("db2html.navbar.top"); + params[params_i++] = g_strdup ("0"); +- params[params_i++] = "db2html.navbar.bottom"; ++ params[params_i++] = g_strdup ("db2html.navbar.bottom"); + params[params_i++] = g_strdup ("0"); +- params[params_i++] = "db2html.sidenav"; ++ params[params_i++] = g_strdup ("db2html.sidenav"); + params[params_i++] = g_strdup ("0"); + + params[params_i] = NULL; diff --git a/gnome-extra/yelp/files/yelp-2.30.2-uri-handler.patch b/gnome-extra/yelp/files/yelp-2.30.2-uri-handler.patch new file mode 100644 index 000000000000..7a7798d6b924 --- /dev/null +++ b/gnome-extra/yelp/files/yelp-2.30.2-uri-handler.patch @@ -0,0 +1,28 @@ +From f79bf2d8e632771275e89b67a218b22bb699afa7 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen <mclasen@redhat.com> +Date: Wed, 22 Dec 2010 21:11:01 +0000 +Subject: Add schemehandler information to the desktop file + +This should arrange things so that gtk_show_uri (..."ghelp:epiphany"...) +will just work. +--- +diff --git a/yelp.desktop.in.in b/yelp.desktop.in.in +index 6c71b95..02e8cdf 100644 +--- a/yelp.desktop.in.in ++++ b/yelp.desktop.in.in +@@ -2,7 +2,7 @@ + _Name=Help + _Comment=Get help with GNOME + OnlyShowIn=GNOME; +-Exec=yelp ++Exec=yelp %u + Icon=help-browser + StartupNotify=true + Terminal=false +@@ -12,3 +12,4 @@ X-GNOME-Bugzilla-Bugzilla=GNOME + X-GNOME-Bugzilla-Product=Yelp + X-GNOME-Bugzilla-Component=general + X-GNOME-Bugzilla-Version=@VERSION@ ++MimeType=x-scheme-handler/ghelp;x-scheme-handler/help;x-scheme-handler/info;x-scheme-handler/man; +-- +cgit v0.9 diff --git a/gnome-extra/yelp/metadata.xml b/gnome-extra/yelp/metadata.xml index b8721888ef3b..da6fd63d0085 100644 --- a/gnome-extra/yelp/metadata.xml +++ b/gnome-extra/yelp/metadata.xml @@ -2,10 +2,4 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <herd>gnome</herd> -<use> - <flag name='beagle'>Enables support for the Beagle - (<pkg>app-misc/beagle</pkg>) desktop search tool</flag> - <flag name='lzma'>Enables support for LZMA compressed info and man - pages</flag> -</use> </pkgmetadata> diff --git a/gnome-extra/yelp/yelp-2.30.2-r3.ebuild b/gnome-extra/yelp/yelp-2.30.2-r3.ebuild new file mode 100644 index 000000000000..7cccde467c49 --- /dev/null +++ b/gnome-extra/yelp/yelp-2.30.2-r3.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/yelp/yelp-2.30.2-r3.ebuild,v 1.1 2011/03/26 20:04:29 pacho Exp $ + +EAPI="3" +GCONF_DEBUG="yes" + +inherit autotools eutils gnome2 + +DESCRIPTION="Help browser for GNOME" +HOMEPAGE="http://www.gnome.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" +# FIXME: lzma/xz support will be fixed in yelp3, bug #314923 +IUSE="" + +RDEPEND=">=gnome-base/gconf-2:2 + >=app-text/gnome-doc-utils-0.19.1 + >=x11-libs/gtk+-2.18:2 + >=dev-libs/glib-2.16:2 + >=dev-libs/libxml2-2.6.5:2 + >=dev-libs/libxslt-1.1.4 + >=x11-libs/startup-notification-0.8 + >=dev-libs/dbus-glib-0.71 + net-libs/xulrunner:1.9 + sys-libs/zlib + app-arch/bzip2 + >=app-text/rarian-0.7 + >=app-text/scrollkeeper-9999" +DEPEND="${RDEPEND} + sys-devel/gettext + >=dev-util/intltool-0.35 + >=dev-util/pkgconfig-0.9 + gnome-base/gnome-common" +# If eautoreconf: +# gnome-base/gnome-common + +pkg_setup() { + DOCS="AUTHORS ChangeLog NEWS README TODO" + G2CONF="${G2CONF} + --with-gecko=libxul-embedding + --with-search=basic + --disable-lzma" +} + +src_prepare() { + gnome2_src_prepare + + # Fix automagic lzma support, bug #266128 + epatch "${FILESDIR}/${PN}-2.26.0-automagic-lzma.patch" + + # Fix build with xulrunner-1.9.2 + epatch "${FILESDIR}/${PN}-2.28.1-system-nspr.patch" + + # Fix build with xulrunner-2.0 (we really need to get rid of this package) + epatch "${FILESDIR}/${P}-port-to-xulrunner-2.patch" + + # Use g_build_filename to avoid missing slash problem + epatch "${FILESDIR}/${P}-missing-slash.patch" + + # Add schemehandler information to the desktop file + epatch "${FILESDIR}/${P}-uri-handler.patch" + + # Fix crash when printing a whole document + epatch "${FILESDIR}/${P}-print-crash.patch" + + # Fix crash and infinite loop when printing HTML document + epatch "${FILESDIR}/${P}-html-print.patch" + + # Fix small freezes when moving window + epatch "${FILESDIR}/${P}-freeze-move.patch" + + intltoolize --force --copy --automake || die "intltoolize failed" + eautoreconf + + # strip stupid options in configure, see bug #196621 + sed -i 's|$AM_CFLAGS -pedantic -ansi|$AM_CFLAGS|' configure || die "sed failed" +} |