blob: 866f3932f69b415883b3ab565070d82f5c3658de [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 Geissler7e0e3c02022-02-25 20:34:39 +000010LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & GPL-3.0-or-later"
11LICENSE:${PN} = "LGPL-2.1-or-later"
12LICENSE:${PN}-dev = "GPL-2.0-or-later & LGPL-2.1-or-later"
13LICENSE:dumpsexp-dev = "GPL-3.0-or-later"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014
15LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
16 file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \
Andrew Geissler09036742021-06-25 14:25:14 -050017 file://LICENSES;md5=42fa35a25e138166cc40588387f9159d \
Andrew Geissler90fd73c2021-03-05 15:25:55 -060018 "
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019
20DEPENDS = "libgpg-error"
21
22UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
23SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \
Brad Bishop64c979e2019-11-04 13:55:29 -050024 file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025 file://0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch \
26 file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
27 file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
Andrew Geissler90fd73c2021-03-05 15:25:55 -060028 file://0001-Makefile.am-add-a-missing-space.patch \
29 "
Andrew Geissler5199d832021-09-24 16:47:35 -050030SRC_URI[sha256sum] = "ea849c83a72454e3ed4267697e8ca03390aee972ab421e7df69dfe42b65caaf7"
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
37inherit autotools texinfo binconfig-disabled pkgconfig
38
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
50# libgcrypt.pc is added locally and thus installed here
Patrick Williams213cb262021-08-07 19:21:33 -050051do_install:append() {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080052 install -d ${D}/${libdir}/pkgconfig
53 install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
54}
55
56PACKAGES =+ "dumpsexp-dev"
57
Patrick Williams213cb262021-08-07 19:21:33 -050058FILES:${PN}-dev += "${bindir}/hmac256"
59FILES:dumpsexp-dev += "${bindir}/dumpsexp"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080060
61BBCLASSEXTEND = "native nativesdk"