Merge authors: Ted Gould (ted) Related merge proposals: https://code.launchpad.net/~ted/dbusmenu/gi-generation/+merge/20317 proposed by: Ted Gould (ted) review: Approve - Gord Allott (gordallott) ------------------------------------------------------------ revno: 80 [merge] committer: Ted Gould <[email protected]> branch nick: trunk timestamp: Mon 2010-03-01 22:01:30 -0600 message: Building GIR, typelib and VAPI files. added: m4/ m4/introspection.m4 modified: .bzrignore Makefile.am configure.ac libdbusmenu-glib/Makefile.am libdbusmenu-gtk/Makefile.am
-- lp:dbusmenu https://code.launchpad.net/~dbusmenu-team/dbusmenu/trunk Your team ayatana-commits is subscribed to branch lp:dbusmenu. To unsubscribe from this branch go to https://code.launchpad.net/~dbusmenu-team/dbusmenu/trunk/+edit-subscription.
=== modified file '.bzrignore' --- .bzrignore 2010-02-09 21:22:31 +0000 +++ .bzrignore 2010-02-28 19:54:03 +0000 @@ -64,3 +64,7 @@ tests/test-glib-proxy-server tests/test-glib-proxy-proxy tests/test-glib-proxy +libdbusmenu-glib/DbusmenuGlib-0.2.gir +libdbusmenu-glib/DbusmenuGlib-0.2.typelib +libdbusmenu-gtk/DbusmenuGtk-0.2.gir +libdbusmenu-gtk/DbusmenuGtk-0.2.typelib === modified file 'Makefile.am' --- Makefile.am 2010-02-11 19:53:22 +0000 +++ Makefile.am 2010-02-26 17:48:11 +0000 @@ -1,3 +1,14 @@ -EXTRA_DIST = COPYING.2.1 COPYING-GPL3 -SUBDIRS = libdbusmenu-glib libdbusmenu-gtk tools tests po +EXTRA_DIST = \ + COPYING.2.1 \ + COPYING-GPL3 \ + m4/introspection.m4 + +SUBDIRS = \ + libdbusmenu-glib \ + libdbusmenu-gtk \ + tools \ + tests \ + po + +DISTCHECK_CONFIGURE_FLAGS = --enable-introspection === modified file 'configure.ac' --- configure.ac 2010-02-25 16:19:40 +0000 +++ configure.ac 2010-03-01 16:21:51 +0000 @@ -2,10 +2,10 @@ AC_INIT(libdbusmenu, 0.2.6, [email protected]) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) -AC_PREREQ(2.53) +AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.2.6) +AM_INIT_AUTOMAKE(libdbusmenu, 0.2.6, [-Wno-portability]) AM_MAINTAINER_MODE @@ -62,6 +62,18 @@ AC_SUBST(DBUSMENUTESTS_LIBS) ########################### +# GObject Introspection +########################### + +GOBJECT_INTROSPECTION_CHECK([0.6.7]) + +########################### +# Vala API Generation +########################### + +AC_PATH_PROG([VALA_API_GEN], [vapigen]) + +########################### # Lib versioning ########################### === modified file 'libdbusmenu-glib/Makefile.am' --- libdbusmenu-glib/Makefile.am 2010-02-09 16:22:30 +0000 +++ libdbusmenu-glib/Makefile.am 2010-03-01 16:28:25 +0000 @@ -1,4 +1,6 @@ +CLEANFILES = + EXTRA_DIST = \ dbusmenu-glib.pc.in \ dbus-menu.xml \ @@ -91,3 +93,51 @@ --prefix=_dbusmenu_menuitem_marshal $(srcdir)/menuitem-marshal.list \ > menuitem-marshal.c +######################### +# GObject Introsepction +######################### + +-include $(INTROSPECTION_MAKEFILE) +INTROSPECTION_GIRS = +INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) +INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) + +if HAVE_INTROSPECTION + +introspection_sources = $(libdbusmenu_glibinclude_HEADERS) + +DbusmenuGlib-0.2.gir: libdbusmenu-glib.la +DbusmenuGlib_0_2_gir_INCLUDES = \ + GObject-2.0 +DbusmenuGlib_0_2_gir_CFLAGS = $(DBUSMENUGLIB_CFLAGS) +DbusmenuGlib_0_2_gir_LIBS = libdbusmenu-glib.la +DbusmenuGlib_0_2_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources)) + +INTROSPECTION_GIRS += DbusmenuGlib-0.2.gir + +girdir = $(datadir)/gir-1.0 +dist_gir_DATA = $(INTROSPECTION_GIRS) + +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + +CLEANFILES += $(dist_gir_DATA) $(typelib_DATA) + +endif + +######################### +# VAPI Files +######################### + +if HAVE_INTROSPECTION + +vapidir = $(datadir)/vala/vapi +vapi_DATA = DbusmenuGlib-0.2.vapi + +DbusmenuGlib-0.2.vapi: DbusmenuGlib-0.2.gir + $(VALA_API_GEN) --library=DbusmenuGlib-0.2 $< + +CLEANFILES += $(vapi_DATA) + +endif + === modified file 'libdbusmenu-gtk/Makefile.am' --- libdbusmenu-gtk/Makefile.am 2009-12-15 22:04:29 +0000 +++ libdbusmenu-gtk/Makefile.am 2010-03-01 16:39:38 +0000 @@ -1,4 +1,6 @@ +CLEANFILES = + EXTRA_DIST = \ dbusmenu-gtk.pc.in @@ -28,7 +30,7 @@ -export-symbols-regex "^[^_].*" libdbusmenu_gtk_la_CFLAGS = \ - $(DBUSMENUGTK_CFLAGS) -I$(srcdir)/.. -Wall -Werror -DG_DISABLE_DEPRECATED -DG_LOG_DOMAIN="\"LIBDBUSMENU-GTK\"" + $(DBUSMENUGTK_CFLAGS) -I$(top_srcdir) -Wall -Werror -DG_DISABLE_DEPRECATED -DG_LOG_DOMAIN="\"LIBDBUSMENU-GTK\"" libdbusmenu_gtk_la_LIBADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ @@ -37,3 +39,65 @@ pkgconfig_DATA = dbusmenu-gtk.pc pkgconfigdir = $(libdir)/pkgconfig +######################### +# GObject Introsepction +######################### + +-include $(INTROSPECTION_MAKEFILE) +INTROSPECTION_GIRS = +INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --add-include-path=$(top_srcdir)/libdbusmenu-glib +INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) --includedir=$(top_srcdir)/libdbusmenu-glib + +if HAVE_INTROSPECTION + +introspection_sources = $(libdbusmenu_gtkinclude_HEADERS) + +DbusmenuGtk-0.2.gir: libdbusmenu-gtk.la +DbusmenuGtk_0_2_gir_INCLUDES = \ + GObject-2.0 \ + Gtk-2.0 \ + DbusmenuGlib-0.2 +DbusmenuGtk_0_2_gir_CFLAGS = $(DBUSMENUGTK_CFLAGS) -I$(top_srcdir) +DbusmenuGtk_0_2_gir_LIBS = libdbusmenu-gtk.la +DbusmenuGtk_0_2_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources)) + +INTROSPECTION_GIRS += DbusmenuGtk-0.2.gir + +girdir = $(datadir)/gir-1.0 +dist_gir_DATA = $(INTROSPECTION_GIRS) + +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + +CLEANFILES += $(dist_gir_DATA) $(typelib_DATA) + +endif + +######################### +# VAPI Files +######################### + +if HAVE_INTROSPECTION + +vapidir = $(datadir)/vala/vapi +vapi_DATA = DbusmenuGtk-0.2.vapi + +DbusmenuGtk-0.2.vapi: DbusmenuGtk-0.2.tmp.gir Makefile.am + $(VALA_API_GEN) --library=DbusmenuGtk-0.2 \ + --pkg gdk-pixbuf-2.0 \ + --pkg gtk+-2.0 \ + --pkg atk \ + --pkg DbusmenuGlib-0.2 \ + --vapidir=$(top_builddir)/libdbusmenu-glib \ + $< + +DbusmenuGtk-0.2.tmp.gir: DbusmenuGtk-0.2.gir + $(SED) \ + -e "s|GdkPixbuf.Pixbuf|Gdk.Pixbuf|g" \ + -e "s|Atk.ImplementorIface|Atk.Implementor|g" \ + $< > $@ + +CLEANFILES += $(vapi_DATA) DbusmenuGtk-0.2.tmp.gir + +endif + === added directory 'm4' === added file 'm4/introspection.m4' --- m4/introspection.m4 1970-01-01 00:00:00 +0000 +++ m4/introspection.m4 2010-02-26 17:31:13 +0000 @@ -0,0 +1,94 @@ +dnl -*- mode: autoconf -*- +dnl Copyright 2009 Johan Dahlin +dnl +dnl This file is free software; the author(s) gives unlimited +dnl permission to copy and/or distribute it, with or without +dnl modifications, as long as this notice is preserved. +dnl + +# serial 1 + +m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], +[ + AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([LT_INIT],[$0])dnl setup libtool first + + dnl enable/disable introspection + m4_if([$2], [require], + [dnl + enable_introspection=yes + ],[dnl + AC_ARG_ENABLE(introspection, + AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], + [Enable introspection for this build]),, + [enable_introspection=auto]) + ])dnl + + AC_MSG_CHECKING([for gobject-introspection]) + + dnl presence/version checking + AS_CASE([$enable_introspection], + [no], [dnl + found_introspection="no (disabled, use --enable-introspection to enable)" + ],dnl + [yes],[dnl + PKG_CHECK_EXISTS([gobject-introspection-1.0],, + AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) + PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], + found_introspection=yes, + AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) + ],dnl + [auto],[dnl + PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) + ],dnl + [dnl + AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) + ])dnl + + AC_MSG_RESULT([$found_introspection]) + + INTROSPECTION_SCANNER= + INTROSPECTION_COMPILER= + INTROSPECTION_GENERATE= + INTROSPECTION_GIRDIR= + INTROSPECTION_TYPELIBDIR= + if test "x$found_introspection" = "xyes"; then + INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` + INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` + INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` + INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` + INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" + INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` + INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` + INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection + fi + AC_SUBST(INTROSPECTION_SCANNER) + AC_SUBST(INTROSPECTION_COMPILER) + AC_SUBST(INTROSPECTION_GENERATE) + AC_SUBST(INTROSPECTION_GIRDIR) + AC_SUBST(INTROSPECTION_TYPELIBDIR) + AC_SUBST(INTROSPECTION_CFLAGS) + AC_SUBST(INTROSPECTION_LIBS) + AC_SUBST(INTROSPECTION_MAKEFILE) + + AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") +]) + + +dnl Usage: +dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) + +AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], +[ + _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) +]) + +dnl Usage: +dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) + + +AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], +[ + _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) +])
_______________________________________________ Mailing list: https://launchpad.net/~ayatana-commits Post to : [email protected] Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp

