summaryrefslogtreecommitdiff
path: root/dev-libs
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2015-01-17 12:39:36 +0200
committerBlackNoxis <steven.darklight@gmail.com>2015-01-17 12:39:36 +0200
commit7e4efcd5f19e936813ce270f4b99da5e06aedba4 (patch)
tree07d1ac1641842b1f50e620f6d0b56b87d0ae51d1 /dev-libs
parentccdcdc66c572fb7f7798df88b3972949f0569b3b (diff)
Added libdbus menu
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libdbusmenu/Manifest1
-rw-r--r--dev-libs/libdbusmenu/files/libdbusmenu-0.3.14-fix-aclocal.patch8
-rw-r--r--dev-libs/libdbusmenu/files/libdbusmenu-0.3.14-optional-dumper.patch68
-rw-r--r--dev-libs/libdbusmenu/files/libdbusmenu-0.3.16-optional-tests.patch55
-rw-r--r--dev-libs/libdbusmenu/files/libdbusmenu-0.3.16-optional-vala.patch59
-rw-r--r--dev-libs/libdbusmenu/files/libdbusmenu-0.3.94-decouple-testapp.patch20
-rw-r--r--dev-libs/libdbusmenu/files/libdbusmenu-0.4.4-optional-gtk.patch135
-rw-r--r--dev-libs/libdbusmenu/files/libdbusmenu-0.4.90-optional-gtk.patch129
-rw-r--r--dev-libs/libdbusmenu/libdbusmenu-0.4.90.ebuild79
-rw-r--r--dev-libs/libdbusmenu/metadata.xml9
10 files changed, 563 insertions, 0 deletions
diff --git a/dev-libs/libdbusmenu/Manifest b/dev-libs/libdbusmenu/Manifest
new file mode 100644
index 00000000..6c32b7a9
--- /dev/null
+++ b/dev-libs/libdbusmenu/Manifest
@@ -0,0 +1 @@
+DIST libdbusmenu-0.4.90.tar.gz 693434 SHA256 c430d37036a1f08b3ae52114fcc95141f843e45e41e0ccf9270455d8eb6b457b
diff --git a/dev-libs/libdbusmenu/files/libdbusmenu-0.3.14-fix-aclocal.patch b/dev-libs/libdbusmenu/files/libdbusmenu-0.3.14-fix-aclocal.patch
new file mode 100644
index 00000000..d4fdcaae
--- /dev/null
+++ b/dev-libs/libdbusmenu/files/libdbusmenu-0.3.14-fix-aclocal.patch
@@ -0,0 +1,8 @@
+--- Makefile.am.orig 2010-09-20 21:58:41.616751481 +0200
++++ Makefile.am 2010-09-20 22:21:12.976592367 +0200
+@@ -1,3 +1,5 @@
++ACLOCAL_AMFLAGS = -I m4
++
+ EXTRA_DIST = \
+ COPYING.2.1 \
+ COPYING-GPL3 \
diff --git a/dev-libs/libdbusmenu/files/libdbusmenu-0.3.14-optional-dumper.patch b/dev-libs/libdbusmenu/files/libdbusmenu-0.3.14-optional-dumper.patch
new file mode 100644
index 00000000..644c799e
--- /dev/null
+++ b/dev-libs/libdbusmenu/files/libdbusmenu-0.3.14-optional-dumper.patch
@@ -0,0 +1,68 @@
+--- configure.ac.orig 2010-09-20 21:51:50.289828895 +0200
++++ configure.ac 2010-09-20 22:05:38.292979567 +0200
+@@ -63,8 +63,17 @@
+
+ X11_REQUIRED_VERSION=1.3
+
++AC_ARG_ENABLE([dumper],
++ AC_HELP_STRING([--disable-dumper], [Disable dbusmenudumper tool]),
++ [enable_dumper=$enableval], [enable_dumper=auto])
++AM_CONDITIONAL([WANT_DBUSMENUDUMPER], [test "x$enable_dumper" != "xno"])
++
++AS_IF([test "x$enable_dumper" != "xno"],[
+ PKG_CHECK_MODULES(DBUSMENUDUMPER, gtk+-2.0 >= $GTK_REQUIRED_VERSION
+- x11 >= $X11_REQUIRED_VERSION)
++ x11 >= $X11_REQUIRED_VERSION,
++ [have_dumper=yes]
++)
++])
+
+ AC_SUBST(DBUSMENUDUMPER_CFLAGS)
+ AC_SUBST(DBUSMENUDUMPER_LIBS)
+@@ -193,1 +193,6 @@
+
++AS_IF([test "x$have_dumper" = "xyes"],
++ AC_MSG_NOTICE([ Dumper: yes]),
++ AC_MSG_NOTICE([ Dumper: no])
++)
++
+--- tools/Makefile.am.orig 2010-09-20 22:02:07.280175897 +0200
++++ tools/Makefile.am 2010-09-20 22:05:15.621664358 +0200
+@@ -3,5 +3,9 @@
+
+-libexec_PROGRAMS = dbusmenu-dumper
++libexec_PROGRAMS =
++
++if WANT_DBUSMENUDUMPER
++libexec_PROGRAMS += dbusmenu-dumper
++endif
+
+ libexec_SCRIPTS = dbusmenu-bench
+
+--- tests/Makefile.am.orig 2011-02-07 00:01:11.066461559 +0100
++++ tests/Makefile.am 2011-02-07 00:02:33.487751202 +0100
+@@ -10,6 +10,10 @@
+ test-glib-properties \
+ test-glib-proxy \
+ test-glib-simple-items \
+- test-glib-submenu \
++ test-glib-submenu
++
++if WANT_DBUSMENUDUMPER
++TESTS += \
+ test-json
++endif
+
+@@ -36,7 +40,11 @@
+ test-glib-proxy-proxy \
+ test-glib-submenu-client \
+ test-glib-submenu-server \
+- test-glib-simple-items \
++ test-glib-simple-items
++
++if WANT_DBUSMENUDUMPER
++check_PROGRAMS += \
+ test-json-client \
+ test-json-server
++endif
+
diff --git a/dev-libs/libdbusmenu/files/libdbusmenu-0.3.16-optional-tests.patch b/dev-libs/libdbusmenu/files/libdbusmenu-0.3.16-optional-tests.patch
new file mode 100644
index 00000000..e047cd83
--- /dev/null
+++ b/dev-libs/libdbusmenu/files/libdbusmenu-0.3.16-optional-tests.patch
@@ -0,0 +1,55 @@
+--- configure.ac.orig 2010-09-20 21:51:50.289828895 +0200
++++ configure.ac 2010-09-20 22:01:21.623107607 +0200
+@@ -76,8 +76,17 @@
+ JSON_GLIB_REQUIRED_VERSION=0.6.0
+ GIO_UNIX_REQUIRED_VERSION=2.24
+
++AC_ARG_ENABLE([tests],
++ AC_HELP_STRING([--disable-tests], [Disable tests]),
++ [enable_tests=$enableval], [enable_tests=auto])
++AM_CONDITIONAL([WANT_TESTS], [test "x$enable_tests" != "xno"])
++
++AS_IF([test "x$enable_tests" != "xno"],[
+ PKG_CHECK_MODULES(DBUSMENUTESTS, json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
+- gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION)
++ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION,
++ [have_tests=yes]
++)
++])
+
+ AC_SUBST(DBUSMENUTESTS_CFLAGS)
+ AC_SUBST(DBUSMENUTESTS_LIBS)
+@@ -193,1 +193,6 @@
+
++AS_IF([test "x$have_tests" = "xyes"],
++ AC_MSG_NOTICE([ Tests: yes]),
++ AC_MSG_NOTICE([ Tests: no])
++)
++
+--- Makefile.am.orig 2010-09-20 21:58:41.616751481 +0200
++++ Makefile.am 2010-09-20 22:01:55.525674385 +0200
+@@ -5,2 +5,6 @@
+
++if WANT_TESTS
++TESTS_SUBDIR = tests
++endif
++
+ SUBDIRS = \
+@@ -9,3 +9,3 @@
+ tools \
+- tests \
++ $(TESTS_SUBDIR) \
+ docs \
+--- tools/testapp/Makefile.am.orig 2011-01-29 13:42:00.984605528 +0100
++++ tools/testapp/Makefile.am 2011-01-29 13:44:45.523514281 +0100
+@@ -1,5 +1,9 @@
+
+-libexec_PROGRAMS = dbusmenu-testapp
++libexec_PROGRAMS =
++
++if WANT_TESTS
++libexec_PROGRAMS += dbusmenu-testapp
++endif
+
+ dbusmenu_testapp_SOURCES = \
+ main.c
diff --git a/dev-libs/libdbusmenu/files/libdbusmenu-0.3.16-optional-vala.patch b/dev-libs/libdbusmenu/files/libdbusmenu-0.3.16-optional-vala.patch
new file mode 100644
index 00000000..72fcd57d
--- /dev/null
+++ b/dev-libs/libdbusmenu/files/libdbusmenu-0.3.16-optional-vala.patch
@@ -0,0 +1,59 @@
+--- configure.ac.orig 2011-02-05 15:01:31.212827464 +0100
++++ configure.ac 2011-02-05 15:13:08.310031260 +0100
+@@ -143,7 +143,17 @@
+ # Vala API Generation
+ ###########################
+
++AC_ARG_ENABLE([vala],
++ AC_HELP_STRING([--disable-vala], [Disable vala]),
++ [enable_vala=$enableval], [enable_vala=auto])
++
++AS_IF([test "x$enable_vala" != "xno"],[
++ AM_COND_IF([HAVE_INTROSPECTION],,[
++ AC_MSG_ERROR([Vala bindings require introspection support, please --enable-introspection])
++ ])
+ AC_PATH_PROG([VALA_API_GEN], [vapigen])
++])
++AM_CONDITIONAL([HAVE_VALA], [test -n "$VALA_API_GEN"])
+
+ ###########################
+ # XSLT Processor
+@@ -193,1 +193,6 @@
+
++AM_COND_IF([HAVE_VALA],
++ AC_MSG_NOTICE([ Vala bindings: yes]),
++ AC_MSG_NOTICE([ Vala bindings no])
++)
++
+--- libdbusmenu-gtk/Makefile.am.orig 2011-02-05 15:09:06.429965757 +0100
++++ libdbusmenu-gtk/Makefile.am 2011-02-05 15:08:14.742722310 +0100
+@@ -131,6 +131,7 @@
+ # VAPI Files
+ #########################
+
++if HAVE_VALA
+ if HAVE_INTROSPECTION
+
+ vapidir = $(datadir)/vala/vapi
+@@ -154,4 +155,5 @@
+ CLEANFILES += $(vapi_DATA) DbusmenuGtk$(VER)-0.4.tmp.gir
+
+ endif
++endif
+
+--- libdbusmenu-glib/Makefile.am.orig 2011-02-05 15:08:49.613538681 +0100
++++ libdbusmenu-glib/Makefile.am 2011-02-05 15:06:23.826443241 +0100
+@@ -165,6 +165,7 @@
+ # VAPI Files
+ #########################
+
++if HAVE_VALA
+ if HAVE_INTROSPECTION
+
+ vapidir = $(datadir)/vala/vapi
+@@ -176,4 +177,5 @@
+ CLEANFILES += $(vapi_DATA)
+
+ endif
++endif
+
diff --git a/dev-libs/libdbusmenu/files/libdbusmenu-0.3.94-decouple-testapp.patch b/dev-libs/libdbusmenu/files/libdbusmenu-0.3.94-decouple-testapp.patch
new file mode 100644
index 00000000..64812a40
--- /dev/null
+++ b/dev-libs/libdbusmenu/files/libdbusmenu-0.3.94-decouple-testapp.patch
@@ -0,0 +1,20 @@
+--- tools/testapp/Makefile.am.orig 2011-01-29 20:50:54.266939219 +0100
++++ tools/testapp/Makefile.am 2011-01-29 20:51:16.185268917 +0100
+@@ -1,10 +1,4 @@
+
+-if USE_GTK3
+-VER=3
+-else
+-VER=
+-endif
+-
+ libexec_PROGRAMS =
+
+ if WANT_TESTS
+@@ -22,6 +16,4 @@
+
+ dbusmenu_testapp_LDADD = \
+ $(builddir)/../../libdbusmenu-glib/libdbusmenu-glib.la \
+- $(builddir)/../../libdbusmenu-gtk/libdbusmenu-gtk$(VER).la \
+- $(DBUSMENUGTK_LIBS) \
+ $(DBUSMENUTESTS_LIBS)
diff --git a/dev-libs/libdbusmenu/files/libdbusmenu-0.4.4-optional-gtk.patch b/dev-libs/libdbusmenu/files/libdbusmenu-0.4.4-optional-gtk.patch
new file mode 100644
index 00000000..3d0fd4f3
--- /dev/null
+++ b/dev-libs/libdbusmenu/files/libdbusmenu-0.4.4-optional-gtk.patch
@@ -0,0 +1,135 @@
+commit 9fa1d7911a84e7bfbfe009567e16c89a08445ad3
+Author: Christoph Mende <mende.christoph@gmail.com>
+Date: Tue May 24 18:05:37 2011 +0200
+
+ optional gtk
+
+diff --git a/Makefile.am b/Makefile.am
+index 81a2cbb..a69c377 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -7,9 +7,13 @@ if WANT_TESTS
+ TESTS_SUBDIR = tests
+ endif
+
++if WANT_LIBDBUSMENUGTK
++LIBDBUSMENUGTK_SUBDIR = libdbusmenu-gtk
++endif
++
+ SUBDIRS = \
+ libdbusmenu-glib \
+- libdbusmenu-gtk \
++ $(LIBDBUSMENUGTK_SUBDIR) \
+ tools \
+ $(TESTS_SUBDIR) \
+ docs \
+diff --git a/configure.ac b/configure.ac
+index 9e742c2..a7fa7f5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -58,27 +58,37 @@ AC_SUBST(DBUSMENUGLIB_LIBS)
+ GTK_REQUIRED_VERSION=2.16
+ GTK3_REQUIRED_VERSION=2.91
+
++AC_ARG_ENABLE([gtk],
++ AC_HELP_STRING([--disable-gtk], [Disable libdbusmenu-gtk library]),
++ [enable_gtk=$enableval], [enable_gtk=auto])
++AM_CONDITIONAL([WANT_LIBDBUSMENUGTK], [test "x$enable_gtk" != "xno"])
++
+ AC_ARG_WITH([gtk],
+ [AS_HELP_STRING([--with-gtk],
+ [Which version of gtk to use @<:@default=2@:>@])],
+ [],
+ [with_gtk=2])
++AM_CONDITIONAL([USE_GTK3], [test "x$with_gtk" = "x3"])
++
++AS_IF([test "x$enable_gtk" != "xno"],[
+ AS_IF([test "x$with_gtk" = x3],
+ [PKG_CHECK_MODULES(DBUSMENUGTK, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
+- glib-2.0 >= $GLIB_REQUIRED_VERSION)
+- AC_SUBST(DBUSMENUGTK_CFLAGS)
+- AC_SUBST(DBUSMENUGTK_LIBS)
++ glib-2.0 >= $GLIB_REQUIRED_VERSION,
++ [have_gtk=yes]
++)
+ AC_DEFINE(HAVE_GTK3, 1, [whether gtk3 is available])
+ ],
+ [test "x$with_gtk" = x2],
+ [PKG_CHECK_MODULES(DBUSMENUGTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION
+- glib-2.0 >= $GLIB_REQUIRED_VERSION)
+- AC_SUBST(DBUSMENUGTK_CFLAGS)
+- AC_SUBST(DBUSMENUGTK_LIBS)
++ glib-2.0 >= $GLIB_REQUIRED_VERSION,
++ [have_gtk=yes]
++)
+ ],
+ [AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])]
+ )
+-AM_CONDITIONAL(USE_GTK3, [test "x$with_gtk" = x3])
++])
++AC_SUBST(DBUSMENUGTK_CFLAGS)
++AC_SUBST(DBUSMENUGTK_LIBS)
+
+ ###########################
+ # Dependencies - dumper
+@@ -228,3 +238,8 @@ AS_IF([test "x$have_tests" = "xyes"],
+ AC_MSG_NOTICE([ Tests: no])
+ )
+
++AS_IF([test "x$enable_gtk" = "xyes"],
++ AC_MSG_NOTICE([ Gtk: yes (gtk$with_gtk)]),
++ AC_MSG_NOTICE([ Gtk: no])
++)
++
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index a2c0716..32e12ff 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -13,13 +13,17 @@ TESTS = \
+ test-glib-proxy \
+ test-glib-simple-items \
+ test-glib-submenu \
+- test-json \
++ test-json
++
++if WANT_LIBDBUSMENUGTK
++TESTS += \
+ test-gtk-objects-test \
+ test-gtk-label \
+ test-gtk-shortcut \
+ test-gtk-reorder \
+ test-gtk-submenu \
+ test-gtk-parser-test
++endif
+
+ # The Python test only work on the system copy of
+ # dbusmenu, so while they can be usefule they're not
+@@ -41,20 +45,24 @@ check_PROGRAMS = \
+ test-glib-proxy-client \
+ test-glib-proxy-server \
+ test-glib-proxy-proxy \
+- test-gtk-objects \
+ test-glib-submenu-client \
+ test-glib-submenu-server \
++ test-glib-simple-items \
++ test-json-client \
++ test-json-server
++
++if WANT_LIBDBUSMENUGTK
++check_PROGRAMS += \
++ test-gtk-objects \
+ test-gtk-label-client \
+ test-gtk-label-server \
+ test-gtk-shortcut-client \
+ test-gtk-shortcut-server \
+- test-glib-simple-items \
+ test-gtk-reorder-server \
+- test-json-client \
+- test-json-server \
+ test-gtk-submenu-server \
+ test-gtk-submenu-client \
+ test-gtk-parser
++endif
+
+ XVFB_RUN=". $(srcdir)/run-xvfb.sh"
+
diff --git a/dev-libs/libdbusmenu/files/libdbusmenu-0.4.90-optional-gtk.patch b/dev-libs/libdbusmenu/files/libdbusmenu-0.4.90-optional-gtk.patch
new file mode 100644
index 00000000..5a2a35ba
--- /dev/null
+++ b/dev-libs/libdbusmenu/files/libdbusmenu-0.4.90-optional-gtk.patch
@@ -0,0 +1,129 @@
+diff --git a/Makefile.am b/Makefile.am
+index c2c0980..2fb4c84 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -3,9 +3,13 @@ EXTRA_DIST = \
+ COPYING-GPL3 \
+ m4/introspection.m4
+
++if WANT_LIBDBUSMENUGTK
++LIBDBUSMENUGTK_SUBDIR = libdbusmenu-gtk
++endif
++
+ SUBDIRS = \
+ libdbusmenu-glib \
+- libdbusmenu-gtk \
++ $(LIBDBUSMENUGTK_SUBDIR) \
+ tools \
+ tests \
+ docs \
+diff --git a/configure.ac b/configure.ac
+index 465d8bf..47ea915 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -58,27 +58,37 @@ AC_SUBST(DBUSMENUGLIB_LIBS)
+ GTK_REQUIRED_VERSION=2.16
+ GTK3_REQUIRED_VERSION=2.91
+
++AC_ARG_ENABLE([gtk],
++ AC_HELP_STRING([--disable-gtk], [Disable libdbusmenu-gtk library]),
++ [enable_gtk=$enableval], [enable_gtk=auto])
++AM_CONDITIONAL([WANT_LIBDBUSMENUGTK], [test "x$enable_gtk" != "xno"])
++
+ AC_ARG_WITH([gtk],
+ [AS_HELP_STRING([--with-gtk],
+ [Which version of gtk to use @<:@default=2@:>@])],
+ [],
+ [with_gtk=3])
++AM_CONDITIONAL([USE_GTK3], [test "x$with_gtk" = "x3"])
++
++AS_IF([test "x$enable_gtk" != "xno"],[
+ AS_IF([test "x$with_gtk" = x3],
+ [PKG_CHECK_MODULES(DBUSMENUGTK, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
+- glib-2.0 >= $GLIB_REQUIRED_VERSION)
+- AC_SUBST(DBUSMENUGTK_CFLAGS)
+- AC_SUBST(DBUSMENUGTK_LIBS)
++ glib-2.0 >= $GLIB_REQUIRED_VERSION,
++ [have_gtk=yes]
++)
+ AC_DEFINE(HAVE_GTK3, 1, [whether gtk3 is available])
+ ],
+ [test "x$with_gtk" = x2],
+ [PKG_CHECK_MODULES(DBUSMENUGTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION
+- glib-2.0 >= $GLIB_REQUIRED_VERSION)
+- AC_SUBST(DBUSMENUGTK_CFLAGS)
+- AC_SUBST(DBUSMENUGTK_LIBS)
++ glib-2.0 >= $GLIB_REQUIRED_VERSION,
++ [have_gtk=yes]
++)
+ ],
+ [AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])]
+ )
+-AM_CONDITIONAL(USE_GTK3, [test "x$with_gtk" = x3])
++])
++AC_SUBST(DBUSMENUGTK_CFLAGS)
++AC_SUBST(DBUSMENUGTK_LIBS)
+
+ ###########################
+ # Dependencies - dumper
+@@ -199,3 +209,8 @@ libdbusmenu Configuration:
+ GTK+ Version: $with_gtk
+ ])
+
++AS_IF([test "x$enable_gtk" = "xyes"],
++ AC_MSG_NOTICE([ Gtk: yes (gtk$with_gtk)]),
++ AC_MSG_NOTICE([ Gtk: no])
++)
++
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index a4763da..e6882af 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -13,13 +13,17 @@ TESTS = \
+ test-glib-proxy \
+ test-glib-simple-items \
+ test-glib-submenu \
+- test-json \
++ test-json
++
++if WANT_LIBDBUSMENUGTK
++TESTS += \
+ test-gtk-objects-test \
+ test-gtk-label \
+ test-gtk-shortcut \
+ test-gtk-reorder \
+ test-gtk-submenu \
+ test-gtk-parser-test
++endif
+
+ XFAIL_TESTS = \
+ test-glib-proxy
+@@ -44,20 +48,24 @@ check_PROGRAMS = \
+ test-glib-proxy-client \
+ test-glib-proxy-server \
+ test-glib-proxy-proxy \
+- test-gtk-objects \
+ test-glib-submenu-client \
+ test-glib-submenu-server \
++ test-glib-simple-items \
++ test-json-client \
++ test-json-server
++
++if WANT_LIBDBUSMENUGTK
++check_PROGRAMS += \
++ test-gtk-objects \
+ test-gtk-label-client \
+ test-gtk-label-server \
+ test-gtk-shortcut-client \
+ test-gtk-shortcut-server \
+- test-glib-simple-items \
+ test-gtk-reorder-server \
+- test-json-client \
+- test-json-server \
+ test-gtk-submenu-server \
+ test-gtk-submenu-client \
+ test-gtk-parser
++endif
+
+ XVFB_RUN=". $(srcdir)/run-xvfb.sh"
+
diff --git a/dev-libs/libdbusmenu/libdbusmenu-0.4.90.ebuild b/dev-libs/libdbusmenu/libdbusmenu-0.4.90.ebuild
new file mode 100644
index 00000000..e3e983a6
--- /dev/null
+++ b/dev-libs/libdbusmenu/libdbusmenu-0.4.90.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libdbusmenu/libdbusmenu-0.3.16-r2.ebuild,v 1.1 2011/02/07 09:56:46 tampakrap Exp $
+
+EAPI=3
+
+inherit autotools eutils versionator virtualx
+
+MY_MAJOR_VERSION="$(get_version_component_range 1-2)"
+if version_is_at_least "${MY_MAJOR_VERSION}.50" ; then
+ MY_MAJOR_VERSION="$(get_major_version).$(($(get_version_component_range 2)+1))"
+fi
+
+DESCRIPTION="Library to pass menu structure across DBus"
+HOMEPAGE="https://launchpad.net/dbusmenu"
+SRC_URI="http://launchpad.net/dbusmenu/${MY_MAJOR_VERSION}/${PV}/+download/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gtk +introspection test vala"
+
+RDEPEND="dev-libs/glib:2
+ dev-libs/dbus-glib
+ dev-libs/libxml2:2
+ gtk? ( x11-libs/gtk+:2 )"
+DEPEND="${RDEPEND}
+ introspection? ( >=dev-libs/gobject-introspection-0.6.7 )
+ test? (
+ >=dev-libs/json-glib-0.13.4[introspection=]
+ dev-util/dbus-test-runner
+ )
+ vala? ( dev-lang/vala:0.12 )
+ dev-util/intltool
+ dev-util/pkgconfig"
+
+pkg_setup() {
+ if use vala && use !introspection ; then
+ eerror "Vala bindings (USE=vala) require introspection support (USE=introspection)"
+ die "Vala bindings (USE=vala) require introspection support (USE=introspection)"
+ fi
+}
+
+src_prepare() {
+ # Make Vala bindings optional, launchpad-bug #713685
+ epatch "${FILESDIR}/${PN}-0.3.16-optional-vala.patch"
+ # Make tests optional, launchpad-bug #552526
+ epatch "${FILESDIR}/${PN}-0.3.16-optional-tests.patch"
+ # Make libdbusmenu-gtk library optional, launchpad-bug #552530
+ epatch "${FILESDIR}/${P}-optional-gtk.patch"
+ # Decouple testapp from libdbusmenu-gtk, launchpad-bug #709761
+ epatch "${FILESDIR}/${PN}-0.3.94-decouple-testapp.patch"
+ # Make dbusmenudumper optional, launchpad-bug #643871
+ epatch "${FILESDIR}/${PN}-0.3.14-optional-dumper.patch"
+ # Fixup undeclared HAVE_INTROSPECTION, launchpad-bug #552538
+ epatch "${FILESDIR}/${PN}-0.3.14-fix-aclocal.patch"
+ # Drop -Werror in a release
+ sed -e 's:-Werror::g' -i libdbusmenu-glib/Makefile.am libdbusmenu-gtk/Makefile.am || die "sed failed"
+ eautoreconf
+}
+
+src_configure() {
+ VALA_API_GEN=$(type -p vapigen-0.12) \
+ econf \
+ $(use_enable gtk) \
+ $(use_enable gtk dumper) \
+ $(use_enable introspection) \
+ $(use_enable test tests) \
+ $(use_enable vala)
+}
+
+src_test() {
+ Xemake check || die "testsuite failed"
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die "make install failed"
+ dodoc AUTHORS || die "dodoc failed"
+}
diff --git a/dev-libs/libdbusmenu/metadata.xml b/dev-libs/libdbusmenu/metadata.xml
new file mode 100644
index 00000000..5bb79d68
--- /dev/null
+++ b/dev-libs/libdbusmenu/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>no-herd</herd>
+ <use>
+ <flag name="introspection">Use dev-libs/gobject-introspection for introspection</flag>
+ <flag name="vala">Enable bindings for dev-lang/vala</flag>
+ </use>
+</pkgmetadata>