1 |
commit: b5b579892433c8fafd8b528a63b5fd74592ab2fc |
2 |
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 27 12:39:16 2018 +0000 |
4 |
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 27 12:47:01 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gnome.git/commit/?id=b5b57989 |
7 |
|
8 |
gnome-base/nautilus: restore optional tracker support |
9 |
|
10 |
Disable gtk-doc building as it seems broken. |
11 |
|
12 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
13 |
Manifest-Sign-Key: 0x5A56C8CD0C13248A |
14 |
|
15 |
.../files/3.26.2-tracker-support-optional.patch | 273 +++++++++++++++++++++ |
16 |
gnome-base/nautilus/nautilus-3.26.2.ebuild | 18 +- |
17 |
2 files changed, 284 insertions(+), 7 deletions(-) |
18 |
|
19 |
diff --git a/gnome-base/nautilus/files/3.26.2-tracker-support-optional.patch b/gnome-base/nautilus/files/3.26.2-tracker-support-optional.patch |
20 |
new file mode 100644 |
21 |
index 00000000..4363cbbf |
22 |
--- /dev/null |
23 |
+++ b/gnome-base/nautilus/files/3.26.2-tracker-support-optional.patch |
24 |
@@ -0,0 +1,273 @@ |
25 |
+From 3e3d7621c6f8ec72e626701e3f55afc900a04a68 Mon Sep 17 00:00:00 2001 |
26 |
+From: Gilles Dartiguelongue <eva@g.o> |
27 |
+Date: Sun, 27 May 2018 13:54:38 +0200 |
28 |
+Subject: [PATCH] Make tracker support optional |
29 |
+ |
30 |
+--- |
31 |
+ config.h.meson | 1 + |
32 |
+ meson.build | 15 ++++++++++++--- |
33 |
+ meson_options.txt | 5 +++++ |
34 |
+ src/meson.build | 21 +++++++++++++-------- |
35 |
+ src/nautilus-file-undo-operations.c | 4 ++++ |
36 |
+ src/nautilus-file.c | 2 ++ |
37 |
+ src/nautilus-files-view.c | 4 ++++ |
38 |
+ src/nautilus-search-engine.c | 14 ++++++++++++++ |
39 |
+ 8 files changed, 55 insertions(+), 11 deletions(-) |
40 |
+ |
41 |
+diff --git a/config.h.meson b/config.h.meson |
42 |
+index 4f5cb5848..58d71e96f 100644 |
43 |
+--- a/config.h.meson |
44 |
++++ b/config.h.meson |
45 |
+@@ -4,6 +4,7 @@ |
46 |
+ #mesondefine HAVE_EXEMPI |
47 |
+ #mesondefine HAVE_EXIF |
48 |
+ #mesondefine HAVE_SELINUX |
49 |
++#mesondefine HAVE_TRACKER |
50 |
+ #mesondefine ENABLE_DESKTOP |
51 |
+ #mesondefine ENABLE_PACKAGEKIT |
52 |
+ #mesondefine LOCALEDIR |
53 |
+diff --git a/meson.build b/meson.build |
54 |
+index 7b8f15cf5..b2f2ef438 100644 |
55 |
+--- a/meson.build |
56 |
++++ b/meson.build |
57 |
+@@ -81,9 +81,18 @@ if get_option ('enable-selinux') |
58 |
+ conf.set10 ('HAVE_SELINUX', true) |
59 |
+ endif |
60 |
+ |
61 |
+-tracker_sparql = dependency ('tracker-sparql-2.0', required: false) |
62 |
+-if not tracker_sparql.found() |
63 |
+- tracker_sparql = dependency ('tracker-sparql-1.0') |
64 |
++tracker_api = get_option ('tracker') |
65 |
++if tracker_api == 'disabled' |
66 |
++ # pass |
67 |
++elif tracker_api == 'auto' |
68 |
++ tracker_sparql = dependency ('tracker-sparql-2.0', required: false) |
69 |
++ if not tracker_sparql.found() |
70 |
++ tracker_sparql = dependency ('tracker-sparql-1.0') |
71 |
++ endif |
72 |
++ conf.set10 ('HAVE_TRACKER', true) |
73 |
++else |
74 |
++ tracker_sparql = dependency ('tracker-sparql-@0@'.format(tracker_api)) |
75 |
++ conf.set10 ('HAVE_TRACKER', true) |
76 |
+ endif |
77 |
+ |
78 |
+ if get_option ('enable-xmp') |
79 |
+diff --git a/meson_options.txt b/meson_options.txt |
80 |
+index c934dd8b1..d2ba885a2 100644 |
81 |
+--- a/meson_options.txt |
82 |
++++ b/meson_options.txt |
83 |
+@@ -8,6 +8,11 @@ option ('enable-exif', |
84 |
+ type: 'boolean', |
85 |
+ value: false, |
86 |
+ description: 'enable EXIF support') |
87 |
++option ('tracker', |
88 |
++ type: 'combo', |
89 |
++ choices: ['auto', '1.0', '2.0', 'disabled'], |
90 |
++ value: 'auto', |
91 |
++ description: 'enable bulk renames and search using Tracker') |
92 |
+ option ('enable-xmp', |
93 |
+ type: 'boolean', |
94 |
+ value: false, |
95 |
+diff --git a/src/meson.build b/src/meson.build |
96 |
+index 9f01f5ba2..c55f39c7d 100644 |
97 |
+--- a/src/meson.build |
98 |
++++ b/src/meson.build |
99 |
+@@ -254,12 +254,6 @@ libnautilus_sources = [ |
100 |
+ 'nautilus-file-undo-operations.h', |
101 |
+ 'nautilus-file-undo-manager.c', |
102 |
+ 'nautilus-file-undo-manager.h', |
103 |
+- 'nautilus-batch-rename-dialog.c', |
104 |
+- 'nautilus-batch-rename-dialog.h', |
105 |
+- 'nautilus-batch-rename-utilities.c', |
106 |
+- 'nautilus-batch-rename-utilities.h', |
107 |
+- 'nautilus-search-engine-tracker.c', |
108 |
+- 'nautilus-search-engine-tracker.h' |
109 |
+ ] |
110 |
+ |
111 |
+ nautilus_deps = [glib, |
112 |
+@@ -273,8 +267,7 @@ nautilus_deps = [glib, |
113 |
+ eel_2, |
114 |
+ nautilus_extension, |
115 |
+ x11, |
116 |
+- gmodule_no_export, |
117 |
+- tracker_sparql] |
118 |
++ gmodule_no_export] |
119 |
+ |
120 |
+ if get_option ('enable-exif') |
121 |
+ nautilus_deps += exif |
122 |
+@@ -288,6 +281,18 @@ if get_option ('enable-xmp') |
123 |
+ nautilus_deps += exempi |
124 |
+ endif |
125 |
+ |
126 |
++if get_option ('tracker') != 'disabled' |
127 |
++ libnautilus_sources += [ |
128 |
++ 'nautilus-batch-rename-dialog.c', |
129 |
++ 'nautilus-batch-rename-dialog.h', |
130 |
++ 'nautilus-batch-rename-utilities.c', |
131 |
++ 'nautilus-batch-rename-utilities.h', |
132 |
++ 'nautilus-search-engine-tracker.c', |
133 |
++ 'nautilus-search-engine-tracker.h' |
134 |
++ ] |
135 |
++ nautilus_deps += tracker_sparql |
136 |
++endif |
137 |
++ |
138 |
+ libnautilus = static_library ('nautilus', |
139 |
+ libnautilus_sources, |
140 |
+ dependencies: nautilus_deps, |
141 |
+diff --git a/src/nautilus-file-undo-operations.c b/src/nautilus-file-undo-operations.c |
142 |
+index e833d0578..d6e407ca5 100644 |
143 |
+--- a/src/nautilus-file-undo-operations.c |
144 |
++++ b/src/nautilus-file-undo-operations.c |
145 |
+@@ -31,8 +31,10 @@ |
146 |
+ #include "nautilus-file-operations.h" |
147 |
+ #include "nautilus-file.h" |
148 |
+ #include "nautilus-file-undo-manager.h" |
149 |
++#ifdef HAVE_TRACKER |
150 |
+ #include "nautilus-batch-rename-dialog.h" |
151 |
+ #include "nautilus-batch-rename-utilities.h" |
152 |
++#endif |
153 |
+ |
154 |
+ |
155 |
+ /* Since we use g_get_current_time for setting "orig_trash_time" in the undo |
156 |
+@@ -1087,6 +1089,7 @@ nautilus_file_undo_info_rename_set_data_post (NautilusFileUndoInfoRename *self, |
157 |
+ } |
158 |
+ |
159 |
+ /* batch rename */ |
160 |
++#ifdef HAVE_TRACKER |
161 |
+ G_DEFINE_TYPE (NautilusFileUndoInfoBatchRename, nautilus_file_undo_info_batch_rename, NAUTILUS_TYPE_FILE_UNDO_INFO); |
162 |
+ |
163 |
+ struct _NautilusFileUndoInfoBatchRenameDetails |
164 |
+@@ -1303,6 +1306,7 @@ nautilus_file_undo_info_batch_rename_set_data_post (NautilusFileUndoInfoBatchRen |
165 |
+ |
166 |
+ self->priv->new_display_names = g_list_reverse (self->priv->new_display_names); |
167 |
+ } |
168 |
++#endif |
169 |
+ |
170 |
+ /* trash */ |
171 |
+ G_DEFINE_TYPE (NautilusFileUndoInfoTrash, nautilus_file_undo_info_trash, NAUTILUS_TYPE_FILE_UNDO_INFO) |
172 |
+diff --git a/src/nautilus-file.c b/src/nautilus-file.c |
173 |
+index 536f83541..247334d5d 100644 |
174 |
+--- a/src/nautilus-file.c |
175 |
++++ b/src/nautilus-file.c |
176 |
+@@ -2392,6 +2392,7 @@ real_batch_rename (GList *files, |
177 |
+ } |
178 |
+ } |
179 |
+ |
180 |
++#ifdef HAVE_TRACKER |
181 |
+ /* Tell the undo manager a batch rename is taking place if at least |
182 |
+ * a file has been renamed*/ |
183 |
+ if (!nautilus_file_undo_manager_is_operating () && op->skipped_files != g_list_length (files)) |
184 |
+@@ -2406,6 +2407,7 @@ real_batch_rename (GList *files, |
185 |
+ |
186 |
+ nautilus_file_undo_manager_set_action (op->undo_info); |
187 |
+ } |
188 |
++#endif |
189 |
+ |
190 |
+ if (op->skipped_files == g_list_length (files)) |
191 |
+ { |
192 |
+diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c |
193 |
+index a79ecf20d..3b7bd4166 100644 |
194 |
+--- a/src/nautilus-files-view.c |
195 |
++++ b/src/nautilus-files-view.c |
196 |
+@@ -28,8 +28,10 @@ |
197 |
+ #include "nautilus-files-view.h" |
198 |
+ |
199 |
+ #include "nautilus-application.h" |
200 |
++#ifdef HAVE_TRACKER |
201 |
+ #include "nautilus-batch-rename-dialog.h" |
202 |
+ #include "nautilus-batch-rename-utilities.h" |
203 |
++#endif |
204 |
+ #include "nautilus-error-reporting.h" |
205 |
+ #include "nautilus-file-undo-manager.h" |
206 |
+ #include "nautilus-floating-bar.h" |
207 |
+@@ -6209,6 +6211,7 @@ real_action_rename (NautilusFilesView *view) |
208 |
+ { |
209 |
+ invoke_external_bulk_rename_utility (view, selection); |
210 |
+ } |
211 |
++#ifdef HAVE_TRACKER |
212 |
+ else |
213 |
+ { |
214 |
+ GdkCursor *cursor; |
215 |
+@@ -6226,6 +6229,7 @@ real_action_rename (NautilusFilesView *view) |
216 |
+ |
217 |
+ gtk_widget_show (GTK_WIDGET (dialog)); |
218 |
+ } |
219 |
++#endif |
220 |
+ } |
221 |
+ else |
222 |
+ { |
223 |
+diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c |
224 |
+index 209bd4f80..436cd7471 100644 |
225 |
+--- a/src/nautilus-search-engine.c |
226 |
++++ b/src/nautilus-search-engine.c |
227 |
+@@ -28,11 +28,15 @@ |
228 |
+ #include "nautilus-search-engine-model.h" |
229 |
+ #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH |
230 |
+ #include "nautilus-debug.h" |
231 |
++#ifdef HAVE_TRACKER |
232 |
+ #include "nautilus-search-engine-tracker.h" |
233 |
++#endif |
234 |
+ |
235 |
+ typedef struct |
236 |
+ { |
237 |
++#ifdef HAVE_TRACKER |
238 |
+ NautilusSearchEngineTracker *tracker; |
239 |
++#endif |
240 |
+ NautilusSearchEngineSimple *simple; |
241 |
+ NautilusSearchEngineModel *model; |
242 |
+ |
243 |
+@@ -73,7 +77,9 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider, |
244 |
+ engine = NAUTILUS_SEARCH_ENGINE (provider); |
245 |
+ priv = nautilus_search_engine_get_instance_private (engine); |
246 |
+ |
247 |
++#ifdef HAVE_TRACKER |
248 |
+ nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->tracker), query); |
249 |
++#endif |
250 |
+ nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->model), query); |
251 |
+ nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->simple), query); |
252 |
+ } |
253 |
+@@ -95,8 +101,10 @@ search_engine_start_real (NautilusSearchEngine *engine) |
254 |
+ |
255 |
+ g_object_ref (engine); |
256 |
+ |
257 |
++#ifdef HAVE_TRACKER |
258 |
+ nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->tracker)); |
259 |
+ priv->providers_running++; |
260 |
++#endif |
261 |
+ |
262 |
+ if (nautilus_search_engine_model_get_model (priv->model)) |
263 |
+ { |
264 |
+@@ -158,7 +166,9 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider) |
265 |
+ |
266 |
+ DEBUG ("Search engine stop"); |
267 |
+ |
268 |
++#ifdef HAVE_TRACKER |
269 |
+ nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->tracker)); |
270 |
++#endif |
271 |
+ nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->model)); |
272 |
+ nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->simple)); |
273 |
+ |
274 |
+@@ -333,7 +343,9 @@ nautilus_search_engine_finalize (GObject *object) |
275 |
+ |
276 |
+ g_hash_table_destroy (priv->uris); |
277 |
+ |
278 |
++#ifdef HAVE_TRACKER |
279 |
+ g_clear_object (&priv->tracker); |
280 |
++#endif |
281 |
+ g_clear_object (&priv->model); |
282 |
+ g_clear_object (&priv->simple); |
283 |
+ |
284 |
+@@ -387,8 +399,10 @@ nautilus_search_engine_init (NautilusSearchEngine *engine) |
285 |
+ priv = nautilus_search_engine_get_instance_private (engine); |
286 |
+ priv->uris = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); |
287 |
+ |
288 |
++#ifdef HAVE_TRACKER |
289 |
+ priv->tracker = nautilus_search_engine_tracker_new (); |
290 |
+ connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->tracker)); |
291 |
++#endif |
292 |
+ |
293 |
+ priv->model = nautilus_search_engine_model_new (); |
294 |
+ connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->model)); |
295 |
+-- |
296 |
+2.17.0 |
297 |
+ |
298 |
|
299 |
diff --git a/gnome-base/nautilus/nautilus-3.26.2.ebuild b/gnome-base/nautilus/nautilus-3.26.2.ebuild |
300 |
index 7e62ef46..ac07418d 100644 |
301 |
--- a/gnome-base/nautilus/nautilus-3.26.2.ebuild |
302 |
+++ b/gnome-base/nautilus/nautilus-3.26.2.ebuild |
303 |
@@ -9,11 +9,9 @@ inherit gnome-meson readme.gentoo-r1 virtualx |
304 |
DESCRIPTION="A file manager for the GNOME desktop" |
305 |
HOMEPAGE="https://wiki.gnome.org/Apps/Nautilus" |
306 |
|
307 |
-#FIXME: shoudln't this be GPL-3+? |
308 |
LICENSE="GPL-2+ LGPL-2+ FDL-1.1" |
309 |
SLOT="0" |
310 |
-#FIXME: tracker is needed |
311 |
-IUSE="exif gnome +introspection packagekit +previewer selinux sendto xmp" |
312 |
+IUSE="exif gnome +introspection packagekit +previewer selinux sendto tracker xmp" |
313 |
|
314 |
KEYWORDS="~amd64" |
315 |
|
316 |
@@ -38,10 +36,10 @@ COMMON_DEPEND=" |
317 |
x11-libs/libXext |
318 |
x11-libs/libXrender |
319 |
|
320 |
- >=app-misc/tracker-1:= |
321 |
exif? ( >=media-libs/libexif-0.6.20 ) |
322 |
introspection? ( >=dev-libs/gobject-introspection-0.6.4:= ) |
323 |
selinux? ( >=sys-libs/libselinux-2 ) |
324 |
+ tracker? ( >=app-misc/tracker-1:= ) |
325 |
xmp? ( >=media-libs/exempi-2.1.0:2 ) |
326 |
" |
327 |
DEPEND="${COMMON_DEPEND} |
328 |
@@ -50,7 +48,7 @@ DEPEND="${COMMON_DEPEND} |
329 |
>=dev-util/gtk-doc-1.10 |
330 |
>=sys-devel/gettext-0.19.7 |
331 |
virtual/pkgconfig |
332 |
- x11-proto/xproto |
333 |
+ x11-base/xorg-proto |
334 |
" |
335 |
RDEPEND="${COMMON_DEPEND} |
336 |
packagekit? ( app-admin/packagekit-base ) |
337 |
@@ -62,13 +60,18 @@ RDEPEND="${COMMON_DEPEND} |
338 |
|
339 |
PDEPEND=" |
340 |
gnome? ( x11-themes/adwaita-icon-theme ) |
341 |
- >=gnome-extra/nautilus-tracker-tags-0.12 |
342 |
+ tracker? ( >=gnome-extra/nautilus-tracker-tags-0.12 ) |
343 |
previewer? ( >=gnome-extra/sushi-0.1.9 ) |
344 |
sendto? ( >=gnome-extra/nautilus-sendto-3.0.1 ) |
345 |
>=gnome-base/gvfs-1.14[gtk] |
346 |
" |
347 |
# Need gvfs[gtk] for recent:/// support |
348 |
|
349 |
+PATCHES=( |
350 |
+ # Keep tracker optional |
351 |
+ "${FILESDIR}"/${PV}-tracker-support-optional.patch |
352 |
+) |
353 |
+ |
354 |
src_prepare() { |
355 |
if use previewer; then |
356 |
DOC_CONTENTS="nautilus uses gnome-extra/sushi to preview media files. |
357 |
@@ -82,8 +85,9 @@ src_configure() { |
358 |
# FIXME no doc useflag?? |
359 |
gnome-meson_src_configure \ |
360 |
-Denable-desktop=true \ |
361 |
- -Denable-gtk-doc=true \ |
362 |
+ -Denable-gtk-doc=false \ |
363 |
-Denable-profiling=false \ |
364 |
+ -Dtracker=$(usex tracker 1.0 disabled) \ |
365 |
$(meson_use exif enable-exif) \ |
366 |
$(meson_use packagekit enable-packagekit) \ |
367 |
$(meson_use sendto nst-extension) \ |