blob: bf9d7cbd1027ff8f19a5b1bca348347241d5555e [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "General purpose cryptographic library based on the code from GnuPG"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "A cryptography library developed as a separated module of GnuPG. \
3It can also be used independently of GnuPG, but depends on its error-reporting \
4library Libgpg-error."
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08005HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
6BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
7SECTION = "libs"
8
9# helper program gcryptrnd and getrandom are under GPL, rest LGPL
Andrew Geisslerd5838332022-05-27 11:33:10 -050010LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000011LICENSE:${PN} = "LGPL-2.1-or-later"
12LICENSE:${PN}-dev = "GPL-2.0-or-later & LGPL-2.1-or-later"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013
14LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
15 file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \
Patrick Williams03907ee2022-05-01 06:28:52 -050016 file://LICENSES;md5=ef545b6cc717747072616519a1256d69 \
Andrew Geissler90fd73c2021-03-05 15:25:55 -060017 "
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018
19DEPENDS = "libgpg-error"
20
21UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
22SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \
Brad Bishop64c979e2019-11-04 13:55:29 -050023 file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080024 file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
25 file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
Patrick Williams92b42cb2022-09-03 06:53:57 -050026 file://no-native-gpg-error.patch \
Andrew Geissler87f5cff2022-09-30 13:13:31 -050027 file://no-bench-slope.patch \
Andrew Geisslerd5838332022-05-27 11:33:10 -050028 file://run-ptest \
Andrew Geissler90fd73c2021-03-05 15:25:55 -060029 "
Patrick Williams03907ee2022-05-01 06:28:52 -050030SRC_URI[sha256sum] = "ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031
Andrew Geisslerd1e89492021-02-12 15:35:20 -060032# Below whitelisted CVEs are disputed and not affecting crypto libraries for any distro.
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000033CVE_CHECK_IGNORE += "CVE-2018-12433 CVE-2018-12438"
Andrew Geisslerd1e89492021-02-12 15:35:20 -060034
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080035BINCONFIG = "${bindir}/libgcrypt-config"
36
Andrew Geisslerd5838332022-05-27 11:33:10 -050037inherit autotools texinfo binconfig-disabled pkgconfig ptest
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038
39EXTRA_OECONF = "--disable-asm"
Patrick Williams213cb262021-08-07 19:21:33 -050040EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080041
42PACKAGECONFIG ??= "capabilities"
43PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap"
44
Patrick Williams213cb262021-08-07 19:21:33 -050045do_configure:prepend () {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080046 # Else this could be used in preference to the one in aclocal-copy
47 rm -f ${S}/m4/gpg-error.m4
48}
49
Andrew Geisslerd5838332022-05-27 11:33:10 -050050do_install_ptest() {
Patrick Williams92b42cb2022-09-03 06:53:57 -050051 cd tests
52 oe_runmake testdrv-build testdrv
53 install testdrv $(srcdir=${S}/tests ./testdrv-build --files | sort | uniq) ${D}${PTEST_PATH}
Andrew Geisslerd5838332022-05-27 11:33:10 -050054}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080055
Andrew Geisslerd5838332022-05-27 11:33:10 -050056FILES:${PN}-dev += "${bindir}/hmac256 ${bindir}/dumpsexp"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080057
58BBCLASSEXTEND = "native nativesdk"