Merge lp://qastaging/~ted/libindicate/introspection-update into lp://qastaging/libindicate/0.6

Proposed by Ted Gould
Status: Merged
Merged at revision: not available
Proposed branch: lp://qastaging/~ted/libindicate/introspection-update
Merge into: lp://qastaging/libindicate/0.6
Diff against target: 283 lines
5 files modified
.bzrignore (+7/-0)
configure.ac (+2/-24)
libindicate-gtk/Makefile.am (+33/-25)
libindicate/Makefile.am (+22/-19)
m4/introspection.m4 (+88/-0)
To merge this branch: bzr merge lp://qastaging/~ted/libindicate/introspection-update
Reviewer Review Type Date Requested Status
Cody Russell (community) Approve
Review via email: mp+13185@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Updates for newer introspection techniques.

Revision history for this message
Cody Russell (bratsche) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2009-09-03 21:57:34 +0000
3+++ .bzrignore 2009-10-11 16:15:20 +0000
4@@ -147,3 +147,10 @@
5 tests/test-indicator-display-server
6 tests/test-indicator-display-half-server
7 tests/test-indicator-display-half-client
8+m4/gtk-doc.m4
9+libindicate/Indicate-0.2.gir
10+libindicate/Indicate-0.2.typelib
11+libindicate-gtk/Indicate-Gtk-0.2.gir
12+libindicate-gtk/Indicate-Gtk-0.2.typelib
13+libindicate-[0-9].[0-9].[0-9].tar.gz
14+libindicate-[0-9].[0-9].[0-9].tar.gz.asc
15
16=== modified file 'configure.ac'
17--- configure.ac 2009-10-01 20:05:46 +0000
18+++ configure.ac 2009-10-11 16:15:20 +0000
19@@ -75,29 +75,7 @@
20 # GObject Introspection
21 ###########################
22
23-AC_ARG_ENABLE(gobject-introspection, AC_HELP_STRING([--enable-gobject-introspection], [enable building the gobject-introspection files]), [enable_gir=$enableval], [enable_gir=yes])
24-
25-if test "x$enable_gir" = "xyes"; then
26- PKG_CHECK_MODULES(GOBJECT_INTROSPECTION, [gobject-introspection-1.0 >= 0.6], gir_ok=yes, gir_ok=no)
27-
28- if test "x$gir_ok" = "xyes"; then
29- G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
30- AC_SUBST(G_IR_SCANNER)
31- G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
32- AC_SUBST(G_IR_COMPILER)
33- G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
34- AC_SUBST(G_IR_GENERATE)
35-
36- GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
37- AC_SUBST(GIRDIR)
38- TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
39- AC_SUBST(TYPELIBDIR)
40- fi
41-else
42- gir_ok=no
43-fi
44-
45-AM_CONDITIONAL(USE_GIR, test "x$gir_ok" = "xyes")
46+GOBJECT_INTROSPECTION_CHECK([0.6.3])
47
48 ###########################
49 # GTK Doc
50@@ -178,5 +156,5 @@
51 Libindicate Configuration:
52
53 Prefix: $prefix
54- GObject Introspection: $gir_ok
55+ GObject Introspection: $enable_introspection
56 ])
57
58=== modified file 'libindicate-gtk/Makefile.am'
59--- libindicate-gtk/Makefile.am 2009-09-03 22:32:17 +0000
60+++ libindicate-gtk/Makefile.am 2009-10-11 16:15:20 +0000
61@@ -38,35 +38,43 @@
62 pkgconfig_DATA = indicate-gtk.pc
63 pkgconfigdir = $(libdir)/pkgconfig
64
65-if USE_GIR
66-
67-gobjectintrospection_gir_DATA = \
68- Indicate-gtk-0.1.gir
69-gobjectintrospection_girdir = $(datadir)/gir
70-
71-gobjectintrospection_type_DATA = \
72- Indicate-gtk-0.1.typelib
73-gobjectintrospection_typedir = $(libdir)/girepository
74-
75-irscanner_headers = $(patsubst %,$(srcdir)/%,$(indicate_headers))
76-Indicate-gtk-0.1.gir: $(irscanner_headers)
77- $(G_IR_SCANNER) \
78- -v --namespace IndicateGtk \
79- --nsversion=0.1 \
80+CLEANFILES =
81+
82+if HAVE_INTROSPECTION
83+
84+BUILT_GIRSOURCES =
85+
86+irscanner_headers = $(patsubst %,$(srcdir)/%,$(indicate_gtk_headers))
87+
88+Indicate-Gtk-0.2.gir: $(INTROSPECTION_SCANNER) $(irscanner_headers) Makefile.am
89+ $(INTROSPECTION_SCANNER) \
90+ -v --namespace Indicate \
91+ --nsversion=0.2 \
92 --add-include-path=$(srcdir) \
93 --include=GObject-2.0 \
94 --include=GLib-2.0 \
95 --include=GdkPixbuf-2.0 \
96+ --include=Indicate-0.2 \
97+ --add-include-path=$(top_builddir)/libindicate \
98 --library=indicate --pkg indicate \
99- --output Indicate-gtk-0.1.gir $(irscanner_headers)
100-
101-Indicate-gtk-0.1.typelib: Indicate-gtk-0.1.gir
102- $(G_IR_COMPILER) \
103- --includedir=$(srcdir) Indicate-gtk-0.1.gir \
104- -o Indicate-gtk-0.1.typelib
105-
106-DISTCLEANFILES = \
107- Indicate-gtk-0.1.gir \
108- Indicate-gtk-0.1.typelib
109+ --output Indicate-Gtk-0.2.gir $(irscanner_headers)
110+
111+BUILT_GIRSOURCES += Indicate-Gtk-0.2.gir
112+
113+girdir = $(datadir)/gir-1.0
114+gir_DATA = $(BUILT_GIRSOURCES)
115+
116+typelibsdir = $(libdir)/girepository-1.0
117+typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
118+
119+%.typelib: %.gir $(INTROSPECTION_COMPILER)
120+ $(INTROSPECTION_COMPILER) \
121+ --includedir=$(srcdir) \
122+ --includedir=. \
123+ --includedir=$(top_builddir)/libindicate \
124+ $(INTROSPECTION_COMPILER_OPTS) \
125+ $< -o $(@F)
126+
127+CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
128
129 endif
130
131=== modified file 'libindicate/Makefile.am'
132--- libindicate/Makefile.am 2009-09-04 17:44:23 +0000
133+++ libindicate/Makefile.am 2009-10-11 16:15:20 +0000
134@@ -152,19 +152,14 @@
135 s-enum-types-c \
136 s-enum-types-h
137
138-if USE_GIR
139-
140-gobjectintrospection_gir_DATA = \
141- Indicate-0.2.gir
142-gobjectintrospection_girdir = $(datadir)/gir
143-
144-gobjectintrospection_type_DATA = \
145- Indicate-0.2.typelib
146-gobjectintrospection_typedir = $(libdir)/girepository
147+if HAVE_INTROSPECTION
148+
149+BUILT_GIRSOURCES =
150
151 irscanner_headers = $(patsubst %,$(srcdir)/%,$(indicate_headers))
152-Indicate-0.2.gir: $(irscanner_headers) Makefile
153- $(G_IR_SCANNER) \
154+
155+Indicate-0.2.gir: $(INTROSPECTION_SCANNER) $(irscanner_headers) Makefile.am
156+ $(INTROSPECTION_SCANNER) \
157 -v --namespace Indicate \
158 --nsversion=0.2 \
159 --add-include-path=$(srcdir) \
160@@ -174,13 +169,21 @@
161 --library=indicate --pkg indicate \
162 --output Indicate-0.2.gir $(irscanner_headers)
163
164-Indicate-0.2.typelib: Indicate-0.2.gir
165- $(G_IR_COMPILER) \
166- --includedir=$(srcdir) Indicate-0.2.gir \
167- -o Indicate-0.2.typelib
168-
169-DISTCLEANFILES = \
170- Indicate-0.2.gir \
171- Indicate-0.2.typelib
172+BUILT_GIRSOURCES += Indicate-0.2.gir
173+
174+girdir = $(datadir)/gir-1.0
175+gir_DATA = $(BUILT_GIRSOURCES)
176+
177+typelibsdir = $(libdir)/girepository-1.0
178+typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
179+
180+%.typelib: %.gir $(INTROSPECTION_COMPILER)
181+ $(INTROSPECTION_COMPILER) \
182+ --includedir=$(srcdir) \
183+ --includedir=. \
184+ $(INTROSPECTION_COMPILER_OPTS) \
185+ $< -o $(@F)
186+
187+CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
188
189 endif
190
191=== added directory 'm4'
192=== added file 'm4/introspection.m4'
193--- m4/introspection.m4 1970-01-01 00:00:00 +0000
194+++ m4/introspection.m4 2009-10-11 16:15:20 +0000
195@@ -0,0 +1,88 @@
196+dnl -*- mode: autoconf -*-
197+dnl Copyright 2009 Johan Dahlin
198+dnl
199+dnl This file is free software; the author(s) gives unlimited
200+dnl permission to copy and/or distribute it, with or without
201+dnl modifications, as long as this notice is preserved.
202+dnl
203+
204+# serial 1
205+
206+m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
207+[
208+ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
209+ AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
210+ AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
211+
212+ dnl enable/disable introspection
213+ m4_if([$2], [require],
214+ [dnl
215+ enable_introspection=yes
216+ ],[dnl
217+ AC_ARG_ENABLE(introspection,
218+ AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
219+ [Enable introspection for this build]),,
220+ [enable_introspection=auto])
221+ ])dnl
222+
223+ AC_MSG_CHECKING([for gobject-introspection])
224+
225+ dnl presence/version checking
226+ AS_CASE([$enable_introspection],
227+ [no], [dnl
228+ found_introspection="no (disabled, use --enable-introspection to enable)"
229+ ],dnl
230+ [yes],[dnl
231+ PKG_CHECK_EXISTS([gobject-introspection-1.0],,
232+ AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
233+ PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
234+ found_introspection=yes,
235+ AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
236+ ],dnl
237+ [auto],[dnl
238+ PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
239+ ],dnl
240+ [dnl
241+ AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
242+ ])dnl
243+
244+ AC_MSG_RESULT([$found_introspection])
245+
246+ INTROSPECTION_SCANNER=
247+ INTROSPECTION_COMPILER=
248+ INTROSPECTION_GENERATE=
249+ INTROSPECTION_GIRDIR=
250+ INTROSPECTION_TYPELIBDIR=
251+ if test "x$found_introspection" = "xyes"; then
252+ INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
253+ INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
254+ INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
255+ INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
256+ INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
257+ fi
258+ AC_SUBST(INTROSPECTION_SCANNER)
259+ AC_SUBST(INTROSPECTION_COMPILER)
260+ AC_SUBST(INTROSPECTION_GENERATE)
261+ AC_SUBST(INTROSPECTION_GIRDIR)
262+ AC_SUBST(INTROSPECTION_TYPELIBDIR)
263+
264+ AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
265+])
266+
267+
268+dnl Usage:
269+dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
270+
271+AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
272+[
273+ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
274+])
275+
276+dnl Usage:
277+dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
278+
279+
280+AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
281+[
282+ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
283+])

Subscribers

People subscribed via source and target branches

to all changes: