summaryrefslogtreecommitdiff
path: root/devel/qt4-dbus
diff options
context:
space:
mode:
Diffstat (limited to 'devel/qt4-dbus')
-rw-r--r--devel/qt4-dbus/Makefile71
-rw-r--r--devel/qt4-dbus/files/patch-tools__qdbus__qdbus__qdbus.cpp144
-rw-r--r--devel/qt4-dbus/pkg-plist76
3 files changed, 291 insertions, 0 deletions
diff --git a/devel/qt4-dbus/Makefile b/devel/qt4-dbus/Makefile
new file mode 100644
index 000000000000..511a01e2608a
--- /dev/null
+++ b/devel/qt4-dbus/Makefile
@@ -0,0 +1,71 @@
+# Created by: lofi@FreeBSD.org
+# $FreeBSD$
+
+PORTNAME= dbus
+DISTVERSION= ${QT4_VERSION}
+PORTREVISION= 1
+CATEGORIES= devel
+PKGNAMEPREFIX= qt4-
+
+MAINTAINER= kde@FreeBSD.org
+COMMENT= Qt D-Bus inter-process communication module
+
+LIB_DEPENDS= libdbus-1.so:devel/dbus
+
+BROKEN_sparc64= fails to compile: invalid conversion
+
+USES= pkgconfig
+USE_QT4= qmake_build moc_build rcc_build corelib xml
+QT_DIST= yes
+MAKE_JOBS_UNSAFE= yes
+
+HAS_CONFIGURE= yes
+USE_LDCONFIG= ${PREFIX}/${QT_LIBDIR_REL}
+
+ALL_TARGET= first
+CONFIGURE_ENV?= QTDIR=${WRKSRC} PATH=${WRKSRC}/bin:$$PATH
+MAKE_ENV?= QTDIR=${WRKSRC} LD_LIBRARY_PATH=${WRKSRC}/lib:$$LD_LIBRARY_PATH \
+ PATH=${WRKSRC}/bin:$$PATH
+
+DO_NOT_EXTRACT= demos doc examples mkspecs qmake translations \
+ src/activeqt src/gui src/multimedia src/network src/opengl \
+ src/openvg src/phonon src/qt3support src/s60installs \
+ src/s60main src/script src/scripttools src/sql src/svg \
+ src/testlib src/tools src/winmain src/xmlpatterns \
+ src/3rdparty/clucene src/3rdparty/freetype \
+ src/3rdparty/libjpeg src/3rdparty/libmng src/3rdparty/libpng \
+ src/3rdparty/libtiff src/3rdparty/phonon src/3rdparty/webkit
+.for dne in ${DO_NOT_EXTRACT}
+EXTRACT_AFTER_ARGS+= --exclude '${DISTNAME}/${dne}'
+.endfor
+
+BUILD_WRKSRC= ${WRKSRC}/tools/qdbus
+INSTALL_WRKSRC= ${BUILD_WRKSRC}
+
+.include <bsd.port.pre.mk>
+
+# Without this workaround, qdbus crashes.
+.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1000000
+CXXFLAGS+= -fno-use-cxa-atexit
+.endif
+
+CONFIGURE_ARGS+= --no-gui \
+ --no-phonon
+
+pre-configure:
+ ${REINPLACE_CMD} -e 's|SUBDIRS = qdbus|SUBDIRS = ../../src/${PORTNAME} qdbus|g' \
+ ${BUILD_WRKSRC}/qdbus.pro
+ ${REINPLACE_CMD} -e 's|"/moc"|"/${MOC:T}"|' \
+ ${BUILD_WRKSRC}/qdbuscpp2xml/qdbuscpp2xml.cpp
+ ${MKDIR} ${WRKSRC}/mkspecs
+ ${LN} -sf ${QMAKE} ${WRKSRC}/bin/qmake
+ ${LN} -sf ${MOC} ${WRKSRC}/bin/moc
+ ${LN} -sf ${RCC} ${WRKSRC}/bin/rcc
+
+post-configure:
+ ${REINPLACE_CMD} -e 's|${PREFIX}/${QT_LIBDIR_REL}/pkgconfig|${PREFIX}/libdata/pkgconfig|g' ${WRKSRC}/src/${PORTNAME}/Makefile
+ ${REINPLACE_CMD} -E -e 's|-L.[^[:space:]]*qt-x11-opensource.[^[:space:]]*lib||g' \
+ -E -e 's|(.*location=).*moc|\1${PREFIX}/${QT_BINDIR_REL}/${MOC:T}|g' \
+ ${WRKSRC}/lib/pkgconfig/QtDBus.pc
+
+.include <bsd.port.post.mk>
diff --git a/devel/qt4-dbus/files/patch-tools__qdbus__qdbus__qdbus.cpp b/devel/qt4-dbus/files/patch-tools__qdbus__qdbus__qdbus.cpp
new file mode 100644
index 000000000000..eab9f93025d8
--- /dev/null
+++ b/devel/qt4-dbus/files/patch-tools__qdbus__qdbus__qdbus.cpp
@@ -0,0 +1,144 @@
+--- tools/qdbus/qdbus/qdbus.cpp.orig 2012-04-26 21:45:51.000000000 +0200
++++ tools/qdbus/qdbus/qdbus.cpp 2012-12-07 14:46:43.000000000 +0100
+@@ -54,7 +54,6 @@ QT_BEGIN_NAMESPACE
+ Q_DBUS_EXPORT extern bool qt_dbus_metaobject_skip_annotations;
+ QT_END_NAMESPACE
+
+-static QDBusConnection connection(QLatin1String(""));
+ static bool printArgumentsLiterally = false;
+
+ static void showUsage()
+@@ -111,7 +110,7 @@ static void printArg(const QVariant &v)
+ }
+ }
+
+-static void listObjects(const QString &service, const QString &path)
++static void listObjects(const QString &service, const QString &path, const QDBusConnection &connection)
+ {
+ // make a low-level call, to avoid introspecting the Introspectable interface
+ QDBusMessage call = QDBusMessage::createMethodCall(service, path.isEmpty() ? QLatin1String("/") : path,
+@@ -144,13 +143,13 @@ static void listObjects(const QString &s
+ if (child.tagName() == QLatin1String("node")) {
+ QString sub = path + QLatin1Char('/') + child.attribute(QLatin1String("name"));
+ printf("%s\n", qPrintable(sub));
+- listObjects(service, sub);
++ listObjects(service, sub, connection);
+ }
+ child = child.nextSiblingElement();
+ }
+ }
+
+-static void listInterface(const QString &service, const QString &path, const QString &interface)
++static void listInterface(const QString &service, const QString &path, const QString &interface, const QDBusConnection &connection)
+ {
+ QDBusInterface iface(service, path, interface, connection);
+ if (!iface.isValid()) {
+@@ -204,7 +203,7 @@ static void listInterface(const QString
+ }
+ }
+
+-static void listAllInterfaces(const QString &service, const QString &path)
++static void listAllInterfaces(const QString &service, const QString &path, const QDBusConnection &connection)
+ {
+ // make a low-level call, to avoid introspecting the Introspectable interface
+ QDBusMessage call = QDBusMessage::createMethodCall(service, path.isEmpty() ? QLatin1String("/") : path,
+@@ -229,7 +228,7 @@ static void listAllInterfaces(const QStr
+ if (child.tagName() == QLatin1String("interface")) {
+ QString ifaceName = child.attribute(QLatin1String("name"));
+ if (QDBusUtil::isValidInterfaceName(ifaceName))
+- listInterface(service, path, ifaceName);
++ listInterface(service, path, ifaceName, connection);
+ else {
+ qWarning("Invalid D-BUS interface name '%s' found while parsing introspection",
+ qPrintable(ifaceName));
+@@ -253,7 +252,7 @@ static QStringList readList(QStringList
+ return retval;
+ }
+
+-static int placeCall(const QString &service, const QString &path, const QString &interface,
++static int placeCall(const QString &service, const QString &path, const QString &interface, const QDBusConnection &connection,
+ const QString &member, const QStringList& arguments, bool try_prop=true)
+ {
+ QDBusInterface iface(service, path, interface, connection);
+@@ -291,7 +290,7 @@ static int placeCall(const QString &serv
+ proparg += interface;
+ proparg += member;
+ proparg += args.first();
+- if (!placeCall(service, path, "org.freedesktop.DBus.Properties", "Set", proparg, false))
++ if (!placeCall(service, path, "org.freedesktop.DBus.Properties", connection, "Set", proparg, false))
+ return 0;
+ }
+ fprintf(stderr, "Cannot find '%s.%s' in object %s at %s\n",
+@@ -387,7 +386,7 @@ static int placeCall(const QString &serv
+ QStringList proparg;
+ proparg += interface;
+ proparg += member;
+- if (!placeCall(service, path, "org.freedesktop.DBus.Properties", "Get", proparg, false))
++ if (!placeCall(service, path, "org.freedesktop.DBus.Properties", connection, "Get", proparg, false))
+ return 0;
+ }
+ if (err.type() == QDBusError::ServiceUnknown)
+@@ -448,6 +447,7 @@ int main(int argc, char **argv)
+ QCoreApplication app(argc, argv);
+ QStringList args = app.arguments();
+ args.takeFirst();
++ QDBusConnection connection(QLatin1String(""));
+
+ bool connectionOpened = false;
+ while (!args.isEmpty() && args.at(0).startsWith(QLatin1Char('-'))) {
+@@ -481,7 +481,7 @@ int main(int argc, char **argv)
+ QDBusConnectionInterface *bus = connection.interface();
+ if (args.isEmpty()) {
+ printAllServices(bus);
+- exit(0);
++ return 0;
+ }
+
+ QString service = args.takeFirst();
+@@ -491,22 +491,22 @@ int main(int argc, char **argv)
+ return 0;
+ }
+ fprintf(stderr, "Service '%s' is not a valid name.\n", qPrintable(service));
+- exit(1);
++ return 1;
+ }
+
+ if (args.isEmpty()) {
+- listObjects(service, QString());
+- exit(0);
++ listObjects(service, QString(), connection);
++ return 0;
+ }
+
+ QString path = args.takeFirst();
+ if (!QDBusUtil::isValidObjectPath(path)) {
+ fprintf(stderr, "Path '%s' is not a valid path name.\n", qPrintable(path));
+- exit(1);
++ return 1;
+ }
+ if (args.isEmpty()) {
+- listAllInterfaces(service, path);
+- exit(0);
++ listAllInterfaces(service, path, connection);
++ return 0;
+ }
+
+ QString interface = args.takeFirst();
+@@ -521,14 +521,13 @@ int main(int argc, char **argv)
+ }
+ if (!interface.isEmpty() && !QDBusUtil::isValidInterfaceName(interface)) {
+ fprintf(stderr, "Interface '%s' is not a valid interface name.\n", qPrintable(interface));
+- exit(1);
++ return 1;
+ }
+ if (!QDBusUtil::isValidMemberName(member)) {
+ fprintf(stderr, "Method name '%s' is not a valid member name.\n", qPrintable(member));
+- exit(1);
++ return 1;
+ }
+
+- int ret = placeCall(service, path, interface, member, args);
+- exit(ret);
++ return placeCall(service, path, interface, connection, member, args);
+ }
+
diff --git a/devel/qt4-dbus/pkg-plist b/devel/qt4-dbus/pkg-plist
new file mode 100644
index 000000000000..5ad61d5a00c7
--- /dev/null
+++ b/devel/qt4-dbus/pkg-plist
@@ -0,0 +1,76 @@
+%%QT_BINDIR%%/qdbus
+%%DEBUG%%%%QT_BINDIR%%/qdbus.debug
+%%QT_BINDIR%%/qdbuscpp2xml
+%%DEBUG%%%%QT_BINDIR%%/qdbuscpp2xml.debug
+%%QT_BINDIR%%/qdbusxml2cpp
+%%DEBUG%%%%QT_BINDIR%%/qdbusxml2cpp.debug
+%%QT_INCDIR%%/Qt/QtDBus
+%%QT_INCDIR%%/Qt/qdbusabstractadaptor.h
+%%QT_INCDIR%%/Qt/qdbusabstractinterface.h
+%%QT_INCDIR%%/Qt/qdbusargument.h
+%%QT_INCDIR%%/Qt/qdbusconnection.h
+%%QT_INCDIR%%/Qt/qdbusconnectioninterface.h
+%%QT_INCDIR%%/Qt/qdbuscontext.h
+%%QT_INCDIR%%/Qt/qdbuserror.h
+%%QT_INCDIR%%/Qt/qdbusextratypes.h
+%%QT_INCDIR%%/Qt/qdbusinterface.h
+%%QT_INCDIR%%/Qt/qdbusmacros.h
+%%QT_INCDIR%%/Qt/qdbusmessage.h
+%%QT_INCDIR%%/Qt/qdbusmetatype.h
+%%QT_INCDIR%%/Qt/qdbuspendingcall.h
+%%QT_INCDIR%%/Qt/qdbuspendingreply.h
+%%QT_INCDIR%%/Qt/qdbusreply.h
+%%QT_INCDIR%%/Qt/qdbusserver.h
+%%QT_INCDIR%%/Qt/qdbusservicewatcher.h
+%%QT_INCDIR%%/Qt/qdbusunixfiledescriptor.h
+%%QT_INCDIR%%/Qt/qdbusvirtualobject.h
+%%QT_INCDIR%%/QtDBus/QDBusAbstractAdaptor
+%%QT_INCDIR%%/QtDBus/QDBusAbstractInterface
+%%QT_INCDIR%%/QtDBus/QDBusAbstractInterfaceBase
+%%QT_INCDIR%%/QtDBus/QDBusArgument
+%%QT_INCDIR%%/QtDBus/QDBusConnection
+%%QT_INCDIR%%/QtDBus/QDBusConnectionInterface
+%%QT_INCDIR%%/QtDBus/QDBusContext
+%%QT_INCDIR%%/QtDBus/QDBusError
+%%QT_INCDIR%%/QtDBus/QDBusInterface
+%%QT_INCDIR%%/QtDBus/QDBusMessage
+%%QT_INCDIR%%/QtDBus/QDBusMetaType
+%%QT_INCDIR%%/QtDBus/QDBusObjectPath
+%%QT_INCDIR%%/QtDBus/QDBusPendingCall
+%%QT_INCDIR%%/QtDBus/QDBusPendingCallWatcher
+%%QT_INCDIR%%/QtDBus/QDBusPendingReply
+%%QT_INCDIR%%/QtDBus/QDBusPendingReplyData
+%%QT_INCDIR%%/QtDBus/QDBusReply
+%%QT_INCDIR%%/QtDBus/QDBusServer
+%%QT_INCDIR%%/QtDBus/QDBusServiceWatcher
+%%QT_INCDIR%%/QtDBus/QDBusSignature
+%%QT_INCDIR%%/QtDBus/QDBusUnixFileDescriptor
+%%QT_INCDIR%%/QtDBus/QDBusVariant
+%%QT_INCDIR%%/QtDBus/QDBusVirtualObject
+%%QT_INCDIR%%/QtDBus/QtDBus
+%%QT_INCDIR%%/QtDBus/qdbusabstractadaptor.h
+%%QT_INCDIR%%/QtDBus/qdbusabstractinterface.h
+%%QT_INCDIR%%/QtDBus/qdbusargument.h
+%%QT_INCDIR%%/QtDBus/qdbusconnection.h
+%%QT_INCDIR%%/QtDBus/qdbusconnectioninterface.h
+%%QT_INCDIR%%/QtDBus/qdbuscontext.h
+%%QT_INCDIR%%/QtDBus/qdbuserror.h
+%%QT_INCDIR%%/QtDBus/qdbusextratypes.h
+%%QT_INCDIR%%/QtDBus/qdbusinterface.h
+%%QT_INCDIR%%/QtDBus/qdbusmacros.h
+%%QT_INCDIR%%/QtDBus/qdbusmessage.h
+%%QT_INCDIR%%/QtDBus/qdbusmetatype.h
+%%QT_INCDIR%%/QtDBus/qdbuspendingcall.h
+%%QT_INCDIR%%/QtDBus/qdbuspendingreply.h
+%%QT_INCDIR%%/QtDBus/qdbusreply.h
+%%QT_INCDIR%%/QtDBus/qdbusserver.h
+%%QT_INCDIR%%/QtDBus/qdbusservicewatcher.h
+%%QT_INCDIR%%/QtDBus/qdbusunixfiledescriptor.h
+%%QT_INCDIR%%/QtDBus/qdbusvirtualobject.h
+%%QT_LIBDIR%%/libQtDBus.prl
+%%QT_LIBDIR%%/libQtDBus.so
+%%QT_LIBDIR%%/libQtDBus.so.4
+%%QT_LIBDIR%%/libQtDBus.so.%%SHORTVER%%
+%%QT_LIBDIR%%/libQtDBus.so.%%FULLVER%%
+%%DEBUG%%%%QT_LIBDIR%%/libQtDBus.so.%%FULLVER%%.debug
+libdata/pkgconfig/QtDBus.pc