Merge lp:~ricotz/bamf/optional-webapps into lp:bamf/0.4

Proposed by Rico Tzschichholz on 2012-10-08
Status: Merged
Approved by: Marco Trevisan (Treviño) on 2012-10-08
Approved revision: 488
Merged at revision: 488
Proposed branch: lp:~ricotz/bamf/optional-webapps
Merge into: lp:bamf/0.4
Diff against target: 203 lines (+57/-12)
5 files modified
config.h.in (+3/-0)
configure.in (+11/-2)
src/Makefile.am (+21/-6)
src/bamf-matcher.c (+6/-0)
tests/bamfdaemon/Makefile.am (+16/-4)
To merge this branch: bzr merge lp:~ricotz/bamf/optional-webapps
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) 2012-10-08 Approve on 2012-10-08
Review via email: mp+128456@code.launchpad.net

Commit Message

Autoconf: Make libunity-webapps an optional dependency

Description of the Change

Make libunity-webapps an optional dependency

To post a comment you must log in.
lp:~ricotz/bamf/optional-webapps updated on 2012-10-08
488. By Rico Tzschichholz on 2012-10-08

build: make libunity-webapps an optional dependency

Marco Trevisan (Treviño) (3v1n0) wrote :

Looks good, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.h.in'
2--- config.h.in 2011-09-26 11:44:10 +0000
3+++ config.h.in 2012-10-08 10:26:23 +0000
4@@ -30,6 +30,9 @@
5 /* Define to 1 if you have the <unistd.h> header file. */
6 #undef HAVE_UNISTD_H
7
8+/* Use libunity-webapps */
9+#undef HAVE_WEBAPPS
10+
11 /* Define to the sub-directory in which libtool stores uninstalled libraries.
12 */
13 #undef LT_OBJDIR
14
15=== modified file 'configure.in'
16--- configure.in 2012-10-01 13:57:13 +0000
17+++ configure.in 2012-10-08 10:26:23 +0000
18@@ -123,8 +123,16 @@
19 ###########################
20 # libunity_webapps
21 ###########################
22-PKG_CHECK_MODULES(LIBUNITY_WEBAPPS, libunity_webapps-0.2)
23-
24+AC_ARG_ENABLE([webapps],
25+ AS_HELP_STRING([--enable-webapps],
26+ [Enable libunity-webapps support]),
27+ [enable_webapps=$enableval],
28+ [enable_webapps=yes])
29+if test "x$enable_webapps" = "xyes"; then
30+ PKG_CHECK_MODULES(LIBUNITY_WEBAPPS, libunity_webapps-0.2)
31+ AC_DEFINE_UNQUOTED(HAVE_WEBAPPS, , [Use libunity-webapps])
32+fi
33+AM_CONDITIONAL([HAVE_WEBAPPS], [test "x$enable_webapps" = "xyes"])
34 AC_SUBST(LIBUNITY_WEBAPPS_CFLAGS)
35 AC_SUBST(LIBUNITY_WEBAPPS_LIBS)
36
37@@ -185,6 +193,7 @@
38 Install Prefix: ${prefix}
39 Introspection: ${enable_introspection}
40 GTK+ Version: ${with_gtk}
41+ Unity Webapps: ${enable_webapps}
42 Headless tests: ${enable_headless_tests}
43
44 EOF
45
46=== modified file 'src/Makefile.am'
47--- src/Makefile.am 2012-08-11 04:37:01 +0000
48+++ src/Makefile.am 2012-10-08 10:26:23 +0000
49@@ -53,9 +53,6 @@
50 bamf-application.c \
51 bamf-window.c \
52 bamf-tab.c \
53- bamf-unity-webapps-tab.c \
54- bamf-unity-webapps-observer.c \
55- bamf-unity-webapps-application.c \
56 bamf-indicator-source.c \
57 bamf-indicator.c \
58 bamf-xutils.c \
59@@ -76,12 +73,21 @@
60 bamf-window.h \
61 bamf-application.h \
62 bamf-tab.h \
63+ bamf-indicator-source.h \
64+ bamf-indicator.h \
65+ bamf-xutils.h \
66+ $(NULL)
67+
68+bamfdaemon_webapps_sources = \
69+ bamf-unity-webapps-tab.c \
70+ bamf-unity-webapps-observer.c \
71+ bamf-unity-webapps-application.c \
72+ $(NULL)
73+
74+bamfdaemon_webapps_headers = \
75 bamf-unity-webapps-tab.h \
76 bamf-unity-webapps-observer.h \
77 bamf-unity-webapps-application.h \
78- bamf-indicator-source.h \
79- bamf-indicator.h \
80- bamf-xutils.h \
81 $(NULL)
82
83 bamfdaemon_SOURCES = \
84@@ -89,6 +95,13 @@
85 $(bamfdaemon_headers) \
86 $(NULL)
87
88+if HAVE_WEBAPPS
89+bamfdaemon_SOURCES += \
90+ $(bamfdaemon_webapps_sources) \
91+ $(bamfdaemon_webapps_headers) \
92+ $(NULL)
93+endif
94+
95 nodist_bamfdaemon_SOURCES = \
96 $(bamfdaemon_built_sources) \
97 $(NULL)
98@@ -159,6 +172,8 @@
99
100 EXTRA_DIST += \
101 $(bamfdaemon_xml_gdbus_files) \
102+ $(bamfdaemon_webapps_sources) \
103+ $(bamfdaemon_webapps_headers) \
104 $(NULL)
105
106 DISTCLEANFILES += \
107
108=== modified file 'src/bamf-matcher.c'
109--- src/bamf-matcher.c 2012-08-21 22:01:48 +0000
110+++ src/bamf-matcher.c 2012-10-08 10:26:23 +0000
111@@ -28,7 +28,9 @@
112 #include "bamf-indicator-source.h"
113 #include "bamf-xutils.h"
114
115+#ifdef HAVE_WEBAPPS
116 #include "bamf-unity-webapps-application.h"
117+#endif
118 #include <strings.h>
119
120 G_DEFINE_TYPE (BamfMatcher, bamf_matcher, BAMF_DBUS_TYPE_MATCHER_SKELETON);
121@@ -2895,6 +2897,7 @@
122 return TRUE;
123 }
124
125+#ifdef HAVE_WEBAPPS
126 static void
127 on_webapp_child_added (BamfView *application,
128 BamfView *child,
129@@ -2921,6 +2924,7 @@
130 self);
131 bamf_unity_webapps_application_add_existing_interests (BAMF_UNITY_WEBAPPS_APPLICATION (application));
132 }
133+#endif
134
135 static void
136 bamf_matcher_init (BamfMatcher * self)
137@@ -3014,12 +3018,14 @@
138 g_signal_connect (self, "handle-window-stack-for-monitor",
139 G_CALLBACK (on_dbus_handle_window_stack_for_monitor), self);
140
141+#ifdef HAVE_WEBAPPS
142 priv->webapps_observer = bamf_unity_webapps_observer_new ();
143
144 g_signal_connect (priv->webapps_observer,
145 "application-appeared",
146 G_CALLBACK (on_webapp_appeared),
147 self);
148+#endif
149 }
150
151 static void
152
153=== modified file 'tests/bamfdaemon/Makefile.am'
154--- tests/bamfdaemon/Makefile.am 2012-08-10 18:07:11 +0000
155+++ tests/bamfdaemon/Makefile.am 2012-10-08 10:26:23 +0000
156@@ -14,9 +14,6 @@
157 $(top_srcdir)/src/bamf-application.c \
158 $(top_srcdir)/src/bamf-window.c \
159 $(top_srcdir)/src/bamf-tab.c \
160- $(top_srcdir)/src/bamf-unity-webapps-tab.c \
161- $(top_srcdir)/src/bamf-unity-webapps-observer.c \
162- $(top_srcdir)/src/bamf-unity-webapps-application.c \
163 $(top_srcdir)/src/bamf-indicator.c \
164 $(top_srcdir)/src/bamf-indicator-source.c \
165 $(top_srcdir)/src/bamf-xutils.c \
166@@ -50,6 +47,12 @@
167 $(top_builddir)/src/bamf-gdbus-indicator-source-generated.h \
168 $(NULL)
169
170+bamf_test_webapps_sources = \
171+ $(top_srcdir)/src/bamf-unity-webapps-tab.c \
172+ $(top_srcdir)/src/bamf-unity-webapps-observer.c \
173+ $(top_srcdir)/src/bamf-unity-webapps-application.c \
174+ $(NULL)
175+
176 test_bamf_SOURCES = \
177 $(bamf_test_extra_sources) \
178 $(bamf_test_extra_headers) \
179@@ -59,6 +62,12 @@
180 test-window.c \
181 test-matcher.c
182
183+if HAVE_WEBAPPS
184+test_bamf_SOURCES += \
185+ $(bamf_test_webapps_sources) \
186+ $(NULL)
187+endif
188+
189 test_bamf_CPPFLAGS = \
190 -I$(top_srcdir) \
191 -I$(top_srcdir)/src \
192@@ -85,7 +94,10 @@
193 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions \
194 $(NULL)
195
196-EXTRA_DIST = data
197+EXTRA_DIST = \
198+ data \
199+ $(bamf_test_webapps_sources) \
200+ $(NULL)
201
202 # Run tests as part of make check
203 if ENABLE_HEADLESS_TESTS

Subscribers

People subscribed via source and target branches