1*4882a593SmuzhiyunSUMMARY = "GNU Transport Layer Security Library" 2*4882a593SmuzhiyunDESCRIPTION = "a secure communications library implementing the SSL, \ 3*4882a593SmuzhiyunTLS and DTLS protocols and technologies around them." 4*4882a593SmuzhiyunHOMEPAGE = "https://gnutls.org/" 5*4882a593SmuzhiyunBUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls" 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunLICENSE = "GPL-3.0-or-later & LGPL-2.1-or-later" 8*4882a593SmuzhiyunLICENSE:${PN} = "LGPL-2.1-or-later" 9*4882a593SmuzhiyunLICENSE:${PN}-xx = "LGPL-2.1-or-later" 10*4882a593SmuzhiyunLICENSE:${PN}-bin = "GPL-3.0-or-later" 11*4882a593SmuzhiyunLICENSE:${PN}-openssl = "GPL-3.0-or-later" 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \ 14*4882a593Smuzhiyun file://doc/COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \ 15*4882a593Smuzhiyun file://doc/COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343" 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunDEPENDS = "nettle gmp virtual/libiconv libunistring" 18*4882a593SmuzhiyunDEPENDS:append:libc-musl = " argp-standalone" 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunSHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunSRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \ 23*4882a593Smuzhiyun file://arm_eabi.patch \ 24*4882a593Smuzhiyun file://CVE-2022-2509.patch \ 25*4882a593Smuzhiyun file://CVE-2023-0361.patch \ 26*4882a593Smuzhiyun " 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunSRC_URI[sha256sum] = "e6adbebcfbc95867de01060d93c789938cf89cc1d1f6ef9ef661890f6217451f" 29*4882a593Smuzhiyun 30*4882a593Smuzhiyuninherit autotools texinfo pkgconfig gettext lib_package gtk-doc 31*4882a593Smuzhiyun 32*4882a593SmuzhiyunPACKAGECONFIG ??= "libidn ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}" 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun# You must also have CONFIG_SECCOMP enabled in the kernel for 35*4882a593Smuzhiyun# seccomp to work. 36*4882a593SmuzhiyunPACKAGECONFIG[seccomp] = "--with-libseccomp-prefix=${STAGING_EXECPREFIXDIR},ac_cv_libseccomp=no,libseccomp" 37*4882a593SmuzhiyunPACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn2" 38*4882a593SmuzhiyunPACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1" 39*4882a593SmuzhiyunPACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit" 40*4882a593SmuzhiyunPACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers" 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunEXTRA_OECONF = " \ 43*4882a593Smuzhiyun --enable-doc \ 44*4882a593Smuzhiyun --disable-libdane \ 45*4882a593Smuzhiyun --disable-guile \ 46*4882a593Smuzhiyun --disable-rpath \ 47*4882a593Smuzhiyun --enable-openssl-compatibility \ 48*4882a593Smuzhiyun --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \ 49*4882a593Smuzhiyun --with-librt-prefix=${STAGING_DIR_HOST}${prefix} \ 50*4882a593Smuzhiyun --with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \ 51*4882a593Smuzhiyun" 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun# Otherwise the tools try and use HOSTTOOLS_DIR/bash as a shell. 54*4882a593Smuzhiyunexport POSIX_SHELL="${base_bindir}/sh" 55*4882a593Smuzhiyun 56*4882a593SmuzhiyunLDFLAGS:append:libc-musl = " -largp" 57*4882a593Smuzhiyun 58*4882a593Smuzhiyundo_configure:prepend() { 59*4882a593Smuzhiyun for dir in . lib; do 60*4882a593Smuzhiyun rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4 61*4882a593Smuzhiyun done 62*4882a593Smuzhiyun} 63*4882a593Smuzhiyun 64*4882a593SmuzhiyunPACKAGES =+ "${PN}-openssl ${PN}-xx" 65*4882a593Smuzhiyun 66*4882a593SmuzhiyunFILES:${PN}-dev += "${bindir}/gnutls-cli-debug" 67*4882a593SmuzhiyunFILES:${PN}-openssl = "${libdir}/libgnutls-openssl.so.*" 68*4882a593SmuzhiyunFILES:${PN}-xx = "${libdir}/libgnutlsxx.so.*" 69*4882a593Smuzhiyun 70*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk" 71