[Xfce4-commits] [xfce/libxfce4ui] 02/03: Add support for GOBJECT-INTROSPECTION (Bug #13461)

noreply at xfce.org noreply at xfce.org
Sun Jun 11 06:06:54 CEST 2017


This is an automated email from the git hooks/post-receive script.

e   r   i   c       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/libxfce4ui.

commit 6ff48eb5d2ee27f7dd33ecc28738220f0a2c7fa6
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Sat Jun 10 14:32:31 2017 +0300

    Add support for GOBJECT-INTROSPECTION (Bug #13461)
    
    GOjbect Introspection allows various other languages to automatically
    generate bindings they can use. For details see:
    https://wiki.gnome.org/action/show/Projects/GObjectIntrospection
    
    To support this, we need to add a gobject and introspection
    dependency. The introspection one is optional and it is what
    determines if the libxfce4ui-2 gir is created.
    Only libxfce4ui-2 is created (the Gtk3 version) as it makes little
    sense to support new applications in Gtk2.
---
 .gitignore             |  5 +++++
 Makefile.am            |  4 +++-
 configure.ac.in        |  5 +++++
 libxfce4ui/Makefile.am | 38 +++++++++++++++++++++++++++++++++++++-
 4 files changed, 50 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 77e3083..cfc8145 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,6 +56,7 @@ docs/xml/
 *.la
 *.lo
 *.stamp
+tests/*.o
 libxfce4kbd-private/xfce-shortcuts-marshal.c
 libxfce4kbd-private/xfce-shortcuts-marshal.h
 libxfce4ui/libxfce4ui-alias.h
@@ -66,6 +67,8 @@ libxfce4ui/libxfce4ui-marshal.c
 libxfce4ui/libxfce4ui-marshal.h
 libxfce4ui/stamp-libxfce4ui-enum-types.h
 libxfce4ui/stamp-libxfce4ui-marshal.h
+libxfce4ui/libxfce4ui-2.gir
+libxfce4ui/libxfce4ui-2.typelib
 xfce4-about/about-dialog-ui.h
 xfce4-about/xfce4-about
 xfce4-about/xfce4-about.desktop
@@ -74,4 +77,6 @@ glade/libxfce4ui.xml
 glade/libxfce4ui-2.xml
 libxfce4ui-*.tar.bz2
 tests/test-ui-gtk2
+tests/test_ui_gtk2-test-ui.o
 tests/test-ui-gtk3
+tests/test_ui_gtk3-test-ui.o
diff --git a/Makefile.am b/Makefile.am
index 21de67e..556ec20 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
+
 SUBDIRS = \
 	libxfce4ui \
 	libxfce4kbd-private \
@@ -37,6 +38,7 @@ DISTCLEANFILES = \
 
 DISTCHECK_CONFIGURE_FLAGS = \
 	--enable-gtk-doc \
-	--disable-gladeui
+	--disable-gladeui \
+	--enable-introspection
 
 # vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/configure.ac.in b/configure.ac.in
index 51ac35a..2ff8ee5 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -138,6 +138,11 @@ XDT_CHECK_OPTIONAL_PACKAGE([GTK3],
                            [GTK+ 3 support])
 AM_CONDITIONAL([ENABLE_GTK3_LIBRARY], [test "x$GTK3_FOUND" = "xyes"])
 
+dnl ***************************************
+dnl *** Check for gobject-introspection ***
+dnl ***************************************
+GOBJECT_INTROSPECTION_CHECK([1.30.0])
+
 dnl *************************************************
 dnl *** Optional support for startup notification ***
 dnl *************************************************
diff --git a/libxfce4ui/Makefile.am b/libxfce4ui/Makefile.am
index 9d861ab..7fee732 100644
--- a/libxfce4ui/Makefile.am
+++ b/libxfce4ui/Makefile.am
@@ -1,3 +1,5 @@
+CLEANFILES =
+
 AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-DDATADIR=\"$(datadir)\" \
@@ -117,6 +119,40 @@ libxfce4ui_2_la_LIBADD = \
 
 pkgconfig_DATA += libxfce4ui-2.pc
 
+include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ENV = CC="$(CC)"
+INTROSPECTION_SCANNER_ARGS = \
+	--add-include-path=$(srcdir) \
+	--warn-all \
+	--identifier-prefix=xfce \
+	--identifier-prefix=Xfce \
+	--identifier-prefix=libxfce
+INTROSPECTION_COMPILER_ARGS = \
+	--includedir=$(srcdir) \
+	--includedir=.
+
+if HAVE_INTROSPECTION
+introspection_sources = $(filter-out %private.h %.c, $(libxfce4ui_2_la_SOURCES))
+
+libxfce4ui-2.gir: libxfce4ui-2.la Makefile
+libxfce4ui_2_gir_INCLUDES = GObject-2.0 GLib-2.0 Gtk-3.0 libxfce4util-1.0
+libxfce4ui_2_gir_CFLAGS = $(AM_CPPFLAGS)
+libxfce4ui_2_gir_LIBS = libxfce4ui-2.la
+libxfce4ui_2_gir_FILES = $(introspection_sources)
+libxfce4ui_2_gir_EXPORT_PACKAGES = libxfce4ui-2
+INTROSPECTION_GIRS += libxfce4ui-2.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
+# endif HAVE_INTROSPECTION
+
 endif
 
 ##
@@ -129,7 +165,7 @@ endif
 ## files as part of the dist tarball.
 ##
 if MAINTAINER_MODE
-CLEANFILES = \
+CLEANFILES += \
 	actual-abi \
 	expected-abi
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list