From 056c208534e094e0d1a20326376e24ce4290aed9 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Mon, 18 Jul 2011 11:23:44 +0200 Subject: [PATCH] kdelibs: added patch to enforce 'kde4-' as default XDG_MENU_PREFIX --- .../kdelibs-4.6.3-kde4-xdg-menu-prefix.patch | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 kde/kdelibs/kdelibs-4.6.3-kde4-xdg-menu-prefix.patch diff --git a/kde/kdelibs/kdelibs-4.6.3-kde4-xdg-menu-prefix.patch b/kde/kdelibs/kdelibs-4.6.3-kde4-xdg-menu-prefix.patch new file mode 100644 index 000000000..577701edd --- /dev/null +++ b/kde/kdelibs/kdelibs-4.6.3-kde4-xdg-menu-prefix.patch @@ -0,0 +1,59 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../kdelibs/kdelibs-4.6.3-kde4-xdg-menu-prefix.patch +# Copyright (C) 2011 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +Description: Use 'kde4-' as XDG_MENU_PREFIX + +With this patch the 'applications.menu' file gets installed as +'kde4-applications.menu' avoiding a shared file issue with other +desktop environments which use the same file name. + +Besides that this patch enforces the 'kde4-' prefix unless the +XDG_MENU_PREFIX is set. + +--- kdelibs-4.6.3/kded/CMakeLists.txt 2011-04-01 15:55:50.000000000 +0200 ++++ kdelibs-4.6.3/kded/CMakeLists.txt 2011-05-19 11:27:57.932002344 +0200 +@@ -74,7 +74,7 @@ + if (WIN32) + install( FILES applications.menu DESTINATION ${SHARE_INSTALL_PREFIX}/xdg/menus ) + else (WIN32) +-install( FILES applications.menu DESTINATION ${SYSCONF_INSTALL_DIR}/xdg/menus ) ++install( FILES applications.menu DESTINATION ${SYSCONF_INSTALL_DIR}/xdg/menus RENAME kde4-applications.menu ) + endif (WIN32) + install( FILES kdedmodule.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) + install( FILES kded.upd DESTINATION ${DATA_INSTALL_DIR}/kconf_update ) +--- kdelibs-4.6.3/kded/vfolder_menu.cpp 2011-04-01 15:55:50.000000000 +0200 ++++ kdelibs-4.6.3/kded/vfolder_menu.cpp 2011-05-19 11:30:49.960002344 +0200 +@@ -770,8 +770,10 @@ + QString result; + + QString xdgMenuPrefix = QString::fromLocal8Bit(qgetenv("XDG_MENU_PREFIX")); +- if (!xdgMenuPrefix.isEmpty()) +- { ++ // enforce kde4- prefix unless XDG_MENU_PREFIX is set ++ if (xdgMenuPrefix.isEmpty()) ++ xdgMenuPrefix = QString("kde4-"); ++ + QFileInfo fileInfo(fileName); + + QString fileNameOnly = fileInfo.fileName(); +@@ -781,7 +783,6 @@ + QString baseName = QDir::cleanPath(m_docInfo.baseDir + + fileInfo.path() + '/' + fileNameOnly); + result = KStandardDirs::locate("xdgconf-menu", baseName); +- } + + if (result.isEmpty()) + {