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.bb100
1 files changed, 100 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..21506a04dc
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls_3.8.5.bb
@@ -0,0 +1,100 @@
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://run-ptest \
25 file://Add-ptest-support.patch \
26 "
27
28SRC_URI[sha256sum] = "66269a2cfe0e1c2dabec87bdbbd8ab656f396edd9a40dd006978e003cfa52bfc"
29
30inherit autotools texinfo pkgconfig gettext lib_package gtk-doc ptest
31
32PACKAGECONFIG ??= "libidn libtasn1 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
33
34# You must also have CONFIG_SECCOMP enabled in the kernel for
35# seccomp to work.
36PACKAGECONFIG[seccomp] = "--with-libseccomp-prefix=${STAGING_EXECPREFIXDIR},ac_cv_libseccomp=no,libseccomp"
37PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn2"
38PACKAGECONFIG[libtasn1] = "--without-included-libtasn1,--with-included-libtasn1,libtasn1"
39PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
40PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
41PACKAGECONFIG[fips] = "--enable-fips140-mode --with-libdl-prefix=${STAGING_BASELIBDIR}"
42PACKAGECONFIG[dane] = "--enable-libdane,--disable-libdane,unbound"
43# Certificate compression
44PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli"
45PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
46PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
47
48EXTRA_OECONF = " \
49 --enable-doc \
50 --disable-rpath \
51 --enable-openssl-compatibility \
52 --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
53 --with-librt-prefix=${STAGING_DIR_HOST}${prefix} \
54 --with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \
55"
56
57# Otherwise the tools try and use HOSTTOOLS_DIR/bash as a shell.
58export POSIX_SHELL="${base_bindir}/sh"
59
60do_configure:prepend() {
61 for dir in . lib; do
62 rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
63 done
64}
65
66do_compile_ptest() {
67 oe_runmake -C tests buildtest-TESTS
68}
69
70do_install:append:class-target() {
71 if ${@bb.utils.contains('PACKAGECONFIG', 'fips', 'true', 'false', d)}; then
72 install -d ${D}${bindir}/bin
73 install -m 0755 ${B}/lib/.libs/fipshmac ${D}/${bindir}/
74 fi
75}
76
77PACKAGES =+ "${PN}-dane ${PN}-openssl ${PN}-xx ${PN}-fips"
78
79FILES:${PN}-dev += "${bindir}/gnutls-cli-debug"
80
81FILES:${PN}-dane = "${libdir}/libgnutls-dane.so.*"
82FILES:${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
83FILES:${PN}-xx = "${libdir}/libgnutlsxx.so.*"
84FILES:${PN}-fips = "${bindir}/fipshmac"
85
86RDEPENDS:${PN}-ptest += "python3"
87
88BBCLASSEXTEND = "native nativesdk"
89
90pkg_postinst_ontarget:${PN}-fips () {
91 if test -x ${bindir}/fipshmac
92 then
93 mkdir ${sysconfdir}/gnutls
94 touch ${sysconfdir}/gnutls/config
95 ${bindir}/fipshmac ${libdir}/libgnutls.so.30.*.* > ${libdir}/.libgnutls.so.30.hmac
96 ${bindir}/fipshmac ${libdir}/libnettle.so.8.* > ${libdir}/.libnettle.so.8.hmac
97 ${bindir}/fipshmac ${libdir}/libgmp.so.10.*.* > ${libdir}/.libgmp.so.10.hmac
98 ${bindir}/fipshmac ${libdir}/libhogweed.so.6.* > ${libdir}/.libhogweed.so.6.hmac
99 fi
100}