Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/tracker/files/, app-misc/tracker/
Date: Sun, 20 Feb 2022 18:39:26
Message-Id: 1645382356.9e7bddcce802a7ec8e3e731592fa18e3ba5ff0a2.mattst88@gentoo
1 commit: 9e7bddcce802a7ec8e3e731592fa18e3ba5ff0a2
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 20 18:38:56 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 20 18:39:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e7bddcc
7
8 app-misc/tracker: Fix test dependencies
9
10 Closes: https://bugs.gentoo.org/832141
11 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
12
13 ...d-Add-an-option-to-control-building-tests.patch | 69 ++++++++++++++++++++++
14 app-misc/tracker/tracker-3.2.1.ebuild | 3 +
15 2 files changed, 72 insertions(+)
16
17 diff --git a/app-misc/tracker/files/tracker-3.2.1-build-Add-an-option-to-control-building-tests.patch b/app-misc/tracker/files/tracker-3.2.1-build-Add-an-option-to-control-building-tests.patch
18 new file mode 100644
19 index 000000000000..9480a6269c75
20 --- /dev/null
21 +++ b/app-misc/tracker/files/tracker-3.2.1-build-Add-an-option-to-control-building-tests.patch
22 @@ -0,0 +1,69 @@
23 +From db36d010737d5eeceff300e3dd5e315c5d0382a2 Mon Sep 17 00:00:00 2001
24 +From: Matt Turner <mattst88@×××××.com>
25 +Date: Wed, 16 Feb 2022 10:59:33 -0800
26 +Subject: [PATCH] build: Add an option to control building tests
27 +
28 +Commit 8569c99d2926 ("Look for a Python installation with the tap
29 +module") correctly added a dependency on the gi Python module for tests.
30 +Commit 51ca035697a4 ("Make tracker:endpoint test work on macOS")
31 +restructured Python probing by moving it to the top-level meson.build.
32 +
33 +These two commits have the side-effect of exposing the fact that the
34 +gi Python module is really only a test dependency, and should not be
35 +required if building without tests.
36 +
37 +As such, add a -Dtests=bool option to disable building tests. This
38 +reduces the number of ninja targets from 232 to 188 on my non-test
39 +build.
40 +---
41 + meson.build | 13 +++++++++----
42 + meson_options.txt | 2 ++
43 + 2 files changed, 11 insertions(+), 4 deletions(-)
44 +
45 +diff --git a/meson.build b/meson.build
46 +index 4e59b8240..f4dd58fd4 100644
47 +--- a/meson.build
48 ++++ b/meson.build
49 +@@ -75,9 +75,12 @@ if get_option('man')
50 + a2x = find_program('a2x')
51 + endif
52 +
53 +-py_modules = ['gi']
54 +-if get_option('tests_tap_protocol')
55 +- py_modules += 'tap'
56 ++py_modules = []
57 ++if get_option('tests')
58 ++ py_modules += 'gi'
59 ++ if get_option('tests_tap_protocol')
60 ++ py_modules += 'tap'
61 ++ endif
62 + endif
63 + python = import('python').find_installation('python3', modules: py_modules)
64 +
65 +@@ -358,7 +361,9 @@ tracker_uninstalled_nepomuk_ontologies_dir = join_paths(meson.current_source_dir
66 + tracker_uninstalled_stop_words_dir = join_paths(meson.current_source_dir(), 'src', 'libtracker-common', 'stop-words')
67 + tracker_uninstalled_testutils_dir = join_paths(meson.current_source_dir(), 'utils')
68 +
69 +-subdir('tests')
70 ++if get_option('tests')
71 ++ subdir('tests')
72 ++endif
73 + subdir('examples')
74 +
75 + subdir('po')
76 +diff --git a/meson_options.txt b/meson_options.txt
77 +index a7e647d02..ec8ea8bc2 100644
78 +--- a/meson_options.txt
79 ++++ b/meson_options.txt
80 +@@ -20,6 +20,8 @@ option('systemd_user_services', type: 'boolean', value: true, yield: true,
81 + description: 'Whether to install systemd user .service files')
82 + option('systemd_user_services_dir', type: 'string', value: '', yield: true,
83 + description: 'Directory to install systemd user unit files (or empty to use default)')
84 ++option('tests', type: 'boolean', value: true,
85 ++ description: 'Whether to build tests')
86 + option('test_utils', type: 'boolean', value: true,
87 + description: 'Whether to install the trackertestutils Python package')
88 + option('test_utils_dir', type: 'string', value: '',
89 +--
90 +2.34.1
91 +
92
93 diff --git a/app-misc/tracker/tracker-3.2.1.ebuild b/app-misc/tracker/tracker-3.2.1.ebuild
94 index 81ebe3d808b7..534f1b18334a 100644
95 --- a/app-misc/tracker/tracker-3.2.1.ebuild
96 +++ b/app-misc/tracker/tracker-3.2.1.ebuild
97 @@ -43,6 +43,7 @@ BDEPEND="
98 >=sys-devel/gettext-0.19.8
99 virtual/pkgconfig
100 test? (
101 + $(python_gen_any_dep 'dev-python/pygobject[${PYTHON_USEDEP}]')
102 $(python_gen_any_dep 'dev-python/tappy[${PYTHON_USEDEP}]')
103 )
104 ${PYTHON_DEPS}
105 @@ -52,6 +53,7 @@ PDEPEND="miners? ( >=app-misc/tracker-miners-${PV_SERIES} )"
106 PATCHES=(
107 "${FILESDIR}"/${PN}-3.1.1-Fix-asciidoc-manpage.xsl-location.patch
108 "${FILESDIR}"/${PN}-3.2.1-Add-config-options-for-libsoup.patch
109 + "${FILESDIR}"/${PN}-3.2.1-build-Add-an-option-to-control-building-tests.patch
110 )
111
112 function inotify_enabled() {
113 @@ -94,6 +96,7 @@ src_configure() {
114 -Dunicode_support=icu
115 -Dbash_completion_dir="$(get_bashcompdir)"
116 -Dsystemd_user_services_dir="$(systemd_get_userunitdir)"
117 + $(meson_use test tests)
118 -Dintrospection=enabled
119 -Dlibsoup2=enabled
120 -Dlibsoup3=disabled