|
| 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