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')
project('tracker', 'c', 'vala', 'cpp', version: '1.13.0')
gnome = import('gnome')
i18n = import('i18n')
cc = meson.get_compiler('c')
# 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'
avcodec = dependency('libavcodec', version: '>= 0.8.4', required: false)
avformat = dependency('libavformat', version: '>= 0.8.4', required: false)
avutil = dependency('libavutil', version: '>= 0.8.4', required: false)
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-plugin-3.0', 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)
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', required: false)
gstreamer_pbutils = dependency('gstreamer-pbutils-1.0', required: false)
gstreamer_tag = dependency('gstreamer-tag-1.0', 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)
gupnp_dlna_gst = dependency('gupnp-dlna-gst-2.0', version: '> 0.9.4', 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)
json_glib = dependency('json-glib-1.0', version: '>= 1.0', required: true)
libcue = dependency('libcue', 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)
libgxps = dependency('libgxps', 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)
libsoup = dependency('libsoup-2.4', version: '> 2.40', required: true)
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)
nautilus_extension = dependency('libnautilus-extension', 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)
totem_plparser = dependency('totem-plparser', required: false)
upower = dependency('libupower-glib', version: '> 0.9.0', required: false)
zlib = dependency('zlib')
libgif = cc.find_library('libgif', required: false)
libjpeg = cc.find_library('libjpeg', required: false)
libmath = cc.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 = cc.find_library('uuid')
# There are various gchar vs. unsigned char warnings that occur in extract
# modules, it's not worth adding casts everywhere so we disable the warning.
add_project_arguments('-Wno-pointer-sign', language: 'c')
enable_fts = get_option('fts')
enable_extract = get_option('extract')
enable_writeback = get_option('writeback')
##################################################################
# Check for libtracker-common, make sure libstemmer exists
##################################################################
have_libstemmer = false
if get_option('stemmer') != 'no'
stemmer = cc.find_library('stemmer')
if stemmer.found()
have_libstemmer = true
elif get_option('stemmer') == 'yes'
error('stemmer support explicitly requested, but stemmer library 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 = cc.compiles(sqlite3_builtin_fts5_test,
name: 'sqlite3 has builtin FTS5 module')
endif
##################################################################
# Check for libtracker-common: battery/mains power detection
#
# By default, AUTO with this order of preference:
# 1) upower
# 2) hal
##################################################################
have_hal = false
battery_detection_library_name = ''
if upower.found()
if get_option('battery_detection') == 'auto' or get_option('battery_detection') == 'upower'
battery_detection_library = upower
battery_detection_library_name = 'upower'
endif
elif get_option('battery_detection') == 'upower'
error('upower explicitly requested, but upower library was not found')
endif
if battery_detection_library_name == ''
hal = dependency('hal', version: '> 0.5', required: false)
if hal.found()
battery_detection_library = hal
battery_detection_library_name = 'hal'
elif get_option('battery_detection') == 'hal'
error('HAL explicitly requested, but not found')
else
battery_detection_library_name = '(none)'
endif
endif
##################################################################
# 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'
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 = cc.find_library('libunistring', required: false)
if libunistring.found()
unicode_library = libunistring
unicode_library_name = 'unistring'
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 meegotouch library couldn\'t be found')
endif
endif
####################################################################
# Check for tracker-miner-evolution
####################################################################
if camel.found() and eds.found() and evo_plugin.found() and evo_shell.found() and libemail_utils.found() and libemail_engine.found()
have_tracker_miner_evolution = true
tracker_miner_evolution_install_dir = evo_plugin.get_variable('plugindir')
else
have_tracker_miner_evolution = false
tracker_miner_evolution_install_dir = ''
endif
####################################################################
# Check for tracker-miner-thunderbird
####################################################################
thunderbird = find_program('thunderbird', required: false)
if thunderbird.found()
thunderbird_version = run_command(thunderbird, '--version').stdout().strip().split()[1]
message('Found Mozilla Thunderbird email client version ' + thunderbird_version)
have_tracker_miner_thunderbird = true
tracker_miner_thunderbird_install_dir = join_paths(get_option('prefix'), 'lib', 'thunderbird-' + thunderbird_version, 'extensions')
else
have_tracker_miner_thunderbird = false
tracker_miner_thunderbird_install_dir = ''
endif
####################################################################
# Check for tracker-miner-firefox
####################################################################
firefox = find_program('firefox', required: false)
if firefox.found()
firefox_version = run_command(firefox, '--version').stdout().strip().split()[2]
message('Found Mozilla Firefox web browser version ' + firefox_version)
have_tracker_miner_firefox = true
tracker_miner_firefox_install_dir = join_paths(get_option('prefix'), 'lib', 'firefox-' + firefox_version, 'extensions')
else
have_tracker_miner_firefox = false
tracker_miner_firefox_install_dir = ''
endif
####################################################################
# Check for nautilus extension
####################################################################
if nautilus_extension.found()
nautilus_extension = dependency('libnautilus-extension', required: true)
tracker_nautilus_extension_install_dir = nautilus_extension.get_pkgconfig_variable('extensiondir')
else
tracker_nautilus_extension_install_dir = ''
endif
####################################################################
# 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]
)
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()
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-extract: gstreamer/etc
####################################################################
generic_media_handler = []
generic_media_handler_name = 'none'
if get_option('generic_media_extractor') == 'auto'
if gstreamer.found() and gstreamer_tag.found()
generic_media_handler = [gstreamer, gstreamer_tag]
generic_media_handler_name = 'gstreamer'
elif avcodec.found() and avformat.found() and avutil.found()
generic_media_handler = [avcodec, avformat, avutil]
generic_media_handler_name = 'libav'
else
generic_media_handler_name = 'none'
generic_media_handler = []
endif
elif get_option('generic_media_extractor') == 'gstreamer'
if gstreamer.found() and gstreamer_tag.found()
generic_media_handler = [gstreamer, gstreamer_tag]
generic_media_handler_name = 'gstreamer'
else
error('GStreamer media handler was enabled but required GStreamer libraries were not found')
endif
elif get_option('generic_media_extractor') == 'libav'
if avcodec.found() and avformat.found() and avutil.found()
generic_media_handler = [avcodec, avformat, avutil]
generic_media_handler_name = 'libav'
else
error('libav media handler was enabled but required libav libraries were not found')
endif
endif
###########################################################################
# Check for gstreamer backend: tagreadbin/decodebin2/discoverer/gupnp-dlna
###########################################################################
gstreamer_backend_name = ''
if generic_media_handler_name == 'gstreamer'
if get_option('gstreamer_backend') == 'discoverer'
if gstreamer_pbutils.found()
gstreamer_backend_name = 'Discoverer'
else
error('GStreamer Discoverer backend requires GStreamer pbutils library')
endif
elif get_option('gstreamer_backend') == 'gupnp'
if gupnp_dlna.found() and gupnp_dlna_gst.found()
gstreamer_backend_name = 'GUPnP-DNLA'
else
error('GStreamer GUPnP-DNLA backend requires the gupNp and gupnp-gst libraries')
endif
endif
endif
####################################################################
# D-Bus service files
####################################################################
if get_option('dbus_services') == ''
dbus_services_dir = dbus.get_pkgconfig_variable('session_bus_services_dir')
else
dbus_services_dir = get_option('dbus_services')
endif
####################################################################
# systemd user services
####################################################################
install_systemd_user_services = false
if get_option('systemd_user_services') == 'yes' or get_option('systemd_user_services') == 'auto'
systemd = dependency('systemd', required: false)
if systemd.found()
systemd_user_services_dir = systemd.get_pkgconfig_variable('systemduserunitdir')
else
systemd_user_services_dir = join_paths(get_option('libdir'), 'systemd', 'user')
endif
install_systemd_user_services = true
elif get_option('systemd_user_services') == 'no' or get_option('systemd_user_services') == ''
install_systemd_user_services = false
systemd_user_services_dir = '(disabled)'
else
install_systemd_user_services = true
systemd_user_services_dir = get_option('systemd_user_services')
endif
####################################################################
# bash-completion
####################################################################
install_bash_completion = false
if get_option('bash_completion') == 'yes' or get_option('bash_completion') == 'auto'
bash_completion_package = dependency('bash-completion', required: false)
if bash_completion_package.found()
bash_completion_dir = bash_completion_package.get_variable('completionsdir')
else
bash_completion_dir = join_paths(get_option('prefix'), get_option('datadir'), 'bash-completion', 'completions')
endif
install_bash_completion = true
elif get_option('bash_completion') == 'no' or get_option('bash_completion') == ''
install_bash_completion = false
bash_completion_dir = '(disabled)'
else
install_bash_completion = true
bash_completion_dir = get_option('bash_completion')
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 = configuration_data()
# Config that goes in config.h
conf.set('DISABLE_JOURNAL', get_option('journal') == false)
conf.set('USING_UNZIPPSFILES', get_option('unzip_ps_gz_files') == false)
conf.set('HAVE_TRACKER_EXTRACT', enable_extract)
conf.set10('HAVE_TRACKER_FTS', enable_fts)
conf.set('HAVE_TRACKER_WRITEBACK', enable_writeback)
conf.set('HAVE_BUILTIN_FTS', sqlite3_has_builtin_fts5)
conf.set('HAVE_ENCA', charset_library_name == 'enca')
conf.set('HAVE_EXEMPI', exempi.found())
conf.set('HAVE_GSTREAMER', generic_media_handler_name == 'gstreamer')
conf.set('GSTREAMER_BACKEND_DISCOVERER', gstreamer_backend_name == 'Discoverer')
conf.set('GSTREAMER_BACKEND_GUPNP_DLNA', gstreamer_backend_name == 'GUPnP-DNLA')
conf.set('HAVE_HAL', battery_detection_library_name == 'hal')
conf.set('HAVE_LIBCUE', libcue.found())
conf.set('HAVE_LIBCUE2', libcue.version() >= '2.0.0')
conf.set10('HAVE_LIBICU', unicode_library_name == 'icu')
conf.set('HAVE_LIBICU_CHARSET_DETECTION', charset_library_name == 'icu')
conf.set('HAVE_LIBEXIF', libexif.found())
conf.set('HAVE_LIBIPTCDATA', libiptcdata.found())
conf.set('HAVE_LIBMEDIAART', libmediaart.found())