Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "General purpose cryptographic library based on the code from GnuPG" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 2 | DESCRIPTION = "A cryptography library developed as a separated module of GnuPG. \ |
| 3 | It can also be used independently of GnuPG, but depends on its error-reporting \ |
| 4 | library Libgpg-error." |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 5 | HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/" |
| 6 | BUGTRACKER = "https://bugs.g10code.com/gnupg/index" |
| 7 | SECTION = "libs" |
| 8 | |
| 9 | # helper program gcryptrnd and getrandom are under GPL, rest LGPL |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 10 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 11 | LICENSE:${PN} = "LGPL-2.1-or-later" |
| 12 | LICENSE:${PN}-dev = "GPL-2.0-or-later & LGPL-2.1-or-later" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 13 | |
| 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ |
| 15 | file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \ |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 16 | file://LICENSES;md5=ef545b6cc717747072616519a1256d69 \ |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 17 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 18 | |
| 19 | DEPENDS = "libgpg-error" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 20 | RDEPENDS:${PN}-ptest = "bash make" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 21 | |
| 22 | UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" |
| 23 | SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 24 | file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 25 | 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 Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 28 | file://run-ptest \ |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 29 | " |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 30 | SRC_URI[sha256sum] = "ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 32 | # Below whitelisted CVEs are disputed and not affecting crypto libraries for any distro. |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 33 | CVE_CHECK_IGNORE += "CVE-2018-12433 CVE-2018-12438" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 34 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 35 | BINCONFIG = "${bindir}/libgcrypt-config" |
| 36 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 37 | inherit autotools texinfo binconfig-disabled pkgconfig ptest |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 | |
| 39 | EXTRA_OECONF = "--disable-asm" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 41 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 42 | PRIVATE_LIBS:${PN}-ptest:append = " libgcrypt.so.20" |
| 43 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 44 | PACKAGECONFIG ??= "capabilities" |
| 45 | PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap" |
| 46 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 47 | do_configure:prepend () { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 48 | # Else this could be used in preference to the one in aclocal-copy |
| 49 | rm -f ${S}/m4/gpg-error.m4 |
| 50 | } |
| 51 | |
| 52 | # libgcrypt.pc is added locally and thus installed here |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | do_install:append() { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 54 | install -d ${D}/${libdir}/pkgconfig |
| 55 | install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/ |
| 56 | } |
| 57 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 58 | do_install_ptest() { |
| 59 | cp -r --preserve=mode,links -v ${S} ${D}${PTEST_PATH} |
| 60 | cp -r --preserve=mode,links -v ${B} ${D}${PTEST_PATH} |
| 61 | rm ${D}${PTEST_PATH}/build/cipher/gost-s-box |
| 62 | rm ${D}${PTEST_PATH}/build/doc/yat2m |
| 63 | rm ${D}${PTEST_PATH}/build/libtool |
| 64 | rm ${D}${PTEST_PATH}/build/config.status |
| 65 | rm ${D}${PTEST_PATH}/build/config.log |
| 66 | rm ${D}${PTEST_PATH}/build/src/mpicalc |
| 67 | rm ${D}${PTEST_PATH}/${BP}/autom4te* -rf |
| 68 | sed -i -e 's/Makefile:.*/Makefile-disabled:/' ${D}${PTEST_PATH}/build/Makefile |
| 69 | find ${D}/${PTEST_PATH}/build -name "*.cmake" -or -name "Makefile" \ |
| 70 | | xargs sed -e "s|${WORKDIR}|${PTEST_PATH}|g" -e "s|${WORKDIR}/recipe-sysroot-native||g" -i |
| 71 | } |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 72 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 73 | FILES:${PN}-dev += "${bindir}/hmac256 ${bindir}/dumpsexp" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 74 | |
| 75 | BBCLASSEXTEND = "native nativesdk" |