summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2009-05-02 22:29:10 +0000
committerGilles Dartiguelongue <eva@gentoo.org>2009-05-02 22:29:10 +0000
commit93ea09b2b586446e2040f1e20ccd68ed6025780f (patch)
tree312cb3d35ac64a27d8f18cf38f8c791cf28d3a94 /dev-libs/libunique/files
parentVersion bump. (diff)
downloadgentoo-2-93ea09b2b586446e2040f1e20ccd68ed6025780f.tar.gz
gentoo-2-93ea09b2b586446e2040f1e20ccd68ed6025780f.tar.bz2
gentoo-2-93ea09b2b586446e2040f1e20ccd68ed6025780f.zip
Original ebuild is courtesy of Christoph Brill <egore@gmx.de>, closes bug #236899.
(Portage version: 2.2_rc31/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/libunique/files')
-rw-r--r--dev-libs/libunique/files/libunique-1.0.8-automagic-dbus.patch53
-rw-r--r--dev-libs/libunique/files/run-tests18
2 files changed, 71 insertions, 0 deletions
diff --git a/dev-libs/libunique/files/libunique-1.0.8-automagic-dbus.patch b/dev-libs/libunique/files/libunique-1.0.8-automagic-dbus.patch
new file mode 100644
index 000000000000..afaa36d4f3f5
--- /dev/null
+++ b/dev-libs/libunique/files/libunique-1.0.8-automagic-dbus.patch
@@ -0,0 +1,53 @@
+# Make dbus support configurable
+# Gnome: https://bugzilla.gnome.org/show_bug.cgi?id=578777
+# Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=265828
+diff -Naur a/configure.ac b/configure.ac
+--- a/configure.ac 2009-03-22 05:42:31.000000000 +0530
++++ b/configure.ac 2009-04-12 16:27:06.816454299 +0530
+@@ -76,16 +76,24 @@
+ glib-2.0 >= $GLIB_REQUIRED dnl
+ gtk+-2.0 >= $GTK_REQUIRED)
+
+-dnl D-Bus backend dependencies
+-if $PKG_CONFIG --atleast-version $DBUS_GLIB_REQUIRED dbus-glib-1; then
+- have_dbus=yes
+- PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
+- AC_SUBST(DBUS_CFLAGS)
+- AC_SUBST(DBUS_LIBS)
+- AC_DEFINE([HAVE_DBUS], [1], [Building with D-Bus support])
+- AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
+-else
+- have_dbus=no
++AC_ARG_ENABLE([dbus],
++ [AC_HELP_STRING([--enable-dbus],
++ [Enable with D-Bus support @<:@default=yes@:>@])],
++ [have_dbus=$enableval],
++ [have_dbus=yes])
++
++if test x$have_dbus == xyes; then
++ dnl D-Bus backend dependencies
++ if $PKG_CONFIG --atleast-version $DBUS_GLIB_REQUIRED dbus-glib-1; then
++ have_dbus=yes
++ PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
++ AC_SUBST(DBUS_CFLAGS)
++ AC_SUBST(DBUS_LIBS)
++ AC_DEFINE([HAVE_DBUS], [1], [Building with D-Bus support])
++ AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
++ else
++ have_dbus=no
++ fi
+ fi
+
+ AM_CONDITIONAL([HAVE_DBUS], [test x$have_dbus = xyes])
+@@ -171,7 +179,8 @@
+
+ echo "
+ Configuration:
+- Maintainer flags: $enable_maintainer_flags
+- Debug level: $enable_debug
+- Build documentation: $enable_gtk_doc
++ Maintainer flags: $enable_maintainer_flags
++ Debug level: $enable_debug
++ Build documentation: $enable_gtk_doc
++ D-Bus support: $have_dbus
+ "
diff --git a/dev-libs/libunique/files/run-tests b/dev-libs/libunique/files/run-tests
new file mode 100644
index 000000000000..db9bcd4f0860
--- /dev/null
+++ b/dev-libs/libunique/files/run-tests
@@ -0,0 +1,18 @@
+BINARY = ./test-unique
+TESTS = --new --activate --open-uri=http://localhost --foo
+
+all:
+ for test in $(TESTS); do \
+ rm -f test_result; \
+ $(BINARY) > test_result & \
+ main_pid=$$!; \
+ sleep 5; \
+ $(BINARY) $$test & \
+ test_pid=$$!; \
+ sleep 5; \
+ while ! test -s test_result; do sleep 0.5; done; \
+ sleep 5; \
+ kill $${test_pid} || exit 1; \
+ kill $${main_pid} || exit 1; \
+ grep -q 'Message received from.*' test_result || { echo "Test failed at $$test"; exit 1; }; \
+ done