Gentoo Archives: gentoo-commits

From: Jonathan Scruggs <dracwyrm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-libs/libfm-qt/files/, x11-libs/libfm-qt/
Date: Tue, 25 Sep 2018 11:08:17
Message-Id: 1537873592.011efb3aa9a23a72af733a3dd816ac4b1e13459a.dracwyrm@gentoo
1 commit: 011efb3aa9a23a72af733a3dd816ac4b1e13459a
2 Author: Jonathan Scruggs <dracwyrm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 25 11:06:32 2018 +0000
4 Commit: Jonathan Scruggs <dracwyrm <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 25 11:06:32 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=011efb3a
7
8 x11-libs/libfm-qt: Add upstream patches to fix smb
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.10
11
12 ...0.13.1-check-if-app-exists-before-opening.patch | 45 ++++
13 ...t-0.13.1-correctly-handle-mountable-types.patch | 80 ++++++
14 .../files/libfm-qt-0.13.1-fix-smb-error.patch | 279 +++++++++++++++++++++
15 x11-libs/libfm-qt/libfm-qt-0.13.1-r1.ebuild | 50 ++++
16 4 files changed, 454 insertions(+)
17
18 diff --git a/x11-libs/libfm-qt/files/libfm-qt-0.13.1-check-if-app-exists-before-opening.patch b/x11-libs/libfm-qt/files/libfm-qt-0.13.1-check-if-app-exists-before-opening.patch
19 new file mode 100644
20 index 00000000000..92b45be432f
21 --- /dev/null
22 +++ b/x11-libs/libfm-qt/files/libfm-qt-0.13.1-check-if-app-exists-before-opening.patch
23 @@ -0,0 +1,45 @@
24 +From 4923f860094787d14052e9dc416c9388ff1bb53b Mon Sep 17 00:00:00 2001
25 +From: Tsu Jan <tsujan2000@×××××.com>
26 +Date: Thu, 7 Jun 2018 06:10:37 +0430
27 +Subject: [PATCH] Check if the opening app exists before using it
28 +
29 +Also, show an error message if there's no app.
30 +---
31 + src/core/basicfilelauncher.cpp | 17 ++++++++++++-----
32 + 1 file changed, 12 insertions(+), 5 deletions(-)
33 +
34 +diff --git a/src/core/basicfilelauncher.cpp b/src/core/basicfilelauncher.cpp
35 +index 8390531..2c7f00e 100644
36 +--- a/src/core/basicfilelauncher.cpp
37 ++++ b/src/core/basicfilelauncher.cpp
38 +@@ -256,18 +256,25 @@ FilePath BasicFileLauncher::handleShortcut(const FileInfoPtr& fileInfo, GAppLaun
39 + || strcmp(scheme.get(), "trash") == 0
40 + || strcmp(scheme.get(), "network") == 0
41 + || strcmp(scheme.get(), "computer") == 0) {
42 +- return FilePath::fromUri(fileInfo->target().c_str());
43 ++ return FilePath::fromUri(target.c_str());
44 + }
45 + else {
46 + // ask gio to launch the default handler for the uri scheme
47 +- GAppInfoPtr app{g_app_info_get_default_for_uri_scheme(scheme.get()), false};
48 +- FilePathList uris{FilePath::fromUri(fileInfo->target().c_str())};
49 +- launchWithApp(app.get(), uris, ctx);
50 ++ if(GAppInfoPtr app{g_app_info_get_default_for_uri_scheme(scheme.get()), false}) {
51 ++ FilePathList uris{FilePath::fromUri(target.c_str())};
52 ++ launchWithApp(app.get(), uris, ctx);
53 ++ }
54 ++ else {
55 ++ GErrorPtr err{G_IO_ERROR, G_IO_ERROR_FAILED,
56 ++ QObject::tr("No default application is set to launch '%1'")
57 ++ .arg(target.c_str())};
58 ++ showError(nullptr, err);
59 ++ }
60 + }
61 + }
62 + else {
63 + // see it as a local path
64 +- return FilePath::fromLocalPath(fileInfo->target().c_str());
65 ++ return FilePath::fromLocalPath(target.c_str());
66 + }
67 + return FilePath();
68 + }
69
70 diff --git a/x11-libs/libfm-qt/files/libfm-qt-0.13.1-correctly-handle-mountable-types.patch b/x11-libs/libfm-qt/files/libfm-qt-0.13.1-correctly-handle-mountable-types.patch
71 new file mode 100644
72 index 00000000000..adaed387e27
73 --- /dev/null
74 +++ b/x11-libs/libfm-qt/files/libfm-qt-0.13.1-correctly-handle-mountable-types.patch
75 @@ -0,0 +1,80 @@
76 +From dc7a5753b934e323d4d8d13f3253cbe7ae55a111 Mon Sep 17 00:00:00 2001
77 +From: "Hong Jen Yee (PCMan)" <pcman.tw@×××××.com>
78 +Date: Sun, 10 Jun 2018 00:07:31 +0800
79 +Subject: [PATCH] Correctly handle mountable types.
80 +
81 +---
82 + src/core/basicfilelauncher.cpp | 6 +++---
83 + src/core/fileinfo.cpp | 4 ++--
84 + src/core/fileinfo.h | 3 ++-
85 + 3 files changed, 7 insertions(+), 6 deletions(-)
86 +
87 +diff --git a/src/core/basicfilelauncher.cpp b/src/core/basicfilelauncher.cpp
88 +index 0dc8208..0ae1177 100644
89 +--- a/src/core/basicfilelauncher.cpp
90 ++++ b/src/core/basicfilelauncher.cpp
91 +@@ -30,11 +30,10 @@ bool BasicFileLauncher::launchFiles(const FileInfoList& fileInfos, GAppLaunchCon
92 + // classify files according to different mimetypes
93 + for(auto& fileInfo : fileInfos) {
94 + /*
95 +- qDebug("path: %s, type: %s, target: %s, isDir: %i, isDesktopEntry: %i",
96 ++ qDebug("path: %s, type: %s, target: %s, isDir: %i, isShortcut: %i, isMountable: %i, isDesktopEntry: %i",
97 + fileInfo->path().toString().get(), fileInfo->mimeType()->name(), fileInfo->target().c_str(),
98 +- fileInfo->isDir(), fileInfo->isDesktopEntry());
99 ++ fileInfo->isDir(), fileInfo->isShortcut(), fileInfo->isMountable(), fileInfo->isDesktopEntry());
100 + */
101 +-
102 + if(fileInfo->isMountable()) {
103 + if(fileInfo->target().empty()) {
104 + // the mountable is not yet mounted so we have no target URI.
105 +@@ -269,6 +268,7 @@ FilePath BasicFileLauncher::handleShortcut(const FileInfoPtr& fileInfo, GAppLaun
106 + // if we know the target is a dir, we are not going to open it using other apps
107 + // for example: `network:///smb-root' is a shortcut targeting `smb:///' and it's also a dir
108 + if(fileInfo->isDir()) {
109 ++ qDebug("shortcut is dir: %s", target.c_str());
110 + return FilePath::fromPathStr(target.c_str());
111 + }
112 +
113 +diff --git a/src/core/fileinfo.cpp b/src/core/fileinfo.cpp
114 +index b19a751..5838fe5 100644
115 +--- a/src/core/fileinfo.cpp
116 ++++ b/src/core/fileinfo.cpp
117 +@@ -118,7 +118,8 @@ void FileInfo::setFromGFileInfo(const GObjectPtr<GFileInfo>& inf, const FilePath
118 + isDeletable_ = true;
119 + }
120 +
121 +- isShortcut_ = false;
122 ++ isShortcut_ = (type == G_FILE_TYPE_SHORTCUT);
123 ++ isMountable_ = (type == G_FILE_TYPE_MOUNTABLE);
124 +
125 + /* special handling for symlinks */
126 + if(g_file_info_get_is_symlink(inf.get())) {
127 +@@ -129,7 +130,6 @@ void FileInfo::setFromGFileInfo(const GObjectPtr<GFileInfo>& inf, const FilePath
128 +
129 + switch(type) {
130 + case G_FILE_TYPE_SHORTCUT:
131 +- isShortcut_ = true;
132 + /* Falls through. */
133 + case G_FILE_TYPE_MOUNTABLE:
134 + uri = g_file_info_get_attribute_string(inf.get(), G_FILE_ATTRIBUTE_STANDARD_TARGET_URI);
135 +diff --git a/src/core/fileinfo.h b/src/core/fileinfo.h
136 +index 8437d92..27f7508 100644
137 +--- a/src/core/fileinfo.h
138 ++++ b/src/core/fileinfo.h
139 +@@ -150,7 +150,7 @@ class LIBFM_QT_API FileInfo {
140 + }
141 +
142 + bool isMountable() const {
143 +- return mimeType_->isMountable();
144 ++ return isMountable_;
145 + }
146 +
147 + bool isShortcut() const {
148 +@@ -238,6 +238,7 @@ class LIBFM_QT_API FileInfo {
149 + std::string target_; /* target of shortcut or mountable. */
150 +
151 + bool isShortcut_ : 1; /* TRUE if file is shortcut type */
152 ++ bool isMountable_ : 1; /* TRUE if file is mountable type */
153 + bool isAccessible_ : 1; /* TRUE if can be read by user */
154 + bool isWritable_ : 1; /* TRUE if can be written to by user */
155 + bool isDeletable_ : 1; /* TRUE if can be deleted by user */
156
157 diff --git a/x11-libs/libfm-qt/files/libfm-qt-0.13.1-fix-smb-error.patch b/x11-libs/libfm-qt/files/libfm-qt-0.13.1-fix-smb-error.patch
158 new file mode 100644
159 index 00000000000..12611650a76
160 --- /dev/null
161 +++ b/x11-libs/libfm-qt/files/libfm-qt-0.13.1-fix-smb-error.patch
162 @@ -0,0 +1,279 @@
163 +From 1a6fa2632388ffcc57ce723501a588c90b940f93 Mon Sep 17 00:00:00 2001
164 +From: "Hong Jen Yee (PCMan)" <pcman.tw@×××××.com>
165 +Date: Sat, 9 Jun 2018 21:04:19 +0800
166 +Subject: [PATCH] Fix failure to open smb:// caused by incorrect file info
167 + handling.
168 +
169 +---
170 + src/core/basicfilelauncher.cpp | 40 ++++++++++++++++++++++++-------
171 + src/core/basicfilelauncher.h | 2 +-
172 + src/core/fileinfo.cpp | 9 ++++---
173 + src/core/fileinfojob.cpp | 44 +++++++++++++++++++++-------------
174 + src/core/fileinfojob.h | 5 ++++
175 + src/core/gioptrs.h | 4 ++++
176 + src/filelauncher.cpp | 2 +-
177 + src/filelauncher.h | 2 +-
178 + 8 files changed, 77 insertions(+), 31 deletions(-)
179 +
180 +diff --git a/src/core/basicfilelauncher.cpp b/src/core/basicfilelauncher.cpp
181 +index 2c7f00e..0dc8208 100644
182 +--- a/src/core/basicfilelauncher.cpp
183 ++++ b/src/core/basicfilelauncher.cpp
184 +@@ -29,11 +29,13 @@ bool BasicFileLauncher::launchFiles(const FileInfoList& fileInfos, GAppLaunchCon
185 + FilePathList pathsToLaunch;
186 + // classify files according to different mimetypes
187 + for(auto& fileInfo : fileInfos) {
188 +- // qDebug("path: %s, target: %s", fileInfo->path().toString().get(), fileInfo->target().c_str());
189 +- if(fileInfo->isDir()) {
190 +- folderInfos.emplace_back(fileInfo);
191 +- }
192 +- else if(fileInfo->isMountable()) {
193 ++ /*
194 ++ qDebug("path: %s, type: %s, target: %s, isDir: %i, isDesktopEntry: %i",
195 ++ fileInfo->path().toString().get(), fileInfo->mimeType()->name(), fileInfo->target().c_str(),
196 ++ fileInfo->isDir(), fileInfo->isDesktopEntry());
197 ++ */
198 ++
199 ++ if(fileInfo->isMountable()) {
200 + if(fileInfo->target().empty()) {
201 + // the mountable is not yet mounted so we have no target URI.
202 + GErrorPtr err{G_IO_ERROR, G_IO_ERROR_NOT_MOUNTED,
203 +@@ -67,6 +69,9 @@ bool BasicFileLauncher::launchFiles(const FileInfoList& fileInfos, GAppLaunchCon
204 + pathsToLaunch.emplace_back(path);
205 + }
206 + }
207 ++ else if(fileInfo->isDir()) {
208 ++ folderInfos.emplace_back(fileInfo);
209 ++ }
210 + else {
211 + auto& mimeType = fileInfo->mimeType();
212 + mimeTypeToFiles[mimeType->name()].emplace_back(fileInfo);
213 +@@ -103,16 +108,27 @@ bool BasicFileLauncher::launchFiles(const FileInfoList& fileInfos, GAppLaunchCon
214 + bool BasicFileLauncher::launchPaths(FilePathList paths, GAppLaunchContext* ctx) {
215 + // FIXME: blocking with an event loop is not a good design :-(
216 + QEventLoop eventLoop;
217 +-
218 + auto job = new FileInfoJob{paths};
219 + job->setAutoDelete(false); // do not automatically delete the job since we want its results later.
220 +
221 + GObjectPtr<GAppLaunchContext> ctxPtr{ctx};
222 ++
223 ++ // error handling (for example: handle path not mounted error)
224 ++ QObject::connect(job, &FileInfoJob::error,
225 ++ &eventLoop, [this, job, ctx](const GErrorPtr & err, Job::ErrorSeverity /* severity */ , Job::ErrorAction &act) {
226 ++ auto path = job->currentPath();
227 ++ if(showError(ctx, err, path, nullptr)) {
228 ++ // the user handled the error and ask for retry
229 ++ act = Job::ErrorAction::RETRY;
230 ++ }
231 ++ }, Qt::BlockingQueuedConnection); // BlockingQueuedConnection is required here to pause the job and wait for user response
232 ++
233 + QObject::connect(job, &FileInfoJob::finished,
234 + [&eventLoop]() {
235 + // exit the event loop when the job is done
236 + eventLoop.exit();
237 + });
238 ++
239 + // run the job in another thread to not block the UI
240 + job->runAsync();
241 +
242 +@@ -145,7 +161,7 @@ BasicFileLauncher::ExecAction BasicFileLauncher::askExecFile(const FileInfoPtr &
243 + return ExecAction::DIRECT_EXEC;
244 + }
245 +
246 +-bool BasicFileLauncher::showError(GAppLaunchContext* /* ctx */, GErrorPtr& /* err */, const FilePath& /* path */, const FileInfoPtr& /* info */) {
247 ++bool BasicFileLauncher::showError(GAppLaunchContext* /* ctx */, const GErrorPtr & /* err */, const FilePath& /* path */, const FileInfoPtr& /* info */) {
248 + return false;
249 + }
250 +
251 +@@ -249,13 +265,21 @@ bool BasicFileLauncher::launchDesktopEntry(const char *desktopEntryName, const F
252 +
253 + FilePath BasicFileLauncher::handleShortcut(const FileInfoPtr& fileInfo, GAppLaunchContext* ctx) {
254 + auto target = fileInfo->target();
255 ++
256 ++ // if we know the target is a dir, we are not going to open it using other apps
257 ++ // for example: `network:///smb-root' is a shortcut targeting `smb:///' and it's also a dir
258 ++ if(fileInfo->isDir()) {
259 ++ return FilePath::fromPathStr(target.c_str());
260 ++ }
261 ++
262 + auto scheme = CStrPtr{g_uri_parse_scheme(target.c_str())};
263 + if(scheme) {
264 + // collect the uri schemes we support
265 + if(strcmp(scheme.get(), "file") == 0
266 + || strcmp(scheme.get(), "trash") == 0
267 + || strcmp(scheme.get(), "network") == 0
268 +- || strcmp(scheme.get(), "computer") == 0) {
269 ++ || strcmp(scheme.get(), "computer") == 0
270 ++ || strcmp(scheme.get(), "menu") == 0) {
271 + return FilePath::fromUri(target.c_str());
272 + }
273 + else {
274 +diff --git a/src/core/basicfilelauncher.h b/src/core/basicfilelauncher.h
275 +index a28aa75..3b1545d 100644
276 +--- a/src/core/basicfilelauncher.h
277 ++++ b/src/core/basicfilelauncher.h
278 +@@ -53,7 +53,7 @@ class LIBFM_QT_API BasicFileLauncher {
279 +
280 + virtual bool openFolder(GAppLaunchContext* ctx, const FileInfoList& folderInfos, GErrorPtr& err);
281 +
282 +- virtual bool showError(GAppLaunchContext* ctx, GErrorPtr& err, const FilePath& path = FilePath{}, const FileInfoPtr& info = FileInfoPtr{});
283 ++ virtual bool showError(GAppLaunchContext* ctx, const GErrorPtr& err, const FilePath& path = FilePath{}, const FileInfoPtr& info = FileInfoPtr{});
284 +
285 + virtual ExecAction askExecFile(const FileInfoPtr& file);
286 +
287 +diff --git a/src/core/fileinfo.cpp b/src/core/fileinfo.cpp
288 +index 8e86f8d..b19a751 100644
289 +--- a/src/core/fileinfo.cpp
290 ++++ b/src/core/fileinfo.cpp
291 +@@ -36,10 +36,9 @@ void FileInfo::setFromGFileInfo(const GObjectPtr<GFileInfo>& inf, const FilePath
292 + size_ = g_file_info_get_size(inf.get());
293 +
294 + tmp = g_file_info_get_content_type(inf.get());
295 +- if(!tmp) {
296 +- tmp = "application/octet-stream";
297 ++ if(tmp) {
298 ++ mimeType_ = MimeType::fromName(tmp);
299 + }
300 +- mimeType_ = MimeType::fromName(tmp);
301 +
302 + mode_ = g_file_info_get_attribute_uint32(inf.get(), G_FILE_ATTRIBUTE_UNIX_MODE);
303 +
304 +@@ -196,6 +195,10 @@ void FileInfo::setFromGFileInfo(const GObjectPtr<GFileInfo>& inf, const FilePath
305 + }
306 + }
307 +
308 ++ if(!mimeType_) {
309 ++ mimeType_ = MimeType::fromName("application/octet-stream");
310 ++ }
311 ++
312 + /* if there is a custom folder icon, use it */
313 + if(isNative() && type == G_FILE_TYPE_DIRECTORY) {
314 + auto local_path = path().localPath();
315 +diff --git a/src/core/fileinfojob.cpp b/src/core/fileinfojob.cpp
316 +index 3c222af..7bf8bb3 100644
317 +--- a/src/core/fileinfojob.cpp
318 ++++ b/src/core/fileinfojob.cpp
319 +@@ -13,31 +13,41 @@ FileInfoJob::FileInfoJob(FilePathList paths, FilePathList deletionPaths, FilePat
320 +
321 + void FileInfoJob::exec() {
322 + for(const auto& path: paths_) {
323 +- if(!isCancelled()) {
324 ++ if(isCancelled()) {
325 ++ break;
326 ++ }
327 ++ currentPath_ = path;
328 ++
329 ++ bool retry;
330 ++ do {
331 ++ retry = false;
332 + GErrorPtr err;
333 + GFileInfoPtr inf{
334 + g_file_query_info(path.gfile().get(), defaultGFileInfoQueryAttribs,
335 + G_FILE_QUERY_INFO_NONE, cancellable().get(), &err),
336 + false
337 + };
338 +- if(!inf) {
339 +- continue;
340 ++ if(inf) {
341 ++ // Reuse the same dirPath object when the path remains the same (optimize for files in the same dir)
342 ++ auto dirPath = commonDirPath_.isValid() ? commonDirPath_ : path.parent();
343 ++ auto fileInfoPtr = std::make_shared<FileInfo>(inf, dirPath);
344 ++
345 ++ // FIXME: this is not elegant
346 ++ if(cutFilesHashSet_
347 ++ && cutFilesHashSet_->count(path.hash())) {
348 ++ fileInfoPtr->bindCutFiles(cutFilesHashSet_);
349 ++ }
350 ++
351 ++ results_.push_back(fileInfoPtr);
352 ++ Q_EMIT gotInfo(path, results_.back());
353 + }
354 +-
355 +- // Reuse the same dirPath object when the path remains the same (optimize for files in the same dir)
356 +- auto dirPath = commonDirPath_.isValid() ? commonDirPath_ : path.parent();
357 +- FileInfo fileInfo(inf, dirPath);
358 +-
359 +- if(cutFilesHashSet_
360 +- && cutFilesHashSet_->count(fileInfo.path().hash())) {
361 +- fileInfo.bindCutFiles(cutFilesHashSet_);
362 ++ else {
363 ++ auto act = emitError(err);
364 ++ if(act == Job::ErrorAction::RETRY) {
365 ++ retry = true;
366 ++ }
367 + }
368 +-
369 +- auto fileInfoPtr = std::make_shared<const FileInfo>(fileInfo);
370 +-
371 +- results_.push_back(fileInfoPtr);
372 +- Q_EMIT gotInfo(path, fileInfoPtr);
373 +- }
374 ++ } while(retry && !isCancelled());
375 + }
376 + }
377 +
378 +diff --git a/src/core/fileinfojob.h b/src/core/fileinfojob.h
379 +index 53a03c5..d75e88f 100644
380 +--- a/src/core/fileinfojob.h
381 ++++ b/src/core/fileinfojob.h
382 +@@ -27,6 +27,10 @@ class LIBFM_QT_API FileInfoJob : public Job {
383 + return results_;
384 + }
385 +
386 ++ const FilePath& currentPath() const {
387 ++ return currentPath_;
388 ++ }
389 ++
390 + Q_SIGNALS:
391 + void gotInfo(const FilePath& path, std::shared_ptr<const FileInfo>& info);
392 +
393 +@@ -39,6 +43,7 @@ class LIBFM_QT_API FileInfoJob : public Job {
394 + FileInfoList results_;
395 + FilePath commonDirPath_;
396 + const std::shared_ptr<const HashSet> cutFilesHashSet_;
397 ++ FilePath currentPath_;
398 + };
399 +
400 + } // namespace Fm
401 +diff --git a/src/core/gioptrs.h b/src/core/gioptrs.h
402 +index 401424b..ae22602 100644
403 +--- a/src/core/gioptrs.h
404 ++++ b/src/core/gioptrs.h
405 +@@ -112,6 +112,10 @@ class GErrorPtr {
406 + return err_;
407 + }
408 +
409 ++ const GError* operator->() const {
410 ++ return err_;
411 ++ }
412 ++
413 + bool operator == (const GErrorPtr& other) const {
414 + return err_ == other.err_;
415 + }
416 +diff --git a/src/filelauncher.cpp b/src/filelauncher.cpp
417 +index 5f667fc..ff14533 100644
418 +--- a/src/filelauncher.cpp
419 ++++ b/src/filelauncher.cpp
420 +@@ -76,7 +76,7 @@ bool FileLauncher::openFolder(GAppLaunchContext *ctx, const FileInfoList &folder
421 + return BasicFileLauncher::openFolder(ctx, folderInfos, err);
422 + }
423 +
424 +-bool FileLauncher::showError(GAppLaunchContext* /*ctx*/, GErrorPtr &err, const FilePath &path, const FileInfoPtr &info) {
425 ++bool FileLauncher::showError(GAppLaunchContext* /*ctx*/, const GErrorPtr &err, const FilePath &path, const FileInfoPtr &info) {
426 + /* ask for mount if trying to launch unmounted path */
427 + if(err->domain == G_IO_ERROR) {
428 + if(path && err->code == G_IO_ERROR_NOT_MOUNTED) {
429 +diff --git a/src/filelauncher.h b/src/filelauncher.h
430 +index be5be5a..991a00a 100644
431 +--- a/src/filelauncher.h
432 ++++ b/src/filelauncher.h
433 +@@ -43,7 +43,7 @@ class LIBFM_QT_API FileLauncher: public BasicFileLauncher {
434 +
435 + bool openFolder(GAppLaunchContext* ctx, const FileInfoList& folderInfos, GErrorPtr& err) override;
436 +
437 +- bool showError(GAppLaunchContext* ctx, GErrorPtr& err, const FilePath& path = FilePath{}, const FileInfoPtr& info = FileInfoPtr{}) override;
438 ++ bool showError(GAppLaunchContext* ctx, const GErrorPtr &err, const FilePath& path = FilePath{}, const FileInfoPtr& info = FileInfoPtr{}) override;
439 +
440 + ExecAction askExecFile(const FileInfoPtr& file) override;
441 +
442
443 diff --git a/x11-libs/libfm-qt/libfm-qt-0.13.1-r1.ebuild b/x11-libs/libfm-qt/libfm-qt-0.13.1-r1.ebuild
444 new file mode 100644
445 index 00000000000..95dea87773b
446 --- /dev/null
447 +++ b/x11-libs/libfm-qt/libfm-qt-0.13.1-r1.ebuild
448 @@ -0,0 +1,50 @@
449 +# Copyright 1999-2018 Gentoo Foundation
450 +# Distributed under the terms of the GNU General Public License v2
451 +
452 +EAPI=6
453 +
454 +inherit cmake-utils eapi7-ver
455 +
456 +DESCRIPTION="Qt port of libfm, a library providing components to build desktop file managers"
457 +HOMEPAGE="https://lxqt.org/"
458 +
459 +if [[ "${PV}" == "9999" ]]; then
460 + inherit git-r3
461 + EGIT_REPO_URI="https://github.com/lxqt/${PN}.git"
462 +else
463 + SRC_URI="https://downloads.lxqt.org/downloads/${PN}/${PV}/${P}.tar.xz"
464 + KEYWORDS="~amd64 ~arm ~arm64 ~x86"
465 +fi
466 +
467 +LICENSE="GPL-2+ LGPL-2.1+"
468 +SLOT="0/5"
469 +
470 +PATCHES=(
471 + "${FILESDIR}/${P}-check-if-app-exists-before-opening.patch"
472 + "${FILESDIR}/${P}-fix-smb-error.patch"
473 + "${FILESDIR}/${P}-correctly-handle-mountable-types.patch"
474 +)
475 +
476 +RDEPEND="
477 + dev-libs/glib:2
478 + dev-qt/qtcore:5
479 + dev-qt/qtgui:5
480 + dev-qt/qtwidgets:5
481 + dev-qt/qtx11extras:5
482 + >=lxde-base/menu-cache-1.1.0
483 + media-libs/libexif:=
484 + >=x11-libs/libfm-1.2.0:=
485 + x11-libs/libxcb:=
486 +"
487 +DEPEND="${RDEPEND}
488 + dev-qt/linguist-tools:5
489 + >=dev-util/lxqt-build-tools-0.5.0
490 + virtual/pkgconfig
491 +"
492 +
493 +src_configure() {
494 + local mycmakeargs=(
495 + -DPULL_TRANSLATIONS=OFF
496 + )
497 + cmake-utils_src_configure
498 +}