summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory A. Pratt <anarchy@gentoo.org>2016-01-24 12:20:01 -0600
committerJory A. Pratt <anarchy@gentoo.org>2016-01-24 12:20:01 -0600
commitc49863d4ada7c3196677b5e44264ac0ce19a1acd (patch)
tree69e30abf901c10305312b27e0c6360c0f5be0626
parentFix build failure when cmake-3.4 is used (diff)
downloadanarchy-c49863d4ada7c3196677b5e44264ac0ce19a1acd.tar.gz
anarchy-c49863d4ada7c3196677b5e44264ac0ce19a1acd.tar.bz2
anarchy-c49863d4ada7c3196677b5e44264ac0ce19a1acd.zip
app-editor/mousepad - cherry pick upstream patches addressing multiple
issues
-rw-r--r--app-editors/mousepad/Manifest6
-rw-r--r--app-editors/mousepad/files/mousepad-0.4.0-dbus-filename-passing-optimization.patch44
-rw-r--r--app-editors/mousepad/files/mousepad-0.4.0-dbus-filename-passing.patch81
-rw-r--r--app-editors/mousepad/files/mousepad-0.4.0-dont-show-hidden-gsv.patch43
-rw-r--r--app-editors/mousepad/files/mousepad-0.4.0-prevent-weird-cycle-gsettings.patch38
-rw-r--r--app-editors/mousepad/mousepad-0.4.0.ebuild54
6 files changed, 266 insertions, 0 deletions
diff --git a/app-editors/mousepad/Manifest b/app-editors/mousepad/Manifest
new file mode 100644
index 0000000..c85e20f
--- /dev/null
+++ b/app-editors/mousepad/Manifest
@@ -0,0 +1,6 @@
+AUX mousepad-0.4.0-dbus-filename-passing-optimization.patch 1633 SHA256 6e101f6abc37b48070c14aa40283a3c2eafc743b4bbb4df3913c7076bae12b94 SHA512 333d7649151ad900a26326fda0bf1ac6751e4301103ed5b47dc9cfd186304ead7c1f0158df3e8d8a647eee5cd375c61b9427d36d950a9e1dbe938951eba83228 WHIRLPOOL 715eeceaf739d5f8c80b8a071f3ec9847767567da2367b094d3a8e0b0308926195635184f04eaccdbbb287d80cd2f23dea451c2f7720aefdfc2b8b8a001d0092
+AUX mousepad-0.4.0-dbus-filename-passing.patch 2829 SHA256 3038f0a5c172d58a532960f96b4140b83da4074dda9feec5eaba0261e67cd71d SHA512 d6a5caf486c42700ca49450587f8cfc93892b08f26caf63a7792153c6d53f84648b71b11ee9f7676d82c0346f47cdc7f6bc671ec4a90eeea596f1920a492bdad WHIRLPOOL b8cce6a50fb35c7b7c4b7db92a5aeb94bef13648db5e6c6d8fc9e117ee12bcb0d92094c68d56a9944a19cc4daee219f8e73f7ccaea95abad91760a9fae152aca
+AUX mousepad-0.4.0-dont-show-hidden-gsv.patch 1734 SHA256 11e2a7015702676e9ccd0df062712abcd14172ee2cf4aa4f097ae6e4cf645132 SHA512 31dffe7061db78fad33123e28ceb00df724f620b2f6d8166b4c4dc68c3345653fcea9b94b1a4618d8125896f3e306905cf1af8c2ffe374ecd0c04a67638d7b7c WHIRLPOOL c2e866a9622a11c4ec753ea9197af02600086a94d9800be34c0780f2c53ef341768d058315c31e613e849b2be2c756a12bdff48ae62944b9c9b0578b93bf9f9e
+AUX mousepad-0.4.0-prevent-weird-cycle-gsettings.patch 1683 SHA256 b766fb8762a964535df76c24cfb64677ce413e674ca10e3610025991ae5f42b2 SHA512 db2474b5be77d660545070423e97c3bf16593210a89e9b8366236126c1b5cb07cb195d15a4d61163c1ee2f5dbd5589a07a325901c0f1fcb87b6ad244c36ac2d9 WHIRLPOOL 414ec21ea56aee8398c0f7726c46f9fe4bb9cabafb4f1cf505f11bbca3fa4262e4f3bad8a91b712b75c4bd201a75441040a3b646dd772fea4639275c631d8585
+DIST mousepad-0.4.0.tar.bz2 578483 SHA256 60114431eac8db6bb6ce18bd38f1630cccb684375b97a445a1b6fd619848d132 SHA512 5196abd04268d1ace118dc485b72bfcfb7f9175eeaf52bc97c08c1646371d26401403a3bb199d882380bcb998547c65af9bd054f0365afd846c0ad74d3c3b1fe WHIRLPOOL dd087f38d75836d28cdae3a851d2ede0246a66db104710bab919928d32b63e470c95d77ff09c34c92e90322f14d5f85f83dc913acc529b8dd95ad8bc2712b9c1
+EBUILD mousepad-0.4.0.ebuild 1205 SHA256 56caa840ba55162f794a03660a8439e1ec4c41106e83b967093085b7cced18ad SHA512 04f90d853651f9779df8a5fb977ca401e9002565db7808e913726656c20be9ae75f49cbe1d7e803ead54b32e7f5f3ef3134f7ea0c25ef0019de41195ddf27a46 WHIRLPOOL 3045dfe45a6e4820fdf64412c46dc5967912ca4beb7742665e858f35f6359ece28a7b5164e02330b6bff19e00db05703e9cc01e04d857a4cba5a5b5f340229c1
diff --git a/app-editors/mousepad/files/mousepad-0.4.0-dbus-filename-passing-optimization.patch b/app-editors/mousepad/files/mousepad-0.4.0-dbus-filename-passing-optimization.patch
new file mode 100644
index 0000000..2598fc1
--- /dev/null
+++ b/app-editors/mousepad/files/mousepad-0.4.0-dbus-filename-passing-optimization.patch
@@ -0,0 +1,44 @@
+From ee7636b8c832f2a8e19c6b3c9d0405f07147b16b Mon Sep 17 00:00:00 2001
+From: Matthew Brush <matt@xfce.org>
+Date: Fri, 26 Jun 2015 20:22:59 -0700
+Subject: Optimize previous commit passing UTF-8 to DBus
+
+
+diff --git a/mousepad/mousepad-dbus.c b/mousepad/mousepad-dbus.c
+index de76ba5..46ca823 100644
+--- a/mousepad/mousepad-dbus.c
++++ b/mousepad/mousepad-dbus.c
+@@ -312,24 +312,23 @@ mousepad_dbus_client_launch_files (gchar **filenames,
+ g_return_val_if_fail (g_path_is_absolute (working_directory), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+- utf8_filenames = g_ptr_array_sized_new(length + 1);
+- g_ptr_array_set_free_func(utf8_filenames, g_free);
+-
++ utf8_filenames = g_ptr_array_new_with_free_func(g_free);
+ if (filenames != NULL)
+ {
+- gchar **fn_iter;
++ guint i;
+ /* get the length of the filesname string */
+ length = g_strv_length (filenames);
++ g_ptr_array_set_size(utf8_filenames, length + 1);
+ /* encode locale filenames to UTF-8 for DBus */
+- for (fn_iter = filenames; *fn_iter != NULL; fn_iter++)
++ for (i = 0; i < length; i++)
+ {
+- gchar *utf8_fn = g_filename_to_utf8(*fn_iter, -1, NULL, NULL, error);
++ gchar *utf8_fn = g_filename_to_utf8(filenames[i], -1, NULL, NULL, error);
+ if (utf8_fn == NULL)
+ {
+ g_ptr_array_free(utf8_filenames, TRUE);
+ return FALSE;
+ }
+- g_ptr_array_add(utf8_filenames, utf8_fn);
++ utf8_filenames->pdata[i] = utf8_fn;
+ }
+ }
+ g_ptr_array_add(utf8_filenames, NULL);
+--
+cgit v0.10.1
+
diff --git a/app-editors/mousepad/files/mousepad-0.4.0-dbus-filename-passing.patch b/app-editors/mousepad/files/mousepad-0.4.0-dbus-filename-passing.patch
new file mode 100644
index 0000000..5ff5f00
--- /dev/null
+++ b/app-editors/mousepad/files/mousepad-0.4.0-dbus-filename-passing.patch
@@ -0,0 +1,81 @@
+From 8d554f7ad97f2b1a2f64a71ebb187fe6eae17281 Mon Sep 17 00:00:00 2001
+From: Matthew Brush <matt@xfce.org>
+Date: Fri, 26 Jun 2015 18:04:42 -0700
+Subject: Encode filenames passed to DBus as UTF-8
+
+
+diff --git a/mousepad/mousepad-dbus.c b/mousepad/mousepad-dbus.c
+index cb222da..de76ba5 100644
+--- a/mousepad/mousepad-dbus.c
++++ b/mousepad/mousepad-dbus.c
+@@ -306,21 +306,52 @@ mousepad_dbus_client_launch_files (gchar **filenames,
+ DBusMessage *message;
+ guint length = 0;
+ gboolean succeed;
++ GPtrArray *utf8_filenames;
++ gchar *utf8_dir = NULL;
+
+ g_return_val_if_fail (g_path_is_absolute (working_directory), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+- /* get the length of the filesname string */
+- if (filenames)
+- length = g_strv_length (filenames);
++ utf8_filenames = g_ptr_array_sized_new(length + 1);
++ g_ptr_array_set_free_func(utf8_filenames, g_free);
++
++ if (filenames != NULL)
++ {
++ gchar **fn_iter;
++ /* get the length of the filesname string */
++ length = g_strv_length (filenames);
++ /* encode locale filenames to UTF-8 for DBus */
++ for (fn_iter = filenames; *fn_iter != NULL; fn_iter++)
++ {
++ gchar *utf8_fn = g_filename_to_utf8(*fn_iter, -1, NULL, NULL, error);
++ if (utf8_fn == NULL)
++ {
++ g_ptr_array_free(utf8_filenames, TRUE);
++ return FALSE;
++ }
++ g_ptr_array_add(utf8_filenames, utf8_fn);
++ }
++ }
++ g_ptr_array_add(utf8_filenames, NULL);
++
++ if (working_directory != NULL)
++ {
++ /* encode working directory to UTF-8 for DBus */
++ utf8_dir = g_filename_to_utf8(working_directory, -1, NULL, NULL, error);
++ if (utf8_dir == NULL)
++ {
++ g_ptr_array_free(utf8_filenames, TRUE);
++ return FALSE;
++ }
++ }
+
+ /* generate the message */
+ message = dbus_message_new_method_call (MOUSEPAD_DBUS_INTERFACE, MOUSEPAD_DBUS_PATH,
+ MOUSEPAD_DBUS_INTERFACE, "LaunchFiles");
+ dbus_message_set_auto_start (message, FALSE);
+ dbus_message_append_args (message,
+- DBUS_TYPE_STRING, &working_directory,
+- DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &filenames, length,
++ DBUS_TYPE_STRING, &utf8_dir,
++ DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &utf8_filenames->pdata, length,
+ DBUS_TYPE_INVALID);
+
+ /* send the message */
+@@ -329,5 +360,9 @@ mousepad_dbus_client_launch_files (gchar **filenames,
+ /* unref the message */
+ dbus_message_unref (message);
+
++ /* cleanup the UTF-8 strings */
++ g_ptr_array_free(utf8_filenames, TRUE);
++ g_free(utf8_dir);
++
+ return succeed;
+ }
+--
+cgit v0.10.1
+
diff --git a/app-editors/mousepad/files/mousepad-0.4.0-dont-show-hidden-gsv.patch b/app-editors/mousepad/files/mousepad-0.4.0-dont-show-hidden-gsv.patch
new file mode 100644
index 0000000..b13dbf5
--- /dev/null
+++ b/app-editors/mousepad/files/mousepad-0.4.0-dont-show-hidden-gsv.patch
@@ -0,0 +1,43 @@
+From 720cf91f7b21864b4d3bb0ce18d96cfa719877ca Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Miranda?= <andreldm1989@gmail.com>
+Date: Mon, 6 Jul 2015 19:45:06 -0700
+Subject: Don't show hidden GSV languages
+
+Some like "Defaults" aren't meant to be exposed to users and can
+even cause crashes. Closes bug #12043.
+
+diff --git a/mousepad/mousepad-action-group.c b/mousepad/mousepad-action-group.c
+index 156ebbb..71b37f2 100644
+--- a/mousepad/mousepad-action-group.c
++++ b/mousepad/mousepad-action-group.c
+@@ -617,6 +617,13 @@ mousepad_action_group_get_sorted_section_names (void)
+ language = gtk_source_language_manager_get_language (manager, *languages);
+ if (G_LIKELY (GTK_SOURCE_IS_LANGUAGE (language)))
+ {
++ /* ignore hidden languages */
++ if(gtk_source_language_get_hidden(language))
++ {
++ languages++;
++ continue;
++ }
++
+ /* ensure no duplicates in list */
+ if (!g_slist_find_custom (list,
+ gtk_source_language_get_section (language),
+@@ -651,6 +658,13 @@ mousepad_action_group_get_sorted_languages_for_section (const gchar *section)
+ language = gtk_source_language_manager_get_language (manager, *languages);
+ if (G_LIKELY (GTK_SOURCE_IS_LANGUAGE (language)))
+ {
++ /* ignore hidden languages */
++ if(gtk_source_language_get_hidden(language))
++ {
++ languages++;
++ continue;
++ }
++
+ /* only get languages in the specified section */
+ if (g_strcmp0 (gtk_source_language_get_section (language), section) == 0)
+ list = g_slist_prepend (list, language);
+--
+cgit v0.10.1
+
diff --git a/app-editors/mousepad/files/mousepad-0.4.0-prevent-weird-cycle-gsettings.patch b/app-editors/mousepad/files/mousepad-0.4.0-prevent-weird-cycle-gsettings.patch
new file mode 100644
index 0000000..d90a63d
--- /dev/null
+++ b/app-editors/mousepad/files/mousepad-0.4.0-prevent-weird-cycle-gsettings.patch
@@ -0,0 +1,38 @@
+From f07cc75f2aa77d14f16b5506321ac6a2413706ba Mon Sep 17 00:00:00 2001
+From: Matthew Brush <mbrush@codebrainz.ca>
+Date: Sun, 27 Sep 2015 12:29:15 -0700
+Subject: Prevent a weird cycle in GSettings use
+
+Was causing it to continuously update the "color-scheme" setting,
+resulting in lots of DBus spam and CPU/disk activity. I'm not sure
+why only this setting was causing the issue, and why it still updates
+across all the instances while using the `G_SETTINGS_BIND_GET_NO_CHANGES`
+flag, since it shouldn't (and doesn't if it's used on other settings).
+
+Closes bug #12134
+
+diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c
+index bd0e37c..03f4609 100644
+--- a/mousepad/mousepad-view.c
++++ b/mousepad/mousepad-view.c
+@@ -324,10 +324,16 @@ mousepad_view_init (MousepadView *view)
+ BIND_ (SHOW_RIGHT_MARGIN, "show-right-margin");
+ BIND_ (SMART_HOME_END, "smart-home-end");
+ BIND_ (TAB_WIDTH, "tab-width");
+- BIND_ (COLOR_SCHEME, "color-scheme");
+ BIND_ (WORD_WRAP, "word-wrap");
+ BIND_ (MATCH_BRACES, "match-braces");
+
++ /* for color-scheme, use G_SETTINGS_BIND_GET_NO_CHANGES to stop
++ * a cycle that was causing DBus thrashing. See:
++ * https://bugzilla.xfce.org/show_bug.cgi?id=12134 */
++ MOUSEPAD_SETTING_BIND (COLOR_SCHEME, view, "color-scheme",
++ G_SETTINGS_BIND_DEFAULT |
++ G_SETTINGS_BIND_GET_NO_CHANGES);
++
+ /* override with default font when the setting is enabled */
+ MOUSEPAD_SETTING_CONNECT_OBJECT (USE_DEFAULT_FONT,
+ G_CALLBACK (mousepad_view_use_default_font_setting_changed),
+--
+cgit v0.10.1
+
diff --git a/app-editors/mousepad/mousepad-0.4.0.ebuild b/app-editors/mousepad/mousepad-0.4.0.ebuild
new file mode 100644
index 0000000..32f7a0a
--- /dev/null
+++ b/app-editors/mousepad/mousepad-0.4.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit gnome2-utils xfconf
+
+DESCRIPTION="GTK+-based editor for the Xfce Desktop Environment"
+HOMEPAGE="http://goodies.xfce.org/projects/applications/start"
+SRC_URI="mirror://xfce/src/apps/${PN}/${PV%.*}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug dbus gtk3"
+
+RDEPEND=">=dev-libs/glib-2.30:2=
+ dbus? ( >=dev-libs/dbus-glib-0.100:0= )
+ !gtk3? ( >=x11-libs/gtk+-2.24:2=
+ x11-libs/gtksourceview:2.0= )
+ gtk3? ( x11-libs/gtk+:3=
+ x11-libs/gtksourceview:3.0= )"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+pkg_setup() {
+ PATCHES=(
+ "${FILESDIR}"/${P}-dbus-filename-passing.patch
+ "${FILESDIR}"/${P}-dbus-filename-passing-optimization.patch
+ "${FILESDIR}"/${P}-dont-show-hidden-gsv.patch
+ "${FILESDIR}"/${P}-prevent-weird-cycle-gsettings.patch
+ )
+
+ XFCONF=(
+ $(xfconf_use_debug)
+ $(use_enable dbus)
+ $(use_enable gtk3)
+ )
+
+ DOCS=( AUTHORS ChangeLog NEWS README TODO )
+}
+
+pkg_preinst() {
+ xfconf_pkg_preinst
+ gnome2_schemas_savelist
+}
+
+pkg_postinst() {
+ xfconf_pkg_postinst
+ gnome2_schemas_update
+}