OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.4 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../kdelibs/kdelibs-4.6.3-kde4-xdg-menu-prefix.patch
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Description: Use 'kde4-' as XDG_MENU_PREFIX
  17. With this patch the 'applications.menu' file gets installed as
  18. 'kde4-applications.menu' avoiding a shared file issue with other
  19. desktop environments which use the same file name.
  20. Besides that this patch enforces the 'kde4-' prefix unless the
  21. XDG_MENU_PREFIX is set.
  22. --- kdelibs-4.6.3/kded/CMakeLists.txt 2011-04-01 15:55:50.000000000 +0200
  23. +++ kdelibs-4.6.3/kded/CMakeLists.txt 2011-05-19 11:27:57.932002344 +0200
  24. @@ -74,7 +74,7 @@
  25. if (WIN32)
  26. install( FILES applications.menu DESTINATION ${SHARE_INSTALL_PREFIX}/xdg/menus )
  27. else (WIN32)
  28. -install( FILES applications.menu DESTINATION ${SYSCONF_INSTALL_DIR}/xdg/menus )
  29. +install( FILES applications.menu DESTINATION ${SYSCONF_INSTALL_DIR}/xdg/menus RENAME kde4-applications.menu )
  30. endif (WIN32)
  31. install( FILES kdedmodule.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
  32. install( FILES kded.upd DESTINATION ${DATA_INSTALL_DIR}/kconf_update )
  33. --- kdelibs-4.6.3/kded/vfolder_menu.cpp 2011-04-01 15:55:50.000000000 +0200
  34. +++ kdelibs-4.6.3/kded/vfolder_menu.cpp 2011-05-19 11:30:49.960002344 +0200
  35. @@ -770,8 +770,10 @@
  36. QString result;
  37. QString xdgMenuPrefix = QString::fromLocal8Bit(qgetenv("XDG_MENU_PREFIX"));
  38. - if (!xdgMenuPrefix.isEmpty())
  39. - {
  40. + // enforce kde4- prefix unless XDG_MENU_PREFIX is set
  41. + if (xdgMenuPrefix.isEmpty())
  42. + xdgMenuPrefix = QString("kde4-");
  43. +
  44. QFileInfo fileInfo(fileName);
  45. QString fileNameOnly = fileInfo.fileName();
  46. @@ -781,7 +783,6 @@
  47. QString baseName = QDir::cleanPath(m_docInfo.baseDir +
  48. fileInfo.path() + '/' + fileNameOnly);
  49. result = KStandardDirs::locate("xdgconf-menu", baseName);
  50. - }
  51. if (result.isEmpty())
  52. {