blob: c41667b4534156fdd80cf39228d9bb1fb463f467 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001SUMMARY = "Crypto and TLS for C++11"
2HOMEPAGE = "https://botan.randombit.net"
3LICENSE = "BSD-2-Clause"
4LIC_FILES_CHKSUM = "file://license.txt;md5=a02e03c8fa2c5e7b9b3fcc1b9811fd3b"
5SECTION = "libs"
6
7SRC_URI = "https://botan.randombit.net/releases/Botan-${PV}.tar.xz"
8SRC_URI[sha256sum] = "541a3b13f1b9d30f977c6c1ae4c7bfdfda763cda6e44de807369dce79f42307e"
9
10S = "${WORKDIR}/Botan-${PV}"
11
12inherit python3native siteinfo lib_package
13
14CPU ?= "${TARGET_ARCH}"
15CPU:x86 = "x86_32"
16CPU:armv7a = "armv7"
17CPU:armv7ve = "armv7"
18
19do_configure() {
20 python3 ${S}/configure.py \
21 --prefix="${D}${exec_prefix}" \
22 --libdir="${D}${libdir}" \
23 --cpu="${CPU}" \
24 --cc-bin="${CXX}" \
25 --cxxflags="${CXXFLAGS}" \
26 --ldflags="${LDFLAGS}" \
27 --with-endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
28 ${@bb.utils.contains("TUNE_FEATURES","neon","","--disable-neon",d)} \
29 --with-sysroot-dir=${STAGING_DIR_HOST} \
30 --with-build-dir="${B}" \
31 --optimize-for-size \
32 --with-stack-protector \
33 --enable-shared-library \
34 --with-python-versions=3 \
35 ${EXTRA_OECONF}
36}
37
38do_compile() {
39 oe_runmake
40}
41do_install() {
42 oe_runmake install
43 sed -i -e "s|${D}||g" ${D}${libdir}/pkgconfig/botan-2.pc
44}
45
46PACKAGES += "${PN}-python3"
47
48FILES:${PN}-python3 = "${libdir}/python3"
49
50RDEPENDS:${PN}-python3 += "python3"
51
52COMPATIBLE_HOST:riscv32 = "null"