1 |
commit: 17bd946d4b691e0c40820704d83f7cb3e9b467c1 |
2 |
Author: Johannes Huber <johu <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 30 14:43:31 2012 +0000 |
4 |
Commit: Johannes Huber <johu <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 30 14:43:31 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=17bd946d |
7 |
|
8 |
[kde-base/nepomuk] Add upstream patches to fix file collisions properly. |
9 |
|
10 |
(Portage version: 2.2.0_alpha108/git/Linux x86_64, unsigned Manifest commit) |
11 |
|
12 |
--- |
13 |
.../files/nepomuk-4.8.80-file-collisions.patch | 989 ++++++++++++++++++++ |
14 |
kde-base/nepomuk/nepomuk-4.8.80.ebuild | 10 +- |
15 |
kde-base/nepomuk/nepomuk-9999.ebuild | 10 - |
16 |
3 files changed, 990 insertions(+), 19 deletions(-) |
17 |
|
18 |
diff --git a/kde-base/nepomuk/files/nepomuk-4.8.80-file-collisions.patch b/kde-base/nepomuk/files/nepomuk-4.8.80-file-collisions.patch |
19 |
new file mode 100644 |
20 |
index 0000000..d3f7922 |
21 |
--- /dev/null |
22 |
+++ b/kde-base/nepomuk/files/nepomuk-4.8.80-file-collisions.patch |
23 |
@@ -0,0 +1,989 @@ |
24 |
+commit 959412fdd7a3bbff6921474342d1209c212a410d |
25 |
+Author: Vishesh Handa <handa.vish@×××××.com> |
26 |
+Date: Fri May 25 23:20:49 2012 +0530 |
27 |
+ |
28 |
+ Remove the nepomukcommon shared library |
29 |
+ |
30 |
+ It turns out that only the kcm is using it. None of the kioslaves |
31 |
+ or anyone else really need it. |
32 |
+ |
33 |
+ It is also being installed by nepomuk-core, and that causes clashes. |
34 |
+ |
35 |
+diff --git a/nepomuk/CMakeLists.txt b/nepomuk/CMakeLists.txt |
36 |
+index 428f332..2918236 100644 |
37 |
+--- a/nepomuk/CMakeLists.txt |
38 |
++++ b/nepomuk/CMakeLists.txt |
39 |
+@@ -14,7 +14,6 @@ include_directories( |
40 |
+ ${nepomuk_BINARY_DIR}/common |
41 |
+ ) |
42 |
+ |
43 |
+-add_subdirectory(common) |
44 |
+ add_subdirectory(kcm) |
45 |
+ add_subdirectory(kioslaves) |
46 |
+ add_subdirectory(controller) |
47 |
+diff --git a/nepomuk/common/CMakeLists.txt b/nepomuk/common/CMakeLists.txt |
48 |
+deleted file mode 100644 |
49 |
+index 957e6b0..0000000 |
50 |
+--- a/nepomuk/common/CMakeLists.txt |
51 |
++++ /dev/null |
52 |
+@@ -1,20 +0,0 @@ |
53 |
+-project(nepomuk_common) |
54 |
+- |
55 |
+-set(nepomukcommon_SRCS |
56 |
+- fileexcludefilters.cpp |
57 |
+- regexpcache.cpp |
58 |
+- removablemediacache.cpp |
59 |
+-) |
60 |
+- |
61 |
+-kde4_add_library(nepomukcommon SHARED ${nepomukcommon_SRCS}) |
62 |
+- |
63 |
+-target_link_libraries(nepomukcommon |
64 |
+- ${QT_QTCORE_LIBRARY} |
65 |
+- ${KDE4_KDECORE_LIBRARY} |
66 |
+- ${KDE4_SOLID_LIBRARY} |
67 |
+- ${NEPOMUK_CORE_LIBRARY} |
68 |
+- ) |
69 |
+- |
70 |
+-install(TARGETS nepomukcommon EXPORT ${INSTALL_TARGETS_DEFAULT_ARGS}) |
71 |
+- |
72 |
+-# Note: no headers installed since this is a private shared lib |
73 |
+diff --git a/nepomuk/common/fileexcludefilters.cpp b/nepomuk/common/fileexcludefilters.cpp |
74 |
+deleted file mode 100644 |
75 |
+index 846e4bd..0000000 |
76 |
+--- a/nepomuk/common/fileexcludefilters.cpp |
77 |
++++ /dev/null |
78 |
+@@ -1,116 +0,0 @@ |
79 |
+-/* This file is part of the KDE Project |
80 |
+- Copyright (c) 2008-2010 Sebastian Trueg <trueg@×××.org> |
81 |
+- |
82 |
+- This library is free software; you can redistribute it and/or |
83 |
+- modify it under the terms of the GNU Library General Public |
84 |
+- License version 2 as published by the Free Software Foundation. |
85 |
+- |
86 |
+- This library is distributed in the hope that it will be useful, |
87 |
+- but WITHOUT ANY WARRANTY; without even the implied warranty of |
88 |
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
89 |
+- Library General Public License for more details. |
90 |
+- |
91 |
+- You should have received a copy of the GNU Library General Public License |
92 |
+- along with this library; see the file COPYING.LIB. If not, write to |
93 |
+- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
94 |
+- Boston, MA 02110-1301, USA. |
95 |
+-*/ |
96 |
+- |
97 |
+-#include "fileexcludefilters.h" |
98 |
+- |
99 |
+-namespace { |
100 |
+- const char* s_defaultFileExcludeFilters[] = { |
101 |
+- // tmp files |
102 |
+- "*~", |
103 |
+- "*.part", |
104 |
+- |
105 |
+- // temporary build files |
106 |
+- "*.o", |
107 |
+- "*.la", |
108 |
+- "*.lo", |
109 |
+- "*.loT", |
110 |
+- "*.moc", |
111 |
+- "moc_*.cpp", |
112 |
+- "cmake_install.cmake", |
113 |
+- "CMakeCache.txt", |
114 |
+- "CTestTestfile.cmake", |
115 |
+- "libtool", |
116 |
+- "config.status", |
117 |
+- "confdefs.h", |
118 |
+- "autom4te", |
119 |
+- "conftest", |
120 |
+- "confstat", |
121 |
+- "Makefile.am", |
122 |
+- |
123 |
+- // misc |
124 |
+- "*.csproj", |
125 |
+- "*.m4", |
126 |
+- "*.rej", |
127 |
+- "*.gmo", |
128 |
+- "*.pc", |
129 |
+- "*.omf", |
130 |
+- "*.aux", |
131 |
+- "*.tmp", |
132 |
+- "*.po", |
133 |
+- "*.vm*", |
134 |
+- "*.nvram", |
135 |
+- "*.rcore", |
136 |
+- "lzo", |
137 |
+- "litmain.sh", |
138 |
+- "*.orig", |
139 |
+- ".histfile.*", |
140 |
+- ".xsession-errors*", |
141 |
+- |
142 |
+- // Compiled files |
143 |
+- "*.class", // Java |
144 |
+- "*.pyc", // Python |
145 |
+- "*.elc", // Emacs Lisp |
146 |
+- |
147 |
+- // end of list |
148 |
+- 0 |
149 |
+- }; |
150 |
+- |
151 |
+- const int s_defaultFileExcludeFiltersVersion = 2; |
152 |
+- |
153 |
+- const char* s_defaultFolderExcludeFilters[] = { |
154 |
+- "po", |
155 |
+- |
156 |
+- // VCS |
157 |
+- "CVS", |
158 |
+- ".svn", |
159 |
+- ".git", |
160 |
+- "_darcs", |
161 |
+- ".bzr", |
162 |
+- ".hg", |
163 |
+- |
164 |
+- // development |
165 |
+- "CMakeFiles", |
166 |
+- "CMakeTmp", |
167 |
+- "CMakeTmpQmake", |
168 |
+- |
169 |
+- //misc |
170 |
+- "core-dumps", |
171 |
+- "lost+found", |
172 |
+- |
173 |
+- // end of list |
174 |
+- 0 |
175 |
+- }; |
176 |
+- |
177 |
+- const int s_defaultFolderExcludeFiltersVersion = 1; |
178 |
+-} |
179 |
+- |
180 |
+- |
181 |
+-QStringList Nepomuk2::defaultExcludeFilterList() |
182 |
+-{ |
183 |
+- QStringList l; |
184 |
+- for ( int i = 0; s_defaultFileExcludeFilters[i]; ++i ) |
185 |
+- l << QLatin1String( s_defaultFileExcludeFilters[i] ); |
186 |
+- for ( int i = 0; s_defaultFolderExcludeFilters[i]; ++i ) |
187 |
+- l << QLatin1String( s_defaultFolderExcludeFilters[i] ); |
188 |
+- return l; |
189 |
+-} |
190 |
+- |
191 |
+-int Nepomuk2::defaultExcludeFilterListVersion() |
192 |
+-{ |
193 |
+- return qMax(s_defaultFileExcludeFiltersVersion, s_defaultFolderExcludeFiltersVersion); |
194 |
+-} |
195 |
+diff --git a/nepomuk/common/fileexcludefilters.h b/nepomuk/common/fileexcludefilters.h |
196 |
+deleted file mode 100644 |
197 |
+index 0f438f7..0000000 |
198 |
+--- a/nepomuk/common/fileexcludefilters.h |
199 |
++++ /dev/null |
200 |
+@@ -1,42 +0,0 @@ |
201 |
+-/* This file is part of the KDE Project |
202 |
+- Copyright (c) 2008-2010 Sebastian Trueg <trueg@×××.org> |
203 |
+- |
204 |
+- This library is free software; you can redistribute it and/or |
205 |
+- modify it under the terms of the GNU Library General Public |
206 |
+- License version 2 as published by the Free Software Foundation. |
207 |
+- |
208 |
+- This library is distributed in the hope that it will be useful, |
209 |
+- but WITHOUT ANY WARRANTY; without even the implied warranty of |
210 |
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
211 |
+- Library General Public License for more details. |
212 |
+- |
213 |
+- You should have received a copy of the GNU Library General Public License |
214 |
+- along with this library; see the file COPYING.LIB. If not, write to |
215 |
+- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
216 |
+- Boston, MA 02110-1301, USA. |
217 |
+-*/ |
218 |
+- |
219 |
+-#ifndef _FILE_EXCLUDE_FILTERS_H_ |
220 |
+-#define _FILE_EXCLUDE_FILTERS_H_ |
221 |
+- |
222 |
+-#include <QtCore/QStringList> |
223 |
+- |
224 |
+-#include "nepomukcommon_export.h" |
225 |
+- |
226 |
+-namespace Nepomuk2 { |
227 |
+- /** |
228 |
+- * \return A list of default exclude filters to be used |
229 |
+- * in the filewatch service to ignore temporary files |
230 |
+- * and folders that change a lot and as a basis for the |
231 |
+- * user configurable exclude filters in the strigi service. |
232 |
+- */ |
233 |
+- NEPOMUKCOMMON_EXPORT QStringList defaultExcludeFilterList(); |
234 |
+- |
235 |
+- /** |
236 |
+- * \return The version of the default exclude filter list. |
237 |
+- * This is increased whenever the list changes. |
238 |
+- */ |
239 |
+- NEPOMUKCOMMON_EXPORT int defaultExcludeFilterListVersion(); |
240 |
+-} |
241 |
+- |
242 |
+-#endif |
243 |
+diff --git a/nepomuk/common/nepomukcommon_export.h b/nepomuk/common/nepomukcommon_export.h |
244 |
+deleted file mode 100644 |
245 |
+index e690000..0000000 |
246 |
+--- a/nepomuk/common/nepomukcommon_export.h |
247 |
++++ /dev/null |
248 |
+@@ -1,40 +0,0 @@ |
249 |
+-/* This file is part of the KDE project |
250 |
+- Copyright (C) 2007 David Faure <faure@×××.org> |
251 |
+- |
252 |
+- This library is free software; you can redistribute it and/or |
253 |
+- modify it under the terms of the GNU Library General Public |
254 |
+- License as published by the Free Software Foundation; either |
255 |
+- version 2 of the License, or (at your option) any later version. |
256 |
+- |
257 |
+- This library is distributed in the hope that it will be useful, |
258 |
+- but WITHOUT ANY WARRANTY; without even the implied warranty of |
259 |
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
260 |
+- Library General Public License for more details. |
261 |
+- |
262 |
+- You should have received a copy of the GNU Library General Public License |
263 |
+- along with this library; see the file COPYING.LIB. If not, write to |
264 |
+- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
265 |
+- Boston, MA 02110-1301, USA. |
266 |
+-*/ |
267 |
+- |
268 |
+-#ifndef NEPOMUKCOMMON_EXPORT_H |
269 |
+-#define NEPOMUKCOMMON_EXPORT_H |
270 |
+- |
271 |
+-/* needed for KDE_EXPORT and KDE_IMPORT macros */ |
272 |
+-#include <kdemacros.h> |
273 |
+- |
274 |
+-#ifndef NEPOMUKCOMMON_EXPORT |
275 |
+-# if defined(MAKE_NEPOMUKCOMMON_LIB) |
276 |
+- /* We are building this library */ |
277 |
+-# define NEPOMUKCOMMON_EXPORT KDE_EXPORT |
278 |
+-# else |
279 |
+- /* We are using this library */ |
280 |
+-# define NEPOMUKCOMMON_EXPORT KDE_IMPORT |
281 |
+-# endif |
282 |
+-#endif |
283 |
+- |
284 |
+-# ifndef NEPOMUKCOMMON_EXPORT_DEPRECATED |
285 |
+-# define NEPOMUKCOMMON_EXPORT_DEPRECATED KDE_DEPRECATED NEPOMUKCOMMON_EXPORT |
286 |
+-# endif |
287 |
+- |
288 |
+-#endif |
289 |
+diff --git a/nepomuk/common/nepomuktools.h b/nepomuk/common/nepomuktools.h |
290 |
+deleted file mode 100644 |
291 |
+index 853f2ff..0000000 |
292 |
+--- a/nepomuk/common/nepomuktools.h |
293 |
++++ /dev/null |
294 |
+@@ -1,61 +0,0 @@ |
295 |
+-/* |
296 |
+- This file is part of the Nepomuk KDE project. |
297 |
+- Copyright (C) 2011 Sebastian Trueg <trueg@×××.org> |
298 |
+- |
299 |
+- This library is free software; you can redistribute it and/or |
300 |
+- modify it under the terms of the GNU Lesser General Public |
301 |
+- License as published by the Free Software Foundation; either |
302 |
+- version 2.1 of the License, or (at your option) version 3, or any |
303 |
+- later version accepted by the membership of KDE e.V. (or its |
304 |
+- successor approved by the membership of KDE e.V.), which shall |
305 |
+- act as a proxy defined in Section 6 of version 3 of the license. |
306 |
+- |
307 |
+- This library is distributed in the hope that it will be useful, |
308 |
+- but WITHOUT ANY WARRANTY; without even the implied warranty of |
309 |
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
310 |
+- Lesser General Public License for more details. |
311 |
+- |
312 |
+- You should have received a copy of the GNU Lesser General Public |
313 |
+- License along with this library. If not, see <http://www.gnu.org/licenses/>. |
314 |
+-*/ |
315 |
+- |
316 |
+-#ifndef NEPOMUKTOOLS_H |
317 |
+-#define NEPOMUKTOOLS_H |
318 |
+- |
319 |
+-#include <KUrl> |
320 |
+-#include <QtCore/QStringList> |
321 |
+-#include <Soprano/Node> |
322 |
+- |
323 |
+-namespace Nepomuk2 { |
324 |
+-const int MAX_SPLIT_LIST_ITEMS = 20; |
325 |
+- |
326 |
+-/** |
327 |
+- * Convert a list or set or QUrls into a list of N3 formatted strings. |
328 |
+- */ |
329 |
+-template<typename T> QStringList resourcesToN3(const T& urls) { |
330 |
+- QStringList n3; |
331 |
+- Q_FOREACH(const QUrl& url, urls) { |
332 |
+- n3 << Soprano::Node::resourceToN3(url); |
333 |
+- } |
334 |
+- return n3; |
335 |
+-} |
336 |
+- |
337 |
+-/** |
338 |
+- * Split a list into several lists, each not containing more than \p max items |
339 |
+- */ |
340 |
+-template<typename T> QList<QList<T> > splitList(const QList<T>& list, int max = MAX_SPLIT_LIST_ITEMS) { |
341 |
+- QList<QList<T> > splitted; |
342 |
+- int i = 0; |
343 |
+- QList<T> single; |
344 |
+- foreach(const T& item, list) { |
345 |
+- single.append(item); |
346 |
+- if(++i >= max) { |
347 |
+- splitted << single; |
348 |
+- single.clear(); |
349 |
+- } |
350 |
+- } |
351 |
+- return splitted; |
352 |
+-} |
353 |
+-} |
354 |
+- |
355 |
+-#endif // NEPOMUKTOOLS_H |
356 |
+diff --git a/nepomuk/common/regexpcache.cpp b/nepomuk/common/regexpcache.cpp |
357 |
+deleted file mode 100644 |
358 |
+index df45277..0000000 |
359 |
+--- a/nepomuk/common/regexpcache.cpp |
360 |
++++ /dev/null |
361 |
+@@ -1,66 +0,0 @@ |
362 |
+-/* |
363 |
+- This file is part of the Nepomuk KDE project. |
364 |
+- Copyright (C) 2010 Sebastian Trueg <trueg@×××.org> |
365 |
+- |
366 |
+- This library is free software; you can redistribute it and/or |
367 |
+- modify it under the terms of the GNU Lesser General Public |
368 |
+- License as published by the Free Software Foundation; either |
369 |
+- version 2.1 of the License, or (at your option) version 3, or any |
370 |
+- later version accepted by the membership of KDE e.V. (or its |
371 |
+- successor approved by the membership of KDE e.V.), which shall |
372 |
+- act as a proxy defined in Section 6 of version 3 of the license. |
373 |
+- |
374 |
+- This library is distributed in the hope that it will be useful, |
375 |
+- but WITHOUT ANY WARRANTY; without even the implied warranty of |
376 |
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
377 |
+- Lesser General Public License for more details. |
378 |
+- |
379 |
+- You should have received a copy of the GNU Lesser General Public |
380 |
+- License along with this library. If not, see <http://www.gnu.org/licenses/>. |
381 |
+-*/ |
382 |
+- |
383 |
+-#include "regexpcache.h" |
384 |
+- |
385 |
+-#include <QtCore/QStringList> |
386 |
+- |
387 |
+- |
388 |
+-RegExpCache::RegExpCache() |
389 |
+-{ |
390 |
+-} |
391 |
+- |
392 |
+- |
393 |
+-RegExpCache::~RegExpCache() |
394 |
+-{ |
395 |
+-} |
396 |
+- |
397 |
+- |
398 |
+-bool RegExpCache::exactMatch( const QString& s ) const |
399 |
+-{ |
400 |
+- Q_FOREACH( const QRegExp& filter, m_regexpCache ) { |
401 |
+- if ( filter.exactMatch( s ) ) { |
402 |
+- return true; |
403 |
+- } |
404 |
+- } |
405 |
+- return false; |
406 |
+-} |
407 |
+- |
408 |
+- |
409 |
+-bool RegExpCache::filenameMatch( const QString& path ) const |
410 |
+-{ |
411 |
+- QString name; |
412 |
+- int i = path.lastIndexOf( '/' ); |
413 |
+- if( i >= 0 ) |
414 |
+- name = path.mid(i+1); |
415 |
+- else |
416 |
+- name = path; |
417 |
+- return exactMatch( name ); |
418 |
+-} |
419 |
+- |
420 |
+- |
421 |
+-void RegExpCache::rebuildCacheFromFilterList( const QStringList& filters ) |
422 |
+-{ |
423 |
+- m_regexpCache.clear(); |
424 |
+- Q_FOREACH( const QString& filter, filters ) { |
425 |
+- m_regexpCache.append( QRegExp( filter, Qt::CaseSensitive, QRegExp::Wildcard ) ); |
426 |
+- } |
427 |
+-} |
428 |
+diff --git a/nepomuk/common/regexpcache.h b/nepomuk/common/regexpcache.h |
429 |
+deleted file mode 100644 |
430 |
+index d89f968..0000000 |
431 |
+--- a/nepomuk/common/regexpcache.h |
432 |
++++ /dev/null |
433 |
+@@ -1,48 +0,0 @@ |
434 |
+-/* |
435 |
+- This file is part of the Nepomuk KDE project. |
436 |
+- Copyright (C) 2010 Sebastian Trueg <trueg@×××.org> |
437 |
+- |
438 |
+- This library is free software; you can redistribute it and/or |
439 |
+- modify it under the terms of the GNU Lesser General Public |
440 |
+- License as published by the Free Software Foundation; either |
441 |
+- version 2.1 of the License, or (at your option) version 3, or any |
442 |
+- later version accepted by the membership of KDE e.V. (or its |
443 |
+- successor approved by the membership of KDE e.V.), which shall |
444 |
+- act as a proxy defined in Section 6 of version 3 of the license. |
445 |
+- |
446 |
+- This library is distributed in the hope that it will be useful, |
447 |
+- but WITHOUT ANY WARRANTY; without even the implied warranty of |
448 |
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
449 |
+- Lesser General Public License for more details. |
450 |
+- |
451 |
+- You should have received a copy of the GNU Lesser General Public |
452 |
+- License along with this library. If not, see <http://www.gnu.org/licenses/>. |
453 |
+-*/ |
454 |
+- |
455 |
+-#ifndef _REGEXP_CACHE_H_ |
456 |
+-#define _REGEXP_CACHE_H_ |
457 |
+- |
458 |
+-#include <QtCore/QList> |
459 |
+-#include <QtCore/QRegExp> |
460 |
+- |
461 |
+-#include "nepomukcommon_export.h" |
462 |
+- |
463 |
+-class NEPOMUKCOMMON_EXPORT RegExpCache |
464 |
+-{ |
465 |
+-public: |
466 |
+- RegExpCache(); |
467 |
+- ~RegExpCache(); |
468 |
+- |
469 |
+- bool exactMatch( const QString& s ) const; |
470 |
+- bool filenameMatch( const QString& path ) const; |
471 |
+- |
472 |
+- void rebuildCacheFromFilterList( const QStringList& filters ); |
473 |
+- |
474 |
+- QList<QRegExp> regExps() const { return m_regexpCache; } |
475 |
+- |
476 |
+-private: |
477 |
+- QList<QRegExp> m_regexpCache; |
478 |
+-}; |
479 |
+- |
480 |
+-#endif |
481 |
+- |
482 |
+diff --git a/nepomuk/common/removablemediacache.cpp b/nepomuk/common/removablemediacache.cpp |
483 |
+deleted file mode 100644 |
484 |
+index 437c133..0000000 |
485 |
+--- a/nepomuk/common/removablemediacache.cpp |
486 |
++++ /dev/null |
487 |
+@@ -1,308 +0,0 @@ |
488 |
+-/* |
489 |
+- This file is part of the Nepomuk KDE project. |
490 |
+- Copyright (C) 2011 Sebastian Trueg <trueg@×××.org> |
491 |
+- |
492 |
+- This library is free software; you can redistribute it and/or |
493 |
+- modify it under the terms of the GNU Lesser General Public |
494 |
+- License as published by the Free Software Foundation; either |
495 |
+- version 2.1 of the License, or (at your option) version 3, or any |
496 |
+- later version accepted by the membership of KDE e.V. (or its |
497 |
+- successor approved by the membership of KDE e.V.), which shall |
498 |
+- act as a proxy defined in Section 6 of version 3 of the license. |
499 |
+- |
500 |
+- This library is distributed in the hope that it will be useful, |
501 |
+- but WITHOUT ANY WARRANTY; without even the implied warranty of |
502 |
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
503 |
+- Lesser General Public License for more details. |
504 |
+- |
505 |
+- You should have received a copy of the GNU Lesser General Public |
506 |
+- License along with this library. If not, see <http://www.gnu.org/licenses/>. |
507 |
+-*/ |
508 |
+- |
509 |
+-#include "removablemediacache.h" |
510 |
+- |
511 |
+-#include <Solid/DeviceNotifier> |
512 |
+-#include <Solid/DeviceInterface> |
513 |
+-#include <Solid/Block> |
514 |
+-#include <Solid/Device> |
515 |
+-#include <Solid/StorageDrive> |
516 |
+-#include <Solid/StorageVolume> |
517 |
+-#include <Solid/StorageAccess> |
518 |
+-#include <Solid/NetworkShare> |
519 |
+-#include <Solid/OpticalDisc> |
520 |
+-#include <Solid/Predicate> |
521 |
+- |
522 |
+-#include <KDebug> |
523 |
+- |
524 |
+-#include <QtCore/QMutexLocker> |
525 |
+- |
526 |
+- |
527 |
+-namespace { |
528 |
+- bool isUsableVolume( const Solid::Device& dev ) { |
529 |
+- if ( dev.is<Solid::StorageAccess>() ) { |
530 |
+- if( dev.is<Solid::StorageVolume>() && |
531 |
+- dev.parent().is<Solid::StorageDrive>() && |
532 |
+- ( dev.parent().as<Solid::StorageDrive>()->isRemovable() || |
533 |
+- dev.parent().as<Solid::StorageDrive>()->isHotpluggable() ) ) { |
534 |
+- const Solid::StorageVolume* volume = dev.as<Solid::StorageVolume>(); |
535 |
+- if ( !volume->isIgnored() && volume->usage() == Solid::StorageVolume::FileSystem ) |
536 |
+- return true; |
537 |
+- } |
538 |
+- else if(dev.is<Solid::NetworkShare>()) { |
539 |
+- return !dev.as<Solid::NetworkShare>()->url().isEmpty(); |
540 |
+- } |
541 |
+- } |
542 |
+- |
543 |
+- // fallback |
544 |
+- return false; |
545 |
+- } |
546 |
+- |
547 |
+- bool isUsableVolume( const QString& udi ) { |
548 |
+- Solid::Device dev( udi ); |
549 |
+- return isUsableVolume( dev ); |
550 |
+- } |
551 |
+-} |
552 |
+- |
553 |
+- |
554 |
+-Nepomuk2::RemovableMediaCache::RemovableMediaCache(QObject *parent) |
555 |
+- : QObject(parent) |
556 |
+-{ |
557 |
+- initCacheEntries(); |
558 |
+- |
559 |
+- connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceAdded( const QString& ) ), |
560 |
+- this, SLOT( slotSolidDeviceAdded( const QString& ) ) ); |
561 |
+- connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceRemoved( const QString& ) ), |
562 |
+- this, SLOT( slotSolidDeviceRemoved( const QString& ) ) ); |
563 |
+-} |
564 |
+- |
565 |
+- |
566 |
+-Nepomuk2::RemovableMediaCache::~RemovableMediaCache() |
567 |
+-{ |
568 |
+-} |
569 |
+- |
570 |
+- |
571 |
+-void Nepomuk2::RemovableMediaCache::initCacheEntries() |
572 |
+-{ |
573 |
+- QList<Solid::Device> devices |
574 |
+- = Solid::Device::listFromQuery(QLatin1String("StorageVolume.usage=='FileSystem'")) |
575 |
+- + Solid::Device::listFromType(Solid::DeviceInterface::NetworkShare); |
576 |
+- foreach( const Solid::Device& dev, devices ) { |
577 |
+- if ( isUsableVolume( dev ) ) { |
578 |
+- if(Entry* entry = createCacheEntry( dev )) { |
579 |
+- const Solid::StorageAccess* storage = entry->device().as<Solid::StorageAccess>(); |
580 |
+- if ( storage && storage->isAccessible() ) |
581 |
+- slotAccessibilityChanged( true, dev.udi() ); |
582 |
+- } |
583 |
+- } |
584 |
+- } |
585 |
+-} |
586 |
+- |
587 |
+-QList<const Nepomuk2::RemovableMediaCache::Entry *> Nepomuk2::RemovableMediaCache::allMedia() const |
588 |
+-{ |
589 |
+- QList<const Entry*> media; |
590 |
+- for(QHash<QString, Entry>::const_iterator it = m_metadataCache.begin(); it != m_metadataCache.end(); ++it) |
591 |
+- media.append(&(*it)); |
592 |
+- return media; |
593 |
+-} |
594 |
+- |
595 |
+-Nepomuk2::RemovableMediaCache::Entry* Nepomuk2::RemovableMediaCache::createCacheEntry( const Solid::Device& dev ) |
596 |
+-{ |
597 |
+- QMutexLocker lock(&m_entryCacheMutex); |
598 |
+- |
599 |
+- Entry entry(dev); |
600 |
+- if(!entry.url().isEmpty()) { |
601 |
+- kDebug() << "Usable" << dev.udi(); |
602 |
+- |
603 |
+- // we only add to this set and never remove. This is no problem as this is a small set |
604 |
+- m_usedSchemas.insert(KUrl(entry.url()).scheme()); |
605 |
+- |
606 |
+- connect( dev.as<Solid::StorageAccess>(), SIGNAL(accessibilityChanged(bool, QString)), |
607 |
+- this, SLOT(slotAccessibilityChanged(bool, QString)) ); |
608 |
+- |
609 |
+- m_metadataCache.insert( dev.udi(), entry ); |
610 |
+- |
611 |
+- emit deviceAdded(&m_metadataCache[dev.udi()]); |
612 |
+- |
613 |
+- return &m_metadataCache[dev.udi()]; |
614 |
+- } |
615 |
+- else { |
616 |
+- kDebug() << "Cannot use device due to empty identifier:" << dev.udi(); |
617 |
+- return 0; |
618 |
+- } |
619 |
+-} |
620 |
+- |
621 |
+- |
622 |
+-const Nepomuk2::RemovableMediaCache::Entry* Nepomuk2::RemovableMediaCache::findEntryByFilePath( const QString& path ) const |
623 |
+-{ |
624 |
+- QMutexLocker lock(&m_entryCacheMutex); |
625 |
+- |
626 |
+- for( QHash<QString, Entry>::const_iterator it = m_metadataCache.begin(); |
627 |
+- it != m_metadataCache.end(); ++it ) { |
628 |
+- const Entry& entry = *it; |
629 |
+- const Solid::StorageAccess* storage = entry.device().as<Solid::StorageAccess>(); |
630 |
+- if ( storage && |
631 |
+- storage->isAccessible() && |
632 |
+- path.startsWith( storage->filePath() ) ) |
633 |
+- return &entry; |
634 |
+- } |
635 |
+- |
636 |
+- return 0; |
637 |
+-} |
638 |
+- |
639 |
+- |
640 |
+-const Nepomuk2::RemovableMediaCache::Entry* Nepomuk2::RemovableMediaCache::findEntryByUrl(const KUrl &url) const |
641 |
+-{ |
642 |
+- QMutexLocker lock(&m_entryCacheMutex); |
643 |
+- |
644 |
+- const QString encodedUrl = QString::fromAscii(url.toEncoded()); |
645 |
+- for( QHash<QString, Entry>::const_iterator it = m_metadataCache.constBegin(); |
646 |
+- it != m_metadataCache.constEnd(); ++it ) { |
647 |
+- const Entry& entry = *it; |
648 |
+- if(encodedUrl.startsWith(entry.url())) { |
649 |
+- return &entry; |
650 |
+- } |
651 |
+- } |
652 |
+- |
653 |
+- return 0; |
654 |
+-} |
655 |
+- |
656 |
+- |
657 |
+-QList<const Nepomuk2::RemovableMediaCache::Entry*> Nepomuk2::RemovableMediaCache::findEntriesByMountPath(const QString &path) const |
658 |
+-{ |
659 |
+- QList<const Entry*> entries; |
660 |
+- for( QHash<QString, Entry>::const_iterator it = m_metadataCache.constBegin(); |
661 |
+- it != m_metadataCache.constEnd(); ++it ) { |
662 |
+- const Entry& entry = *it; |
663 |
+- if(entry.isMounted() && |
664 |
+- entry.mountPath().startsWith(path)) { |
665 |
+- entries.append(&entry); |
666 |
+- } |
667 |
+- } |
668 |
+- return entries; |
669 |
+-} |
670 |
+- |
671 |
+- |
672 |
+-bool Nepomuk2::RemovableMediaCache::hasRemovableSchema(const KUrl &url) const |
673 |
+-{ |
674 |
+- return m_usedSchemas.contains(url.scheme()); |
675 |
+-} |
676 |
+- |
677 |
+- |
678 |
+-void Nepomuk2::RemovableMediaCache::slotSolidDeviceAdded( const QString& udi ) |
679 |
+-{ |
680 |
+- kDebug() << udi; |
681 |
+- |
682 |
+- if ( isUsableVolume( udi ) ) { |
683 |
+- createCacheEntry( Solid::Device( udi ) ); |
684 |
+- } |
685 |
+-} |
686 |
+- |
687 |
+- |
688 |
+-void Nepomuk2::RemovableMediaCache::slotSolidDeviceRemoved( const QString& udi ) |
689 |
+-{ |
690 |
+- kDebug() << udi; |
691 |
+- if ( m_metadataCache.contains( udi ) ) { |
692 |
+- kDebug() << "Found removable storage volume for Nepomuk undocking:" << udi; |
693 |
+- m_metadataCache.remove( udi ); |
694 |
+- } |
695 |
+-} |
696 |
+- |
697 |
+- |
698 |
+-void Nepomuk2::RemovableMediaCache::slotAccessibilityChanged( bool accessible, const QString& udi ) |
699 |
+-{ |
700 |
+- kDebug() << accessible << udi; |
701 |
+- |
702 |
+- // |
703 |
+- // cache new mount path |
704 |
+- // |
705 |
+- if ( accessible ) { |
706 |
+- QMutexLocker lock(&m_entryCacheMutex); |
707 |
+- Entry* entry = &m_metadataCache[udi]; |
708 |
+- kDebug() << udi << "accessible at" << entry->device().as<Solid::StorageAccess>()->filePath() << "with identifier" << entry->url(); |
709 |
+- emit deviceMounted(entry); |
710 |
+- } |
711 |
+-} |
712 |
+- |
713 |
+- |
714 |
+-Nepomuk2::RemovableMediaCache::Entry::Entry() |
715 |
+-{ |
716 |
+-} |
717 |
+- |
718 |
+- |
719 |
+-Nepomuk2::RemovableMediaCache::Entry::Entry(const Solid::Device& device) |
720 |
+- : m_device(device) |
721 |
+-{ |
722 |
+- if(device.is<Solid::StorageVolume>()) { |
723 |
+- const Solid::StorageVolume* volume = m_device.as<Solid::StorageVolume>(); |
724 |
+- if(device.is<Solid::OpticalDisc>() && |
725 |
+- !volume->label().isEmpty()) { |
726 |
+- // we use the label as is - it is not even close to unique but |
727 |
+- // so far we have nothing better |
728 |
+- |
729 |
+- // QUrl does convert the host to lower case |
730 |
+- QString label = volume->label().toLower(); |
731 |
+- // QUrl does not allow spaces in the host |
732 |
+- label.replace(' ', '_'); |
733 |
+- |
734 |
+- m_urlPrefix = QLatin1String("optical://") + label; |
735 |
+- } |
736 |
+- else if(!volume->uuid().isEmpty()) { |
737 |
+- // we always use lower-case uuids |
738 |
+- m_urlPrefix = QLatin1String("filex://") + volume->uuid().toLower(); |
739 |
+- } |
740 |
+- } |
741 |
+- else if(device.is<Solid::NetworkShare>()) { |
742 |
+- m_urlPrefix = device.as<Solid::NetworkShare>()->url().toString(); |
743 |
+- } |
744 |
+-} |
745 |
+- |
746 |
+-KUrl Nepomuk2::RemovableMediaCache::Entry::constructRelativeUrl( const QString& path ) const |
747 |
+-{ |
748 |
+- if(const Solid::StorageAccess* sa = m_device.as<Solid::StorageAccess>()) { |
749 |
+- if(sa->isAccessible()) { |
750 |
+- const QString relativePath = path.mid( sa->filePath().count() ); |
751 |
+- return KUrl( m_urlPrefix + relativePath ); |
752 |
+- } |
753 |
+- } |
754 |
+- |
755 |
+- // fallback |
756 |
+- return KUrl(); |
757 |
+-} |
758 |
+- |
759 |
+- |
760 |
+-KUrl Nepomuk2::RemovableMediaCache::Entry::constructLocalFileUrl( const KUrl& filexUrl ) const |
761 |
+-{ |
762 |
+- if(const Solid::StorageAccess* sa = m_device.as<Solid::StorageAccess>()) { |
763 |
+- if(sa->isAccessible()) { |
764 |
+- // the base of the path: the mount path |
765 |
+- KUrl fileUrl( sa->filePath() ); |
766 |
+- fileUrl.addPath(QUrl::fromEncoded(filexUrl.toEncoded().mid(m_urlPrefix.count())).toString()); |
767 |
+- return fileUrl; |
768 |
+- } |
769 |
+- } |
770 |
+- |
771 |
+- // fallback |
772 |
+- return QString(); |
773 |
+-} |
774 |
+- |
775 |
+-QString Nepomuk2::RemovableMediaCache::Entry::mountPath() const |
776 |
+-{ |
777 |
+- if(const Solid::StorageAccess* sa = m_device.as<Solid::StorageAccess>()) { |
778 |
+- return sa->filePath(); |
779 |
+- } |
780 |
+- else { |
781 |
+- return QString(); |
782 |
+- } |
783 |
+-} |
784 |
+- |
785 |
+-bool Nepomuk2::RemovableMediaCache::Entry::isMounted() const |
786 |
+-{ |
787 |
+- if(const Solid::StorageAccess* sa = m_device.as<Solid::StorageAccess>()) { |
788 |
+- return sa->isAccessible(); |
789 |
+- } |
790 |
+- else { |
791 |
+- return false; |
792 |
+- } |
793 |
+-} |
794 |
+- |
795 |
+-#include "removablemediacache.moc" |
796 |
+diff --git a/nepomuk/common/removablemediacache.h b/nepomuk/common/removablemediacache.h |
797 |
+deleted file mode 100644 |
798 |
+index 4da7ab5..0000000 |
799 |
+--- a/nepomuk/common/removablemediacache.h |
800 |
++++ /dev/null |
801 |
+@@ -1,122 +0,0 @@ |
802 |
+-/* |
803 |
+- This file is part of the Nepomuk KDE project. |
804 |
+- Copyright (C) 2011 Sebastian Trueg <trueg@×××.org> |
805 |
+- |
806 |
+- This library is free software; you can redistribute it and/or |
807 |
+- modify it under the terms of the GNU Lesser General Public |
808 |
+- License as published by the Free Software Foundation; either |
809 |
+- version 2.1 of the License, or (at your option) version 3, or any |
810 |
+- later version accepted by the membership of KDE e.V. (or its |
811 |
+- successor approved by the membership of KDE e.V.), which shall |
812 |
+- act as a proxy defined in Section 6 of version 3 of the license. |
813 |
+- |
814 |
+- This library is distributed in the hope that it will be useful, |
815 |
+- but WITHOUT ANY WARRANTY; without even the implied warranty of |
816 |
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
817 |
+- Lesser General Public License for more details. |
818 |
+- |
819 |
+- You should have received a copy of the GNU Lesser General Public |
820 |
+- License along with this library. If not, see <http://www.gnu.org/licenses/>. |
821 |
+-*/ |
822 |
+- |
823 |
+-#ifndef NEPOMUK_REMOVABLEMEDIACACHE_H |
824 |
+-#define NEPOMUK_REMOVABLEMEDIACACHE_H |
825 |
+- |
826 |
+-#include "nepomukcommon_export.h" |
827 |
+- |
828 |
+-#include <QtCore/QObject> |
829 |
+-#include <QtCore/QMutex> |
830 |
+-#include <QtCore/QSet> |
831 |
+- |
832 |
+-#include <Solid/Device> |
833 |
+- |
834 |
+-#include <KUrl> |
835 |
+- |
836 |
+- |
837 |
+-namespace Nepomuk2 { |
838 |
+- |
839 |
+-/** |
840 |
+- * The removable media cache provides access to all removable |
841 |
+- * media that are supported by Nepomuk. It allows to convert |
842 |
+- * URLs the way RemovableMediaModel requires it and provides |
843 |
+- * more or less unique URIs for each device allowing to store |
844 |
+- * device-specific configuration. |
845 |
+- */ |
846 |
+-class NEPOMUKCOMMON_EXPORT RemovableMediaCache : public QObject |
847 |
+-{ |
848 |
+- Q_OBJECT |
849 |
+- |
850 |
+-public: |
851 |
+- RemovableMediaCache(QObject *parent = 0); |
852 |
+- ~RemovableMediaCache(); |
853 |
+- |
854 |
+- class NEPOMUKCOMMON_EXPORT Entry { |
855 |
+- public: |
856 |
+- Entry(); |
857 |
+- Entry(const Solid::Device& device); |
858 |
+- |
859 |
+- KUrl constructRelativeUrl( const QString& path ) const; |
860 |
+- KUrl constructLocalFileUrl( const KUrl& filexUrl ) const; |
861 |
+- |
862 |
+- Solid::Device device() const { return m_device; } |
863 |
+- QString url() const { return m_urlPrefix; } |
864 |
+- |
865 |
+- bool isMounted() const; |
866 |
+- QString mountPath() const; |
867 |
+- |
868 |
+- private: |
869 |
+- Solid::Device m_device; |
870 |
+- |
871 |
+- /// The prefix to be used for URLs |
872 |
+- QString m_urlPrefix; |
873 |
+- }; |
874 |
+- |
875 |
+- const Entry* findEntryByFilePath( const QString& path ) const; |
876 |
+- const Entry* findEntryByUrl(const KUrl& url) const; |
877 |
+- |
878 |
+- /** |
879 |
+- * Searches for entries which are mounted at a path which starts with |
880 |
+- * the given one. Example: a \p path \p /media will result in all |
881 |
+- * entries which are mounted under \p /media like \p /media/disk1 or |
882 |
+- * \p /media/cdrom. |
883 |
+- */ |
884 |
+- QList<const Entry*> findEntriesByMountPath(const QString& path) const; |
885 |
+- |
886 |
+- QList<const Entry*> allMedia() const; |
887 |
+- |
888 |
+- /** |
889 |
+- * Returns true if the URL might be pointing to a file on a |
890 |
+- * removable device as handled by this class, ie. a non-local |
891 |
+- * URL which can be converted to a local one. |
892 |
+- * This method is primarily used for performance gain. |
893 |
+- */ |
894 |
+- bool hasRemovableSchema(const KUrl& url) const; |
895 |
+- |
896 |
+-signals: |
897 |
+- void deviceAdded(const Nepomuk2::RemovableMediaCache::Entry* entry); |
898 |
+- void deviceMounted(const Nepomuk2::RemovableMediaCache::Entry* entry); |
899 |
+- |
900 |
+-private slots: |
901 |
+- void slotSolidDeviceAdded(const QString &udi); |
902 |
+- void slotSolidDeviceRemoved(const QString &udi); |
903 |
+- void slotAccessibilityChanged(bool accessible, const QString &udi); |
904 |
+- |
905 |
+-private: |
906 |
+- void initCacheEntries(); |
907 |
+- |
908 |
+- Entry* createCacheEntry( const Solid::Device& dev ); |
909 |
+- |
910 |
+- /// maps Solid UDI to Entry |
911 |
+- QHash<QString, Entry> m_metadataCache; |
912 |
+- |
913 |
+- /// contains all schemas that are used as url prefixes in m_metadataCache |
914 |
+- /// this is used to avoid trying to convert each and every resource in |
915 |
+- /// convertFilexUrl |
916 |
+- QSet<QString> m_usedSchemas; |
917 |
+- |
918 |
+- mutable QMutex m_entryCacheMutex; |
919 |
+-}; |
920 |
+- |
921 |
+-} // namespace Nepomuk2 |
922 |
+- |
923 |
+-#endif // NEPOMUK_REMOVABLEMEDIACACHE_H |
924 |
+diff --git a/nepomuk/kcm/CMakeLists.txt b/nepomuk/kcm/CMakeLists.txt |
925 |
+index 1578704..9d94650 100644 |
926 |
+--- a/nepomuk/kcm/CMakeLists.txt |
927 |
++++ b/nepomuk/kcm/CMakeLists.txt |
928 |
+@@ -28,7 +28,6 @@ kde4_add_ui_files(kcmnepomuk_SRCS |
929 |
+ kde4_add_plugin(kcm_nepomuk ${kcmnepomuk_SRCS}) |
930 |
+ |
931 |
+ target_link_libraries(kcm_nepomuk |
932 |
+- nepomukcommon |
933 |
+ ${KDE4_KDEUI_LIBS} |
934 |
+ ${KDE4_KIO_LIBS} |
935 |
+ ${NEPOMUK_CORE_LIBRARY} |
936 |
+diff --git a/nepomuk/kcm/fileexcludefilters.h b/nepomuk/kcm/fileexcludefilters.h |
937 |
+index 0f438f7..52d75a2 100644 |
938 |
+--- a/nepomuk/kcm/fileexcludefilters.h |
939 |
++++ b/nepomuk/kcm/fileexcludefilters.h |
940 |
+@@ -21,8 +21,6 @@ |
941 |
+ |
942 |
+ #include <QtCore/QStringList> |
943 |
+ |
944 |
+-#include "nepomukcommon_export.h" |
945 |
+- |
946 |
+ namespace Nepomuk2 { |
947 |
+ /** |
948 |
+ * \return A list of default exclude filters to be used |
949 |
+@@ -30,13 +28,13 @@ namespace Nepomuk2 { |
950 |
+ * and folders that change a lot and as a basis for the |
951 |
+ * user configurable exclude filters in the strigi service. |
952 |
+ */ |
953 |
+- NEPOMUKCOMMON_EXPORT QStringList defaultExcludeFilterList(); |
954 |
++ QStringList defaultExcludeFilterList(); |
955 |
+ |
956 |
+ /** |
957 |
+ * \return The version of the default exclude filter list. |
958 |
+ * This is increased whenever the list changes. |
959 |
+ */ |
960 |
+- NEPOMUKCOMMON_EXPORT int defaultExcludeFilterListVersion(); |
961 |
++ int defaultExcludeFilterListVersion(); |
962 |
+ } |
963 |
+ |
964 |
+ #endif |
965 |
+diff --git a/nepomuk/kioslaves/nepomuk/CMakeLists.txt b/nepomuk/kioslaves/nepomuk/CMakeLists.txt |
966 |
+index c78fd58..4ad9812 100644 |
967 |
+--- a/nepomuk/kioslaves/nepomuk/CMakeLists.txt |
968 |
++++ b/nepomuk/kioslaves/nepomuk/CMakeLists.txt |
969 |
+@@ -13,7 +13,6 @@ set(kio_nepomuk_PART_SRCS |
970 |
+ kde4_add_plugin(kio_nepomuk ${kio_nepomuk_PART_SRCS}) |
971 |
+ |
972 |
+ target_link_libraries(kio_nepomuk |
973 |
+- nepomukcommon |
974 |
+ ${KDE4_KIO_LIBS} |
975 |
+ ${KDE4_SOLID_LIBS} |
976 |
+ ${NEPOMUK_CORE_LIBRARY} |
977 |
+diff --git a/nepomuk/kioslaves/search/CMakeLists.txt b/nepomuk/kioslaves/search/CMakeLists.txt |
978 |
+index d7bf1e0..9321791 100644 |
979 |
+--- a/nepomuk/kioslaves/search/CMakeLists.txt |
980 |
++++ b/nepomuk/kioslaves/search/CMakeLists.txt |
981 |
+@@ -28,7 +28,6 @@ kde4_add_plugin(kio_nepomuksearch |
982 |
+ ${kio_nepomuksearch_PART_SRCS}) |
983 |
+ |
984 |
+ target_link_libraries(kio_nepomuksearch |
985 |
+- nepomukcommon |
986 |
+ ${KDE4_KIO_LIBS} |
987 |
+ ${KDE4_SOLID_LIBS} |
988 |
+ ${NEPOMUK_CORE_LIBRARY} |
989 |
+diff --git a/nepomuk/kioslaves/search/kdedmodule/CMakeLists.txt b/nepomuk/kioslaves/search/kdedmodule/CMakeLists.txt |
990 |
+index 2f82c6b..fff309d 100644 |
991 |
+--- a/nepomuk/kioslaves/search/kdedmodule/CMakeLists.txt |
992 |
++++ b/nepomuk/kioslaves/search/kdedmodule/CMakeLists.txt |
993 |
+@@ -34,7 +34,6 @@ qt4_add_dbus_interface(nepomuksearchmodule_SRCS |
994 |
+ kde4_add_plugin(kded_nepomuksearchmodule ${nepomuksearchmodule_SRCS}) |
995 |
+ |
996 |
+ target_link_libraries(kded_nepomuksearchmodule |
997 |
+- nepomukcommon |
998 |
+ ${KDE4_KDECORE_LIBS} |
999 |
+ ${KDE4_KIO_LIBS} |
1000 |
+ ${NEPOMUK_CORE_LIBRARY} |
1001 |
+diff --git a/nepomuk/kioslaves/timeline/CMakeLists.txt b/nepomuk/kioslaves/timeline/CMakeLists.txt |
1002 |
+index d914436..b465110 100644 |
1003 |
+--- a/nepomuk/kioslaves/timeline/CMakeLists.txt |
1004 |
++++ b/nepomuk/kioslaves/timeline/CMakeLists.txt |
1005 |
+@@ -20,7 +20,6 @@ qt4_add_dbus_interface(kio_timeline_PART_SRCS ${NEPOMUK_CORE_DBUS_INTERFACES_DIR |
1006 |
+ kde4_add_plugin(kio_timeline ${kio_timeline_PART_SRCS}) |
1007 |
+ |
1008 |
+ target_link_libraries(kio_timeline |
1009 |
+- nepomukcommon |
1010 |
+ ${KDE4_KIO_LIBS} |
1011 |
+ ${NEPOMUK_CORE_LIBRARY} |
1012 |
+ ${SOPRANO_LIBRARIES} |
1013 |
|
1014 |
diff --git a/kde-base/nepomuk/nepomuk-4.8.80.ebuild b/kde-base/nepomuk/nepomuk-4.8.80.ebuild |
1015 |
index 280bac5..656b151 100644 |
1016 |
--- a/kde-base/nepomuk/nepomuk-4.8.80.ebuild |
1017 |
+++ b/kde-base/nepomuk/nepomuk-4.8.80.ebuild |
1018 |
@@ -24,12 +24,4 @@ RDEPEND="${DEPEND}" |
1019 |
RESTRICT="test" |
1020 |
# bug 392989 |
1021 |
|
1022 |
-src_install() { |
1023 |
- kde4-base_src_install |
1024 |
- |
1025 |
- # Fix file collisions with nepomuk-core |
1026 |
- rm -f \ |
1027 |
- "${ED}/usr/$(get_libdir)/debug/usr/$(get_libdir)/libnepomukcommon.so.debug" \ |
1028 |
- || die |
1029 |
- rm -f "${ED}/usr/$(get_libdir)/libnepomukcommon.so" || die |
1030 |
-} |
1031 |
+PATCHES=( "${FILESDIR}/${P}-file-collisions.patch" ) |
1032 |
|
1033 |
diff --git a/kde-base/nepomuk/nepomuk-9999.ebuild b/kde-base/nepomuk/nepomuk-9999.ebuild |
1034 |
index 37f61b3..a975ee4 100644 |
1035 |
--- a/kde-base/nepomuk/nepomuk-9999.ebuild |
1036 |
+++ b/kde-base/nepomuk/nepomuk-9999.ebuild |
1037 |
@@ -23,13 +23,3 @@ RDEPEND="${DEPEND}" |
1038 |
|
1039 |
RESTRICT="test" |
1040 |
# bug 392989 |
1041 |
- |
1042 |
-src_install() { |
1043 |
- kde4-base_src_install |
1044 |
- |
1045 |
- # Fix file collisions with nepomuk-core |
1046 |
- rm -f \ |
1047 |
- "${ED}/usr/$(get_libdir)/debug/usr/$(get_libdir)/libnepomukcommon.so.debug" \ |
1048 |
- || die |
1049 |
- rm -f "${ED}/usr/$(get_libdir)/libnepomukcommon.so" || die |
1050 |
-} |