blob: a7d25d5674ff3fb8f5f8c0013e95e909c9d77412 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4DESCRIPTION = "Crypto and TLS for C++11"
5HOMEPAGE = "https://botan.randombit.net"
6LICENSE = "BSD-2-Clause"
7LIC_FILES_CHKSUM = "file://license.txt;md5=f4c145d4d70a3244a053c9f90d4841fc"
8SECTION = "libs"
9
10SRC_URI = "https://botan.randombit.net/releases/Botan-${PV}.tgz"
11SRC_URI[md5sum] = "db8403d6a2f10c20fde3f3c76be9a045"
12SRC_URI[sha256sum] = "305564352334dd63ae63db039077d96ae52dfa57a3248871081719b6a9f2d119"
13
14S = "${WORKDIR}/Botan-${PV}"
15
16inherit python3native siteinfo lib_package
17
18CPU ?= "${TARGET_ARCH}"
19CPU_x86 = "x86_32"
20CPU_armv7a = "armv7"
21CPU_armv7ve = "armv7"
22
23do_configure() {
24 python3 ${S}/configure.py \
25 --prefix="${D}${prefix}" \
26 --cpu="${CPU}" \
27 --cc-bin="${CXX}" \
28 --cxxflags="${CXXFLAGS}" \
29 --ldflags="${LDFLAGS}" \
30 --with-endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
31 ${@bb.utils.contains("TUNE_FEATURES","neon","","--disable-neon",d)} \
32 --with-sysroot-dir=${STAGING_DIR_TARGET} \
33 --with-build-dir="${B}" \
34 --optimize-for-size \
35 --with-stack-protector \
36 --enable-shared-library \
37 --with-python-versions=3 \
38 ${EXTRA_OECONF}
39}
40
41do_compile() {
42 oe_runmake
43}
44do_install() {
45 oe_runmake install
46 sed -i -e "s|${D}||g" ${D}${libdir}/pkgconfig/botan-2.pc
47}
48
49PACKAGES += "${PN}-python3"
50
51FILES_${PN}-python3 = "${libdir}/python3"
52
53RDEPENDS_${PN}-python3 += "python3"