summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gnutls/gnutls_3.8.5.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/gnutls/gnutls_3.8.5.bb')
-rw-r--r--meta/recipes-support/gnutls/gnutls_3.8.5.bb101
1 files changed, 101 insertions, 0 deletions
diff --git a/meta/recipes-support/gnutls/gnutls_3.8.5.bb b/meta/recipes-support/gnutls/gnutls_3.8.5.bb
new file mode 100644
index 0000000000..52a1c00c4a
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls_3.8.5.bb
@@ -0,0 +1,101 @@
1SUMMARY = "GNU Transport Layer Security Library"
2DESCRIPTION = "a secure communications library implementing the SSL, \
3TLS and DTLS protocols and technologies around them."
4HOMEPAGE = "https://gnutls.org/"
5BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
6
7LICENSE = "GPL-3.0-or-later & LGPL-2.1-or-later"
8LICENSE:${PN} = "LGPL-2.1-or-later"
9LICENSE:${PN}-xx = "LGPL-2.1-or-later"
10LICENSE:${PN}-bin = "GPL-3.0-or-later"
11LICENSE:${PN}-openssl = "GPL-3.0-or-later"
12
13LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \
14 file://doc/COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \
15 file://doc/COPYING.LESSER;md5=4fbd65380cdd255951079008b364516c"
16
17DEPENDS = "nettle gmp virtual/libiconv libunistring"
18
19SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
20
21SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \
22 file://arm_eabi.patch \
23 file://0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch \
24 file://0001-Fix-RSAES-PKCS1-v1_5-system-wide-configuration.patch \
25 file://run-ptest \
26 file://Add-ptest-support.patch \
27 "
28
29SRC_URI[sha256sum] = "66269a2cfe0e1c2dabec87bdbbd8ab656f396edd9a40dd006978e003cfa52bfc"
30
31inherit autotools texinfo pkgconfig gettext lib_package gtk-doc ptest
32
33PACKAGECONFIG ??= "libidn libtasn1 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
34
35# You must also have CONFIG_SECCOMP enabled in the kernel for
36# seccomp to work.
37PACKAGECONFIG[seccomp] = "--with-libseccomp-prefix=${STAGING_EXECPREFIXDIR},ac_cv_libseccomp=no,libseccomp"
38PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn2"
39PACKAGECONFIG[libtasn1] = "--without-included-libtasn1,--with-included-libtasn1,libtasn1"
40PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
41PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
42PACKAGECONFIG[fips] = "--enable-fips140-mode --with-libdl-prefix=${STAGING_BASELIBDIR}"
43PACKAGECONFIG[dane] = "--enable-libdane,--disable-libdane,unbound"
44# Certificate compression
45PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli"
46PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
47PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
48
49EXTRA_OECONF = " \
50 --enable-doc \
51 --disable-rpath \
52 --enable-openssl-compatibility \
53 --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
54 --with-librt-prefix=${STAGING_DIR_HOST}${prefix} \
55 --with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \
56"
57
58# Otherwise the tools try and use HOSTTOOLS_DIR/bash as a shell.
59export POSIX_SHELL="${base_bindir}/sh"
60
61do_configure:prepend() {
62 for dir in . lib; do
63 rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
64 done
65}
66
67do_compile_ptest() {
68 oe_runmake -C tests buildtest-TESTS
69}
70
71do_install:append:class-target() {
72 if ${@bb.utils.contains('PACKAGECONFIG', 'fips', 'true', 'false', d)}; then
73 install -d ${D}${bindir}/bin
74 install -m 0755 ${B}/lib/.libs/fipshmac ${D}/${bindir}/
75 fi
76}
77
78PACKAGES =+ "${PN}-dane ${PN}-openssl ${PN}-xx ${PN}-fips"
79
80FILES:${PN}-dev += "${bindir}/gnutls-cli-debug"
81
82FILES:${PN}-dane = "${libdir}/libgnutls-dane.so.*"
83FILES:${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
84FILES:${PN}-xx = "${libdir}/libgnutlsxx.so.*"
85FILES:${PN}-fips = "${bindir}/fipshmac"
86
87RDEPENDS:${PN}-ptest += "python3"
88
89BBCLASSEXTEND = "native nativesdk"
90
91pkg_postinst_ontarget:${PN}-fips () {
92 if test -x ${bindir}/fipshmac
93 then
94 mkdir ${sysconfdir}/gnutls
95 touch ${sysconfdir}/gnutls/config
96 ${bindir}/fipshmac ${libdir}/libgnutls.so.30.*.* > ${libdir}/.libgnutls.so.30.hmac
97 ${bindir}/fipshmac ${libdir}/libnettle.so.8.* > ${libdir}/.libnettle.so.8.hmac
98 ${bindir}/fipshmac ${libdir}/libgmp.so.10.*.* > ${libdir}/.libgmp.so.10.hmac
99 ${bindir}/fipshmac ${libdir}/libhogweed.so.6.* > ${libdir}/.libhogweed.so.6.hmac
100 fi
101}