[gentoo-commits] proj/kde:master commit in: kde-apps/kio-extras/files/, kde-apps/kio-extras/
commit: f4ca7e64ce2ed768bb1ff43d6a0ae9f2a7f8d330 Author: Andreas Sturmlechner gentoo org> AuthorDate: Thu Jul 28 19:23:36 2022 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Jul 31 15:09:13 2022 + URL:https://gitweb.gentoo.org/proj/kde.git/commit/?id=f4ca7e64 kde-apps/kio-extras: Fix build with USE -X Upstream commit b8dda4b3129f42323e1f6ccb37c16cb62a740d39 Bug: https://bugs.gentoo.org/813450 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/kio-extras-22.04.3-without_x11.patch | 62 ++ kde-apps/kio-extras/kio-extras-22.07.80.ebuild | 4 +- .../kio-extras/kio-extras-22.08.49..ebuild | 4 +- 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/kde-apps/kio-extras/files/kio-extras-22.04.3-without_x11.patch b/kde-apps/kio-extras/files/kio-extras-22.04.3-without_x11.patch new file mode 100644 index 00..4c97ab5187 --- /dev/null +++ b/kde-apps/kio-extras/files/kio-extras-22.04.3-without_x11.patch @@ -0,0 +1,62 @@ +From b8dda4b3129f42323e1f6ccb37c16cb62a740d39 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Sat, 27 Nov 2021 14:07:32 +0100 +Subject: [PATCH] Add CMake option to build WITHOUT_X11 + +We want to be able to build without X11 support even if some of the used +libraries may not work w/o X11 themselves yet or need to be built with +X11 support for other reverse dependencies. + +-DCMAKE_DISABLE_FIND_PACKAGE_X11 will break if any dependencies list X11 +as required in their cmake config, also X11_FOUND could be set by +cascading cmake dependencies. + +Introducing this option means there is no behavior change by default, +cmake will just skip finding X11 or adding unwanted features if the +option is enabled. + +Signed-off-by: Andreas Sturmlechner +--- + thumbnail/CMakeLists.txt | 19 +++ + 1 file changed, 11 insertions(+), 8 deletions(-) + +diff --git a/thumbnail/CMakeLists.txt b/thumbnail/CMakeLists.txt +index f6f38992d..ee322a1bf 100644 +--- a/thumbnail/CMakeLists.txt b/thumbnail/CMakeLists.txt +@@ -21,13 +21,16 @@ set_package_properties(libappimage PROPERTIES + PURPOSE "Provides support for AppImage thumbnails" + ) + +-find_package(X11) +-set_package_properties(X11 PROPERTIES +-DESCRIPTION "X11 libraries" +-URL "https://www.x.org; +-TYPE OPTIONAL +-PURPOSE "Provides support for XCursor thumbnails" +-) ++option(WITHOUT_X11 "Build without support for XCursor thumbnails (disables finding X11)" OFF) ++if (NOT WITHOUT_X11) ++find_package(X11) ++set_package_properties(X11 PROPERTIES ++DESCRIPTION "X11 libraries" ++URL "https://www.x.org; ++TYPE OPTIONAL ++PURPOSE "Provides support for XCursor thumbnails" ++) ++endif() + + find_package(Taglib 1.11) + set_package_properties(Taglib PROPERTIES +@@ -210,7 +213,7 @@ endif() + + ### next target ### + +-if(X11_Xcursor_FOUND) ++if(X11_Xcursor_FOUND AND NOT WITHOUT_X11) + + add_library(cursorthumbnail MODULE cursorcreator.cpp cursorcreatorplugin.cpp) + +-- +GitLab + diff --git a/kde-apps/kio-extras/kio-extras-22.07.80.ebuild b/kde-apps/kio-extras/kio-extras-22.07.80.ebuild index e6f3cbd701..5b21318900 100644 --- a/kde-apps/kio-extras/kio-extras-22.07.80.ebuild +++ b/kde-apps/kio-extras/kio-extras-22.07.80.ebuild @@ -70,6 +70,8 @@ RDEPEND="${DEPEND} " BDEPEND="man? ( dev-util/gperf )" +PATCHES=( "${FILESDIR}/${PN}-22.04.3-without_x11.patch" ) + src_configure() { local mycmakeargs=( $(cmake_use_find_package activities KF5Activities) @@ -83,7 +85,7 @@ src_configure() { $(cmake_use_find_package samba Samba) $(cmake_use_find_package sftp libssh) $(cmake_use_find_package taglib Taglib) - $(cmake_use_find_package X X11) + -DWITHOUT_X11=$(usex !X) ) use samba && mycmakeargs+=( -DBUILD_KDSoapWSDiscoveryClient=OFF # disable bundled stuff diff --git a/kde-apps/kio-extras/kio-extras-22.08.49..ebuild b/kde-apps/kio-extras/kio-extras-22.08.49..ebuild index dbdf736e08..fd4e30eb56 100644 --- a/kde-apps/kio-extras/kio-extras-22.08.49..ebuild +++ b/kde-apps/kio-extras/kio-extras-22.08.49..ebuild @@ -70,6 +70,8 @@ RDEPEND="${DEPEND} " BDEPEND="man? ( dev-util/gperf )" +PATCHES=( "${FILESDIR}/${PN}-22.04.3-without_x11.patch" ) + src_configure() { local mycmakeargs=( $(cmake_use_find_package activities KF5Activities) @@ -83,7 +85,7 @@ src_configure() { $(cmake_use_find_package samba Samba) $(cmake_use_find_package sftp libssh) $(cmake_use_find_package taglib Taglib) - $(cmake_use_find_package X X11) + -DWITHOUT_X11=$(usex !X) ) use samba && mycmakeargs+=( -DBUILD_KDSoapWSDiscoveryClient=OFF # disable bundled stuff
[gentoo-commits] proj/kde:master commit in: kde-apps/kio-extras/files/, kde-apps/kio-extras/
commit: fd9cf6144ea9e3b67cf32ac5e25532c5de09e64a Author: Andreas Sturmlechner gentoo org> AuthorDate: Wed Jul 12 20:34:35 2017 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Wed Jul 12 20:34:35 2017 + URL:https://gitweb.gentoo.org/proj/kde.git/commit/?id=fd9cf614 kde-apps/kio-extras: Add smb and mtp upstream fixes Package-Manager: Portage-2.3.6, Repoman-2.3.1 .../kio-extras/files/kio-extras-17.04.3-mtp.patch | 87 .../kio-extras/files/kio-extras-17.04.3-smb.patch | 240 + kde-apps/kio-extras/kio-extras-17.04.3.ebuild | 5 + 3 files changed, 332 insertions(+) diff --git a/kde-apps/kio-extras/files/kio-extras-17.04.3-mtp.patch b/kde-apps/kio-extras/files/kio-extras-17.04.3-mtp.patch new file mode 100644 index 00..04aff7dcdb --- /dev/null +++ b/kde-apps/kio-extras/files/kio-extras-17.04.3-mtp.patch @@ -0,0 +1,87 @@ +From bdd0e54ee303559106d2ac746f9a3d167bd89146 Mon Sep 17 00:00:00 2001 +From: Kevin Funk+Date: Tue, 11 Jul 2017 03:03:21 +0200 +Subject: mtp: Simplify code a bit + +Only one branch can be taken per call, make this clear by using +if/else-if instead of a series of ifs. +--- + mtp/kio_mtp.cpp | 9 ++--- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/mtp/kio_mtp.cpp b/mtp/kio_mtp.cpp +index 0532820..9d8585f 100644 +--- a/mtp/kio_mtp.cpp b/mtp/kio_mtp.cpp +@@ -593,15 +593,12 @@ void MTPSlave::copy(const QUrl , const QUrl , int, JobFlags flags) + { + qCDebug(LOG_KIO_MTP) << src.path() << dest.path(); + +-// mtp:/// to mtp:/// + if (src.scheme() == QLatin1String("mtp") && dest.scheme() == QLatin1String("mtp")) { + qCDebug(LOG_KIO_MTP) << "Copy on device: Not supported"; + // MTP doesn't support moving files directly on the device, so we have to download and then upload... + + error(ERR_UNSUPPORTED_ACTION, i18n("Cannot copy/move files on the device itself")); +-} +-// file:/// tp mtp:/// +-if (src.scheme() == QLatin1String("file") && dest.scheme() == QLatin1String("mtp")) { ++} else if (src.scheme() == QLatin1String("file") && dest.scheme() == QLatin1String("mtp")) { + int check = checkUrl(dest); + switch (check) { + case 0: +@@ -680,9 +677,7 @@ void MTPSlave::copy(const QUrl , const QUrl , int, JobFlags flags) + } + + qCDebug(LOG_KIO_MTP) << "Sent file"; +-} +-// mtp:/// to file:/// +-if (src.scheme() == QLatin1String("mtp") && dest.scheme() == QLatin1String("file")) { ++} else if (src.scheme() == QLatin1String("mtp") && dest.scheme() == QLatin1String("file")) { + int check = checkUrl(src); + switch (check) { + case 0: +-- +cgit v0.11.2 +From f7b9b827ed7a23403913a4e356b0549d9deaf351 Mon Sep 17 00:00:00 2001 +From: Kevin Funk +Date: Tue, 11 Jul 2017 03:04:21 +0200 +Subject: A couple of fixes for the MTP kio slave (2 patches) + +Summary: +mtp: Simplify code a bit + +Only one branch can be taken per call, make this clear by using +if/else-if instead of a series of ifs. + +mtp: Don't crash if getPath returns something invalid + +This happens when you try to copy a file from a device which just got +locked again (I think...) + +Reviewers: elvisangelaccio + +Reviewed By: elvisangelaccio + +Differential Revision: https://phabricator.kde.org/D6620 +--- + mtp/kio_mtp.cpp | 4 + 1 file changed, 4 insertions(+) + +diff --git a/mtp/kio_mtp.cpp b/mtp/kio_mtp.cpp +index 9d8585f..541268a 100644 +--- a/mtp/kio_mtp.cpp b/mtp/kio_mtp.cpp +@@ -705,6 +705,10 @@ void MTPSlave::copy(const QUrl , const QUrl , int, JobFlags flags) + } + + QPair pair = getPath(src.path()); ++if (!pair.first) { ++error(ERR_COULD_NOT_READ, src.path()); ++return; ++} + + LIBMTP_mtpdevice_t *device = pair.second; + LIBMTP_file_t *source = (LIBMTP_file_t *) pair.first; +-- +cgit v0.11.2 diff --git a/kde-apps/kio-extras/files/kio-extras-17.04.3-smb.patch b/kde-apps/kio-extras/files/kio-extras-17.04.3-smb.patch new file mode 100644 index 00..b6b83845f7 --- /dev/null +++ b/kde-apps/kio-extras/files/kio-extras-17.04.3-smb.patch @@ -0,0 +1,240 @@ +From 2574c9158febdcb3dd7a0ebc3e76311f016d00d0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michal=20Mal=C3=BD?= +Date: Wed, 12 Jul 2017 11:55:04 +0200 +Subject: Always create the "." UDSEntry + +Summary: +The smb_kio plugin does not create the "." UDSEntry, +relying on the underlying KIO infrastructure to create a default one. + +This patch ensures that the UDSEntry is always created with proper access permissions. + +CCBUG: 376344 + +Reviewers: elvisangelaccio + +Differential Revision: https://phabricator.kde.org/D6616 +--- + smb/kio_smb_browse.cpp | 23 ++- + 1 file changed, 22 insertions(+), 1 deletion(-) + +diff --git a/smb/kio_smb_browse.cpp b/smb/kio_smb_browse.cpp +index