summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCarl Smedstad2024-03-24 18:02:11 +0100
committerCarl Smedstad2024-04-04 19:24:18 +0200
commitf70ba859765e7fda2e4fd9bce8dbb7965ed2f936 (patch)
treeee5a8be4b3774b2524c40a7e3eda8c85f98129f2 /PKGBUILD
parent9887f4c189c1d348333e9233ad1344d1d68a63be (diff)
downloadaur-f70ba859765e7fda2e4fd9bce8dbb7965ed2f936.tar.gz
upgpkg: 2024.04.01.00-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD130
1 files changed, 100 insertions, 30 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a3c5860ffb47..3616077c3256 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,44 +1,114 @@
-# Maintainer: Aleksandar Trifunović <akstrfn at gmail dot com>
-# Contributor: Daichi Shinozaki <dsdseg@gmail.com>
+# Maintainer: Carl Smedstad <carsme@archlinux.org>
pkgname=fbthrift
-pkgver=2019.03.18.00
+pkgver=2024.04.01.00
pkgrel=1
-pkgdesc="Facebook's branch of Apache Thrift, including a new C++ server."
-arch=('i686' 'x86_64')
+pkgdesc="Facebook's branch of Apache Thrift, including a new C++ server"
+arch=(x86_64)
url="https://github.com/facebook/fbthrift"
-license=('Apache')
-depends=('folly' 'krb5' 'numactl' 'gflags' 'google-glog' 'mstch' 'fizz' 'wangle' 'bison')
-conflicts=('thrift')
-provides=('thrift')
-makedepends=('cmake' 'zstd' 'libunwind')
-source=("$url/archive/v${pkgver}.tar.gz")
-sha256sums=('2cf1667586ce94435d8d70989c03bbf0256bbb48731eadde450b768495ff20db')
+license=(Apache-2.0)
+depends=(
+ boost-libs
+ double-conversion
+ fizz
+ fmt
+ folly
+ gcc-libs
+ gflags
+ glibc
+ google-glog
+ openssl
+ python
+ python-six
+ wangle
+ zlib
+)
+makedepends=(
+ boost
+ cmake
+ cython
+ gtest
+ mvfst
+)
+provides=(
+ libasync.so
+ libcompiler.so
+ libcompiler_ast.so
+ libconcurrency.so
+ libmustache.so
+ librpcmetadata.so
+ libserverdbginfo.so
+ libthrift-core.so
+ libthriftannotation.so
+ libthriftanyrep.so
+ libthriftcpp2.so
+ libthriftfrozen2.so
+ libthriftmetadata.so
+ libthriftprotocol.so
+ libthrifttype.so
+ libthrifttyperep.so
+ libtransport.so
+)
+options=(
+ !emptydirs
+ !lto
+)
+source=(
+ "$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
+ "remove-python-six-dependency-from-cmake-files.patch"
+)
+sha256sums=(
+ 'e408a973a59a37def97a8e0ec368ee9fa39c8d49c925ecf7335f1c0463c1a819'
+ 'bedcf4d00d08263a943d0878b9a0fe68c0fafebd33b5445ae35f84a3e92540ec'
+)
+
+_archive="$pkgname-$pkgver"
prepare() {
- cd "$pkgname-$pkgver"
- cmake -H. -B_build \
- -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
- -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
- -DCMAKE_EXE_LINKER_FLAGS:STRING="${LDFLAGS}" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release
+ cd "$_archive"
+
+ patch --forward --strip=1 --input="$srcdir/remove-python-six-dependency-from-cmake-files.patch"
+
+ # 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 "$pkgname-$pkgver"
- cmake --build _build
+ cd "$_archive"
+
+ cmake -S . -B build \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -Wno-dev \
+ -Denable_tests=ON \
+ -DBUILD_SHARED_LIBS=ON \
+ -Dthriftpy3=OFF \
+ -Dthriftpy=ON \
+ -DCMAKE_CXX_STANDARD=20 \
+ -DHAVE_STREAM_SUPPORT=ON \
+ -DPACKAGE_VERSION="$pkgver"
+ cmake --build build
}
-# check() {
-# cd "$pkgname-$pkgver"
-# cmake --build _build -- test
-# }
+check() {
+ cd "$_archive"
+
+ ctest --test-dir build --output-on-failure
+}
package() {
- cd "$pkgname-$pkgver"
- cmake --build _build -- \
- PY_INSTALL_HOME="$pkgdir/usr" \
- PY_INSTALL_ARGS="--root '${pkgdir}' --prefix=/usr" \
- DESTDIR="$pkgdir" install
+ cd "$_archive"
+
+ DESTDIR="$pkgdir" cmake --install build
+
+ # Move Python extensions to site-packages
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ install -dm755 "$pkgdir/$site_packages/thrift"
+ mv -t "$pkgdir/$site_packages/thrift" \
+ "$pkgdir/usr/lib/fb-py-libs/thrift_py/thrift/"*
+ mv -t "$pkgdir/$site_packages/thrift/util" \
+ "$pkgdir/usr/lib/fb-py-libs/thrift_py_inspect/thrift/util/"*
+ rm -r "$pkgdir/usr/lib/fb-py-libs"
}