# Maintainer: Carl Smedstad # Maintainer: László Várady # Contributor: Aleksandar Trifunović pkgname=fizz pkgver=2024.04.22.00 pkgrel=1 pkgdesc="C++14 implementation of the TLS-1.3 standard" arch=(x86_64) url="https://github.com/facebookincubator/fizz" license=(BSD-3-Clause) depends=( double-conversion fmt folly gcc-libs gflags glibc google-glog libsodium openssl zlib zstd ) makedepends=( boost cmake gtest ) provides=( libfizz.so libfizz_test_support.so ) source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") sha256sums=('2dbd517efb9fe88335d49ffac6793d3e3c7156c47e1b228cccc541b4a314a67f') _archive="$pkgname-$pkgver" prepare() { cd "$_archive/fizz" # Use system CMake config instead of bundled module, incompatible with glog # v0.7.0+ sed -i 's/find_package(Glog REQUIRED)/find_package(Glog CONFIG REQUIRED)/' \ CMakeLists.txt } build() { cd "$_archive/fizz" cmake -S . -B build \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -Wno-dev \ -DBUILD_TESTS=ON \ -DBUILD_SHARED_LIBS=ON \ -DPACKAGE_VERSION="$pkgver" cmake --build build } check() { cd "$_archive/fizz" # Skip failing tests - not sure why they fail local skipped_tests=( DefaultCertificateVerifierTest SlidingBloomReplayCacheTest ) local skipped_tests_pattern="${skipped_tests[0]}$(printf "|%s" "${skipped_tests[@]:1}")" ctest --test-dir build --output-on-failure -E "$skipped_tests_pattern" } package() { cd "$_archive" DESTDIR="$pkgdir" cmake --install "$pkgname/build" # Remove empty directories to avoid namcap warnings rm -r "$pkgdir/usr/include/fizz/tool/test" rm -r "$pkgdir/usr/include/fizz/util/test" install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE }