Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Oct 2012 23:54:06 +0400 (MSK)
From:      Maxim Samsonov <xors@mne.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/172912: [MAINTAINER PATCH]: devel/dbus-qt3 Code cleanup
Message-ID:  <201210201954.q9KJs6bI088385@xors.pg.org>
Resent-Message-ID: <201210202010.q9KKA1lD023324@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172912
>Category:       ports
>Synopsis:       [MAINTAINER PATCH]: devel/dbus-qt3 Code cleanup
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 20 20:10:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Maxim Samsonov
>Release:        FreeBSD 8.3-STABLE i386
>Organization:
>Environment:
>Description:
- Some code cleanup
- Don't use deprecated dbus symbols
- Update maintainer's e-mail address
>How-To-Repeat:
>Fix:
--- devel_dbus-qt3.patch begins here ---
diff --git a/devel/dbus-qt3/Makefile b/devel/dbus-qt3/Makefile
--- a/devel/dbus-qt3/Makefile
+++ b/devel/dbus-qt3/Makefile
@@ -14,7 +14,7 @@
 PKGNAMESUFFIX=	-qt3
 DISTNAME=	${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}
 
-MAINTAINER=	xors@mne.ru
+MAINTAINER=	xors@mailup.net
 COMMENT=	Qt3 bindings for the D-BUS messaging system
 
 LIB_DEPENDS=	dbus-1.3:${PORTSDIR}/devel/dbus \
diff --git a/devel/dbus-qt3/files/patch-connection.cpp b/devel/dbus-qt3/files/patch-connection.cpp
new file mode 100644
--- /dev/null
+++ b/devel/dbus-qt3/files/patch-connection.cpp
@@ -0,0 +1,19 @@
+--- connection.cpp.orig	2006-07-18 16:15:13.000000000 +0400
++++ connection.cpp	2008-05-30 00:09:02.000000000 +0400
+@@ -106,7 +106,7 @@
+ 
+ void Connection::close()
+ {
+-  dbus_connection_close( d->connection );
++  dbus_connection_unref( d->connection );
+ }
+ 
+ void Connection::flush()
+@@ -154,6 +154,7 @@
+ 
+ void* Connection::virtual_hook( int, void*  )
+ {
++  return (void *)NULL;
+ }
+ 
+ void Connection::dbus_connection_setup_with_qt_main (DBusConnection *connection)
diff --git a/devel/dbus-qt3/files/patch-integrator.cpp b/devel/dbus-qt3/files/patch-integrator.cpp
new file mode 100644
--- /dev/null
+++ b/devel/dbus-qt3/files/patch-integrator.cpp
@@ -0,0 +1,20 @@
+--- integrator.cpp.orig	2008-05-30 00:12:59.000000000 +0400
++++ integrator.cpp	2008-05-30 00:15:20.000000000 +0400
+@@ -190,7 +190,7 @@
+   qtwatch->watch = watch;
+ 
+   int flags = dbus_watch_get_flags( watch );
+-  int fd = dbus_watch_get_fd( watch );
++  int fd = dbus_watch_get_unix_fd( watch );
+ 
+   if ( flags & DBUS_WATCH_READABLE ) {
+     qtwatch->readSocket = new QSocketNotifier( fd, QSocketNotifier::Read, this );
+@@ -207,7 +207,7 @@
+ 
+ void Integrator::removeWatch( DBusWatch *watch )
+ {
+-  int key = dbus_watch_get_fd( watch );
++  int key = dbus_watch_get_unix_fd( watch );
+ 
+   Watch *qtwatch = m_watches.take( key );
+ 
diff --git a/devel/dbus-qt3/files/patch-message.cpp b/devel/dbus-qt3/files/patch-message.cpp
new file mode 100644
--- /dev/null
+++ b/devel/dbus-qt3/files/patch-message.cpp
@@ -0,0 +1,74 @@
+--- message.cpp.orig	2006-07-18 15:42:53.000000000 +0400
++++ message.cpp	2008-05-30 00:09:02.000000000 +0400
+@@ -359,6 +359,7 @@
+ Message Message::operator=( const Message& other )
+ {
+   //FIXME: ref the other.d->msg instead of copying it?
++  return (Message &)(d->msg);
+ }
+ /**
+  * Destructs message.
+@@ -508,42 +509,49 @@
+   const dbus_bool_t right_size_bool = b;
+   dbus_message_append_args( d->msg, DBUS_TYPE_BOOLEAN, &right_size_bool,
+                             DBUS_TYPE_INVALID );
++  return (Message &)(d->msg);
+ }
+ 
+ Message& Message::operator<<( Q_INT8 byte )
+ {
+   dbus_message_append_args( d->msg, DBUS_TYPE_BYTE, &byte,
+                             DBUS_TYPE_INVALID );
++  return (Message &)(d->msg);
+ }
+ 
+ Message& Message::operator<<( Q_INT32 num )
+ {
+   dbus_message_append_args( d->msg, DBUS_TYPE_INT32, &num,
+                             DBUS_TYPE_INVALID );
++  return (Message &)(d->msg);
+ }
+ 
+ Message& Message::operator<<( Q_UINT32 num )
+ {
+   dbus_message_append_args( d->msg, DBUS_TYPE_UINT32, &num,
+                             DBUS_TYPE_INVALID );
++  return (Message &)(d->msg);
+ }
+ 
+ Message& Message::operator<<( Q_INT64 num )
+ {
+   dbus_message_append_args( d->msg, DBUS_TYPE_INT64, &num,
+                             DBUS_TYPE_INVALID );
++  return (Message &)(d->msg);
+ }
+ 
+ Message& Message::operator<<( Q_UINT64 num )
+ {
+   dbus_message_append_args( d->msg, DBUS_TYPE_UINT64, &num,
+                             DBUS_TYPE_INVALID );
++  return (Message &)(d->msg);
+ }
+ 
+ Message& Message::operator<<( double num )
+ {
+   dbus_message_append_args( d->msg, DBUS_TYPE_DOUBLE, &num,
+                             DBUS_TYPE_INVALID );
++  return (Message &)(d->msg);
+ }
+ 
+ Message& Message::operator<<( const QString& str )
+@@ -551,11 +559,13 @@
+   const char *u = str.utf8();
+   dbus_message_append_args( d->msg, DBUS_TYPE_STRING, &u,
+                             DBUS_TYPE_INVALID );
++  return (Message &)(d->msg);
+ }
+ 
+ Message& Message::operator<<( const QVariant& custom )
+ {
+   //FIXME: imeplement
++  return (Message &)(d->msg);
+ }
+ 
+ }
diff --git a/devel/dbus-qt3/pkg-descr b/devel/dbus-qt3/pkg-descr
--- a/devel/dbus-qt3/pkg-descr
+++ b/devel/dbus-qt3/pkg-descr
@@ -1,3 +1,3 @@
 Qt3 bindings for the D-BUS interprocess messaging system.
 
-WWW: http://www.freedesktop.org/wiki/Software_2fDBusBindings
+WWW: http://www.freedesktop.org/wiki/Software/DBusBindings
--- devel_dbus-qt3.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210201954.q9KJs6bI088385>