diff options
author | Mart Raudsepp <leio@gentoo.org> | 2019-02-15 12:35:17 +0200 |
---|---|---|
committer | Mart Raudsepp <leio@gentoo.org> | 2019-02-15 14:29:35 +0200 |
commit | 21513d07e86f32a113457aee5987625a7c6e1745 (patch) | |
tree | 3f86c580264f8706ab39b9e182e6cbcb35d5a153 /app-misc | |
parent | net-libs/nodejs: Version 11.10.0 (diff) | |
download | gentoo-21513d07e86f32a113457aee5987625a7c6e1745.tar.gz gentoo-21513d07e86f32a113457aee5987625a7c6e1745.tar.bz2 gentoo-21513d07e86f32a113457aee5987625a7c6e1745.zip |
app-misc/tracker-miners: add upstream split tracker miners package
Bug: https://bugs.gentoo.org/672308
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/tracker-miners/Manifest | 1 | ||||
-rw-r--r-- | app-misc/tracker-miners/files/2.1.5-meson-fixes.patch | 322 | ||||
-rw-r--r-- | app-misc/tracker-miners/files/2.1.5-test-fix.patch | 50 | ||||
-rw-r--r-- | app-misc/tracker-miners/metadata.xml | 17 | ||||
-rw-r--r-- | app-misc/tracker-miners/tracker-miners-2.1.5.ebuild | 139 |
5 files changed, 529 insertions, 0 deletions
diff --git a/app-misc/tracker-miners/Manifest b/app-misc/tracker-miners/Manifest new file mode 100644 index 000000000000..30724f741a20 --- /dev/null +++ b/app-misc/tracker-miners/Manifest @@ -0,0 +1 @@ +DIST tracker-miners-2.1.5.tar.xz 3455264 BLAKE2B 1e9149ae0767166fc8e936922e4e02d4391f7af3faf59525e32098fb10cb6c5f6970f13bdb35f675efc9f131672b3feb84cbdcd8d0f01c86d05880919fba463a SHA512 37bf6d44635843037613cfe681cd536a8b33ba34c092183d9d66289713deaaff5322d09028b447484e6bf72a01199c041fb295d6431d2f7cff3498ef8983f605 diff --git a/app-misc/tracker-miners/files/2.1.5-meson-fixes.patch b/app-misc/tracker-miners/files/2.1.5-meson-fixes.patch new file mode 100644 index 000000000000..c8a3e6358df8 --- /dev/null +++ b/app-misc/tracker-miners/files/2.1.5-meson-fixes.patch @@ -0,0 +1,322 @@ +From 5bb0709044fabe496601277ab5ba11a03500babe Mon Sep 17 00:00:00 2001 +From: Mart Raudsepp <leio@gentoo.org> +Date: Fri, 15 Feb 2019 00:15:08 +0200 +Subject: [PATCH 1/5] build: Add feature options for all external deps + +Automagic dependencies are bad for distributions. Add feature options +for all of them that didn't have it before. If no options are specified, +the behavior matches with before, but now it's possible to specify +exactly what is linked to and what isn't. + +Fixes: #39 +--- + meson.build | 40 +++++++++++++++++++++------------------- + meson_options.txt | 37 +++++++++++++++++++++++++++++++++++++ + 2 files changed, 58 insertions(+), 19 deletions(-) + +diff --git a/meson.build b/meson.build +index fd536f2e6..4f0e9a968 100644 +--- a/meson.build ++++ b/meson.build +@@ -1,4 +1,6 @@ +-project('tracker-miners', 'c', 'vala', version: '2.1.5') ++project('tracker-miners', 'c', 'vala', ++ version: '2.1.5', ++ meson_version: '>=0.47') + + gnome = import('gnome') + i18n = import('i18n') +@@ -57,9 +59,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) + dbus = dependency('dbus-1', version: '> 1.3.1') +-exempi = dependency('exempi-2.0', version: '> 2.1.0', required: false) +-flac = dependency('flac', version: '> 1.2.1', required: false) +-gexiv2 = dependency('gexiv2', required: false) ++exempi = dependency('exempi-2.0', version: '> 2.1.0', required: get_option('xmp')) ++flac = dependency('flac', version: '> 1.2.1', required: get_option('flac')) ++gexiv2 = dependency('gexiv2', required: get_option('raw')) + 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) +@@ -72,25 +74,25 @@ 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) +-libcue = dependency('libcue', required: false) +-libexif = dependency('libexif', version: '> 0.6', required: false) +-libgsf = dependency('libgsf-1', version: '> 1.14.24', required: false) +-libgxps = dependency('libgxps', required: false) +-libiptcdata = dependency('libiptcdata', required: false) +-libjpeg = dependency('libjpeg', required: false) +-libosinfo = dependency('libosinfo-1.0', version: '> 0.2.9', required: false) +-libpng = dependency('libpng', version: '> 0.89', required: false) ++libcue = dependency('libcue', required: get_option('cue')) ++libexif = dependency('libexif', version: '> 0.6', required: get_option('exif')) ++libgsf = dependency('libgsf-1', version: '> 1.14.24', required: get_option('gsf')) ++libgxps = dependency('libgxps', required: get_option('xps')) ++libiptcdata = dependency('libiptcdata', required: get_option('iptc')) ++libjpeg = dependency('libjpeg', required: get_option('jpeg')) ++libosinfo = dependency('libosinfo-1.0', version: '> 0.2.9', required: get_option('iso')) ++libpng = dependency('libpng', version: '> 0.89', required: get_option('png')) + libseccomp = dependency('libseccomp', version: '>= 2.0', required: false) +-libtiff = dependency('libtiff-4', required: false) +-libxml2 = dependency('libxml-2.0', version: '> 2.6') +-libvorbis = dependency('vorbisfile', version: '> 0.22') +-poppler = dependency('poppler-glib', version: '> 0.16.0', required: false) +-taglib = dependency('taglib_c', version: '> 1.6', required: false) +-totem_plparser = dependency('totem-plparser', required: false) ++libtiff = dependency('libtiff-4', required: get_option('tiff')) ++libxml2 = dependency('libxml-2.0', version: '> 2.6', required: get_option('xml')) ++libvorbis = dependency('vorbisfile', version: '> 0.22', required: get_option('vorbis')) ++poppler = dependency('poppler-glib', version: '> 0.16.0', required: get_option('pdf')) ++taglib = dependency('taglib_c', version: '> 1.6', required: get_option('taglib')) ++totem_plparser = dependency('totem-plparser', required: get_option('playlist')) + upower = dependency('upower-glib', version: '> 0.9.0', required: false) + zlib = dependency('zlib') + +-libgif = cc.find_library('gif', required: false) ++libgif = cc.find_library('gif', required: get_option('gif')) + libmath = cc.find_library('m', required: false) + + # FIXME: here we work around a quirk todo with Meson and Vala: the 'uuid' +diff --git a/meson_options.txt b/meson_options.txt +index a91ac6c0f..5fce7a529 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -35,6 +35,43 @@ option('text', type: 'boolean', value: 'true', + option('unzip_ps_gz_files', type: 'boolean', value: 'true', + description: 'Enable extractor for PS.GZ metadata') + ++option('cue', type: 'feature', value: 'auto', ++ description: 'Support cue sheet parsing') ++option('exif', type: 'feature', value: 'auto', ++ description: 'Support EXIF metadata') ++option('flac', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from Flac audio') ++option('gif', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from GIF images') ++option('gsf', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from MS & Open Office documents') ++option('iptc', type: 'feature', value: 'auto', ++ description: 'Support IPTC photo metadata') ++option('iso', type: 'feature', value: 'auto', ++ description: 'Support ISO image parsing') ++option('jpeg', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from JPEG images') ++option('pdf', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from PDF documents') ++option('playlist', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from playlists (w/ Totem)') ++option('png', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from PNG images') ++option('raw', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from RAW photos') ++option('taglib', type: 'feature', value: 'auto', ++ description: 'Support writeback for audio files using Taglib') ++option('tiff', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from TIFF images') ++option('vorbis', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from Vorbis (ogg/etc) files') ++option('xml', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from XML and HTML documents') ++option('xmp', type: 'feature', value: 'auto', ++ description: 'Support XMP metadata') ++option('xps', type: 'feature', value: 'auto', ++ description: 'Support extracting metadata from XPS documents') ++ + 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', +-- +2.17.0 + + +From b8c1768696c13275f5896374907fa192140ec922 Mon Sep 17 00:00:00 2001 +From: Mart Raudsepp <leio@gentoo.org> +Date: Fri, 15 Feb 2019 00:18:09 +0200 +Subject: [PATCH 2/5] build: Fix minimum dep checks to allow the specified + version too + +Many of the minimum deps were expressed as "> x.y", but were meant to +allow x.y itself as well. Change all to ">= x.y". This seems to be +what was intended and was the case with autotools. +--- + meson.build | 44 ++++++++++++++++++++++---------------------- + 1 file changed, 22 insertions(+), 22 deletions(-) + +diff --git a/meson.build b/meson.build +index 4f0e9a968..4263faf95 100644 +--- a/meson.build ++++ b/meson.build +@@ -58,38 +58,38 @@ endif + 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) +-dbus = dependency('dbus-1', version: '> 1.3.1') +-exempi = dependency('exempi-2.0', version: '> 2.1.0', required: get_option('xmp')) +-flac = dependency('flac', version: '> 1.2.1', required: get_option('flac')) ++dbus = dependency('dbus-1', version: '>= 1.3.1') ++exempi = dependency('exempi-2.0', version: '>= 2.1.0', required: get_option('xmp')) ++flac = dependency('flac', version: '>= 1.2.1', required: get_option('flac')) + gexiv2 = dependency('gexiv2', required: get_option('raw')) +-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) ++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) +-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) ++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) + libcue = dependency('libcue', required: get_option('cue')) +-libexif = dependency('libexif', version: '> 0.6', required: get_option('exif')) +-libgsf = dependency('libgsf-1', version: '> 1.14.24', required: get_option('gsf')) ++libexif = dependency('libexif', version: '>= 0.6', required: get_option('exif')) ++libgsf = dependency('libgsf-1', version: '>= 1.14.24', required: get_option('gsf')) + libgxps = dependency('libgxps', required: get_option('xps')) + libiptcdata = dependency('libiptcdata', required: get_option('iptc')) + libjpeg = dependency('libjpeg', required: get_option('jpeg')) +-libosinfo = dependency('libosinfo-1.0', version: '> 0.2.9', required: get_option('iso')) +-libpng = dependency('libpng', version: '> 0.89', required: get_option('png')) ++libosinfo = dependency('libosinfo-1.0', version: '>= 0.2.9', required: get_option('iso')) ++libpng = dependency('libpng', version: '>= 0.89', required: get_option('png')) + libseccomp = dependency('libseccomp', version: '>= 2.0', required: false) + libtiff = dependency('libtiff-4', required: get_option('tiff')) +-libxml2 = dependency('libxml-2.0', version: '> 2.6', required: get_option('xml')) +-libvorbis = dependency('vorbisfile', version: '> 0.22', required: get_option('vorbis')) +-poppler = dependency('poppler-glib', version: '> 0.16.0', required: get_option('pdf')) +-taglib = dependency('taglib_c', version: '> 1.6', required: get_option('taglib')) ++libxml2 = dependency('libxml-2.0', version: '>= 2.6', required: get_option('xml')) ++libvorbis = dependency('vorbisfile', version: '>= 0.22', required: get_option('vorbis')) ++poppler = dependency('poppler-glib', version: '>= 0.16.0', required: get_option('pdf')) ++taglib = dependency('taglib_c', version: '>= 1.6', required: get_option('taglib')) + totem_plparser = dependency('totem-plparser', required: get_option('playlist')) +-upower = dependency('upower-glib', version: '> 0.9.0', required: false) ++upower = dependency('upower-glib', version: '>= 0.9.0', required: false) + zlib = dependency('zlib') + + libgif = cc.find_library('gif', required: get_option('gif')) +@@ -143,7 +143,7 @@ elif get_option('battery_detection') == 'upower' + endif + + if battery_detection_library_name == '' +- hal = dependency('hal', version: '> 0.5', required: false) ++ hal = dependency('hal', version: '>= 0.5', required: false) + + if hal.found() + battery_detection_library = hal +-- +2.17.0 + + +From 6a215b9088abb9df4a837c1b74f281454f286ddf Mon Sep 17 00:00:00 2001 +From: Mart Raudsepp <leio@gentoo.org> +Date: Fri, 15 Feb 2019 01:11:23 +0200 +Subject: [PATCH 3/5] build: Remove unnecessary vala language dependency + +tracker-miners doesn't use any vala, but due to vala declared as +a used language it does error out if valac isn't found. Remove the +language and unused vapi helper variable. +--- + meson.build | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 4263faf95..bfd2d624b 100644 +--- a/meson.build ++++ b/meson.build +@@ -1,4 +1,4 @@ +-project('tracker-miners', 'c', 'vala', ++project('tracker-miners', 'c', + version: '2.1.5', + meson_version: '>=0.47') + +@@ -385,7 +385,6 @@ tracker_writeback_modules_dir = join_paths(get_option('prefix'), get_option('lib + tracker_uninstalled_extract_rules_dir = join_paths(meson.current_build_dir(), 'src', 'tracker-extract') + + gsettings_schema_dir = join_paths(get_option('prefix'), get_option('datadir'), 'glib-2.0', 'schemas') +-vapi_dir = join_paths(get_option('prefix'), get_option('datadir'), 'vala', 'vapi') + + glib_mkenums = find_program('glib-mkenums') + +-- +2.17.0 + + +From a163936b590184291c6ac6b8365eb5f7e9bf3474 Mon Sep 17 00:00:00 2001 +From: Mart Raudsepp <leio@gentoo.org> +Date: Fri, 15 Feb 2019 01:12:25 +0200 +Subject: [PATCH 4/5] build: Remove unnecessary uuid util-linux hard dependency + +tracker core might use uuid, but nothing in tracker-miners needs it +--- + meson.build | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/meson.build b/meson.build +index bfd2d624b..8d23a1157 100644 +--- a/meson.build ++++ b/meson.build +@@ -95,14 +95,6 @@ zlib = dependency('zlib') + libgif = cc.find_library('gif', required: get_option('gif')) + libmath = cc.find_library('m', required: false) + +-# 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') +- + have_tracker_extract = get_option('extract') + have_tracker_miner_apps = get_option('miner_apps') + have_tracker_miner_fs = get_option('miner_fs') +-- +2.17.0 + + +From cc87c22592868e700333f31f333bf850c89f0135 Mon Sep 17 00:00:00 2001 +From: Sam Thursfield <sam@afuera.me.uk> +Date: Sun, 7 Oct 2018 23:42:28 +0200 +Subject: [PATCH 5/5] build: Fix breakage when libcue isn't found + +Commit 6e281037a5f0abc introduced a regression on systems where libcue +is not available. + +Fixes https://gitlab.gnome.org/GNOME/tracker-miners/issues/33 + +(cherry picked from commit fd0eb3cd98f279591cbe8635eadf42027dd5ddae) +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 8d23a1157..d69588435 100644 +--- a/meson.build ++++ b/meson.build +@@ -303,7 +303,7 @@ conf.set('GSTREAMER_BACKEND_DISCOVERER', gstreamer_backend_name == 'Discoverer') + conf.set('GSTREAMER_BACKEND_GUPNP_DLNA', gstreamer_backend_name == 'GUPnP-DLNA') + 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.set('HAVE_LIBCUE2', libcue.found() and libcue.version().version_compare('>= 2.0.0')) + conf.set('HAVE_LIBICU_CHARSET_DETECTION', charset_library_name == 'icu') + conf.set('HAVE_LIBEXIF', libexif.found()) + conf.set('HAVE_LIBIPTCDATA', libiptcdata.found()) +-- +2.17.0 + diff --git a/app-misc/tracker-miners/files/2.1.5-test-fix.patch b/app-misc/tracker-miners/files/2.1.5-test-fix.patch new file mode 100644 index 000000000000..be979e6af057 --- /dev/null +++ b/app-misc/tracker-miners/files/2.1.5-test-fix.patch @@ -0,0 +1,50 @@ +From 02a54749117d609d75bad80331024661c2e598ce Mon Sep 17 00:00:00 2001 +From: Mart Raudsepp <leio@gentoo.org> +Date: Fri, 15 Feb 2019 12:20:39 +0200 +Subject: [PATCH] libtracker-miners-common: improve path_evaluate_name + environment handling + +Under some environments $PWD might not point where we expect, so simply +use g_get_current_dir() instead. +g_getenv() is documented to return a pointer that may get overwritten +by subsequent calls to g_getenv, g_setenv of g_unsetenv. As even after +removing the second g_getenv, there's still g_setenv calls, take a copy. +--- + .../libtracker-miners-common/tracker-file-utils-test.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/tests/libtracker-miners-common/tracker-file-utils-test.c b/tests/libtracker-miners-common/tracker-file-utils-test.c +index 93b94472c..3f86a0cdc 100644 +--- a/tests/libtracker-miners-common/tracker-file-utils-test.c ++++ b/tests/libtracker-miners-common/tracker-file-utils-test.c +@@ -134,14 +134,14 @@ test_path_list_filter_duplicates_with_exceptions () + static void + test_path_evaluate_name (void) + { +- gchar *result, *expected; +- +- const gchar *home = g_getenv ("HOME"); +- const gchar *pwd = g_getenv ("PWD"); ++ gchar *result, *expected, *home, *pwd; + + const gchar *test = "/one/two"; + gchar *parent_dir; + ++ home = g_strdup (g_getenv ("HOME")); ++ pwd = g_get_current_dir (); ++ + g_setenv ("TEST_TRACKER_DIR", test, TRUE); + + +@@ -219,6 +219,8 @@ test_path_evaluate_name (void) + result = tracker_path_evaluate_name (tracker_test_helpers_get_nonutf8 ()); + g_assert_cmpstr (result, ==, tracker_test_helpers_get_nonutf8 ()); + ++ g_free (home); ++ g_free (pwd); + g_unsetenv ("TEST_TRACKER_DIR"); + } + +-- +2.17.0 + diff --git a/app-misc/tracker-miners/metadata.xml b/app-misc/tracker-miners/metadata.xml new file mode 100644 index 000000000000..82957eafdf0d --- /dev/null +++ b/app-misc/tracker-miners/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> + </maintainer> + <use> + <flag name="cue">Enable cue sheet parsing</flag> + <flag name="gsf">Enable <pkg>gnome-extra/libgsf</pkg> based data extractor and + for ODT.</flag> + <flag name="iptc">Enable extraction of IPTC data from pictures</flag> + <flag name="iso">Enable extraction of metadata from ISO disk images</flag> + <flag name="playlist">Add support for playlists</flag> + <flag name="xps">Add support for XPS file format through <pkg>app-text/libgxps</pkg>.</flag> + </use> +</pkgmetadata> diff --git a/app-misc/tracker-miners/tracker-miners-2.1.5.ebuild b/app-misc/tracker-miners/tracker-miners-2.1.5.ebuild new file mode 100644 index 000000000000..3759fc10e2ab --- /dev/null +++ b/app-misc/tracker-miners/tracker-miners-2.1.5.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} ) + +inherit gnome.org gnome2-utils meson python-any-r1 systemd xdg + +DESCRIPTION="A tagging metadata database, search tool and indexer" +HOMEPAGE="https://wiki.gnome.org/Projects/Tracker" + +LICENSE="GPL-2+ LGPL-2.1+" +SLOT="0" +IUSE="cue exif ffmpeg flac gif gsf +gstreamer iptc +iso +jpeg libav +pdf +playlist raw +rss seccomp test +taglib +tiff upower +vorbis +xml xmp xps" + +REQUIRED_USE="cue? ( gstreamer )" # cue is currently only supported via gstreamer, not ffmpeg/libav + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +# tracker-2.1.7 currently always depends on ICU (theoretically could be libunistring instead); so choose ICU over enca always here for the time being (ICU is preferred) +RDEPEND=" + >=dev-libs/glib-2.46:2 + >=app-misc/tracker-2.1.0:= + gstreamer? ( + media-libs/gstreamer:1.0 + media-libs/gst-plugins-base:1.0 ) + !gstreamer? ( + ffmpeg? ( + libav? ( media-video/libav:0= ) + !libav? ( media-video/ffmpeg:0= ) ) ) + + >=sys-apps/dbus-1.3.1 + xmp? ( >=media-libs/exempi-2.1.0:= ) + flac? ( >=media-libs/flac-1.2.1 ) + raw? ( media-libs/gexiv2 ) + >=dev-libs/icu-4.8.1.2:= + cue? ( media-libs/libcue ) + exif? ( >=media-libs/libexif-0.6 ) + gsf? ( >=gnome-extra/libgsf-1.14.24:= ) + xps? ( app-text/libgxps ) + iptc? ( media-libs/libiptcdata ) + jpeg? ( virtual/jpeg:0 ) + iso? ( >=sys-libs/libosinfo-0.2.10 ) + >=media-libs/libpng-1.2:0= + seccomp? ( >=sys-libs/libseccomp-2.0 ) + tiff? ( media-libs/tiff:0 ) + xml? ( >=dev-libs/libxml2-2.6 ) + vorbis? ( >=media-libs/libvorbis-0.22 ) + pdf? ( >=app-text/poppler-0.16.0[cairo] ) + taglib? ( >=media-libs/taglib-1.6 ) + playlist? ( >=dev-libs/totem-pl-parser-3:= ) + upower? ( >=sys-power/upower-0.9.0 ) + sys-libs/zlib:0 + gif? ( media-libs/giflib:= ) + + rss? ( >=net-libs/libgrss-0.7:0 ) + app-arch/gzip +" +DEPEND="${RDEPEND} + dev-util/glib-utils + + >=dev-util/intltool-0.40.0 + >=sys-devel/gettext-0.19.8 + virtual/pkgconfig + test? ( ${PYTHON_DEPS} ) +" +# intltool-merge manually called in meson.build in 2.1.5; might be properly gone by 2.2.0 (MR !29) + +PATCHES=( + "${FILESDIR}"/${PV}-meson-fixes.patch # https://gitlab.gnome.org/GNOME/tracker-miners/merge_requests/49 + "${FILESDIR}"/${PV}-test-fix.patch # https://gitlab.gnome.org/GNOME/tracker-miners/merge_requests/50 +) + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + xdg_src_prepare + gnome2_environment_reset # sets gstreamer safety variables +} + +src_configure() { + local media_extractor="none" + if use gstreamer ; then + media_extractor="gstreamer" + elif use ffmpeg ; then + media_extractor="libav" + fi + + local emesonargs=( + -Dtracker_core=system + + -Ddocs=true + -Dextract=true + $(meson_use test functional_tests) + -Dminer_apps=true + -Dminer_fs=true + $(meson_use rss miner_rss) + -Dwriteback=true + -Dabiword=true + -Ddvi=true + -Dicon=true + -Dmp3=true + -Dps=true + -Dtext=true + -Dunzip_ps_gz_files=true # spawns gunzip + + -Dcue=$(usex cue enabled disabled) + -Dexif=$(usex exif enabled disabled) + -Dflac=$(usex flac enabled disabled) + -Dgif=$(usex gif enabled disabled) + -Dgsf=$(usex gsf enabled disabled) + -Diptc=$(usex iptc enabled disabled) + -Diso=$(usex iso enabled disabled) + -Djpeg=$(usex jpeg enabled disabled) + -Dpdf=$(usex pdf enabled disabled) + -Dplaylist=$(usex playlist enabled disabled) + -Dpng=enabled + -Draw=$(usex raw enabled disabled) + -Dtaglib=$(usex taglib enabled disabled) + -Dtiff=$(usex tiff enabled disabled) + -Dvorbis=$(usex vorbis enabled disabled) + -Dxml=$(usex xml enabled disabled) + -Dxmp=$(usex xmp enabled disabled) + -Dxps=$(usex xps enabled disabled) + + -Dbattery_detection=$(usex upower upower none) + -Dcharset_detection=icu # enca is a possibility, but right now we have tracker core always dep on icu and icu is preferred over enca + -Dgeneric_media_extractor=${media_extractor} + # gupnp gstreamer_backend is in bad state, upstream suggests to use discoverer, which is the default + -Dsystemd_user_services="$(systemd_get_userunitdir)" + ) + meson_src_configure +} + +src_test() { + dbus-run-session meson test -C "${BUILD_DIR}" || die 'tests failed' +} |