Gentoo Archives: gentoo-commits

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