Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh/
Date: Fri, 26 Aug 2022 20:53:16
Message-Id: 1661547180.71d83777398994660c70bba48700a7baf8741aa7.asturm@gentoo
1 commit: 71d83777398994660c70bba48700a7baf8741aa7
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 26 20:45:57 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 26 20:53:00 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71d83777
7
8 net-libs/libssh: add 0.10.0
9
10 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
11
12 net-libs/libssh/Manifest | 1 +
13 net-libs/libssh/libssh-0.10.0.ebuild | 122 +++++++++++++++++++++++++++++++++++
14 2 files changed, 123 insertions(+)
15
16 diff --git a/net-libs/libssh/Manifest b/net-libs/libssh/Manifest
17 index 5e3e1048991f..e353f0232c89 100644
18 --- a/net-libs/libssh/Manifest
19 +++ b/net-libs/libssh/Manifest
20 @@ -1 +1,2 @@
21 +DIST libssh-0.10.0.tar.xz 553384 BLAKE2B 4a57e2095a4f56d06b2be591e02c9b9ded5e1fa28ed2774389a2902a8277f6e6b99014f8868f0740ca2900409d33b968f65c9eaa312e259926436afb49fc108c SHA512 d97235f78b94a980aabc844ee7614108944967441219f0c2417b207734d5200eb26efd5fd6de0da97a34fb612b843dc0a3b32a3364c1d8333e4c49680212aaaa
22 DIST libssh-0.9.6.tar.xz 1053056 BLAKE2B e8565279a430786b8877386a26700a39386e908546a209815b135a2bf4ef42c37b9890dc29cda9ce6c8bfe3f3bae4942097dc794302aec767d106a45c44b811d SHA512 4040ec4af937e95be2e41313ef6d4db60b46b8d4dea10c09402398127c1d1ca8843392d207088aeee3c7ef631c6ae7b66861327dcebf78ed3af0723777619fd1
23
24 diff --git a/net-libs/libssh/libssh-0.10.0.ebuild b/net-libs/libssh/libssh-0.10.0.ebuild
25 new file mode 100644
26 index 000000000000..9b897cf8885e
27 --- /dev/null
28 +++ b/net-libs/libssh/libssh-0.10.0.ebuild
29 @@ -0,0 +1,122 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +inherit cmake-multilib
36 +
37 +DESCRIPTION="Access a working SSH implementation by means of a library"
38 +HOMEPAGE="https://www.libssh.org/"
39 +
40 +if [[ ${PV} == *9999* ]] ; then
41 + inherit git-r3
42 + EGIT_REPO_URI="https://git.libssh.org/projects/libssh.git"
43 +else
44 + SRC_URI="https://www.libssh.org/files/$(ver_cut 1-2)/${P}.tar.xz"
45 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
46 +fi
47 +
48 +LICENSE="LGPL-2.1"
49 +SLOT="0/4" # subslot = soname major version
50 +IUSE="debug doc examples gcrypt gssapi mbedtls pcap server +sftp static-libs test zlib"
51 +# Maintainer: check IUSE-defaults at DefineOptions.cmake
52 +
53 +REQUIRED_USE="?? ( gcrypt mbedtls )"
54 +RESTRICT="!test? ( test )"
55 +
56 +RDEPEND="
57 + !gcrypt? (
58 + !mbedtls? (
59 + >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}]
60 + )
61 + )
62 + gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
63 + gssapi? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
64 + mbedtls? ( net-libs/mbedtls:=[${MULTILIB_USEDEP}] )
65 + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
66 +"
67 +DEPEND="${RDEPEND}
68 + test? (
69 + >=dev-util/cmocka-0.3.1[${MULTILIB_USEDEP}]
70 + elibc_musl? ( sys-libs/argp-standalone )
71 + )
72 +"
73 +BDEPEND="doc? ( app-doc/doxygen[dot] )"
74 +
75 +DOCS=( AUTHORS CHANGELOG README )
76 +
77 +PATCHES=( "${FILESDIR}/${PN}-0.8.0-tests.patch" )
78 +
79 +src_prepare() {
80 + cmake_src_prepare
81 +
82 + # just install the examples, do not compile them
83 + cmake_comment_add_subdirectory examples
84 +
85 + # keyfile torture test is currently broken
86 + sed -e "/torture_keyfiles/d" \
87 + -i tests/unittests/CMakeLists.txt || die
88 +
89 + # disable tests that take too long (bug #677006)
90 + if use sparc; then
91 + sed -e "/torture_threads_pki_rsa/d" -e "/torture_pki_dsa/d" \
92 + -i tests/unittests/CMakeLists.txt || die
93 + fi
94 +
95 + sed -e "/^check_include_file.*HAVE_VALGRIND_VALGRIND_H/s/^/#DONT /" \
96 + -i ConfigureChecks.cmake || die
97 +
98 + if use test && use elibc_musl; then
99 + sed -e "/SOLARIS/d" \
100 + -i tests/CMakeLists.txt || die
101 + fi
102 +}
103 +
104 +multilib_src_configure() {
105 + local mycmakeargs=(
106 + -DWITH_NACL=OFF
107 + -DWITH_STACK_PROTECTOR=OFF
108 + -DWITH_STACK_PROTECTOR_STRONG=OFF
109 + -DWITH_DEBUG_CALLTRACE=$(usex debug)
110 + -DWITH_DEBUG_CRYPTO=$(usex debug)
111 + -DWITH_GCRYPT=$(usex gcrypt)
112 + -DWITH_GSSAPI=$(usex gssapi)
113 + -DWITH_MBEDTLS=$(usex mbedtls)
114 + -DWITH_PCAP=$(usex pcap)
115 + -DWITH_SERVER=$(usex server)
116 + -DWITH_SFTP=$(usex sftp)
117 + -DBUILD_STATIC_LIB=$(usex static-libs)
118 + -DUNIT_TESTING=$(usex test)
119 + -DWITH_ZLIB=$(usex zlib)
120 + )
121 +
122 + multilib_is_native_abi || mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON )
123 +
124 + cmake_src_configure
125 +}
126 +
127 +multilib_src_compile() {
128 + cmake_src_compile
129 + multilib_is_native_abi && use doc && cmake_src_compile docs
130 +}
131 +
132 +multilib_src_install() {
133 + cmake_src_install
134 + multilib_is_native_abi && use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
135 +
136 + use static-libs && dolib.a src/libssh.a
137 +
138 + # compatibility symlink until all consumers have been updated
139 + # to no longer use libssh_threads.so
140 + dosym libssh.so /usr/$(get_libdir)/libssh_threads.so
141 +}
142 +
143 +multilib_src_install_all() {
144 + use mbedtls && DOCS+=( README.mbedtls )
145 + einstalldocs
146 +
147 + if use examples; then
148 + docinto examples
149 + dodoc examples/*.{c,h,cpp}
150 + fi
151 +}