1 |
commit: 74f4ec456198c500f81f8294da29b1a2f9daee71 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 14 14:08:25 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 14 15:59:35 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74f4ec45 |
7 |
|
8 |
media-gfx/exiv2: 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 |
media-gfx/exiv2/exiv2-0.27.2.ebuild | 2 + |
14 |
.../exiv2/files/exiv2-0.27.2-libssh-0.9.2.patch | 56 ++++++++++++++++++++++ |
15 |
2 files changed, 58 insertions(+) |
16 |
|
17 |
diff --git a/media-gfx/exiv2/exiv2-0.27.2.ebuild b/media-gfx/exiv2/exiv2-0.27.2.ebuild |
18 |
index e70d4f902f1..3d6060c5535 100644 |
19 |
--- a/media-gfx/exiv2/exiv2-0.27.2.ebuild |
20 |
+++ b/media-gfx/exiv2/exiv2-0.27.2.ebuild |
21 |
@@ -45,6 +45,8 @@ RDEPEND="${DEPEND}" |
22 |
|
23 |
DOCS=( README.md doc/ChangeLog doc/cmd.txt ) |
24 |
|
25 |
+PATCHES=( "${FILESDIR}/${P}-libssh-0.9.2.patch" ) |
26 |
+ |
27 |
S="${S}-Source" |
28 |
|
29 |
pkg_setup() { |
30 |
|
31 |
diff --git a/media-gfx/exiv2/files/exiv2-0.27.2-libssh-0.9.2.patch b/media-gfx/exiv2/files/exiv2-0.27.2-libssh-0.9.2.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..abf165b83f4 |
34 |
--- /dev/null |
35 |
+++ b/media-gfx/exiv2/files/exiv2-0.27.2-libssh-0.9.2.patch |
36 |
@@ -0,0 +1,56 @@ |
37 |
+From c59eb810728572fde84492d43a932dcac89746d6 Mon Sep 17 00:00:00 2001 |
38 |
+From: Andreas Sturmlechner <asturm@g.o> |
39 |
+Date: Thu, 14 Nov 2019 15:06:38 +0100 |
40 |
+Subject: [PATCH] EXIV2_ENABLE_SSH: Fix compatibility with >=libssh-0.9.2 |
41 |
+ |
42 |
+0.9.1 remains broken regardless and is beyond fixing in this place. |
43 |
+ |
44 |
+Build-tested with both libssh 0.9.0 and 0.9.2. |
45 |
+ |
46 |
+Solution copied from KDE's kio-extras commit 24506c2af8d1904a99538543804306c6c2b81ca2 |
47 |
+--- |
48 |
+ cmake/findDependencies.cmake | 13 +++++++++++-- |
49 |
+ src/CMakeLists.txt | 3 +-- |
50 |
+ 2 files changed, 12 insertions(+), 4 deletions(-) |
51 |
+ |
52 |
+diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake |
53 |
+index a458a0c9..ec3a43f5 100644 |
54 |
+--- a/cmake/findDependencies.cmake |
55 |
++++ b/cmake/findDependencies.cmake |
56 |
+@@ -26,8 +26,17 @@ if( EXIV2_ENABLE_WEBREADY ) |
57 |
+ |
58 |
+ if( EXIV2_ENABLE_SSH ) |
59 |
+ find_package(libssh CONFIG REQUIRED) |
60 |
+- endif( ) |
61 |
+-endif( ) |
62 |
++ # Define an imported target to have compatibility with <=libssh-0.9.0 |
63 |
++ # libssh-0.9.1 is broken regardless. |
64 |
++ if(NOT TARGET ssh) |
65 |
++ add_library(ssh SHARED IMPORTED) |
66 |
++ set_target_properties(ssh PROPERTIES |
67 |
++ IMPORTED_LOCATION "${LIBSSH_LIBRARIES}" |
68 |
++ INTERFACE_INCLUDE_DIRECTORIES "${LIBSSH_INCLUDE_DIR}" |
69 |
++ ) |
70 |
++ endif() |
71 |
++ endif() |
72 |
++endif() |
73 |
+ |
74 |
+ if (EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP) |
75 |
+ message(FATAL_ERROR "EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP are mutually exclusive. You can only choose one of them") |
76 |
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
77 |
+index 27f8dbb1..bdd83fa0 100644 |
78 |
+--- a/src/CMakeLists.txt |
79 |
++++ b/src/CMakeLists.txt |
80 |
+@@ -173,8 +173,7 @@ target_include_directories(exiv2lib_int PUBLIC |
81 |
+ if (EXIV2_ENABLE_WEBREADY) |
82 |
+ |
83 |
+ if( EXIV2_ENABLE_SSH ) |
84 |
+- target_include_directories(exiv2lib SYSTEM PUBLIC ${LIBSSH_INCLUDE_DIR}) |
85 |
+- target_link_libraries(exiv2lib PUBLIC ${LIBSSH_LIBRARIES}) |
86 |
++ target_link_libraries(exiv2lib PUBLIC ssh) |
87 |
+ endif() |
88 |
+ |
89 |
+ if( EXIV2_ENABLE_CURL ) |
90 |
+-- |
91 |
+2.24.0 |
92 |
+ |