Commit 68b41e39 authored by Sam Thursfield's avatar Sam Thursfield Committed by Sam Thursfield

Meson build instructions for Tracker

See <http://mesonbuild.com/> for information about Meson.

Remaining issues:

  * There's no `make dist` equivalent. We currently produce release
    tarballs containing the output files of the Vala compiler. We need
    to think through whether we can stop doing that. Shipping the
    generated .c files does make the Vala preprocessor useless so
    it would be good if we can stop.

  * The Firefox, Thunderbird, Evolution and Nautilus plugins are not
    built

  * https://github.com/mesonbuild/meson/issues/671 -- means we can't
    depend on tracker_common_dep in most places and have to manually
    set link_with, include_directories and sources instead.

  * https://github.com/mesonbuild/meson/issues/1469 -- without this we
    have to install generated Vala headers using a script

  * https://github.com/mesonbuild/meson/issues/1229 -- means adding
    the #include guard to libtracker-sparql/tracker-generated-no-checks.h
    is a pain

  * The test suite has some spurious failures.

Here's a rough speed comparison.

Meson:
        time sh -c 'meson .. --prefix=/opt/tracker-meson -D bash_completion=/opt/tracker-meson/share/bash-completion -Dsystemd_user_services=/opt/tracker-meson/lib/systemd/user -Ddbus_services=/opt/tracker-meson/share/dbus-1/services && ninja-build -j 4 && ninja-build install'

        real  1m8.194s
        user  2m16.962s
        sys   0m20.532s

Autotools:
        time sh -c './configure --prefix=/opt/tracker-autotools --with-bash-completion-dir=/opt/tracker-autotools/share/bash-completion --with-session-bus-services-dir=/opt/tracker-autotools/share/dbus-1/services --disable-nautilus-extension && make -j 4 && make install'

        real  2m37.750s
        user  4m37.214s
        sys   0m54.806s

        Plus 30+ seconds of ./autogen.sh first.

