Skip to content

Commit 83ba7fe

Browse files
committed
botan: update from 3.2.0 to 3.6.1
1 parent 2b7c423 commit 83ba7fe

File tree

3 files changed

+70
-26
lines changed

3 files changed

+70
-26
lines changed

recipes-crypto/botan/botan/0001-botan-test-set-absoulte-path-for-tests-data.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ Signed-off-by: Ayoub Zaki <ayoub.zaki@embetrix.com>
99
1 file changed, 1 insertion(+), 1 deletion(-)
1010

1111
diff --git a/src/tests/main.cpp b/src/tests/main.cpp
12-
index 3e08a2715..b87c3a594 100644
12+
index 8030af25d..73e8b8ad6 100644
1313
--- a/src/tests/main.cpp
1414
+++ b/src/tests/main.cpp
15-
@@ -85,7 +85,7 @@ int main(int argc, char* argv[]) {
15+
@@ -88,7 +88,7 @@ int main(int argc, char* argv[]) {
1616

1717
const Botan_Tests::Test_Options opts(parser.get_arg_list("suites"),
1818
parser.get_arg_list("skip-tests"),
1919
- parser.get_arg_or("data-dir", "src/tests/data"),
2020
+ parser.get_arg_or("data-dir", "/usr/share/botan/tests/data"),
2121
parser.get_arg("pkcs11-lib"),
2222
parser.get_arg("provider"),
23-
parser.get_arg("drbg-seed"),
24-
--
23+
parser.get_arg("tpm2-tcti-name"),
24+
2525
2.43.0
2626

recipes-crypto/botan/botan_%.bbappend

-22
This file was deleted.

recipes-crypto/botan/botan_3.6.1.bb

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
SUMMARY = "Crypto and TLS for C++11"
2+
HOMEPAGE = "https://botan.randombit.net"
3+
LICENSE = "BSD-2-Clause"
4+
LIC_FILES_CHKSUM = "file://license.txt;md5=573e74513ae3057b04757df65b537de0"
5+
SECTION = "libs"
6+
7+
SRC_URI = "https://botan.randombit.net/releases/Botan-${PV}.tar.xz"
8+
SRC_URI:append = " file://0001-botan-test-set-absoulte-path-for-tests-data.patch"
9+
SRC_URI[sha256sum] = "7cb8575d88d232c77174769d7f9e24bb44444160585986eebd66e749cb9a9089"
10+
11+
S = "${WORKDIR}/Botan-${PV}"
12+
13+
inherit python3native siteinfo lib_package
14+
15+
CPU ?= "${TARGET_ARCH}"
16+
CPU:x86 = "x86_32"
17+
CPU:armv7a = "armv7"
18+
CPU:armv7ve = "armv7"
19+
20+
do_configure() {
21+
python3 ${S}/configure.py \
22+
--prefix="${exec_prefix}" \
23+
--libdir="${libdir}" \
24+
--cpu="${CPU}" \
25+
--cc-bin="${CXX}" \
26+
--cxxflags="${CXXFLAGS}" \
27+
--ldflags="${LDFLAGS}" \
28+
--with-endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
29+
${@bb.utils.contains("TUNE_FEATURES","neon","","--disable-neon",d)} \
30+
--with-sysroot-dir=${STAGING_DIR_HOST} \
31+
--with-build-dir="${B}" \
32+
--optimize-for-size \
33+
--with-stack-protector \
34+
--enable-shared-library \
35+
--with-python-versions=3 \
36+
${EXTRA_OECONF}
37+
}
38+
39+
do_compile() {
40+
oe_runmake
41+
}
42+
do_install() {
43+
oe_runmake DESTDIR=${D} install
44+
sed -i -e 's|${WORKDIR}|<scrubbed>|g' ${D}${includedir}/botan-3/botan/build.h
45+
46+
# Add botan binary and test tool
47+
install -d ${D}${bindir}
48+
install -d ${D}${datadir}/${PN}/tests/data
49+
install -m 0755 ${B}/botan-test ${D}${bindir}
50+
cp -R --no-dereference --preserve=mode,links -v ${B}/src/tests/data/* ${D}${datadir}/${PN}/tests/data/
51+
}
52+
53+
PACKAGES += "${PN}-test ${PN}-python3"
54+
55+
FILES:${PN}-python3 = "${libdir}/python3"
56+
57+
RDEPENDS:${PN}-python3 += "python3"
58+
RDEPENDS:${PN}-bin += "${PN}"
59+
RDEPENDS:${PN}-test += "${PN}"
60+
FILES:${PN}:remove = "${bindir}/*"
61+
FILES:${PN}-bin:remove = "${bindir}/*"
62+
FILES:${PN}-bin = "${bindir}/botan"
63+
FILES:${PN}-test = "${bindir}/botan-test ${datadir}/${PN}/tests/data"
64+
COMPATIBLE_HOST:riscv32 = "null"
65+
66+
BBCLASSEXTEND = "native nativesdk"

0 commit comments

Comments
 (0)