Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-base/nautilus/, gnome-base/nautilus/files/
Date: Sun, 31 Mar 2019 10:14:27
Message-Id: 1554027222.a8677055550e236f70140430dbcbc66d0b376d2c.leio@gentoo
1 commit: a8677055550e236f70140430dbcbc66d0b376d2c
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 31 09:49:13 2019 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 31 10:13:42 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8677055
7
8 Revert "gnome-base/nautilus: remove old"
9
10 Stable target for tracker-2 stabling
11
12 This reverts commit ad75d19be298e48823d06d01a3bfc61501fc6350.
13
14 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
15
16 gnome-base/nautilus/Manifest | 1 +
17 .../files/3.26.4-file-view-crash-fix.patch | 81 +++++++
18 .../files/3.26.4-optional-introspection.patch | 49 ++++
19 .../nautilus/files/3.26.4-optional-tracker.patch | 264 +++++++++++++++++++++
20 gnome-base/nautilus/nautilus-3.26.4-r2.ebuild | 109 +++++++++
21 5 files changed, 504 insertions(+)
22
23 diff --git a/gnome-base/nautilus/Manifest b/gnome-base/nautilus/Manifest
24 index 1fd2b7d2b62..c7b79491984 100644
25 --- a/gnome-base/nautilus/Manifest
26 +++ b/gnome-base/nautilus/Manifest
27 @@ -1,4 +1,5 @@
28 DIST nautilus-3.24.2.1.tar.xz 5143440 BLAKE2B 731046b6bdd0817b770cf3e2f0667187bfde613cf1a15611e6ec06e74bc3c2432ca66894119f224023fe46b01fd777d3dde2d2ac7bba0a9eb0fd71d38e1756ff SHA512 f6868600bcdc82071b3a63f4e4a0f7decf0d72e021eb3d0c26e914413c858163ee4403c4f3ef7689556a0fc91394f30cff9a3db14da030b277b50972c7b80a07
29 +DIST nautilus-3.26.4.tar.xz 3267652 BLAKE2B 56986b8d87afc0ea7ce6f1f56ae06c7cfb05d060414aad428145a6c2cb631b9d4ebbeaefabb0f0ceeb5f930ae94737f8dfcabb300554a59c2b7d5a53d1ee3cd1 SHA512 2a50a2a9ae6ffbe4b706d46fb47e5f54f42e645189b3548d1904c3ddf882ef4a94819740c6821fe50c662a9013ab43bb9b7b3dbdfc779ecc82f16170b4867973
30 DIST nautilus-3.28.1-patchset.tar.xz 129360 BLAKE2B 18e94e83132a8ce2e07491ce6b5cb9499141bf93e0c3ef44f2e5ac891e59d334cf310d863e8e7450fa385a6a49873d790e4f8c36a1ef8e009b1f2be2361586b4 SHA512 6c3385b4bc7020601f47dc66c0b1cabd6dadcd9f986bdaec42aeca9b43a6b8a2362651958d4e6a4738b78fbd546071678ba15ab87c268e33cfc1cca49229da48
31 DIST nautilus-3.28.1.tar.xz 3262520 BLAKE2B 6f007e2327ffb108c5195737c02c7be12b874f5bc3bdfc1c84a3ba2176ff36e1843057522a54e569a7c09a056ccd888e1ddf099d6f2b527dfa109370cbe1a3a9 SHA512 6b695c097e5082062afe8cb036e819c837ce1e2570f581f81860f378e34f38f3020b8802e6a4285243c111d5208e892c419ac92621cdb1d35b2df205a3ccaa13
32 DIST nautilus-3.30.5.tar.xz 3254344 BLAKE2B 64da158ee661fc259a14f890bf6ad343f720245df6b9475ff047993570ea4e7234723eb242f057bc85b7ea95d38a99b5c2f5d546e982a3e3e32b7fc75cabb786 SHA512 e38a8bb380460d902e4ec6219d0e147a4245e790b18fb18ab9474ec2ae002a971243c6b09b8fec267e65c7ecc7bb1217191c4f5cb9547b3b9d5b0793068103cf
33
34 diff --git a/gnome-base/nautilus/files/3.26.4-file-view-crash-fix.patch b/gnome-base/nautilus/files/3.26.4-file-view-crash-fix.patch
35 new file mode 100644
36 index 00000000000..72077f4a9fa
37 --- /dev/null
38 +++ b/gnome-base/nautilus/files/3.26.4-file-view-crash-fix.patch
39 @@ -0,0 +1,81 @@
40 +From 834c4e7fe39f7053efdb126f9e1835e6b8e529f4 Mon Sep 17 00:00:00 2001
41 +From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@×××××.net>
42 +Date: Thu, 26 Jul 2018 02:55:19 +0000
43 +Subject: [PATCH 1/3] file-view: Always unset pending_selection after freeing
44 + it
45 +
46 +When a file view was loaded with a pending selection, and not all the files were
47 +seen yet, the private pending_selection list was properly free'd, but the pointer
48 +was not cleared, causing a crash when `nautilus_files_view_set_selection` was
49 +called again, as it was trying to deeply copy a list pointed by this invalid
50 +reference.
51 +
52 +So, removing the unneeded `pending_selection` temporary pointer from the main
53 +function scope, as it only confuses, while use it (with an autolist) when we
54 +need to pass the previous `priv->pending_selection` (stealing its ownership)
55 +to set_selection again.
56 +
57 +Eventually use a g_clear_pointer to free the list and nullify its priv reference
58 +
59 +Fixes #295
60 +
61 +(cherry picked from commit ae3382a281b018337a8032ef13663ec2d9c7fd6c)
62 +---
63 + src/nautilus-files-view.c | 16 +++++++---------
64 + 1 file changed, 7 insertions(+), 9 deletions(-)
65 +
66 +diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
67 +index 8784f63f8..36d791f80 100644
68 +--- a/src/nautilus-files-view.c
69 ++++ b/src/nautilus-files-view.c
70 +@@ -3556,7 +3556,6 @@ done_loading (NautilusFilesView *view,
71 + gboolean all_files_seen)
72 + {
73 + NautilusFilesViewPrivate *priv;
74 +- GList *pending_selection;
75 + GList *selection;
76 + gboolean do_reveal = FALSE;
77 +
78 +@@ -3577,21 +3576,23 @@ done_loading (NautilusFilesView *view,
79 + nautilus_files_view_update_toolbar_menus (view);
80 + reset_update_interval (view);
81 +
82 +- pending_selection = priv->pending_selection;
83 + selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
84 +
85 + if (nautilus_view_is_searching (NAUTILUS_VIEW (view)) &&
86 +- all_files_seen && !selection && !pending_selection)
87 ++ all_files_seen && selection == NULL && priv->pending_selection == NULL)
88 + {
89 + nautilus_files_view_select_first (view);
90 + do_reveal = TRUE;
91 + }
92 +- else if (pending_selection != NULL && all_files_seen)
93 ++ else if (priv->pending_selection != NULL && all_files_seen)
94 + {
95 +- priv->pending_selection = NULL;
96 ++ GList *pending_selection;
97 ++ pending_selection = g_steal_pointer (&priv->pending_selection);
98 +
99 + nautilus_files_view_call_set_selection (view, pending_selection);
100 + do_reveal = TRUE;
101 ++
102 ++ nautilus_file_list_free (pending_selection);
103 + }
104 +
105 + if (selection)
106 +@@ -3599,10 +3600,7 @@ done_loading (NautilusFilesView *view,
107 + g_list_free_full (selection, g_object_unref);
108 + }
109 +
110 +- if (pending_selection)
111 +- {
112 +- g_list_free_full (pending_selection, g_object_unref);
113 +- }
114 ++ g_clear_pointer (&priv->pending_selection, nautilus_file_list_free);
115 +
116 + if (do_reveal)
117 + {
118 +--
119 +2.17.0
120 +
121
122 diff --git a/gnome-base/nautilus/files/3.26.4-optional-introspection.patch b/gnome-base/nautilus/files/3.26.4-optional-introspection.patch
123 new file mode 100644
124 index 00000000000..54bf5ac95fe
125 --- /dev/null
126 +++ b/gnome-base/nautilus/files/3.26.4-optional-introspection.patch
127 @@ -0,0 +1,49 @@
128 +From 5058b09996181fbd398c799eeba6a1d83b083186 Mon Sep 17 00:00:00 2001
129 +From: Mart Raudsepp <leio@g.o>
130 +Date: Tue, 11 Dec 2018 16:14:11 +0200
131 +Subject: [PATCH 3/3] Make introspection support optional
132 +
133 +Upstream has it optional again with commit 200a5869b5c1dc8 as well,
134 +but that's included only since nautilus-3.29.90
135 +---
136 + libnautilus-extension/meson.build | 2 ++
137 + meson_options.txt | 4 ++++
138 + 2 files changed, 6 insertions(+)
139 +
140 +diff --git a/libnautilus-extension/meson.build b/libnautilus-extension/meson.build
141 +index 067ad2414..4702964a9 100644
142 +--- a/libnautilus-extension/meson.build
143 ++++ b/libnautilus-extension/meson.build
144 +@@ -41,12 +41,14 @@ libnautilus_extension = shared_library ('nautilus-extension',
145 + version: nautilus_extension_version,
146 + install: true)
147 +
148 ++if get_option('introspection')
149 + gnome.generate_gir (libnautilus_extension,
150 + sources: libnautilus_extension_headers + libnautilus_extension_sources,
151 + nsversion: '3.0',
152 + namespace: 'Nautilus',
153 + includes: ['Gtk-3.0', 'Gio-2.0', 'GLib-2.0'],
154 + install: true)
155 ++endif
156 +
157 + nautilus_extension = declare_dependency (link_with: libnautilus_extension,
158 + dependencies: libnautilus_extension_deps,
159 +diff --git a/meson_options.txt b/meson_options.txt
160 +index 0c23c7921..6ad3a72de 100644
161 +--- a/meson_options.txt
162 ++++ b/meson_options.txt
163 +@@ -1,6 +1,10 @@
164 + option ('enable-profiling',
165 + type: 'boolean',
166 + value: false)
167 ++option ('introspection',
168 ++ type: 'boolean',
169 ++ value: true,
170 ++ description: 'Build GObject introspection data for extension library')
171 + option ('enable-nst-extension',
172 + type: 'boolean',
173 + value: true)
174 +--
175 +2.17.0
176 +
177
178 diff --git a/gnome-base/nautilus/files/3.26.4-optional-tracker.patch b/gnome-base/nautilus/files/3.26.4-optional-tracker.patch
179 new file mode 100644
180 index 00000000000..03791996770
181 --- /dev/null
182 +++ b/gnome-base/nautilus/files/3.26.4-optional-tracker.patch
183 @@ -0,0 +1,264 @@
184 +From 74a7d02eb342416194dcc3c676199d8f5266a481 Mon Sep 17 00:00:00 2001
185 +From: Gilles Dartiguelongue <eva@g.o>
186 +Date: Sun, 27 May 2018 13:54:38 +0200
187 +Subject: [PATCH 2/3] Make tracker support optional
188 +
189 +---
190 + config.h.meson | 1 +
191 + meson.build | 9 ++++++---
192 + meson_options.txt | 4 ++++
193 + src/meson.build | 19 ++++++++++++-------
194 + src/nautilus-file-undo-operations.c | 4 ++++
195 + src/nautilus-file.c | 2 ++
196 + src/nautilus-files-view.c | 4 ++++
197 + src/nautilus-search-engine.c | 14 ++++++++++++++
198 + 8 files changed, 47 insertions(+), 10 deletions(-)
199 +
200 +diff --git a/config.h.meson b/config.h.meson
201 +index 4f5cb5848..58d71e96f 100644
202 +--- a/config.h.meson
203 ++++ b/config.h.meson
204 +@@ -4,6 +4,7 @@
205 + #mesondefine HAVE_EXEMPI
206 + #mesondefine HAVE_EXIF
207 + #mesondefine HAVE_SELINUX
208 ++#mesondefine HAVE_TRACKER
209 + #mesondefine ENABLE_DESKTOP
210 + #mesondefine ENABLE_PACKAGEKIT
211 + #mesondefine LOCALEDIR
212 +diff --git a/meson.build b/meson.build
213 +index 0b8a6f1b0..559c3dbfd 100644
214 +--- a/meson.build
215 ++++ b/meson.build
216 +@@ -81,9 +81,12 @@ if get_option ('enable-selinux')
217 + conf.set10 ('HAVE_SELINUX', true)
218 + endif
219 +
220 +-tracker_sparql = dependency ('tracker-sparql-2.0', required: false)
221 +-if not tracker_sparql.found()
222 +- tracker_sparql = dependency ('tracker-sparql-1.0')
223 ++if get_option ('tracker')
224 ++ tracker_sparql = dependency ('tracker-sparql-2.0', required: false)
225 ++ if not tracker_sparql.found()
226 ++ tracker_sparql = dependency ('tracker-sparql-1.0')
227 ++ endif
228 ++ conf.set10 ('HAVE_TRACKER', true)
229 + endif
230 +
231 + if get_option ('enable-xmp')
232 +diff --git a/meson_options.txt b/meson_options.txt
233 +index c934dd8b1..0c23c7921 100644
234 +--- a/meson_options.txt
235 ++++ b/meson_options.txt
236 +@@ -8,6 +8,10 @@ option ('enable-exif',
237 + type: 'boolean',
238 + value: false,
239 + description: 'enable EXIF support')
240 ++option ('tracker',
241 ++ type: 'boolean',
242 ++ value: true,
243 ++ description: 'enable bulk renames and search using Tracker')
244 + option ('enable-xmp',
245 + type: 'boolean',
246 + value: false,
247 +diff --git a/src/meson.build b/src/meson.build
248 +index cc08345d8..8ea10b16b 100644
249 +--- a/src/meson.build
250 ++++ b/src/meson.build
251 +@@ -254,12 +254,6 @@ libnautilus_sources = [
252 + 'nautilus-file-undo-operations.h',
253 + 'nautilus-file-undo-manager.c',
254 + 'nautilus-file-undo-manager.h',
255 +- 'nautilus-batch-rename-dialog.c',
256 +- 'nautilus-batch-rename-dialog.h',
257 +- 'nautilus-batch-rename-utilities.c',
258 +- 'nautilus-batch-rename-utilities.h',
259 +- 'nautilus-search-engine-tracker.c',
260 +- 'nautilus-search-engine-tracker.h'
261 + ]
262 +
263 + nautilus_deps = [glib,
264 +@@ -274,7 +268,6 @@ nautilus_deps = [glib,
265 + nautilus_extension,
266 + x11,
267 + gmodule_no_export,
268 +- tracker_sparql,
269 + gio_unix]
270 +
271 + if get_option ('enable-exif')
272 +@@ -289,6 +282,18 @@ if get_option ('enable-xmp')
273 + nautilus_deps += exempi
274 + endif
275 +
276 ++if get_option ('tracker')
277 ++ libnautilus_sources += [
278 ++ 'nautilus-batch-rename-dialog.c',
279 ++ 'nautilus-batch-rename-dialog.h',
280 ++ 'nautilus-batch-rename-utilities.c',
281 ++ 'nautilus-batch-rename-utilities.h',
282 ++ 'nautilus-search-engine-tracker.c',
283 ++ 'nautilus-search-engine-tracker.h'
284 ++ ]
285 ++ nautilus_deps += tracker_sparql
286 ++endif
287 ++
288 + libnautilus = static_library ('nautilus',
289 + libnautilus_sources,
290 + dependencies: nautilus_deps,
291 +diff --git a/src/nautilus-file-undo-operations.c b/src/nautilus-file-undo-operations.c
292 +index e833d0578..d6e407ca5 100644
293 +--- a/src/nautilus-file-undo-operations.c
294 ++++ b/src/nautilus-file-undo-operations.c
295 +@@ -31,8 +31,10 @@
296 + #include "nautilus-file-operations.h"
297 + #include "nautilus-file.h"
298 + #include "nautilus-file-undo-manager.h"
299 ++#ifdef HAVE_TRACKER
300 + #include "nautilus-batch-rename-dialog.h"
301 + #include "nautilus-batch-rename-utilities.h"
302 ++#endif
303 +
304 +
305 + /* Since we use g_get_current_time for setting "orig_trash_time" in the undo
306 +@@ -1087,6 +1089,7 @@ nautilus_file_undo_info_rename_set_data_post (NautilusFileUndoInfoRename *self,
307 + }
308 +
309 + /* batch rename */
310 ++#ifdef HAVE_TRACKER
311 + G_DEFINE_TYPE (NautilusFileUndoInfoBatchRename, nautilus_file_undo_info_batch_rename, NAUTILUS_TYPE_FILE_UNDO_INFO);
312 +
313 + struct _NautilusFileUndoInfoBatchRenameDetails
314 +@@ -1303,6 +1306,7 @@ nautilus_file_undo_info_batch_rename_set_data_post (NautilusFileUndoInfoBatchRen
315 +
316 + self->priv->new_display_names = g_list_reverse (self->priv->new_display_names);
317 + }
318 ++#endif
319 +
320 + /* trash */
321 + G_DEFINE_TYPE (NautilusFileUndoInfoTrash, nautilus_file_undo_info_trash, NAUTILUS_TYPE_FILE_UNDO_INFO)
322 +diff --git a/src/nautilus-file.c b/src/nautilus-file.c
323 +index 0ac53984b..549e1eb39 100644
324 +--- a/src/nautilus-file.c
325 ++++ b/src/nautilus-file.c
326 +@@ -2407,6 +2407,7 @@ real_batch_rename (GList *files,
327 + }
328 + }
329 +
330 ++#ifdef HAVE_TRACKER
331 + /* Tell the undo manager a batch rename is taking place if at least
332 + * a file has been renamed*/
333 + if (!nautilus_file_undo_manager_is_operating () && op->skipped_files != g_list_length (files))
334 +@@ -2421,6 +2422,7 @@ real_batch_rename (GList *files,
335 +
336 + nautilus_file_undo_manager_set_action (op->undo_info);
337 + }
338 ++#endif
339 +
340 + if (op->skipped_files == g_list_length (files))
341 + {
342 +diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
343 +index 36d791f80..691d5606d 100644
344 +--- a/src/nautilus-files-view.c
345 ++++ b/src/nautilus-files-view.c
346 +@@ -28,8 +28,10 @@
347 + #include "nautilus-files-view.h"
348 +
349 + #include "nautilus-application.h"
350 ++#ifdef HAVE_TRACKER
351 + #include "nautilus-batch-rename-dialog.h"
352 + #include "nautilus-batch-rename-utilities.h"
353 ++#endif
354 + #include "nautilus-error-reporting.h"
355 + #include "nautilus-file-undo-manager.h"
356 + #include "nautilus-floating-bar.h"
357 +@@ -6264,6 +6266,7 @@ real_action_rename (NautilusFilesView *view)
358 + {
359 + invoke_external_bulk_rename_utility (view, selection);
360 + }
361 ++#ifdef HAVE_TRACKER
362 + else
363 + {
364 + GdkCursor *cursor;
365 +@@ -6281,6 +6284,7 @@ real_action_rename (NautilusFilesView *view)
366 +
367 + gtk_widget_show (GTK_WIDGET (dialog));
368 + }
369 ++#endif
370 + }
371 + else
372 + {
373 +diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c
374 +index 209bd4f80..436cd7471 100644
375 +--- a/src/nautilus-search-engine.c
376 ++++ b/src/nautilus-search-engine.c
377 +@@ -28,11 +28,15 @@
378 + #include "nautilus-search-engine-model.h"
379 + #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
380 + #include "nautilus-debug.h"
381 ++#ifdef HAVE_TRACKER
382 + #include "nautilus-search-engine-tracker.h"
383 ++#endif
384 +
385 + typedef struct
386 + {
387 ++#ifdef HAVE_TRACKER
388 + NautilusSearchEngineTracker *tracker;
389 ++#endif
390 + NautilusSearchEngineSimple *simple;
391 + NautilusSearchEngineModel *model;
392 +
393 +@@ -73,7 +77,9 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider,
394 + engine = NAUTILUS_SEARCH_ENGINE (provider);
395 + priv = nautilus_search_engine_get_instance_private (engine);
396 +
397 ++#ifdef HAVE_TRACKER
398 + nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->tracker), query);
399 ++#endif
400 + nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->model), query);
401 + nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->simple), query);
402 + }
403 +@@ -95,8 +101,10 @@ search_engine_start_real (NautilusSearchEngine *engine)
404 +
405 + g_object_ref (engine);
406 +
407 ++#ifdef HAVE_TRACKER
408 + nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->tracker));
409 + priv->providers_running++;
410 ++#endif
411 +
412 + if (nautilus_search_engine_model_get_model (priv->model))
413 + {
414 +@@ -158,7 +166,9 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider)
415 +
416 + DEBUG ("Search engine stop");
417 +
418 ++#ifdef HAVE_TRACKER
419 + nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->tracker));
420 ++#endif
421 + nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->model));
422 + nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->simple));
423 +
424 +@@ -333,7 +343,9 @@ nautilus_search_engine_finalize (GObject *object)
425 +
426 + g_hash_table_destroy (priv->uris);
427 +
428 ++#ifdef HAVE_TRACKER
429 + g_clear_object (&priv->tracker);
430 ++#endif
431 + g_clear_object (&priv->model);
432 + g_clear_object (&priv->simple);
433 +
434 +@@ -387,8 +399,10 @@ nautilus_search_engine_init (NautilusSearchEngine *engine)
435 + priv = nautilus_search_engine_get_instance_private (engine);
436 + priv->uris = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
437 +
438 ++#ifdef HAVE_TRACKER
439 + priv->tracker = nautilus_search_engine_tracker_new ();
440 + connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->tracker));
441 ++#endif
442 +
443 + priv->model = nautilus_search_engine_model_new ();
444 + connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->model));
445 +--
446 +2.17.0
447 +
448
449 diff --git a/gnome-base/nautilus/nautilus-3.26.4-r2.ebuild b/gnome-base/nautilus/nautilus-3.26.4-r2.ebuild
450 new file mode 100644
451 index 00000000000..aef38545ec0
452 --- /dev/null
453 +++ b/gnome-base/nautilus/nautilus-3.26.4-r2.ebuild
454 @@ -0,0 +1,109 @@
455 +# Copyright 1999-2018 Gentoo Authors
456 +# Distributed under the terms of the GNU General Public License v2
457 +
458 +EAPI=6
459 +
460 +inherit gnome.org gnome2-utils meson readme.gentoo-r1 virtualx xdg
461 +
462 +DESCRIPTION="A file manager for the GNOME desktop"
463 +HOMEPAGE="https://wiki.gnome.org/Apps/Nautilus"
464 +
465 +LICENSE="GPL-3+ LGPL-2.1+"
466 +SLOT="0"
467 +IUSE="exif gnome gtk-doc +introspection packagekit +previewer selinux sendto tracker xmp"
468 +
469 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
470 +
471 +COMMON_DEPEND="
472 + >=dev-libs/glib-2.51.2:2
473 + >=gnome-base/gnome-desktop-3.0.0:3=
474 + >=x11-libs/pango-1.28.3
475 + >=x11-libs/gtk+-3.22.6:3[X,introspection?]
476 + >=dev-libs/libxml2-2.7.8:2
477 + exif? ( >=media-libs/libexif-0.6.20 )
478 + xmp? ( >=media-libs/exempi-2.1.0:2 )
479 + >=gnome-base/gsettings-desktop-schemas-3.8.0
480 + >=app-arch/gnome-autoar-0.2.1
481 + selinux? ( >=sys-libs/libselinux-2.0 )
482 + x11-libs/libX11
483 + tracker? ( >=app-misc/tracker-1:= )
484 + introspection? ( >=dev-libs/gobject-introspection-0.6.4:= )
485 +"
486 +DEPEND="${COMMON_DEPEND}
487 + >=dev-util/gdbus-codegen-2.51.2
488 + dev-util/glib-utils
489 + gtk-doc? ( >=dev-util/gtk-doc-1.10 )
490 + >=sys-devel/gettext-0.19.8
491 + virtual/pkgconfig
492 + x11-base/xorg-proto
493 +"
494 +RDEPEND="${COMMON_DEPEND}
495 + packagekit? ( app-admin/packagekit-base )
496 + sendto? ( !<gnome-extra/nautilus-sendto-3.0.1 )
497 +"
498 +
499 +PDEPEND="
500 + gnome? ( x11-themes/adwaita-icon-theme )
501 + previewer? ( >=gnome-extra/sushi-0.1.9 )
502 + sendto? ( >=gnome-extra/nautilus-sendto-3.0.1 )
503 + >=gnome-base/gvfs-1.14[gtk(+)]
504 +"
505 +# Need gvfs[gtk] for recent:/// support; always built (without USE=gtk) since gvfs-1.34
506 +
507 +PATCHES=(
508 + "${FILESDIR}"/${PV}-file-view-crash-fix.patch
509 + "${FILESDIR}"/${PV}-optional-tracker.patch
510 + "${FILESDIR}"/${PV}-optional-introspection.patch
511 +)
512 +
513 +src_prepare() {
514 + if use previewer; then
515 + DOC_CONTENTS="nautilus uses gnome-extra/sushi to preview media files.
516 + To activate the previewer, select a file and press space; to
517 + close the previewer, press space again."
518 + fi
519 + xdg_src_prepare
520 +}
521 +
522 +src_configure() {
523 + local emesonargs=(
524 + -Denable-profiling=false
525 + $(meson_use introspection)
526 + $(meson_use sendto enable-nst-extension)
527 + $(meson_use exif enable-exif)
528 + $(meson_use tracker)
529 + $(meson_use xmp enable-xmp)
530 + $(meson_use selinux enable-selinux)
531 + -Denable-desktop=true
532 + $(meson_use packagekit enable-packagekit)
533 + $(meson_use gtk-doc enable-gtk-doc)
534 + )
535 + meson_src_configure
536 +}
537 +
538 +src_install() {
539 + use previewer && readme.gentoo_create_doc
540 + meson_src_install
541 +}
542 +
543 +src_test() {
544 + virtx meson_src_test
545 +}
546 +
547 +pkg_postinst() {
548 + xdg_pkg_postinst
549 + gnome2_icon_cache_update
550 + gnome2_schemas_update
551 +
552 + if use previewer; then
553 + readme.gentoo_print_elog
554 + else
555 + elog "To preview media files, emerge nautilus with USE=previewer"
556 + fi
557 +}
558 +
559 +pkg_postrm() {
560 + xdg_pkg_postrm
561 + gnome2_icon_cache_update
562 + gnome2_schemas_update
563 +}