summaryrefslogtreecommitdiff
path: root/package/dbus-glib
diff options
context:
space:
mode:
Diffstat (limited to 'package/dbus-glib')
-rw-r--r--package/dbus-glib/Config.in9
-rw-r--r--package/dbus-glib/dbus-glib-0.70-dontgeneratexml.patch77
-rw-r--r--package/dbus-glib/dbus-glib-cross-compile.patch129
-rw-r--r--package/dbus-glib/dbus-glib.mk82
4 files changed, 297 insertions, 0 deletions
diff --git a/package/dbus-glib/Config.in b/package/dbus-glib/Config.in
new file mode 100644
index 000000000..285687a60
--- /dev/null
+++ b/package/dbus-glib/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_DBUS_GLIB
+ bool "dbus-glib"
+ default n
+ depends on BR2_PACKAGE_DBUS
+ select BR2_PACKAGE_LIBGLIB2
+ help
+ GLib bindings for D-Bus.
+
+ http://www.freedesktop.org/software/dbus
diff --git a/package/dbus-glib/dbus-glib-0.70-dontgeneratexml.patch b/package/dbus-glib/dbus-glib-0.70-dontgeneratexml.patch
new file mode 100644
index 000000000..1a18a7086
--- /dev/null
+++ b/package/dbus-glib/dbus-glib-0.70-dontgeneratexml.patch
@@ -0,0 +1,77 @@
+--- dbus-glib-0.70/tools/dbus-bus-introspect.xml.dontgenerate 2006-07-18 15:14:38.000000000 -0400
++++ dbus-glib-0.70/tools/dbus-bus-introspect.xml 2006-07-18 15:13:17.000000000 -0400
+@@ -0,0 +1,74 @@
++ <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
++"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
++<node>
++ <interface name="org.freedesktop.DBus.Introspectable">
++ <method name="Introspect">
++ <arg name="data" direction="out" type="s"/>
++ </method>
++ </interface>
++ <interface name="org.freedesktop.DBus">
++ <method name="RequestName">
++ <arg direction="in" type="s"/>
++ <arg direction="in" type="u"/>
++ <arg direction="out" type="u"/>
++ </method>
++ <method name="ReleaseName">
++ <arg direction="in" type="s"/>
++ <arg direction="out" type="u"/>
++ </method>
++ <method name="StartServiceByName">
++ <arg direction="in" type="s"/>
++ <arg direction="in" type="u"/>
++ <arg direction="out" type="u"/>
++ </method>
++ <method name="Hello">
++ <arg direction="out" type="s"/>
++ </method>
++ <method name="NameHasOwner">
++ <arg direction="in" type="s"/>
++ <arg direction="out" type="b"/>
++ </method>
++ <method name="ListNames">
++ <arg direction="out" type="as"/>
++ </method>
++ <method name="AddMatch">
++ <arg direction="in" type="s"/>
++ </method>
++ <method name="RemoveMatch">
++ <arg direction="in" type="s"/>
++ </method>
++ <method name="GetNameOwner">
++ <arg direction="in" type="s"/>
++ <arg direction="out" type="s"/>
++ </method>
++ <method name="ListQueuedOwners">
++ <arg direction="in" type="s"/>
++ <arg direction="out" type="as"/>
++ </method>
++ <method name="GetConnectionUnixUser">
++ <arg direction="in" type="s"/>
++ <arg direction="out" type="u"/>
++ </method>
++ <method name="GetConnectionUnixProcessID">
++ <arg direction="in" type="s"/>
++ <arg direction="out" type="u"/>
++ </method>
++ <method name="GetConnectionSELinuxSecurityContext">
++ <arg direction="in" type="s"/>
++ <arg direction="out" type="ay"/>
++ </method>
++ <method name="ReloadConfig">
++ </method>
++ <signal name="NameOwnerChanged">
++ <arg type="s"/>
++ <arg type="s"/>
++ <arg type="s"/>
++ </signal>
++ <signal name="NameLost">
++ <arg type="s"/>
++ </signal>
++ <signal name="NameAcquired">
++ <arg type="s"/>
++ </signal>
++ </interface>
++</node>
diff --git a/package/dbus-glib/dbus-glib-cross-compile.patch b/package/dbus-glib/dbus-glib-cross-compile.patch
new file mode 100644
index 000000000..b9768830f
--- /dev/null
+++ b/package/dbus-glib/dbus-glib-cross-compile.patch
@@ -0,0 +1,129 @@
+diff -ur dbus-glib-0.72/configure.ac dbus-glib-0.72-patched/configure.ac
+--- dbus-glib-0.72/configure.ac 2006-10-25 15:53:55.000000000 -0500
++++ dbus-glib-0.72-patched/configure.ac 2006-11-15 14:15:09.000000000 -0600
+@@ -431,42 +431,6 @@
+
+ AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
+
+-AC_CACHE_CHECK([for posix getpwnam_r],
+- ac_cv_func_posix_getpwnam_r,
+- [AC_TRY_RUN([
+-#include <errno.h>
+-#include <pwd.h>
+-int main () {
+- char buffer[10000];
+- struct passwd pwd, *pwptr = &pwd;
+- int error;
+- errno = 0;
+- error = getpwnam_r ("", &pwd, buffer,
+- sizeof (buffer), &pwptr);
+- return (error < 0 && errno == ENOSYS)
+- || error == ENOSYS;
+-} ],
+- [ac_cv_func_posix_getpwnam_r=yes],
+- [ac_cv_func_posix_getpwnam_r=no])])
+-if test "$ac_cv_func_posix_getpwnam_r" = yes; then
+- AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1,
+- [Have POSIX function getpwnam_r])
+-else
+- AC_CACHE_CHECK([for nonposix getpwnam_r],
+- ac_cv_func_nonposix_getpwnam_r,
+- [AC_TRY_LINK([#include <pwd.h>],
+- [char buffer[10000];
+- struct passwd pwd;
+- getpwnam_r ("", &pwd, buffer,
+- sizeof (buffer));],
+- [ac_cv_func_nonposix_getpwnam_r=yes],
+- [ac_cv_func_nonposix_getpwnam_r=no])])
+- if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
+- AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1,
+- [Have non-POSIX function getpwnam_r])
+- fi
+-fi
+-
+ dnl check for socklen_t
+ AC_MSG_CHECKING(whether socklen_t is defined)
+ AC_TRY_COMPILE([
+@@ -532,49 +496,6 @@
+
+ #### Abstract sockets
+
+-AC_MSG_CHECKING(abstract socket namespace)
+-AC_LANG_PUSH(C)
+-AC_RUN_IFELSE([AC_LANG_PROGRAM(
+-[[
+-#include <sys/types.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <stdio.h>
+-#include <sys/socket.h>
+-#include <sys/un.h>
+-#include <errno.h>
+-]],
+-[[
+- int listen_fd;
+- struct sockaddr_un addr;
+-
+- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
+-
+- if (listen_fd < 0)
+- {
+- fprintf (stderr, "socket() failed: %s\n", strerror (errno));
+- exit (1);
+- }
+-
+- memset (&addr, '\0', sizeof (addr));
+- addr.sun_family = AF_UNIX;
+- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
+- addr.sun_path[0] = '\0'; /* this is what makes it abstract */
+-
+- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
+- {
+- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
+- strerror (errno));
+- exit (1);
+- }
+- else
+- exit (0);
+-]])],
+- [have_abstract_sockets=yes],
+- [have_abstract_sockets=no])
+-AC_LANG_POP(C)
+-AC_MSG_RESULT($have_abstract_sockets)
+-
+ if test x$enable_abstract_sockets = xyes; then
+ if test x$have_abstract_sockets = xno; then
+ AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
+diff -ur dbus-glib-0.72/dbus/Makefile.in dbus-glib-0.72-patched/dbus/Makefile.in
+--- dbus-glib-0.72/dbus/Makefile.in 2006-10-25 16:14:31.000000000 -0500
++++ dbus-glib-0.72-patched/dbus/Makefile.in 2006-11-15 14:15:09.000000000 -0600
+@@ -303,7 +303,7 @@
+ target_cpu = @target_cpu@
+ target_os = @target_os@
+ target_vendor = @target_vendor@
+-SUBDIRS = . examples
++SUBDIRS = .
+ INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_builddir) \
+@@ -371,7 +371,7 @@
+ dbus-glib-tool.h \
+ dbus-glib-tool.c
+
+-dbus_binding_tool_LDADD = libdbus-gtool.la libdbus-glib-1.la $(DBUS_LIBS) $(DBUS_GLIB_LIBS) -lexpat
++dbus_binding_tool_LDADD = libdbus-gtool.la libdbus-glib-1.la $(DBUS_LIBS) $(DBUS_GLIB_LIBS) $(DBUS_BUS_LIBS)
+ EXTRA_DIST = dbus-gmarshal.list make-dbus-glib-error-switch.sh make-dbus-glib-error-enum.sh
+ @DBUS_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus
+
+diff -ur dbus-glib-0.72/Makefile.in dbus-glib-0.72-patched/Makefile.in
+--- dbus-glib-0.72/Makefile.in 2006-10-25 16:14:33.000000000 -0500
++++ dbus-glib-0.72-patched/Makefile.in 2006-11-15 14:15:28.000000000 -0600
+@@ -277,7 +277,7 @@
+ target_os = @target_os@
+ target_vendor = @target_vendor@
+ GLIB_PC = dbus-glib-1.pc
+-SUBDIRS = dbus tools test doc
++SUBDIRS = dbus
+ DIST_SUBDIRS = dbus tools test doc m4
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = $(GLIB_PC)
diff --git a/package/dbus-glib/dbus-glib.mk b/package/dbus-glib/dbus-glib.mk
new file mode 100644
index 000000000..30f91f16e
--- /dev/null
+++ b/package/dbus-glib/dbus-glib.mk
@@ -0,0 +1,82 @@
+#############################################################
+#
+# dbus-glib
+#
+#############################################################
+DBUS_GLIB_VER:=0.72
+DBUS_GLIB_SOURCE:=dbus-glib-$(DBUS_GLIB_VER).tar.gz
+DBUS_GLIB_SITE:=http://dbus.freedesktop.org/releases/dbus-glib/
+DBUS_GLIB_DIR:=$(BUILD_DIR)/dbus-glib-$(DBUS_GLIB_VER)
+DBUS_GLIB_CAT:=$(ZCAT)
+DBUS_GLIB_BINARY:=dbus/.libs/dbus-binding-tool
+DBUS_GLIB_TARGET_BINARY:=usr/bin/dbus-binding-tool
+
+$(DL_DIR)/$(DBUS_GLIB_SOURCE):
+ $(WGET) -P $(DL_DIR) $(DBUS_GLIB_SITE)/$(DBUS_GLIB_SOURCE)
+
+dbus-glib-source: $(DL_DIR)/$(DBUS_GLIB_SOURCE)
+
+$(DBUS_GLIB_DIR)/.unpacked: $(DL_DIR)/$(DBUS_GLIB_SOURCE)
+ $(DBUS_GLIB_CAT) $(DL_DIR)/$(DBUS_GLIB_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(DBUS_GLIB_DIR) package/dbus-glib/ \*.patch
+ touch $(DBUS_GLIB_DIR)/.unpacked
+
+$(DBUS_GLIB_DIR)/.configured: $(DBUS_GLIB_DIR)/.unpacked /usr/bin/pkg-config
+ (cd $(DBUS_GLIB_DIR); rm -rf config.cache; autoconf ; \
+ $(TARGET_CONFIGURE_OPTS) \
+ ac_cv_have_abstract_sockets=yes \
+ ac_cv_func_posix_getpwnam_r=yes \
+ have_abstract_sockets=yes \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ DBUS_CFLAGS="-I$(STAGING_DIR)/usr/include/dbus-1.0 -I$(STAGING_DIR)/usr/lib/dbus-1.0/include" \
+ DBUS_LIBS="$(STAGING_DIR)/usr/lib/libdbus-1.so" \
+ DBUS_GLIB_CFLAGS="-I$(STAGING_DIR)/include/glib-2.0 -I$(STAGING_DIR)/lib/glib-2.0/include" \
+ DBUS_GLIB_LIBS="$(STAGING_DIR)/lib/libglib-2.0.so $(STAGING_DIR)/lib/libgobject-2.0.so $(STAGING_DIR)/lib/libgmodule-2.0.so $(STAGING_DIR)/lib/libgthread-2.0.so" \
+ PKG_CONFIG=/usr/bin/pkg-config \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --localstatedir=/var \
+ --program-prefix="" \
+ --disable-tests \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --enable-asserts=yes \
+ );
+ touch $(DBUS_GLIB_DIR)/.configured
+
+$(DBUS_GLIB_DIR)/$(DBUS_GLIB_BINARY): $(DBUS_GLIB_DIR)/.configured
+ $(MAKE) DBUS_BUS_LIBS="$(STAGING_DIR)/lib/libexpat.so" -C $(DBUS_GLIB_DIR) all
+
+$(STAGING_DIR)/usr/lib/libdbus-glib-1.so.2.0.0: $(DBUS_GLIB_DIR)/$(DBUS_GLIB_BINARY)
+ cp -a $(DBUS_GLIB_DIR)/dbus/.libs/libdbus-glib-1.so* $(STAGING_DIR)/usr/lib
+ -touch -c $(STAGING_DIR)/usr/lib/libdbus-glib-1.so.2.0.0
+
+$(TARGET_DIR)/$(DBUS_GLIB_TARGET_BINARY): $(STAGING_DIR)/usr/lib/libdbus-glib-1.so.2.0.0
+ cp -a $(DBUS_GLIB_DIR)/dbus/.libs/libdbus-glib-1.so.2* $(TARGET_DIR)/usr/lib
+ cp -a $(DBUS_GLIB_DIR)/dbus/.libs/dbus-binding-tool $(TARGET_DIR)/usr/bin
+ -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libdbus-glib-1.so.2.0.0
+
+dbus-glib: uclibc dbus libglib2 $(TARGET_DIR)/$(DBUS_GLIB_TARGET_BINARY)
+
+dbus-glib-clean:
+ rm -f $(TARGET_DIR)/usr/lib/libdbus-glib-1.so.2*
+ rm -f $(TARGET_DIR)/usr/bin/dbus-binding-tool
+ rm -f $(STAGING_DIR)/usr/lib/libdbus-glib-1.so*
+ -$(MAKE) -C $(DBUS_GLIB_DIR) clean
+
+dbus-glib-dirclean:
+ rm -rf $(DBUS_GLIB_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_DBUS_GLIB)),y)
+TARGETS+=dbus-glib
+endif