cairo-dock-plug-ins-mono.patch 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. diff -rupN cairo-dock-plug-ins-3.4.1.orig/CMakeLists.txt cairo-dock-plug-ins-3.4.1/CMakeLists.txt
  2. --- cairo-dock-plug-ins-3.4.1.orig/CMakeLists.txt 2015-03-12 09:43:57.171067365 +0100
  3. +++ cairo-dock-plug-ins-3.4.1/CMakeLists.txt 2015-03-12 09:46:20.717120675 +0100
  4. @@ -573,11 +573,11 @@ if (enable-mono-interface)
  5. if (NOT GMCS_EXECUTABLE OR NOT EXISTS ${GMCS_EXECUTABLE})
  6. message (STATUS "Could not find Mono compiler gmcs, won't build Mono interface.")
  7. else()
  8. - pkg_check_modules (MONO_PACKAGE glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0)
  9. + pkg_check_modules (MONO_PACKAGE dbus-sharp-2.0 dbus-sharp-glib-2.0 glib-sharp-3.0)
  10. if (NOT MONO_PACKAGE_FOUND)
  11. - message (STATUS "Could not find glib-sharp-2.0, ndesk-dbus-1.0 or ndesk-dbus-glib-1.0; won't be built Mono interface.")
  12. - message (WARNING "These modules are required to compile DBus applet with Mono interface: glib-sharp-2.0, ndesk-dbus-1.0 and ndesk-dbus-glib-1.0")
  13. - set (MODULES_MISSING "${MODULES_MISSING} glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0")
  14. + message (STATUS "Could not find dbus-sharp-2.0, dbus-sharp-glib-2.0 or glib-sharp-3.0; won't be built Mono interface.")
  15. + message (WARNING "These modules are required to compile DBus applet with Mono interface: dbus-sharp-2.0, dbus-sharp-glib-2.0 and glib-sharp-3.0")
  16. + set (MODULES_MISSING "${MODULES_MISSING} dbus-sharp-2.0 dbus-sharp-glib-2.0 glib-sharp-3.0")
  17. else()
  18. set (MONO_FOUND TRUE)
  19. set (with_mono yes)
  20. diff -rupN cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/CDApplet.cs cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/CDApplet.cs
  21. --- cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/CDApplet.cs 2015-03-12 09:52:56.491934965 +0100
  22. +++ cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/CDApplet.cs 2015-03-12 09:56:50.191652099 +0100
  23. @@ -21,7 +21,7 @@
  24. // Make your own class derive from a CDApplet, and override the functions you need (the ones which don't start with an underscore).
  25. // Compile it with the following command, then rename 'demo_mono.exe' to 'demo_mono'.
  26. -// gmcs /target:library CDApplet.cs ISubApplet.cs IApplet.cs -pkg:glib-sharp-2.0 -pkg:ndesk-dbus-1.0 -pkg:ndesk-dbus-glib-1.0
  27. +// gmcs /target:library CDApplet.cs ISubApplet.cs IApplet.cs -pkg:dbus-sharp-2.0 -pkg:dbus-sharp-glib-2.0 -pkg:glib-sharp-3.0
  28. //////////////////////////
  29. ////// dependancies //////
  30. //////////////////////////
  31. @@ -29,7 +29,7 @@ using System; // Environment
  32. using System.IO; // Path, Directory
  33. using System.Reflection;
  34. using GLib;
  35. -using NDesk.DBus;
  36. +using DBus;
  37. using CairoDock.Applet;
  38. //namespace CairoDock.Applet
  39. @@ -258,8 +258,8 @@ public class CDApplet
  40. private void _connect_to_dock ()
  41. {
  42. - NDesk.DBus.BusG.Init();
  43. - NDesk.DBus.Bus bus = NDesk.DBus.Bus.Session;
  44. + DBus.BusG.Init();
  45. + DBus.Bus bus = DBus.Bus.Session;
  46. this.icon = bus.GetObject<IApplet> ("org.cairodock.CairoDock", new ObjectPath (this.cBusPath));
  47. this.icon.on_click += new OnClickEvent (on_click);
  48. this.icon.on_middle_click += new OnMiddleClickEvent (on_middle_click);
  49. diff -rupN cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/CMakeLists.txt cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/CMakeLists.txt
  50. --- cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/CMakeLists.txt 2015-03-12 09:52:56.491934965 +0100
  51. +++ cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/CMakeLists.txt 2015-03-12 09:54:07.418777441 +0100
  52. @@ -3,7 +3,7 @@
  53. execute_process(COMMAND ${GMCS_EXECUTABLE}
  54. -target:library
  55. - -pkg:glib-sharp-2.0 -pkg:ndesk-dbus-1.0 -pkg:ndesk-dbus-glib-1.0
  56. + -pkg:dbus-sharp-2.0 -pkg:dbus-sharp-glib-2.0 -pkg:glib-sharp-3.0
  57. -out:${CMAKE_CURRENT_BINARY_DIR}/CDApplet.dll
  58. ${CMAKE_CURRENT_SOURCE_DIR}/CDApplet.cs ${CMAKE_CURRENT_SOURCE_DIR}/ISubApplet.cs ${CMAKE_CURRENT_SOURCE_DIR}/IApplet.cs)
  59. ### find how to register to GAC ...
  60. diff -rupN cairo-dock-plug-ins-3.4.1.orig/Dbus/demos/demo_mono/demo_mono.cs cairo-dock-plug-ins-3.4.1/Dbus/demos/demo_mono/demo_mono.cs
  61. --- cairo-dock-plug-ins-3.4.1.orig/Dbus/demos/demo_mono/demo_mono.cs 2015-03-12 09:59:41.064312097 +0100
  62. +++ cairo-dock-plug-ins-3.4.1/Dbus/demos/demo_mono/demo_mono.cs 2015-03-12 10:02:39.473424651 +0100
  63. @@ -138,7 +138,7 @@ public class Applet : CDApplet
  64. public override void on_build_menu ()
  65. {
  66. Console.WriteLine("*** build menu");
  67. - /// Warning : teh AddMenuItems fails with NDesk-DBus 0.6.0; until this is fixed, use the PopulateMenu method.
  68. + /// Warning : the AddMenuItems fails with DBus Sharp 0.6.0; until this is fixed, use the PopulateMenu method.
  69. /**Dictionary<string, object>[] pItems = new Dictionary<string, object>[] {
  70. new Dictionary<string, object>()
  71. {
  72. diff -rupN cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/IApplet.cs cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/IApplet.cs
  73. --- cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/IApplet.cs 2015-03-12 09:59:41.067645289 +0100
  74. +++ cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/IApplet.cs 2015-03-12 10:00:35.395334804 +0100
  75. @@ -1,6 +1,6 @@
  76. using System;
  77. using System.Collections.Generic; // Dictionnary
  78. -using NDesk.DBus;
  79. +using DBus;
  80. namespace CairoDock.Applet
  81. {
  82. @@ -27,7 +27,7 @@ namespace CairoDock.Applet
  83. Left
  84. }
  85. - [NDesk.DBus.Interface("org.cairodock.CairoDock.applet")]
  86. + [DBus.Interface("org.cairodock.CairoDock.applet")]
  87. public interface IApplet
  88. {
  89. object Get(string cProperty);
  90. diff -rupN cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/ISubApplet.cs cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/ISubApplet.cs
  91. --- cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/ISubApplet.cs 2015-03-12 09:59:41.067645289 +0100
  92. +++ cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/ISubApplet.cs 2015-03-12 10:00:16.522802989 +0100
  93. @@ -1,6 +1,6 @@
  94. using System;
  95. using System.Collections.Generic; // Dictionnary
  96. -using NDesk.DBus;
  97. +using DBus;
  98. namespace CairoDock.Applet
  99. {