Note that Meson builds may fail if your source tree has generated files
from an Autotools build in there. If you see errors about duplicate
definitions, first try cleaning your source tree (use `git clean -dfx`,
but make sure you commit any work first!!)
parent 20c715e2
......@@ -14,6 +14,7 @@
.deps
.libs
config.*
!config.h.meson.in
ABOUT-NLS
aclocal.m4
autom4te.cache
......
/* 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
/* Defined if Sqlite has FTS5 compiled in */
#mesondefine HAVE_BUILTIN_FTS
/* Enca language detection aid */
#mesondefine HAVE_ENCA
/* Define if we have exempi */
#mesondefine HAVE_EXEMPI
/* Define to 1 if you have the `getline' function. */
#mesondefine HAVE_GETLINE
/* Define if we have GStreamer */
#mesondefine HAVE_GSTREAMER
/* Define if we have HAL */
#mesondefine HAVE_HAL
/* 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
/* 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 libmediaart */
#mesondefine HAVE_LIBMEDIAART
/* Define if we have libstemmer */
#mesondefine HAVE_LIBSTEMMER
/* libunistring Unicode support library */
#mesondefine HAVE_LIBUNISTRING
/* Define if we have meegotouch */
#mesondefine HAVE_MEEGOTOUCH
/* Define if we have NetworkManager for network status detection */
#mesondefine HAVE_NETWORK_MANAGER
/* Define to 1 if you have the `posix_fadvise' function. */
#mesondefine HAVE_POSIX_FADVISE
/* Define to 1 if you have the `statvfs64' function. */
#mesondefine HAVE_STATVFS64
/* Define to 1 if you have the `strnlen' function. */
#mesondefine HAVE_STRNLEN
/* Define to 0 if tracker FTS is not compiled */
#mesondefine HAVE_TRACKER_FTS
/* 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 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 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
/* Unzip ps.gz files */
#mesondefine USING_UNZIPPSFILES
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
subdir('tools')
subdir('manpages')
subdir('reference')
version_xml = 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)
version_xml = 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',
content_files: 'overview.sgml',
install: true)
version_xml = 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',
content_files: ['overview.sgml', 'examples.sgml'],
install: true)
subdir('libtracker-control')
subdir('libtracker-miner')
subdir('libtracker-sparql')
subdir('ontology')
version_xml = configure_file(input: 'version.xml.in',
output: 'version.xml',
configuration: conf)
#for f in `find $ONTOLOGIES_DATA_DIR -name "*.description"` ; do
# # ../../src/ontologies/XX-aaa.description -> PREFIX=aaa
# TMPNAME=${f%.description}
# PREFIX=${TMPNAME#*-}
# echo "- Generating $PREFIX documentation"
#
# $TTL2SGML -d $f -o $BUILD_DIR/$PREFIX-ontology.xml \
# -e $ONTOLOGIES_INFO_DIR/$PREFIX/explanation.xml
gen_doc = meson.source_root() + '/docs/tools/gen-doc.sh'
generated = custom_target('ontology-doc-generated',
output: 'gen-doc.stamp',
command: [gen_doc, ttl2sgml, ttlresource2sgml,
meson.source_root() + '/src/ontologies',
meson.source_root() + '/docs/ontologies',
join_paths(meson.current_build_dir(), 'xml/')],
depends: [ttl2sgml, ttlresource2sgml],
# FIXME: this shouldn't be necessary, but currently the 'dependencies'
# parameter to gnome.gtkdoc() doesn't actually trigger building of custom
# targets.
build_always: true
)
gnome.gtkdoc('ontology',
src_dir: include_directories('.'),
main_sgml: 'ontology-docs.sgml',
# FIXME: passing 'generated' here has no effect; the gtkdoc support in
# Meson actually only uses this parameter for building and linking the
# GObject Introspection scanner right now.
dependencies: generated,
install: true)
......@@ -19,6 +19,8 @@
# 02110-1301, USA.
#
set -e
if [ $# -lt 5 ]; then
echo "Insufficient arguments provided"
echo "Usage: $0 <ttl2sgml> <ttlres2sgml> <ontology-data-dir> <ontology-info-dir> <build-dir>"
......@@ -31,14 +33,16 @@ ONTOLOGIES_DATA_DIR=$3
ONTOLOGIES_INFO_DIR=$4
BUILD_DIR=$5
echo "Building class documentation..."
if [ ! -e $BUILD_DIR ]; then
mkdir -p $BUILD_DIR
fi
$TTLRES2SGML -d $ONTOLOGIES_DATA_DIR -o $BUILD_DIR
for f in `find $ONTOLOGIES_DATA_DIR -name "*.description"` ; do
# ../../src/ontologies/XX-aaa.description -> PREFIX=aaa
TMPNAME=${f%.description}
PREFIX=${TMPNAME#*-}
echo "- Generating $PREFIX documentation"
$TTL2SGML -d $f -o $BUILD_DIR/$PREFIX-ontology.xml \
-e $ONTOLOGIES_INFO_DIR/$PREFIX/explanation.xml
......
# 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'])
sources = [
'tracker-miner-test.c',
'tracker-main.c']
executable('tracker-miner-test', sources,
dependencies: [tracker_common_dep, tracker_miner_dep, tracker_sparql_dep]
)
executable('async-connection', 'async-connection.c',
dependencies: [tracker_common_dep, tracker_sparql_dep]
)
executable('class-signal', 'class-signal.c',
dependencies: [tracker_common_dep, tracker_sparql_dep]
)
subdir('libtracker-miner')
subdir('libtracker-sparql')
This diff is collapsed.
option('docs', type: 'boolean', value: true,
description: 'Enable the documentation')
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('guarantee_metadata', type: 'boolean', value: true,
description: 'Set nie:title and nie:contentCreated from filename and mtime if no metadata available')
option('journal', type: 'boolean', value: true,
description: 'Enable database journal backup mechanism')
option('writeback', type: 'boolean', value: true,
description: 'Enable Tracker writeback feature')
option('abiword', type: 'boolean', value: 'true',
description: 'Enable extractor for AbiWord files')
option('dvi', type: 'boolean', value: 'true',
description: 'Enable extractor for DVI metadata')
option('icon', type: 'boolean', value: 'true',
description: 'Enable extractor for ICO metadata')
option('mp3', type: 'boolean', value: 'true',
description: 'Enable extractor for MP3 metadata')
option('ps', type: 'boolean', value: 'true',
description: 'Enable extractor for PS metadata')
option('text', type: 'boolean', value: 'true',
description: 'Enable extractor for TXT metadata')
option('unzip_ps_gz_files', type: 'boolean', value: 'true',
description: 'Enable extractor for PS.GZ metadata')
option('battery_detection', type: 'combo', choices: ['auto', 'hal', 'upower', 'none'], value: 'auto',
description: 'Enable upower or HAL for battery/mains power detection')
option('charset_detection', type: 'combo', choices: ['auto', 'enca', 'icu', 'none'], value: 'auto',
description: 'Enable enca or libicu for charset detection in MP3s')
option('generic_media_extractor', type: 'combo', choices: ['auto', 'gstreamer', 'libav', 'none'], value: 'auto',
description: 'Enables one of the (gstreamer, libav, auto) generic media extractor backends')
option('gstreamer_backend', type: 'combo', choices: ['discoverer', 'gupnp'], value: 'discoverer',
description: 'When GStreamer is used, this enables one of the (discoverer, gupnp) GStreamer backends')
option('meegotouch', type: 'combo', choices: ['auto', 'no', 'yes'], value: 'no',
description: 'Enable libmeegotouch application extraction')
option('stemmer', type: 'combo', choices: ['auto', 'no', 'yes'], value: 'no',
description: 'Enable stemming words while indexing')
option('unicode_support', type: 'combo', choices: ['icu', 'unistring', 'auto'], value: 'auto',
description: 'Unicode support library to use')
option('bash_completion', type: 'string', default: 'yes',
description: 'Directory to install Bash completion files (or "yes" for default directory, "no" to disable installation')
option('dbus_services', type: 'string', default: '',
description: 'Directory to install D-Bus .service files (leave blank to use the value from dbus-1.pc)')
option('systemd_user_services', type: 'string', default: 'yes',
description: 'Directory to install systemd user .service files (or "yes" for default directory, "no" to disable installation)')
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'])
#!/bin/sh
# Post-install script for install stuff that Meson doesn't support directly.
#
# We can't pass the necessary variables directly to the script, so we
# substitute them using configure_file(). It's a bit of a Heath Robinson hack.
set -e
dbus_services_dir="$1"
tracker_miner_services_dir="$2"
mkdir -p ${DESTDIR}/${tracker_miner_services_dir}
ln -sf "${dbus_services_dir}/tracker-extract.service" "${DESTDIR}/${tracker_miner_services_dir}/tracker-extract.service"
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('..'),
)
#!/bin/sh
# Script to install generated .h files. This only exists to workaround
# a Meson bug: https://github.com/mesonbuild/meson/issues/705
set -e
HEADER="$1"
TARGET_DIR="$2"
mkdir -p "$DESTDIR$2"
cp $1 "$DESTDIR$2"
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',
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,
],
# This doesn't depend on tracker_common_dep because of
# https://github.com/mesonbuild/meson/issues/671
dependencies: [glib, gio, gio_unix, tracker_sparql_intermediate_dep],
include_directories: [commoninc, configinc, srcinc],
link_with: libtracker_common,
sources: tracker_common_enum_header,
)
tracker_sparql_bus_dep = declare_dependency(
link_with: libtracker_bus,
include_directories: include_directories('.')
)
#!/bin/sh
# Write the Git SHA1 of the libtracker-common subdir to a header file.
#
# This is used in tracker-db-manager.c to regenerate FTS tables if the parser
# code used by the FTS tokenizer code could have changed.
#
# It's important that this script doesn't touch the output file unless it needs
# to. If it updates the file unconditionally, everything will rebuild from
# scratch every time Meson reexecutes.
set -eu
SRCDIR=${MESON_SOURCE_ROOT}/src/libtracker-common
BUILDDIR=${MESON_BUILD_ROOT}/src/libtracker-common
cached_sha1=$(cat ${BUILDDIR}/tracker-parser-sha1.cached || echo "")
new_sha1=$(git -C ${SRCDIR} log -n1 --format=format:%H -- . )
if [ "$cached_sha1" != "$new_sha1" ]; then
echo "#define TRACKER_PARSER_SHA1 \"${new_sha1}\"" > ${BUILDDIR}/tracker-parser-sha1.h
echo ${new_sha1} > ${BUILDDIR}/tracker-parser-sha1.cached
fi
subdir('stop-words')
enums = gnome.mkenums('tracker-enum-types',
sources: 'tracker-enums.h',
c_template: 'tracker-enum-types.c.template',
h_template: 'tracker-enum-types.h.template',
)
tracker_common_enum_header = enums[1]
parser_sha1_header = configure_file(
input: 'tracker-parser-sha1.h.in',
output: 'tracker-parser-sha1.h',
command: ['generate-tracker-parser-sha1-header.sh'])
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',
'tracker-seccomp.c',
enums[0], enums[1],
parser_sha1_header,
]
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 = [glib, gio, gio_unix, libmath]
libtracker_common = library('tracker-common',
tracker_common_sources,
dependencies: tracker_common_dependencies + [unicode_library],
c_args: [
'-DTRACKER_COMPILATION',
],
include_directories: [configinc, srcinc],
install: true,
install_dir: tracker_internal_libs_dir,
)
commoninc = include_directories('.')
# This dependency can't be used everywhere right now. The issue is that if
# every other library depends on this one, we end up with a combinatorial
# explosion that results in the link line for src/tracker/tracker being
# nearly 200,000 characters long which causes this kind of error:
#
# Linking target src/tracker/tracker
# ninja: fatal: posix_spawn: Argument list too long
#
# Upstream issue: https://github.com/mesonbuild/meson/issues/671
tracker_common_dep = declare_dependency(
sources: enums[1],
link_with: libtracker_common,
dependencies: tracker_common_dependencies,
include_directories: [configinc, srcinc, commoninc],
)
stopwords_files = [
'stopwords.da',
'stopwords.de',
'stopwords.en',
'stopwords.es',
'stopwords.fi',
'stopwords.fr',
'stopwords.hu',
'stopwords.it',
'stopwords.nb',
'stopwords.nl',
'stopwords.pt',
'stopwords.ru',
'stopwords.sv'
]
stopwords_install_dir = join_paths(
get_option('datadir'), 'tracker', 'stop-words')
install_data(stopwords_files,
install_dir: stopwords_install_dir)
sources = ['tracker-miner-manager.c']
headers = ['tracker-control.h', 'tracker-miner-manager.h']
libtracker_control = library('tracker-control-' + tracker_api_version,
sources,
c_args: '-DTRACKER_COMPILATION',
install: true,
install_rpath: tracker_internal_libs_dir,
# This doesn't depend on tracker_common_dep because of
# https://github.com/mesonbuild/meson/issues/671
dependencies: [gio, tracker_sparql_dep, tracker_miner_dep],
include_directories: [commoninc, configinc, srcinc],
link_with: libtracker_common,
sources: tracker_common_enum_header,
)
tracker_control_dep = declare_dependency(
link_with: libtracker_control,
dependencies: tracker_miner_dep
)
tracker_control_gir = gnome.generate_gir(libtracker_control,
sources: sources + headers,
nsversion: tracker_api_version,
namespace: 'TrackerControl',
identifier_prefix: 'Tracker',
symbol_prefix: 'tracker',
includes : ['GLib-2.0', 'GObject-2.0', 'Gio-2.0' ],
install: true,
extra_args: '--c-include=libtracker-control/tracker-control.h')
configure_file(
input: 'tracker-control.pc.in',
output: 'tracker-control-1.0.pc',
configuration: conf,
install: true,
install_dir: join_paths(get_option('prefix'), get_option('libdir'), 'pkgconfig'))
install_headers (headers,
subdir: 'tracker-1.0/libtracker-control')
# 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-sparql-query',
'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',
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,
],
# This doesn't depend on tracker_common_dep because of
# https://github.com/mesonbuild/meson/issues/671
dependencies: [glib, gio, tracker_sparql_intermediate_dep],
include_directories: [commoninc, configinc, srcinc],
sources: tracker_common_enum_header,
)
tracker_data_dependencies = [
tracker_sparql_intermediate_dep, gvdb_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',
c_args: [
'-DTRACKER_COMPILATION',
],
install: true,
install_dir: tracker_internal_libs_dir,
# This doesn't depend on tracker_common_dep because of
# https://github.com/mesonbuild/meson/issues/671
link_with: [libtracker_data_vala],
dependencies: tracker_data_dependencies + [unicode_library],
include_directories: [commoninc, configinc, srcinc],
)
tracker_data_dep = declare_dependency(
link_with: [libtracker_data, libtracker_data_vala],
dependencies: tracker_data_dependencies,
include_directories: include_directories('.')
)
libtracker_direct = static_library('tracker-direct',
'tracker-direct.vala',
'tracker-namespace.vala',
'../libtracker-common/libtracker-common.vapi',
'../libtracker-data/libtracker-data.vapi',
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,
],
# This doesn't depend on tracker_common_dep because of
# https://github.com/mesonbuild/meson/issues/671
dependencies: [ glib, gio, tracker_data_dep ],
include_directories: [commoninc, configinc, srcinc],
)
tracker_sparql_direct_dep = declare_dependency(
link_with: libtracker_direct,
include_directories: include_directories('.')
)
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
tracker_extract_dependencies = [charset_library, gmodule]
if exempi.found()