summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 47aa9347a957a18c1be11c59f0abc4aba32792b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Maintainer: Carl Smedstad <carsme@archlinux.org>
# Maintainer: László Várady <laszlo.varady93@gmail.com>
# Contributor: envolution
# Contributor: Aleksandar Trifunović <akstrfn at gmail dot com>
# Contributor: Daichi Shinozaki <dsdseg at gmail dot com>
# shellcheck shell=bash disable=SC2034,SC2154

pkgname=wangle
pkgver=2025.07.28.00
pkgrel=1
pkgdesc="C++ networking library providing client/server abstractions for building services"
arch=(x86_64)
url="https://github.com/facebook/wangle"
license=(Apache-2.0)
depends=(
  double-conversion
  fizz=$pkgver
  fmt
  folly=$pkgver
  gcc-libs
  gflags
  glibc
  google-glog
  openssl
)
makedepends=(
  boost
  cmake
  gtest
)
checkdepends=(expat)
provides=(libwangle.so)
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('9e18b2edcb4051c3acfdf153c79440b9aa23e5cf1fd277811b35f227184a6139')

prepare() {
  cd $pkgname-$pkgver
  # 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)/' \
    wangle/CMakeLists.txt
}

build() {
  cd $pkgname-$pkgver
  cmake -S wangle -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 $pkgname-$pkgver
  skip_tests=(
    SSLContextManagerTest
    BootstrapTest
  )
  ctest --test-dir build --output-on-failure -E "$(IFS='|'; echo "${skip_tests[*]}")"
  ctest "$skipped_tests_pattern"
}

package() {
  cd $pkgname-$pkgver
  DESTDIR="$pkgdir" cmake --install build

  # Remove empty directories to avoid namcap warnings
  rm -vr "$pkgdir/usr/include/wangle/service/test"
  rm -vr "$pkgdir/usr/include/wangle/ssl/test/certs"
  rm -vr "$pkgdir/usr/include/wangle/util/test"
}
# vim:set ts=2 sw=2 et: