[tracker/wip/sam/meson: 87/90] WIP: Meson build instructions for Tracker
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/sam/meson: 87/90] WIP: Meson build instructions for Tracker
- Date: Thu, 1 Dec 2016 11:02:10 +0000 (UTC)
commit 68aa84d1417824d18a95deeed4fd7038399999b3
Author: Sam Thursfield <ssssam gmail com>
Date: Sun Mar 27 14:31:41 2016 +0100
WIP: Meson build instructions for Tracker
See <http://mesonbuild.com/> for information about Meson.
These build instructions are incomplete right now, but a lot of stuff is
working already. Try the 'test' target.
.gitignore | 1 +
config.h.meson.in | 447 +++++++++++++++++++++++++
docs/manpages/meson.build | 25 ++
docs/meson.build | 3 +
docs/reference/libtracker-control/meson.build | 8 +
docs/reference/libtracker-miner/meson.build | 8 +
docs/reference/libtracker-sparql/meson.build | 8 +
docs/reference/meson.build | 4 +
docs/reference/ontology/meson.build | 13 +
docs/tools/meson.build | 18 +
examples/libtracker-miner/meson.build | 7 +
examples/libtracker-sparql/meson.build | 7 +
examples/meson.build | 2 +
meson.build | 376 +++++++++++++++++++++
meson_options.txt | 15 +
po/meson.build | 6 +
src/gvdb/meson.build | 14 +
src/libtracker-bus/meson.build | 26 ++
src/libtracker-common/meson.build | 37 ++
src/libtracker-data/meson.build | 69 ++++
src/libtracker-direct/meson.build | 24 ++
src/libtracker-extract/meson.build | 45 +++
src/libtracker-fts/meson.build | 23 ++
src/libtracker-miner/meson.build | 72 ++++
src/libtracker-sparql-backend/meson.build | 8 +
src/libtracker-sparql/meson.build | 35 ++
src/meson.build | 29 ++
src/tracker-needle/meson.build | 20 ++
tests/common/meson.build | 15 +
tests/functional-tests/ipc/meson.build | 53 +++
tests/functional-tests/meson.build | 39 +++
tests/gvdb/meson.build | 7 +
tests/libtracker-common/meson.build | 61 ++++
tests/libtracker-data/meson.build | 47 +++
tests/libtracker-extract/meson.build | 60 ++++
tests/libtracker-fts/meson.build | 13 +
tests/libtracker-miner/meson.build | 69 ++++
tests/libtracker-sparql/meson.build | 19 +
tests/meson.build | 26 ++
tests/tracker-steroids/meson.build | 7 +
utils/meson.build | 3 +
utils/mtp/meson.build | 2 +
utils/ontology/meson.build | 7 +
utils/tracker-resdump/meson.build | 2 +
44 files changed, 1780 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a3b31cb..f7c26f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,7 @@
.deps
.libs
config.*
+!config.h.meson.in
ABOUT-NLS
aclocal.m4
autom4te.cache
diff --git a/config.h.meson.in b/config.h.meson.in
new file mode 100644
index 0000000..146aca7
--- /dev/null
+++ b/config.h.meson.in
@@ -0,0 +1,447 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Extras added manually */
+#mesondefine LOCALEDIR
+#mesondefine SHAREDIR
+#mesondefine TRACKER_MINERS_DIR
+#mesondefine TRACKER_UI_DIR
+
+/* Define if we disable the journal */
+#mesondefine DISABLE_JOURNAL
+
+/* Include functional tests in the installation */
+#mesondefine DIST_FUNCTIONAL_TESTS
+
+/* Use new evolution-shell API */
+#mesondefine EVOLUTION_SHELL_2_91
+
+/* Use new evolution-shell API */
+#mesondefine EVOLUTION_SHELL_3_2
+
+/* Use new evolution-shell API */
+#mesondefine EVOLUTION_SHELL_3_3_5
+
+/* Define the gettext package to be used */
+#mesondefine GETTEXT_PACKAGE
+
+/* Define that GStreamer Discoverer should be used */
+#mesondefine GSTREAMER_BACKEND_DISCOVERER
+
+/* Define that GUPnP-DLNA should be used */
+#mesondefine GSTREAMER_BACKEND_GUPNP_DLNA
+
+/* Guarantee existence of some metadata */
+#mesondefine GUARANTEE_METADATA
+
+/* Define if we have AbiWord extractor */
+#mesondefine HAVE_ABIWORD
+
+/* Define to 1 if you have the `alarm' function. */
+#mesondefine HAVE_ALARM
+
+/* Define if we should install artwork */
+#mesondefine HAVE_ARTWORK
+
+/* Defined if Sqlite has FTS5 compiled in */
+#mesondefine HAVE_BUILTIN_FTS
+
+/* Define to 1 if you have the declaration of `posix_fadvise', and to 0 if you
+ don't. */
+#mesondefine HAVE_DECL_POSIX_FADVISE
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#mesondefine HAVE_DLFCN_H
+
+/* Define if we have DVI extractor */
+#mesondefine HAVE_DVI
+
+/* Enca language detection aid */
+#mesondefine HAVE_ENCA
+
+/* Define if we have exempi */
+#mesondefine HAVE_EXEMPI
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#mesondefine HAVE_FCNTL_H
+
+/* Define to 1 if you have the <float.h> header file. */
+#mesondefine HAVE_FLOAT_H
+
+/* Define to 1 if you have the `ftruncate' function. */
+#mesondefine HAVE_FTRUNCATE
+
+/* Define to 1 if you have the `getline' function. */
+#mesondefine HAVE_GETLINE
+
+/* Define to 1 if you have the `getpagesize' function. */
+#mesondefine HAVE_GETPAGESIZE
+
+/* Define if we have GStreamer */
+#mesondefine HAVE_GSTREAMER
+
+/* Define if we have HAL */
+#mesondefine HAVE_HAL
+
+/* Define if we have ICON extractor */
+#mesondefine HAVE_ICON
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#mesondefine HAVE_INTTYPES_H
+
+/* Define if we have libav */
+#mesondefine HAVE_LIBAV
+
+/* Define if we have libcue */
+#mesondefine HAVE_LIBCUE
+
+/* Define if we have libcue 2 or up */
+#mesondefine HAVE_LIBCUE2
+
+/* Define if we have libexif */
+#mesondefine HAVE_LIBEXIF
+
+/* Define if we have libflac */
+#mesondefine HAVE_LIBFLAC
+
+/* Define if we have libgif */
+#mesondefine HAVE_LIBGIF
+
+/* Define if we have libgsf */
+#mesondefine HAVE_LIBGSF
+
+/* Define if we have libgxps */
+#mesondefine HAVE_LIBGXPS
+
+/* libicu Unicode support library */
+#mesondefine HAVE_LIBICU
+
+/* ICU language detection aid */
+#mesondefine HAVE_LIBICU_CHARSET_DETECTION
+
+/* Define if we have libiptcdata */
+#mesondefine HAVE_LIBIPTCDATA
+
+/* Define if we have libjpeg */
+#mesondefine HAVE_LIBJPEG
+
+/* Define to 1 if you have the `m' library (-lm). */
+#mesondefine HAVE_LIBM
+
+/* Define if we have libmediaart */
+#mesondefine HAVE_LIBMEDIAART
+
+/* Define if we have libosinfo */
+#mesondefine HAVE_LIBOSINFO
+
+/* Define if we have libpng */
+#mesondefine HAVE_LIBPNG
+
+/* Define to 1 if you have the `sqlite3' library (-lsqlite3). */
+#mesondefine HAVE_LIBSQLITE3
+
+/* Define if we have libstemmer */
+#mesondefine HAVE_LIBSTEMMER
+
+/* Define if we have libtiff */
+#mesondefine HAVE_LIBTIFF
+
+/* libunistring Unicode support library */
+#mesondefine HAVE_LIBUNISTRING
+
+/* Define if we have libvorbis */
+#mesondefine HAVE_LIBVORBIS
+
+/* Define if we have libxml2 */
+#mesondefine HAVE_LIBXML2
+
+/* Define to 1 if you have the <limits.h> header file. */
+#mesondefine HAVE_LIMITS_H
+
+/* Define to 1 if you have the <locale.h> header file. */
+#mesondefine HAVE_LOCALE_H
+
+/* Define if we enable Maemo specific features */
+#mesondefine HAVE_MAEMO
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+ to 0 otherwise. */
+#mesondefine HAVE_MALLOC
+
+/* Define if we have meegotouch */
+#mesondefine HAVE_MEEGOTOUCH
+
+/* Define to 1 if you have the `memchr' function. */
+#mesondefine HAVE_MEMCHR
+
+/* Define to 1 if you have the `memmove' function. */
+#mesondefine HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#mesondefine HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#mesondefine HAVE_MEMSET
+
+/* Define to 1 if you have a working `mmap' system call. */
+#mesondefine HAVE_MMAP
+
+/* Define to 1 if you have the `modf' function. */
+#mesondefine HAVE_MODF
+
+/* Define if we have MP3 extractor */
+#mesondefine HAVE_MP3
+
+/* Define to 1 if you have the `munmap' function. */
+#mesondefine HAVE_MUNMAP
+
+/* Define if we have NetworkManager for network status detection */
+#mesondefine HAVE_NETWORK_MANAGER
+
+/* Define if we have poppler-glib */
+#mesondefine HAVE_POPPLER
+
+/* Define to 1 if you have the `posix_fadvise' function. */
+#mesondefine HAVE_POSIX_FADVISE
+
+/* Define if we have PS extractor */
+#mesondefine HAVE_PS
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+ and to 0 otherwise. */
+#mesondefine HAVE_REALLOC
+
+/* Define to 1 if you have the `setlocale' function. */
+#mesondefine HAVE_SETLOCALE
+
+/* Define to 1 if you have the <sqlite3.h> header file. */
+#mesondefine HAVE_SQLITE3_H
+
+/* Define to 1 if you have the `sqrt' function. */
+#mesondefine HAVE_SQRT
+
+/* Define to 1 if you have the `statvfs64' function. */
+#mesondefine HAVE_STATVFS64
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#mesondefine HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#mesondefine HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#mesondefine HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#mesondefine HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strchr' function. */
+#mesondefine HAVE_STRCHR
+
+/* Define to 1 if you have the `strcspn' function. */
+#mesondefine HAVE_STRCSPN
+
+/* Define to 1 if you have the <strings.h> header file. */
+#mesondefine HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#mesondefine HAVE_STRING_H
+
+/* Define to 1 if you have the `strndup' function. */
+#mesondefine HAVE_STRNDUP
+
+/* Define to 1 if you have the `strnlen' function. */
+#mesondefine HAVE_STRNLEN
+
+/* Define to 1 if you have the `strrchr' function. */
+#mesondefine HAVE_STRRCHR
+
+/* Define to 1 if you have the `strstr' function. */
+#mesondefine HAVE_STRSTR
+
+/* Define to 1 if you have the `strtoul' function. */
+#mesondefine HAVE_STRTOUL
+
+/* Define to 1 if you have the `strtoull' function. */
+#mesondefine HAVE_STRTOULL
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#mesondefine HAVE_SYS_FILE_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#mesondefine HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#mesondefine HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/statfs.h> header file. */
+#mesondefine HAVE_SYS_STATFS_H
+
+/* Define to 1 if you have the <sys/statvfs.h> header file. */
+#mesondefine HAVE_SYS_STATVFS_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#mesondefine HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#mesondefine HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#mesondefine HAVE_SYS_TYPES_H
+
+/* Define if we have text extractor */
+#mesondefine HAVE_TEXT
+
+/* Define if we have Totem PL parser */
+#mesondefine HAVE_TOTEM_PL_PARSER
+
+/* Define to 0 if tracker FTS is not compiled */
+#mesondefine HAVE_TRACKER_FTS
+
+/* Define to 0 if tracker-needle is not compiled */
+#mesondefine HAVE_TRACKER_NEEDLE
+
+/* Define to 1 if you have the `tzset' function. */
+#mesondefine HAVE_TZSET
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#mesondefine HAVE_UNISTD_H
+
+/* Define if we have GLib unit test framework */
+#mesondefine HAVE_UNIT_TEST
+
+/* Define if we have UPOWER */
+#mesondefine HAVE_UPOWER
+
+/* Define to 1 if you have the `up_client_get_on_low_battery' function. */
+#mesondefine HAVE_UP_CLIENT_GET_ON_LOW_BATTERY
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#mesondefine LT_OBJDIR
+
+/* Define if we are on win32 */
+#mesondefine OS_WIN32
+
+/* Define to the address where bug reports for this package should be sent. */
+#mesondefine PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#mesondefine PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#mesondefine PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#mesondefine PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#mesondefine PACKAGE_URL
+
+/* Define to the version of this package. */
+#mesondefine PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#mesondefine STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#mesondefine TIME_WITH_SYS_TIME
+
+/* Define to the Tracker binary age */
+#mesondefine TRACKER_BINARY_AGE
+
+/* Define to the Tracker interface age */
+#mesondefine TRACKER_INTERFACE_AGE
+
+/* Define to the Tracker major version */
+#mesondefine TRACKER_MAJOR_VERSION
+
+/* Define to the Tracker micro version */
+#mesondefine TRACKER_MICRO_VERSION
+
+/* Define to the Tracker minor version */
+#mesondefine TRACKER_MINOR_VERSION
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Unzip ps.gz files */
+#mesondefine USING_UNZIPPSFILES
+
+/* Define to 1 if on MINIX. */
+#mesondefine _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#mesondefine _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#mesondefine _POSIX_SOURCE
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#mesondefine _UINT32_T
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#mesondefine _UINT8_T
+
+/* Defined for compilers not supporting __FUNCTION__ */
+#mesondefine __FUNCTION__
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#mesondefine inline
+#endif
+
+/* Define to the type of a signed integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+#mesondefine int32_t
+
+/* Define to the type of a signed integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+#mesondefine int64_t
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#mesondefine malloc
+
+/* Define to `int' if <sys/types.h> does not define. */
+#mesondefine pid_t
+
+/* Define to rpl_realloc if the replacement function should be used. */
+#mesondefine realloc
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#mesondefine size_t
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+ such a type exists and the standard includes do not define it. */
+#mesondefine uint16_t
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+#mesondefine uint32_t
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+ such a type exists and the standard includes do not define it. */
+#mesondefine uint8_t
diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build
new file mode 100644
index 0000000..50317f7
--- /dev/null
+++ b/docs/manpages/meson.build
@@ -0,0 +1,25 @@
+install_man('tracker-extract.1')
+install_man('tracker-info.1')
+install_man('tracker-miner-fs.1')
+install_man('tracker-daemon.1')
+install_man('tracker-search.1')
+install_man('tracker-sparql.1')
+install_man('tracker-sql.1')
+install_man('tracker-status.1')
+install_man('tracker-store.1')
+install_man('tracker-tag.1')
+install_man('tracker-reset.1')
+install_man('tracker-index.1')
+install_man('tracker-writeback.1')
+
+if have_tracker_miner_rss
+ install_man('tracker-miner-rss.1')
+endif
+
+if have_tracker_needle
+ install_man('tracker-needle.1')
+endif
+
+if have_tracker_preferences
+ install_man('tracker-preferences.1')
+endif
diff --git a/docs/meson.build b/docs/meson.build
new file mode 100644
index 0000000..76e5979
--- /dev/null
+++ b/docs/meson.build
@@ -0,0 +1,3 @@
+subdir('tools')
+subdir('manpages')
+subdir('reference')
diff --git a/docs/reference/libtracker-control/meson.build b/docs/reference/libtracker-control/meson.build
new file mode 100644
index 0000000..d32533d
--- /dev/null
+++ b/docs/reference/libtracker-control/meson.build
@@ -0,0 +1,8 @@
+configure_file(input: 'version.xml.in',
+ output: 'version.xml',
+ configuration: conf)
+
+gnome.gtkdoc('libtracker-control',
+ src_dir: '../../../src/libtracker-control',
+ main_sgml: 'libtracker-control-docs.sgml',
+ install: true)
diff --git a/docs/reference/libtracker-miner/meson.build b/docs/reference/libtracker-miner/meson.build
new file mode 100644
index 0000000..699a37f
--- /dev/null
+++ b/docs/reference/libtracker-miner/meson.build
@@ -0,0 +1,8 @@
+configure_file(input: 'version.xml.in',
+ output: 'version.xml',
+ configuration: conf)
+
+gnome.gtkdoc('libtracker-miner',
+ src_dir: '../../../src/libtracker-miner',
+ main_sgml: 'libtracker-miner-docs.sgml',
+ install: true)
diff --git a/docs/reference/libtracker-sparql/meson.build b/docs/reference/libtracker-sparql/meson.build
new file mode 100644
index 0000000..56e25a2
--- /dev/null
+++ b/docs/reference/libtracker-sparql/meson.build
@@ -0,0 +1,8 @@
+configure_file(input: 'version.xml.in',
+ output: 'version.xml',
+ configuration: conf)
+
+gnome.gtkdoc('libtracker-sparql',
+ src_dir: '../../../src/libtracker-sparql',
+ main_sgml: 'libtracker-sparql-docs.sgml',
+ install: true)
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
new file mode 100644
index 0000000..529007b
--- /dev/null
+++ b/docs/reference/meson.build
@@ -0,0 +1,4 @@
+subdir('libtracker-control')
+subdir('libtracker-miner')
+subdir('libtracker-sparql')
+subdir('ontology')
diff --git a/docs/reference/ontology/meson.build b/docs/reference/ontology/meson.build
new file mode 100644
index 0000000..409a64f
--- /dev/null
+++ b/docs/reference/ontology/meson.build
@@ -0,0 +1,13 @@
+configure_file(input: 'version.xml.in',
+ output: 'version.xml',
+ configuration: conf)
+
+# FIXME: this can't really work right now; Meson is too limited here.
+# Perhaps it could be done as an external script since none of the
+# normal scanning and stuff needs to be done anyway.
+# built anyway.
+
+gnome.gtkdoc('ontology',
+ src_dir: '.',
+ main_sgml: 'ontology-docs.sgml',
+ install: true)
diff --git a/docs/tools/meson.build b/docs/tools/meson.build
new file mode 100644
index 0000000..cf24f0e
--- /dev/null
+++ b/docs/tools/meson.build
@@ -0,0 +1,18 @@
+# These tools are used for generating the ontologies documentation.
+
+ttl_loader_files = [
+ 'ttl_loader.c',
+ 'ttl_model.c',
+ 'ttl_sgml.c',
+ 'qname.c',
+]
+
+ttl2sgml = executable('ttl2sgml',
+ ttl_loader_files, 'ttl2sgml.c',
+ dependencies: [tracker_data_dep, tracker_sparql_dep],
+ c_args: ['-DTRACKER_COMPILATION'])
+
+ttlresource2sgml = executable('ttlresource2sgml',
+ ttl_loader_files, 'ttlresource2sgml.c',
+ dependencies: [tracker_data_dep, tracker_sparql_dep],
+ c_args: ['-DTRACKER_COMPILATION'])
diff --git a/examples/libtracker-miner/meson.build b/examples/libtracker-miner/meson.build
new file mode 100644
index 0000000..d450a9b
--- /dev/null
+++ b/examples/libtracker-miner/meson.build
@@ -0,0 +1,7 @@
+sources = [
+ 'tracker-miner-test.c',
+ 'tracker-main.c']
+
+executable('tracker-miner-test', sources,
+ dependencies: [tracker_miner_dep]
+)
diff --git a/examples/libtracker-sparql/meson.build b/examples/libtracker-sparql/meson.build
new file mode 100644
index 0000000..17226b9
--- /dev/null
+++ b/examples/libtracker-sparql/meson.build
@@ -0,0 +1,7 @@
+executable('async-connection', 'async-connection.c',
+ dependencies: tracker_sparql_dep
+)
+
+executable('class-signal', 'class-signal.c',
+ dependencies: tracker_sparql_dep
+)
diff --git a/examples/meson.build b/examples/meson.build
new file mode 100644
index 0000000..6ab29f9
--- /dev/null
+++ b/examples/meson.build
@@ -0,0 +1,2 @@
+subdir('libtracker-miner')
+subdir('libtracker-sparql')
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..b1cb98a
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,376 @@
+# Experimental, incomplete build instructions for Tracker using
+# Meson: http://www.mesonbuild.com/
+#
+# Open questions:
+# - is the installed version identical to an installed
+# autotools build?
+# - does crossbuilding (e.g. in Buildroot) work correctly?
+
+project('tracker', 'c', 'vala', 'cpp', version: '1.11.0')
+
+gnome = import('gnome')
+i18n = import('i18n')
+
+# This is the X.Y used in -llibtracker-FOO-X.Y
+tracker_api_version = '1.0'
+
+glib_required = '2.40.0'
+
+# 3.6.11 for sqlite_backup API
+# 3.6.16 to fix test failures
+# 3.6.17 for shared cache mode with virtual tables
+# 3.7.0 for WAL
+# 3.7.9 for FTS4 content= support
+sqlite_required = '3.7.9'
+
+cairo = dependency('cairo', version: '> 1.0')
+camel = dependency('camel-1.2', version: '> 2.32.0', required: false)
+dbus = dependency('dbus-1', version: '> 1.3.1')
+eds = dependency('evolution-data-server-1.2', version: '> 2.32.0', required: false)
+evo_plugin = dependency('evolution-shell-3.1', required: false)
+evo_shell = dependency('evolution-shell-3.0', version: '> 3.1', required: false)
+exempi = dependency('exempi-2.0', version: '> 2.1.0', required: false)
+flac = dependency('flac', version: '> 1.2.1', required: false)
+gee = dependency('gee-0.8', version: '> 0.3')
+gio = dependency('gio-2.0', version: '>' + glib_required)
+gio_unix = dependency('gio-unix-2.0', version: '>' + glib_required)
+glib = dependency('glib-2.0', version: '>' + glib_required)
+gmodule = dependency('gmodule-2.0', version: '>' + glib_required)
+gobject = dependency('gobject-2.0', version: '>' + glib_required)
+gstreamer = dependency('gstreamer-1.0', version: '> 0.10.31', required: false)
+gstreamer_tag = dependency('gstreamer-tag-1.0', version: '> 0.10.31', required: false)
+gtk3 = dependency('gtk+-3.0', version: '> 3.0.0', required: false)
+gupnp_dlna = dependency('gupnp-dlna-2.0', version: '> 0.9.4', required: false)
+hal = dependency('hal', version: '> 0.5', required: false)
+icu_i18n = dependency('icu-i18n', version: '> 4.8.1.1', required: false)
+icu_uc = dependency('icu-uc', version: '> 4.8.1.1', required: false)
+libemail_utils = dependency('libemail-utils', required: false)
+libemail_engine = dependency('libemail-engine', required: false)
+libexif = dependency('libexif', version: '> 0.6', required: false)
+libgrss = dependency('libgrss', version: '> 0.7', required: false)
+libgsf = dependency('libgsf-1', version: '> 1.14.24', required: false)
+libiptcdata = dependency('libiptcdata', required: false)
+libmediaart = dependency('libmediaart', version: '> 1.9.0', required: false)
+libosinfo = dependency('libosinfo', version: '> 0.2.9', required: false)
+libpng = dependency('libpng', version: '> 0.89', required: false)
+libtiff = dependency('libtiff-4', required: false)
+libxml2 = dependency('libxml-2.0', version: '> 2.6')
+libvorbis = dependency('vorbisfile', version: '> 0.22')
+meegotouch = dependency('meegotouch', version: '> 0.20', required: false)
+network_manager = dependency('libnm-glib', version: '> 0.8', required: false)
+poppler = dependency('poppler-glib', version: '> 0.16.0', required: false)
+sqlite = dependency('sqlite3', version: '>' + sqlite_required)
+taglib = dependency('taglib_c', version: '> 1.6', required: false)
+upower = dependency('libupower-glib', version: '> 0.9.0', required: false)
+zlib = dependency('zlib')
+
+libgif = meson.get_compiler('c').find_library('libgif', required: false)
+libjpeg = meson.get_compiler('c').find_library('libjpeg', required: false)
+libmath = meson.get_compiler('c').find_library('m')
+
+# FIXME: here we work around a quirk todo with Meson and Vala: the 'uuid'
+# pkg-config component corresponds to 'libuuid.vapi', but Meson assumes that
+# .vapi name always matches pkg-config name, and will add `--pkg uuid` to the
+# Vala commandline. By finding 'uuid' using find_library() instead, we get
+# a dependency object back that won't cause any `--pkg` arguments to be added
+# to the Vala commandline, but still works as expected for C code.
+uuid = meson.get_compiler('c').find_library('uuid')
+
+glib_mkenums = find_program('glib-mkenums')
+
+conf = configuration_data()
+
+enable_fts = get_option('fts')
+enable_extract = get_option('extract')
+enable_writeback = get_option('writeback')
+
+##################################################################
+# Check for libtracker-data and libtracker-fts: Unicode support
+#
+# By default, AUTO with this order of preference:
+# 1) libunistring
+# 2) libicu
+##################################################################
+
+have_libicu = false
+unicode_library_name = ''
+
+if icu_i18n.found() and icu_uc.found()
+ have_libicu = true
+endif
+
+if have_libicu
+ if get_option('unicode_support') == 'auto' or get_option('unicode_support') == 'icu'
+ unicode_library = declare_dependency(
+ dependencies: [icu_uc, icu_i18n]
+ )
+ unicode_library_name = 'icu'
+ conf.set('HAVE_LIBICU', 1)
+ endif
+elif get_option('unicode_support') == 'icu'
+ error('libicu explicitly requested, but icu-i18n and icu-uc libraries were not found')
+endif
+
+if unicode_library_name == ''
+ libunistring = meson.get_compiler('c').find_library('libunistring', required: false)
+
+ if libunistring.found()
+ unicode_library = libunistring
+ unicode_library_name = 'unistring'
+ conf.set('HAVE_LIBUNISTRING', 1)
+ elif get_option('unicode_support') == 'unistring'
+ error('libunistring explicitly requested, but not found')
+ else
+ error('Neither libicu or libunistring were found for Unicode support.')
+ endif
+endif
+
+####################################################################
+# Check for tracker-miner-fs: meegotouch, for MeeGo desktop files
+####################################################################
+
+have_meegotouch = false
+if get_option('meegotouch') != 'no'
+ meegotouch = dependency('meegotouch', version: '>= 0.20', required: false)
+
+ if meegotouch.found()
+ have_meegotouch = true
+ elif get_option('meegotouch') == 'yes'
+ error('meegotouch support explicitly requested, but enca couldn\'t be found')
+ endif
+endif
+conf.set('HAVE_MEEGOTOUCH', have_meegotouch)
+
+####################################################################
+# This section is for tracker-extract dependencies
+####################################################################
+
+##########################################################################
+# Check for tracker-extract: icu or enca for detecting Cyrillic in MP3s
+#
+# By default, AUTO with this order of preference:
+# 1) icu
+# 2) enca
+##########################################################################
+
+charset_library_name = 'none'
+
+if have_libicu
+ if get_option('charset_detection') == 'auto' or get_option('charset_detection') == 'icu'
+ charset_library = declare_dependency(
+ dependencies: [icu_uc, icu_i18n]
+ )
+ conf.set('HAVE_LIBICU_CHARSET_DETECTION', 1)
+ charset_library_name = 'icu'
+ endif
+else
+ if get_option('charset_detection') == 'icu'
+ error('libicu requested for character set detection, but it was not found')
+ endif
+endif
+
+if charset_library_name == 'none' and get_option('charset_library') != 'none'
+ enca = dependency('enca', version: '>= 1.9', required: false)
+
+ if enca.found()
+ conf.set('HAVE_ENCA', 1)
+ charset_library = enca
+ charset_library_name = 'enca'
+ elif get_option('enca') == 'yes'
+ error('enca support explicitly requested, but enca couldn\'t be found')
+ endif
+endif
+
+##################################################################
+# Check for tracker-fts, allow disabling FTS support
+##################################################################
+
+if enable_fts
+ sqlite3_builtin_fts5_test = '''
+ #include <sqlite3.h>
+ sqlite3 *db;
+ int rc;
+ rc = sqlite3_open(":memory:", &db);
+ if (rc!=SQLITE_OK) return -1;
+ rc = sqlite3_exec(db, "create table a(text)", 0, 0, 0);
+ if (rc!=SQLITE_OK) return -1;
+ rc = sqlite3_exec(db, "create virtual table t using fts5(content='a',text)", 0, 0, 0);
+ if (rc!=SQLITE_OK) return -1;
+ '''
+
+ sqlite3_has_builtin_fts5 = meson.get_compiler('c').compiles(sqlite3_builtin_fts5_test,
+ name: 'sqlite3 has builtin FTS5 module')
+ conf.set10('HAVE_BUILTIN_FTS', sqlite3_has_builtin_fts5)
+endif
+
+tracker_major_version = meson.project_version().split('.')[0].to_int()
+tracker_minor_version = meson.project_version().split('.')[1].to_int()
+tracker_micro_version = meson.project_version().split('.')[2].to_int()
+
+conf.set10('HAVE_TRACKER_EXTRACT', enable_extract)
+conf.set10('HAVE_TRACKER_FTS', enable_fts)
+conf.set10('HAVE_TRACKER_WRITEBACK', enable_writeback)
+
+conf.set('HAVE_BUILTIN_FTS', sqlite3_has_builtin_fts5)
+conf.set('HAVE_LIBEXIF', libexif.found())
+conf.set('HAVE_LIBIPTCDATA', libiptcdata.found())
+conf.set('HAVE_LIBMEDIAART', libmediaart.found())
+
+conf.set('LOCALEDIR', '"@0@/@1@"'.format(get_option('prefix'), get_option('localedir')))
+conf.set('SHAREDIR', '"@0@/@1@"'.format(get_option('prefix'), get_option('datadir')))
+conf.set('TRACKER_MINERS_DIR', '"@0@/@1@/tracker/miners"'.format(get_option('prefix'),
get_option('datadir')))
+conf.set('TRACKER_UI_DIR', '"@0@/@1@/tracker/"'.format(get_option('prefix'), get_option('datadir')))
+
+conf.set('GETTEXT_PACKAGE', '"tracker"')
+conf.set('PACKAGE_VERSION', '"@0@"'.format(meson.project_version()))
+conf.set('TRACKER_VERSION', '"@0@"'.format(meson.project_version()))
+conf.set('TRACKER_MAJOR_VERSION', tracker_major_version)
+conf.set('TRACKER_MINOR_VERSION', tracker_minor_version)
+conf.set('TRACKER_MICRO_VERSION', tracker_micro_version)
+conf.set('TRACKER_INTERFACE_AGE', 0)
+conf.set('TRACKER_BINARY_AGE', 100 * tracker_minor_version + tracker_micro_version)
+configure_file(input: 'config.h.meson.in',
+ output: 'config.h',
+ configuration: conf)
+
+# Needed for O_NOATIME, and probably other stuff.
+add_global_arguments('-D_GNU_SOURCE', language: 'c')
+
+have_tracker_miner_rss = true
+have_tracker_needle = true
+have_tracker_preferences = true
+
+configinc = include_directories('./')
+srcinc = include_directories('src/')
+
+tracker_extract_modules_dir = '@0@/tracker-@1@/extract-modules'.format(get_option('libdir'),
tracker_api_version)
+# NOTE: We don't use ${TRACKER_API_VERSION} because other content like
+# the ontology is installed to the same location.
+tracker_extract_rules_dir = '@0@/tracker/extract-rules'.format(get_option('datadir'))
+
+subdir('src')
+
+subdir('docs')
+subdir('examples')
+subdir('utils')
+
+subdir('tests')
+
+subdir('po')
+
+# Make sure we're not using versions of SQLite which cause problems.
+#
+# Avoid versions:
+sqlite_safe = true
+if sqlite.version().version_compare('>= 3.7.10') and sqlite.version().version_compare('<= 3.7.13')
+ # See https://mail.gnome.org/archives/tracker-list/2012-October/msg00028.html
+ sqlite_safe = false
+elif sqlite.version().version_compare('3.8.1')
+ # See https://mail.gnome.org/archives/tracker-list/2013-November/msg00021.html
+ sqlite_safe = false
+elif sqlite.version().version_compare('3.8.4.2')
+ # See https://mail.gnome.org/archives/tracker-list/2014-April/msg00001.html
+ sqlite_safe = false
+endif
+
+message('Build Configuration:\n')
+message(' Prefix: ' + get_option('prefix'))
+message(' Source code location: ' + meson.source_root())
+message(' Compiler: ' + meson.get_compiler('c').get_id())
+
+#>---Enable gtk doc (for documentation): $enable_gtk_doc
+#
+#>---Enable functional tests: $enable_functional_tests
+#>---Enable unit tests: $have_unit_tests
+
+message('Feature Support:\n')
+#message(' Support for HAL: $have_hal')
+#>---Support for UPower: $have_upower
+#>---Support for network status detection: $have_network_manager
+message(' Unicode support library: ' + unicode_library_name)
+
+#>---Build with Journal support: $have_tracker_journal
+message(' Build with SQLite FTS support: @0@ (built-in FTS: @1@)'.format(
+ get_option('fts'), sqlite3_has_builtin_fts5))
+#>---Build with Stemming support: $have_libstemmer
+#>---Cache media art $have_libmediaart (libmediaart)
+#>---Install artwork $have_artwork
+
+#>---Bash completion support: $with_bash_completion_dir ($BASH_COMPLETION_DIR)
+
+#Data Miners / Writebacks:
+
+#>---FS (File System): $have_tracker_miner_fs (MeeGo support: $have_meegotouch)
+#>---Applications: $have_tracker_miner_apps
+#>---RSS: $have_tracker_miner_rss
+#>---User Guides: $have_tracker_miner_user_guides
+#>---Email:
+# Evolution: $have_tracker_miner_evolution
($tracker_miner_evolution_install_dir)
+# Thunderbird: $have_tracker_miner_thunderbird
($tracker_miner_thunderbird_install_dir)
+# Bookmarks:
+# FireFox: $have_tracker_miner_firefox
($tracker_miner_firefox_install_dir)
+
+# Extract (secondary extraction): $have_tracker_extract
+# Writeback (writing changes back): $have_tracker_writeback"
+
+if enable_extract
+message('Metadata Extractors:\n')
+
+#>---Support PNG: $have_libpng
+#>---Support PDF: $have_poppler
+#>---Support XPS: $have_libgxps
+#>---Support GIF: $have_libgif (xmp: $have_exempi)
+#>---Support JPEG: $have_libjpeg (xmp: $have_exempi, exif: $have_libexif, iptc:
$have_libiptcdata)
+#>---Support TIFF: $have_libtiff (xmp: $have_exempi, exif: yes, iptc:
$have_libiptcdata)
+#>---Support Vorbis (ogg/etc): $have_libvorbis
+#>---Support Flac: $have_libflac
+#>---Support MS & Open Office: $have_libgsf
+#>---Support XML / HTML: $have_libxml2
+#>---Support embedded / sidecar XMP: $have_exempi
+#>---Support generic media formats: $have_generic_media_handler ($have_generic_media_handler_app)
(backend: $gstreamer_backend)
+#>---Support cue sheet parsing: $have_libcue (libcue2.0: $have_libcue2)
+#>---Support playlists (w/ Totem): $have_playlist
+#>---Support ISO image parsing: $have_libosinfo
+#>---Support AbiWord document parsing: $have_abiword
+#>---Support DVI parsing: $have_dvi
+#>---Support MP3 parsing: $have_mp3
+message(' Support MP3 tag charset detection: ' + charset_library_name)
+#>---Support PS parsing: $have_ps
+#>---Support text parsing: $have_text
+#>---Support icon parsing: $have_icon"
+endif
+
+if enable_writeback
+message('''
+echo "
+Writeback Formats:
+
+>---Audio files using Taglib: $have_taglib
+>---XMP: $have_exempi"
+fi
+''')
+endif
+
+message('''
+Applications:
+
+>---Build tracker-preferences: $have_tracker_preferences
+>---Build tracker-needle: $have_tracker_needle
+
+Frameworks / Options:
+
+ Support GNOME's Nautilus $have_tracker_nautilus_extension
($tracker_nautilus_extension_install_dir)
+>---Support Maemo $enable_maemo
+>---Support libmeegotouch $have_meegotouch
+>---Support Guaranteed Metadata $enable_guarantee_metadata (e.g. guess nie:title from files)
+
+''')
+
+if not sqlite_safe
+ message('''WARNING:
+ SQLite3 version @0@ is not safe. For detail
+ 3.7.10 - 3.7.13: https://mail.gnome.org/archives/tracker-list/2012-October/msg00028.html
+ 3.8.1: https://mail.gnome.org/archives/tracker-list/2013-November/msg00021.html
+ 3.8.4.2: https://mail.gnome.org/archives/tracker-list/2014-April/msg00001.html
+ ''').format(sqlite.version())
+endif
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..ed069d9
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,15 @@
+option('extract', type: 'boolean', value: true,
+ description: 'Enable the Tracker metadata extractor')
+option('fts', type: 'boolean', value: true,
+ description: 'Enable the Tracker full-text search feature')
+option('functional_tests', type: 'boolean', value: true,
+ description: 'Enable the Tracker functional test suite')
+option('writeback', type: 'boolean', value: true,
+ description: 'Enable Tracker writeback feature')
+
+option('charset_detection', type: 'combo', choices: ['auto', 'enca', 'icu', 'none'], value: 'auto',
+ description: 'Enable enca or libicu for charset detection in MP3s')
+option('meegotouch', type: 'combo', choices: ['auto', 'no', 'yes'], value: 'no',
+ description: 'Enable libmeegotouch application extraction')
+option('unicode_support', type: 'combo', choices: ['icu', 'unistring', 'auto'], value: 'auto',
+ description: 'Unicode support library to use')
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..adb5176
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,6 @@
+i18n.gettext('tracker', languages:
+ ['ar', 'as', 'be@latin', 'bg', 'bs', 'ca', 'ca@valencia', 'cs', 'da', 'de',
+ 'dz', 'el', 'en_GB', 'eo', 'es', 'et', 'eu', 'fi', 'fr', 'gl', 'he', 'hu',
+ 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'mk', 'ml', 'nb', 'nds', 'nl', 'oc',
+ 'pa', 'pl', 'pt', 'pt_BR', 'ro', 'ru', 'sk', 'sl', 'sr', 'sr@latin', 'sv',
+ 'te', 'tg', 'th', 'tr', 'uk', 'zh_CN', 'zh_HK', 'zh_TW'])
diff --git a/src/gvdb/meson.build b/src/gvdb/meson.build
new file mode 100644
index 0000000..82177dd
--- /dev/null
+++ b/src/gvdb/meson.build
@@ -0,0 +1,14 @@
+gvdb_dependencies = [glib]
+
+libgvdb = static_library('gvdb',
+ 'gvdb-builder.c',
+ 'gvdb-reader.c',
+ dependencies: gvdb_dependencies,
+ pic: true,
+)
+
+gvdb_dep = declare_dependency(
+ link_with: libgvdb,
+ dependencies: gvdb_dependencies,
+ include_directories: include_directories('..'),
+)
diff --git a/src/libtracker-bus/meson.build b/src/libtracker-bus/meson.build
new file mode 100644
index 0000000..47d1efc
--- /dev/null
+++ b/src/libtracker-bus/meson.build
@@ -0,0 +1,26 @@
+libtracker_bus = static_library('tracker-bus',
+ 'tracker-bus.vala',
+ 'tracker-namespace.vala',
+ 'tracker-array-cursor.vala',
+ 'tracker-bus-fd-cursor.vala',
+ '../libtracker-common/libtracker-common.vapi',
+ #link_with: [libtracker_common, libtracker_sparql_intermediate, libtracker_sparql_intermediate_vala],
+ #dependencies: [gio, gio_unix],
+ dependencies: [tracker_common_dep, tracker_sparql_intermediate_dep],
+ c_args: [
+ '-DNO_LIBDBUS',
+ '-DTRACKER_COMPILATION',
+ ],
+ vala_args: [
+ '--debug',
+ '--pkg', 'posix',
+ # FIXME: Meson has code to add --target-glib automatically, but it
+ # doesn't seem to work here.
+ '--target-glib', glib_required,
+ ],
+)
+
+tracker_bus_dep = declare_dependency(
+ link_with: libtracker_bus,
+ include_directories: include_directories('.')
+)
diff --git a/src/libtracker-common/meson.build b/src/libtracker-common/meson.build
new file mode 100644
index 0000000..fd936a2
--- /dev/null
+++ b/src/libtracker-common/meson.build
@@ -0,0 +1,37 @@
+tracker_common_sources = [
+ 'tracker-date-time.c',
+ 'tracker-dbus.c',
+ 'tracker-file-utils.c',
+ 'tracker-ioprio.c',
+ 'tracker-log.c',
+ 'tracker-sched.c',
+ 'tracker-type-utils.c',
+ 'tracker-utils.c',
+ 'tracker-locale.c',
+ 'tracker-parser-utils.c',
+ 'tracker-language.c',
+]
+
+if unicode_library_name == 'icu'
+ tracker_common_sources += 'tracker-parser-libicu.c'
+else
+ tracker_common_sources += 'tracker-parser-libunistring.c'
+endif
+
+# FIXME: need to link against -lkvm on OpenBSD, see configure.ac
+tracker_common_dependencies = [gio_unix, glib, libmath]
+
+libtracker_common = library('tracker-common',
+ tracker_common_sources,
+ dependencies: tracker_common_dependencies + [unicode_library],
+ c_args: [
+ '-DTRACKER_COMPILATION',
+ ],
+ include_directories: [configinc, srcinc],
+ install_dir: get_option('libdir') + '/tracker-' + tracker_api_version,
+)
+tracker_common_dep = declare_dependency(
+ link_with: libtracker_common,
+ dependencies: tracker_common_dependencies,
+ include_directories: [configinc, srcinc],
+)
diff --git a/src/libtracker-data/meson.build b/src/libtracker-data/meson.build
new file mode 100644
index 0000000..5ba2420
--- /dev/null
+++ b/src/libtracker-data/meson.build
@@ -0,0 +1,69 @@
+# Vala parts of libtracker-data are split out separately, because we can't link
+# the Vala code to libicu. In the Makefile.am this library is called
+# libtracker-sparql-query.
+libtracker_data_vala = static_library('tracker-data-vala',
+ 'tracker-vala-namespace.vala',
+ 'tracker-sparql-query.vala',
+ 'tracker-sparql-expression.vala',
+ 'tracker-sparql-pattern.vala',
+ 'tracker-sparql-scanner.vala',
+ 'tracker-turtle-reader.vala',
+ '../libtracker-common/libtracker-common.vapi',
+ '../libtracker-data/libtracker-data.vapi',
+ #link_with: [libtracker_common, libtracker_sparql_intermediate, libtracker_sparql_intermediate_vala],
+ #dependencies: [gio_unix, glib, uuid, zlib],
+ dependencies: [tracker_common_dep, tracker_sparql_intermediate_dep],
+ c_args: [
+ '-DTRACKER_COMPILATION',
+ ],
+ vala_args: [
+ '--debug',
+ '--pkg', 'posix',
+ # FIXME: Meson has code to add --target-glib automatically, but it
+ # doesn't seem to work here.
+ '--target-glib', glib_required,
+ ]
+)
+
+tracker_data_dependencies = [
+ gvdb_dep, tracker_common_dep,
+ sqlite, uuid,
+]
+
+if get_option('fts')
+ tracker_data_dependencies += tracker_fts_dep
+endif
+
+ #[gio_unix, glib, libmath, sqlite, uuid]
+libtracker_data = library('tracker-data',
+ 'tracker-class.c',
+ 'tracker-collation.c',
+ 'tracker-crc32.c',
+ 'tracker-data-backup.c',
+ 'tracker-data-manager.c',
+ 'tracker-data-query.c',
+ 'tracker-data-update.c',
+ 'tracker-db-config.c',
+ 'tracker-db-interface.c',
+ 'tracker-db-interface-sqlite.c',
+ 'tracker-db-manager.c',
+ 'tracker-db-journal.c',
+ 'tracker-db-backup.c',
+ 'tracker-namespace.c',
+ 'tracker-ontology.c',
+ 'tracker-ontologies.c',
+ 'tracker-property.c',
+ #link_with: [gvdb, libtracker_common, libtracker_sparql_intermediate,
+ # libtracker_sparql_intermediate_vala, libtracker_data_vala, libtracker_fts],
+ #dependencies: tracker_data_dependencies + [unicode_library],
+ link_with: [libtracker_data_vala],
+ dependencies: tracker_data_dependencies + [unicode_library, tracker_sparql_intermediate_dep],
+ c_args: [
+ '-DTRACKER_COMPILATION',
+ ],
+)
+
+tracker_data_dep = declare_dependency(
+ link_with: [libtracker_data],
+ dependencies: tracker_data_dependencies,
+)
diff --git a/src/libtracker-direct/meson.build b/src/libtracker-direct/meson.build
new file mode 100644
index 0000000..f23fb91
--- /dev/null
+++ b/src/libtracker-direct/meson.build
@@ -0,0 +1,24 @@
+libtracker_direct = static_library('tracker-direct',
+ 'tracker-direct.vala',
+ 'tracker-namespace.vala',
+ '../libtracker-common/libtracker-common.vapi',
+ '../libtracker-data/libtracker-data.vapi',
+ '../libtracker-data/tracker-sparql-query.vapi',
+ link_with: [libtracker_common, libtracker_data],
+ dependencies: [tracker_sparql_intermediate_dep],
+ c_args: [
+ '-DTRACKER_COMPILATION',
+ ],
+ vala_args: [
+ '--debug',
+ '--pkg', 'posix',
+ # FIXME: Meson has code to add --target-glib automatically, but it
+ # doesn't seem to work here.
+ '--target-glib', glib_required,
+ ],
+)
+tracker_direct_dep = declare_dependency(
+ link_with: [libtracker_direct],
+ dependencies: [tracker_sparql_intermediate_dep],
+ include_directories: include_directories('.')
+)
diff --git a/src/libtracker-extract/meson.build b/src/libtracker-extract/meson.build
new file mode 100644
index 0000000..6c08f7b
--- /dev/null
+++ b/src/libtracker-extract/meson.build
@@ -0,0 +1,45 @@
+libtracker_extract_sources = [
+ 'tracker-encoding.c',
+ 'tracker-exif.c',
+ 'tracker-extract-info.c',
+ 'tracker-guarantee.c',
+ 'tracker-iptc.c',
+ 'tracker-module-manager.c',
+ 'tracker-resource-helpers.c',
+ 'tracker-utils.c',
+ 'tracker-xmp.c',
+]
+
+if charset_library_name == 'enca'
+ libtracker_extract_sources += 'tracker-encoding-enca.c'
+elif charset_library_name == 'icu'
+ libtracker_extract_sources += 'tracker-encoding-libicu.c'
+endif
+
+if have_meegotouch
+ libtracker_extract_sources += 'tracker-encoding-meegotouch.cpp'
+endif
+
+libtracker_extract_dependencies = [charset_library, gmodule]
+
+if libexif.found()
+ libtracker_extract_dependencies += libexif
+endif
+
+if libiptcdata.found()
+ libtracker_extract_dependencies += libiptcdata
+endif
+
+libtracker_extract = library('tracker-extract',
+ libtracker_extract_sources,
+ dependencies: [tracker_common_dep, tracker_sparql_dep] + libtracker_extract_dependencies,
+ c_args: [
+ '-DTRACKER_COMPILATION',
+ '-DTRACKER_EXTRACTOR_RULES_DIR="@0@"'.format(tracker_extract_rules_dir),
+ '-DTRACKER_EXTRACTORS_DIR="@0@"'.format(tracker_extract_modules_dir)
+ ],
+)
+
+tracker_extract_dep = declare_dependency(
+ link_with: libtracker_extract,
+ dependencies: libtracker_extract_dependencies)
diff --git a/src/libtracker-fts/meson.build b/src/libtracker-fts/meson.build
new file mode 100644
index 0000000..fea60dc
--- /dev/null
+++ b/src/libtracker-fts/meson.build
@@ -0,0 +1,23 @@
+if sqlite3_has_builtin_fts5
+ libtracker_fts_fts5 = []
+else
+ libtracker_fts_fts5 = files('fts5.c')
+endif
+
+libtracker_fts_dependencies = [tracker_common_dep, sqlite]
+
+libtracker_fts = static_library('libtracker-fts',
+ 'tracker-fts.c',
+ 'tracker-fts-config.c',
+ 'tracker-fts-tokenizer.c',
+ libtracker_fts_fts5,
+ dependencies: libtracker_fts_dependencies,
+ c_args: [
+ '-DTRACKER_COMPILATION',
+ ],
+)
+
+tracker_fts_dep = declare_dependency(
+ link_with: libtracker_fts,
+ dependencies: libtracker_fts_dependencies
+)
diff --git a/src/libtracker-miner/meson.build b/src/libtracker-miner/meson.build
new file mode 100644
index 0000000..256a162
--- /dev/null
+++ b/src/libtracker-miner/meson.build
@@ -0,0 +1,72 @@
+shared_libtracker_miner_monitor_sources = files('tracker-monitor.c')
+shared_libtracker_miner_file_system_sources = files('tracker-file-system.c')
+shared_libtracker_miner_crawler_sources = files('tracker-crawler.c')
+
+tracker_miner_enum_types_header = custom_target('tracker-miner-enum-types-header',
+ input: ['tracker-miner-enum-types.h.template', 'tracker-miner-enums.h'],
+ output: 'tracker-miner-enum-types.h',
+ command: [glib_mkenums, '--template', '@INPUT0@', '@INPUT1@'],
+ capture: true
+)
+
+tracker_miner_enum_types_code = custom_target('tracker-miner-enum-types-code',
+ input: ['tracker-miner-enum-types.c.template', 'tracker-miner-enums.h'],
+ output: 'tracker-miner-enum-types.c',
+ command: [glib_mkenums, '--template', '@INPUT0@', '@INPUT1@'],
+ capture: true
+)
+
+private_sources = [
+ 'tracker-crawler.c',
+ 'tracker-file-data-provider.c',
+ 'tracker-file-enumerator.c',
+ 'tracker-file-notifier.c',
+ 'tracker-file-system.c',
+ 'tracker-priority-queue.c',
+ 'tracker-task-pool.c',
+ 'tracker-sparql-buffer.c',
+ 'tracker-thumbnailer.c',
+ 'tracker-utils.c']
+
+if libmediaart.found()
+ private_sources.append(['tracker-media-art.c'])
+endif
+
+miner_sources = [
+ shared_libtracker_miner_monitor_sources,
+ shared_libtracker_miner_file_system_sources,
+ shared_libtracker_miner_crawler_sources,
+ 'tracker-data-provider.c',
+ 'tracker-decorator.c',
+ 'tracker-decorator-fs.c',
+ 'tracker-enumerator.c',
+ 'tracker-indexing-tree.c',
+ 'tracker-miner-enum-types.c',
+ 'tracker-miner-object.c',
+ 'tracker-miner-online.c',
+ 'tracker-miner-fs.c']
+
+libtracker_miner_private = static_library(
+ 'tracker-miner-private',
+ private_sources,
+ dependencies: [tracker_common_dep, tracker_sparql_dep],
+ c_args: [
+ '-DTRACKER_COMPILATION',
+ ],
+)
+
+libtracker_miner = library(
+ 'tracker-miner-' + tracker_api_version,
+ miner_sources,
+ link_with: [libtracker_miner_private],
+ dependencies: [tracker_common_dep, tracker_sparql_dep],
+ c_args: [
+ '-DTRACKER_COMPILATION',
+ ],
+)
+
+tracker_miner_dep = declare_dependency(
+ link_with: libtracker_miner,
+ dependencies: [tracker_common_dep, tracker_sparql_dep],
+ include_directories: include_directories('.')
+)
diff --git a/src/libtracker-sparql-backend/meson.build b/src/libtracker-sparql-backend/meson.build
new file mode 100644
index 0000000..e519076
--- /dev/null
+++ b/src/libtracker-sparql-backend/meson.build
@@ -0,0 +1,8 @@
+libtracker_sparql = library('tracker-sparql-' + tracker_api_version,
+ 'tracker-backend.vala',
+ dependencies: [tracker_common_dep, tracker_bus_dep, tracker_direct_dep],
+)
+tracker_sparql_dep = declare_dependency(
+ link_with: [libtracker_sparql, libtracker_common],
+ dependencies: [tracker_common_dep, tracker_data_dep, tracker_sparql_intermediate_dep],
+)
diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build
new file mode 100644
index 0000000..58d8814
--- /dev/null
+++ b/src/libtracker-sparql/meson.build
@@ -0,0 +1,35 @@
+tracker_sparql_intermediate_dependencies = [tracker_common_dep]
+
+libtracker_sparql_intermediate = static_library('tracker-sparql-' + tracker_api_version,
+ 'tracker-namespace.vala',
+ 'tracker-builder.vala',
+ 'tracker-connection.vala',
+ 'tracker-cursor.vala',
+ 'tracker-utils.vala',
+ 'tracker-namespace-manager.c',
+ 'tracker-resource.c',
+ 'tracker-uri.c',
+ 'tracker-version.c',
+ vala_header: 'tracker-generated.h',
+ #link_with: [libtracker_common],
+ #dependencies: [gio, glib, gobject, uuid],
+ dependencies: tracker_sparql_intermediate_dependencies,
+ c_args: [
+ '-DTRACKER_COMPILATION',
+ ],
+ vala_args: [
+ '--debug',
+ '--pkg', 'posix',
+ # FIXME: Meson has code to add --target-glib automatically, but it
+ # doesn't seem to work here.
+ '--target-glib', glib_required,
+ ],
+)
+
+tracker_sparql_intermediate_dep = declare_dependency(
+ link_with: [libtracker_sparql_intermediate],
+ include_directories: include_directories('.'),
+ dependencies: tracker_sparql_intermediate_dependencies + [
+ uuid
+ ]
+)
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..e70a7d3
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,29 @@
+# Shared common code
+subdir('libtracker-common')
+
+# Intermediate library of RDF & SPARQL helper functions.
+# This gets used internally and also becomes part of the
+# public libtracker-sparql library.
+subdir('libtracker-sparql')
+
+# Internal database library
+subdir('gvdb')
+subdir('libtracker-fts')
+subdir('libtracker-data')
+
+# Public libtracker-sparql library
+subdir('libtracker-bus')
+subdir('libtracker-direct')
+subdir('libtracker-sparql-backend')
+
+# Public libtracker-miner library
+subdir('libtracker-miner')
+
+# Internal data extraction helpers
+subdir('libtracker-extract')
+
+# Public data extract tool & modules
+subdir('tracker-extract')
+
+# Example search application
+subdir('tracker-needle')
diff --git a/src/tracker-extract/meson.build b/src/tracker-extract/meson.build
new file mode 100644
index 0000000..e69de29
diff --git a/src/tracker-needle/meson.build b/src/tracker-needle/meson.build
new file mode 100644
index 0000000..c63a7d3
--- /dev/null
+++ b/src/tracker-needle/meson.build
@@ -0,0 +1,20 @@
+executable(
+ 'tracker-needle',
+ 'config.vapi',
+ 'tracker-needle.vala',
+ 'tracker-history.vala',
+ 'tracker-needle.vala',
+ 'tracker-query.vala',
+ 'tracker-result-store.vala',
+ 'tracker-stats.vala',
+ 'tracker-tags-view.vala',
+ 'tracker-utils.vala',
+ 'tracker-view.vala',
+ dependencies: [tracker_sparql_dep, gtk3],
+ c_args: [
+ '-DSRCDIR="' + meson.current_source_dir() +'/"',
+ '-D_XOPEN_SOURCE',
+ '-D_XOPEN_SOURCE_EXTENDED',
+ '-include', 'config.h'
+ ]
+)
diff --git a/tests/common/meson.build b/tests/common/meson.build
new file mode 100644
index 0000000..2598745
--- /dev/null
+++ b/tests/common/meson.build
@@ -0,0 +1,15 @@
+tracker_testcommon_dependencies = [glib]
+
+libtracker_testcommon = library('tracker-testcommon',
+ 'tracker-test-helpers.c',
+ dependencies: tracker_testcommon_dependencies,
+ c_args: [
+ '-DTEST_TEXT="@0@/tests/libtracker-common/non-utf8.txt"'.format(meson.source_root()),
+ ]
+)
+
+tracker_testcommon_dep = declare_dependency(
+ link_with: libtracker_testcommon,
+ dependencies: tracker_testcommon_dependencies,
+ include_directories: include_directories('.'),
+)
diff --git a/tests/functional-tests/ipc/meson.build b/tests/functional-tests/ipc/meson.build
new file mode 100644
index 0000000..5613182
--- /dev/null
+++ b/tests/functional-tests/ipc/meson.build
@@ -0,0 +1,53 @@
+insert_or_replace_test = executable('test-insert-or-replace',
+ 'test-insert-or-replace.vala',
+ dependencies: [tracker_common_dep, tracker_sparql_dep])
+test('functional-ipc-insert-or-replace', insert_or_replace_test)
+
+busy_handling_test = executable('test-busy-handling',
+ 'test-busy-handling.vala',
+ dependencies: [tracker_common_dep, tracker_sparql_dep])
+test('functional-ipc-busy-handling', busy_handling_test)
+
+direct_query_test = executable('test-direct-query',
+ 'test-direct-query.vala',
+ 'test-shared-query.vala',
+ dependencies: [tracker_common_dep, tracker_sparql_dep])
+test('functional-ipc-direct-query', direct_query_test)
+
+bus_query_test = executable('test-bus-query',
+ 'test-bus-query.vala',
+ 'test-shared-query.vala',
+ dependencies: [tracker_common_dep, tracker_sparql_dep, tracker_bus_dep])
+test('functional-ipc-bus-query', bus_query_test)
+
+default_update_test = executable('test-default-update',
+ 'test-default-update.vala',
+ 'test-shared-update.vala',
+ dependencies: [tracker_common_dep, tracker_sparql_dep])
+test('functional-ipc-default-update', default_update_test)
+
+bus_update_test = executable('test-bus-update',
+ 'test-bus-update.vala',
+ 'test-shared-update.vala',
+ dependencies: [tracker_common_dep, tracker_sparql_dep, tracker_bus_dep])
+test('functional-ipc-bus-update', bus_update_test)
+
+class_signal_test = executable('test-class-signal',
+ 'test-class-signal.vala',
+ dependencies: [tracker_common_dep, tracker_sparql_dep])
+test('functional-ipc-class-signal', class_signal_test)
+
+class_signal_performance_test = executable('test-class-signal-performance',
+ 'test-class-signal-performance.vala',
+ dependencies: [tracker_common_dep, tracker_sparql_dep])
+test('functional-ipc-class-signal-performance', class_signal_performance_test)
+
+class_signal_performance_batch_test = executable('test-class-signal-performance-batch',
+ 'test-class-signal-performance-batch.vala',
+ dependencies: [tracker_common_dep, tracker_sparql_dep])
+test('functional-ipc-class-signal-performance-batch', class_signal_performance_batch_test)
+
+update_array_performance_test = executable('test-update-array-performance',
+ 'test-update-array-performance.c',
+ dependencies: [tracker_common_dep, tracker_sparql_dep])
+test('functional-ipc-update-array-performance', update_array_performance_test)
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
new file mode 100644
index 0000000..d9b24f5
--- /dev/null
+++ b/tests/functional-tests/meson.build
@@ -0,0 +1,39 @@
+subdir('ipc')
+
+test_runner = find_program('test-runner.sh')
+
+functional_tests = [
+ '01-insertion',
+ '02-sparql-bugs',
+ '03-fts-functions',
+ '04-group-concat',
+ '05-coalesce',
+ '06-distance',
+ '07-graph',
+ '08-unique-insertions',
+ '09-concurrent-query',
+ '10-sqlite-misused',
+ '11-sqlite-batch-misused',
+ '12-transactions',
+ '13-threaded-store',
+ '14-signals',
+ '15-statistics',
+ '16-collation',
+ '17-ontology-changes',
+ '200-backup-restore',
+ '300-miner-basic-ops',
+ '301-miner-resource-removal',
+ '310-fts-indexing',
+ '400-extractor-metadata',
+ '410-extractor-decorator',
+ '500-writeback',
+ '501-writeback-details',
+ '600-applications-camera',
+ '601-applications-sync',
+]
+
+foreach t: functional_tests
+ test('functional-' + t, test_runner,
+ args: './' + t + '.py',
+ workdir: meson.current_source_dir())
+endforeach
diff --git a/tests/gvdb/meson.build b/tests/gvdb/meson.build
new file mode 100644
index 0000000..89ab725
--- /dev/null
+++ b/tests/gvdb/meson.build
@@ -0,0 +1,7 @@
+gvdb_test = executable('gvdb-test',
+ 'gvdb-test.c',
+ dependencies: gvdb_dep,
+ include_directories: configinc,
+)
+
+test('gvdb', gvdb_test)
diff --git a/tests/libtracker-common/meson.build b/tests/libtracker-common/meson.build
new file mode 100644
index 0000000..03c9953
--- /dev/null
+++ b/tests/libtracker-common/meson.build
@@ -0,0 +1,61 @@
+test_c_args = [
+ '-DTRACKER_COMPILATION',
+ '-DTOP_BUILDDIR="@0@"'.format(meson.build_root()),
+ '-DTOP_SRCDIR="@0@"'.format(meson.source_root()),
+]
+
+date_time_test = executable('tracker-date-time-test',
+ 'tracker-date-time-test.c',
+ dependencies: tracker_common_dep,
+ c_args: test_c_args,
+)
+test('common-date-time', date_time_test)
+
+dbus_test = executable('tracker-dbus-test',
+ 'tracker-dbus-test.c',
+ dependencies: [tracker_common_dep, tracker_testcommon_dep],
+ c_args: test_c_args,
+)
+test('common-dbus', dbus_test)
+
+file_utils_test = executable('tracker-file-utils-test',
+ 'tracker-file-utils-test.c',
+ dependencies: [tracker_common_dep, tracker_testcommon_dep],
+ c_args: test_c_args,
+)
+test('common-file-utils', file_utils_test)
+
+parser_test = executable('tracker-parser-test',
+ 'tracker-parser-test.c',
+ dependencies: [tracker_common_dep, tracker_testcommon_dep],
+ c_args: test_c_args,
+)
+test('common-parser', parser_test)
+
+sched_test = executable('tracker-sched-test',
+ 'tracker-sched-test.c',
+ dependencies: [tracker_common_dep, tracker_testcommon_dep],
+ c_args: test_c_args,
+)
+test('common-sched', sched_test)
+
+type_utils_test = executable('tracker-type-utils-test',
+ 'tracker-type-utils-test.c',
+ dependencies: tracker_common_dep,
+ c_args: test_c_args,
+)
+test('common-type-utils', type_utils_test)
+
+utils_test = executable('tracker-utils-test',
+ 'tracker-utils-test.c',
+ dependencies: tracker_common_dep,
+ c_args: test_c_args,
+)
+test('common-utils', utils_test)
+
+# This is a manual test case
+parser_testcase = executable('tracker-parser',
+ 'tracker-parser.c',
+ dependencies: tracker_common_dep,
+ c_args: test_c_args,
+)
diff --git a/tests/libtracker-data/meson.build b/tests/libtracker-data/meson.build
new file mode 100644
index 0000000..15bd5dc
--- /dev/null
+++ b/tests/libtracker-data/meson.build
@@ -0,0 +1,47 @@
+test_c_args = [
+ '-DTRACKER_COMPILATION',
+ '-DTOP_BUILDDIR="@0@"'.format(meson.build_root()),
+ '-DTOP_SRCDIR="@0@"'.format(meson.source_root()),
+]
+
+backup_test = executable('tracker-backup-test',
+ 'tracker-backup-test.c',
+ dependencies: tracker_data_dep,
+ c_args: test_c_args)
+test('data-backup', backup_test)
+
+crc32_test = executable('tracker-crc32-test',
+ 'tracker-crc32-test.c',
+ dependencies: tracker_data_dep,
+ c_args: test_c_args)
+test('data-crc32', crc32_test)
+
+db_journal_test = executable('tracker-db-journal-test',
+ 'tracker-db-journal.c',
+ dependencies: tracker_data_dep,
+ c_args: test_c_args)
+test('data-db-journal', db_journal_test)
+
+ontology_test = executable('tracker-ontology-test',
+ 'tracker-ontology-test.c',
+ dependencies: tracker_data_dep,
+ c_args: test_c_args)
+test('data-ontology', ontology_test)
+
+ontology_change_test = executable('tracker-ontology-change-test',
+ 'tracker-ontology-change-test.c',
+ dependencies: tracker_data_dep,
+ c_args: test_c_args)
+test('data-ontology-change', ontology_change_test)
+
+sparql_test = executable('tracker-data-sparql-test',
+ 'tracker-sparql-test.c',
+ dependencies: tracker_data_dep,
+ c_args: test_c_args)
+test('data-sparql', sparql_test)
+
+sparql_blank_test = executable('tracker-sparql-blank-test',
+ 'tracker-sparql-blank-test.c',
+ dependencies: tracker_data_dep,
+ c_args: test_c_args)
+test('data-sparql-blank', sparql_blank_test)
diff --git a/tests/libtracker-extract/meson.build b/tests/libtracker-extract/meson.build
new file mode 100644
index 0000000..9c0a554
--- /dev/null
+++ b/tests/libtracker-extract/meson.build
@@ -0,0 +1,60 @@
+test_c_args = [
+ '-DTRACKER_COMPILATION',
+ '-DTOP_BUILDDIR="@0@/"'.format(meson.build_root()),
+ '-DTOP_SRCDIR="@0@/"'.format(meson.source_root()),
+]
+
+guarantee_test = executable('tracker-guarantee-test',
+ 'tracker-guarantee-test.c',
+ dependencies: [tracker_common_dep, tracker_extract_dep],
+ c_args: test_c_args,
+)
+test('extract-guarantee', guarantee_test)
+
+extract_info_test = executable('tracker-extract-info-test',
+ 'tracker-extract-info-test.c',
+ dependencies: [tracker_common_dep, tracker_extract_dep],
+ c_args: test_c_args,
+)
+test('extract-info-test', extract_info_test)
+
+utils_test = executable('tracker-test-utils',
+ 'tracker-test-utils.c',
+ dependencies: [tracker_common_dep, tracker_extract_dep],
+ c_args: test_c_args,
+)
+test('extract-utils', utils_test)
+
+xmp_test = executable('tracker-test-xmp',
+ 'tracker-test-xmp.c',
+ dependencies: [tracker_common_dep, tracker_extract_dep],
+ c_args: test_c_args,
+)
+test('extract-xmp', xmp_test)
+
+if libexif.found()
+ exif_test = executable('tracker-exif-test',
+ 'tracker-exif-test.c',
+ dependencies: [tracker_common_dep, tracker_extract_dep],
+ c_args: test_c_args,
+ )
+ test('extract-exif', exif_test)
+endif
+
+if libiptcdata.found() and libjpeg.found()
+ iptc_test = executable('tracker-iptc-test',
+ 'tracker-iptc-test.c',
+ dependencies: [tracker_common_dep, tracker_extract_dep, libjpeg],
+ c_args: test_c_args,
+ )
+ test('extract-iptc', iptc_test)
+endif
+
+if charset_library_name != 'none'
+ encoding_test = executable('tracker-encoding-test',
+ 'tracker-encoding-test.c',
+ dependencies: [tracker_common_dep, tracker_extract_dep],
+ c_args: test_c_args,
+ )
+ test('extract-encoding', encoding_test)
+endif
diff --git a/tests/libtracker-fts/meson.build b/tests/libtracker-fts/meson.build
new file mode 100644
index 0000000..99adea3
--- /dev/null
+++ b/tests/libtracker-fts/meson.build
@@ -0,0 +1,13 @@
+test_c_args = [
+ '-DTRACKER_COMPILATION',
+ '-DTOP_BUILDDIR="@0@/"'.format(meson.build_root()),
+ '-DTOP_SRCDIR="@0@/"'.format(meson.source_root()),
+]
+
+fts_test = executable('tracker-fts-test',
+ 'tracker-fts-test.c',
+ dependencies: [tracker_common_dep, tracker_sparql_dep, tracker_testcommon_dep],
+ c_args: test_c_args
+)
+
+test('fts', fts_test)
diff --git a/tests/libtracker-miner/meson.build b/tests/libtracker-miner/meson.build
new file mode 100644
index 0000000..538c85a
--- /dev/null
+++ b/tests/libtracker-miner/meson.build
@@ -0,0 +1,69 @@
+test_c_args = [
+ '-DLIBEXEC_PATH="@0@/@1@"'.format(get_option('prefix'), get_option('libexecdir')),
+ '-DTEST',
+ '-DTRACKER_COMPILATION',
+ '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()),
+ '-DTEST_MINERS_DIR="@0@/mock-miners"'.format(meson.current_source_dir()),
+]
+
+crawler_test = executable('tracker-crawler-test',
+ 'tracker-crawler-test.c',
+ shared_libtracker_miner_crawler_sources,
+ dependencies: [tracker_common_dep, tracker_miner_dep],
+ c_args: test_c_args
+)
+test('miner-crawler', crawler_test)
+
+file_notifier_test = executable('tracker-file-notifier-test',
+ 'tracker-file-notifier-test.c',
+ dependencies: [tracker_common_dep, tracker_miner_dep],
+ c_args: test_c_args
+)
+test('miner-file-notifier', file_notifier_test)
+
+file_system_test = executable('tracker-file-system-test',
+ 'tracker-file-system-test.c',
+ dependencies: [tracker_common_dep, tracker_miner_dep],
+ c_args: test_c_args
+)
+test('miner-file-system', file_system_test)
+
+indexing_tree_test = executable('tracker-indexing-tree-test',
+ 'tracker-indexing-tree-test.c',
+ dependencies: [tracker_common_dep, tracker_miner_dep],
+ c_args: test_c_args
+)
+test('miner-indexing-tree', indexing_tree_test)
+
+monitor_test = executable('tracker-monitor-test',
+ 'tracker-monitor-test.c',
+ shared_libtracker_miner_monitor_sources,
+ dependencies: [tracker_common_dep, tracker_miner_dep],
+ c_args: test_c_args
+)
+test('miner-monitor', monitor_test,
+ # FIXME: why is this test so slow?
+ timeout: 180)
+
+priority_queue_test = executable('tracker-priority-queue-test',
+ 'tracker-priority-queue-test.c',
+ dependencies: [tracker_common_dep, tracker_miner_dep],
+ c_args: test_c_args
+)
+test('miner-priority-queue', priority_queue_test)
+
+task_pool_test = executable('tracker-task-pool-test',
+ 'tracker-task-pool-test.c',
+ dependencies: [tracker_common_dep, tracker_miner_dep],
+ c_args: test_c_args
+)
+test('miner-task-pool', task_pool_test)
+
+thumbnailer_test = executable('tracker-thumbnailer-test',
+ 'empty-gobject.c',
+ 'thumbnailer-mock.c',
+ 'tracker-thumbnailer-test.c',
+ dependencies: [tracker_common_dep, tracker_miner_dep],
+ c_args: test_c_args
+)
+test('miner-thumbnailer', thumbnailer_test)
diff --git a/tests/libtracker-sparql/meson.build b/tests/libtracker-sparql/meson.build
new file mode 100644
index 0000000..91ab4a0
--- /dev/null
+++ b/tests/libtracker-sparql/meson.build
@@ -0,0 +1,19 @@
+test_c_args = ['-DTRACKER_COMPILATION']
+
+resource_test = executable('tracker-resource-test',
+ 'tracker-resource-test.c',
+ dependencies: [tracker_common_dep, tracker_sparql_dep],
+ c_args: test_c_args)
+test('sparql-resource', resource_test)
+
+sparql_test = executable('tracker-sparql-test',
+ 'tracker-sparql-test.c',
+ dependencies: [tracker_common_dep, tracker_sparql_dep],
+ c_args: test_c_args)
+test('sparql', sparql_test)
+
+gb_737023_test = executable('tracker-gb-737023-test',
+ 'tracker-gb-737023.c',
+ dependencies: [tracker_common_dep, tracker_sparql_dep],
+ c_args: test_c_args)
+test('gb_737023', sparql_test)
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..0730a11
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,26 @@
+subdir('common')
+
+subdir('gvdb')
+subdir('libtracker-common')
+subdir('libtracker-data')
+
+if enable_extract
+ subdir('libtracker-extract')
+endif
+
+if enable_fts
+ subdir('libtracker-fts')
+endif
+
+subdir('libtracker-miner')
+subdir('libtracker-sparql')
+subdir('tracker-steroids')
+
+# The test case for writeback doesn't seem to work.
+#if enable_writeback
+# subdir('tracker-writeback')
+#endif
+
+if get_option('functional_tests')
+ subdir('functional-tests')
+endif
diff --git a/tests/tracker-steroids/meson.build b/tests/tracker-steroids/meson.build
new file mode 100644
index 0000000..4cc69dc
--- /dev/null
+++ b/tests/tracker-steroids/meson.build
@@ -0,0 +1,7 @@
+test_c_args = ['-DTRACKER_COMPILATION']
+
+steroids_test = executable('tracker-steroids-test',
+ 'tracker-test.c',
+ dependencies: [tracker_common_dep, tracker_sparql_dep],
+ c_args: test_c_args)
+test('steroids', steroids_test)
diff --git a/utils/meson.build b/utils/meson.build
new file mode 100644
index 0000000..c624b49
--- /dev/null
+++ b/utils/meson.build
@@ -0,0 +1,3 @@
+subdir('mtp')
+subdir('ontology')
+subdir('tracker-resdump')
diff --git a/utils/mtp/meson.build b/utils/mtp/meson.build
new file mode 100644
index 0000000..e5b180d
--- /dev/null
+++ b/utils/mtp/meson.build
@@ -0,0 +1,2 @@
+executable('mtp', 'mtp-dummy.c',
+ dependencies: [tracker_common_dep, tracker_sparql_dep])
diff --git a/utils/ontology/meson.build b/utils/ontology/meson.build
new file mode 100644
index 0000000..7ba45a1
--- /dev/null
+++ b/utils/ontology/meson.build
@@ -0,0 +1,7 @@
+executable('data-validator', 'data-validator.c',
+ dependencies: [tracker_common_dep, tracker_data_dep, tracker_sparql_dep],
+ c_args: ['-DTRACKER_COMPILATION'])
+
+executable('ontology-validator', 'ontology-validator.c',
+ dependencies: [tracker_common_dep, tracker_data_dep, tracker_sparql_dep],
+ c_args: ['-DTRACKER_COMPILATION'])
diff --git a/utils/tracker-resdump/meson.build b/utils/tracker-resdump/meson.build
new file mode 100644
index 0000000..770a506
--- /dev/null
+++ b/utils/tracker-resdump/meson.build
@@ -0,0 +1,2 @@
+executable('tracker-resdump', 'tracker-resdump.vala',
+ dependencies: [tracker_common_dep, tracker_data_dep, tracker_sparql_dep, gee])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]