blob: 2c987f0a4a5bf10a993727c70b3bfdabdea88aab (
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
|
# Maintainer: Carl Smedstad <carsme@archlinux.org>
# Contributor: envolution
# shellcheck shell=bash disable=SC2034,SC2154
pkgname=fb303
pkgver=2025.10.27.00
pkgrel=1
pkgdesc="thrift functions that provide a mechanism for querying information from a service"
arch=(x86_64)
url="https://github.com/facebook/fb303"
license=(Apache-2.0)
depends=(
fbthrift=$pkgver
fmt
folly=$pkgver
gcc-libs
gflags
glibc
google-glog
python
)
makedepends=(
boost
cmake
mvfst=$pkgver
)
provides=(
libfb303.so
libfb303_thrift_cpp.so
)
options=(!lto)
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
pass-thrift-include-to-python.patch::https://patch-diff.githubusercontent.com/raw/facebook/fb303/pull/68.patch)
sha256sums=('f4153c508c91330fe720341037f8c95bb5ca744f69b903e1e3a2b6e3a250eff9'
'89ccb751f778b43d1eb4804eee1c041a5f9d8626d82034564300ee2bd4e731d9')
prepare() {
cd $pkgname-$pkgver
# Use system CMake config instead of bundled module
sed -i 's/find_package(Glog MODULE REQUIRED)/find_package(Glog CONFIG REQUIRED)/' \
CMakeLists.txt
patch -Np1 -i ../pass-thrift-include-to-python.patch
}
build() {
cd $pkgname-$pkgver
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_STANDARD=20 \
-Wno-dev \
-DBUILD_SHARED_LIBS=ON \
-DPYTHON_EXTENSIONS=ON \
-DThrift_INCLUDE_DIR=/usr/include \
-DPACKAGE_VERSION="$pkgver"
cmake --build build
}
check() {
cd $pkgname-$pkgver
ctest --test-dir build --output-on-failure
}
package() {
cd $pkgname-$pkgver
DESTDIR="$pkgdir" cmake --install build
# Remove empty dirs to silence namcap warnings
rm -vfr "$pkgdir/usr/include/fb303/test"
rm -vfr "$pkgdir/usr/include/fb303/thrift/clients"
rm -vfr "$pkgdir/usr/include/fb303/thrift/services"
}
# vim:set ts=2 sw=2 et:
|