Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1 | # Copyright (C) 2018 Khem Raj <raj.khem@gmail.com> |
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) |
| 3 | |
| 4 | DESCRIPTION = "Crypto and TLS for C++11" |
| 5 | HOMEPAGE = "https://botan.randombit.net" |
| 6 | LICENSE = "BSD-2-Clause" |
| 7 | LIC_FILES_CHKSUM = "file://license.txt;md5=f4c145d4d70a3244a053c9f90d4841fc" |
| 8 | SECTION = "libs" |
| 9 | |
| 10 | SRC_URI = "https://botan.randombit.net/releases/Botan-${PV}.tgz" |
| 11 | SRC_URI[md5sum] = "db8403d6a2f10c20fde3f3c76be9a045" |
| 12 | SRC_URI[sha256sum] = "305564352334dd63ae63db039077d96ae52dfa57a3248871081719b6a9f2d119" |
| 13 | |
| 14 | S = "${WORKDIR}/Botan-${PV}" |
| 15 | |
| 16 | inherit python3native siteinfo lib_package |
| 17 | |
| 18 | CPU ?= "${TARGET_ARCH}" |
| 19 | CPU_x86 = "x86_32" |
| 20 | CPU_armv7a = "armv7" |
| 21 | CPU_armv7ve = "armv7" |
| 22 | |
| 23 | do_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 | |
| 41 | do_compile() { |
| 42 | oe_runmake |
| 43 | } |
| 44 | do_install() { |
| 45 | oe_runmake install |
| 46 | sed -i -e "s|${D}||g" ${D}${libdir}/pkgconfig/botan-2.pc |
| 47 | } |
| 48 | |
| 49 | PACKAGES += "${PN}-python3" |
| 50 | |
| 51 | FILES_${PN}-python3 = "${libdir}/python3" |
| 52 | |
| 53 | RDEPENDS_${PN}-python3 += "python3" |