xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-support/libgcrypt/libgcrypt_1.9.4.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "General purpose cryptographic library based on the code from GnuPG"
2*4882a593SmuzhiyunDESCRIPTION = "A cryptography library developed as a separated module of GnuPG. \
3*4882a593SmuzhiyunIt can also be used independently of GnuPG, but depends on its error-reporting \
4*4882a593Smuzhiyunlibrary Libgpg-error."
5*4882a593SmuzhiyunHOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
6*4882a593SmuzhiyunBUGTRACKER = "https://bugs.g10code.com/gnupg/index"
7*4882a593SmuzhiyunSECTION = "libs"
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun# helper program gcryptrnd and getrandom are under GPL, rest LGPL
10*4882a593SmuzhiyunLICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & GPL-3.0-or-later"
11*4882a593SmuzhiyunLICENSE:${PN} = "LGPL-2.1-or-later"
12*4882a593SmuzhiyunLICENSE:${PN}-dev = "GPL-2.0-or-later & LGPL-2.1-or-later"
13*4882a593SmuzhiyunLICENSE:dumpsexp-dev = "GPL-3.0-or-later"
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
16*4882a593Smuzhiyun                    file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \
17*4882a593Smuzhiyun                    file://LICENSES;md5=42fa35a25e138166cc40588387f9159d \
18*4882a593Smuzhiyun                    "
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunDEPENDS = "libgpg-error"
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunUPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
23*4882a593SmuzhiyunSRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \
24*4882a593Smuzhiyun           file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \
25*4882a593Smuzhiyun           file://0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch \
26*4882a593Smuzhiyun           file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
27*4882a593Smuzhiyun           file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
28*4882a593Smuzhiyun           file://0001-Makefile.am-add-a-missing-space.patch \
29*4882a593Smuzhiyun           "
30*4882a593SmuzhiyunSRC_URI[sha256sum] = "ea849c83a72454e3ed4267697e8ca03390aee972ab421e7df69dfe42b65caaf7"
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun# Below whitelisted CVEs are disputed and not affecting crypto libraries for any distro.
33*4882a593SmuzhiyunCVE_CHECK_IGNORE += "CVE-2018-12433 CVE-2018-12438"
34*4882a593Smuzhiyun
35*4882a593SmuzhiyunBINCONFIG = "${bindir}/libgcrypt-config"
36*4882a593Smuzhiyun
37*4882a593Smuzhiyuninherit autotools texinfo binconfig-disabled pkgconfig
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunEXTRA_OECONF = "--disable-asm"
40*4882a593SmuzhiyunEXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunPACKAGECONFIG ??= "capabilities"
43*4882a593SmuzhiyunPACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap"
44*4882a593Smuzhiyun
45*4882a593Smuzhiyundo_configure:prepend () {
46*4882a593Smuzhiyun	# Else this could be used in preference to the one in aclocal-copy
47*4882a593Smuzhiyun	rm -f ${S}/m4/gpg-error.m4
48*4882a593Smuzhiyun}
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun# libgcrypt.pc is added locally and thus installed here
51*4882a593Smuzhiyundo_install:append() {
52*4882a593Smuzhiyun	install -d ${D}/${libdir}/pkgconfig
53*4882a593Smuzhiyun	install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
54*4882a593Smuzhiyun}
55*4882a593Smuzhiyun
56*4882a593SmuzhiyunPACKAGES =+ "dumpsexp-dev"
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunFILES:${PN}-dev += "${bindir}/hmac256"
59*4882a593SmuzhiyunFILES:dumpsexp-dev += "${bindir}/dumpsexp"
60*4882a593Smuzhiyun
61*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk"
62