diff options
author | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-01-10 05:41:58 +0000 |
---|---|---|
committer | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-01-10 05:41:58 +0000 |
commit | c07d989ad1e730c3845eb93613ce2953923b0198 (patch) | |
tree | edf5560da08510263c1a340b311fed166ace75ac /gnome-base | |
parent | Removed gcc-4.6 patch not necesssary for recent versions. Readded RDEPEND whi... (diff) | |
download | gentoo-2-c07d989ad1e730c3845eb93613ce2953923b0198.tar.gz gentoo-2-c07d989ad1e730c3845eb93613ce2953923b0198.tar.bz2 gentoo-2-c07d989ad1e730c3845eb93613ce2953923b0198.zip |
Add patch to not load invalid .desktop files that do not have Name or Exec keys (prevents crashes in gnome-shell and other applications that assume that all .desktop files follow freedesktop specs). Add support for cinnamon in 10-xdg-menu-gnome.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'gnome-base')
4 files changed, 161 insertions, 1 deletions
diff --git a/gnome-base/gnome-menus/ChangeLog b/gnome-base/gnome-menus/ChangeLog index 8da9c20dace6..05dbed066582 100644 --- a/gnome-base/gnome-menus/ChangeLog +++ b/gnome-base/gnome-menus/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for gnome-base/gnome-menus # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-menus/ChangeLog,v 1.173 2012/01/01 00:36:46 tetromino Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-menus/ChangeLog,v 1.174 2012/01/10 05:41:58 tetromino Exp $ + +*gnome-menus-3.2.0.1-r1 (10 Jan 2012) + + 10 Jan 2012; Alexandre Rostovtsev <tetromino@gentoo.org> + +files/10-xdg-menu-gnome-r1, +gnome-menus-3.2.0.1-r1.ebuild, + +files/gnome-menus-3.2.0.1-ignore-invalid-entries.patch: + Add patch to not load invalid .desktop files that do not have Name or Exec + keys (prevents crashes in gnome-shell and other applications that assume that + all .desktop files follow freedesktop specs). Add support for cinnamon in + 10-xdg-menu-gnome. 01 Jan 2012; Alexandre Rostovtsev <tetromino@gentoo.org> gnome-menus-2.30.5.ebuild, gnome-menus-3.0.1-r1.ebuild, diff --git a/gnome-base/gnome-menus/files/10-xdg-menu-gnome-r1 b/gnome-base/gnome-menus/files/10-xdg-menu-gnome-r1 new file mode 100644 index 000000000000..4bbf86381083 --- /dev/null +++ b/gnome-base/gnome-menus/files/10-xdg-menu-gnome-r1 @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -z "$XDG_MENU_PREFIX" ] && { [ "$DESKTOP_SESSION" = "gnome" ] || [ "$DESKTOP_SESSION" = "cinnamon" ]; } +then + export XDG_MENU_PREFIX=gnome- +fi diff --git a/gnome-base/gnome-menus/files/gnome-menus-3.2.0.1-ignore-invalid-entries.patch b/gnome-base/gnome-menus/files/gnome-menus-3.2.0.1-ignore-invalid-entries.patch new file mode 100644 index 000000000000..ec4144da9e29 --- /dev/null +++ b/gnome-base/gnome-menus/files/gnome-menus-3.2.0.1-ignore-invalid-entries.patch @@ -0,0 +1,32 @@ +From a09c25177a5643f8596dc81d97b87ebce74c75f9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> +Date: Fri, 21 Oct 2011 19:57:55 +0200 +Subject: [PATCH] libmenu: Ignore invalid desktop entries + +Both "Name" and "Exec" are mandatory keys according to the desktop +entry spec; some .desktop files missing one or the other have been +spotted in the while, so ignore them explicitly. + +https://bugzilla.gnome.org/show_bug.cgi?id=662409 +--- + libmenu/desktop-entries.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/libmenu/desktop-entries.c b/libmenu/desktop-entries.c +index bb6076d..a8c13d9 100644 +--- a/libmenu/desktop-entries.c ++++ b/libmenu/desktop-entries.c +@@ -256,7 +256,9 @@ desktop_entry_load (DesktopEntry *entry) + const char *categories_str; + + entry_desktop->appinfo = g_desktop_app_info_new_from_filename (entry->path); +- if (!entry_desktop->appinfo) ++ if (!entry_desktop->appinfo || ++ !g_app_info_get_name (G_APP_INFO (entry_desktop->appinfo)) || ++ !g_app_info_get_executable (G_APP_INFO (entry_desktop->appinfo))) + { + menu_verbose ("Failed to load \"%s\"\n", entry->path); + return FALSE; +-- +1.7.8.3 + diff --git a/gnome-base/gnome-menus/gnome-menus-3.2.0.1-r1.ebuild b/gnome-base/gnome-menus/gnome-menus-3.2.0.1-r1.ebuild new file mode 100644 index 000000000000..124954fd0baf --- /dev/null +++ b/gnome-base/gnome-menus/gnome-menus-3.2.0.1-r1.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-menus/gnome-menus-3.2.0.1-r1.ebuild,v 1.1 2012/01/10 05:41:58 tetromino Exp $ + +EAPI="4" +GCONF_DEBUG="no" +GNOME2_LA_PUNT="yes" + +PYTHON_DEPEND="2:2.4" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.*" + +inherit eutils gnome2 python + +DESCRIPTION="The GNOME menu system, implementing the F.D.O cross-desktop spec" +HOMEPAGE="http://www.gnome.org" + +LICENSE="GPL-2 LGPL-2" +SLOT="3" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" + +# +python for gmenu-simple-editor +IUSE="debug +introspection +python test" + +COMMON_DEPEND=">=dev-libs/glib-2.29.15:2 + introspection? ( >=dev-libs/gobject-introspection-0.9.5 ) + python? ( + >=dev-libs/gobject-introspection-0.9.5 + dev-python/pygobject:3 + x11-libs/gdk-pixbuf:2[introspection] + x11-libs/gtk+:3[introspection] )" +# Older versions of slot 0 install the menu editor and the desktop directories +RDEPEND="${COMMON_DEPEND} + !<gnome-base/gnome-menus-3.0.1-r1:0" +DEPEND="${COMMON_DEPEND} + sys-devel/gettext + >=dev-util/pkgconfig-0.9 + >=dev-util/intltool-0.40 + test? ( dev-libs/gjs )" + +pkg_setup() { + python_pkg_setup + DOCS="AUTHORS ChangeLog HACKING NEWS README" + + # Do NOT compile with --disable-debug/--enable-debug=no + # It disables api usage checks + if ! use debug ; then + G2CONF="${G2CONF} --enable-debug=minimum" + fi + + if use python || use introspection; then + use introspection || ewarn "Enabling introspection due to USE=python" + G2CONF="${G2CONF} --enable-introspection" + else + G2CONF="${G2CONF} --disable-introspection" + fi + + G2CONF="${G2CONF} --disable-static" +} + +src_prepare() { + gnome2_src_prepare + + # Don't show KDE standalone settings desktop files in GNOME others menu + epatch "${FILESDIR}/${PN}-3.0.0-ignore_kde_standalone.patch" + + # Ignore invalid .desktop files (prevents gnome-shell crash), in next release + epatch "${FILESDIR}/${P}-ignore-invalid-entries.patch" + + # disable pyc compiling + echo > py-compile + + python_copy_sources +} + +src_configure() { + python_execute_function -s gnome2_src_configure +} + +src_compile() { + python_execute_function -s gnome2_src_compile +} + +src_test() { + python_execute_function -s -d +} + +src_install() { + python_execute_function -s gnome2_src_install + python_clean_installation_image + + # Prefix menu, bug #256614 + mv "${ED}"/etc/xdg/menus/applications.menu \ + "${ED}"/etc/xdg/menus/gnome-applications.menu || die "menu move failed" + + exeinto /etc/X11/xinit/xinitrc.d/ + newexe "${FILESDIR}/10-xdg-menu-gnome-r1" 10-xdg-menu-gnome +} + +pkg_postinst() { + gnome2_pkg_postinst + if use python; then + python_mod_optimize GMenuSimpleEditor + fi +} + +pkg_postrm() { + gnome2_pkg_postrm + if use python; then + python_mod_cleanup GMenuSimpleEditor + fi +} |