Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | SUMMARY = "A low level cryptographic library" |
| 2 | DESCRIPTION = "Nettle is a cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space." |
| 3 | HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/" |
| 4 | DESCRIPTION = "It tries to solve a problem of providing a common set of \ |
| 5 | cryptographic algorithms for higher-level applications by implementing a \ |
| 6 | context-independent set of cryptographic algorithms" |
| 7 | SECTION = "libs" |
| 8 | LICENSE = "LGPL-3.0-or-later | GPL-2.0-or-later" |
| 9 | |
| 10 | LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \ |
| 11 | file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
| 12 | file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \ |
| 13 | file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e" |
| 14 | |
| 15 | DEPENDS += "gmp" |
| 16 | |
| 17 | SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ |
| 18 | file://Add-target-to-only-build-tests-not-run-them.patch \ |
| 19 | file://run-ptest \ |
| 20 | file://check-header-files-of-openssl-only-if-enable_.patch \ |
| 21 | " |
| 22 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 23 | SRC_URI[sha256sum] = "ccfeff981b0ca71bbd6fbcb054f407c60ffb644389a5be80d6716d5b550c6ce3" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 24 | |
| 25 | UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar" |
| 26 | |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 27 | inherit autotools ptest multilib_header lib_package |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 28 | |
| 29 | EXTRA_AUTORECONF += "--exclude=aclocal" |
| 30 | |
| 31 | EXTRA_OECONF = "--disable-openssl" |
| 32 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 33 | EXTRA_OECONF:append:armv7a = "${@bb.utils.contains("TUNE_FEATURES","neon",""," --disable-arm-neon --disable-fat",d)}" |
| 34 | EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains("TUNE_FEATURES","neon",""," --disable-arm-neon --disable-fat",d)}" |
| 35 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 36 | do_compile_ptest() { |
| 37 | oe_runmake buildtest |
| 38 | } |
| 39 | |
| 40 | do_install:append() { |
| 41 | oe_multilib_header nettle/version.h |
| 42 | } |
| 43 | |
| 44 | do_install_ptest() { |
| 45 | install -d ${D}${PTEST_PATH}/testsuite/ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 46 | install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 47 | install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ |
| 48 | install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/ |
| 49 | |
| 50 | # Install a symlink for dlopen-test |
| 51 | ln -sr ${D}${libdir}/libnettle.so.*.* ${D}${PTEST_PATH}/libnettle.so |
| 52 | # These examples are needed for pkcs1-conv-test |
| 53 | install ${B}/examples/rsa-sign ${B}/examples/rsa-verify ${D}${PTEST_PATH}/testsuite/ |
| 54 | # Fix build-time relative paths |
| 55 | sed -i -e 's|../tools/|${bindir}/|g' ${D}${PTEST_PATH}/testsuite/*-test |
| 56 | sed -i -e 's|../examples/|./|g' ${D}${PTEST_PATH}/testsuite/*-test |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 57 | } |
| 58 | |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 59 | RDEPENDS:${PN}-ptest += "${PN}-bin" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 60 | |
| 61 | BBCLASSEXTEND = "native nativesdk" |