Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [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=bf361fc63df3fa25652ee82c43b7601a" |
| 8 | SECTION = "libs" |
| 9 | |
| 10 | |
| 11 | #v2.7.0 |
| 12 | SRCREV = "5874000d42c338ec95a7ff24cdc0c64e70f967b5" |
| 13 | SRC_URI = "git://github.com/randombit/botan.git" |
| 14 | |
| 15 | S = "${WORKDIR}/git" |
| 16 | |
| 17 | inherit python3native siteinfo lib_package |
| 18 | |
| 19 | CPU ?= "${TARGET_ARCH}" |
| 20 | CPU_x86 = "x86_32" |
| 21 | CPU_armv7a = "armv7" |
| 22 | CPU_armv7ve = "armv7" |
| 23 | |
| 24 | do_configure() { |
| 25 | python3 ${S}/configure.py \ |
| 26 | --prefix="${D}${prefix}" \ |
| 27 | --cpu="${CPU}" \ |
| 28 | --cc-bin="${CXX}" \ |
| 29 | --cxxflags="${CXXFLAGS}" \ |
| 30 | --ldflags="${LDFLAGS}" \ |
| 31 | --with-endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ |
| 32 | ${@bb.utils.contains("TUNE_FEATURES","neon","","--disable-neon",d)} \ |
| 33 | --with-sysroot-dir=${STAGING_DIR_TARGET} \ |
| 34 | --with-build-dir="${B}" \ |
| 35 | --optimize-for-size \ |
| 36 | --with-stack-protector \ |
| 37 | --enable-shared-library \ |
| 38 | --with-python-versions=3 \ |
| 39 | ${EXTRA_OECONF} |
| 40 | } |
| 41 | |
| 42 | do_compile() { |
| 43 | oe_runmake |
| 44 | } |
| 45 | do_install() { |
| 46 | oe_runmake install |
| 47 | sed -i -e "s|${D}||g" ${D}${libdir}/pkgconfig/botan-2.pc |
| 48 | } |
| 49 | |
| 50 | PACKAGES += "${PN}-python3" |
| 51 | |
| 52 | FILES_${PN}-python3 = "${libdir}/python3" |
| 53 | |
| 54 | RDEPENDS_${PN}-python3 += "python3" |
| 55 | |