1 |
commit: 41981aa42bc2b74bda500ee77c055c46ee6e57b7 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 14 13:11:22 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 14 15:59:32 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41981aa4 |
7 |
|
8 |
kde-apps/kio-extras: Fix build against >=net-libs/libssh-0.9.2 |
9 |
|
10 |
Package-Manager: Portage-2.3.79, Repoman-2.3.18 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
.../files/kio-extras-19.08.3-libssh-0.9.2.patch | 88 ++++++++++++++++++++++ |
14 |
kde-apps/kio-extras/kio-extras-19.08.3.ebuild | 19 +++-- |
15 |
2 files changed, 99 insertions(+), 8 deletions(-) |
16 |
|
17 |
diff --git a/kde-apps/kio-extras/files/kio-extras-19.08.3-libssh-0.9.2.patch b/kde-apps/kio-extras/files/kio-extras-19.08.3-libssh-0.9.2.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..b133140ac26 |
20 |
--- /dev/null |
21 |
+++ b/kde-apps/kio-extras/files/kio-extras-19.08.3-libssh-0.9.2.patch |
22 |
@@ -0,0 +1,88 @@ |
23 |
+From 24506c2af8d1904a99538543804306c6c2b81ca2 Mon Sep 17 00:00:00 2001 |
24 |
+From: Harald Sitter <sitter@×××.org> |
25 |
+Date: Wed, 6 Nov 2019 13:57:20 +0100 |
26 |
+Subject: make the libssh finder ensure the new ssh target is set |
27 |
+ |
28 |
+Summary: |
29 |
+starting with 0.9.2 the libssh cmake config defines a new ssh imported |
30 |
+target, use this as the new gold standard and ensure older versions |
31 |
+are compatible |
32 |
+ |
33 |
+broken ubuntu: no cmake config -> manual finder -> target injected |
34 |
+0.9.0 and earlier: cmake config -> target injected |
35 |
+0.9.2: cmake config -> target already defined; noop |
36 |
+ |
37 |
+(0.9.1 is broken as it neither matches the old nor the new expectation) |
38 |
+ |
39 |
+Test Plan: |
40 |
+no cmake config -> target injected |
41 |
+older cmake config -> target injected |
42 |
+newer cmake config (with merge request) -> noop |
43 |
+ |
44 |
+Subscribers: kde-frameworks-devel, kfm-devel |
45 |
+ |
46 |
+Tags: #dolphin, #frameworks |
47 |
+ |
48 |
+Differential Revision: https://phabricator.kde.org/D25170 |
49 |
+--- |
50 |
+ cmake/Findlibssh.cmake | 18 ++++++++++++++++++ |
51 |
+ sftp/CMakeLists.txt | 2 +- |
52 |
+ 2 files changed, 19 insertions(+), 1 deletion(-) |
53 |
+ |
54 |
+diff --git a/cmake/Findlibssh.cmake b/cmake/Findlibssh.cmake |
55 |
+index bf6d797..f37846f 100644 |
56 |
+--- a/cmake/Findlibssh.cmake |
57 |
++++ b/cmake/Findlibssh.cmake |
58 |
+@@ -32,6 +32,19 @@ |
59 |
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
60 |
+ # SUCH DAMAGE. |
61 |
+ |
62 |
++# Define an imported target to have compatibility with newer libssh and so |
63 |
++# we have a single target to use regardless of the code path taken in the |
64 |
++# finder and the actual libssh version defining the target. |
65 |
++macro(libssh_ensure_imported_target) |
66 |
++ if(NOT TARGET ssh) |
67 |
++ add_library(ssh SHARED IMPORTED) |
68 |
++ set_target_properties(ssh PROPERTIES |
69 |
++ IMPORTED_LOCATION "${LIBSSH_LIBRARIES}" |
70 |
++ INTERFACE_INCLUDE_DIRECTORIES "${LIBSSH_INCLUDE_DIR}" |
71 |
++ ) |
72 |
++ endif() |
73 |
++endmacro() |
74 |
++ |
75 |
+ # We prefer the config, but on Ubuntu 18.04 LTS (and to some extent later |
76 |
+ # versions it seems) they've not packaged the config properly. So, go for the |
77 |
+ # config by default and fall back to manual lookup iff the config was not found. |
78 |
+@@ -39,6 +52,9 @@ |
79 |
+ # https://bugs.launchpad.net/ubuntu/+source/libssh/+bug/1800135 |
80 |
+ find_package(libssh ${libssh_FIND_VERSION} NO_MODULE QUIET) |
81 |
+ if(libssh_FOUND) |
82 |
++ # Certain versions with config may not have the target, so make sure it's |
83 |
++ # defined. |
84 |
++ libssh_ensure_imported_target() |
85 |
+ return() |
86 |
+ endif() |
87 |
+ |
88 |
+@@ -109,5 +125,7 @@ find_package_handle_standard_args(libssh |
89 |
+ VERSION_VAR |
90 |
+ LIBSSH_VERSION) |
91 |
+ |
92 |
++libssh_ensure_imported_target() |
93 |
++ |
94 |
+ # show the LIBSSH_INCLUDE_DIRS and LIBSSH_LIBRARIES variables only in the advanced view |
95 |
+ mark_as_advanced(LIBSSH_INCLUDE_DIR LIBSSH_LIBRARIES) |
96 |
+diff --git a/sftp/CMakeLists.txt b/sftp/CMakeLists.txt |
97 |
+index cd09cd3..5d1eccb 100644 |
98 |
+--- a/sftp/CMakeLists.txt |
99 |
++++ b/sftp/CMakeLists.txt |
100 |
+@@ -22,7 +22,7 @@ target_link_libraries(kio_sftp |
101 |
+ KF5::WidgetsAddons # KMessageBox |
102 |
+ KF5::I18n |
103 |
+ Qt5::Network |
104 |
+- ${LIBSSH_LIBRARIES}) |
105 |
++ ssh) |
106 |
+ set_target_properties(kio_sftp PROPERTIES OUTPUT_NAME "sftp") |
107 |
+ |
108 |
+ install(TARGETS kio_sftp DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kio) |
109 |
+-- |
110 |
+cgit v1.1 |
111 |
|
112 |
diff --git a/kde-apps/kio-extras/kio-extras-19.08.3.ebuild b/kde-apps/kio-extras/kio-extras-19.08.3.ebuild |
113 |
index 5e1cd88821f..8b8ae07f60d 100644 |
114 |
--- a/kde-apps/kio-extras/kio-extras-19.08.3.ebuild |
115 |
+++ b/kde-apps/kio-extras/kio-extras-19.08.3.ebuild |
116 |
@@ -5,13 +5,14 @@ EAPI=7 |
117 |
|
118 |
ECM_HANDBOOK="forceoptional" |
119 |
ECM_TEST="optional" |
120 |
-VIRTUALX_REQUIRED="test" |
121 |
KFMIN=5.60.0 |
122 |
QTMIN=5.12.3 |
123 |
+VIRTUALX_REQUIRED="test" |
124 |
inherit ecm kde.org |
125 |
|
126 |
DESCRIPTION="KIO plugins present a filesystem-like view of arbitrary data" |
127 |
HOMEPAGE="https://cgit.kde.org/kio-extras.git" |
128 |
+ |
129 |
LICENSE="GPL-2" # TODO: CHECK |
130 |
SLOT="5" |
131 |
KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
132 |
@@ -21,6 +22,12 @@ BDEPEND=" |
133 |
man? ( dev-util/gperf ) |
134 |
" |
135 |
DEPEND=" |
136 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
137 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
138 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
139 |
+ >=dev-qt/qtsvg-${QTMIN}:5 |
140 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
141 |
+ >=dev-qt/qtxml-${QTMIN}:5 |
142 |
>=kde-frameworks/karchive-${KFMIN}:5[bzip2,lzma] |
143 |
>=kde-frameworks/kbookmarks-${KFMIN}:5 |
144 |
>=kde-frameworks/kcodecs-${KFMIN}:5 |
145 |
@@ -39,15 +46,9 @@ DEPEND=" |
146 |
>=kde-frameworks/kxmlgui-${KFMIN}:5 |
147 |
>=kde-frameworks/solid-${KFMIN}:5 |
148 |
>=kde-frameworks/syntax-highlighting-${KFMIN}:5 |
149 |
- >=dev-qt/qtdbus-${QTMIN}:5 |
150 |
- >=dev-qt/qtgui-${QTMIN}:5 |
151 |
- >=dev-qt/qtnetwork-${QTMIN}:5 |
152 |
- >=dev-qt/qtsvg-${QTMIN}:5 |
153 |
- >=dev-qt/qtwidgets-${QTMIN}:5 |
154 |
- >=dev-qt/qtxml-${QTMIN}:5 |
155 |
activities? ( |
156 |
- >=kde-frameworks/kactivities-${KFMIN}:5 |
157 |
>=dev-qt/qtsql-${QTMIN}:5 |
158 |
+ >=kde-frameworks/kactivities-${KFMIN}:5 |
159 |
) |
160 |
man? ( >=kde-frameworks/khtml-${KFMIN}:5 ) |
161 |
mtp? ( >=media-libs/libmtp-1.1.16:= ) |
162 |
@@ -64,6 +65,8 @@ RDEPEND="${DEPEND} |
163 |
# requires running kde environment |
164 |
RESTRICT+=" test" |
165 |
|
166 |
+PATCHES=( "${FILESDIR}/${P}-libssh-0.9.2.patch" ) |
167 |
+ |
168 |
src_configure() { |
169 |
local mycmakeargs=( |
170 |
$(cmake-utils_use_find_package activities KF5Activities) |