# Contributor: Holger Jaekel maintainer="fossdd " pkgname=aws-c-common pkgver=0.12.2 pkgrel=0 pkgdesc="Core c99 package for AWS SDK for C including cross-platform primitives, configuration, data structures, and error handling" url="https://github.com/awslabs/aws-c-common" # s390x: fails tests arch="all !s390x" license="Apache-2.0" makedepends=" cmake python3-dev samurai " subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/awslabs/aws-c-common/archive/refs/tags/v$pkgver.tar.gz" build() { if [ "$CBUILD" != "$CHOST" ]; then local crossopts="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi CFLAGS="$CFLAGS -flto=auto" \ CXXFLAGS="$CXXFLAGS -flto=auto" \ cmake -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=None \ -DBUILD_TESTING="$(want_check && echo ON || echo OFF)" \ $crossopts cmake --build build } check() { ctest --test-dir build } package() { DESTDIR="$pkgdir" cmake --install build } sha512sums=" 455daa7bde70f595afd0984580422c08e77734c531fc06824e2fd49ac4d0704c70fae2ed16e4689bae3d49da6adc3e6333e26da1f3b856188c4a937a8889004d aws-c-common-0.12.2.tar.gz "