summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarinus Schraal <foser@gentoo.org>2004-10-31 14:37:16 +0000
committerMarinus Schraal <foser@gentoo.org>2004-10-31 14:37:16 +0000
commitce385f3323526cbef0c50aa5111d2bc94cd4f863 (patch)
treee9832b4a95c5241b15181193ba57ac27ca8e9b4b /sys-apps/dbus
parentCorrected metadata.xml to match DTD. (Manifest recommit) (diff)
downloadgentoo-2-ce385f3323526cbef0c50aa5111d2bc94cd4f863.tar.gz
gentoo-2-ce385f3323526cbef0c50aa5111d2bc94cd4f863.tar.bz2
gentoo-2-ce385f3323526cbef0c50aa5111d2bc94cd4f863.zip
rev bump, readd mono bindings
Diffstat (limited to 'sys-apps/dbus')
-rw-r--r--sys-apps/dbus/ChangeLog8
-rw-r--r--sys-apps/dbus/Manifest4
-rw-r--r--sys-apps/dbus/dbus-0.22-r2.ebuild141
-rw-r--r--sys-apps/dbus/files/dbus-0.22-bus_driver_know_thyself.patch42
-rw-r--r--sys-apps/dbus/files/dbus-0.22-mono_bindings.patch197
-rw-r--r--sys-apps/dbus/files/dbus-0.22-mono_service_owner.patch31
-rw-r--r--sys-apps/dbus/files/digest-dbus-0.22-r21
7 files changed, 423 insertions, 1 deletions
diff --git a/sys-apps/dbus/ChangeLog b/sys-apps/dbus/ChangeLog
index 7f696f406fed..b3ae7ca74e8b 100644
--- a/sys-apps/dbus/ChangeLog
+++ b/sys-apps/dbus/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/dbus
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/ChangeLog,v 1.18 2004/10/28 22:17:05 foser Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/ChangeLog,v 1.19 2004/10/31 14:37:16 foser Exp $
+
+*dbus-0.22-r2 (31 Oct 2004)
+
+ 31 Oct 2004; foser <foser@gentoo.org> dbus-0.22-r2.ebuild :
+ Re-enable mono USE
+ Add a couple of patches to get the mono bindings up to par
29 Oct 2004; foser <foser@gentoo.org> dbus-0.22-r1.ebuild :
Disable mono USE, so we can mark stable
diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
index fe16c708b957..a21aef10f25a 100644
--- a/sys-apps/dbus/Manifest
+++ b/sys-apps/dbus/Manifest
@@ -1,6 +1,10 @@
+MD5 030f61b0219fb5056e376de93c8b3b7f dbus-0.22-r2.ebuild 3126
MD5 a3ee6218307390858a50ed11f8c0d845 dbus-0.22-r1.ebuild 2860
MD5 121b3c74967d2443e95523ae7a5023aa ChangeLog 2867
MD5 5b5bcd9c1a432b2c8157b0004a073f72 metadata.xml 224
MD5 5ad50ae94f784548fc0d6f1364ce23bb files/dbus 544
MD5 032a780f5d3dd0c743f2b932424fd39c files/dbus-0.22-python_int64.patch 5448
MD5 b0cc4f0bb3505fb083602b48c09f25a6 files/digest-dbus-0.22-r1 62
+MD5 b0cc4f0bb3505fb083602b48c09f25a6 files/digest-dbus-0.22-r2 62
+MD5 89670f39c616e08e472a236ed9079b34 files/dbus-0.22-mono_bindings.patch 5122
+MD5 0bbcecc888e29256a5b9a8b1b110099c files/dbus-0.22-bus_driver_know_thyself.patch 1373
diff --git a/sys-apps/dbus/dbus-0.22-r2.ebuild b/sys-apps/dbus/dbus-0.22-r2.ebuild
new file mode 100644
index 000000000000..efa00b8923f3
--- /dev/null
+++ b/sys-apps/dbus/dbus-0.22-r2.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-0.22-r2.ebuild,v 1.1 2004/10/31 14:37:16 foser Exp $
+
+# because of the experimental nature debug by default
+inherit debug eutils mono python
+
+# FIXME : fix docs
+#IUSE="X gtk qt python mono doc xml2"
+IUSE="X gtk python mono xml2"
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to eachother"
+HOMEPAGE="http://www.freedesktop.org/software/dbus/"
+SRC_URI="http://www.freedesktop.org/software/dbus/releases/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="|| ( GPL-2 AFL-2.1 )"
+KEYWORDS="~x86 ~ppc ~amd64"
+
+RDEPEND=">=dev-libs/glib-2
+ xml2? ( >=dev-libs/libxml2-2.6 )
+ !xml2? ( dev-libs/expat )
+ X? ( virtual/x11 )
+ gtk? ( >=x11-libs/gtk+-2 )
+ python? ( >=dev-lang/python-2.2
+ >=dev-python/pyrex-0.9 )
+ mono? ( >=dev-dotnet/mono-0.95 )"
+
+# qt? ( >=x11-libs/qt-3 )
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+# doc? ( app-doc/doxygen
+# app-text/xmlto )"
+
+# needs gcj, we have no neat way of knowing if it was enabled
+# java? ( sys-devel/gcc )
+
+src_unpack() {
+
+ unpack ${A}
+
+ cd ${S}
+ epatch ${FILESDIR}/${P}-python_int64.patch
+
+ local cs
+ # a few cvs patches for beagle
+ cd ${S}/mono
+ for cs in *.cs; do
+ einfo "Removing CR from ${cs}"
+ sed -e "s/\r//" ${cs} > ${cs}.new
+ mv ${cs}.new ${cs}
+ done;
+ epatch ${FILESDIR}/${P}-mono_bindings.patch
+ cd ${S}/bus
+ epatch ${FILESDIR}/${P}-bus_driver_know_thyself.patch
+ cd ${S}
+ epatch ${FILESDIR}/${P}-mono_service_owner.patch
+
+ cd ${S}
+ automake || die
+
+}
+
+src_compile() {
+
+ local myconf
+
+ if use xml2; then
+ myconf="--with-xml=libxml";
+ else
+ myconf="--with-xml=expat";
+ fi
+
+ econf \
+ `use_enable X x` \
+ `use_enable gtk` \
+ --disable-qt \
+ `use_enable python` \
+ `use_enable mono` \
+ --enable-glib \
+ --enable-verbose-mode \
+ --enable-checks \
+ --enable-asserts \
+ --with-system-pid-file=/var/run/dbus.pid \
+ --with-system-socket=/var/lib/dbus/system_bus_socket \
+ --with-session-socket-dir=/tmp \
+ --disable-doxygen-docs \
+ --disable-xml-docs \
+ --disable-mono-docs \
+ ${myconf} \
+ || die
+
+# `use_enable qt` \
+# `use_enable doc doxygen-docs` \
+# `use_enable doc xml-docs` \
+
+ # do not build the mono examples, they need gtk-sharp
+ touch ${S}/mono/example/echo-{server,client}.exe
+
+ # this gets around a lib64 sandbox bug. note that this addpredict is
+ # added automatically by sandbox.c for lib.
+ addpredict /usr/lib64/python2.3/
+ addpredict /usr/lib64/python2.2/
+ addpredict /usr/lib64/python2.1/
+
+ emake || die
+
+}
+
+src_install() {
+
+ make DESTDIR=${D} install || die
+
+ # initscript
+ exeinto /etc/init.d/
+ doexe ${FILESDIR}/dbus
+
+ # needs to exist for the system socket
+ keepdir /var/lib/dbus
+
+ keepdir /usr/lib/dbus-1.0/services
+
+ dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO doc/*html
+
+}
+
+pkg_preinst() {
+
+ enewgroup messagebus || die "Problem adding messagebus group"
+ enewuser messagebus -1 /bin/false /dev/null messagebus || die "Problem adding messagebus user"
+
+}
+
+pkg_postinst() {
+
+ einfo "To start the DBUS system-wide messagebus by default"
+ einfo "you should add it to the default runlevel :"
+ einfo "\`rc-update add dbus default\`"
+
+}
diff --git a/sys-apps/dbus/files/dbus-0.22-bus_driver_know_thyself.patch b/sys-apps/dbus/files/dbus-0.22-bus_driver_know_thyself.patch
new file mode 100644
index 000000000000..6edf75fb09c2
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-0.22-bus_driver_know_thyself.patch
@@ -0,0 +1,42 @@
+Index: driver.c
+===================================================================
+RCS file: /cvs/dbus/dbus/bus/driver.c,v
+retrieving revision 1.53
+diff -u -p -r1.53 driver.c
+--- driver.c 25 Aug 2004 08:03:12 -0000 1.53
++++ driver.c 26 Aug 2004 16:38:11 -0000
+@@ -511,6 +511,7 @@ bus_driver_handle_service_exists (DBusCo
+ DBusMessage *reply;
+ DBusString service_name;
+ BusService *service;
++ dbus_bool_t service_exists;
+ char *name;
+ dbus_bool_t retval;
+ BusRegistry *registry;
+@@ -525,9 +526,14 @@ bus_driver_handle_service_exists (DBusCo
+ return FALSE;
+
+ retval = FALSE;
+-
+- _dbus_string_init_const (&service_name, name);
+- service = bus_registry_lookup (registry, &service_name);
++
++ if (strcmp (name, DBUS_SERVICE_ORG_FREEDESKTOP_DBUS) == 0) {
++ service_exists = TRUE;
++ } else {
++ _dbus_string_init_const (&service_name, name);
++ service = bus_registry_lookup (registry, &service_name);
++ service_exists = service != NULL;
++ }
+
+ reply = dbus_message_new_method_return (message);
+ if (reply == NULL)
+@@ -537,7 +543,7 @@ bus_driver_handle_service_exists (DBusCo
+ }
+
+ if (!dbus_message_append_args (reply,
+- DBUS_TYPE_BOOLEAN, service != NULL,
++ DBUS_TYPE_BOOLEAN, service_exists,
+ 0))
+ {
+ BUS_SET_OOM (error);
diff --git a/sys-apps/dbus/files/dbus-0.22-mono_bindings.patch b/sys-apps/dbus/files/dbus-0.22-mono_bindings.patch
new file mode 100644
index 000000000000..ea75c18f5fa5
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-0.22-mono_bindings.patch
@@ -0,0 +1,197 @@
+Index: BusDriver.cs
+===================================================================
+RCS file: BusDriver.cs
+diff -N BusDriver.cs
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ BusDriver.cs 30 Aug 2004 16:17:20 -0000
+@@ -0,0 +1,39 @@
++namespace DBus
++{
++
++ using System;
++
++ public delegate void ServiceEventHandler (string serviceName);
++
++ [Interface ("org.freedesktop.DBus")]
++ public abstract class BusDriver
++ {
++ [Method]
++ public abstract string[] ListServices ();
++
++ [Method]
++ public abstract string GetServiceOwner (string serviceName);
++
++ [Method]
++ public abstract UInt32 GetConnectionUnixUser (string connectionName);
++
++
++ [Signal]
++ public virtual event ServiceEventHandler ServiceCreated;
++
++ [Signal]
++ public virtual event ServiceEventHandler ServiceDeleted;
++
++
++ static public BusDriver New (Connection connection)
++ {
++ Service service;
++ service = Service.Get (connection, "org.freedesktop.DBus");
++
++ BusDriver driver;
++ driver = (BusDriver) service.GetObject (typeof (BusDriver), "/org/freedesktop/DBus");
++
++ return driver;
++ }
++ }
++}
+Index: Connection.cs
+===================================================================
+RCS file: /cvs/dbus/dbus/mono/Connection.cs,v
+retrieving revision 1.8
+diff -u -p -r1.8 Connection.cs
+--- Connection.cs 29 Aug 2004 18:14:30 -0000 1.8
++++ Connection.cs 30 Aug 2004 16:17:20 -0000
+@@ -76,6 +76,14 @@ namespace DBus
+ return new Connection(rawConnection);
+ }
+
++ public string BaseService
++ {
++ get
++ {
++ return Marshal.PtrToStringAnsi (dbus_bus_get_base_service (RawConnection));
++ }
++ }
++
+ public int Timeout
+ {
+ get
+@@ -182,5 +190,8 @@ namespace DBus
+
+ [DllImport ("dbus-1")]
+ private extern static void dbus_connection_disconnect (IntPtr ptr);
++
++ [DllImport ("dbus-1")]
++ private extern static IntPtr dbus_bus_get_base_service (IntPtr ptr);
+ }
+ }
+Index: Handler.cs
+===================================================================
+RCS file: /cvs/dbus/dbus/mono/Handler.cs,v
+retrieving revision 1.6
+diff -u -p -r1.6 Handler.cs
+--- Handler.cs 7 Jun 2004 11:40:20 -0000 1.6
++++ Handler.cs 30 Aug 2004 16:17:20 -0000
+@@ -177,11 +177,15 @@ namespace DBus
+ }
+
+ MethodInfo method = interfaceProxy.GetMethod(methodCall.Key);
++
++ Message.Push (methodCall);
+
+ // Now call the method. FIXME: Error handling
+ object [] args = methodCall.Arguments.GetParameters(method);
+ object retVal = method.Invoke(this.handledObject, args);
+
++ Message.Pop ();
++
+ // Create the reply and send it
+ MethodReturn methodReturn = new MethodReturn(methodCall);
+ methodReturn.Arguments.AppendResults(method, retVal, args);
+Index: Makefile.am
+===================================================================
+RCS file: /cvs/dbus/dbus/mono/Makefile.am,v
+retrieving revision 1.10
+diff -u -p -r1.10 Makefile.am
+--- Makefile.am 17 Aug 2004 17:08:32 -0000 1.10
++++ Makefile.am 30 Aug 2004 16:17:20 -0000
+@@ -9,6 +9,7 @@ ASSEMBLY_NAME=dbus-sharp
+ DBUS_SHARP_FILES= \
+ Arguments.cs \
+ Bus.cs \
++ BusDriver.cs \
+ Connection.cs \
+ Custom.cs \
+ DBusException.cs \
+Index: Message.cs
+===================================================================
+RCS file: /cvs/dbus/dbus/mono/Message.cs,v
+retrieving revision 1.9
+diff -u -p -r1.9 Message.cs
+--- Message.cs 29 Aug 2004 18:14:30 -0000 1.9
++++ Message.cs 30 Aug 2004 16:17:20 -0000
+@@ -8,6 +8,25 @@ namespace DBus
+
+ public class Message
+ {
++ private static Stack stack = new Stack ();
++
++ static public Message Current {
++ get
++ {
++ return stack.Count > 0 ? (Message) stack.Peek () : null;
++ }
++ }
++
++ static internal void Push (Message message)
++ {
++ stack.Push (message);
++ }
++
++ static internal void Pop ()
++ {
++ stack.Pop ();
++ }
++
+
+ /// <summary>
+ /// A pointer to the underlying Message structure
+@@ -294,6 +313,22 @@ namespace DBus
+ }
+ }
+
++ public string Sender
++ {
++ get
++ {
++ return Marshal.PtrToStringAnsi(dbus_message_get_sender(RawMessage));
++ }
++ }
++
++ public string Destination
++ {
++ get
++ {
++ return Marshal.PtrToStringAnsi(dbus_message_get_destination(RawMessage));
++ }
++ }
++
+ protected int Slot
+ {
+ get
+@@ -373,5 +408,8 @@ namespace DBus
+
+ [DllImport("dbus-1")]
+ private extern static IntPtr dbus_message_get_destination(IntPtr rawMessage);
++
++ [DllImport("dbus-1")]
++ private extern static IntPtr dbus_message_get_sender(IntPtr rawMessage);
+ }
+ }
+Index: Service.cs
+===================================================================
+RCS file: /cvs/dbus/dbus/mono/Service.cs,v
+retrieving revision 1.6
+diff -u -p -r1.6 Service.cs
+--- Service.cs 23 May 2004 21:33:14 -0000 1.6
++++ Service.cs 30 Aug 2004 16:17:20 -0000
+@@ -128,7 +128,9 @@ namespace DBus
+ // We're only interested in signals
+ Signal signal = (Signal) message;
+ if (SignalCalled != null) {
++ Message.Push (message);
+ SignalCalled(signal);
++ Message.Pop ();
+ }
+ }
+
diff --git a/sys-apps/dbus/files/dbus-0.22-mono_service_owner.patch b/sys-apps/dbus/files/dbus-0.22-mono_service_owner.patch
new file mode 100644
index 000000000000..8b2b5c63539d
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-0.22-mono_service_owner.patch
@@ -0,0 +1,31 @@
+===================================================================
+RCS file: /cvs/dbus/dbus/mono/BusDriver.cs,v
+retrieving revision 1.1
+retrieving revision 1.2
+diff -u -r1.1 -r1.2
+--- dbus/dbus/mono/BusDriver.cs 2004/08/31 03:59:14 1.1
++++ dbus/dbus/mono/BusDriver.cs 2004/09/29 01:46:45 1.2
+@@ -3,7 +3,9 @@
+
+ using System;
+
+- public delegate void ServiceEventHandler (string serviceName);
++ public delegate void ServiceEventHandler (string serviceName,
++ string oldOwner,
++ string newOwner);
+
+ [Interface ("org.freedesktop.DBus")]
+ public abstract class BusDriver
+@@ -19,11 +21,7 @@
+
+
+ [Signal]
+- public virtual event ServiceEventHandler ServiceCreated;
+-
+- [Signal]
+- public virtual event ServiceEventHandler ServiceDeleted;
+-
++ public virtual event ServiceEventHandler ServiceOwnerChanged;
+
+ static public BusDriver New (Connection connection)
+ {
diff --git a/sys-apps/dbus/files/digest-dbus-0.22-r2 b/sys-apps/dbus/files/digest-dbus-0.22-r2
new file mode 100644
index 000000000000..d2af6e21be95
--- /dev/null
+++ b/sys-apps/dbus/files/digest-dbus-0.22-r2
@@ -0,0 +1 @@
+MD5 6b1c2476ea8b82dd9fb7f29ef857cb9f dbus-0.22.tar.gz 1248780