1 |
commit: d866d4705e1e4a092579a31df2815e3407950a19 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 1 11:45:43 2018 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 1 11:46:10 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d866d470 |
7 |
|
8 |
net-libs/libssh2: Add USE=mbedtls, switch to cmake for building |
9 |
|
10 |
* Add support for net-libs/mbedtls |
11 |
* Switch to cmake as the autotools build is even more broken |
12 |
* Remove USE=static-libs as that inhibits building shared libs |
13 |
* Use REQUIRED_USE to force choosing a crypto backend |
14 |
|
15 |
Package-Manager: Portage-2.3.50, Repoman-2.3.11 |
16 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
17 |
|
18 |
net-libs/libssh2/libssh2-1.8.0-r2.ebuild | 56 ++++++++++++++++++++++++++++++++ |
19 |
net-libs/libssh2/metadata.xml | 2 ++ |
20 |
2 files changed, 58 insertions(+) |
21 |
|
22 |
diff --git a/net-libs/libssh2/libssh2-1.8.0-r2.ebuild b/net-libs/libssh2/libssh2-1.8.0-r2.ebuild |
23 |
new file mode 100644 |
24 |
index 00000000000..daf148cbce6 |
25 |
--- /dev/null |
26 |
+++ b/net-libs/libssh2/libssh2-1.8.0-r2.ebuild |
27 |
@@ -0,0 +1,56 @@ |
28 |
+# Copyright 1999-2018 Gentoo Authors |
29 |
+# Distributed under the terms of the GNU General Public License v2 |
30 |
+ |
31 |
+EAPI=6 |
32 |
+inherit cmake-utils multilib-minimal |
33 |
+ |
34 |
+DESCRIPTION="Library implementing the SSH2 protocol" |
35 |
+HOMEPAGE="https://www.libssh2.org" |
36 |
+SRC_URI="https://www.${PN}.org/download/${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="BSD" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris" |
41 |
+IUSE="gcrypt libressl mbedtls test zlib" |
42 |
+REQUIRED_USE=" |
43 |
+ ?? ( gcrypt libressl mbedtls ) |
44 |
+" |
45 |
+ |
46 |
+RDEPEND=" |
47 |
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) |
48 |
+ gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) |
49 |
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) |
50 |
+ mbedtls? ( net-libs/mbedtls ) |
51 |
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) |
52 |
+" |
53 |
+DEPEND="${RDEPEND}" |
54 |
+ |
55 |
+PATCHES=( |
56 |
+ "${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch |
57 |
+ "${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch |
58 |
+ "${FILESDIR}"/${PN}-1.8.0-openssl11-memleak.patch |
59 |
+ "${FILESDIR}"/${PN}-1.8.0-openssl11.patch |
60 |
+) |
61 |
+ |
62 |
+multilib_src_configure() { |
63 |
+ local crypto_backend=OpenSSL |
64 |
+ if use gcrypt; then |
65 |
+ crypto_backend=Libgcrypt |
66 |
+ elif use mbedtls; then |
67 |
+ crypto_backend=mbedTLS |
68 |
+ fi |
69 |
+ |
70 |
+ local mycmakeargs=( |
71 |
+ -DBUILD_SHARED_LIBS=ON |
72 |
+ -DCRYPTO_BACKEND=${crypto_backend} |
73 |
+ -DENABLE_ZLIB_COMPRESSION=$(usex zlib) |
74 |
+ ) |
75 |
+ cmake-utils_src_configure |
76 |
+} |
77 |
+ |
78 |
+multilib_src_install_all() { |
79 |
+ einstalldocs |
80 |
+ find "${D}" -name '*.la' -delete || die |
81 |
+ mv "${D}"/usr/share/doc/${PN}/* "${D}"/usr/share/doc/${PF}/ || die |
82 |
+ rm -r "${D}"/usr/share/doc/${PN}/ || die |
83 |
+} |
84 |
|
85 |
diff --git a/net-libs/libssh2/metadata.xml b/net-libs/libssh2/metadata.xml |
86 |
index e9e734ab02f..2149f2ed0c6 100644 |
87 |
--- a/net-libs/libssh2/metadata.xml |
88 |
+++ b/net-libs/libssh2/metadata.xml |
89 |
@@ -10,5 +10,7 @@ |
90 |
</maintainer> |
91 |
<use> |
92 |
<flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> instead of <pkg>dev-libs/openssl</pkg></flag> |
93 |
+ <flag name="libressl">Use <pkg>dev-libs/libressl</pkg> instead of <pkg>dev-libs/openssl</pkg></flag> |
94 |
+ <flag name="mbedtls">Use <pkg>net-libs/mbedtls</pkg> instead of <pkg>dev-libs/openssl</pkg></flag> |
95 |
</use> |
96 |
</pkgmetadata> |