diff options
-rw-r--r-- | meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch | 18 | ||||
-rw-r--r-- | meta/recipes-support/libgcrypt/files/run-ptest | 8 | ||||
-rw-r--r-- | meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb | 19 |
3 files changed, 29 insertions, 16 deletions
diff --git a/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch b/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch new file mode 100644 index 0000000000..b9a607863d --- /dev/null +++ b/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | Don't depend on a native libgpg-error to build the test driver, as it's | ||
2 | an optional dependency for some C annotations. | ||
3 | |||
4 | Upstream-Status: Inappropriate | ||
5 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
6 | |||
7 | diff --git a/tests/testdrv.c b/tests/testdrv.c | ||
8 | index 0ccde326..6d6abd57 100644 | ||
9 | --- a/tests/testdrv.c | ||
10 | +++ b/tests/testdrv.c | ||
11 | @@ -32,7 +32,6 @@ | ||
12 | # include <fcntl.h> | ||
13 | # include <sys/wait.h> | ||
14 | #endif | ||
15 | -#include <gpg-error.h> /* For some macros. */ | ||
16 | |||
17 | #include "stopwatch.h" | ||
18 | |||
diff --git a/meta/recipes-support/libgcrypt/files/run-ptest b/meta/recipes-support/libgcrypt/files/run-ptest index 4818a061b4..c349ae1944 100644 --- a/meta/recipes-support/libgcrypt/files/run-ptest +++ b/meta/recipes-support/libgcrypt/files/run-ptest | |||
@@ -1,3 +1,9 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | make -C build/tests runtest-TESTS | 3 | # Run the tests in regression mode so they are quicker |
4 | export GCRYPT_IN_REGRESSION_TEST=1 | ||
5 | # The 'random' test invokes itself, so we need to be sure that the test | ||
6 | # directory is on PATH. | ||
7 | export PATH=$PATH:. | ||
8 | |||
9 | ./testdrv --verbose | ||
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb index 5047c9075f..b0d88de3aa 100644 --- a/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb +++ b/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb | |||
@@ -17,13 +17,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | |||
17 | " | 17 | " |
18 | 18 | ||
19 | DEPENDS = "libgpg-error" | 19 | DEPENDS = "libgpg-error" |
20 | RDEPENDS:${PN}-ptest = "bash make" | ||
21 | 20 | ||
22 | UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" | 21 | UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" |
23 | SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ | 22 | SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ |
24 | file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \ | 23 | file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \ |
25 | file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \ | 24 | file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \ |
26 | file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \ | 25 | file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \ |
26 | file://no-native-gpg-error.patch \ | ||
27 | file://run-ptest \ | 27 | file://run-ptest \ |
28 | " | 28 | " |
29 | SRC_URI[sha256sum] = "ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de" | 29 | SRC_URI[sha256sum] = "ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de" |
@@ -38,8 +38,6 @@ inherit autotools texinfo binconfig-disabled pkgconfig ptest | |||
38 | EXTRA_OECONF = "--disable-asm" | 38 | EXTRA_OECONF = "--disable-asm" |
39 | EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'" | 39 | EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'" |
40 | 40 | ||
41 | PRIVATE_LIBS:${PN}-ptest:append = " libgcrypt.so.20" | ||
42 | |||
43 | PACKAGECONFIG ??= "capabilities" | 41 | PACKAGECONFIG ??= "capabilities" |
44 | PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap" | 42 | PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap" |
45 | 43 | ||
@@ -49,18 +47,9 @@ do_configure:prepend () { | |||
49 | } | 47 | } |
50 | 48 | ||
51 | do_install_ptest() { | 49 | do_install_ptest() { |
52 | cp -r --preserve=mode,links -v ${S} ${D}${PTEST_PATH} | 50 | cd tests |
53 | cp -r --preserve=mode,links -v ${B} ${D}${PTEST_PATH} | 51 | oe_runmake testdrv-build testdrv |
54 | rm ${D}${PTEST_PATH}/build/cipher/gost-s-box | 52 | install testdrv $(srcdir=${S}/tests ./testdrv-build --files | sort | uniq) ${D}${PTEST_PATH} |
55 | rm ${D}${PTEST_PATH}/build/doc/yat2m | ||
56 | rm ${D}${PTEST_PATH}/build/libtool | ||
57 | rm ${D}${PTEST_PATH}/build/config.status | ||
58 | rm ${D}${PTEST_PATH}/build/config.log | ||
59 | rm ${D}${PTEST_PATH}/build/src/mpicalc | ||
60 | rm ${D}${PTEST_PATH}/${BP}/autom4te* -rf | ||
61 | sed -i -e 's/Makefile:.*/Makefile-disabled:/' ${D}${PTEST_PATH}/build/Makefile | ||
62 | find ${D}/${PTEST_PATH}/build -name "*.cmake" -or -name "Makefile" \ | ||
63 | | xargs sed -e "s|${WORKDIR}|${PTEST_PATH}|g" -e "s|${WORKDIR}/recipe-sysroot-native||g" -i | ||
64 | } | 53 | } |
65 | 54 | ||
66 | FILES:${PN}-dev += "${bindir}/hmac256 ${bindir}/dumpsexp" | 55 | FILES:${PN}-dev += "${bindir}/hmac256 ${bindir}/dumpsexp" |