Merge lp:~ted/hud/automatic-shutdown into lp:hud/phablet
- automatic-shutdown
- Merge into phablet
Proposed by
Ted Gould
Status: | Superseded |
---|---|
Proposed branch: | lp:~ted/hud/automatic-shutdown |
Merge into: | lp:hud/phablet |
Diff against target: |
6819 lines (+2957/-2976) 87 files modified
.bzrignore (+7/-243) CMakeLists.txt (+147/-0) Makefile.am (+0/-57) Makefile.am.coverage (+0/-48) Makefile.am.enum (+0/-45) Makefile.am.marshal (+0/-45) autogen.sh (+0/-12) build.sh (+18/-0) cmake/COPYING-CMAKE-SCRIPTS (+22/-0) cmake/ConstantBuilderTemplates.cmake (+12/-0) cmake/Coverage.cmake (+34/-0) cmake/FindGObjectIntrospection.cmake (+61/-0) cmake/FindGtkDoc.cmake (+68/-0) cmake/FindVala.cmake (+57/-0) cmake/GlibGenerationTemplates.cmake (+61/-0) cmake/GtkDocScanGObjWrapper.cmake (+43/-0) cmake/ListOperations.cmake (+18/-0) cmake/UseConstantBuilder.cmake (+19/-0) cmake/UseGObjectIntrospection.cmake (+100/-0) cmake/UseGSettings.cmake (+42/-0) cmake/UseGdbusCodegen.cmake (+35/-0) cmake/UseGlibGeneration.cmake (+71/-0) cmake/UseGtkDoc.cmake (+234/-0) cmake/UseVala.cmake (+241/-0) configure.ac (+0/-306) data/CMakeLists.txt (+38/-0) data/Makefile.am (+0/-28) debian/control (+1/-0) debian/hud-tools.install (+1/-1) debian/libhud1.symbols (+1/-9) debian/rules (+3/-10) docs/CMakeLists.txt (+2/-0) docs/Makefile.am (+0/-3) docs/devel/Makefile.am (+0/-42) docs/libhud-client/CMakeLists.txt (+32/-0) docs/libhud-client/Makefile.am (+0/-34) docs/man/CMakeLists.txt (+28/-0) docs/man/Makefile.am (+0/-16) libhud-client/CMakeLists.txt (+197/-0) libhud-client/Makefile.am (+0/-175) libhud-client/connection.h (+4/-0) libhud-client/enum-types.h.in (+4/-0) libhud-client/param.h (+9/-0) libhud-client/query.h (+10/-1) libhud-gtk/CMakeLists.txt (+94/-0) libhud-gtk/Makefile.am (+0/-59) libhud/CMakeLists.txt (+197/-0) libhud/Makefile.am (+0/-188) libhud/action-publisher.h (+8/-0) libhud/action.c (+1/-1) libhud/action.h (+4/-0) libhud/demo/Makefile.am (+0/-13) libhud/manager.h (+4/-0) libhud/operation.h (+4/-0) libhud/tests/Makefile.am (+0/-36) m4/gcov.m4 (+0/-86) src/CMakeLists.txt (+202/-0) src/Makefile.am (+0/-242) src/abstract-app.h (+0/-2) src/hud-service.c (+10/-3) src/huddbusmenucollector.c (+0/-2) src/hudjulius.c (+1/-0) src/hudkeywordmapping.c (+0/-1) src/hudmenumodelcollector.c (+0/-1) src/hudquery.c (+18/-2) src/hudquery.h (+2/-0) src/hudsource.h (+1/-0) src/watchdog.c (+178/-0) src/watchdog.h (+53/-0) tests/CMakeLists.txt (+175/-0) tests/Makefile.am (+0/-1047) tests/hud-performance.c (+1/-1) tests/test-application-list.c (+1/-1) tests/test-indicator-source.c (+1/-1) tests/test-keyword-mapping.c (+4/-4) tests/test-runner.sh (+11/-0) tests/test-source.c (+4/-4) tests/test-watchdog.c (+147/-0) tools-vala/CMakeLists.txt (+80/-0) tools-vala/Makefile.am (+0/-34) tools/CMakeLists.txt (+84/-0) tools/Makefile.am (+0/-147) tools/hud-cli.c (+1/-0) tools/hudkeywords/CMakeLists.txt (+51/-0) tools/hudkeywords/Makefile.am (+0/-9) tools/hudkeywords/bin/Makefile.am (+0/-6) tools/hudkeywords/hudkeywords/Makefile.am (+0/-11) |
To merge this branch: | bzr merge lp:~ted/hud/automatic-shutdown |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Indicator Applet Developers | Pending | ||
Review via email: mp+155383@code.launchpad.net |
This proposal has been superseded by a proposal from 2013-03-29.
Commit message
Add watchdog to shutdown if the service isn't being used.
Description of the change
Adds a watchdog to shutdown if it's not being used. This is to help with memory and CPU usage on mobile platforms, all services that might not be used are being asked to shutdown with this style of watchdog.
To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : | # |
review:
Needs Fixing
(continuous-integration)
lp:~ted/hud/automatic-shutdown
updated
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' |
2 | --- .bzrignore 2013-02-28 12:06:00 +0000 |
3 | +++ .bzrignore 2013-03-29 12:53:22 +0000 |
4 | @@ -1,246 +1,10 @@ |
5 | -# root |
6 | -/ABOUT-NLS |
7 | -/aclocal.m4 |
8 | -/autom4te.cache |
9 | -/compile |
10 | -/config.guess |
11 | -/config.h |
12 | -/config.h.in |
13 | -/config.log |
14 | -/config.rpath |
15 | -/config.status |
16 | -/config.sub |
17 | -/configure |
18 | -/depcomp |
19 | -/gtk-doc.make |
20 | -/install-sh |
21 | -/libtool |
22 | -/ltmain.sh |
23 | -/missing |
24 | -/omf.make |
25 | -/stamp-h1 |
26 | -/tmp |
27 | -/xmldocs.make |
28 | /.settings |
29 | /.project |
30 | /.cproject |
31 | - |
32 | -# In any location |
33 | -Makefile |
34 | -Makefile.in |
35 | -Makefile.in.in |
36 | -.deps |
37 | -.libs |
38 | -*.lo |
39 | -*.la |
40 | -*.pc |
41 | -*.pot |
42 | - |
43 | -# /docs |
44 | -/docs/**/xml |
45 | -/docs/**/html |
46 | -/docs/**/*.txt |
47 | -!/docs/**/*-sections.txt |
48 | -/docs/**/*.stamp |
49 | -/docs/**/*.args |
50 | -/docs/**/*.hierarchy |
51 | -/docs/**/*.interfaces |
52 | -/docs/**/*.prerequisites |
53 | -/docs/**/*.signals |
54 | -/docs/**/*.1 |
55 | - |
56 | -# /libhud |
57 | -/libhud/app-iface.c |
58 | -/libhud/app-iface.h |
59 | -/libhud/marshal.c |
60 | -/libhud/marshal.h |
61 | -/libhud/service-iface.c |
62 | -/libhud/service-iface.h |
63 | -/libhud/stamp-marshal |
64 | - |
65 | -/libhud/demo/consumer |
66 | -/libhud/demo/consumer.c |
67 | -/libhud/demo/consumer_vala.stamp |
68 | -/libhud/demo/gimp |
69 | -/libhud/demo/gvtk.c |
70 | -/libhud/demo/simple-test |
71 | - |
72 | -/libhud/tests/libhud-test |
73 | -/libhud/tests/libhud-test.xml |
74 | -/libhud/tests/libhud-tester |
75 | - |
76 | -# libhud-client |
77 | -/libhud-client/HudClient-1.gir |
78 | -/libhud-client/HudClient-1.typelib |
79 | -/libhud-client/HudClient-1.vapi |
80 | -/libhud-client/enum-types.c |
81 | -/libhud-client/enum-types.h |
82 | -/libhud-client/query-iface.c |
83 | -/libhud-client/query-iface.h |
84 | -/libhud-client/service-iface.c |
85 | -/libhud-client/service-iface.h |
86 | -/libhud-client/stamp-enum-types |
87 | - |
88 | -# m4 |
89 | -/m4/codeset.m4 |
90 | -/m4/gettext.m4 |
91 | -/m4/glibc2.m4 |
92 | -/m4/glibc21.m4 |
93 | -/m4/gtk-doc.m4 |
94 | -/m4/iconv.m4 |
95 | -/m4/intdiv0.m4 |
96 | -/m4/intl.m4 |
97 | -/m4/intldir.m4 |
98 | -/m4/intlmacosx.m4 |
99 | -/m4/intltool.m4 |
100 | -/m4/intmax.m4 |
101 | -/m4/inttypes-pri.m4 |
102 | -/m4/inttypes_h.m4 |
103 | -/m4/lcmessage.m4 |
104 | -/m4/lib-ld.m4 |
105 | -/m4/lib-link.m4 |
106 | -/m4/lib-prefix.m4 |
107 | -/m4/libtool.m4 |
108 | -/m4/lock.m4 |
109 | -/m4/longlong.m4 |
110 | -/m4/ltoptions.m4 |
111 | -/m4/ltsugar.m4 |
112 | -/m4/ltversion.m4 |
113 | -/m4/lt~obsolete.m4 |
114 | -/m4/nls.m4 |
115 | -/m4/po.m4 |
116 | -/m4/printf-posix.m4 |
117 | -/m4/progtest.m4 |
118 | -/m4/size_max.m4 |
119 | -/m4/stdint_h.m4 |
120 | -/m4/uintmax_t.m4 |
121 | -/m4/visibility.m4 |
122 | -/m4/wchar_t.m4 |
123 | -/m4/wint_t.m4 |
124 | -/m4/xsize.m4 |
125 | - |
126 | -# /po |
127 | -/po/Makevars.template |
128 | -/po/POTFILES |
129 | -/po/Rules-quot |
130 | -/po/*.sed |
131 | -/po/*.header |
132 | -/po/*.sin |
133 | -/po/stamp-it |
134 | - |
135 | -# /src |
136 | -/src/app-iface.c |
137 | -/src/app-iface.h |
138 | -/src/create-db.c |
139 | -/src/enum-types.c |
140 | -/src/enum-types.h |
141 | -/src/hud-dump-application |
142 | -/src/hud-iface.c |
143 | -/src/hud-iface.h |
144 | -/src/hud-query-iface.c |
145 | -/src/hud-query-iface.h |
146 | -/src/hud-service |
147 | -/src/hud-verify-app-info |
148 | -/src/stamp-enum-types |
149 | - |
150 | -# /data |
151 | -/data/*.valid |
152 | -/data/*.service |
153 | - |
154 | -# /tools |
155 | -/tools/hud-cli |
156 | -/tools/hud-cli-appstack |
157 | -/tools/hud-cli-param |
158 | -/tools/hud-cli-toolbar |
159 | -/tools/hud-pronounce-for-word |
160 | - |
161 | -# /tools-vala |
162 | -/tools-vala/hud-gtk |
163 | -/tools-vala/hud-gtk.c |
164 | -/tools-vala/hud_gtk_vala.stamp |
165 | - |
166 | -# /tests |
167 | -/tests/dbusmenu-json-loader |
168 | -/tests/hud-performance |
169 | -/tests/libhud-client-test |
170 | -/tests/libhud-client-test-xunit.xml |
171 | -/tests/libhud-client-test.xml |
172 | -/tests/libhud-client-tester |
173 | -/tests/test-app-indicator-source |
174 | -/tests/test-app-indicator-source-test |
175 | -/tests/test-app-indicator-source-xunit.xml |
176 | -/tests/test-app-indicator-source.xml |
177 | -/tests/test-application-list |
178 | -/tests/test-application-list-test |
179 | -/tests/test-application-list-xunit.xml |
180 | -/tests/test-application-list.xml |
181 | -/tests/test-bad-app-info |
182 | -/tests/test-bad-app-info-dual-header |
183 | -/tests/test-bad-app-info-item-no-count |
184 | -/tests/test-bad-app-info-item-no-name |
185 | -/tests/test-bad-app-info-menu-no-name |
186 | -/tests/test-bad-app-info-missing-desktop |
187 | -/tests/test-bad-app-info-missing-menus |
188 | -/tests/test-bad-app-info-multiple-menus |
189 | -/tests/test-dbus-message-count |
190 | -/tests/test-dbus-message-count.bustle |
191 | -/tests/test-distance |
192 | -/tests/test-distance-test |
193 | -/tests/test-distance-xunit.xml |
194 | -/tests/test-distance.xml |
195 | -/tests/test-good-app-info-tons-of-entries |
196 | -/tests/test-hud-item |
197 | -/tests/test-hud-item-test |
198 | -/tests/test-hud-item-xunit.xml |
199 | -/tests/test-hud-item.xml |
200 | -/tests/test-indicator-source |
201 | -/tests/test-indicator-source-test |
202 | -/tests/test-indicator-source-xunit.xml |
203 | -/tests/test-indicator-source.xml |
204 | -/tests/test-keyword-mapping |
205 | -/tests/test-keyword-mapping-test |
206 | -/tests/test-keyword-mapping-xunit.xml |
207 | -/tests/test-keyword-mapping.xml |
208 | -/tests/test-load-app-info |
209 | -/tests/test-menu-input |
210 | -/tests/test-menu-input-model-deep |
211 | -/tests/test-menu-input-model-shortcuts |
212 | -/tests/test-menu-input-model-simple |
213 | -/tests/test-menu-input-tester |
214 | -/tests/test-menu-input-xunit.xml |
215 | -/tests/test-menu-input.xml |
216 | -/tests/test-pronounce-dict |
217 | -/tests/test-pronounce-dict-test |
218 | -/tests/test-pronounce-dict-xunit.xml |
219 | -/tests/test-pronounce-dict.xml |
220 | -/tests/test-result-highlighting |
221 | -/tests/test-result-highlighting-test |
222 | -/tests/test-result-highlighting-xunit.xml |
223 | -/tests/test-result-highlighting.xml |
224 | -/tests/test-source |
225 | -/tests/test-source-test |
226 | -/tests/test-source-xunit.xml |
227 | -/tests/test-source.xml |
228 | -/tests/test-string-list |
229 | -/tests/test-string-list-test |
230 | -/tests/test-string-list-xunit.xml |
231 | -/tests/test-string-list.xml |
232 | -/tests/test-usage-db-ancient |
233 | -/tests/test-usage-db-ancient-test |
234 | -/tests/test-usage-db-off-test |
235 | -/tests/test-usage-db-off-xunit.xml |
236 | -/tests/test-usage-db-off.xml |
237 | -/tests/test-usage-db-old |
238 | -/tests/test-usage-db-old-test |
239 | -/tests/test-usage-db-old-xunit.xml |
240 | -/tests/test-usage-db-old.xml |
241 | -/tests/test-usage-db-simple |
242 | -/tests/test-usage-db-simple-test |
243 | -/tests/test-usage-db-simple-xunit.xml |
244 | -/tests/test-usage-db-simple.xml |
245 | -/tests/test-usage-db-testapp |
246 | -/tests/test-usage-db-testapp-test |
247 | -/tests/test-usage-db-testapp-xunit.xml |
248 | -/tests/test-usage-db-testapp.xml |
249 | -/tests/keyword-mapping/locale/en_FAKELANG/LC_MESSAGES/gnome-terminal.mo |
250 | - |
251 | +/.pydevproject |
252 | +/build |
253 | + |
254 | +test-watchdog |
255 | +test-watchdog-test |
256 | +test-watchdog-xunit.xml |
257 | +test-watchdog.xml |
258 | |
259 | === added file 'CMakeLists.txt' |
260 | --- CMakeLists.txt 1970-01-01 00:00:00 +0000 |
261 | +++ CMakeLists.txt 2013-03-29 12:53:22 +0000 |
262 | @@ -0,0 +1,147 @@ |
263 | +project(hud C) |
264 | +cmake_minimum_required(VERSION 2.8.9) |
265 | + |
266 | +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") |
267 | + |
268 | +set(PACKAGE ${CMAKE_PROJECT_NAME}) |
269 | +set(GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME}) |
270 | + |
271 | +if(PROJECT_BINARY_DIR STREQUAL PROJECT_SOURCE_DIR) |
272 | + message(FATAL_ERROR "In-tree build attempt detected, aborting. Set your build dir outside your source dir, delete CMakeCache.txt from source root and try again.") |
273 | +endif() |
274 | + |
275 | +option(enable_tests "Enable tests." ON) |
276 | +option(enable_scalability_tests "Additional scalability tests that are potentially very slow to run." OFF) |
277 | +option(full_warnings "Full compiler warnings." OFF) |
278 | +option(debug_messages "Print debug messages." OFF) |
279 | +option(local_install "Support local installation." OFF) |
280 | + |
281 | +find_package(PkgConfig REQUIRED) |
282 | +include(GNUInstallDirs) |
283 | +include(CheckIncludeFile) |
284 | +include(CheckFunctionExists) |
285 | +include(Coverage) |
286 | +include(UseGlibGeneration) |
287 | +include(UseGdbusCodegen) |
288 | +include(UseConstantBuilder) |
289 | +include(UseGSettings) |
290 | +include(UseVala) |
291 | + |
292 | +# Workaround for libexecdir on debian |
293 | +if (EXISTS "/etc/debian_version") |
294 | + set(CMAKE_INSTALL_LIBEXECDIR ${CMAKE_INSTALL_LIBDIR}) |
295 | + set(CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBEXECDIR}") |
296 | +endif() |
297 | + |
298 | +if(${full_warnings}) |
299 | + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic") |
300 | +endif() |
301 | + |
302 | +if(${debug_messages}) |
303 | + add_definitions(-DDEBUG_MESSAGES) |
304 | +endif() |
305 | + |
306 | +set(HUD_QUERY_XML ${CMAKE_CURRENT_SOURCE_DIR}/data/com.canonical.hud.query.xml) |
307 | +set(HUD_SERVICE_XML ${CMAKE_CURRENT_SOURCE_DIR}/data/com.canonical.hud.xml) |
308 | +set(HUD_APP_XML ${CMAKE_CURRENT_SOURCE_DIR}/data/com.canonical.hud.Application.xml) |
309 | + |
310 | +set(HUD_TOP_DIR ${CMAKE_CURRENT_SOURCE_DIR}) |
311 | +set(HUD_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") |
312 | + |
313 | +add_definitions( -DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}" ) |
314 | +add_definitions( -DGNOMELOCALEDIR="${CMAKE_INSTALL_FULL_DATADIR}/locale" ) |
315 | +add_definitions( -DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}" ) |
316 | +add_definitions( -DLIBEXECDIR="${CMAKE_INSTALL_FULL_LIBEXECDIR}" ) |
317 | +add_definitions( -DDICT_PATH="/usr/share/pocketsphinx/model/lm/en_US/cmu07a.dic" ) |
318 | +add_definitions( -DJULIUS_DICT_PATH="/usr/share/julius-voxforge/acoustic/" ) |
319 | + |
320 | +pkg_check_modules(GLIB2 REQUIRED glib-2.0) |
321 | +include_directories(${GLIB2_INCLUDE_DIRS}) |
322 | + |
323 | +pkg_check_modules(GOBJECT2 REQUIRED gobject-2.0) |
324 | +include_directories(${GOBJECT2_INCLUDE_DIRS}) |
325 | + |
326 | +pkg_check_modules(GIO2 REQUIRED gio-2.0) |
327 | +include_directories(${GIO2_INCLUDE_DIRS}) |
328 | + |
329 | +pkg_check_modules(GIO_UNIX2 REQUIRED gio-unix-2.0) |
330 | +include_directories(${GIO_UNIX2_INCLUDE_DIRS}) |
331 | + |
332 | +pkg_check_modules(DEE REQUIRED dee-1.0) |
333 | +include_directories(${DEE_INCLUDE_DIRS}) |
334 | + |
335 | +pkg_check_modules(SQLITE3 REQUIRED sqlite3) |
336 | +include_directories(${SQLITE3_INCLUDE_DIRS}) |
337 | + |
338 | +pkg_check_modules(DBUSMENU_GLIB REQUIRED dbusmenu-glib-0.4) |
339 | +include_directories(${DBUSMENU_GLIB_INCLUDE_DIRS}) |
340 | + |
341 | +pkg_check_modules(POCKETSPHINX REQUIRED pocketsphinx) |
342 | +include_directories(${POCKETSPHINX_INCLUDE_DIRS}) |
343 | + |
344 | +pkg_search_module(GTK3 REQUIRED gtk+-3.0) |
345 | +include_directories(${GTK3_INCLUDE_DIRS}) |
346 | + |
347 | +find_package(Vala 0.12) |
348 | + |
349 | +find_package(GObjectIntrospection 0.9.12) |
350 | + |
351 | +check_include_file("signal.h" HAVE_SIGNAL_H) |
352 | +if(${HAVE_SIGNAL_H}) |
353 | + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} "signal.h") |
354 | + check_function_exists(kill HAVE_KILL) |
355 | +endif() |
356 | + |
357 | +find_package(Curses) |
358 | +check_include_file("readline/readline.h" READLINE_FOUND) |
359 | +check_include_file("readline/history.h" READLINE_HISTORY_FOUND) |
360 | +find_library(READLINE_LIBRARIES NAMES readline) |
361 | + |
362 | +pkg_search_module(PANGO REQUIRED pango) |
363 | + |
364 | +pkg_search_module(BAMF libbamf3) |
365 | +if(${BAMF_FOUND}) |
366 | + add_definitions( -DHAVE_BAMF=1 ) |
367 | + include_directories(${BAMF_INCLUDE_DIRS}) |
368 | +endif() |
369 | + |
370 | +if(${local_install}) |
371 | + set(DBUSSERVICEDIR "${CMAKE_INSTALL_DATADIR}/dbus-1/services/") |
372 | +else() |
373 | + EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS dbus-1 --variable session_bus_services_dir OUTPUT_VARIABLE DBUSSERVICEDIR ) |
374 | +endif() |
375 | +message("Installing DBus services to ${DBUSSERVICEDIR}") |
376 | + |
377 | +if(${local_install}) |
378 | + set(DBUSIFACEDIR "${CMAKE_INSTALL_DATADIR}/dbus-1/interfaces/") |
379 | +else() |
380 | + EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS dbus-1 --variable interfaces_dir OUTPUT_VARIABLE DBUSIFACEDIR ) |
381 | +endif() |
382 | +message("Installing DBus interfaces to ${DBUSIFACEDIR}") |
383 | + |
384 | +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) |
385 | +include_directories(${CMAKE_CURRENT_BINARY_DIR}) |
386 | + |
387 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -fPIC") |
388 | + |
389 | +add_subdirectory(data) |
390 | +add_subdirectory(libhud-client) |
391 | +add_subdirectory(libhud) |
392 | +add_subdirectory(libhud-gtk) |
393 | +add_subdirectory(src) |
394 | +add_subdirectory(tools) |
395 | + |
396 | +if(${enable_tests}) |
397 | + enable_testing() |
398 | + |
399 | + pkg_check_modules(DBUSTEST REQUIRED dbustest-1) |
400 | + include_directories(${DBUSTEST_INCLUDE_DIRS}) |
401 | + |
402 | + pkg_check_modules(DBUSMENU_JSONLOADER REQUIRED dbusmenu-jsonloader-0.4) |
403 | + include_directories(${DBUSMENU_JSONLOADER_INCLUDE_DIRS}) |
404 | + |
405 | + add_subdirectory(tests) |
406 | +endif() |
407 | + |
408 | +add_subdirectory(tools-vala) |
409 | +add_subdirectory(docs) |
410 | |
411 | === removed file 'Makefile.am' |
412 | --- Makefile.am 2013-02-20 14:52:48 +0000 |
413 | +++ Makefile.am 1970-01-01 00:00:00 +0000 |
414 | @@ -1,57 +0,0 @@ |
415 | -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} |
416 | - |
417 | -SUBDIRS = \ |
418 | - data \ |
419 | - po \ |
420 | - src \ |
421 | - libhud \ |
422 | - libhud-gtk \ |
423 | - libhud-client \ |
424 | - tools \ |
425 | - docs |
426 | - |
427 | -if BUILD_TESTS |
428 | -SUBDIRS += \ |
429 | - tests \ |
430 | - tools-vala |
431 | -endif |
432 | - |
433 | -tests: src |
434 | - |
435 | -tools: libhud-client |
436 | - |
437 | -DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-localinstall --enable-deprecations --disable-hybris |
438 | - |
439 | -dist-hook: |
440 | - @if test -d "$(top_srcdir)/.bzr"; \ |
441 | - then \ |
442 | - echo Creating ChangeLog && \ |
443 | - ( cd "$(top_srcdir)" && \ |
444 | - echo '# Generated by Makefile. Do not edit.'; echo; \ |
445 | - $(top_srcdir)/missing --run bzr log --gnu-changelog ) > ChangeLog.tmp \ |
446 | - && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ |
447 | - || (rm -f ChangeLog.tmp; \ |
448 | - echo Failed to generate ChangeLog >&2 ); \ |
449 | - else \ |
450 | - echo Failed to generate ChangeLog: not a branch >&2; \ |
451 | - fi |
452 | - @if test -d "$(top_srcdir)/.bzr"; \ |
453 | - then \ |
454 | - echo Creating AUTHORS && \ |
455 | - ( cd "$(top_srcdir)" && \ |
456 | - echo '# Generated by Makefile. Do not edit.'; echo; \ |
457 | - $(top_srcdir)/missing --run bzr log --long --levels=0 | grep -e "^\s*author:" -e "^\s*committer:" | cut -d ":" -f 2 | cut -d "<" -f 1 | sort -u) > AUTHORS.tmp \ |
458 | - && mv -f AUTHORS.tmp $(top_distdir)/AUTHORS \ |
459 | - || (rm -f AUTHORS.tmp; \ |
460 | - echo Failed to generate AUTHORS >&2 ); \ |
461 | - else \ |
462 | - echo Failed to generate AUTHORS: not a branch >&2; \ |
463 | - fi |
464 | - |
465 | -include $(top_srcdir)/Makefile.am.coverage |
466 | - |
467 | -EXTRA_DIST = \ |
468 | - autogen.sh \ |
469 | - Makefile.am.coverage \ |
470 | - Makefile.am.enum \ |
471 | - Makefile.am.marshal |
472 | |
473 | === removed file 'Makefile.am.coverage' |
474 | --- Makefile.am.coverage 2012-03-27 21:15:59 +0000 |
475 | +++ Makefile.am.coverage 1970-01-01 00:00:00 +0000 |
476 | @@ -1,48 +0,0 @@ |
477 | - |
478 | -# Coverage targets |
479 | - |
480 | -.PHONY: clean-gcno clean-gcda \ |
481 | - coverage-html generate-coverage-html clean-coverage-html \ |
482 | - coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr |
483 | - |
484 | -clean-local: clean-gcno clean-coverage-html clean-coverage-gcovr |
485 | - |
486 | -if HAVE_GCOV |
487 | - |
488 | -clean-gcno: |
489 | - @echo Removing old coverage instrumentation |
490 | - -find -name '*.gcno' -print | xargs -r rm |
491 | - |
492 | -clean-gcda: |
493 | - @echo Removing old coverage results |
494 | - -find -name '*.gcda' -print | xargs -r rm |
495 | - |
496 | -coverage-html: clean-gcda |
497 | - -$(MAKE) $(AM_MAKEFLAGS) -k check |
498 | - $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html |
499 | - |
500 | -generate-coverage-html: |
501 | - @echo Collecting coverage data |
502 | - $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool |
503 | - LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info |
504 | - |
505 | -clean-coverage-html: clean-gcda |
506 | - -$(LCOV) --directory $(top_builddir) -z |
507 | - -rm -rf coverage.info coveragereport |
508 | - |
509 | -if HAVE_GCOVR |
510 | - |
511 | -coverage-gcovr: clean-gcda |
512 | - -$(MAKE) $(AM_MAKEFLAGS) -k check |
513 | - $(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr |
514 | - |
515 | -generate-coverage-gcovr: |
516 | - @echo Generating coverage GCOVR report |
517 | - $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml |
518 | - |
519 | -clean-coverage-gcovr: clean-gcda |
520 | - -rm -rf $(top_builddir)/coverage.xml |
521 | - |
522 | -endif # HAVE_GCOVR |
523 | - |
524 | -endif # HAVE_GCOV |
525 | |
526 | === removed file 'Makefile.am.enum' |
527 | --- Makefile.am.enum 2013-02-12 03:01:18 +0000 |
528 | +++ Makefile.am.enum 1970-01-01 00:00:00 +0000 |
529 | @@ -1,45 +0,0 @@ |
530 | -# Rules for generating enumeration types using glib-mkenums |
531 | -# |
532 | -# Define: |
533 | -# glib_enum_h = header template file |
534 | -# glib_enum_c = source template file |
535 | -# glib_enum_headers = list of headers to parse |
536 | -# |
537 | -# before including Makefile.am.enums. You will also need to have |
538 | -# the following targets already defined: |
539 | -# |
540 | -# CLEANFILES |
541 | -# DISTCLEANFILES |
542 | -# BUILT_SOURCES |
543 | -# EXTRA_DIST |
544 | -# |
545 | -# Author: Emmanuele Bassi <ebassi@linux.intel.com> |
546 | - |
547 | -enum_tmpl_h=$(glib_enum_h:.h=.h.in) |
548 | -enum_tmpl_c=$(glib_enum_c:.c=.c.in) |
549 | - |
550 | -CLEANFILES += stamp-enum-types |
551 | -DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c) |
552 | -BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c) |
553 | -EXTRA_DIST += $(enum_tmpl_h) $(enum_tmpl_c) |
554 | - |
555 | -stamp-enum-types: $(glib_enum_headers) |
556 | - $(QUIET_GEN)mkdir -p `dirname $(builddir)/$(glib_enum_h)` |
557 | - $(QUIET_GEN)$(GLIB_MKENUMS) \ |
558 | - --template $(srcdir)/$(enum_tmpl_h) \ |
559 | - $(glib_enum_headers) > xgen-eh \ |
560 | - && (cmp -s xgen-eh $(builddir)/$(glib_enum_h) || cp -f xgen-eh $(builddir)/$(glib_enum_h)) \ |
561 | - && rm -f xgen-eh \ |
562 | - && echo timestamp > $(@F) |
563 | - |
564 | -$(glib_enum_h): stamp-enum-types |
565 | - @true |
566 | - |
567 | -$(glib_enum_c): $(builddir)/$(glib_enum_h) |
568 | - $(QUIET_GEN)mkdir -p `dirname $(builddir)/$(glib_enum_c)` |
569 | - $(QUIET_GEN)$(GLIB_MKENUMS) \ |
570 | - --template $(srcdir)/$(enum_tmpl_c) \ |
571 | - $(glib_enum_headers) > xgen-ec \ |
572 | - && cp -f xgen-ec $(builddir)/$(glib_enum_c) \ |
573 | - && rm -f xgen-ec |
574 | - |
575 | |
576 | === removed file 'Makefile.am.marshal' |
577 | --- Makefile.am.marshal 2010-04-23 18:01:58 +0000 |
578 | +++ Makefile.am.marshal 1970-01-01 00:00:00 +0000 |
579 | @@ -1,45 +0,0 @@ |
580 | -# Rules for generating marshal files using glib-genmarshal |
581 | -# |
582 | -# Define: |
583 | -# glib_marshal_list = marshal list file |
584 | -# glib_marshal_prefix = prefix for marshal functions |
585 | -# |
586 | -# before including Makefile.am.marshal. You will also need to have |
587 | -# the following targets already defined: |
588 | -# |
589 | -# CLEANFILES |
590 | -# DISTCLEANFILES |
591 | -# BUILT_SOURCES |
592 | -# EXTRA_DIST |
593 | -# |
594 | -# Author: Emmanuele Bassi <ebassi@linux.intel.com> |
595 | - |
596 | -marshal_h = $(glib_marshal_list:.list=.h) |
597 | -marshal_c = $(glib_marshal_list:.list=.c) |
598 | - |
599 | -CLEANFILES += stamp-marshal |
600 | -DISTCLEANFILES += $(marshal_h) $(marshal_c) |
601 | -BUILT_SOURCES += $(marshal_h) $(marshal_c) |
602 | -EXTRA_DIST += $(glib_marshal_list) |
603 | - |
604 | -stamp-marshal: $(glib_marshal_list) |
605 | - $(QUIET_GEN)$(GLIB_GENMARSHAL) \ |
606 | - --prefix=$(glib_marshal_prefix) \ |
607 | - --header \ |
608 | - $(srcdir)/$(glib_marshal_list) > xgen-mh \ |
609 | - && (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \ |
610 | - && rm -f xgen-mh \ |
611 | - && echo timestamp > $(@F) |
612 | - |
613 | -$(marshal_h): stamp-marshal |
614 | - @true |
615 | - |
616 | -$(marshal_c): $(marshal_h) |
617 | - $(QUIET_GEN)(echo "#include \"$(marshal_h)\"" ; \ |
618 | - $(GLIB_GENMARSHAL) \ |
619 | - --prefix=$(glib_marshal_prefix) \ |
620 | - --body \ |
621 | - $(srcdir)/$(glib_marshal_list)) > xgen-mc \ |
622 | - && cp xgen-mc $(marshal_c) \ |
623 | - && rm -f xgen-mc |
624 | - |
625 | |
626 | === removed file 'autogen.sh' |
627 | --- autogen.sh 2012-10-24 06:53:55 +0000 |
628 | +++ autogen.sh 1970-01-01 00:00:00 +0000 |
629 | @@ -1,12 +0,0 @@ |
630 | -#!/bin/sh |
631 | - |
632 | -PKG_NAME="hud" |
633 | - |
634 | -which gnome-autogen.sh || { |
635 | - echo "You need gnome-common from GNOME SVN" |
636 | - exit 1 |
637 | -} |
638 | - |
639 | -USE_GNOME2_MACROS=1 \ |
640 | -USE_COMMON_DOC_BUILD=yes \ |
641 | -gnome-autogen.sh --enable-gtk-doc $@ |
642 | |
643 | === added file 'build.sh' |
644 | --- build.sh 1970-01-01 00:00:00 +0000 |
645 | +++ build.sh 2013-03-29 12:53:22 +0000 |
646 | @@ -0,0 +1,18 @@ |
647 | +#! /bin/bash |
648 | +set -e |
649 | + |
650 | +mkdir -p build |
651 | + |
652 | +if [ -f "/usr/bin/ninja" ] ; then |
653 | + EXTRA_ARGS="-G Ninja" |
654 | + BUILD_COMMAND="ninja" |
655 | +else |
656 | + BUILD_COMMAND="make" |
657 | +fi |
658 | + |
659 | +echo "Using $BUILD_COMMAND to build" |
660 | +( |
661 | + cd build |
662 | + cmake .. $EXTRA_ARGS -DCMAKE_INSTALL_PREFIX=../../install -Dlocal_install=ON -DGSETTINGS_LOCALINSTALL=ON |
663 | + $BUILD_COMMAND |
664 | +) |
665 | |
666 | === added directory 'cmake' |
667 | === added file 'cmake/COPYING-CMAKE-SCRIPTS' |
668 | --- cmake/COPYING-CMAKE-SCRIPTS 1970-01-01 00:00:00 +0000 |
669 | +++ cmake/COPYING-CMAKE-SCRIPTS 2013-03-29 12:53:22 +0000 |
670 | @@ -0,0 +1,22 @@ |
671 | +Redistribution and use in source and binary forms, with or without |
672 | +modification, are permitted provided that the following conditions |
673 | +are met: |
674 | + |
675 | +1. Redistributions of source code must retain the copyright |
676 | + notice, this list of conditions and the following disclaimer. |
677 | +2. Redistributions in binary form must reproduce the copyright |
678 | + notice, this list of conditions and the following disclaimer in the |
679 | + documentation and/or other materials provided with the distribution. |
680 | +3. The name of the author may not be used to endorse or promote products |
681 | + derived from this software without specific prior written permission. |
682 | + |
683 | +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
684 | +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
685 | +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
686 | +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
687 | +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
688 | +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
689 | +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
690 | +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
691 | +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
692 | +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
693 | |
694 | === added file 'cmake/ConstantBuilderTemplates.cmake' |
695 | --- cmake/ConstantBuilderTemplates.cmake 1970-01-01 00:00:00 +0000 |
696 | +++ cmake/ConstantBuilderTemplates.cmake 2013-03-29 12:53:22 +0000 |
697 | @@ -0,0 +1,12 @@ |
698 | + file(READ "${input}" input_contents) |
699 | + string(REGEX REPLACE "\n" " " input_on_one_line "${input_contents}") |
700 | + set(new_contents |
701 | + "\#include \"${name}.h\"\nconst gchar * ${const_name} = \"${input_on_one_line}\";\n") |
702 | + if (EXISTS "${file_target}") |
703 | + file(READ "${file_target}" old_contents) |
704 | + if(NOT new_contents EQUAL old_contents) |
705 | + file(WRITE "${file_target}" "${new_contents}") |
706 | + endif() |
707 | + else() |
708 | + file(WRITE "${file_target}" "${new_contents}") |
709 | + endif() |
710 | |
711 | === added file 'cmake/Coverage.cmake' |
712 | --- cmake/Coverage.cmake 1970-01-01 00:00:00 +0000 |
713 | +++ cmake/Coverage.cmake 2013-03-29 12:53:22 +0000 |
714 | @@ -0,0 +1,34 @@ |
715 | +if (CMAKE_BUILD_TYPE MATCHES coverage) |
716 | + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") |
717 | + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage") |
718 | + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} --coverage") |
719 | + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage") |
720 | + |
721 | + find_program(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin") |
722 | + if (NOT GCOVR_EXECUTABLE) |
723 | + message(STATUS "Gcovr binary was not found, can not generate XML coverage info.") |
724 | + else () |
725 | + message(STATUS "Gcovr found, can generate XML coverage info.") |
726 | + add_custom_target (coverage-xml |
727 | + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
728 | + COMMAND "${GCOVR_EXECUTABLE}" --exclude="test.*" -x -r "${CMAKE_SOURCE_DIR}" |
729 | + --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml) |
730 | + endif() |
731 | + |
732 | + find_program(LCOV_EXECUTABLE lcov HINTS ${LCOV_ROOT} "${GCOVR_ROOT}/bin") |
733 | + find_program(GENHTML_EXECUTABLE genhtml HINTS ${GENHTML_ROOT}) |
734 | + if (NOT LCOV_EXECUTABLE) |
735 | + message(STATUS "Lcov binary was not found, can not generate HTML coverage info.") |
736 | + else () |
737 | + if(NOT GENHTML_EXECUTABLE) |
738 | + message(STATUS "Genthml binary not found, can not generate HTML coverage info.") |
739 | + else() |
740 | + message(STATUS "Lcov and genhtml found, can generate HTML coverage info.") |
741 | + add_custom_target (coverage-html |
742 | + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
743 | + COMMAND "${LCOV_EXECUTABLE}" --directory ${CMAKE_BINARY_DIR} --capture --output-file coverage.info --no-checksum |
744 | + COMMAND "${GENHTML_EXECUTABLE}" --prefix ${CMAKE_BINARY_DIR} --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info |
745 | + ) |
746 | + endif() |
747 | + endif() |
748 | +endif() |
749 | |
750 | === added file 'cmake/FindGObjectIntrospection.cmake' |
751 | --- cmake/FindGObjectIntrospection.cmake 1970-01-01 00:00:00 +0000 |
752 | +++ cmake/FindGObjectIntrospection.cmake 2013-03-29 12:53:22 +0000 |
753 | @@ -0,0 +1,61 @@ |
754 | +# - try to find gobject-introspection |
755 | +# |
756 | +# Once done this will define |
757 | +# |
758 | +# INTROSPECTION_FOUND - system has gobject-introspection |
759 | +# INTROSPECTION_SCANNER - the gobject-introspection scanner, g-ir-scanner |
760 | +# INTROSPECTION_COMPILER - the gobject-introspection compiler, g-ir-compiler |
761 | +# INTROSPECTION_GENERATE - the gobject-introspection generate, g-ir-generate |
762 | +# INTROSPECTION_GIRDIR |
763 | +# INTROSPECTION_TYPELIBDIR |
764 | +# INTROSPECTION_CFLAGS |
765 | +# INTROSPECTION_LIBS |
766 | +# |
767 | +# Copyright (C) 2010, Pino Toscano, <pino@kde.org> |
768 | +# |
769 | +# Redistribution and use is allowed according to the terms of the BSD license. |
770 | +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
771 | + |
772 | +macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname) |
773 | + execute_process( |
774 | + COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${_varname} gobject-introspection-1.0 |
775 | + OUTPUT_VARIABLE _result |
776 | + RESULT_VARIABLE _null |
777 | + ) |
778 | + |
779 | + if (_null) |
780 | + else() |
781 | + string(REGEX REPLACE "[\r\n]" " " _result "${_result}") |
782 | + string(REGEX REPLACE " +$" "" _result "${_result}") |
783 | + separate_arguments(_result) |
784 | + set(${_outvar} ${_result} CACHE INTERNAL "") |
785 | + endif() |
786 | +endmacro(_GIR_GET_PKGCONFIG_VAR) |
787 | + |
788 | +find_package(PkgConfig) |
789 | +if(PKG_CONFIG_FOUND) |
790 | + if(PACKAGE_FIND_VERSION_COUNT GREATER 0) |
791 | + set(_gir_version_cmp ">=${PACKAGE_FIND_VERSION}") |
792 | + endif() |
793 | + pkg_check_modules(_pc_gir gobject-introspection-1.0${_gir_version_cmp}) |
794 | + if(_pc_gir_FOUND) |
795 | + set(INTROSPECTION_FOUND TRUE) |
796 | + _gir_get_pkgconfig_var(INTROSPECTION_SCANNER "g_ir_scanner") |
797 | + _gir_get_pkgconfig_var(INTROSPECTION_COMPILER "g_ir_compiler") |
798 | + _gir_get_pkgconfig_var(INTROSPECTION_GENERATE "g_ir_generate") |
799 | + _gir_get_pkgconfig_var(INTROSPECTION_GIRDIR "girdir") |
800 | + _gir_get_pkgconfig_var(INTROSPECTION_TYPELIBDIR "typelibdir") |
801 | + set(INTROSPECTION_CFLAGS "${_pc_gir_CFLAGS}") |
802 | + set(INTROSPECTION_LIBS "${_pc_gir_LIBS}") |
803 | + endif() |
804 | +endif() |
805 | + |
806 | +mark_as_advanced( |
807 | + INTROSPECTION_SCANNER |
808 | + INTROSPECTION_COMPILER |
809 | + INTROSPECTION_GENERATE |
810 | + INTROSPECTION_GIRDIR |
811 | + INTROSPECTION_TYPELIBDIR |
812 | + INTROSPECTION_CFLAGS |
813 | + INTROSPECTION_LIBS |
814 | +) |
815 | |
816 | === added file 'cmake/FindGtkDoc.cmake' |
817 | --- cmake/FindGtkDoc.cmake 1970-01-01 00:00:00 +0000 |
818 | +++ cmake/FindGtkDoc.cmake 2013-03-29 12:53:22 +0000 |
819 | @@ -0,0 +1,68 @@ |
820 | +# CMake macros to find the GtkDoc documentation system |
821 | + |
822 | +# Output variables: |
823 | +# |
824 | +# GTKDOC_FOUND ... set to 1 if GtkDoc was foung |
825 | +# |
826 | +# If GTKDOC_FOUND == 1: |
827 | +# |
828 | +# GTKDOC_SCAN_EXE ... the location of the gtkdoc-scan executable |
829 | +# GTKDOC_SCANGOBJ_EXE ... the location of the gtkdoc-scangobj executable |
830 | +# GTKDOC_MKTMPL_EXE ... the location of the gtkdoc-mktmpl executable |
831 | +# GTKDOC_MKDB_EXE ... the location of the gtkdoc-mkdb executable |
832 | +# GTKDOC_MKHTML_EXE ... the location of the gtkdoc-mkhtml executable |
833 | +# GTKDOC_FIXXREF_EXE ... the location of the gtkdoc-fixxref executable |
834 | + |
835 | +set(GTKDOC_FOUND 1) |
836 | + |
837 | +find_program(GTKDOC_SCAN_EXE gtkdoc-scan PATH "${GLIB_PREFIX}/bin") |
838 | +if(NOT GTKDOC_SCAN_EXE) |
839 | + message(STATUS "gtkdoc-scan not found") |
840 | + set(GTKDOC_FOUND 0) |
841 | +endif(NOT GTKDOC_SCAN_EXE) |
842 | + |
843 | +find_program(GTKDOC_SCANGOBJ_EXE gtkdoc-scangobj PATH "${GLIB_PREFIX}/bin") |
844 | +if(NOT GTKDOC_SCANGOBJ_EXE) |
845 | + message(STATUS "gtkdoc-scangobj not found") |
846 | + set(GTKDOC_FOUND 0) |
847 | +endif(NOT GTKDOC_SCANGOBJ_EXE) |
848 | + |
849 | +get_filename_component(_this_dir ${CMAKE_CURRENT_LIST_FILE} PATH) |
850 | +find_file(GTKDOC_SCANGOBJ_WRAPPER GtkDocScanGObjWrapper.cmake PATH ${_this_dir}) |
851 | +if(NOT GTKDOC_SCANGOBJ_WRAPPER) |
852 | + message(STATUS "GtkDocScanGObjWrapper.cmake not found") |
853 | + set(GTKDOC_FOUND 0) |
854 | +endif(NOT GTKDOC_SCANGOBJ_WRAPPER) |
855 | + |
856 | +find_program(GTKDOC_MKTMPL_EXE gtkdoc-mktmpl PATH "${GLIB_PREFIX}/bin") |
857 | +if(NOT GTKDOC_MKTMPL_EXE) |
858 | + message(STATUS "gtkdoc-mktmpl not found") |
859 | + set(GTKDOC_FOUND 0) |
860 | +endif(NOT GTKDOC_MKTMPL_EXE) |
861 | + |
862 | +find_program(GTKDOC_MKDB_EXE gtkdoc-mkdb PATH "${GLIB_PREFIX}/bin") |
863 | +if(NOT GTKDOC_MKDB_EXE) |
864 | + message(STATUS "gtkdoc-mkdb not found") |
865 | + set(GTKDOC_FOUND 0) |
866 | +endif(NOT GTKDOC_MKDB_EXE) |
867 | + |
868 | +find_program(GTKDOC_MKHTML_EXE gtkdoc-mkhtml PATH "${GLIB_PREFIX}/bin") |
869 | +if(NOT GTKDOC_MKHTML_EXE) |
870 | + message(STATUS "gtkdoc-mkhtml not found") |
871 | + set(GTKDOC_FOUND 0) |
872 | +endif(NOT GTKDOC_MKHTML_EXE) |
873 | + |
874 | +find_program(GTKDOC_FIXXREF_EXE gtkdoc-fixxref PATH "${GLIB_PREFIX}/bin") |
875 | +if(NOT GTKDOC_FIXXREF_EXE) |
876 | + message(STATUS "gtkdoc-fixxref not found") |
877 | + set(GTKDOC_FOUND 0) |
878 | +endif(NOT GTKDOC_FIXXREF_EXE) |
879 | + |
880 | +find_program(GTKDOC_CHECK_EXE gtkdoc-check PATH "${GLIB_PREFIX}/bin") |
881 | +if(NOT GTKDOC_CHECK_EXE) |
882 | + message(STATUS "gtkdoc-check not found") |
883 | + set(GTKDOC_FOUND 0) |
884 | +endif(NOT GTKDOC_CHECK_EXE) |
885 | + |
886 | +# vim:sw=4:ts=4:et:autoindent |
887 | + |
888 | |
889 | === added file 'cmake/FindVala.cmake' |
890 | --- cmake/FindVala.cmake 1970-01-01 00:00:00 +0000 |
891 | +++ cmake/FindVala.cmake 2013-03-29 12:53:22 +0000 |
892 | @@ -0,0 +1,57 @@ |
893 | +# - Find Vala |
894 | +# This module looks for valac. |
895 | +# This module defines the following values: |
896 | +# VALA_FOUND |
897 | +# VALA_COMPILER |
898 | +# VALA_VERSION |
899 | +# VAPI_GEN |
900 | +# VAPI_GEN_VERSION |
901 | + |
902 | +#============================================================================= |
903 | +# Copyright Přemysl Janouch 2011 |
904 | +# All rights reserved. |
905 | +# |
906 | +# Redistribution and use in source and binary forms, with or without |
907 | +# modification, are permitted provided that the following conditions are met: |
908 | +# * Redistributions of source code must retain the above copyright |
909 | +# notice, this list of conditions and the following disclaimer. |
910 | +# * Redistributions in binary form must reproduce the above copyright |
911 | +# notice, this list of conditions and the following disclaimer in the |
912 | +# documentation and/or other materials provided with the distribution. |
913 | +# |
914 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' |
915 | +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
916 | +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
917 | +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE |
918 | +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
919 | +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
920 | +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
921 | +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
922 | +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
923 | +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
924 | +# OF SUCH DAMAGE. |
925 | +#============================================================================= |
926 | + |
927 | +find_program (VALA_COMPILER "valac") |
928 | + |
929 | +if (VALA_COMPILER) |
930 | + execute_process (COMMAND ${VALA_COMPILER} --version |
931 | + OUTPUT_VARIABLE VALA_VERSION) |
932 | + string (REGEX MATCH "[.0-9]+" VALA_VERSION "${VALA_VERSION}") |
933 | +endif (VALA_COMPILER) |
934 | + |
935 | +find_program (VAPI_GEN "vapigen") |
936 | + |
937 | +if (VAPI_GEN) |
938 | + execute_process (COMMAND ${VAPI_GEN} --version |
939 | + OUTPUT_VARIABLE VAPI_GEN_VERSION) |
940 | + string (REGEX MATCH "[.0-9]+" VAPI_GEN_VERSION "${VAPI_GEN_VERSION}") |
941 | +endif (VAPI_GEN) |
942 | + |
943 | +include (FindPackageHandleStandardArgs) |
944 | +FIND_PACKAGE_HANDLE_STANDARD_ARGS (Vala |
945 | + REQUIRED_VARS VALA_COMPILER |
946 | + VERSION_VAR VALA_VERSION) |
947 | + |
948 | +mark_as_advanced (VALA_COMPILER VALA_VERSION VAPI_GEN) |
949 | + |
950 | |
951 | === added file 'cmake/GlibGenerationTemplates.cmake' |
952 | --- cmake/GlibGenerationTemplates.cmake 1970-01-01 00:00:00 +0000 |
953 | +++ cmake/GlibGenerationTemplates.cmake 2013-03-29 12:53:22 +0000 |
954 | @@ -0,0 +1,61 @@ |
955 | +message(STATUS ${headers}) |
956 | +file(WRITE ${htemplate} "/*** BEGIN file-header ***/ |
957 | +#ifndef __${includeguard}_ENUM_TYPES_H__ |
958 | +#define __${includeguard}_ENUM_TYPES_H__ |
959 | + |
960 | +#include <glib-object.h> |
961 | + |
962 | +G_BEGIN_DECLS |
963 | + |
964 | +/*** END file-header ***/ |
965 | +/*** BEGIN file-production ***/ |
966 | + |
967 | +/* enumerations from \"@filename@\" */ |
968 | + |
969 | +/*** END file-production ***/ |
970 | +/*** BEGIN value-header ***/ |
971 | +GType @enum_name@_get_type (void); |
972 | +#define ${namespace}_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) |
973 | + |
974 | +/*** END value-header ***/ |
975 | +/*** BEGIN file-tail ***/ |
976 | +G_END_DECLS |
977 | + |
978 | +#endif /* __${includeguard}_ENUM_TYPES_H__ */ |
979 | +/*** END file-tail ***/ |
980 | +") |
981 | + |
982 | +# Write the .c template |
983 | +file(WRITE ${ctemplate} "/*** BEGIN file-header ***/ |
984 | +#include \"${name}.h\"\n") |
985 | +foreach(header ${headers}) |
986 | + file(APPEND ${ctemplate} "#include \"${header}\"\n") |
987 | +endforeach(header) |
988 | +file(APPEND ${ctemplate} " |
989 | +/*** END file-header ***/ |
990 | +/*** BEGIN file-production ***/ |
991 | + |
992 | +/* enumerations from \"@filename@\" */ |
993 | +/*** END file-production ***/ |
994 | +/*** BEGIN value-header ***/ |
995 | +GType |
996 | +@enum_name@_get_type (void) |
997 | +{ |
998 | + static volatile gsize g_define_type_id__volatile = 0; |
999 | + if (g_once_init_enter (&g_define_type_id__volatile)) { |
1000 | + static const G@Type@Value values[] = { |
1001 | +/*** END value-header ***/ |
1002 | +/*** BEGIN value-production ***/ |
1003 | +{ @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }, |
1004 | +/*** END value-production ***/ |
1005 | +/*** BEGIN value-tail ***/ |
1006 | +{ 0, NULL, NULL } |
1007 | + }; |
1008 | + GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values); |
1009 | + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); |
1010 | + } |
1011 | + return g_define_type_id__volatile; |
1012 | +} |
1013 | + |
1014 | +/*** END value-tail ***/ |
1015 | +") |
1016 | |
1017 | === added file 'cmake/GtkDocScanGObjWrapper.cmake' |
1018 | --- cmake/GtkDocScanGObjWrapper.cmake 1970-01-01 00:00:00 +0000 |
1019 | +++ cmake/GtkDocScanGObjWrapper.cmake 2013-03-29 12:53:22 +0000 |
1020 | @@ -0,0 +1,43 @@ |
1021 | +if(NOT APPLE) |
1022 | + # We use pkg-config to fing glib et al |
1023 | + find_package(PkgConfig) |
1024 | + # Find glib et al |
1025 | + pkg_check_modules(GLIB REQUIRED glib-2.0 gobject-2.0) |
1026 | + |
1027 | +foreach(_flag ${EXTRA_CFLAGS} ${GLIB_CFLAGS}) |
1028 | + set(ENV{CFLAGS} "$ENV{CFLAGS} \"${_flag}\"") |
1029 | +endforeach(_flag) |
1030 | + |
1031 | +foreach(_flag ${EXTRA_LDFLAGS} ${GLIB_LDFLAGS}) |
1032 | + set(ENV{LDFLAGS} "$ENV{LDFLAGS} \"${_flag}\"") |
1033 | +endforeach(_flag) |
1034 | + |
1035 | +foreach(_flag ${EXTRA_LDPATH}) |
1036 | + if(ENV{LD_LIBRARY_PATH}) |
1037 | + set(ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:\"${_flag}\"") |
1038 | + else(ENV{LD_LIBRARY_PATH}) |
1039 | + set(ENV{LD_LIBRARY_PATH} "${_flag}") |
1040 | + endif(ENV{LD_LIBRARY_PATH}) |
1041 | +endforeach(_flag) |
1042 | + |
1043 | +message(STATUS "Executing gtkdoc-scangobj with:") |
1044 | +message(STATUS " CFLAGS: $ENV{CFLAGS}") |
1045 | +message(STATUS " LDFLAGS: $ENV{LDFLAGS}") |
1046 | +message(STATUS " LDPATH: $ENV{LD_LIBRARY_PATH}") |
1047 | + |
1048 | +execute_process(COMMAND ${GTKDOC_SCANGOBJ_EXE} |
1049 | + "--module=${doc_prefix}" |
1050 | + "--types=${output_types}" |
1051 | + "--output-dir=${output_dir}" |
1052 | + WORKING_DIRECTORY "${output_dir}" |
1053 | + RESULT_VARIABLE _scan_result) |
1054 | + |
1055 | +if(_scan_result EQUAL 0) |
1056 | + message(STATUS "Scan succeeded.") |
1057 | +else(_scan_result EQUAL 0) |
1058 | + message(SEND_ERROR "Scan failed.") |
1059 | +endif(_scan_result EQUAL 0) |
1060 | + |
1061 | +endif(NOT APPLE) |
1062 | + |
1063 | +# vim:sw=4:ts=4:et:autoindent |
1064 | |
1065 | === added file 'cmake/ListOperations.cmake' |
1066 | --- cmake/ListOperations.cmake 1970-01-01 00:00:00 +0000 |
1067 | +++ cmake/ListOperations.cmake 2013-03-29 12:53:22 +0000 |
1068 | @@ -0,0 +1,18 @@ |
1069 | + |
1070 | +macro(list_prefix _outvar _listvar _prefix) |
1071 | + set(${_outvar}) |
1072 | + foreach(_item IN LISTS ${_listvar}) |
1073 | + list(APPEND ${_outvar} ${_prefix}${_item}) |
1074 | + endforeach() |
1075 | +endmacro(list_prefix) |
1076 | + |
1077 | +macro(list_make_absolute _outvar _listvar _prefix) |
1078 | + set(${_outvar}) |
1079 | + foreach(_item IN LISTS ${_listvar}) |
1080 | + if(IS_ABSOLUTE ${_item}) |
1081 | + list(APPEND ${_outvar} ${_item}) |
1082 | + else() |
1083 | + list(APPEND ${_outvar} ${_prefix}${_item}) |
1084 | + endif() |
1085 | + endforeach() |
1086 | +endmacro(list_make_absolute) |
1087 | |
1088 | === added file 'cmake/UseConstantBuilder.cmake' |
1089 | --- cmake/UseConstantBuilder.cmake 1970-01-01 00:00:00 +0000 |
1090 | +++ cmake/UseConstantBuilder.cmake 2013-03-29 12:53:22 +0000 |
1091 | @@ -0,0 +1,19 @@ |
1092 | +cmake_minimum_required(VERSION 2.6) |
1093 | +if(POLICY CMP0011) |
1094 | + cmake_policy(SET CMP0011 NEW) |
1095 | +endif(POLICY CMP0011) |
1096 | + |
1097 | +macro(add_constant_template outfiles name const_name input) |
1098 | + set(file_target "${CMAKE_CURRENT_BINARY_DIR}/${name}.c") |
1099 | + add_custom_command( |
1100 | + OUTPUT ${file_target} |
1101 | + COMMAND ${CMAKE_COMMAND} |
1102 | + "-Dname=${name}" |
1103 | + "-Dfile_target=${file_target}" |
1104 | + "-Dconst_name=${const_name}" |
1105 | + "-Dinput=${input}" |
1106 | + -P "${CMAKE_SOURCE_DIR}/cmake/ConstantBuilderTemplates.cmake" |
1107 | + DEPENDS "${CMAKE_SOURCE_DIR}/cmake/ConstantBuilderTemplates.cmake" "${input}" |
1108 | + ) |
1109 | + list(APPEND ${outfiles} "${file_target}") |
1110 | +endmacro(add_constant_template) |
1111 | |
1112 | === added file 'cmake/UseGObjectIntrospection.cmake' |
1113 | --- cmake/UseGObjectIntrospection.cmake 1970-01-01 00:00:00 +0000 |
1114 | +++ cmake/UseGObjectIntrospection.cmake 2013-03-29 12:53:22 +0000 |
1115 | @@ -0,0 +1,100 @@ |
1116 | +# Copyright (C) 2010, Pino Toscano, <pino@kde.org> |
1117 | +# |
1118 | +# Redistribution and use is allowed according to the terms of the BSD license. |
1119 | +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
1120 | + |
1121 | +include(ListOperations) |
1122 | + |
1123 | +macro(_gir_list_prefix _outvar _listvar _prefix) |
1124 | + set(${_outvar}) |
1125 | + foreach(_item IN LISTS ${_listvar}) |
1126 | + list(APPEND ${_outvar} ${_prefix}${_item}) |
1127 | + endforeach() |
1128 | +endmacro(_gir_list_prefix) |
1129 | + |
1130 | +macro(gir_add_introspections introspections_girs) |
1131 | + |
1132 | + foreach(gir IN LISTS ${introspections_girs}) |
1133 | + |
1134 | + set(_gir_name "${gir}") |
1135 | + |
1136 | + ## Transform the gir filename to something which can reference through a variable |
1137 | + ## without automake/make complaining, eg Gtk-2.0.gir -> Gtk_2_0_gir |
1138 | + string(REPLACE "-" "_" _gir_name "${_gir_name}") |
1139 | + string(REPLACE "." "_" _gir_name "${_gir_name}") |
1140 | + |
1141 | + # Namespace and Version is either fetched from the gir filename |
1142 | + # or the _NAMESPACE/_VERSION variable combo |
1143 | + set(_gir_namespace "${${_gir_name}_NAMESPACE}") |
1144 | + if (_gir_namespace STREQUAL "") |
1145 | + string(REGEX REPLACE "([^-]+)-.*" "\\1" _gir_namespace "${gir}") |
1146 | + endif () |
1147 | + set(_gir_version "${${_gir_name}_VERSION}") |
1148 | + if (_gir_version STREQUAL "") |
1149 | + string(REGEX REPLACE ".*-([^-]+).gir" "\\1" _gir_version "${gir}") |
1150 | + endif () |
1151 | + |
1152 | + # _PROGRAM is an optional variable which needs it's own --program argument |
1153 | + set(_gir_program "${${_gir_name}_PROGRAM}") |
1154 | + if (NOT _gir_program STREQUAL "") |
1155 | + set(_gir_program "--program=${_gir_program}") |
1156 | + endif () |
1157 | + |
1158 | + # Variables which provides a list of things |
1159 | + _gir_list_prefix(_gir_libraries ${_gir_name}_LIBS "--library=") |
1160 | + _gir_list_prefix(_gir_packages ${_gir_name}_PACKAGES "--pkg=") |
1161 | + _gir_list_prefix(_gir_includes ${_gir_name}_INCLUDES "--include=") |
1162 | + _gir_list_prefix(_gir_export_packages ${_gir_name}_EXPORT_PACKAGES "--pkg-export=") |
1163 | + |
1164 | + # Reuse the LIBTOOL variable from by automake if it's set |
1165 | + set(_gir_libtool "--no-libtool") |
1166 | + |
1167 | + add_custom_command( |
1168 | + COMMAND ${INTROSPECTION_SCANNER} |
1169 | + ${INTROSPECTION_SCANNER_ARGS} |
1170 | + --namespace=${_gir_namespace} |
1171 | + --nsversion=${_gir_version} |
1172 | + ${_gir_libtool} |
1173 | + ${_gir_program} |
1174 | + ${_gir_libraries} |
1175 | + ${_gir_packages} |
1176 | + ${_gir_includes} |
1177 | + ${_gir_export_packages} |
1178 | + ${${_gir_name}_SCANNERFLAGS} |
1179 | + ${${_gir_name}_CFLAGS} |
1180 | + ${${_gir_name}_FILES} |
1181 | + --output ${CMAKE_CURRENT_BINARY_DIR}/${gir} |
1182 | + DEPENDS ${${_gir_name}_FILES} |
1183 | + ${${_gir_name}_LIBS} |
1184 | + OUTPUT ${gir} |
1185 | + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} |
1186 | + VERBATIM |
1187 | + ) |
1188 | + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${gir} DESTINATION share/gir-1.0) |
1189 | + |
1190 | + string(REPLACE ".gir" ".typelib" _typelib "${gir}") |
1191 | + add_custom_command( |
1192 | + COMMAND ${INTROSPECTION_COMPILER} |
1193 | + ${INTROSPECTION_COMPILER_ARGS} |
1194 | + --includedir=. |
1195 | + ${CMAKE_CURRENT_BINARY_DIR}/${gir} |
1196 | + -o ${CMAKE_CURRENT_BINARY_DIR}/${_typelib} |
1197 | + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${gir} |
1198 | + OUTPUT ${_typelib} |
1199 | + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
1200 | + ) |
1201 | + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_typelib} DESTINATION ${CMAKE_INSTALL_LIBDIR}/girepository-1.0) |
1202 | + |
1203 | + add_custom_target(gir-${gir} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${gir}) |
1204 | + add_custom_target(gir-typelibs-${_typelib} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_typelib}) |
1205 | + endforeach() |
1206 | + |
1207 | +endmacro(gir_add_introspections) |
1208 | + |
1209 | +macro(gir_get_cflags _output) |
1210 | + get_directory_property(_tmp_includes INCLUDE_DIRECTORIES) |
1211 | + list_prefix(_includes _tmp_includes "-I") |
1212 | + get_directory_property(_tmp_compile_definitions COMPILE_DEFINITIONS) |
1213 | + list_prefix(_compile_definitions _tmp_compile_definitions "-D") |
1214 | + set(${_output} ${_includes} ${_compile_definitions}) |
1215 | +endmacro(gir_get_cflags) |
1216 | |
1217 | === added file 'cmake/UseGSettings.cmake' |
1218 | --- cmake/UseGSettings.cmake 1970-01-01 00:00:00 +0000 |
1219 | +++ cmake/UseGSettings.cmake 2013-03-29 12:53:22 +0000 |
1220 | @@ -0,0 +1,42 @@ |
1221 | +# GSettings.cmake, CMake macros written for Marlin, feel free to re-use them. |
1222 | + |
1223 | +option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" OFF) |
1224 | + |
1225 | +option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL}) |
1226 | + |
1227 | +if(GSETTINGS_LOCALINSTALL) |
1228 | + message(STATUS "GSettings schemas will be installed locally.") |
1229 | +endif() |
1230 | + |
1231 | +if(GSETTINGS_COMPILE) |
1232 | + message(STATUS "GSettings shemas will be compiled.") |
1233 | +endif() |
1234 | + |
1235 | +macro(add_schema SCHEMA_NAME) |
1236 | + |
1237 | + set(PKG_CONFIG_EXECUTABLE pkg-config) |
1238 | + # Have an option to not install the schema into where GLib is |
1239 | + if (GSETTINGS_LOCALINSTALL) |
1240 | + SET (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/") |
1241 | + else (GSETTINGS_LOCALINSTALL) |
1242 | + execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE) |
1243 | + SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/") |
1244 | + endif (GSETTINGS_LOCALINSTALL) |
1245 | + |
1246 | + # Run the validator and error if it fails |
1247 | + execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE) |
1248 | + execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) |
1249 | + |
1250 | + if (_schemas_invalid) |
1251 | + message (SEND_ERROR "Schema validation error: ${_schemas_invalid}") |
1252 | + endif (_schemas_invalid) |
1253 | + |
1254 | + # Actually install and recomple schemas |
1255 | + message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}") |
1256 | + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL) |
1257 | + |
1258 | + if (GSETTINGS_COMPILE) |
1259 | + install (CODE "message (STATUS \"Compiling GSettings schemas\")") |
1260 | + install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})") |
1261 | + endif () |
1262 | +endmacro() |
1263 | |
1264 | === added file 'cmake/UseGdbusCodegen.cmake' |
1265 | --- cmake/UseGdbusCodegen.cmake 1970-01-01 00:00:00 +0000 |
1266 | +++ cmake/UseGdbusCodegen.cmake 2013-03-29 12:53:22 +0000 |
1267 | @@ -0,0 +1,35 @@ |
1268 | +cmake_minimum_required(VERSION 2.6) |
1269 | +if(POLICY CMP0011) |
1270 | + cmake_policy(SET CMP0011 NEW) |
1271 | +endif(POLICY CMP0011) |
1272 | + |
1273 | +find_program(GDBUS_CODEGEN NAMES gdbus-codegen DOC "gdbus-codegen executable") |
1274 | +if(NOT GDBUS_CODEGEN) |
1275 | + message(FATAL_ERROR "Excutable gdbus-codegen not found") |
1276 | +endif() |
1277 | + |
1278 | +function(add_gdbus_codegen) |
1279 | + set(_one_value OUTFILES NAME PREFIX NAMESPACE SERVICE_XML) |
1280 | + set(_multi_value DEPENDS) |
1281 | + cmake_parse_arguments (arg "" "${_one_value}" "${_multi_value}" ${ARGN}) |
1282 | + |
1283 | + if(arg_PREFIX) |
1284 | + set(PREFIX --interface-prefix ${arg_PREFIX}) |
1285 | + endif() |
1286 | + |
1287 | + if(arg_NAMESPACE) |
1288 | + set(NAMESPACE --c-namespace ${arg_NAMESPACE}) |
1289 | + endif() |
1290 | + |
1291 | + add_custom_command( |
1292 | + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${arg_NAME}.h" "${CMAKE_CURRENT_BINARY_DIR}/${arg_NAME}.c" |
1293 | + COMMAND "${GDBUS_CODEGEN}" |
1294 | + --generate-c-code "${arg_NAME}" |
1295 | + ${PREFIX} |
1296 | + ${NAMESPACE} |
1297 | + "${arg_SERVICE_XML}" |
1298 | + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} |
1299 | + DEPENDS ${arg_DEPENDS} "${arg_SERVICE_XML}" |
1300 | + ) |
1301 | + set(${arg_OUTFILES} ${${arg_OUTFILES}} "${CMAKE_CURRENT_BINARY_DIR}/${arg_NAME}.c" PARENT_SCOPE) |
1302 | +endfunction(add_gdbus_codegen) |
1303 | |
1304 | === added file 'cmake/UseGlibGeneration.cmake' |
1305 | --- cmake/UseGlibGeneration.cmake 1970-01-01 00:00:00 +0000 |
1306 | +++ cmake/UseGlibGeneration.cmake 2013-03-29 12:53:22 +0000 |
1307 | @@ -0,0 +1,71 @@ |
1308 | +cmake_minimum_required(VERSION 2.6) |
1309 | +if(POLICY CMP0011) |
1310 | + cmake_policy(SET CMP0011 NEW) |
1311 | +endif(POLICY CMP0011) |
1312 | + |
1313 | +find_program(GLIB_MKENUMS glib-mkenums) |
1314 | +find_program(GLIB_GENMARSHAL glib-genmarshal) |
1315 | + |
1316 | +macro(add_glib_marshal outfiles name prefix otherinclude) |
1317 | + add_custom_command( |
1318 | + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.h" |
1319 | + COMMAND ${GLIB_GENMARSHAL} --header "--prefix=${prefix}" |
1320 | + "${CMAKE_CURRENT_SOURCE_DIR}/${name}.list" |
1321 | + > "${CMAKE_CURRENT_BINARY_DIR}/${name}.h" |
1322 | + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${name}.list" |
1323 | + ) |
1324 | + add_custom_command( |
1325 | + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.c" |
1326 | + COMMAND echo "\\#include \\\"${otherinclude}\\\"" > "${CMAKE_CURRENT_BINARY_DIR}/${name}.c" |
1327 | + COMMAND echo "\\#include \\\"glib-object.h\\\"" >> "${CMAKE_CURRENT_BINARY_DIR}/${name}.c" |
1328 | + COMMAND echo "\\#include \\\"${name}.h\\\"" >> "${CMAKE_CURRENT_BINARY_DIR}/${name}.c" |
1329 | + COMMAND ${GLIB_GENMARSHAL} --body "--prefix=${prefix}" |
1330 | + "${CMAKE_CURRENT_SOURCE_DIR}/${name}.list" |
1331 | + >> "${CMAKE_CURRENT_BINARY_DIR}/${name}.c" |
1332 | + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${name}.list" |
1333 | + "${CMAKE_CURRENT_BINARY_DIR}/${name}.h" |
1334 | + ) |
1335 | + list(APPEND ${outfiles} "${CMAKE_CURRENT_BINARY_DIR}/${name}.c") |
1336 | +endmacro(add_glib_marshal) |
1337 | + |
1338 | +macro(add_glib_enumtypes_t outfiles name htemplate ctemplate) |
1339 | + add_custom_command( |
1340 | + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.h" |
1341 | + COMMAND ${GLIB_MKENUMS} |
1342 | + --template "${htemplate}" |
1343 | + ${ARGN} > "${CMAKE_CURRENT_BINARY_DIR}/${name}.h" |
1344 | + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
1345 | + DEPENDS ${ARGN} "${htemplate}" |
1346 | + ) |
1347 | + add_custom_command( |
1348 | + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.c" |
1349 | + COMMAND ${GLIB_MKENUMS} |
1350 | + --template "${ctemplate}" |
1351 | + ${ARGN} > "${CMAKE_CURRENT_BINARY_DIR}/${name}.c" |
1352 | + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
1353 | + DEPENDS ${ARGN} ${ctemplate} |
1354 | + "${CMAKE_CURRENT_BINARY_DIR}/${name}.h" |
1355 | + ) |
1356 | + list(APPEND ${outfiles} "${CMAKE_CURRENT_BINARY_DIR}/${name}.c") |
1357 | +endmacro(add_glib_enumtypes_t) |
1358 | + |
1359 | +macro(add_glib_enumtypes outfiles name namespace includeguard) |
1360 | + set(htemplate "${CMAKE_CURRENT_BINARY_DIR}/${name}.h.template") |
1361 | + set(ctemplate "${CMAKE_CURRENT_BINARY_DIR}/${name}.c.template") |
1362 | + |
1363 | + # Write the .h template |
1364 | + add_custom_command( |
1365 | + OUTPUT ${htemplate} ${ctemplate} |
1366 | + COMMAND ${CMAKE_COMMAND} |
1367 | + "-Dctemplate=${ctemplate}" |
1368 | + "-Dhtemplate=${htemplate}" |
1369 | + "-Dname=${name}" |
1370 | + "-Dnamespace=${namespace}" |
1371 | + "-Dincludeguard=${includeguard}" |
1372 | + "\"-Dheaders=${ARGN}\"" |
1373 | + -P "${CMAKE_SOURCE_DIR}/cmake/GlibGenerationTemplates.cmake" |
1374 | + DEPENDS "${CMAKE_SOURCE_DIR}/cmake/GlibGenerationTemplates.cmake" ${headers} |
1375 | + ) |
1376 | + |
1377 | + add_glib_enumtypes_t(${outfiles} ${name} ${htemplate} ${ctemplate} ${ARGN}) |
1378 | +endmacro(add_glib_enumtypes) |
1379 | |
1380 | === added file 'cmake/UseGtkDoc.cmake' |
1381 | --- cmake/UseGtkDoc.cmake 1970-01-01 00:00:00 +0000 |
1382 | +++ cmake/UseGtkDoc.cmake 2013-03-29 12:53:22 +0000 |
1383 | @@ -0,0 +1,234 @@ |
1384 | +# CMake macros to use the GtkDoc documentation system |
1385 | + |
1386 | +find_package(GtkDoc) |
1387 | + |
1388 | +# gtk_doc_add_module(doc_prefix sourcedir |
1389 | +# [XML xmlfile] |
1390 | +# [FIXXREFOPTS fixxrefoption1...] |
1391 | +# [IGNOREHEADERS header1...] |
1392 | +# [DEPENDS depend1...] ) |
1393 | +# |
1394 | +# sourcedir must be the *full* path to the source directory. |
1395 | +# |
1396 | +# If omitted, sgmlfile defaults to the auto generated ${doc_prefix}/${doc_prefix}-docs.xml. |
1397 | +function(gtk_doc_add_module _doc_prefix _doc_sourcedir) |
1398 | + set (_multi_value DEPENDS XML FIXXREFOPTS IGNOREHEADERS CFLAGS LDFLAGS LDPATH SUFFIXES) |
1399 | + cmake_parse_arguments (ARG "" "" "${_multi_value}" ${ARGN}) |
1400 | + |
1401 | + list(LENGTH ARG_XML _xml_file_length) |
1402 | + |
1403 | + if(ARG_SUFFIXES) |
1404 | + set(_doc_source_suffixes "") |
1405 | + foreach(_suffix ${ARG_SUFFIXES}) |
1406 | + if(_doc_source_suffixes) |
1407 | + set(_doc_source_suffixes "${_doc_source_suffixes},${_suffix}") |
1408 | + else(_doc_source_suffixes) |
1409 | + set(_doc_source_suffixes "${_suffix}") |
1410 | + endif(_doc_source_suffixes) |
1411 | + endforeach(_suffix) |
1412 | + else(ARG_SUFFIXES) |
1413 | + set(_doc_source_suffixes "h") |
1414 | + endif(ARG_SUFFIXES) |
1415 | + |
1416 | + set(_do_all ALL) |
1417 | + |
1418 | + set(_opts_valid 1) |
1419 | + if(NOT _xml_file_length LESS 2) |
1420 | + message(SEND_ERROR "Must have at most one sgml file specified.") |
1421 | + set(_opts_valid 0) |
1422 | + endif(NOT _xml_file_length LESS 2) |
1423 | + |
1424 | + if(_opts_valid) |
1425 | + # a directory to store output. |
1426 | + set(_output_dir "${CMAKE_CURRENT_BINARY_DIR}/${_doc_prefix}") |
1427 | + set(_output_dir_stamp "${_output_dir}/dir.stamp") |
1428 | + |
1429 | + # set default sgml file if not specified |
1430 | + set(_default_xml_file "${_output_dir}/${_doc_prefix}-docs.xml") |
1431 | + get_filename_component(_default_xml_file ${_default_xml_file} ABSOLUTE) |
1432 | + |
1433 | + # a directory to store html output. |
1434 | + set(_output_html_dir "${_output_dir}/html") |
1435 | + set(_output_html_dir_stamp "${_output_dir}/html_dir.stamp") |
1436 | + |
1437 | + # The output files |
1438 | + set(_output_decl_list "${_output_dir}/${_doc_prefix}-decl-list.txt") |
1439 | + set(_output_decl "${_output_dir}/${_doc_prefix}-decl.txt") |
1440 | + set(_output_overrides "${_output_dir}/${_doc_prefix}-overrides.txt") |
1441 | + set(_output_sections "${_output_dir}/${_doc_prefix}-sections.txt") |
1442 | + set(_output_types "${_output_dir}/${_doc_prefix}.types") |
1443 | + |
1444 | + set(_output_signals "${_output_dir}/${_doc_prefix}.signals") |
1445 | + |
1446 | + set(_output_unused "${_output_dir}/${_doc_prefix}-unused.txt") |
1447 | + set(_output_undeclared "${_output_dir}/${_doc_prefix}-undeclared.txt") |
1448 | + set(_output_undocumented "${_output_dir}/${_doc_prefix}-undocumented.txt") |
1449 | + set(_output_tmpl_dir "${_output_dir}/tmpl") |
1450 | + set(_output_tmpl_stamp "${_output_dir}/tmpl.stamp") |
1451 | + |
1452 | + set(_output_xml_dir "${_output_dir}/xml") |
1453 | + set(_output_sgml_stamp "${_output_dir}/sgml.stamp") |
1454 | + |
1455 | + set(_output_html_stamp "${_output_dir}/html.stamp") |
1456 | + |
1457 | + # add a command to create output directory |
1458 | + add_custom_command( |
1459 | + OUTPUT "${_output_dir_stamp}" "${_output_dir}" |
1460 | + COMMAND ${CMAKE_COMMAND} -E make_directory "${_output_dir}" |
1461 | + COMMAND ${CMAKE_COMMAND} -E touch ${_output_dir_stamp} |
1462 | + VERBATIM) |
1463 | + |
1464 | + set(_ignore_headers_opt "") |
1465 | + if(ARG_IGNOREHEADERS) |
1466 | + set(_ignore_headers_opt "--ignore-headers=") |
1467 | + foreach(_header ${ARG_IGNOREHEADERS}) |
1468 | + set(_ignore_headers_opt "${_ignore_headers_opt}${_header} ") |
1469 | + endforeach(_header ${ARG_IGNOREHEADERS}) |
1470 | + endif(ARG_IGNOREHEADERS) |
1471 | + |
1472 | + # add a command to scan the input |
1473 | + add_custom_command( |
1474 | + OUTPUT |
1475 | + "${_output_decl_list}" |
1476 | + "${_output_decl}" |
1477 | + "${_output_decl}.bak" |
1478 | + "${_output_overrides}" |
1479 | + "${_output_sections}" |
1480 | + "${_output_types}" |
1481 | + "${_output_types}.bak" |
1482 | + DEPENDS |
1483 | + "${_output_dir}" |
1484 | + ${ARG_DEPENDS} |
1485 | + COMMAND ${GTKDOC_SCAN_EXE} |
1486 | + "--module=${_doc_prefix}" |
1487 | + "${_ignore_headers_opt}" |
1488 | + "--rebuild-sections" |
1489 | + "--rebuild-types" |
1490 | + "--source-dir=${_doc_sourcedir}" |
1491 | + WORKING_DIRECTORY "${_output_dir}" |
1492 | + VERBATIM) |
1493 | + |
1494 | + # add a command to scan the input via gtkdoc-scangobj |
1495 | + # This is such a disgusting hack! |
1496 | + add_custom_command( |
1497 | + OUTPUT |
1498 | + "${_output_signals}" |
1499 | + DEPENDS |
1500 | + "${_output_types}" |
1501 | + "${ARG_DEPENDS}" |
1502 | + COMMAND ${CMAKE_COMMAND} |
1503 | + -D "GTKDOC_SCANGOBJ_EXE:STRING=${GTKDOC_SCANGOBJ_EXE}" |
1504 | + -D "doc_prefix:STRING=${_doc_prefix}" |
1505 | + -D "output_types:STRING=${_output_types}" |
1506 | + -D "output_dir:STRING=${_output_dir}" |
1507 | + -D "EXTRA_CFLAGS:STRING=${ARG_CFLAGS}" |
1508 | + -D "EXTRA_LDFLAGS:STRING=${ARG_LDFLAGS}" |
1509 | + -D "EXTRA_LDPATH:STRING=${ARG_LDPATH}" |
1510 | + -P ${GTKDOC_SCANGOBJ_WRAPPER} |
1511 | + WORKING_DIRECTORY "${_output_dir}" |
1512 | + VERBATIM) |
1513 | + |
1514 | + # add a command to make the templates |
1515 | + add_custom_command( |
1516 | + OUTPUT |
1517 | + "${_output_unused}" |
1518 | + "${_output_undeclared}" |
1519 | + "${_output_undocumented}" |
1520 | + "${_output_tmpl_dir}" |
1521 | + "${_output_tmpl_stamp}" |
1522 | + DEPENDS |
1523 | + "${_output_types}" |
1524 | + "${_output_signals}" |
1525 | + "${_output_sections}" |
1526 | + "${_output_overrides}" |
1527 | + ${ARG_DEPENDS} |
1528 | + COMMAND ${CMAKE_COMMAND} -E remove_directory ${_output_tmpl_dir} |
1529 | + COMMAND ${GTKDOC_MKTMPL_EXE} |
1530 | + "--module=${_doc_prefix}" |
1531 | + WORKING_DIRECTORY "${_output_dir}" |
1532 | + VERBATIM) |
1533 | + |
1534 | + set(_copy_xml_if_needed "") |
1535 | + if(ARG_XML) |
1536 | + get_filename_component(ARG_XML ${ARG_XML} ABSOLUTE) |
1537 | + set(_copy_xml_if_needed |
1538 | + COMMAND ${CMAKE_COMMAND} -E copy "${ARG_XML}" "${_default_xml_file}") |
1539 | + endif(ARG_XML) |
1540 | + |
1541 | + set(_remove_xml_if_needed "") |
1542 | + if(ARG_XML) |
1543 | + set(_remove_xml_if_needed |
1544 | + COMMAND ${CMAKE_COMMAND} -E remove ${_default_xml_file}) |
1545 | + endif(ARG_XML) |
1546 | + |
1547 | + # add a command to make the database |
1548 | + add_custom_command( |
1549 | + OUTPUT |
1550 | + "${_output_sgml_stamp}" |
1551 | + "${_default_xml_file}" |
1552 | + DEPENDS |
1553 | + "${_output_tmpl_stamp}" |
1554 | + "${_output_unused}" |
1555 | + "${_output_undeclared}" |
1556 | + "${_output_undocumented}" |
1557 | + ${ARG_DEPENDS} |
1558 | + ${_remove_xml_if_needed} |
1559 | + COMMAND ${CMAKE_COMMAND} -E remove_directory ${_output_xml_dir} |
1560 | + COMMAND ${GTKDOC_MKDB_EXE} |
1561 | + "--module=${_doc_prefix}" |
1562 | + "--source-dir=${_doc_sourcedir}" |
1563 | + "--source-suffixes=${_doc_source_suffixes}" |
1564 | + "--output-format=xml" |
1565 | + "--main-sgml-file=${_default_xml_file}" |
1566 | + ${_copy_xml_if_needed} |
1567 | + WORKING_DIRECTORY "${_output_dir}" |
1568 | + VERBATIM) |
1569 | + |
1570 | + # add a command to create html directory |
1571 | + add_custom_command( |
1572 | + OUTPUT "${_output_html_dir_stamp}" "${_output_html_dir}" |
1573 | + COMMAND ${CMAKE_COMMAND} -E make_directory ${_output_html_dir} |
1574 | + COMMAND ${CMAKE_COMMAND} -E touch ${_output_html_dir_stamp} |
1575 | + VERBATIM) |
1576 | + |
1577 | + # add a command to output HTML |
1578 | + add_custom_command( |
1579 | + OUTPUT |
1580 | + "${_output_html_stamp}" |
1581 | + DEPENDS |
1582 | + "${_output_html_dir_stamp}" |
1583 | + "${_output_sgml_stamp}" |
1584 | + "${_output_tmpl_stamp}" |
1585 | + "${ARG_XML}" |
1586 | + ${ARG_DEPENDS} |
1587 | + ${_copy_xml_if_needed} |
1588 | + COMMAND ${GTKDOC_MKHTML_EXE} |
1589 | + "${_doc_prefix}" |
1590 | + "${_default_xml_file}" |
1591 | + WORKING_DIRECTORY "${_output_html_dir}" |
1592 | + VERBATIM) |
1593 | + |
1594 | + # fix output refs |
1595 | + add_custom_target("${_doc_prefix}-gtxdoc-fixxref" |
1596 | + DEPENDS |
1597 | + "${_output_html_stamp}" |
1598 | + ${ARG_DEPENDS} |
1599 | + COMMAND ${GTKDOC_FIXXREF_EXE} |
1600 | + "--module=${_doc_prefix}" |
1601 | + "--module-dir=." |
1602 | + ${ARG_FIXXREFOPTS} |
1603 | + #${_remove_xml_if_needed} |
1604 | + WORKING_DIRECTORY "${_output_dir}" |
1605 | + VERBATIM) |
1606 | + |
1607 | + add_custom_target(doc-${_doc_prefix} ${_do_all} |
1608 | + DEPENDS |
1609 | + "${_doc_prefix}-gtxdoc-fixxref" |
1610 | + ${ARG_DEPENDS}) |
1611 | + |
1612 | + add_test(doc-${_doc_prefix}-check ${GTKDOC_CHECK_EXE}) |
1613 | + set_tests_properties(doc-${_doc_prefix}-check PROPERTIES |
1614 | + ENVIRONMENT "DOC_MODULE=${_doc_prefix};DOC_MAIN_SGML_FILE=${_doc_prefix}-docs.xml;SRCDIR=${_doc_sourcedir};BUILDDIR=${_output_dir}" |
1615 | + ) |
1616 | + endif(_opts_valid) |
1617 | +endfunction(gtk_doc_add_module) |
1618 | |
1619 | === added file 'cmake/UseVala.cmake' |
1620 | --- cmake/UseVala.cmake 1970-01-01 00:00:00 +0000 |
1621 | +++ cmake/UseVala.cmake 2013-03-29 12:53:22 +0000 |
1622 | @@ -0,0 +1,241 @@ |
1623 | +# - Precompilation of Vala/Genie source files into C sources |
1624 | +# Makes use of the parallel build ability introduced in Vala 0.11. Derived |
1625 | +# from a similar module by Jakob Westhoff and the original GNU Make rules. |
1626 | +# Might be a bit oversimplified. |
1627 | +# |
1628 | +# This module defines three functions. The first one: |
1629 | +# |
1630 | +# vala_init (id |
1631 | +# [DIRECTORY dir] - Output directory (binary dir by default) |
1632 | +# [PACKAGES package...] - Package dependencies |
1633 | +# [OPTIONS option...] - Extra valac options |
1634 | +# [CUSTOM_VAPIS file...]) - Custom vapi files to include in the build |
1635 | +# [DEPENDS targets...]) - Extra dependencies for code generation |
1636 | +# |
1637 | +# initializes a single precompilation unit using the given arguments. |
1638 | +# You can put files into it via the following function: |
1639 | +# |
1640 | +# vala_add (id source.vala |
1641 | +# [DEPENDS source...]) - Vala/Genie source or .vapi dependencies |
1642 | +# |
1643 | +# Finally retrieve paths for generated C files by calling: |
1644 | +# |
1645 | +# vala_finish (id |
1646 | +# [SOURCES sources_var] - Input Vala/Genie sources |
1647 | +# [OUTPUTS outputs_var] - Output C sources |
1648 | +# [GENERATE_HEADER id.h - Generate id.h and id_internal.h |
1649 | +# [GENERATE_VAPI id.vapi] - Generate a vapi file |
1650 | +# [GENERATE_SYMBOLS id.def]]) - Generate a list of public symbols |
1651 | +# |
1652 | + |
1653 | +#============================================================================= |
1654 | +# Copyright Přemysl Janouch 2011 |
1655 | +# All rights reserved. |
1656 | +# |
1657 | +# Redistribution and use in source and binary forms, with or without |
1658 | +# modification, are permitted provided that the following conditions are met: |
1659 | +# * Redistributions of source code must retain the above copyright |
1660 | +# notice, this list of conditions and the following disclaimer. |
1661 | +# * Redistributions in binary form must reproduce the above copyright |
1662 | +# notice, this list of conditions and the following disclaimer in the |
1663 | +# documentation and/or other materials provided with the distribution. |
1664 | +# |
1665 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' |
1666 | +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
1667 | +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
1668 | +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE |
1669 | +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
1670 | +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
1671 | +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
1672 | +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
1673 | +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
1674 | +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
1675 | +# OF SUCH DAMAGE. |
1676 | +#============================================================================= |
1677 | + |
1678 | +find_package (Vala 0.11 REQUIRED) |
1679 | +include (CMakeParseArguments) |
1680 | + |
1681 | +function (vala_init id) |
1682 | + set (_multi_value PACKAGES OPTIONS CUSTOM_VAPIS DEPENDS) |
1683 | + cmake_parse_arguments (arg "" "DIRECTORY" "${_multi_value}" ${ARGN}) |
1684 | + |
1685 | + if (arg_DIRECTORY) |
1686 | + set (directory ${arg_DIRECTORY}) |
1687 | + if (NOT IS_DIRECTORY ${directory}) |
1688 | + file (MAKE_DIRECTORY ${directory}) |
1689 | + endif (NOT IS_DIRECTORY ${directory}) |
1690 | + else (arg_DIRECTORY) |
1691 | + set (directory ${CMAKE_CURRENT_BINARY_DIR}) |
1692 | + endif (arg_DIRECTORY) |
1693 | + |
1694 | + set (pkg_opts) |
1695 | + foreach (pkg ${arg_PACKAGES}) |
1696 | + list (APPEND pkg_opts "--pkg=${pkg}") |
1697 | + endforeach (pkg) |
1698 | + |
1699 | + set (VALA_${id}_DIR "${directory}" PARENT_SCOPE) |
1700 | + set (VALA_${id}_ARGS ${pkg_opts} ${arg_OPTIONS} |
1701 | + ${arg_CUSTOM_VAPIS} PARENT_SCOPE) |
1702 | + set (VALA_${id}_DEPENDS ${arg_DEPENDS} |
1703 | + PARENT_SCOPE) |
1704 | + |
1705 | + set (VALA_${id}_SOURCES "" PARENT_SCOPE) |
1706 | + set (VALA_${id}_OUTPUTS "" PARENT_SCOPE) |
1707 | + set (VALA_${id}_FAST_VAPI_FILES "" PARENT_SCOPE) |
1708 | + set (VALA_${id}_FAST_VAPI_ARGS "" PARENT_SCOPE) |
1709 | +endfunction (vala_init) |
1710 | + |
1711 | +function (vala_add id file) |
1712 | + cmake_parse_arguments (arg "" "" "DEPENDS" ${ARGN}) |
1713 | + |
1714 | + if (NOT IS_ABSOLUTE "${file}") |
1715 | + set (file "${CMAKE_CURRENT_SOURCE_DIR}/${file}") |
1716 | + endif (NOT IS_ABSOLUTE "${file}") |
1717 | + |
1718 | + get_filename_component (output_name "${file}" NAME) |
1719 | + get_filename_component (output_base "${file}" NAME_WE) |
1720 | + set (output_base "${VALA_${id}_DIR}/${output_base}") |
1721 | + |
1722 | + # XXX: It would be best to have it working without touching the vapi |
1723 | + # but it appears this cannot be done in CMake. |
1724 | + add_custom_command (OUTPUT "${output_base}.vapi" |
1725 | + COMMAND ${VALA_COMPILER} "${file}" "--fast-vapi=${output_base}.vapi" |
1726 | + COMMAND ${CMAKE_COMMAND} -E touch "${output_base}.vapi" |
1727 | + DEPENDS "${file}" |
1728 | + COMMENT "Generating a fast vapi for ${output_name}" VERBATIM) |
1729 | + |
1730 | + set (vapi_opts) |
1731 | + set (vapi_depends) |
1732 | + foreach (vapi ${arg_DEPENDS}) |
1733 | + if (NOT IS_ABSOLUTE "${vapi}") |
1734 | + set (vapi "${VALA_${id}_DIR}/${vapi}.vapi") |
1735 | + endif (NOT IS_ABSOLUTE "${vapi}") |
1736 | + |
1737 | + list (APPEND vapi_opts "--use-fast-vapi=${vapi}") |
1738 | + list (APPEND vapi_depends "${vapi}") |
1739 | + endforeach (vapi) |
1740 | + |
1741 | + add_custom_command (OUTPUT "${output_base}.c" |
1742 | + COMMAND ${VALA_COMPILER} "${file}" -C ${vapi_opts} ${VALA_${id}_ARGS} |
1743 | + COMMAND ${CMAKE_COMMAND} -E touch "${output_base}.c" |
1744 | + DEPENDS "${file}" ${vapi_depends} ${VALA_${id}_DEPENDS} |
1745 | + WORKING_DIRECTORY "${VALA_${id}_DIR}" |
1746 | + COMMENT "Precompiling ${output_name}" VERBATIM) |
1747 | + |
1748 | + set (VALA_${id}_SOURCES ${VALA_${id}_SOURCES} |
1749 | + "${file}" PARENT_SCOPE) |
1750 | + set (VALA_${id}_OUTPUTS ${VALA_${id}_OUTPUTS} |
1751 | + "${output_base}.c" PARENT_SCOPE) |
1752 | + set (VALA_${id}_FAST_VAPI_FILES ${VALA_${id}_FAST_VAPI_FILES} |
1753 | + "${output_base}.vapi" PARENT_SCOPE) |
1754 | + set (VALA_${id}_FAST_VAPI_ARGS ${VALA_${id}_FAST_VAPI_ARGS} |
1755 | + "--use-fast-vapi=${output_base}.vapi" PARENT_SCOPE) |
1756 | +endfunction (vala_add) |
1757 | + |
1758 | +function (vala_finish id) |
1759 | + set (_one_value SOURCES OUTPUTS |
1760 | + GENERATE_VAPI GENERATE_HEADER GENERATE_SYMBOLS) |
1761 | + cmake_parse_arguments (arg "" "${_one_value}" "" ${ARGN}) |
1762 | + |
1763 | + if (arg_SOURCES) |
1764 | + set (${arg_SOURCES} ${VALA_${id}_SOURCES} PARENT_SCOPE) |
1765 | + endif (arg_SOURCES) |
1766 | + |
1767 | + if (arg_OUTPUTS) |
1768 | + set (${arg_OUTPUTS} ${VALA_${id}_OUTPUTS} PARENT_SCOPE) |
1769 | + endif (arg_OUTPUTS) |
1770 | + |
1771 | + set (outputs) |
1772 | + set (export_args) |
1773 | + |
1774 | + if (arg_GENERATE_VAPI) |
1775 | + if (NOT IS_ABSOLUTE "${arg_GENERATE_VAPI}") |
1776 | + set (arg_GENERATE_VAPI |
1777 | + "${VALA_${id}_DIR}/${arg_GENERATE_VAPI}") |
1778 | + endif (NOT IS_ABSOLUTE "${arg_GENERATE_VAPI}") |
1779 | + |
1780 | + list (APPEND outputs "${arg_GENERATE_VAPI}") |
1781 | + list (APPEND export_args "--internal-vapi=${arg_GENERATE_VAPI}") |
1782 | + |
1783 | + if (NOT arg_GENERATE_HEADER) |
1784 | + message (FATAL_ERROR "Header generation required for vapi") |
1785 | + endif (NOT arg_GENERATE_HEADER) |
1786 | + endif (arg_GENERATE_VAPI) |
1787 | + |
1788 | + if (arg_GENERATE_SYMBOLS) |
1789 | + if (NOT IS_ABSOLUTE "${arg_GENERATE_SYMBOLS}") |
1790 | + set (arg_GENERATE_SYMBOLS |
1791 | + "${VALA_${id}_DIR}/${arg_GENERATE_SYMBOLS}") |
1792 | + endif (NOT IS_ABSOLUTE "${arg_GENERATE_SYMBOLS}") |
1793 | + |
1794 | + list (APPEND outputs "${arg_GENERATE_SYMBOLS}") |
1795 | + list (APPEND export_args "--symbols=${arg_GENERATE_SYMBOLS}") |
1796 | + |
1797 | + if (NOT arg_GENERATE_HEADER) |
1798 | + message (FATAL_ERROR "Header generation required for symbols") |
1799 | + endif (NOT arg_GENERATE_HEADER) |
1800 | + endif (arg_GENERATE_SYMBOLS) |
1801 | + |
1802 | + if (arg_GENERATE_HEADER) |
1803 | + if (NOT IS_ABSOLUTE "${arg_GENERATE_HEADER}") |
1804 | + set (arg_GENERATE_HEADER |
1805 | + "${VALA_${id}_DIR}/${arg_GENERATE_HEADER}") |
1806 | + endif (NOT IS_ABSOLUTE "${arg_GENERATE_HEADER}") |
1807 | + |
1808 | + get_filename_component (header_path "${arg_GENERATE_HEADER}" PATH) |
1809 | + get_filename_component (header_name "${arg_GENERATE_HEADER}" NAME_WE) |
1810 | + set (header_base "${header_path}/${header_name}") |
1811 | + get_filename_component (header_ext "${arg_GENERATE_HEADER}" EXT) |
1812 | + |
1813 | + list (APPEND outputs |
1814 | + "${header_base}${header_ext}" |
1815 | + "${header_base}_internal${header_ext}") |
1816 | + list (APPEND export_args |
1817 | + "--header=${header_base}${header_ext}" |
1818 | + "--internal-header=${header_base}_internal${header_ext}") |
1819 | + endif (arg_GENERATE_HEADER) |
1820 | + |
1821 | + if (outputs) |
1822 | + add_custom_command (OUTPUT ${outputs} |
1823 | + COMMAND ${VALA_COMPILER} -C ${VALA_${id}_ARGS} |
1824 | + ${export_args} ${VALA_${id}_FAST_VAPI_ARGS} |
1825 | + DEPENDS ${VALA_${id}_FAST_VAPI_FILES} |
1826 | + COMMENT "Generating vapi/headers/symbols" VERBATIM) |
1827 | + endif (outputs) |
1828 | +endfunction (vala_finish id) |
1829 | + |
1830 | + |
1831 | +function (vapi_gen id) |
1832 | + set (_one_value LIBRARY INPUT) |
1833 | + set (_multi_value PACKAGES) |
1834 | + cmake_parse_arguments (arg "" "${_one_value}" "${_multi_value}" ${ARGN}) |
1835 | + |
1836 | + set(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${id}.vapi") |
1837 | + if (arg_LIBRARY) |
1838 | + set (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${arg_LIBRARY}.vapi") |
1839 | + endif (arg_LIBRARY) |
1840 | + |
1841 | + set("${id}_OUTPUT" ${OUTPUT} PARENT_SCOPE) |
1842 | + |
1843 | + set(PACKAGE_LIST) |
1844 | + foreach(PACKAGE ${arg_PACKAGES}) |
1845 | + list(APPEND PACKAGE_LIST "--pkg" ${PACKAGE}) |
1846 | + endforeach() |
1847 | + |
1848 | + add_custom_command( |
1849 | + OUTPUT |
1850 | + ${OUTPUT} |
1851 | + COMMAND |
1852 | + ${VAPI_GEN} |
1853 | + ${PACKAGE_LIST} |
1854 | + --library=${arg_LIBRARY} |
1855 | + ${arg_INPUT} |
1856 | + DEPENDS |
1857 | + ${arg_INPUT} |
1858 | + VERBATIM |
1859 | + ) |
1860 | + |
1861 | + add_custom_target(${id} ALL DEPENDS ${OUTPUT}) |
1862 | +endfunction (vapi_gen id) |
1863 | + |
1864 | |
1865 | === removed file 'configure.ac' |
1866 | --- configure.ac 2013-03-20 21:25:56 +0000 |
1867 | +++ configure.ac 1970-01-01 00:00:00 +0000 |
1868 | @@ -1,306 +0,0 @@ |
1869 | -AC_INIT([hud], |
1870 | - [13.10.0], |
1871 | - [http://bugs.launchpad.net/hud], |
1872 | - [hud], |
1873 | - [http://launchpad.net/hud]) |
1874 | - |
1875 | -AC_COPYRIGHT([Copyright 2010-2012 Canonical]) |
1876 | - |
1877 | -AC_PREREQ(2.53) |
1878 | - |
1879 | -AM_CONFIG_HEADER(config.h) |
1880 | -AC_CONFIG_SRCDIR([configure.ac]) |
1881 | -AC_CONFIG_MACRO_DIR([m4]) |
1882 | - |
1883 | -AM_INIT_AUTOMAKE([1.11 -Wall foreign subdir-objects]) |
1884 | -AM_MAINTAINER_MODE([enable]) |
1885 | - |
1886 | -AM_SILENT_RULES([yes]) |
1887 | - |
1888 | -# Check for programs |
1889 | -AC_PROG_CC |
1890 | -AM_PROG_CC_C_O |
1891 | -AM_PROG_VALAC([]) |
1892 | - |
1893 | -# Initialize libtool |
1894 | -LT_PREREQ([2.2.6]) |
1895 | -LT_INIT |
1896 | - |
1897 | -AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums]) |
1898 | -AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal]) |
1899 | - |
1900 | -PKG_PROG_PKG_CONFIG |
1901 | - |
1902 | -AC_ARG_ENABLE([deprecations], |
1903 | - [AS_HELP_STRING([--enable-deprecations], |
1904 | - [allow deprecated API usage @<:@default=yes@:>@])], |
1905 | - [], |
1906 | - [enable_deprecations=yes]) |
1907 | -AS_IF([test "x$enable_deprecations" = xno], |
1908 | - [CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGTK_DISABLE_SINGLE_INCLUDES"] |
1909 | -) |
1910 | - |
1911 | -########################### |
1912 | -# GTK Doc |
1913 | -########################### |
1914 | - |
1915 | -GTK_DOC_CHECK([1.9], [--flavour=no-tmpl]) |
1916 | -AC_CONFIG_MACRO_DIR(m4) |
1917 | - |
1918 | -########################### |
1919 | -# GLib GSettings |
1920 | -########################### |
1921 | - |
1922 | -GLIB_GSETTINGS |
1923 | - |
1924 | -########################### |
1925 | -# GObject Introspection |
1926 | -########################### |
1927 | - |
1928 | -GOBJECT_INTROSPECTION_CHECK([0.9.5]) |
1929 | - |
1930 | -########################### |
1931 | -# Vala API Generation |
1932 | -########################### |
1933 | - |
1934 | -AC_ARG_ENABLE([vala], |
1935 | - AC_HELP_STRING([--disable-vala], [Disable vala]), |
1936 | - [enable_vala=$enableval], [enable_vala=auto]) |
1937 | - |
1938 | -AS_IF([test "x$enable_vala" != "xno"],[ |
1939 | - AM_COND_IF([HAVE_INTROSPECTION],,[ |
1940 | - AC_MSG_ERROR([Vala bindings require introspection support, please --enable-introspection]) |
1941 | - ]) |
1942 | -AC_PATH_PROG([VALA_API_GEN], [vapigen]) |
1943 | -]) |
1944 | -AM_CONDITIONAL([HAVE_VALA], [test -n "$VALA_API_GEN"]) |
1945 | - |
1946 | -########################### |
1947 | -# Dependencies |
1948 | -########################### |
1949 | - |
1950 | -GLIB_REQUIRED_VERSION=2.34.0 |
1951 | -DBUSMENU_GLIB_REQUIRED_VERSION=0.4.0 |
1952 | -SQLITE_REQUIRED_VERSION=0.0 |
1953 | - |
1954 | -PKG_CHECK_MODULES([HUD],[ |
1955 | - glib-2.0 >= $GLIB_REQUIRED_VERSION |
1956 | - gio-unix-2.0 >= $GLIB_REQUIRED_VERSION |
1957 | - dbusmenu-glib-0.4 >= $DBUSMENU_GLIB_REQUIRED_VERSION |
1958 | - sqlite3 >= $SQLITE_REQUIRED_VERSION |
1959 | - dee-1.0 |
1960 | - pocketsphinx |
1961 | -]) |
1962 | - |
1963 | -GTK_REQUIRED_VERSION=3.0 |
1964 | -PKG_CHECK_MODULES(gtk,[ |
1965 | - gtk+-3.0 >= $GTK_REQUIRED_VERSION |
1966 | -]) |
1967 | - |
1968 | -PKG_CHECK_MODULES([DBUSMENU_JSON], [dbusmenu-jsonloader-0.4]) |
1969 | - |
1970 | -########################### |
1971 | -# BAMF Dependency |
1972 | -########################### |
1973 | - |
1974 | -BAMF_REQUIRED_VERSION=0.2.53 |
1975 | - |
1976 | -AC_ARG_ENABLE([bamf], |
1977 | - AC_HELP_STRING([--disable-bamf], [Disable bamf]), |
1978 | - [enable_bamf=$enableval], [enable_bamf=auto]) |
1979 | - |
1980 | -AS_IF([test "x$enable_bamf" != "xno"],[ |
1981 | -PKG_CHECK_MODULES([BAMF],[ |
1982 | - libbamf3 |
1983 | -]) |
1984 | -AC_DEFINE([HAVE_BAMF], [1], [Defined if we are building with BAMF]) |
1985 | -]) |
1986 | - |
1987 | -########################### |
1988 | -# Hybris Dependency |
1989 | -########################### |
1990 | - |
1991 | -AC_ARG_ENABLE([hybris], |
1992 | - AC_HELP_STRING([--disable-hybris], [Disable hybris]), |
1993 | - [enable_hybris=$enableval], [enable_hybris=auto]) |
1994 | - |
1995 | -AS_IF([test "x$enable_hybris" != "xno"],[ |
1996 | -AC_DEFINE([HAVE_HYBRIS], [1], [Defined if we are building with libhybris]) |
1997 | -HYBRIS_CFLAGS="-I/usr/include/hybris" |
1998 | -HYBRIS_LIBS="-lubuntu_application_api" |
1999 | -AC_SUBST([HYBRIS_CFLAGS]) |
2000 | -AC_SUBST([HYBRIS_LIBS]) |
2001 | -]) |
2002 | - |
2003 | -########################### |
2004 | -# Sanity Check |
2005 | -########################### |
2006 | - |
2007 | -AS_IF([test "x$enable_hybris" == "x$enable_bamf"],[ |
2008 | -AC_MSG_ERROR([Invalid to use hybris and bamf together or neither of them]) |
2009 | -]) |
2010 | - |
2011 | -########################### |
2012 | -# Test Dependencies |
2013 | -########################### |
2014 | - |
2015 | -DBUSMENU_JSONLOADER_REQUIRED_VERSION=0.3.3 |
2016 | -LIBAPPINDICATOR_REQUIRED_VERSION=0.0.0 |
2017 | - |
2018 | -AC_ARG_ENABLE([tests], |
2019 | - AC_HELP_STRING([--disable-tests], [Disable test scripts and tools]),, |
2020 | - [enable_tests=auto]) |
2021 | - |
2022 | -if test x"$enable_tests" != x"no" ; then |
2023 | - PKG_CHECK_MODULES(INDICATORTEST, |
2024 | - dbusmenu-jsonloader-0.4 >= $DBUSMENU_JSONLOADER_REQUIRED_VERSION |
2025 | - appindicator3-0.1 >= $LIBAPPINDICATOR_REQUIRED_VERSION, |
2026 | - [have_dbusmenu_jsonloader=yes], |
2027 | - [have_dbusmenu_jsonloader=no] |
2028 | - ) |
2029 | - if test x${enable_tests} = xyes && test x${have_dbusmenu_jsonloader} = xno; then |
2030 | - AC_MSG_ERROR([Test scripts and tools configured but dbusmenu-jsonloader not found]) |
2031 | - fi |
2032 | -else |
2033 | - have_dbusmenu-jsonloader=no |
2034 | -fi |
2035 | -AM_CONDITIONAL(BUILD_TESTS, test x${have_dbusmenu_jsonloader} = xyes) |
2036 | - |
2037 | -AC_SUBST(INDICATORTEST_CFLAGS) |
2038 | -AC_SUBST(INDICATORTEST_LIBS) |
2039 | - |
2040 | -PKG_CHECK_MODULES(DBUSTEST, dbustest-1) |
2041 | -AC_SUBST(DBUSTEST_CFLAGS) |
2042 | -AC_SUBST(DBUSTEST_LIBS) |
2043 | - |
2044 | -########################### |
2045 | -# gcov coverage reporting |
2046 | -########################### |
2047 | - |
2048 | -m4_include([m4/gcov.m4]) |
2049 | -AC_TDD_GCOV |
2050 | -AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes]) |
2051 | -AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes]) |
2052 | -AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes]) |
2053 | -AC_SUBST(COVERAGE_CFLAGS) |
2054 | -AC_SUBST(COVERAGE_CXXFLAGS) |
2055 | -AC_SUBST(COVERAGE_LDFLAGS) |
2056 | - |
2057 | -########################### |
2058 | -# XSLT Processor |
2059 | -########################### |
2060 | - |
2061 | -AC_PATH_PROG([XSLT_PROC], [xsltproc]) |
2062 | - |
2063 | -########################### |
2064 | -# Check to see if we're local |
2065 | -########################### |
2066 | - |
2067 | -with_localinstall="no" |
2068 | -AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install all of the files localy instead of system directories (for distcheck)]), with_localinstall=$enableval, with_localinstall=no) |
2069 | - |
2070 | -########################### |
2071 | -# Indicator Info |
2072 | -########################### |
2073 | - |
2074 | -if test "x$with_localinstall" = "xyes"; then |
2075 | - INDICATORDIR="${libdir}/indicators/3/" |
2076 | - INDICATORICONSDIR="${datadir}/libindicate/icons/" |
2077 | -elif test "x$with_gtk" = x2; then |
2078 | - INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator-0.4` |
2079 | - INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator-0.4` |
2080 | -else |
2081 | - INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4` |
2082 | - INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4` |
2083 | -fi |
2084 | -AC_SUBST(INDICATORDIR) |
2085 | -AC_SUBST(INDICATORICONSDIR) |
2086 | - |
2087 | -########################### |
2088 | -# DBus Service Info |
2089 | -########################### |
2090 | - |
2091 | -if test "x$with_localinstall" = "xyes"; then |
2092 | - DBUSSERVICEDIR="${datadir}/dbus-1/services/" |
2093 | -else |
2094 | - DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1` |
2095 | -fi |
2096 | -AC_SUBST(DBUSSERVICEDIR) |
2097 | - |
2098 | -if test "x$with_localinstall" = "xyes"; then |
2099 | - DBUSIFACEDIR="${datadir}/dbus-1/interfaces/" |
2100 | -else |
2101 | - DBUSIFACEDIR=`$PKG_CONFIG --variable=interfaces_dir dbus-1` |
2102 | -fi |
2103 | -AC_SUBST(DBUSIFACEDIR) |
2104 | - |
2105 | -############################## |
2106 | -# Custom Junk |
2107 | -############################## |
2108 | - |
2109 | -AC_DEFUN([AC_DEFINE_PATH], [ |
2110 | - test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
2111 | - test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
2112 | - ac_define_path=`eval echo [$]$2` |
2113 | - ac_define_path=`eval echo [$]ac_define_path` |
2114 | - $1="$ac_define_path" |
2115 | - AC_SUBST($1) |
2116 | - ifelse($3, , |
2117 | - AC_DEFINE_UNQUOTED($1, "$ac_define_path"), |
2118 | - AC_DEFINE_UNQUOTED($1, "$ac_define_path", $3)) |
2119 | -]) |
2120 | - |
2121 | -########################### |
2122 | -# Internationalization |
2123 | -########################### |
2124 | - |
2125 | -GETTEXT_PACKAGE=hud |
2126 | - |
2127 | -IT_PROG_INTLTOOL([0.50.2]) |
2128 | - |
2129 | -AM_GNU_GETTEXT([external]) |
2130 | -AM_GNU_GETTEXT_VERSION([0.17]) |
2131 | - |
2132 | -AC_SUBST(GETTEXT_PACKAGE) |
2133 | -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the gettext package name.]) |
2134 | -AC_DEFINE_PATH(GNOMELOCALEDIR, "${datadir}/locale", [locale directory]) |
2135 | - |
2136 | -########################### |
2137 | -# Files |
2138 | -########################### |
2139 | - |
2140 | -AC_OUTPUT([ |
2141 | -Makefile |
2142 | -src/Makefile |
2143 | -libhud/Makefile |
2144 | -libhud/tests/Makefile |
2145 | -libhud/demo/Makefile |
2146 | -libhud-gtk/Makefile |
2147 | -libhud-client/Makefile |
2148 | -data/Makefile |
2149 | -po/Makefile.in |
2150 | -tools-vala/Makefile |
2151 | -tools/Makefile |
2152 | -tools/hudkeywords/Makefile |
2153 | -tools/hudkeywords/bin/Makefile |
2154 | -tools/hudkeywords/hudkeywords/Makefile |
2155 | -tests/Makefile |
2156 | -docs/Makefile |
2157 | -docs/man/Makefile |
2158 | -docs/libhud-client/Makefile |
2159 | -]) |
2160 | - |
2161 | -########################### |
2162 | -# Results |
2163 | -########################### |
2164 | - |
2165 | -AC_MSG_NOTICE([ |
2166 | - |
2167 | -App Menu Indicator Configuration: |
2168 | - |
2169 | - Prefix: $prefix |
2170 | - Indicator Dir: $INDICATORDIR |
2171 | - gcov: $use_gcov |
2172 | - Local Install: $with_localinstall |
2173 | - Test tools: $have_dbusmenu_jsonloader |
2174 | -]) |
2175 | |
2176 | === added file 'data/CMakeLists.txt' |
2177 | --- data/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
2178 | +++ data/CMakeLists.txt 2013-03-29 12:53:22 +0000 |
2179 | @@ -0,0 +1,38 @@ |
2180 | + |
2181 | +########################### |
2182 | +# Dbus Interfaces |
2183 | +########################### |
2184 | + |
2185 | +install( |
2186 | +FILES |
2187 | +com.canonical.hud.query.xml |
2188 | +com.canonical.hud.xml |
2189 | +DESTINATION ${DBUSIFACEDIR} |
2190 | +) |
2191 | + |
2192 | +########################### |
2193 | +# Dbus Services |
2194 | +########################### |
2195 | + |
2196 | +set(HUD_SERVICE |
2197 | +"${CMAKE_CURRENT_BINARY_DIR}/com.canonical.hud.service" |
2198 | +) |
2199 | + |
2200 | +set(pkglibexecdir "${CMAKE_INSTALL_FULL_LIBEXECDIR}/hud") |
2201 | +configure_file("com.canonical.hud.service.in" |
2202 | + "${HUD_SERVICE}" |
2203 | + @ONLY |
2204 | +) |
2205 | + |
2206 | +install( |
2207 | +FILES |
2208 | +"${HUD_SERVICE}" |
2209 | +DESTINATION ${DBUSSERVICEDIR} |
2210 | +) |
2211 | + |
2212 | +########################### |
2213 | +# GSettings |
2214 | +########################### |
2215 | + |
2216 | +add_schema ("com.canonical.indicator.appmenu.hud.gschema.xml") |
2217 | +add_schema ("com.canonical.indicator.appmenu.hud.search.gschema.xml") |
2218 | |
2219 | === removed file 'data/Makefile.am' |
2220 | --- data/Makefile.am 2013-01-29 20:06:40 +0000 |
2221 | +++ data/Makefile.am 1970-01-01 00:00:00 +0000 |
2222 | @@ -1,28 +0,0 @@ |
2223 | -gsettings_SCHEMAS = \ |
2224 | - com.canonical.indicator.appmenu.hud.gschema.xml \ |
2225 | - com.canonical.indicator.appmenu.hud.search.gschema.xml |
2226 | - |
2227 | -@GSETTINGS_RULES@ |
2228 | - |
2229 | -dbus_servicesdir = $(DBUSSERVICEDIR) |
2230 | -dbus_services_DATA = com.canonical.hud.service |
2231 | - |
2232 | -%.service: %.service.in |
2233 | - sed -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@ |
2234 | - |
2235 | -dbus_interfacesdir = $(DBUSIFACEDIR) |
2236 | -dbus_interfaces_DATA = \ |
2237 | - com.canonical.hud.query.xml \ |
2238 | - com.canonical.hud.xml |
2239 | - |
2240 | -EXTRA_DIST = \ |
2241 | - $(dbus_interfaces_DATA) \ |
2242 | - com.canonical.hud.Application.xml \ |
2243 | - $(dbus_services_DATA:.service=.service.in) \ |
2244 | - $(gsettings_SCHEMAS) \ |
2245 | - $(pkgdata_DATA) |
2246 | - |
2247 | -CLEANFILES = \ |
2248 | - $(dbus_services_DATA) |
2249 | - |
2250 | -pkgdata_DATA = |
2251 | |
2252 | === modified file 'debian/control' |
2253 | --- debian/control 2013-03-26 03:11:16 +0000 |
2254 | +++ debian/control 2013-03-29 12:53:22 +0000 |
2255 | @@ -3,6 +3,7 @@ |
2256 | Priority: optional |
2257 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
2258 | Build-Depends: bamfdaemon, |
2259 | + cmake, |
2260 | bustle, |
2261 | dbus-test-runner, |
2262 | debhelper (>= 9), |
2263 | |
2264 | === modified file 'debian/hud-tools.install' |
2265 | --- debian/hud-tools.install 2013-01-28 20:15:32 +0000 |
2266 | +++ debian/hud-tools.install 2013-03-29 12:53:22 +0000 |
2267 | @@ -1,4 +1,4 @@ |
2268 | usr/bin |
2269 | usr/share/hud-gtk |
2270 | usr/share/man |
2271 | -usr/lib/python2.7/dist-packages/hudkeywords/* |
2272 | +usr/lib/python* |
2273 | |
2274 | === modified file 'debian/libhud1.symbols' |
2275 | --- debian/libhud1.symbols 2013-03-13 14:17:25 +0000 |
2276 | +++ debian/libhud1.symbols 2013-03-29 12:53:22 +0000 |
2277 | @@ -1,5 +1,4 @@ |
2278 | libhud.so.1 libhud1 #MINVER# |
2279 | - hud_action_description_changed_signal@Base 13.04.0 |
2280 | hud_action_description_get_action_name@Base 13.04.0 |
2281 | hud_action_description_get_action_target@Base 13.04.0 |
2282 | hud_action_description_get_type@Base 13.04.0 |
2283 | @@ -18,27 +17,20 @@ |
2284 | hud_action_publisher_get_description_path@Base 13.04.0-0ubuntu1~ppa2 |
2285 | hud_action_publisher_get_id@Base 13.04.0-0ubuntu1~ppa2 |
2286 | hud_action_publisher_get_type@Base 13.04.0 |
2287 | + hud_action_publisher_new_for_id@Base 13.04.0-0ubuntu1~ppa2 |
2288 | hud_action_publisher_new_for_application@Base 13.04.0 |
2289 | - hud_action_publisher_new_for_id@Base 13.04.0-0ubuntu1~ppa2 |
2290 | hud_action_publisher_remove_action_group@Base 13.04.0 |
2291 | - hud_action_publisher_remove_description@Base 13.04.0 |
2292 | - hud_action_publisher_remove_descriptions@Base 13.04.0 |
2293 | - hud_action_publisher_signals@Base 13.04.0 |
2294 | hud_action_set_enabled@Base 13.04.0 |
2295 | hud_action_set_operation@Base 13.04.0 |
2296 | - hud_action_signals@Base 13.04.0 |
2297 | hud_manager_add_actions@Base 13.04.0 |
2298 | hud_manager_get_type@Base 13.04.0-0ubuntu1~ppa2 |
2299 | hud_manager_new@Base 13.04.0-0ubuntu1~ppa2 |
2300 | hud_manager_new_for_application@Base 13.04.0-0ubuntu1~ppa2 |
2301 | hud_manager_remove_actions@Base 13.04.0 |
2302 | - hud_operation_ended@Base 13.04.0 |
2303 | hud_operation_get_boolean@Base 13.04.0 |
2304 | hud_operation_get_double@Base 13.04.0 |
2305 | hud_operation_get_int@Base 13.04.0 |
2306 | hud_operation_get_type@Base 13.04.0 |
2307 | hud_operation_get_uint@Base 13.04.0 |
2308 | hud_operation_get_user_data@Base 13.04.0 |
2309 | - hud_operation_new@Base 13.04.0 |
2310 | hud_operation_setup@Base 13.04.0 |
2311 | - hud_operation_started@Base 13.04.0 |
2312 | |
2313 | === modified file 'debian/rules' |
2314 | --- debian/rules 2013-02-28 16:30:17 +0000 |
2315 | +++ debian/rules 2013-03-29 12:53:22 +0000 |
2316 | @@ -2,20 +2,13 @@ |
2317 | |
2318 | export DPKG_GENSYMBOLS_CHECK_LEVEL = 4 |
2319 | export G_MESSAGES_DEBUG=all |
2320 | +export DEBIAN_TARGET_DIR="${CURDIR}/debian/tmp" |
2321 | |
2322 | %: |
2323 | - dh $@ --with autoreconf,gir |
2324 | - |
2325 | -override_dh_autoreconf: |
2326 | - NOCONFIGURE=1 dh_autoreconf ./autogen.sh |
2327 | - |
2328 | -DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) |
2329 | + dh $@ --parallel |
2330 | |
2331 | override_dh_auto_configure: |
2332 | - dh_auto_configure -- VALAC=/usr/bin/valac-0.18 --enable-gtk-doc --disable-hybris |
2333 | + dh_auto_configure -- -DDEBIAN_TARGET_DIR="${DEBIAN_TARGET_DIR}" |
2334 | |
2335 | override_dh_install: |
2336 | - rm debian/tmp/usr/lib/*/*.la |
2337 | - rm debian/tmp/usr/lib/*/*.a |
2338 | - rm -rf debian/tmp/usr/share/gtk-doc/html/hud/ |
2339 | dh_install --fail-missing |
2340 | |
2341 | === added file 'docs/CMakeLists.txt' |
2342 | --- docs/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
2343 | +++ docs/CMakeLists.txt 2013-03-29 12:53:22 +0000 |
2344 | @@ -0,0 +1,2 @@ |
2345 | +add_subdirectory(man) |
2346 | +add_subdirectory(libhud-client) |
2347 | |
2348 | === removed file 'docs/Makefile.am' |
2349 | --- docs/Makefile.am 2013-02-15 03:15:27 +0000 |
2350 | +++ docs/Makefile.am 1970-01-01 00:00:00 +0000 |
2351 | @@ -1,3 +0,0 @@ |
2352 | -SUBDIRS = \ |
2353 | - libhud-client \ |
2354 | - man |
2355 | |
2356 | === removed file 'docs/devel/Makefile.am' |
2357 | --- docs/devel/Makefile.am 2013-02-13 19:03:17 +0000 |
2358 | +++ docs/devel/Makefile.am 1970-01-01 00:00:00 +0000 |
2359 | @@ -1,42 +0,0 @@ |
2360 | -include $(top_srcdir)/gtk-doc.make |
2361 | - |
2362 | -DOC_MODULE = hud |
2363 | - |
2364 | -DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml |
2365 | - |
2366 | -DOC_SOURCE_DIR = $(top_srcdir)/src |
2367 | - |
2368 | -MKDB_OPTIONS = --sgml-mode --output-format=xml |
2369 | - |
2370 | -HFILE_GLOB = $(DOC_SOURCE_DIR)/*.h |
2371 | -CFILE_GLOB = $(DOC_SOURCE_DIR)/*.c |
2372 | - |
2373 | -IGNORE_HFILES = \ |
2374 | - MwmUtil.h \ |
2375 | - create-db.h \ |
2376 | - dbus-shared.h \ |
2377 | - distance.h \ |
2378 | - dump-app-info.h \ |
2379 | - gen-application-menu-renderer.xml.h \ |
2380 | - gen-application-menu-registrar.xml.h \ |
2381 | - gdk-get-func.h \ |
2382 | - hud.interface.h \ |
2383 | - indicator-tracker.h \ |
2384 | - load-app-info.h \ |
2385 | - menuitem-collector.h \ |
2386 | - shared-values.h \ |
2387 | - usage-tracker.h \ |
2388 | - utils.h \ |
2389 | - window-menus.h |
2390 | - |
2391 | -GTKDOC_CFLAGS = \ |
2392 | - -I$(top_srcdir)/src \ |
2393 | - $(HUD_CFLAGS) \ |
2394 | - $(BAMF_CFLAGS) \ |
2395 | - $(HYBRIS_CFLAGS) |
2396 | - |
2397 | -GTKDOC_LIBS = \ |
2398 | - $(top_builddir)/src/libhud-service.la \ |
2399 | - $(HUD_LIBS) \ |
2400 | - $(BAMF_LIBS) \ |
2401 | - $(HYBRIS_LIBS) |
2402 | |
2403 | === added file 'docs/libhud-client/CMakeLists.txt' |
2404 | --- docs/libhud-client/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
2405 | +++ docs/libhud-client/CMakeLists.txt 2013-03-29 12:53:22 +0000 |
2406 | @@ -0,0 +1,32 @@ |
2407 | + |
2408 | +find_package(GtkDoc) |
2409 | + |
2410 | +if(GTKDOC_FOUND) |
2411 | + get_target_property(_hud_client_output_name hud-client OUTPUT_NAME) |
2412 | + include(UseGtkDoc) |
2413 | + gtk_doc_add_module(libhud-client "${CMAKE_SOURCE_DIR}/libhud-client" |
2414 | + XML |
2415 | + libhud-client-docs.xml |
2416 | + SUFFIXES |
2417 | + h c |
2418 | + IGNOREHEADERS |
2419 | + hud-client.h |
2420 | + query-iface.h |
2421 | + service-iface.h |
2422 | + LDFLAGS |
2423 | + -L${CMAKE_CURRENT_BINARY_DIR}/../../libhud-client |
2424 | + -l${_hud_client_output_name} |
2425 | + LDPATH |
2426 | + ${CMAKE_CURRENT_BINARY_DIR}/../../libhud-client |
2427 | + DEPENDS |
2428 | + hud-client |
2429 | + ) |
2430 | + |
2431 | + install( |
2432 | + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/libhud-client/html/" |
2433 | + DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html/libhud-client" |
2434 | + ) |
2435 | + |
2436 | +else() |
2437 | + message(STATUS "gtkdoc was not found.") |
2438 | +endif() |
2439 | |
2440 | === removed file 'docs/libhud-client/Makefile.am' |
2441 | --- docs/libhud-client/Makefile.am 2012-11-28 17:03:45 +0000 |
2442 | +++ docs/libhud-client/Makefile.am 1970-01-01 00:00:00 +0000 |
2443 | @@ -1,34 +0,0 @@ |
2444 | -include $(top_srcdir)/gtk-doc.make |
2445 | - |
2446 | -DOC_MODULE = libhud-client |
2447 | - |
2448 | -DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml |
2449 | - |
2450 | -DOC_SOURCE_DIR = $(top_srcdir)/libhud-client |
2451 | - |
2452 | -MKDB_OPTIONS = --sgml-mode --output-format=xml |
2453 | - |
2454 | -HFILE_GLOB = $(DOC_SOURCE_DIR)/*.h |
2455 | -CFILE_GLOB = $(DOC_SOURCE_DIR)/*.c |
2456 | - |
2457 | -IGNORE_HFILES = \ |
2458 | - query-iface.h \ |
2459 | - service-iface.h |
2460 | - |
2461 | -IGNORE_CFILES = \ |
2462 | - query-iface.c \ |
2463 | - service-iface.c |
2464 | - |
2465 | -GTKDOC_CFLAGS = -I$(top_srcdir)/libhud-client -I$(top_srcdir) $(HUD_CFLAGS) |
2466 | - |
2467 | -GTKDOC_LIBS = \ |
2468 | - $(top_builddir)/libhud-client/libhud-client.la \ |
2469 | - $(HUD_LIBS) |
2470 | - |
2471 | -if ENABLE_GTK_DOC |
2472 | -TESTS_ENVIRONMENT = cd $(srcdir) && \ |
2473 | - DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ |
2474 | - SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) |
2475 | -TESTS = $(GTKDOC_CHECK) |
2476 | -endif |
2477 | - |
2478 | |
2479 | === added file 'docs/man/CMakeLists.txt' |
2480 | --- docs/man/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
2481 | +++ docs/man/CMakeLists.txt 2013-03-29 12:53:22 +0000 |
2482 | @@ -0,0 +1,28 @@ |
2483 | + |
2484 | +find_program(XSLTPROC_EXECUTABLE xsltproc) |
2485 | + |
2486 | +macro(add_manpage name) |
2487 | + add_custom_command( |
2488 | + OUTPUT |
2489 | + "${CMAKE_CURRENT_BINARY_DIR}/${name}.1" |
2490 | + COMMAND |
2491 | + ${XSLTPROC_EXECUTABLE} |
2492 | + -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl |
2493 | + "${CMAKE_CURRENT_SOURCE_DIR}/${name}.xml" |
2494 | + DEPENDS |
2495 | + "${CMAKE_CURRENT_SOURCE_DIR}/${name}.xml" |
2496 | + ) |
2497 | + add_custom_target(${name}-man DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${name}.1") |
2498 | + add_dependencies(man-pages ${name}-man) |
2499 | + install( |
2500 | + FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}.1" |
2501 | + DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" |
2502 | + ) |
2503 | +endmacro() |
2504 | + |
2505 | +add_custom_target(man-pages ALL) |
2506 | + |
2507 | +add_manpage(hud-cli) |
2508 | +add_manpage(hud-dump-application) |
2509 | +add_manpage(hud-list-applications) |
2510 | +add_manpage(hud-verify-app-info) |
2511 | |
2512 | === removed file 'docs/man/Makefile.am' |
2513 | --- docs/man/Makefile.am 2012-02-16 16:00:44 +0000 |
2514 | +++ docs/man/Makefile.am 1970-01-01 00:00:00 +0000 |
2515 | @@ -1,16 +0,0 @@ |
2516 | - |
2517 | -man_MANS = \ |
2518 | - hud-cli.1 \ |
2519 | - hud-dump-application.1 \ |
2520 | - hud-list-applications.1 \ |
2521 | - hud-verify-app-info.1 |
2522 | - |
2523 | -.xml.1: |
2524 | - @env -u XML_CATALOG_FILES $(XSLT_PROC) -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< |
2525 | - |
2526 | -EXTRA_DIST = \ |
2527 | - $(man_MANS) \ |
2528 | - $(man_MANS:.1=.xml) |
2529 | - |
2530 | -CLEANFILES = \ |
2531 | - $(man_MANS) |
2532 | |
2533 | === added file 'libhud-client/CMakeLists.txt' |
2534 | --- libhud-client/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
2535 | +++ libhud-client/CMakeLists.txt 2013-03-29 12:53:22 +0000 |
2536 | @@ -0,0 +1,197 @@ |
2537 | + |
2538 | +set(HUD_CLIENT_INCLUDE_DIRS |
2539 | +${CMAKE_CURRENT_SOURCE_DIR} |
2540 | +${CMAKE_CURRENT_BINARY_DIR} |
2541 | +) |
2542 | + |
2543 | +set(HUD_CLIENT_INCLUDE_DIRS |
2544 | +${HUD_CLIENT_INCLUDE_DIRS} |
2545 | +PARENT_SCOPE |
2546 | +) |
2547 | + |
2548 | +include_directories(${HUD_CLIENT_INCLUDE_DIRS}) |
2549 | + |
2550 | +# FIXME would rather not include this dir |
2551 | +include_directories(${HUD_SRC_DIR}) |
2552 | + |
2553 | +add_definitions( -DHUD_CLIENT_COMPILATION=1 ) |
2554 | + |
2555 | +########################### |
2556 | +# Version Information |
2557 | +########################### |
2558 | + |
2559 | +set(API_VERSION 1) |
2560 | +set(ABI_VERSION 1) |
2561 | + |
2562 | +########################### |
2563 | +# Generated Hud Client |
2564 | +########################### |
2565 | + |
2566 | +set(HUD_CLIENT_GENERATED_HEADERS |
2567 | +service-iface.h |
2568 | +query-iface.h |
2569 | +) |
2570 | + |
2571 | +set(HUD_CLIENT_GENERATED_SOURCES |
2572 | +) |
2573 | + |
2574 | +add_gdbus_codegen( |
2575 | +OUTFILES HUD_CLIENT_GENERATED_SOURCES |
2576 | +NAME service-iface |
2577 | +PREFIX com.canonical.hud. |
2578 | +NAMESPACE _HudService |
2579 | +SERVICE_XML ${HUD_SERVICE_XML} |
2580 | +) |
2581 | + |
2582 | +add_gdbus_codegen( |
2583 | +OUTFILES HUD_CLIENT_GENERATED_SOURCES |
2584 | +NAME query-iface |
2585 | +PREFIX com.canonical.hud.query. |
2586 | +NAMESPACE _HudQuery |
2587 | +SERVICE_XML ${HUD_QUERY_XML} |
2588 | +) |
2589 | + |
2590 | +add_library(hud-client-generated STATIC ${HUD_CLIENT_GENERATED_SOURCES}) |
2591 | + |
2592 | +target_link_libraries(hud-client-generated |
2593 | +${GLIB2_LIBRARIES} |
2594 | +${GOBJECT2_LIBRARIES} |
2595 | +${GIO2_LIBRARIES} |
2596 | +${DEE_LIBRARIES} |
2597 | +) |
2598 | + |
2599 | +########################### |
2600 | +# Hud Client |
2601 | +########################### |
2602 | + |
2603 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") |
2604 | + |
2605 | +set(HUD_CLIENT_MAIN_HEADERS |
2606 | +hud-client.h |
2607 | +) |
2608 | + |
2609 | +set(HUD_CLIENT_HEADERS |
2610 | +connection.h |
2611 | +param.h |
2612 | +query.h |
2613 | +${CMAKE_SOURCE_DIR}/src/query-columns.h |
2614 | +) |
2615 | + |
2616 | +set(HUD_CLIENT_SOURCES |
2617 | +connection.c |
2618 | +param.c |
2619 | +query.c |
2620 | +) |
2621 | + |
2622 | +add_glib_enumtypes_t(HUD_CLIENT_SOURCES |
2623 | +enum-types |
2624 | +enum-types.h.in |
2625 | +enum-types.c.in |
2626 | +${HUD_CLIENT_HEADERS} |
2627 | +) |
2628 | +list(APPEND HUD_CLIENT_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/enum-types.h) |
2629 | + |
2630 | +add_library(hud-client SHARED ${HUD_CLIENT_SOURCES}) |
2631 | + |
2632 | +set_target_properties(hud-client PROPERTIES |
2633 | + VERSION ${API_VERSION}.0.0 |
2634 | + SOVERSION ${ABI_VERSION} |
2635 | + OUTPUT_NAME "hud-client" |
2636 | +) |
2637 | + |
2638 | +target_link_libraries(hud-client |
2639 | +hud-client-generated |
2640 | +${GLIB2_LIBRARIES} |
2641 | +${GOBJECT2_LIBRARIES} |
2642 | +-Wl,--no-undefined |
2643 | +) |
2644 | + |
2645 | +########################### |
2646 | +# Pkg Config |
2647 | +########################### |
2648 | + |
2649 | +set(HUD_CLIENT_PC "hud-client-${API_VERSION}.pc") |
2650 | +set(apiversion "${API_VERSION}") |
2651 | +set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") |
2652 | +set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") |
2653 | +set(VERSION "${ABI_VERSION}") |
2654 | +configure_file("hud-client.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/${HUD_CLIENT_PC}" @ONLY) |
2655 | + |
2656 | +########################### |
2657 | +# GObject Introspection |
2658 | +########################### |
2659 | + |
2660 | +if(${INTROSPECTION_FOUND}) |
2661 | + include(UseGObjectIntrospection) |
2662 | + set(INTROSPECTION_GIRS) |
2663 | + |
2664 | + set(_introspection_files ${HUD_CLIENT_SOURCES} ${HUD_CLIENT_HEADERS}) |
2665 | + set(HudClient_1_gir "hud-client") |
2666 | + set(HudClient_1_gir_INCLUDES GObject-2.0 Dee-1.0) |
2667 | + |
2668 | + gir_get_cflags(_cflags) |
2669 | + set(HudClient_1_gir_CFLAGS ${_cflags}) |
2670 | + |
2671 | + set(HudClient_1_gir_LIBS hud-client) |
2672 | + |
2673 | + list_make_absolute(_abs_introspection_files _introspection_files "${CMAKE_CURRENT_SOURCE_DIR}/") |
2674 | + set(HudClient_1_gir_FILES ${_abs_introspection_files}) |
2675 | + set(HudClient_1_gir_SCANNERFLAGS --c-include "hud-client.h") |
2676 | + set(HudClient_1_gir_EXPORT_PACKAGES "hud-client-${API_VERSION}") |
2677 | + |
2678 | + list(APPEND INTROSPECTION_GIRS HudClient-1.gir) |
2679 | + gir_add_introspections(INTROSPECTION_GIRS) |
2680 | +else() |
2681 | + message("Not performing GIR as required tools not found") |
2682 | +endif() |
2683 | + |
2684 | +########################### |
2685 | +# libhud-client Vala |
2686 | +########################### |
2687 | + |
2688 | +if(${VALA_FOUND}) |
2689 | +if(${INTROSPECTION_FOUND}) |
2690 | + |
2691 | +vapi_gen(hud-client-vapi |
2692 | + INPUT |
2693 | + HudClient-1.gir |
2694 | + PACKAGES |
2695 | + gio-2.0 |
2696 | + LIBRARY |
2697 | + HudClient-1 |
2698 | +) |
2699 | + |
2700 | +install( |
2701 | + FILES |
2702 | + ${hud-client-vapi_OUTPUT} |
2703 | + DESTINATION |
2704 | + "${CMAKE_INSTALL_DATADIR}/vala/vapi" |
2705 | +) |
2706 | + |
2707 | +endif() |
2708 | +endif() |
2709 | + |
2710 | + |
2711 | +########################### |
2712 | +# Installation |
2713 | +########################### |
2714 | + |
2715 | +install( |
2716 | + FILES ${HUD_CLIENT_MAIN_HEADERS} |
2717 | + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libhud-client-${API_VERSION}" |
2718 | +) |
2719 | + |
2720 | +install( |
2721 | + FILES ${HUD_CLIENT_HEADERS} |
2722 | + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libhud-client-${API_VERSION}/libhud-client" |
2723 | +) |
2724 | + |
2725 | +install( |
2726 | + FILES "${CMAKE_CURRENT_BINARY_DIR}/${HUD_CLIENT_PC}" |
2727 | + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" |
2728 | +) |
2729 | + |
2730 | +install( |
2731 | + TARGETS hud-client |
2732 | + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
2733 | +) |
2734 | |
2735 | === removed file 'libhud-client/Makefile.am' |
2736 | --- libhud-client/Makefile.am 2013-03-18 15:30:05 +0000 |
2737 | +++ libhud-client/Makefile.am 1970-01-01 00:00:00 +0000 |
2738 | @@ -1,175 +0,0 @@ |
2739 | - |
2740 | -DISTCLEANFILES = |
2741 | - |
2742 | -lib_LTLIBRARIES = libhud-client.la |
2743 | - |
2744 | -ABI_VERSION = 1 |
2745 | -API_VERSION = 1 |
2746 | - |
2747 | -libhud_client_include_basedir = $(includedir)/libhud-client-$(API_VERSION)/ |
2748 | -libhud_client_include_base_HEADERS = \ |
2749 | - hud-client.h |
2750 | - |
2751 | -libhud_client_includedir = $(includedir)/libhud-client-$(API_VERSION)/libhud-client |
2752 | -libhud_client_include_HEADERS = \ |
2753 | - connection.h \ |
2754 | - enum-types.h \ |
2755 | - param.h \ |
2756 | - query.h |
2757 | - |
2758 | -noinst_LTLIBRARIES = libhud-client-generated.la |
2759 | - |
2760 | -libhud_client_generated_la_SOURCES = \ |
2761 | - enum-types.h \ |
2762 | - enum-types.c \ |
2763 | - service-iface.h \ |
2764 | - service-iface.c \ |
2765 | - query-iface.h \ |
2766 | - query-iface.c |
2767 | - |
2768 | -libhud_client_generated_la_CFLAGS = \ |
2769 | - $(HUD_CFLAGS) \ |
2770 | - -I $(top_srcdir) \ |
2771 | - -D HUD_CLIENT_COMPILATION \ |
2772 | - -Wall -Werror |
2773 | - |
2774 | -libhud_client_generated_la_LIBADD = \ |
2775 | - $(HUD_LIBS) |
2776 | - |
2777 | -libhud_client_la_SOURCES = \ |
2778 | - connection.h \ |
2779 | - connection.c \ |
2780 | - param.h \ |
2781 | - param.c \ |
2782 | - $(top_srcdir)/src/query-columns.h \ |
2783 | - query.h \ |
2784 | - query.c \ |
2785 | - hud-client.h |
2786 | - |
2787 | -libhud_client_la_CFLAGS = \ |
2788 | - $(HUD_CFLAGS) \ |
2789 | - $(COVERAGE_CFLAGS) \ |
2790 | - -I $(top_srcdir) \ |
2791 | - -I $(top_srcdir)/src \ |
2792 | - -D G_LOG_DOMAIN=\"libhud-client\" \ |
2793 | - -D HUD_CLIENT_COMPILATION \ |
2794 | - -Wall -Werror |
2795 | - |
2796 | -libhud_client_la_LIBADD = \ |
2797 | - libhud-client-generated.la \ |
2798 | - $(HUD_LIBS) |
2799 | - |
2800 | -libhud_client_la_LDFLAGS = \ |
2801 | - $(HUD_LDFLAGS) \ |
2802 | - $(COVERAGE_LDFLAGS) \ |
2803 | - -version-info $(ABI_VERSION):0:0 \ |
2804 | - -no-undefined \ |
2805 | - -export-symbols-regex "^[^_].*" |
2806 | - |
2807 | -service-iface.c: $(top_srcdir)/data/com.canonical.hud.xml |
2808 | - $(AM_V_GEN) gdbus-codegen \ |
2809 | - --interface-prefix com.canonical.hud. \ |
2810 | - --generate-c-code service-iface \ |
2811 | - --c-namespace _HudService \ |
2812 | - $^ |
2813 | -service-iface.h: service-iface.c |
2814 | - |
2815 | -query-iface.c: $(top_srcdir)/data/com.canonical.hud.query.xml |
2816 | - $(AM_V_GEN) gdbus-codegen \ |
2817 | - --interface-prefix com.canonical.hud.query. \ |
2818 | - --generate-c-code query-iface \ |
2819 | - --c-namespace _HudQuery \ |
2820 | - $^ |
2821 | -query-iface.h: query-iface.c |
2822 | - |
2823 | -BUILT_SOURCES = \ |
2824 | - query-iface.h \ |
2825 | - query-iface.c \ |
2826 | - service-iface.h \ |
2827 | - service-iface.c |
2828 | - |
2829 | -EXTRA_DIST = \ |
2830 | - hud-client.pc.in |
2831 | - |
2832 | -pkgconfig_DATA = hud-client-$(API_VERSION).pc |
2833 | -pkgconfigdir = $(libdir)/pkgconfig |
2834 | - |
2835 | -%-$(API_VERSION).pc: %.pc.in |
2836 | - sed \ |
2837 | - -e "s:\@apiversion\@:$(API_VERSION):" \ |
2838 | - -e "s:\@libdir\@:$(libdir):" \ |
2839 | - -e "s:\@includedir\@:$(includedir):" \ |
2840 | - -e "s:\@VERSION\@:$(VERSION):" \ |
2841 | - $< > $@ |
2842 | - |
2843 | -CLEANFILES = \ |
2844 | - $(BUILD_SOURCES) \ |
2845 | - hud-client-$(API_VERSION).pc |
2846 | - |
2847 | -########################## |
2848 | -# Introspection |
2849 | -########################## |
2850 | - |
2851 | -include $(INTROSPECTION_MAKEFILE) |
2852 | -INTROSPECTION_GIRS = |
2853 | -INTROSPECTION_SCANNER_ARGS = \ |
2854 | - --add-include-path=$(top_srcdir) \ |
2855 | - --add-include-path=$(srcdir) \ |
2856 | - -I $(top_srcdir) -I $(srcdir) |
2857 | -INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir) --includedir=$(srcdir) |
2858 | - |
2859 | -if HAVE_INTROSPECTION |
2860 | - |
2861 | -# NOTE: 1 here is $API_VERSION |
2862 | - |
2863 | -HudClient-1.gir: libhud-client.la |
2864 | - |
2865 | -HudClient_1_gir_INCLUDES = Dee-1.0 |
2866 | -HudClient_1_gir_CFLAGS = \ |
2867 | - -D HUD_CLIENT_COMPILATION \ |
2868 | - $(HUD_CFLAGS) |
2869 | -HudClient_1_gir_LIBS = $(builddir)/libhud-client.la |
2870 | -HudClient_1_gir_EXPORT_PACKAGES = hud-client-$(API_VERSION) |
2871 | -HudClient_1_gir_SCANNERFLAGS = --c-include "hud-client.h" |
2872 | -HudClient_1_gir_FILES = $(libhud_client_la_SOURCES) |
2873 | - |
2874 | -INTROSPECTION_GIRS += HudClient-1.gir |
2875 | - |
2876 | -endif |
2877 | - |
2878 | -girdir = $(datadir)/gir-1.0 |
2879 | -gir_DATA = $(INTROSPECTION_GIRS) |
2880 | - |
2881 | -typelibdir = $(libdir)/girepository-1.0 |
2882 | -typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) |
2883 | - |
2884 | -CLEANFILES += $(gir_DATA) $(typelib_DATA) |
2885 | - |
2886 | -########################## |
2887 | -# Vapi |
2888 | -########################## |
2889 | - |
2890 | -if HAVE_VALA |
2891 | -if HAVE_INTROSPECTION |
2892 | - |
2893 | -vapidir = $(datadir)/vala/vapi |
2894 | -vapi_DATA = HudClient-1.vapi |
2895 | - |
2896 | -HudClient-1.vapi: HudClient-1.gir |
2897 | - $(VALA_API_GEN) --pkg gio-2.0 --library=HudClient-1 $< |
2898 | - |
2899 | -CLEANFILES += $(vapi_DATA) |
2900 | - |
2901 | -endif |
2902 | -endif |
2903 | - |
2904 | -########################## |
2905 | -# Enum Types |
2906 | -########################## |
2907 | - |
2908 | -include $(top_srcdir)/Makefile.am.enum |
2909 | - |
2910 | -glib_enum_h = enum-types.h |
2911 | -glib_enum_c = enum-types.c |
2912 | -glib_enum_headers = $(srcdir)/query.h |
2913 | - |
2914 | |
2915 | === modified file 'libhud-client/connection.h' |
2916 | --- libhud-client/connection.h 2012-11-28 16:56:12 +0000 |
2917 | +++ libhud-client/connection.h 2013-03-29 12:53:22 +0000 |
2918 | @@ -23,6 +23,8 @@ |
2919 | #ifndef __HUD_CLIENT_CONNECTION_H__ |
2920 | #define __HUD_CLIENT_CONNECTION_H__ |
2921 | |
2922 | +#pragma GCC visibility push(default) |
2923 | + |
2924 | #include <glib-object.h> |
2925 | |
2926 | G_BEGIN_DECLS |
2927 | @@ -88,4 +90,6 @@ |
2928 | |
2929 | G_END_DECLS |
2930 | |
2931 | +#pragma GCC visibility pop |
2932 | + |
2933 | #endif |
2934 | |
2935 | === modified file 'libhud-client/enum-types.h.in' |
2936 | --- libhud-client/enum-types.h.in 2013-02-12 03:46:44 +0000 |
2937 | +++ libhud-client/enum-types.h.in 2013-03-29 12:53:22 +0000 |
2938 | @@ -24,6 +24,8 @@ |
2939 | #ifndef __HUD_CLIENT_ENUM_TYPES_H__ |
2940 | #define __HUD_CLIENT_ENUM_TYPES_H__ |
2941 | |
2942 | +#pragma GCC visibility push(default) |
2943 | + |
2944 | #include <glib-object.h> |
2945 | |
2946 | G_BEGIN_DECLS |
2947 | @@ -34,6 +36,8 @@ |
2948 | |
2949 | G_END_DECLS |
2950 | |
2951 | +#pragma GCC visibility pop |
2952 | + |
2953 | #endif /* __HUD_CLIENT_ENUM_TYPES_H__ */ |
2954 | /*** END file-tail ***/ |
2955 | |
2956 | |
2957 | === modified file 'libhud-client/param.h' |
2958 | --- libhud-client/param.h 2013-02-08 14:53:12 +0000 |
2959 | +++ libhud-client/param.h 2013-03-29 12:53:22 +0000 |
2960 | @@ -23,6 +23,8 @@ |
2961 | #ifndef __HUD_CLIENT_PARAM_H__ |
2962 | #define __HUD_CLIENT_PARAM_H__ |
2963 | |
2964 | +#pragma GCC visibility push(default) |
2965 | + |
2966 | #include <glib.h> |
2967 | #include <glib-object.h> |
2968 | #include <gio/gio.h> |
2969 | @@ -36,6 +38,11 @@ |
2970 | #define HUD_CLIENT_IS_PARAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HUD_CLIENT_TYPE_PARAM)) |
2971 | #define HUD_CLIENT_PARAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HUD_CLIENT_TYPE_PARAM, HudClientParamClass)) |
2972 | |
2973 | +/** |
2974 | + * HUD_CLIENT_PARAM_SIGNAL_MODEL_READY |
2975 | + * |
2976 | + * Signal to indicate when the model is ready |
2977 | + */ |
2978 | #define HUD_CLIENT_PARAM_SIGNAL_MODEL_READY "model-ready" |
2979 | |
2980 | typedef struct _HudClientParam HudClientParam; |
2981 | @@ -96,4 +103,6 @@ |
2982 | |
2983 | G_END_DECLS |
2984 | |
2985 | +#pragma GCC visibility pop |
2986 | + |
2987 | #endif |
2988 | |
2989 | === modified file 'libhud-client/query.h' |
2990 | --- libhud-client/query.h 2013-03-18 22:20:43 +0000 |
2991 | +++ libhud-client/query.h 2013-03-29 12:53:22 +0000 |
2992 | @@ -23,6 +23,8 @@ |
2993 | #ifndef __HUD_CLIENT_QUERY_H__ |
2994 | #define __HUD_CLIENT_QUERY_H__ |
2995 | |
2996 | +#pragma GCC visibility push(default) |
2997 | + |
2998 | #include <glib-object.h> |
2999 | #include <dee.h> |
3000 | #include <libhud-client/connection.h> |
3001 | @@ -37,6 +39,11 @@ |
3002 | #define HUD_CLIENT_IS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HUD_CLIENT_TYPE_QUERY)) |
3003 | #define HUD_CLIENT_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HUD_CLIENT_TYPE_QUERY, HudClientQueryClass)) |
3004 | |
3005 | +/** |
3006 | + * HUD_CLIENT_QUERY_SIGNAL_TOOLBAR_UPDATED |
3007 | + * |
3008 | + * Signal to indicate when the toolbar has been updated |
3009 | + */ |
3010 | #define HUD_CLIENT_QUERY_SIGNAL_TOOLBAR_UPDATED "toolbar-updated" |
3011 | |
3012 | typedef struct _HudClientQuery HudClientQuery; |
3013 | @@ -66,7 +73,7 @@ |
3014 | }; |
3015 | |
3016 | /** |
3017 | - * HudClientQueryToolbar: |
3018 | + * HudClientQueryToolbarItems: |
3019 | * @HUD_CLIENT_QUERY_TOOLBAR_FULLSCREEN: Make the application fullscreen |
3020 | * @HUD_CLIENT_QUERY_TOOLBAR_HELP: Help the user use the application |
3021 | * @HUD_CLIENT_QUERY_TOOLBAR_PREFERENCES: Configure the application |
3022 | @@ -158,4 +165,6 @@ |
3023 | |
3024 | G_END_DECLS |
3025 | |
3026 | +#pragma GCC visibility pop |
3027 | + |
3028 | #endif |
3029 | |
3030 | === added file 'libhud-gtk/CMakeLists.txt' |
3031 | --- libhud-gtk/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
3032 | +++ libhud-gtk/CMakeLists.txt 2013-03-29 12:53:22 +0000 |
3033 | @@ -0,0 +1,94 @@ |
3034 | + |
3035 | +set(HUD_GTK_INCLUDE_DIRS |
3036 | +${CMAKE_CURRENT_SOURCE_DIR} |
3037 | +${CMAKE_CURRENT_BINARY_DIR} |
3038 | +) |
3039 | + |
3040 | +set(HUD_GTK_INCLUDE_DIRS |
3041 | +${HUD_GTK_INCLUDE_DIRS} |
3042 | +PARENT_SCOPE |
3043 | +) |
3044 | + |
3045 | +include_directories(${HUD_INCLUDE_DIRS}) |
3046 | +include_directories(${HUD_GTK_INCLUDE_DIRS}) |
3047 | +include_directories(${GTK3_INCLUDE_DIRS}) |
3048 | + |
3049 | +#add_definitions( -DHUD_COMPILATION=1 ) |
3050 | + |
3051 | +########################### |
3052 | +# Version Information |
3053 | +########################### |
3054 | + |
3055 | +set(API_VERSION 1) |
3056 | +set(ABI_VERSION 1) |
3057 | + |
3058 | +########################### |
3059 | +# Lib Hud Gtk |
3060 | +########################### |
3061 | + |
3062 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") |
3063 | + |
3064 | +set(HUD_GTK_MAIN_HEADERS |
3065 | +hud-gtk.h |
3066 | +) |
3067 | + |
3068 | +set(HUD_GTK_HEADERS |
3069 | +manager.h |
3070 | +${HUD_HEADERS} |
3071 | +) |
3072 | + |
3073 | +set(HUD_GTK_SOURCES |
3074 | +manager.c |
3075 | +) |
3076 | + |
3077 | +add_library(hud-gtk SHARED ${HUD_GTK_SOURCES}) |
3078 | + |
3079 | +set_target_properties(hud-gtk PROPERTIES |
3080 | + VERSION ${API_VERSION}.0.0 |
3081 | + SOVERSION ${ABI_VERSION} |
3082 | + OUTPUT_NAME "hud-gtk" |
3083 | +) |
3084 | + |
3085 | +target_link_libraries(hud-gtk |
3086 | +hud |
3087 | +${GLIB2_LIBRARIES} |
3088 | +${GOBJECT2_LIBRARIES} |
3089 | +${GTK3_LIBRARIES} |
3090 | +-Wl,--no-undefined |
3091 | +) |
3092 | + |
3093 | +########################### |
3094 | +# Pkg Config |
3095 | +########################### |
3096 | + |
3097 | +set(HUD_GTK_PC "hud-gtk-${API_VERSION}.pc") |
3098 | +set(apiversion "${API_VERSION}") |
3099 | +set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") |
3100 | +set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") |
3101 | +set(VERSION "${ABI_VERSION}") |
3102 | + |
3103 | +configure_file("hud-gtk.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/${HUD_GTK_PC}" @ONLY) |
3104 | + |
3105 | +########################### |
3106 | +# Installation |
3107 | +########################### |
3108 | + |
3109 | +install( |
3110 | + FILES ${HUD_GTK_MAIN_HEADERS} |
3111 | + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libhud-gtk-${API_VERSION}" |
3112 | +) |
3113 | + |
3114 | +install( |
3115 | + FILES ${HUD_GTK_HEADERS} |
3116 | + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libhud-gtk-${API_VERSION}/libhud-gtk" |
3117 | +) |
3118 | + |
3119 | +install( |
3120 | + FILES "${CMAKE_CURRENT_BINARY_DIR}/${HUD_GTK_PC}" |
3121 | + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" |
3122 | +) |
3123 | + |
3124 | +install( |
3125 | + TARGETS hud-gtk |
3126 | + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
3127 | +) |
3128 | \ No newline at end of file |
3129 | |
3130 | === removed file 'libhud-gtk/Makefile.am' |
3131 | --- libhud-gtk/Makefile.am 2013-01-15 15:58:42 +0000 |
3132 | +++ libhud-gtk/Makefile.am 1970-01-01 00:00:00 +0000 |
3133 | @@ -1,59 +0,0 @@ |
3134 | - |
3135 | -SUBDIRS = . |
3136 | - |
3137 | -lib_LTLIBRARIES = libhud-gtk.la |
3138 | - |
3139 | -ABI_VERSION = 1 |
3140 | -API_VERSION = 1 |
3141 | - |
3142 | -libhud_gtk_include_basedir = $(includedir)/libhud-gtk-$(API_VERSION)/ |
3143 | -libhud_gtk_include_base_HEADERS = \ |
3144 | - hud-gtk.h |
3145 | - |
3146 | -libhud_gtkincludedir = $(includedir)/libhud-gtk-$(API_VERSION)/libhud-gtk |
3147 | -libhud_gtkinclude_HEADERS = \ |
3148 | - manager.h |
3149 | - |
3150 | -libhud_gtk_la_SOURCES = \ |
3151 | - manager.c |
3152 | - |
3153 | -libhud_gtk_la_CFLAGS = \ |
3154 | - $(HUD_CFLAGS) \ |
3155 | - $(COVERAGE_CFLAGS) \ |
3156 | - $(gtk_CFLAGS) \ |
3157 | - -I . \ |
3158 | - -I $(top_srcdir) \ |
3159 | - -I $(top_srcdir)/libhud \ |
3160 | - -D G_LOG_DOMAIN=\"libhud-gtk\" \ |
3161 | - -D HUD_GTK_COMPILATION \ |
3162 | - -Wall -Werror |
3163 | - |
3164 | -libhud_gtk_la_LIBADD = \ |
3165 | - $(HUD_LIBS) |
3166 | - |
3167 | -libhud_gtk_la_LDFLAGS = \ |
3168 | - $(HUD_LDFLAGS) \ |
3169 | - $(COVERAGE_LDFLAGS) \ |
3170 | - $(gtk_LDFLAGS) \ |
3171 | - -version-info $(ABI_VERSION):0:0 \ |
3172 | - -no-undefined \ |
3173 | - -export-symbols-regex "^[^_].*" |
3174 | - |
3175 | -EXTRA_DIST = \ |
3176 | - hud-gtk.pc.in |
3177 | - |
3178 | -pkgconfig_DATA = hud-gtk-$(API_VERSION).pc |
3179 | -pkgconfigdir = $(libdir)/pkgconfig |
3180 | - |
3181 | -%-$(API_VERSION).pc: %.pc.in |
3182 | - sed \ |
3183 | - -e "s:\@apiversion\@:$(API_VERSION):" \ |
3184 | - -e "s:\@libdir\@:$(libdir):" \ |
3185 | - -e "s:\@includedir\@:$(includedir):" \ |
3186 | - -e "s:\@VERSION\@:$(VERSION):" \ |
3187 | - $< > $@ |
3188 | - |
3189 | -CLEANFILES = \ |
3190 | - $(BUILD_SOURCES) \ |
3191 | - hud-gtk-$(API_VERSION).pc |
3192 | - |
3193 | |
3194 | === added file 'libhud/CMakeLists.txt' |
3195 | --- libhud/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
3196 | +++ libhud/CMakeLists.txt 2013-03-29 12:53:22 +0000 |
3197 | @@ -0,0 +1,197 @@ |
3198 | + |
3199 | +set(HUD_INCLUDE_DIRS |
3200 | +${CMAKE_CURRENT_SOURCE_DIR} |
3201 | +${CMAKE_CURRENT_BINARY_DIR} |
3202 | +) |
3203 | + |
3204 | +set(HUD_INCLUDE_DIRS |
3205 | +${HUD_INCLUDE_DIRS} |
3206 | +PARENT_SCOPE |
3207 | +) |
3208 | + |
3209 | +include_directories(${HUD_INCLUDE_DIRS}) |
3210 | + |
3211 | +# FIXME Would rather not include this |
3212 | +include_directories(${HUD_SRC_DIR}) |
3213 | + |
3214 | +add_definitions( -DHUD_COMPILATION=1 ) |
3215 | + |
3216 | +########################### |
3217 | +# Version Information |
3218 | +########################### |
3219 | + |
3220 | +set(API_VERSION 1) |
3221 | +set(ABI_VERSION 1) |
3222 | + |
3223 | +########################### |
3224 | +# Generated Lib Hud |
3225 | +########################### |
3226 | + |
3227 | +set(HUD_GENERATED_HEADERS |
3228 | +app-iface.h |
3229 | +service-iface.h |
3230 | +marshal.h |
3231 | +) |
3232 | + |
3233 | +set(HUD_GENERATED_SOURCES |
3234 | +) |
3235 | + |
3236 | +add_gdbus_codegen( |
3237 | +OUTFILES HUD_GENERATED_SOURCES |
3238 | +NAME service-iface |
3239 | +PREFIX com.canonical.hud. |
3240 | +NAMESPACE _HudServiceIface |
3241 | +SERVICE_XML ${HUD_SERVICE_XML} |
3242 | +) |
3243 | + |
3244 | +add_gdbus_codegen( |
3245 | +OUTFILES HUD_GENERATED_SOURCES |
3246 | +NAME app-iface |
3247 | +PREFIX com.canonical.hud.Application. |
3248 | +NAMESPACE _HudAppIface |
3249 | +SERVICE_XML ${HUD_APP_XML} |
3250 | +) |
3251 | + |
3252 | +add_glib_marshal(HUD_GENERATED_SOURCES |
3253 | +marshal |
3254 | +_hud_marshal |
3255 | +marshal.h |
3256 | +) |
3257 | + |
3258 | +add_library(hud-generated STATIC ${HUD_GENERATED_SOURCES}) |
3259 | + |
3260 | +target_link_libraries(hud-generated |
3261 | +${GLIB2_LIBRARIES} |
3262 | +${GOBJECT2_LIBRARIES} |
3263 | +${GIO2_LIBRARIES} |
3264 | +) |
3265 | + |
3266 | +########################### |
3267 | +# Lib Hud |
3268 | +########################### |
3269 | + |
3270 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") |
3271 | + |
3272 | +set(HUD_MAIN_HEADERS |
3273 | +hud.h |
3274 | +) |
3275 | + |
3276 | +set(HUD_HEADERS |
3277 | +manager.h |
3278 | +operation.h |
3279 | +action.h |
3280 | +action-publisher.h |
3281 | +${HUD_HEADERS} |
3282 | +) |
3283 | + |
3284 | +set(HUD_SOURCES |
3285 | +manager.c |
3286 | +operation.c |
3287 | +action.c |
3288 | +action-publisher.c |
3289 | +) |
3290 | + |
3291 | +add_library(hud SHARED ${HUD_SOURCES}) |
3292 | + |
3293 | +set_target_properties(hud PROPERTIES |
3294 | + VERSION ${API_VERSION}.0.0 |
3295 | + SOVERSION ${ABI_VERSION} |
3296 | + OUTPUT_NAME "hud" |
3297 | +) |
3298 | + |
3299 | +target_link_libraries(hud |
3300 | +hud-generated |
3301 | +${GLIB2_LIBRARIES} |
3302 | +${GOBJECT2_LIBRARIES} |
3303 | +-Wl,--no-undefined |
3304 | +) |
3305 | + |
3306 | +########################### |
3307 | +# Pkg Config |
3308 | +########################### |
3309 | + |
3310 | +set(HUD_PC "hud-${API_VERSION}.pc") |
3311 | +set(apiversion "${API_VERSION}") |
3312 | +set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") |
3313 | +set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") |
3314 | +set(VERSION "${ABI_VERSION}") |
3315 | + |
3316 | +configure_file("hud.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/${HUD_PC}" @ONLY) |
3317 | + |
3318 | +########################### |
3319 | +# GObject Introspection |
3320 | +########################### |
3321 | + |
3322 | +if(${INTROSPECTION_FOUND}) |
3323 | + include(UseGObjectIntrospection) |
3324 | + set(INTROSPECTION_GIRS) |
3325 | + |
3326 | + set(_introspection_files ${HUD_SOURCES} ${HUD_HEADERS}) |
3327 | + set(Hud_1_gir "hud") |
3328 | + set(Hud_1_gir_INCLUDES GObject-2.0) |
3329 | + |
3330 | + gir_get_cflags(_cflags) |
3331 | + set(Hud_1_gir_CFLAGS ${_cflags}) |
3332 | + |
3333 | + set(Hud_1_gir_LIBS hud) |
3334 | + |
3335 | + list_make_absolute(_abs_introspection_files _introspection_files "${CMAKE_CURRENT_SOURCE_DIR}/") |
3336 | + set(Hud_1_gir_FILES ${_abs_introspection_files}) |
3337 | + set(Hud_1_gir_SCANNERFLAGS --c-include "hud.h") |
3338 | + set(Hud_1_gir_EXPORT_PACKAGES "hud-${API_VERSION}") |
3339 | + |
3340 | + list(APPEND INTROSPECTION_GIRS Hud-1.gir) |
3341 | + gir_add_introspections(INTROSPECTION_GIRS) |
3342 | +else() |
3343 | + message("Not performing GIR as required tools not found") |
3344 | +endif() |
3345 | + |
3346 | +########################### |
3347 | +# libhud Vala |
3348 | +########################### |
3349 | + |
3350 | +if(${VALA_FOUND}) |
3351 | +if(${INTROSPECTION_FOUND}) |
3352 | + |
3353 | +vapi_gen(hud-vapi |
3354 | + INPUT |
3355 | + Hud-1.gir |
3356 | + PACKAGES |
3357 | + gio-2.0 |
3358 | + LIBRARY |
3359 | + Hud-1 |
3360 | +) |
3361 | + |
3362 | +install( |
3363 | + FILES |
3364 | + ${hud-vapi_OUTPUT} |
3365 | + DESTINATION |
3366 | + "${CMAKE_INSTALL_DATADIR}/vala/vapi" |
3367 | +) |
3368 | + |
3369 | +endif() |
3370 | +endif() |
3371 | + |
3372 | +########################### |
3373 | +# Installation |
3374 | +########################### |
3375 | + |
3376 | +install( |
3377 | + FILES ${HUD_MAIN_HEADERS} |
3378 | + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libhud-${API_VERSION}" |
3379 | +) |
3380 | + |
3381 | +install( |
3382 | + FILES ${HUD_HEADERS} |
3383 | + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libhud-${API_VERSION}/libhud" |
3384 | +) |
3385 | + |
3386 | +install( |
3387 | + FILES "${CMAKE_CURRENT_BINARY_DIR}/${HUD_PC}" |
3388 | + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" |
3389 | +) |
3390 | + |
3391 | +install( |
3392 | + TARGETS hud |
3393 | + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
3394 | +) |
3395 | \ No newline at end of file |
3396 | |
3397 | === removed file 'libhud/Makefile.am' |
3398 | --- libhud/Makefile.am 2013-03-13 14:51:56 +0000 |
3399 | +++ libhud/Makefile.am 1970-01-01 00:00:00 +0000 |
3400 | @@ -1,188 +0,0 @@ |
3401 | - |
3402 | -CLEANFILES = |
3403 | -DISTCLEANFILES = |
3404 | -BUILT_SOURCES = |
3405 | -EXTRA_DIST = |
3406 | - |
3407 | -SUBDIRS = . tests demo |
3408 | - |
3409 | -lib_LTLIBRARIES = libhud.la |
3410 | - |
3411 | -ABI_VERSION = 1 |
3412 | -API_VERSION = 1 |
3413 | - |
3414 | -libhud_include_basedir = $(includedir)/libhud-$(API_VERSION)/ |
3415 | -libhud_include_base_HEADERS = \ |
3416 | - hud.h |
3417 | - |
3418 | -libhudincludedir = $(includedir)/libhud-$(API_VERSION)/libhud |
3419 | -libhudinclude_HEADERS = \ |
3420 | - manager.h \ |
3421 | - operation.h \ |
3422 | - action.h \ |
3423 | - action-publisher.h |
3424 | - |
3425 | -libhud_la_SOURCES = \ |
3426 | - manager.h \ |
3427 | - manager.c \ |
3428 | - operation-private.h \ |
3429 | - operation.h \ |
3430 | - operation.c \ |
3431 | - action.c \ |
3432 | - action-publisher.h \ |
3433 | - action-publisher.c |
3434 | - |
3435 | -libhud_la_CFLAGS = \ |
3436 | - $(HUD_CFLAGS) \ |
3437 | - $(COVERAGE_CFLAGS) \ |
3438 | - -I . \ |
3439 | - -I $(top_srcdir) \ |
3440 | - -D G_LOG_DOMAIN=\"libhud\" \ |
3441 | - -D HUD_COMPILATION \ |
3442 | - -Wall -Werror |
3443 | - |
3444 | -libhud_la_LIBADD = \ |
3445 | - $(HUD_LIBS) \ |
3446 | - libhud-generated.la |
3447 | - |
3448 | -libhud_la_LDFLAGS = \ |
3449 | - $(HUD_LDFLAGS) \ |
3450 | - $(COVERAGE_LDFLAGS) \ |
3451 | - -version-info $(ABI_VERSION):0:0 \ |
3452 | - -no-undefined \ |
3453 | - -export-symbols-regex "^[^_].*" |
3454 | - |
3455 | -################################# |
3456 | -# Generated Code |
3457 | -################################# |
3458 | - |
3459 | -noinst_LTLIBRARIES = libhud-generated.la |
3460 | - |
3461 | -libhud_generated_la_SOURCES = \ |
3462 | - app-iface.h \ |
3463 | - app-iface.c \ |
3464 | - service-iface.h \ |
3465 | - service-iface.c \ |
3466 | - marshal.h \ |
3467 | - marshal.c |
3468 | - |
3469 | -libhud_generated_la_CFLAGS = \ |
3470 | - $(HUD_CFLAGS) |
3471 | - |
3472 | -libhud_generated_la_LIBADD = \ |
3473 | - $(HUD_LIBS) |
3474 | - |
3475 | -libhud_generated_la_LDFLAGS = \ |
3476 | - $(HUD_LDFLAGS) |
3477 | - |
3478 | -# Marshalling |
3479 | - |
3480 | -include $(top_srcdir)/Makefile.am.marshal |
3481 | - |
3482 | -glib_marshal_list = marshal.list |
3483 | -glib_marshal_prefix = _hud_marshal |
3484 | - |
3485 | -# DBus Ifaces |
3486 | - |
3487 | -service-iface.c: $(top_srcdir)/data/com.canonical.hud.xml |
3488 | - $(AM_V_GEN) gdbus-codegen \ |
3489 | - --interface-prefix com.canonical.hud. \ |
3490 | - --generate-c-code service-iface \ |
3491 | - --c-namespace _HudServiceIface \ |
3492 | - $^ |
3493 | -service-iface.h: service-iface.c |
3494 | - |
3495 | -app-iface.c: $(top_srcdir)/data/com.canonical.hud.Application.xml |
3496 | - $(AM_V_GEN) gdbus-codegen \ |
3497 | - --interface-prefix com.canonical.hud.Application. \ |
3498 | - --generate-c-code app-iface \ |
3499 | - --c-namespace _HudAppIface \ |
3500 | - $^ |
3501 | -app-iface.h: app-iface.c |
3502 | - |
3503 | -BUILT_SOURCES += \ |
3504 | - app-iface.h \ |
3505 | - app-iface.c \ |
3506 | - service-iface.h \ |
3507 | - service-iface.c |
3508 | - |
3509 | -########################## |
3510 | -# Introspection |
3511 | -########################## |
3512 | - |
3513 | -include $(INTROSPECTION_MAKEFILE) |
3514 | -INTROSPECTION_GIRS = |
3515 | -INTROSPECTION_SCANNER_ARGS = \ |
3516 | - --add-include-path=$(top_srcdir) \ |
3517 | - --add-include-path=$(srcdir) \ |
3518 | - -I $(top_srcdir) -I $(srcdir) |
3519 | -INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir) --includedir=$(srcdir) |
3520 | - |
3521 | -if HAVE_INTROSPECTION |
3522 | - |
3523 | -# NOTE: 1 here is $API_VERSION |
3524 | - |
3525 | -Hud-1.gir: libhud.la |
3526 | - |
3527 | -Hud_1_gir_INCLUDES = Dee-1.0 |
3528 | -Hud_1_gir_CFLAGS = \ |
3529 | - -D HUD_COMPILATION \ |
3530 | - $(HUD_CFLAGS) |
3531 | -Hud_1_gir_LIBS = $(builddir)/libhud.la |
3532 | -Hud_1_gir_EXPORT_PACKAGES = hud-$(API_VERSION) |
3533 | -Hud_1_gir_SCANNERFLAGS = --c-include "hud.h" |
3534 | -Hud_1_gir_FILES = $(libhud_la_SOURCES) |
3535 | - |
3536 | -INTROSPECTION_GIRS += Hud-1.gir |
3537 | - |
3538 | -endif |
3539 | - |
3540 | -girdir = $(datadir)/gir-1.0 |
3541 | -gir_DATA = $(INTROSPECTION_GIRS) |
3542 | - |
3543 | -typelibdir = $(libdir)/girepository-1.0 |
3544 | -typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) |
3545 | - |
3546 | -CLEANFILES += $(gir_DATA) $(typelib_DATA) |
3547 | - |
3548 | -########################## |
3549 | -# Vapi |
3550 | -########################## |
3551 | - |
3552 | -if HAVE_VALA |
3553 | -if HAVE_INTROSPECTION |
3554 | - |
3555 | -vapidir = $(datadir)/vala/vapi |
3556 | -vapi_DATA = Hud-1.vapi |
3557 | - |
3558 | -Hud-1.vapi: Hud-1.gir |
3559 | - $(VALA_API_GEN) --pkg gio-2.0 --library=Hud-1 $< |
3560 | - |
3561 | -CLEANFILES += $(vapi_DATA) |
3562 | - |
3563 | -endif |
3564 | -endif |
3565 | - |
3566 | - |
3567 | -################################# |
3568 | -# Package Config |
3569 | -################################# |
3570 | - |
3571 | -EXTRA_DIST += \ |
3572 | - hud.pc.in |
3573 | - |
3574 | -pkgconfig_DATA = hud-$(API_VERSION).pc |
3575 | -pkgconfigdir = $(libdir)/pkgconfig |
3576 | - |
3577 | -%-$(API_VERSION).pc: %.pc.in |
3578 | - sed \ |
3579 | - -e "s:\@apiversion\@:$(API_VERSION):" \ |
3580 | - -e "s:\@libdir\@:$(libdir):" \ |
3581 | - -e "s:\@includedir\@:$(includedir):" \ |
3582 | - -e "s:\@VERSION\@:$(VERSION):" \ |
3583 | - $< > $@ |
3584 | - |
3585 | -CLEANFILES += \ |
3586 | - $(BUILD_SOURCES) \ |
3587 | - hud-$(API_VERSION).pc |
3588 | - |
3589 | |
3590 | === modified file 'libhud/action-publisher.h' |
3591 | --- libhud/action-publisher.h 2013-03-13 12:10:37 +0000 |
3592 | +++ libhud/action-publisher.h 2013-03-29 12:53:22 +0000 |
3593 | @@ -29,6 +29,8 @@ |
3594 | #ifndef __HUD_ACTION_PUBLISHER_H__ |
3595 | #define __HUD_ACTION_PUBLISHER_H__ |
3596 | |
3597 | +#pragma GCC visibility push(default) |
3598 | + |
3599 | #include <gio/gio.h> |
3600 | |
3601 | G_BEGIN_DECLS |
3602 | @@ -42,6 +44,8 @@ |
3603 | #define HUD_ACTION_PUBLISHER_SIGNAL_ACTION_GROUP_ADDED "action-group-added" |
3604 | #define HUD_ACTION_PUBLISHER_SIGNAL_ACTION_GROUP_REMOVED "action-group-removed" |
3605 | |
3606 | +GType hud_action_description_get_type (void); |
3607 | + |
3608 | #define HUD_TYPE_ACTION_DESCRIPTION (hud_action_description_get_type ()) |
3609 | #define HUD_ACTION_DESCRIPTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ |
3610 | HUD_TYPE_ACTION_DESCRIPTION, HudActionDescription)) |
3611 | @@ -61,6 +65,8 @@ |
3612 | |
3613 | HudActionPublisher * hud_action_publisher_new_for_id (GVariant *id); |
3614 | |
3615 | +HudActionPublisher * hud_action_publisher_new_for_application (GApplication *application); |
3616 | + |
3617 | void hud_action_publisher_add_description (HudActionPublisher *publisher, |
3618 | HudActionDescription *description); |
3619 | |
3620 | @@ -93,4 +99,6 @@ |
3621 | |
3622 | G_END_DECLS |
3623 | |
3624 | +#pragma GCC visibility pop |
3625 | + |
3626 | #endif /* __HUD_ACTION_PUBLISHER_H__ */ |
3627 | |
3628 | === modified file 'libhud/action.c' |
3629 | --- libhud/action.c 2012-12-11 21:14:14 +0000 |
3630 | +++ libhud/action.c 2013-03-29 12:53:22 +0000 |
3631 | @@ -55,7 +55,7 @@ |
3632 | N_SIGNALS |
3633 | }; |
3634 | |
3635 | -guint hud_action_signals[N_SIGNALS]; |
3636 | +static guint hud_action_signals[N_SIGNALS]; |
3637 | |
3638 | static void hud_action_iface_init (GActionInterface *iface); |
3639 | |
3640 | |
3641 | === modified file 'libhud/action.h' |
3642 | --- libhud/action.h 2012-12-11 21:39:33 +0000 |
3643 | +++ libhud/action.h 2013-03-29 12:53:22 +0000 |
3644 | @@ -29,6 +29,8 @@ |
3645 | #ifndef __HUD_ACTION_H__ |
3646 | #define __HUD_ACTION_H__ |
3647 | |
3648 | +#pragma GCC visibility push(default) |
3649 | + |
3650 | #include "operation.h" |
3651 | |
3652 | G_BEGIN_DECLS |
3653 | @@ -104,4 +106,6 @@ |
3654 | |
3655 | G_END_DECLS |
3656 | |
3657 | +#pragma GCC visibility pop |
3658 | + |
3659 | #endif /* __HUD_ACTION_H__ */ |
3660 | |
3661 | === removed file 'libhud/demo/Makefile.am' |
3662 | --- libhud/demo/Makefile.am 2013-03-15 11:41:51 +0000 |
3663 | +++ libhud/demo/Makefile.am 1970-01-01 00:00:00 +0000 |
3664 | @@ -1,13 +0,0 @@ |
3665 | -check_PROGRAMS = \ |
3666 | - simple-test |
3667 | - |
3668 | -simple_test_CFLAGS = \ |
3669 | - $(HUD_CFLAGS) \ |
3670 | - $(gtk_CFLAGS) \ |
3671 | - -I$(top_srcdir) \ |
3672 | - -I$(top_srcdir)/libhud |
3673 | - |
3674 | -simple_test_LDADD = \ |
3675 | - $(top_builddir)/libhud/libhud.la \ |
3676 | - $(HUD_LIBS) \ |
3677 | - $(gtk_LIBS) |
3678 | |
3679 | === modified file 'libhud/manager.h' |
3680 | --- libhud/manager.h 2012-12-19 21:48:35 +0000 |
3681 | +++ libhud/manager.h 2013-03-29 12:53:22 +0000 |
3682 | @@ -25,6 +25,8 @@ |
3683 | #ifndef __HUD_MANAGER_H__ |
3684 | #define __HUD_MANAGER_H__ |
3685 | |
3686 | +#pragma GCC visibility push(default) |
3687 | + |
3688 | #include <glib-object.h> |
3689 | |
3690 | #include "action-publisher.h" |
3691 | @@ -68,4 +70,6 @@ |
3692 | |
3693 | G_END_DECLS |
3694 | |
3695 | +#pragma GCC visibility pop |
3696 | + |
3697 | #endif /* __HUD_MANAGER_H__ */ |
3698 | |
3699 | === modified file 'libhud/operation.h' |
3700 | --- libhud/operation.h 2012-12-11 21:39:33 +0000 |
3701 | +++ libhud/operation.h 2013-03-29 12:53:22 +0000 |
3702 | @@ -29,6 +29,8 @@ |
3703 | #ifndef __HUD_OPERATION_H__ |
3704 | #define __HUD_OPERATION_H__ |
3705 | |
3706 | +#pragma GCC visibility push(default) |
3707 | + |
3708 | #include <gio/gio.h> |
3709 | |
3710 | G_BEGIN_DECLS |
3711 | @@ -85,4 +87,6 @@ |
3712 | |
3713 | G_END_DECLS |
3714 | |
3715 | +#pragma GCC visibility pop |
3716 | + |
3717 | #endif /* __HUD_OPERATION_H__ */ |
3718 | |
3719 | === removed file 'libhud/tests/Makefile.am' |
3720 | --- libhud/tests/Makefile.am 2012-10-29 15:23:33 +0000 |
3721 | +++ libhud/tests/Makefile.am 1970-01-01 00:00:00 +0000 |
3722 | @@ -1,36 +0,0 @@ |
3723 | - |
3724 | -CLEANFILES = |
3725 | -DISTCLEANFILES = |
3726 | -EXTRA_DIST = |
3727 | -check_PROGRAMS = |
3728 | - |
3729 | -TESTS = \ |
3730 | - libhud-tester |
3731 | - |
3732 | -##################################### |
3733 | -# libhud-test |
3734 | -##################################### |
3735 | - |
3736 | -LIBHUD_XML_REPORT = libhud-test.xml |
3737 | -libhud-tester: libhud-test Makefile.am |
3738 | - @echo "#!/bin/bash" > $@ |
3739 | - @echo gtester --verbose -k -o $(LIBHUD_XML_REPORT) $(abs_builddir)/libhud-test >> $@ |
3740 | - @chmod +x $@ |
3741 | - |
3742 | -CLEANFILES += \ |
3743 | - $(LIBHUD_XML_REPORT) \ |
3744 | - libhud-tester |
3745 | - |
3746 | -libhud_test_SOURCES = \ |
3747 | - hud-test.c |
3748 | -libhud_test_CFLAGS = \ |
3749 | - -I $(top_srcdir) \ |
3750 | - $(HUD_CFLAGS) \ |
3751 | - $(TEST_CFLAGS) |
3752 | -libhud_test_LDADD = \ |
3753 | - $(builddir)/../libhud.la \ |
3754 | - $(HUD_LIBS) \ |
3755 | - $(TEST_LIBS) |
3756 | - |
3757 | -check_PROGRAMS += libhud-test |
3758 | - |
3759 | |
3760 | === removed directory 'm4' |
3761 | === removed file 'm4/gcov.m4' |
3762 | --- m4/gcov.m4 2012-03-27 20:50:31 +0000 |
3763 | +++ m4/gcov.m4 1970-01-01 00:00:00 +0000 |
3764 | @@ -1,86 +0,0 @@ |
3765 | -# Checks for existence of coverage tools: |
3766 | -# * gcov |
3767 | -# * lcov |
3768 | -# * genhtml |
3769 | -# * gcovr |
3770 | -# |
3771 | -# Sets ac_cv_check_gcov to yes if tooling is present |
3772 | -# and reports the executables to the variables LCOV, GCOVR and GENHTML. |
3773 | -AC_DEFUN([AC_TDD_GCOV], |
3774 | -[ |
3775 | - AC_ARG_ENABLE(gcov, |
3776 | - AS_HELP_STRING([--enable-gcov], |
3777 | - [enable coverage testing with gcov]), |
3778 | - [use_gcov=$enableval], [use_gcov=no]) |
3779 | - |
3780 | - if test "x$use_gcov" = "xyes"; then |
3781 | - # we need gcc: |
3782 | - if test "$GCC" != "yes"; then |
3783 | - AC_MSG_ERROR([GCC is required for --enable-gcov]) |
3784 | - fi |
3785 | - |
3786 | - # Check if ccache is being used |
3787 | - AC_CHECK_PROG(SHTOOL, shtool, shtool) |
3788 | - case `$SHTOOL path $CC` in |
3789 | - *ccache*[)] gcc_ccache=yes;; |
3790 | - *[)] gcc_ccache=no;; |
3791 | - esac |
3792 | - |
3793 | - if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then |
3794 | - AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.]) |
3795 | - fi |
3796 | - |
3797 | - lcov_version_list="1.6 1.7 1.8 1.9" |
3798 | - AC_CHECK_PROG(LCOV, lcov, lcov) |
3799 | - AC_CHECK_PROG(GENHTML, genhtml, genhtml) |
3800 | - |
3801 | - if test "$LCOV"; then |
3802 | - AC_CACHE_CHECK([for lcov version], glib_cv_lcov_version, [ |
3803 | - glib_cv_lcov_version=invalid |
3804 | - lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` |
3805 | - for lcov_check_version in $lcov_version_list; do |
3806 | - if test "$lcov_version" = "$lcov_check_version"; then |
3807 | - glib_cv_lcov_version="$lcov_check_version (ok)" |
3808 | - fi |
3809 | - done |
3810 | - ]) |
3811 | - else |
3812 | - lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" |
3813 | - AC_MSG_ERROR([$lcov_msg]) |
3814 | - fi |
3815 | - |
3816 | - case $glib_cv_lcov_version in |
3817 | - ""|invalid[)] |
3818 | - lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." |
3819 | - AC_MSG_ERROR([$lcov_msg]) |
3820 | - LCOV="exit 0;" |
3821 | - ;; |
3822 | - esac |
3823 | - |
3824 | - if test -z "$GENHTML"; then |
3825 | - AC_MSG_ERROR([Could not find genhtml from the lcov package]) |
3826 | - fi |
3827 | - |
3828 | - ac_cv_check_gcov=yes |
3829 | - ac_cv_check_lcov=yes |
3830 | - |
3831 | - # Remove all optimization flags from CFLAGS |
3832 | - changequote({,}) |
3833 | - CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'` |
3834 | - changequote([,]) |
3835 | - |
3836 | - # Add the special gcc flags |
3837 | - COVERAGE_CFLAGS="-O0 -fprofile-arcs -ftest-coverage" |
3838 | - COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage" |
3839 | - COVERAGE_LDFLAGS="-lgcov" |
3840 | - |
3841 | - # Check availability of gcovr |
3842 | - AC_CHECK_PROG(GCOVR, gcovr, gcovr) |
3843 | - if test -z "$GCOVR"; then |
3844 | - ac_cv_check_gcovr=no |
3845 | - else |
3846 | - ac_cv_check_gcovr=yes |
3847 | - fi |
3848 | - |
3849 | -fi |
3850 | -]) # AC_TDD_GCOV |
3851 | |
3852 | === added file 'src/CMakeLists.txt' |
3853 | --- src/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
3854 | +++ src/CMakeLists.txt 2013-03-29 12:53:22 +0000 |
3855 | @@ -0,0 +1,202 @@ |
3856 | + |
3857 | +set(HUD_SERVICE_INCLUDE_DIRS |
3858 | +${CMAKE_CURRENT_SOURCE_DIR} |
3859 | +${CMAKE_CURRENT_BINARY_DIR} |
3860 | +) |
3861 | + |
3862 | +set(HUD_SERVICE_INCLUDE_DIRS |
3863 | +${HUD_SERVICE_INCLUDE_DIRS} |
3864 | +PARENT_SCOPE |
3865 | +) |
3866 | + |
3867 | +include_directories(${HUD_SERVICE_INCLUDE_DIRS}) |
3868 | +include_directories(${HUD_CLIENT_INCLUDE_DIRS}) |
3869 | + |
3870 | +########################### |
3871 | +# Generated Lib Hud Service |
3872 | +########################### |
3873 | + |
3874 | +set(HUD_SERVICE_GENERATED_HEADERS |
3875 | +app-iface.h |
3876 | +hud-iface.h |
3877 | +hud-query-iface.h |
3878 | +) |
3879 | + |
3880 | +set(HUD_SERVICE_GENERATED_SOURCES |
3881 | +) |
3882 | + |
3883 | +add_gdbus_codegen( |
3884 | +OUTFILES HUD_SERVICE_GENERATED_SOURCES |
3885 | +NAME hud-iface |
3886 | +PREFIX com.canonical.hud. |
3887 | +NAMESPACE HudIface |
3888 | +SERVICE_XML ${HUD_SERVICE_XML} |
3889 | +) |
3890 | + |
3891 | +add_gdbus_codegen( |
3892 | +OUTFILES HUD_SERVICE_GENERATED_SOURCES |
3893 | +NAME hud-query-iface |
3894 | +PREFIX com.canonical.hud.query. |
3895 | +NAMESPACE HudQueryIface |
3896 | +SERVICE_XML ${HUD_QUERY_XML} |
3897 | +) |
3898 | + |
3899 | +add_gdbus_codegen( |
3900 | +OUTFILES HUD_SERVICE_GENERATED_SOURCES |
3901 | +NAME app-iface |
3902 | +PREFIX com.canonical.hud.Application. |
3903 | +NAMESPACE AppIface |
3904 | +SERVICE_XML ${HUD_APP_XML} |
3905 | +) |
3906 | + |
3907 | +add_constant_template(HUD_SERVICE_GENERATED_SOURCES |
3908 | +create-db |
3909 | +create_db |
3910 | +"${CMAKE_CURRENT_SOURCE_DIR}/create-db.sql" |
3911 | +) |
3912 | + |
3913 | +add_library(hud-service-generated STATIC ${HUD_SERVICE_GENERATED_SOURCES}) |
3914 | + |
3915 | +target_link_libraries(hud-service-generated |
3916 | +${GLIB2_LIBRARIES} |
3917 | +${GOBJECT2_LIBRARIES} |
3918 | +) |
3919 | + |
3920 | +########################### |
3921 | +# Lib Hud Service |
3922 | +########################### |
3923 | + |
3924 | +set(HUD_SERVICE_LIB_HEADERS |
3925 | +abstract-app.h |
3926 | +action-muxer.h |
3927 | +application-list.h |
3928 | +application-source.h |
3929 | +dump-app-info.h |
3930 | +shared-values.h |
3931 | +hudsettings.h |
3932 | +hudappmenuregistrar.h |
3933 | +huddbusmenucollector.h |
3934 | +hudmenumodelcollector.h |
3935 | +hudappindicatorsource.h |
3936 | +hudwebappsource.h |
3937 | +hudindicatorsource.h |
3938 | +huddebugsource.h |
3939 | +hudsourcelist.h |
3940 | +hudsource.h |
3941 | +hudtoken.h |
3942 | +hudquery.h |
3943 | +hudstringlist.h |
3944 | +hudvoice.h |
3945 | +hudsphinx.h |
3946 | +hudjulius.h |
3947 | +huditem.h |
3948 | +hudkeywordmapping.h |
3949 | +hudresult.h |
3950 | +load-app-info.h |
3951 | +pronounce-dict.h |
3952 | +query-columns.h |
3953 | +usage-tracker.h |
3954 | +watchdog.h |
3955 | +) |
3956 | + |
3957 | +set(HUD_SERVICE_LIB_SOURCES |
3958 | +action-muxer.c |
3959 | +application-list.c |
3960 | +application-source.c |
3961 | +dump-app-info.c |
3962 | +hudsettings.c |
3963 | +hudappmenuregistrar.c |
3964 | +huddbusmenucollector.c |
3965 | +hudmenumodelcollector.c |
3966 | +hudappindicatorsource.c |
3967 | +hudwebappsource.c |
3968 | +hudindicatorsource.c |
3969 | +huddebugsource.c |
3970 | +hudsourcelist.c |
3971 | +hudsource.c |
3972 | +hudtoken.c |
3973 | +hudquery.c |
3974 | +hudstringlist.c |
3975 | +hudvoice.c |
3976 | +hudsphinx.c |
3977 | +hudjulius.c |
3978 | +huditem.c |
3979 | +hudkeywordmapping.c |
3980 | +hudresult.c |
3981 | +load-app-info.c |
3982 | +pronounce-dict.c |
3983 | +usage-tracker.c |
3984 | +watchdog.c |
3985 | +) |
3986 | + |
3987 | +add_glib_enumtypes_t(HUD_SERVICE_LIB_SOURCES |
3988 | +enum-types |
3989 | +enum-types.h.in |
3990 | +enum-types.c.in |
3991 | +${HUD_SERVICE_LIB_HEADERS} |
3992 | +) |
3993 | + |
3994 | +add_library(hud-service STATIC ${HUD_SERVICE_LIB_SOURCES}) |
3995 | + |
3996 | +target_link_libraries(hud-service |
3997 | +hud-client |
3998 | +hud-service-generated |
3999 | +${GLIB2_LIBRARIES} |
4000 | +${GOBJECT2_LIBRARIES} |
4001 | +${GIO2_LIBRARIES} |
4002 | +${BAMF_LIBRARIES} |
4003 | +${DEE_LIBRARIES} |
4004 | +${DBUSMENU_GLIB_LIBRARIES} |
4005 | +${SQLITE3_LIBRARIES} |
4006 | +${POCKETSPHINX_LIBRARIES} |
4007 | +) |
4008 | + |
4009 | +########################### |
4010 | +# Hud Service Executable |
4011 | +########################### |
4012 | + |
4013 | +add_executable(hud-service-exec hud-service.c) |
4014 | + |
4015 | +set_target_properties(hud-service-exec PROPERTIES OUTPUT_NAME "hud-service") |
4016 | + |
4017 | +target_link_libraries(hud-service-exec hud-service) |
4018 | + |
4019 | +########################### |
4020 | +# Hud Dump Application |
4021 | +########################### |
4022 | + |
4023 | +add_executable(hud-dump-application hud-dump-application.c) |
4024 | + |
4025 | +target_link_libraries(hud-dump-application hud-service) |
4026 | + |
4027 | +########################### |
4028 | +# Hud Verify App Info |
4029 | +########################### |
4030 | + |
4031 | +add_executable(hud-verify-app-info hud-verify-app-info.c) |
4032 | + |
4033 | +target_link_libraries(hud-verify-app-info hud-service) |
4034 | + |
4035 | +########################### |
4036 | +# Installation |
4037 | +########################### |
4038 | + |
4039 | +install( |
4040 | + PROGRAMS |
4041 | + hud-list-applications |
4042 | + DESTINATION |
4043 | + ${CMAKE_INSTALL_BINDIR} |
4044 | +) |
4045 | + |
4046 | +install( |
4047 | + TARGETS |
4048 | + hud-dump-application |
4049 | + hud-verify-app-info |
4050 | + RUNTIME DESTINATION |
4051 | + ${CMAKE_INSTALL_BINDIR} |
4052 | +) |
4053 | + |
4054 | +install( |
4055 | + TARGETS hud-service-exec |
4056 | + RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/hud" |
4057 | +) |
4058 | |
4059 | === removed file 'src/Makefile.am' |
4060 | --- src/Makefile.am 2013-03-25 16:54:06 +0000 |
4061 | +++ src/Makefile.am 1970-01-01 00:00:00 +0000 |
4062 | @@ -1,242 +0,0 @@ |
4063 | -CLEANFILES = |
4064 | -DISTCLEANFILES = |
4065 | -BUILT_SOURCES = |
4066 | -EXTRA_DIST = \ |
4067 | - hud-list-applications |
4068 | - |
4069 | -bin_PROGRAMS = \ |
4070 | - hud-dump-application \ |
4071 | - hud-verify-app-info |
4072 | - |
4073 | -bin_SCRIPTS = \ |
4074 | - hud-list-applications |
4075 | - |
4076 | -pkglibexec_PROGRAMS = \ |
4077 | - hud-service |
4078 | - |
4079 | -noinst_LTLIBRARIES = \ |
4080 | - libhud-service-generated.la \ |
4081 | - libhud-service.la |
4082 | - |
4083 | -#################### |
4084 | -# HUD Service C code |
4085 | -#################### |
4086 | - |
4087 | -libhud_service_la_SOURCES = \ |
4088 | - abstract-app.h \ |
4089 | - action-muxer.h \ |
4090 | - action-muxer.c \ |
4091 | - application-list.h \ |
4092 | - application-list.c \ |
4093 | - application-source.h \ |
4094 | - application-source.c \ |
4095 | - dump-app-info.h \ |
4096 | - dump-app-info.c \ |
4097 | - enum-types.h \ |
4098 | - enum-types.c \ |
4099 | - shared-values.h \ |
4100 | - hudsettings.h \ |
4101 | - hudsettings.c \ |
4102 | - hudappmenuregistrar.h \ |
4103 | - hudappmenuregistrar.c \ |
4104 | - huddbusmenucollector.h \ |
4105 | - huddbusmenucollector.c \ |
4106 | - hudmenumodelcollector.h \ |
4107 | - hudmenumodelcollector.c \ |
4108 | - hudappindicatorsource.h \ |
4109 | - hudappindicatorsource.c \ |
4110 | - hudwebappsource.h \ |
4111 | - hudwebappsource.c \ |
4112 | - hudindicatorsource.h \ |
4113 | - hudindicatorsource.c \ |
4114 | - huddebugsource.h \ |
4115 | - huddebugsource.c \ |
4116 | - hudsourcelist.h \ |
4117 | - hudsourcelist.c \ |
4118 | - hudsource.h \ |
4119 | - hudsource.c \ |
4120 | - hudtoken.h \ |
4121 | - hudtoken.c \ |
4122 | - hudquery.h \ |
4123 | - hudquery.c \ |
4124 | - hudstringlist.h \ |
4125 | - hudstringlist.c \ |
4126 | - hudvoice.h \ |
4127 | - hudvoice.c \ |
4128 | - hudsphinx.h \ |
4129 | - hudsphinx.c \ |
4130 | - hudjulius.h \ |
4131 | - hudjulius.c \ |
4132 | - huditem.h \ |
4133 | - huditem.c \ |
4134 | - hudkeywordmapping.h \ |
4135 | - hudkeywordmapping.c \ |
4136 | - hudresult.h \ |
4137 | - hudresult.c \ |
4138 | - load-app-info.h \ |
4139 | - load-app-info.c \ |
4140 | - pronounce-dict.c \ |
4141 | - pronounce-dict.h \ |
4142 | - query-columns.h \ |
4143 | - usage-tracker.h \ |
4144 | - usage-tracker.c |
4145 | - |
4146 | -libhud_service_la_LDFLAGS = \ |
4147 | - $(COVERAGE_LDFLAGS) |
4148 | - |
4149 | -libhud_service_la_CFLAGS = \ |
4150 | - $(HUD_CFLAGS) \ |
4151 | - $(BAMF_CFLAGS) \ |
4152 | - $(HYBRIS_CFLAGS) \ |
4153 | - $(COVERAGE_CFLAGS) \ |
4154 | - -DDATADIR=\""$(datadir)"\" \ |
4155 | - -DLIBEXECDIR=\""$(libexecdir)"\" \ |
4156 | - -DDICT_PATH=\""/usr/share/pocketsphinx/model/lm/en_US/cmu07a.dic"\" \ |
4157 | - -DJULIUS_DICT_PATH=\""/usr/share/julius-voxforge/acoustic/"\" \ |
4158 | - -I$(top_srcdir)/libhud-client \ |
4159 | - -I$(top_srcdir) \ |
4160 | - -DHUD_CLIENT_COMPILATION \ |
4161 | - -Wall -Werror |
4162 | - |
4163 | -####################### |
4164 | -# HUD Service |
4165 | -####################### |
4166 | - |
4167 | -hud_service_SOURCES = hud-service.c |
4168 | - |
4169 | -hud_service_CFLAGS = \ |
4170 | - $(HUD_CFLAGS) \ |
4171 | - $(BAMF_CFLAGS) \ |
4172 | - $(HYBRIS_CFLAGS) \ |
4173 | - $(COVERAGE_CFLAGS) \ |
4174 | - -DDATADIR=\""$(datadir)"\" \ |
4175 | - -I$(top_srcdir)/libhud-client \ |
4176 | - -I$(top_srcdir) \ |
4177 | - -DHUD_CLIENT_COMPILATION \ |
4178 | - -Wall -Werror |
4179 | - |
4180 | -hud_service_LDADD = \ |
4181 | - libhud-service.la \ |
4182 | - libhud-service-generated.la \ |
4183 | - $(COVERAGE_LDFLAGS) \ |
4184 | - $(BAMF_LIBS) \ |
4185 | - $(HYBRIS_LIBS) \ |
4186 | - $(HUD_LIBS) |
4187 | - |
4188 | -####################### |
4189 | -# HUD Dump Application |
4190 | -####################### |
4191 | - |
4192 | -hud_dump_application_SOURCES = \ |
4193 | - dump-app-info.h \ |
4194 | - dump-app-info.c \ |
4195 | - hud-dump-application.c |
4196 | - |
4197 | -hud_dump_application_CFLAGS = \ |
4198 | - $(HUD_CFLAGS) \ |
4199 | - $(BAMF_CFLAGS) \ |
4200 | - $(HYBRIS_CFLAGS) \ |
4201 | - $(COVERAGE_CFLAGS) \ |
4202 | - -Wall -Werror |
4203 | -hud_dump_application_LDFLAGS = \ |
4204 | - $(COVERAGE_LDFLAGS) \ |
4205 | - $(BAMF_LIBS) \ |
4206 | - $(HYBRIS_LIBS) \ |
4207 | - $(HUD_LIBS) |
4208 | - |
4209 | -####################### |
4210 | -# HUD Verify App Info |
4211 | -####################### |
4212 | - |
4213 | -hud_verify_app_info_SOURCES = \ |
4214 | - create-db.h \ |
4215 | - create-db.c \ |
4216 | - load-app-info.h \ |
4217 | - load-app-info.c \ |
4218 | - hud-verify-app-info.c |
4219 | - |
4220 | -hud_verify_app_info_CFLAGS = \ |
4221 | - $(HUD_CFLAGS) \ |
4222 | - $(BAMF_CFLAGS) \ |
4223 | - $(HYBRIS_CFLAGS) \ |
4224 | - $(COVERAGE_CFLAGS) \ |
4225 | - -Wall -Werror |
4226 | -hud_verify_app_info_LDFLAGS = \ |
4227 | - $(COVERAGE_LDFLAGS) \ |
4228 | - $(BAMF_LIBS) \ |
4229 | - $(HYBRIS_LIBS) \ |
4230 | - $(HUD_LIBS) |
4231 | - |
4232 | -####################### |
4233 | -# HUD Generated Files |
4234 | -####################### |
4235 | - |
4236 | -libhud_service_generated_la_SOURCES = \ |
4237 | - create-db.h \ |
4238 | - create-db.c \ |
4239 | - app-iface.h \ |
4240 | - app-iface.c \ |
4241 | - hud-iface.h \ |
4242 | - hud-iface.c \ |
4243 | - hud-query-iface.h \ |
4244 | - hud-query-iface.c |
4245 | - |
4246 | -libhud_service_generated_la_CFLAGS = \ |
4247 | - $(HUD_CFLAGS) \ |
4248 | - $(BAMF_CFLAGS) \ |
4249 | - $(HYBRIS_CFLAGS) \ |
4250 | - -DDATADIR=\""$(datadir)"\" \ |
4251 | - -Wall -Werror |
4252 | - |
4253 | -EXTRA_DIST += \ |
4254 | - create-db.sql |
4255 | - |
4256 | -create-db.c: create-db.sql |
4257 | - echo "#include \"create-db.h\"" > $@ |
4258 | - echo -n "const gchar * create_db = \"" >> $@ |
4259 | - cat $< | xargs printf "%s " >> $@ |
4260 | - echo -n "\";" >> $@ |
4261 | - |
4262 | -BUILT_SOURCES += \ |
4263 | - create-db.c \ |
4264 | - hud-query-iface.c \ |
4265 | - hud-query-iface.h \ |
4266 | - hud-iface.c \ |
4267 | - hud-iface.h |
4268 | - |
4269 | -hud-iface.c: $(top_srcdir)/data/com.canonical.hud.xml |
4270 | - $(AM_V_GEN) gdbus-codegen \ |
4271 | - --interface-prefix com.canonical.hud. \ |
4272 | - --generate-c-code hud-iface \ |
4273 | - --c-namespace HudIface \ |
4274 | - $^ |
4275 | -hud-iface.h: hud-iface.c |
4276 | - |
4277 | -hud-query-iface.c: $(top_srcdir)/data/com.canonical.hud.query.xml |
4278 | - $(AM_V_GEN) gdbus-codegen \ |
4279 | - --interface-prefix com.canonical.hud.query. \ |
4280 | - --generate-c-code hud-query-iface \ |
4281 | - --c-namespace HudQueryIface \ |
4282 | - $^ |
4283 | -hud-query-iface.h: hud-query-iface.c |
4284 | - |
4285 | -app-iface.c: $(top_srcdir)/data/com.canonical.hud.Application.xml |
4286 | - $(AM_V_GEN) gdbus-codegen \ |
4287 | - --interface-prefix com.canonical.hud.Application. \ |
4288 | - --generate-c-code app-iface \ |
4289 | - --c-namespace AppIface \ |
4290 | - $^ |
4291 | -app-iface.h: app-iface.c |
4292 | - |
4293 | -########################## |
4294 | -# Enum Types |
4295 | -########################## |
4296 | - |
4297 | -include $(top_srcdir)/Makefile.am.enum |
4298 | - |
4299 | -glib_enum_h = enum-types.h |
4300 | -glib_enum_c = enum-types.c |
4301 | -glib_enum_headers = $(top_srcdir)/libhud-client/query.h |
4302 | - |
4303 | - |
4304 | -CLEANFILES += $(BUILT_SOURCES) |
4305 | |
4306 | === modified file 'src/abstract-app.h' |
4307 | --- src/abstract-app.h 2013-02-18 08:44:41 +0000 |
4308 | +++ src/abstract-app.h 2013-03-29 12:53:22 +0000 |
4309 | @@ -19,8 +19,6 @@ |
4310 | #ifndef __HUD_ABSTRACT_APP_H__ |
4311 | #define __HUD_ABSTRACT_APP_H__ |
4312 | |
4313 | -#include "config.h" |
4314 | - |
4315 | #ifdef HAVE_BAMF |
4316 | |
4317 | #include <libbamf/libbamf.h> |
4318 | |
4319 | === modified file 'src/hud-service.c' |
4320 | --- src/hud-service.c 2013-03-20 00:53:59 +0000 |
4321 | +++ src/hud-service.c 2013-03-29 12:53:22 +0000 |
4322 | @@ -18,8 +18,6 @@ |
4323 | |
4324 | #define G_LOG_DOMAIN "hud-service" |
4325 | |
4326 | -#include "config.h" |
4327 | - |
4328 | #include <glib.h> |
4329 | #include <gio/gio.h> |
4330 | #include <stdlib.h> |
4331 | @@ -38,6 +36,7 @@ |
4332 | #include "hud-iface.h" |
4333 | #include "shared-values.h" |
4334 | #include "hudquery.h" |
4335 | +#include "watchdog.h" |
4336 | |
4337 | /* Prototypes */ |
4338 | static void bus_method (GDBusConnection *connection, |
4339 | @@ -67,6 +66,7 @@ |
4340 | .set_property = NULL |
4341 | }; |
4342 | static HudApplicationList * application_list = NULL; |
4343 | +static HudWatchdog * watchdog = NULL; |
4344 | |
4345 | /* Get our error domain */ |
4346 | GQuark |
4347 | @@ -230,7 +230,7 @@ |
4348 | static HudQuery * |
4349 | build_query (HudSourceList * all_sources, HudApplicationList * app_list, GDBusConnection * connection, const gchar * search_string) |
4350 | { |
4351 | - HudQuery * query = hud_query_new (HUD_SOURCE(all_sources), application_list, search_string, 10, connection, ++query_count); |
4352 | + HudQuery * query = hud_query_new (HUD_SOURCE(all_sources), watchdog, application_list, search_string, 10, connection, ++query_count); |
4353 | |
4354 | g_ptr_array_add(query_list, query); |
4355 | g_object_weak_ref(G_OBJECT(query), query_destroyed, query_list); |
4356 | @@ -265,6 +265,8 @@ |
4357 | GDBusMethodInvocation *invocation, |
4358 | gpointer user_data) |
4359 | { |
4360 | + hud_watchdog_ping(watchdog); |
4361 | + |
4362 | if (g_str_equal (method_name, "CreateQuery")) { |
4363 | HudSourceList *all_sources = user_data; |
4364 | GVariant * vsearch; |
4365 | @@ -387,6 +389,7 @@ |
4366 | static GVariant * |
4367 | bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar * object_path, const gchar * interface_name, const gchar * property_name, GError ** error, gpointer user_data) |
4368 | { |
4369 | + hud_watchdog_ping(watchdog); |
4370 | // HudSource *source = user_data; |
4371 | |
4372 | if (g_str_equal(property_name, "OpenQueries")) { |
4373 | @@ -534,9 +537,13 @@ |
4374 | |
4375 | signal(SIGTERM, sigterm_graceful_exit); |
4376 | |
4377 | + watchdog = hud_watchdog_new(mainloop); |
4378 | + |
4379 | g_main_loop_run (mainloop); |
4380 | g_main_loop_unref (mainloop); |
4381 | |
4382 | + g_clear_object(&watchdog); |
4383 | + |
4384 | g_object_unref (application_list); |
4385 | g_object_unref (source_list); |
4386 | g_ptr_array_free(query_list, TRUE); |
4387 | |
4388 | === modified file 'src/huddbusmenucollector.c' |
4389 | --- src/huddbusmenucollector.c 2013-02-14 22:14:37 +0000 |
4390 | +++ src/huddbusmenucollector.c 2013-03-29 12:53:22 +0000 |
4391 | @@ -29,8 +29,6 @@ |
4392 | #include "hudsource.h" |
4393 | #include "hudkeywordmapping.h" |
4394 | |
4395 | -#include "config.h" |
4396 | - |
4397 | /** |
4398 | * SECTION:huddbusmenucollector |
4399 | * @title: HudDbusmenuCollector |
4400 | |
4401 | === modified file 'src/hudjulius.c' |
4402 | --- src/hudjulius.c 2013-02-28 10:17:55 +0000 |
4403 | +++ src/hudjulius.c 2013-03-29 12:53:22 +0000 |
4404 | @@ -14,6 +14,7 @@ |
4405 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
4406 | */ |
4407 | |
4408 | +#define _POSIX_SOURCE 1 |
4409 | #define G_LOG_DOMAIN "hudjulius" |
4410 | |
4411 | #include "hudjulius.h" |
4412 | |
4413 | === modified file 'src/hudkeywordmapping.c' |
4414 | --- src/hudkeywordmapping.c 2013-01-17 15:31:14 +0000 |
4415 | +++ src/hudkeywordmapping.c 2013-03-29 12:53:22 +0000 |
4416 | @@ -21,7 +21,6 @@ |
4417 | #include <glib/gi18n.h> |
4418 | |
4419 | #include "hudkeywordmapping.h" |
4420 | -#include "config.h" |
4421 | |
4422 | /** |
4423 | * SECTION:hudkeywordmapping |
4424 | |
4425 | === modified file 'src/hudmenumodelcollector.c' |
4426 | --- src/hudmenumodelcollector.c 2013-02-19 03:49:41 +0000 |
4427 | +++ src/hudmenumodelcollector.c 2013-03-29 12:53:22 +0000 |
4428 | @@ -24,7 +24,6 @@ |
4429 | #include "hudresult.h" |
4430 | #include "huditem.h" |
4431 | #include "hudkeywordmapping.h" |
4432 | -#include "config.h" |
4433 | #include "action-muxer.h" |
4434 | |
4435 | #include <gio/gio.h> |
4436 | |
4437 | === modified file 'src/hudquery.c' |
4438 | --- src/hudquery.c 2013-03-19 21:41:11 +0000 |
4439 | +++ src/hudquery.c 2013-03-29 12:53:22 +0000 |
4440 | @@ -30,6 +30,7 @@ |
4441 | #include "application-source.h" |
4442 | #include "application-list.h" |
4443 | #include "query-columns.h" |
4444 | +#include "watchdog.h" |
4445 | |
4446 | /** |
4447 | * SECTION:hudquery |
4448 | @@ -58,6 +59,7 @@ |
4449 | { |
4450 | GObject parent_instance; |
4451 | |
4452 | + HudWatchdog * watchdog; |
4453 | HudSource *all_sources; |
4454 | HudApplicationList *app_list; |
4455 | HudSource *current_source; |
4456 | @@ -285,6 +287,7 @@ |
4457 | { |
4458 | guint64 start_time; |
4459 | |
4460 | + hud_watchdog_ping(query->watchdog); |
4461 | start_time = g_get_monotonic_time (); |
4462 | |
4463 | dee_model_clear(query->results_model); |
4464 | @@ -416,6 +419,7 @@ |
4465 | g_clear_pointer(&query->appstack_name, g_free); |
4466 | |
4467 | g_clear_object(&query->voice); |
4468 | + g_clear_object(&query->watchdog); |
4469 | |
4470 | G_OBJECT_CLASS (hud_query_parent_class) |
4471 | ->finalize (object); |
4472 | @@ -427,6 +431,7 @@ |
4473 | { |
4474 | g_return_val_if_fail(HUD_IS_QUERY(user_data), FALSE); |
4475 | HudQuery * query = HUD_QUERY(user_data); |
4476 | + hud_watchdog_ping(query->watchdog); |
4477 | |
4478 | g_debug("Voice query is loading"); |
4479 | hud_query_iface_com_canonical_hud_query_emit_voice_query_loading ( |
4480 | @@ -496,6 +501,7 @@ |
4481 | { |
4482 | g_return_val_if_fail(HUD_IS_QUERY(user_data), FALSE); |
4483 | HudQuery * query = HUD_QUERY(user_data); |
4484 | + hud_watchdog_ping(query->watchdog); |
4485 | |
4486 | g_debug("Updating Query to: '%s'", search_string); |
4487 | |
4488 | @@ -529,6 +535,7 @@ |
4489 | { |
4490 | g_return_val_if_fail(HUD_IS_QUERY(user_data), FALSE); |
4491 | HudQuery * query = HUD_QUERY(user_data); |
4492 | + hud_watchdog_ping(query->watchdog); |
4493 | |
4494 | g_debug("Updating App to: '%s'", app_id); |
4495 | |
4496 | @@ -552,7 +559,8 @@ |
4497 | handle_execute (HudQueryIfaceComCanonicalHudQuery * skel, GDBusMethodInvocation * invocation, GVariant * command_id, guint timestamp, gpointer user_data) |
4498 | { |
4499 | g_return_val_if_fail(HUD_IS_QUERY(user_data), FALSE); |
4500 | - //HudQuery * query = HUD_QUERY(user_data); |
4501 | + HudQuery * query = HUD_QUERY(user_data); |
4502 | + hud_watchdog_ping(query->watchdog); |
4503 | |
4504 | /* Do good */ |
4505 | GVariant * inner = g_variant_get_variant(command_id); |
4506 | @@ -590,7 +598,8 @@ |
4507 | handle_parameterized (HudQueryIfaceComCanonicalHudQuery * skel, GDBusMethodInvocation * invocation, GVariant * command_id, guint timestamp, gpointer user_data) |
4508 | { |
4509 | g_return_val_if_fail(HUD_IS_QUERY(user_data), FALSE); |
4510 | - //HudQuery * query = HUD_QUERY(user_data); |
4511 | + HudQuery * query = HUD_QUERY(user_data); |
4512 | + hud_watchdog_ping(query->watchdog); |
4513 | |
4514 | GVariant * inner = g_variant_get_variant(command_id); |
4515 | guint64 id = g_variant_get_uint64(inner); |
4516 | @@ -642,6 +651,7 @@ |
4517 | { |
4518 | g_return_val_if_fail(HUD_IS_QUERY(user_data), FALSE); |
4519 | HudQuery * query = HUD_QUERY(user_data); |
4520 | + hud_watchdog_ping(query->watchdog); |
4521 | |
4522 | HudClientQueryToolbarItems item = hud_client_query_toolbar_items_get_value_from_nick(arg_item); |
4523 | |
4524 | @@ -693,6 +703,7 @@ |
4525 | { |
4526 | g_return_val_if_fail(HUD_IS_QUERY(user_data), FALSE); |
4527 | HudQuery * query = HUD_QUERY(user_data); |
4528 | + hud_watchdog_ping(query->watchdog); |
4529 | |
4530 | /* Close the query */ |
4531 | hud_query_close(query); |
4532 | @@ -795,6 +806,7 @@ |
4533 | **/ |
4534 | HudQuery * |
4535 | hud_query_new (HudSource *all_sources, |
4536 | + HudWatchdog *watchdog, |
4537 | HudApplicationList *application_list, |
4538 | const gchar *search_string, |
4539 | gint num_results, |
4540 | @@ -811,6 +823,10 @@ |
4541 | query->app_list = g_object_ref (application_list); |
4542 | query->search_string = g_strdup (search_string); |
4543 | query->token_list = NULL; |
4544 | + |
4545 | + if (watchdog != NULL) { |
4546 | + query->watchdog = g_object_ref(watchdog); |
4547 | + } |
4548 | |
4549 | if (query->search_string[0] != '\0') { |
4550 | query->token_list = hud_token_list_new_from_string (query->search_string); |
4551 | |
4552 | === modified file 'src/hudquery.h' |
4553 | --- src/hudquery.h 2013-02-27 17:35:32 +0000 |
4554 | +++ src/hudquery.h 2013-03-29 12:53:22 +0000 |
4555 | @@ -22,6 +22,7 @@ |
4556 | #include "hudsource.h" |
4557 | #include "hudresult.h" |
4558 | #include "application-list.h" |
4559 | +#include "watchdog.h" |
4560 | |
4561 | #define HUD_TYPE_QUERY (hud_query_get_type ()) |
4562 | #define HUD_QUERY(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ |
4563 | @@ -36,6 +37,7 @@ |
4564 | GType hud_query_get_type (void); |
4565 | |
4566 | HudQuery * hud_query_new (HudSource *all_sources, |
4567 | + HudWatchdog * watchdog, |
4568 | HudApplicationList * application_list, |
4569 | const gchar *search_string, |
4570 | gint num_results, |
4571 | |
4572 | === modified file 'src/hudsource.h' |
4573 | --- src/hudsource.h 2013-02-15 13:40:44 +0000 |
4574 | +++ src/hudsource.h 2013-03-29 12:53:22 +0000 |
4575 | @@ -22,6 +22,7 @@ |
4576 | #include "huditem.h" |
4577 | #include "hudresult.h" |
4578 | #include "enum-types.h" |
4579 | +#include <libhud-client/hud-client.h> |
4580 | |
4581 | #define HUD_TYPE_SOURCE (hud_source_get_type ()) |
4582 | #define HUD_SOURCE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ |
4583 | |
4584 | === added file 'src/watchdog.c' |
4585 | --- src/watchdog.c 1970-01-01 00:00:00 +0000 |
4586 | +++ src/watchdog.c 2013-03-29 12:53:22 +0000 |
4587 | @@ -0,0 +1,178 @@ |
4588 | +/* |
4589 | + * Copyright © 2013 Canonical Ltd. |
4590 | + * |
4591 | + * This program is free software: you can redistribute it and/or modify it |
4592 | + * under the terms of the GNU General Public License version 3, as |
4593 | + * published by the Free Software Foundation. |
4594 | + * |
4595 | + * This program is distributed in the hope that it will be useful, but |
4596 | + * WITHOUT ANY WARRANTY; without even the implied warranties of |
4597 | + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
4598 | + * PURPOSE. See the GNU General Public License for more details. |
4599 | + * |
4600 | + * You should have received a copy of the GNU General Public License along |
4601 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
4602 | + * |
4603 | + */ |
4604 | + |
4605 | +#ifdef HAVE_CONFIG_H |
4606 | +#include "config.h" |
4607 | +#endif |
4608 | + |
4609 | +#include <stdlib.h> |
4610 | +#include "watchdog.h" |
4611 | + |
4612 | +#define DEFAULT_TIMEOUT 600 /* seconds, or 10 minutes */ |
4613 | + |
4614 | +typedef struct _HudWatchdogPrivate HudWatchdogPrivate; |
4615 | +struct _HudWatchdogPrivate { |
4616 | + guint timeout; |
4617 | + gulong timer; |
4618 | + GMainLoop * loop; |
4619 | +}; |
4620 | + |
4621 | +#define HUD_WATCHDOG_GET_PRIVATE(o) \ |
4622 | +(G_TYPE_INSTANCE_GET_PRIVATE ((o), HUD_WATCHDOG_TYPE, HudWatchdogPrivate)) |
4623 | + |
4624 | +static void hud_watchdog_class_init (HudWatchdogClass *klass); |
4625 | +static void hud_watchdog_init (HudWatchdog *self); |
4626 | +static void hud_watchdog_dispose (GObject *object); |
4627 | +static void hud_watchdog_finalize (GObject *object); |
4628 | +static gboolean fire_watchdog (gpointer user_data); |
4629 | + |
4630 | +G_DEFINE_TYPE (HudWatchdog, hud_watchdog, G_TYPE_OBJECT); |
4631 | + |
4632 | +static void |
4633 | +hud_watchdog_class_init (HudWatchdogClass *klass) |
4634 | +{ |
4635 | + GObjectClass *object_class = G_OBJECT_CLASS (klass); |
4636 | + |
4637 | + g_type_class_add_private (klass, sizeof (HudWatchdogPrivate)); |
4638 | + |
4639 | + object_class->dispose = hud_watchdog_dispose; |
4640 | + object_class->finalize = hud_watchdog_finalize; |
4641 | + |
4642 | + return; |
4643 | +} |
4644 | + |
4645 | +static void |
4646 | +hud_watchdog_init (HudWatchdog *self) |
4647 | +{ |
4648 | + self->priv = HUD_WATCHDOG_GET_PRIVATE(self); |
4649 | + |
4650 | + const gchar * envvar = g_getenv("HUD_SERVICE_TIMEOUT"); |
4651 | + if (envvar == NULL) { |
4652 | + self->priv->timeout = DEFAULT_TIMEOUT; |
4653 | + } else { |
4654 | + self->priv->timeout = atoi(envvar); |
4655 | + } |
4656 | + |
4657 | + if (self->priv->timeout != 0) { |
4658 | + self->priv->timer = g_timeout_add_seconds(self->priv->timeout, fire_watchdog, self); |
4659 | + } |
4660 | + |
4661 | + return; |
4662 | +} |
4663 | + |
4664 | +static void |
4665 | +hud_watchdog_dispose (GObject *object) |
4666 | +{ |
4667 | + HudWatchdog * self = HUD_WATCHDOG(object); |
4668 | + |
4669 | + if (self->priv->timer != 0) { |
4670 | + g_source_remove(self->priv->timer); |
4671 | + self->priv->timer = 0; |
4672 | + } |
4673 | + |
4674 | + G_OBJECT_CLASS (hud_watchdog_parent_class)->dispose (object); |
4675 | + return; |
4676 | +} |
4677 | + |
4678 | +static void |
4679 | +hud_watchdog_finalize (GObject *object) |
4680 | +{ |
4681 | + |
4682 | + G_OBJECT_CLASS (hud_watchdog_parent_class)->finalize (object); |
4683 | + return; |
4684 | +} |
4685 | + |
4686 | +/* Oh noes! It's our time to go! Do this! */ |
4687 | +static gboolean |
4688 | +fire_watchdog (gpointer user_data) |
4689 | +{ |
4690 | + g_return_val_if_fail(IS_HUD_WATCHDOG(user_data), TRUE); |
4691 | + HudWatchdog * self = HUD_WATCHDOG(user_data); |
4692 | + |
4693 | + g_debug("Firing Watchdog"); |
4694 | + |
4695 | + if (self->priv->loop != NULL) { |
4696 | + g_main_loop_quit(self->priv->loop); |
4697 | + } |
4698 | + |
4699 | + return FALSE; |
4700 | +} |
4701 | + |
4702 | +/** |
4703 | + * hud_watchdog_new: |
4704 | + * @loop: Mainloop to quit if we timeout |
4705 | + * |
4706 | + * Sets up a watchdog that will quit on the main loop if it |
4707 | + * doesn't get enough attention. Reminds of an girlfriend |
4708 | + * I had once... |
4709 | + * |
4710 | + * Return value: (transfer full): A new #HudWatchdog object |
4711 | + */ |
4712 | +HudWatchdog * |
4713 | +hud_watchdog_new (GMainLoop * loop) |
4714 | +{ |
4715 | + HudWatchdog * watchdog = g_object_new(HUD_WATCHDOG_TYPE, NULL); |
4716 | + |
4717 | + watchdog->priv->loop = loop; |
4718 | + |
4719 | + return watchdog; |
4720 | +} |
4721 | + |
4722 | +/** |
4723 | + * hud_watchdog_ping: |
4724 | + * @watchdog: Watchdog to give attention to |
4725 | + * |
4726 | + * Makes sure to startover and not timeout. |
4727 | + */ |
4728 | +void |
4729 | +hud_watchdog_ping (HudWatchdog * watchdog) |
4730 | +{ |
4731 | + /* Doing a silent fail on NULL so that our tests can not worry about |
4732 | + setting up dummy watchdogs when just testing the query. They have |
4733 | + their own timeouts */ |
4734 | + if (watchdog == NULL) { |
4735 | + return; |
4736 | + } |
4737 | + |
4738 | + g_return_if_fail(IS_HUD_WATCHDOG(watchdog)); |
4739 | + |
4740 | + if (watchdog->priv->timer != 0) { |
4741 | + g_source_remove(watchdog->priv->timer); |
4742 | + watchdog->priv->timer = 0; |
4743 | + } |
4744 | + |
4745 | + if (watchdog->priv->timeout != 0) { |
4746 | + watchdog->priv->timer = g_timeout_add_seconds(watchdog->priv->timeout, fire_watchdog, watchdog); |
4747 | + } |
4748 | + return; |
4749 | +} |
4750 | + |
4751 | +/** |
4752 | + * hud_watchdog_get_timeout: |
4753 | + * @watchdog: Watchdog to interegate |
4754 | + * |
4755 | + * Get the timeout of this watchdog. |
4756 | + * |
4757 | + * Return value: The number of seconds before it goes off |
4758 | + */ |
4759 | +guint |
4760 | +hud_watchdog_get_timeout (HudWatchdog * watchdog) |
4761 | +{ |
4762 | + g_return_val_if_fail(IS_HUD_WATCHDOG(watchdog), 0); |
4763 | + |
4764 | + return watchdog->priv->timeout; |
4765 | +} |
4766 | |
4767 | === added file 'src/watchdog.h' |
4768 | --- src/watchdog.h 1970-01-01 00:00:00 +0000 |
4769 | +++ src/watchdog.h 2013-03-29 12:53:22 +0000 |
4770 | @@ -0,0 +1,53 @@ |
4771 | +/* |
4772 | + * Copyright © 2013 Canonical Ltd. |
4773 | + * |
4774 | + * This program is free software: you can redistribute it and/or modify it |
4775 | + * under the terms of the GNU General Public License version 3, as |
4776 | + * published by the Free Software Foundation. |
4777 | + * |
4778 | + * This program is distributed in the hope that it will be useful, but |
4779 | + * WITHOUT ANY WARRANTY; without even the implied warranties of |
4780 | + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
4781 | + * PURPOSE. See the GNU General Public License for more details. |
4782 | + * |
4783 | + * You should have received a copy of the GNU General Public License along |
4784 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
4785 | + * |
4786 | + */ |
4787 | + |
4788 | +#ifndef __HUD_WATCHDOG_H__ |
4789 | +#define __HUD_WATCHDOG_H__ |
4790 | + |
4791 | +#include <glib-object.h> |
4792 | + |
4793 | +G_BEGIN_DECLS |
4794 | + |
4795 | +#define HUD_WATCHDOG_TYPE (hud_watchdog_get_type ()) |
4796 | +#define HUD_WATCHDOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HUD_WATCHDOG_TYPE, HudWatchdog)) |
4797 | +#define HUD_WATCHDOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HUD_WATCHDOG_TYPE, HudWatchdogClass)) |
4798 | +#define IS_HUD_WATCHDOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HUD_WATCHDOG_TYPE)) |
4799 | +#define IS_HUD_WATCHDOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HUD_WATCHDOG_TYPE)) |
4800 | +#define HUD_WATCHDOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HUD_WATCHDOG_TYPE, HudWatchdogClass)) |
4801 | + |
4802 | +typedef struct _HudWatchdog HudWatchdog; |
4803 | +typedef struct _HudWatchdogClass HudWatchdogClass; |
4804 | +typedef struct _HudWatchdogPrivate HudWatchdogPrivate; |
4805 | + |
4806 | +struct _HudWatchdogClass { |
4807 | + GObjectClass parent_class; |
4808 | +}; |
4809 | + |
4810 | +struct _HudWatchdog { |
4811 | + GObject parent; |
4812 | + HudWatchdogPrivate * priv; |
4813 | +}; |
4814 | + |
4815 | +GType hud_watchdog_get_type (void); |
4816 | + |
4817 | +HudWatchdog * hud_watchdog_new (GMainLoop * loop); |
4818 | +void hud_watchdog_ping (HudWatchdog * watchdog); |
4819 | +guint hud_watchdog_get_timeout (HudWatchdog * watchdog); |
4820 | + |
4821 | +G_END_DECLS |
4822 | + |
4823 | +#endif |
4824 | |
4825 | === added file 'tests/CMakeLists.txt' |
4826 | --- tests/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
4827 | +++ tests/CMakeLists.txt 2013-03-29 12:53:22 +0000 |
4828 | @@ -0,0 +1,175 @@ |
4829 | +include_directories(${HUD_SERVICE_INCLUDE_DIRS}) |
4830 | +include_directories(${HUD_CLIENT_INCLUDE_DIRS}) |
4831 | + |
4832 | +####################### |
4833 | +# Dbus JSON Loader |
4834 | +####################### |
4835 | + |
4836 | +add_definitions(-DDBUSMENU_JSON_LOADER="${CMAKE_CURRENT_BINARY_DIR}/dbusmenu-json-loader") |
4837 | + |
4838 | +add_executable(dbusmenu-json-loader dbusmenu-json-loader.c) |
4839 | +target_link_libraries(dbusmenu-json-loader |
4840 | +${DBUSMENU_JSONLOADER_LIBRARIES} |
4841 | +) |
4842 | + |
4843 | +####################### |
4844 | +# Menu input model deep |
4845 | +####################### |
4846 | + |
4847 | +add_definitions(-DMODEL_DEEP="${CMAKE_CURRENT_BINARY_DIR}/test-menu-input-model-deep") |
4848 | + |
4849 | +add_executable(test-menu-input-model-deep test-menu-input-model-deep.c) |
4850 | +target_link_libraries(test-menu-input-model-deep |
4851 | + ${GOBJECT2_LIBRARIES} |
4852 | + ${GIO2_LIBRARIES} |
4853 | +) |
4854 | + |
4855 | +######################### |
4856 | +# Menu input model simple |
4857 | +######################### |
4858 | + |
4859 | +add_definitions(-DMODEL_SIMPLE="${CMAKE_CURRENT_BINARY_DIR}/test-menu-input-model-simple") |
4860 | + |
4861 | +add_executable(test-menu-input-model-simple test-menu-input-model-simple.c) |
4862 | +target_link_libraries(test-menu-input-model-simple |
4863 | + ${GOBJECT2_LIBRARIES} |
4864 | + ${GIO2_LIBRARIES} |
4865 | +) |
4866 | + |
4867 | +############################ |
4868 | +# Menu input model shortcuts |
4869 | +############################ |
4870 | + |
4871 | +add_definitions(-DMODEL_SHORTCUTS="${CMAKE_CURRENT_BINARY_DIR}/test-menu-input-model-shortcuts") |
4872 | + |
4873 | +add_executable(test-menu-input-model-shortcuts test-menu-input-model-shortcuts.c) |
4874 | +target_link_libraries(test-menu-input-model-shortcuts |
4875 | + ${GOBJECT2_LIBRARIES} |
4876 | + ${GIO2_LIBRARIES} |
4877 | +) |
4878 | + |
4879 | +####################### |
4880 | +# TEST MACRO |
4881 | +####################### |
4882 | + |
4883 | +macro(hudtest tname tfilename rfilename) |
4884 | + add_executable(${tname} ${tfilename}) |
4885 | + target_link_libraries(${tname} |
4886 | + hud-service |
4887 | + hud-test |
4888 | + ) |
4889 | + add_test(${tname} |
4890 | + "${CMAKE_CURRENT_SOURCE_DIR}/test-runner.sh" |
4891 | + "${CMAKE_CURRENT_SOURCE_DIR}" |
4892 | + "${CMAKE_CURRENT_BINARY_DIR}" |
4893 | + "${CMAKE_CURRENT_BINARY_DIR}/${tname}" |
4894 | + "${CMAKE_CURRENT_BINARY_DIR}/${rfilename}" |
4895 | + ) |
4896 | +endmacro() |
4897 | + |
4898 | +####################### |
4899 | +# HUD Test Common Code |
4900 | +####################### |
4901 | + |
4902 | +set(HUD_TEST_HEADERS |
4903 | +app-list-dummy.h |
4904 | +word-list.h |
4905 | +hudrandomsource.h |
4906 | +hudmanualsource.h |
4907 | +hudtestutils.h |
4908 | +) |
4909 | + |
4910 | +set(HUD_TEST_SOURCES |
4911 | +app-list-dummy.c |
4912 | +hudrandomsource.c |
4913 | +hudmanualsource.c |
4914 | +hudtestutils.c |
4915 | +) |
4916 | + |
4917 | +add_library(hud-test STATIC ${HUD_TEST_SOURCES}) |
4918 | + |
4919 | +target_link_libraries(hud-test |
4920 | +hud-service |
4921 | +${DBUSTEST_LIBRARIES} |
4922 | +) |
4923 | + |
4924 | +####################### |
4925 | +# Test Fixtures |
4926 | +####################### |
4927 | + |
4928 | +add_definitions(-DJSON_SIMPLE="${CMAKE_CURRENT_SOURCE_DIR}/test-menu-input-simple.json") |
4929 | +add_definitions(-DJSON_SHORTCUTS="${CMAKE_CURRENT_SOURCE_DIR}/test-menu-input-shortcuts.json") |
4930 | + |
4931 | +####################### |
4932 | +# Generated test fixtures |
4933 | +####################### |
4934 | + |
4935 | +find_package(Gettext) |
4936 | + |
4937 | +set(KEYWORD_LOCALE_DIR "${CMAKE_CURRENT_BINARY_DIR}/keyword-mapping/locale") |
4938 | +add_definitions(-DKEYWORD_LOCALE_DIR="${KEYWORD_LOCALE_DIR}") |
4939 | +add_custom_command( |
4940 | + OUTPUT |
4941 | + "${KEYWORD_LOCALE_DIR}/en_FAKELANG/LC_MESSAGES" |
4942 | + "${KEYWORD_LOCALE_DIR}/en_FAKELANG/LC_MESSAGES/gnome-terminal.mo" |
4943 | + COMMAND |
4944 | + mkdir -p "${KEYWORD_LOCALE_DIR}/en_FAKELANG/LC_MESSAGES" |
4945 | + COMMAND |
4946 | + "${GETTEXT_MSGFMT_EXECUTABLE}" |
4947 | + --check |
4948 | + --output-file "${KEYWORD_LOCALE_DIR}/en_FAKELANG/LC_MESSAGES/gnome-terminal.mo" |
4949 | + "${CMAKE_CURRENT_SOURCE_DIR}/keyword-mapping/gnome-terminal-en_FAKELANG.po" |
4950 | + VERBATIM |
4951 | +) |
4952 | +add_custom_target(keyword-files DEPENDS "${KEYWORD_LOCALE_DIR}/en_FAKELANG/LC_MESSAGES/gnome-terminal.mo") |
4953 | + |
4954 | +####################### |
4955 | +# HUD Test Suite |
4956 | +####################### |
4957 | + |
4958 | +hudtest(test-watchdog test-watchdog.c test-watchdog.xml) |
4959 | +hudtest(test-distance test-distance.c test-distance.xml) |
4960 | +hudtest(test-hud-item test-huditem.c test-hud-item.xml) |
4961 | +hudtest(test-result-highlighting test-result-highlighting.c test-result-highlighting.xml) |
4962 | +hudtest(test-menu-input test-menu-input.c test-menu-input.xml) |
4963 | +hudtest(test-keyword-mapping test-keyword-mapping.c test-keyword-mapping.xml) |
4964 | +add_dependencies(test-keyword-mapping keyword-files) |
4965 | +hudtest(test-string-list test-string-list.c test-string-list.xml) |
4966 | +hudtest(test-pronounce-dict test-pronounce-dict.c test-pronounce-dict.xml) |
4967 | +hudtest(test-source test-source.c test-source.xml) |
4968 | +hudtest(test-app-indicator-source test-app-indicator-source.c test-app-indicator-source.xml) |
4969 | +hudtest(test-indicator-source test-indicator-source.c test-indicator-source.xml) |
4970 | +hudtest(test-application-list test-application-list.c test-application-list.xml) |
4971 | +#test-usage-db-simple.xml |
4972 | +#test-usage-db-old.xml |
4973 | +#test-usage-db-testapp.xml |
4974 | +#test-usage-db-off.xml |
4975 | +#test-bad-app-info-dual-header |
4976 | +#test-bad-app-info-item-no-count |
4977 | +#test-bad-app-info-item-no-name |
4978 | +#test-bad-app-info-menu-no-name |
4979 | +#test-bad-app-info-missing-desktop |
4980 | +#test-bad-app-info-missing-menus |
4981 | +#test-bad-app-info-multiple-menus |
4982 | +#test-good-app-info-tons-of-entries |
4983 | +#test-dbus-message-count |
4984 | + |
4985 | +####################### |
4986 | +# Slow test |
4987 | +####################### |
4988 | + |
4989 | +add_executable(hud-performance hud-performance.c) |
4990 | +target_link_libraries(hud-performance |
4991 | + hud-service |
4992 | + hud-test |
4993 | + ${GIO2_LIBRARIES} |
4994 | +) |
4995 | +if(${enable_scalability_tests}) |
4996 | + add_test(hud-performance |
4997 | + "${CMAKE_CURRENT_SOURCE_DIR}/test-runner.sh" |
4998 | + "${CMAKE_CURRENT_SOURCE_DIR}" |
4999 | + "${CMAKE_CURRENT_BINARY_DIR}/hud-performance" |
5000 | + "${CMAKE_CURRENT_BINARY_DIR}/hud-performance.xml" |
The diff has been truncated for viewing.
FAILED: Continuous integration, rev:373 s-jenkins: 8080/job/ hud-small- ci/272/ s-jenkins: 8080/job/ hud-small- ci/./build= pbuilder, distribution= quantal, flavor= i386/272/ console
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ hud-small- ci/272/ rebuild
http://