blob: a0cbb6af6b7d5310ca9310bdf4cb7940cd1b62b4 [file] [log] [blame]
Andrew Geissler90fd73c2021-03-05 15:25:55 -06001SUMMARY = "A client-side C library implementing the SSH2 protocol"
2HOMEPAGE = "http://www.libssh2.org/"
3SECTION = "libs"
4
5DEPENDS = "zlib"
6
7LICENSE = "BSD-3-Clause"
8LIC_FILES_CHKSUM = "file://COPYING;md5=c5cf34fc0acb44b082ef50ef5e4354ca"
9
10SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \
11 file://CVE-2019-17498.patch \
12 file://0001-configure-Conditionally-undefine-backend-m4-macro.patch \
13 file://run-ptest \
Andrew Geisslerc926e172021-05-07 16:11:35 -050014 file://0001-kex.c-move-EC-macro-outside-of-if-check-549-550.patch \
Andrew Geissler90fd73c2021-03-05 15:25:55 -060015"
16
Patrick Williams213cb262021-08-07 19:21:33 -050017SRC_URI:append:ptest = " file://0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060018
19SRC_URI[md5sum] = "1beefafe8963982adc84b408b2959927"
20SRC_URI[sha256sum] = "d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd"
21
22inherit autotools pkgconfig ptest
23
24EXTRA_OECONF += "\
25 --with-libz \
26 --with-libz-prefix=${STAGING_LIBDIR} \
27 "
28
29# only one of openssl and gcrypt could be set
30PACKAGECONFIG ??= "openssl"
31PACKAGECONFIG[openssl] = "--with-crypto=openssl --with-libssl-prefix=${STAGING_LIBDIR}, , openssl"
32PACKAGECONFIG[gcrypt] = "--with-crypto=libgcrypt --with-libgcrypt-prefix=${STAGING_EXECPREFIXDIR}, , libgcrypt"
33
34BBCLASSEXTEND = "native nativesdk"
35
36# required for ptest on documentation
Patrick Williams213cb262021-08-07 19:21:33 -050037RDEPENDS:${PN}-ptest = "man-db openssh util-linux-col"
38RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060039
40do_compile_ptest() {
41 sed -i "/\$(MAKE) \$(AM_MAKEFLAGS) check-TESTS/d" tests/Makefile
42 oe_runmake check
43}
44
45do_install_ptest() {
46 install -d ${D}${PTEST_PATH}/tests
47 install -m 0755 ${S}/test-driver ${D}${PTEST_PATH}/
48 cp -rf ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests/
49 cp -rf ${S}/tests/mansyntax.sh ${D}${PTEST_PATH}/tests/
50 cp -rf ${S}/tests/ssh2.sh ${D}${PTEST_PATH}/tests/
51 cp -rf ${S}/tests/etc ${D}${PTEST_PATH}/tests/
52 mkdir -p ${D}${PTEST_PATH}/docs
53 cp -r ${S}/docs/* ${D}${PTEST_PATH}/docs/
54}