diff options
author | Gilles Dartiguelongue <eva@gentoo.org> | 2009-05-02 22:29:10 +0000 |
---|---|---|
committer | Gilles Dartiguelongue <eva@gentoo.org> | 2009-05-02 22:29:10 +0000 |
commit | 93ea09b2b586446e2040f1e20ccd68ed6025780f (patch) | |
tree | 312cb3d35ac64a27d8f18cf38f8c791cf28d3a94 /dev-libs/libunique | |
parent | Version bump. (diff) | |
download | gentoo-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')
-rw-r--r-- | dev-libs/libunique/ChangeLog | 12 | ||||
-rw-r--r-- | dev-libs/libunique/files/libunique-1.0.8-automagic-dbus.patch | 53 | ||||
-rw-r--r-- | dev-libs/libunique/files/run-tests | 18 | ||||
-rw-r--r-- | dev-libs/libunique/libunique-1.0.8.ebuild | 48 | ||||
-rw-r--r-- | dev-libs/libunique/metadata.xml | 9 |
5 files changed, 140 insertions, 0 deletions
diff --git a/dev-libs/libunique/ChangeLog b/dev-libs/libunique/ChangeLog new file mode 100644 index 000000000000..c1d1653450c6 --- /dev/null +++ b/dev-libs/libunique/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for dev-libs/libunique +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libunique/ChangeLog,v 1.1 2009/05/02 22:29:10 eva Exp $ + +*libunique-1.0.8 (02 May 2009) + + 02 May 2009; Gilles Dartiguelongue <eva@gentoo.org> + +files/libunique-1.0.8-automagic-dbus.patch, +files/run-tests, + +metadata.xml, +libunique-1.0.8.ebuild: + Original ebuild is courtesy of Christoph Brill <egore@gmx.de>, closes bug + #236899. + 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 diff --git a/dev-libs/libunique/libunique-1.0.8.ebuild b/dev-libs/libunique/libunique-1.0.8.ebuild new file mode 100644 index 000000000000..e492dda809d4 --- /dev/null +++ b/dev-libs/libunique/libunique-1.0.8.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libunique/libunique-1.0.8.ebuild,v 1.1 2009/05/02 22:29:10 eva Exp $ + +EAPI="2" + +inherit autotools eutils gnome2 virtualx + +DESCRIPTION="a library for writing single instance application" +HOMEPAGE="http://live.gnome.org/LibUnique" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="dbus debug doc" + +RDEPEND=">=dev-libs/glib-2.12.0 + >=x11-libs/gtk+-2.11.0 + x11-libs/libX11 + dbus? ( >=dev-libs/dbus-glib-0.70 )" +DEPEND="${RDEPEND} + sys-devel/gettext + >=dev-util/pkgconfig-0.17 + doc? ( >=dev-util/gtk-doc-1.6 )" + +DOCS="AUTHORS NEWS ChangeLog README TODO" + +src_prepare() { + gnome2_src_prepare + + # Make dbus support configurable, bug #265828 + epatch "${FILESDIR}/${P}-automagic-dbus.patch" + eautoreconf +} + +src_test() { + cd "${S}/tests" + + cp "${FILESDIR}/run-tests" . + Xemake -f run-tests || die "Tests failed" +} + +pkg_setup() { + G2CONF="${G2CONF} + --disable-static + $(use_enable dbus) + $(use_enable debug)" +} diff --git a/dev-libs/libunique/metadata.xml b/dev-libs/libunique/metadata.xml new file mode 100644 index 000000000000..6b9f0a40af6d --- /dev/null +++ b/dev-libs/libunique/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>gnome</herd> +<longdescription lang="en"> +Unique is a library for writing single instance application. If you launch a single instance application twice, the second instance will either just quit or will send a message to the running instance. +</longdescription> +</pkgmetadata> + |