summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Smedstad2024-03-24 18:02:11 +0100
committerCarl Smedstad2024-04-04 19:24:18 +0200
commitf70ba859765e7fda2e4fd9bce8dbb7965ed2f936 (patch)
treeee5a8be4b3774b2524c40a7e3eda8c85f98129f2
parent9887f4c189c1d348333e9233ad1344d1d68a63be (diff)
downloadaur-f70ba859765e7fda2e4fd9bce8dbb7965ed2f936.tar.gz
upgpkg: 2024.04.01.00-1
-rw-r--r--.SRCINFO56
-rw-r--r--.gitignore6
-rw-r--r--.nvchecker.toml5
-rw-r--r--PKGBUILD130
-rw-r--r--remove-python-six-dependency-from-cmake-files.patch69
5 files changed, 220 insertions, 46 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 08ccd8579ed5..08a51062eae4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,27 +1,51 @@
pkgbase = fbthrift
- pkgdesc = Facebook's branch of Apache Thrift, including a new C++ server.
- pkgver = 2019.03.18.00
+ pkgdesc = Facebook's branch of Apache Thrift, including a new C++ server
+ pkgver = 2024.04.01.00
pkgrel = 1
url = https://github.com/facebook/fbthrift
- arch = i686
arch = x86_64
- license = Apache
+ license = Apache-2.0
+ makedepends = boost
makedepends = cmake
- makedepends = zstd
- makedepends = libunwind
+ makedepends = cython
+ makedepends = gtest
+ makedepends = mvfst
+ depends = boost-libs
+ depends = double-conversion
+ depends = fizz
+ depends = fmt
depends = folly
- depends = krb5
- depends = numactl
+ depends = gcc-libs
depends = gflags
+ depends = glibc
depends = google-glog
- depends = mstch
- depends = fizz
+ depends = openssl
+ depends = python
+ depends = python-six
depends = wangle
- depends = bison
- provides = thrift
- conflicts = thrift
- source = https://github.com/facebook/fbthrift/archive/v2019.03.18.00.tar.gz
- sha256sums = 2cf1667586ce94435d8d70989c03bbf0256bbb48731eadde450b768495ff20db
+ depends = zlib
+ provides = libasync.so
+ provides = libcompiler.so
+ provides = libcompiler_ast.so
+ provides = libconcurrency.so
+ provides = libmustache.so
+ provides = librpcmetadata.so
+ provides = libserverdbginfo.so
+ provides = libthrift-core.so
+ provides = libthriftannotation.so
+ provides = libthriftanyrep.so
+ provides = libthriftcpp2.so
+ provides = libthriftfrozen2.so
+ provides = libthriftmetadata.so
+ provides = libthriftprotocol.so
+ provides = libthrifttype.so
+ provides = libthrifttyperep.so
+ provides = libtransport.so
+ options = !emptydirs
+ options = !lto
+ source = fbthrift-2024.04.01.00.tar.gz::https://github.com/facebook/fbthrift/archive/v2024.04.01.00.tar.gz
+ source = remove-python-six-dependency-from-cmake-files.patch
+ sha256sums = e408a973a59a37def97a8e0ec368ee9fa39c8d49c925ecf7335f1c0463c1a819
+ sha256sums = bedcf4d00d08263a943d0878b9a0fe68c0fafebd33b5445ae35f84a3e92540ec
pkgname = fbthrift
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..5deb8ff05e23
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*
+!.gitignore
+!.nvchecker.toml
+!.SRCINFO
+!PKGBUILD
+!remove-python-six-dependency-from-cmake-files.patch
diff --git a/.nvchecker.toml b/.nvchecker.toml
new file mode 100644
index 000000000000..00558492030d
--- /dev/null
+++ b/.nvchecker.toml
@@ -0,0 +1,5 @@
+[fbthrift]
+source = "github"
+github = "facebook/fbthrift"
+prefix = "v"
+use_max_tag = true
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"
}
diff --git a/remove-python-six-dependency-from-cmake-files.patch b/remove-python-six-dependency-from-cmake-files.patch
new file mode 100644
index 000000000000..efca9071b48e
--- /dev/null
+++ b/remove-python-six-dependency-from-cmake-files.patch
@@ -0,0 +1,69 @@
+From cdb2197af6e79b4bc9253be998beeed8d73a79ee Mon Sep 17 00:00:00 2001
+From: Carl Smedstad <carl.smedstad@protonmail.com>
+Date: Thu, 4 Apr 2024 18:37:35 +0200
+Subject: [PATCH] Remove python-six dependency from CMake files
+
+---
+ CMakeLists.txt | 18 ------------------
+ thrift/cmake/FBThriftConfig.cmake.in | 3 ---
+ thrift/lib/py/CMakeLists.txt | 1 -
+ 3 files changed, 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c384f63a4b..3273e95ce5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -121,24 +121,6 @@ if (THRIFT_LIB_ONLY OR build_all)
+ find_program(THRIFT1 thrift1)
+ include(${THRIFT_COMPILER_INCLUDE}/thrift/ThriftLibrary.cmake)
+ endif ()
+-
+- find_package(python-six)
+- if("${thriftpy}" STREQUAL "AUTO")
+- if(python-six_FOUND)
+- message(STATUS
+- "Python dependencies found, enabling build of thrift/lib/py"
+- )
+- else()
+- message(STATUS
+- "Python dependencies not found, will not build thrift/lib/py"
+- )
+- endif()
+- set(thriftpy "${python-six_FOUND}")
+- elseif(thriftpy AND NOT python-six_FOUND)
+- message(FATAL_ERROR
+- "Unable to find python-six, but building thrift/lib/py was requested"
+- )
+- endif()
+ endif ()
+
+ if(thriftpy3)
+diff --git a/thrift/cmake/FBThriftConfig.cmake.in b/thrift/cmake/FBThriftConfig.cmake.in
+index 1d382218cf..161edeb4f7 100644
+--- a/thrift/cmake/FBThriftConfig.cmake.in
++++ b/thrift/cmake/FBThriftConfig.cmake.in
+@@ -49,9 +49,6 @@ set(FBThrift_cpp2_FOUND True)
+ # the output from the thrift compiler's "py" generator.
+ # (Note that this generator is deprecated in favor of the "py3" generator,)
+ set(FBThrift_py_FOUND @thriftpy@)
+-if(FBThrift_py_FOUND)
+- find_dependency(python-six)
+-endif()
+
+ set(FBThrift_FOUND True)
+ check_required_components(FBThrift)
+diff --git a/thrift/lib/py/CMakeLists.txt b/thrift/lib/py/CMakeLists.txt
+index 8ec4eeb340..81071d3ac2 100644
+--- a/thrift/lib/py/CMakeLists.txt
++++ b/thrift/lib/py/CMakeLists.txt
+@@ -51,7 +51,6 @@ add_fb_python_library(
+ thrift_py
+ SOURCES ${THRIFT_PY_SRCS}
+ NAMESPACE "thrift"
+- DEPENDS python-six::python-six
+ )
+ install_fb_python_library(
+ thrift_py
+--
+2.44.0
+