summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/nettle
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/nettle')
-rw-r--r--meta/recipes-support/nettle/nettle/dlopen-test.patch29
-rw-r--r--meta/recipes-support/nettle/nettle/run-ptest40
-rw-r--r--meta/recipes-support/nettle/nettle_3.9.1.bb (renamed from meta/recipes-support/nettle/nettle_3.7.1.bb)33
3 files changed, 41 insertions, 61 deletions
diff --git a/meta/recipes-support/nettle/nettle/dlopen-test.patch b/meta/recipes-support/nettle/nettle/dlopen-test.patch
deleted file mode 100644
index ab9b91f88b..0000000000
--- a/meta/recipes-support/nettle/nettle/dlopen-test.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1Remove the relative path for libnettle.so so the test
2program can find it.
3Relative paths are not suitable, as the folder strucure for ptest
4is different from the one expected by the nettle testsuite.
5
6Upstream-Status: Inappropriate [embedded specific]
7
8Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
9Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
10---
11 testsuite/dlopen-test.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/testsuite/dlopen-test.c b/testsuite/dlopen-test.c
15index 4265bf7..1a25d17 100644
16--- a/testsuite/dlopen-test.c
17+++ b/testsuite/dlopen-test.c
18@@ -15,7 +15,7 @@ int
19 main (int argc UNUSED, char **argv UNUSED)
20 {
21 #if HAVE_LIBDL
22- void *handle = dlopen ("../libnettle." SO_EXT, RTLD_NOW);
23+ void *handle = dlopen ("libnettle.so", RTLD_NOW);
24 int (*get_version)(void);
25 if (!handle)
26 {
27--
282.17.1
29
diff --git a/meta/recipes-support/nettle/nettle/run-ptest b/meta/recipes-support/nettle/nettle/run-ptest
index b90bed66d2..61a43c78f1 100644
--- a/meta/recipes-support/nettle/nettle/run-ptest
+++ b/meta/recipes-support/nettle/nettle/run-ptest
@@ -6,31 +6,35 @@ failed=0
6all=0 6all=0
7 7
8for f in *-test; do 8for f in *-test; do
9 if [ "$f" = "sha1-huge-test" ] ; then 9 case "$f" in
10 echo "SKIP: $f (skipped for ludicrous run time)" 10 "sha1-huge-test")
11 continue 11 echo "SKIP: $f (long run time)"
12 fi
13
14 "./$f"
15 case "$?" in
16 0)
17 echo "PASS: $f"
18 all=$((all + 1))
19 ;; 12 ;;
20 77) 13 "symbols-test")
21 echo "SKIP: $f" 14 echo "SKIP: $f (needs static libraries)"
22 ;; 15 ;;
23 *) 16 *)
24 echo "FAIL: $f" 17 "./$f"
25 failed=$((failed + 1)) 18 case "$?" in
26 all=$((all + 1)) 19 0)
20 echo "PASS: $f"
21 all=$((all + 1))
22 ;;
23 77)
24 echo "SKIP: $f"
25 ;;
26 *)
27 echo "FAIL: $f"
28 failed=$((failed + 1))
29 all=$((all + 1))
30 ;;
31 esac
27 ;; 32 ;;
28 esac 33 esac
29done 34done
30 35
31if [ "$failed" -eq 0 ] ; then 36if [ "$failed" -eq 0 ] ; then
32 echo "All $all tests passed" 37 echo "All $all tests passed"
33else 38else
34 echo "$failed of $all tests failed" 39 echo "$failed of $all tests failed"
35fi 40fi
36
diff --git a/meta/recipes-support/nettle/nettle_3.7.1.bb b/meta/recipes-support/nettle/nettle_3.9.1.bb
index d6bb1c84c6..396708cf87 100644
--- a/meta/recipes-support/nettle/nettle_3.7.1.bb
+++ b/meta/recipes-support/nettle/nettle_3.9.1.bb
@@ -1,10 +1,11 @@
1SUMMARY = "A low level cryptographic library" 1SUMMARY = "A low level cryptographic library"
2DESCRIPTION = "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."
2HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/" 3HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
3DESCRIPTION = "It tries to solve a problem of providing a common set of \ 4DESCRIPTION = "It tries to solve a problem of providing a common set of \
4cryptographic algorithms for higher-level applications by implementing a \ 5cryptographic algorithms for higher-level applications by implementing a \
5context-independent set of cryptographic algorithms" 6context-independent set of cryptographic algorithms"
6SECTION = "libs" 7SECTION = "libs"
7LICENSE = "LGPLv3+ | GPLv2+" 8LICENSE = "LGPL-3.0-or-later | GPL-2.0-or-later"
8 9
9LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \ 10LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
10 file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 11 file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
@@ -19,38 +20,42 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
19 file://check-header-files-of-openssl-only-if-enable_.patch \ 20 file://check-header-files-of-openssl-only-if-enable_.patch \
20 " 21 "
21 22
22SRC_URI_append_class-target = "\ 23SRC_URI[sha256sum] = "ccfeff981b0ca71bbd6fbcb054f407c60ffb644389a5be80d6716d5b550c6ce3"
23 file://dlopen-test.patch \
24 "
25
26SRC_URI[sha256sum] = "156621427c7b00a75ff9b34b770b95d34f80ef7a55c3407de94b16cbf436c42e"
27 24
28UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar" 25UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
29 26
30inherit autotools ptest multilib_header 27inherit autotools ptest multilib_header lib_package
31 28
32EXTRA_AUTORECONF += "--exclude=aclocal" 29EXTRA_AUTORECONF += "--exclude=aclocal"
33 30
34EXTRA_OECONF = "--disable-openssl" 31EXTRA_OECONF = "--disable-openssl"
35 32
33EXTRA_OECONF:append:armv7a = "${@bb.utils.contains("TUNE_FEATURES","neon",""," --disable-arm-neon --disable-fat",d)}"
34EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains("TUNE_FEATURES","neon",""," --disable-arm-neon --disable-fat",d)}"
35
36do_compile_ptest() { 36do_compile_ptest() {
37 oe_runmake buildtest 37 oe_runmake buildtest
38} 38}
39 39
40do_install_append() { 40do_install:append() {
41 oe_multilib_header nettle/version.h 41 oe_multilib_header nettle/version.h
42} 42}
43 43
44do_install_ptest() { 44do_install_ptest() {
45 install -d ${D}${PTEST_PATH}/testsuite/ 45 install -d ${D}${PTEST_PATH}/testsuite/
46 install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/
47 install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
48 # tools can be found in PATH, not in ../tools/
49 sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test
50 install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ 46 install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
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
51} 57}
52 58
53RDEPENDS_${PN}-ptest += "${PN}-dev" 59RDEPENDS:${PN}-ptest += "${PN}-bin"
54INSANE_SKIP_${PN}-ptest += "dev-deps"
55 60
56BBCLASSEXTEND = "native nativesdk" 61BBCLASSEXTEND = "native nativesdk"