From f29d569cd33a73da5ad675f43a34ad53c5cc9bc6 Mon Sep 17 00:00:00 2001 From: davidovski Date: Thu, 2 Feb 2023 14:10:02 +0000 Subject: Work --- repo/mbedtls/mbedtls.xibuild | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 repo/mbedtls/mbedtls.xibuild (limited to 'repo/mbedtls/mbedtls.xibuild') diff --git a/repo/mbedtls/mbedtls.xibuild b/repo/mbedtls/mbedtls.xibuild new file mode 100644 index 0000000..4bcda20 --- /dev/null +++ b/repo/mbedtls/mbedtls.xibuild @@ -0,0 +1,36 @@ +#!/bin/sh + +NAME="mbedtls" +DESC="Light-weight cryptographic and SSL/TLS library" + +MAKEDEPS=" cmake perl python ninja" + +PKG_VER=2.28.1 +SOURCE="https://github.com/ARMmbed/mbedtls/archive/v$PKG_VER.tar.gz" + +prepare() { + # Enable flags for non-embedded systems. + sed -i \ + -e 's|//\(#define MBEDTLS_THREADING_C\)|\1|' \ + -e 's|//\(#define MBEDTLS_THREADING_PTHREAD\)|\1|' \ + "$BUILD_ROOT"/include/mbedtls/config.h +} + +build() { + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE="MinSizeRel" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DUSE_SHARED_MBEDTLS_LIBRARY=ON + cmake --build build +} + +check() { + cd build + CTEST_OUTPUT_ON_FAILURE=TRUE ctest + cd .. +} + +package() { + DESTDIR="$PKG_DEST" cmake --install build +} -- cgit v1.2.1