# Maintainer: Patrick Gansterer pkgname=thrift pkgver=0.18.1 pkgrel=2 pkgdesc="Language-independent software stack for RPC implementation" url="https://thrift.apache.org/" arch="all" license="Apache-2.0" depends_dev="$pkgname=$pkgver-r$pkgrel" makedepends=" bison boost-dev cmake flex glib-dev libevent-dev qt5-qtbase-dev openssl-dev samurai zlib-dev " subpackages=" $pkgname-dev lib$pkgname:lib lib${pkgname}nb:libnb lib${pkgname}z:libz lib$pkgname-glib:libglib lib$pkgname-qt:libqt " source="$pkgname-$pkgver.tar.gz::https://github.com/apache/thrift/archive/v$pkgver.tar.gz skip-old-tls-tests.patch " # secfixes: # 0.14.0-r0: # - CVE-2020-13949 build() { cmake -B _build -G Ninja \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_SHARED_LIBS=ON \ -DWITH_AS3=OFF \ -DWITH_JAVA=OFF \ -DWITH_JAVASCRIPT=OFF \ -DWITH_NODEJS=OFF \ -DWITH_PYTHON=OFF cmake --build _build } check() { local skipped_tests="(" local tests=" testdebugproto " case "$CARCH" in aarch64) tests=" $tests testthriftbinaryreadcheck testthriftframedreadcheck ";; s390x) tests=" $tests testthriftbinaryreadcheck testthriftcompactreadcheck ";; esac for test in $tests; do skipped_tests="$skipped_tests|$test" done skipped_tests="$skipped_tests)" ctest --test-dir _build --output-on-failure -E "$skipped_tests" } package() { DESTDIR="$pkgdir" cmake --install _build } lib() { amove usr/lib/libthrift.so.* } libglib() { amove usr/lib/libthrift_c_glib*.so.* } libnb() { amove usr/lib/libthriftnb.so.* } libqt() { amove usr/lib/libthriftqt5.so.* } libz() { amove usr/lib/libthriftz.so.* } sha512sums=" 16d1863e1eceb7b35e74d52aa14aab81641e779a3ed5cb668ef25e72d4a7adc2d7574d1597c07d779ea42e9f3240ac44446eef819bbfed0f7a2f6380f755f534 thrift-0.18.1.tar.gz 09c9dd046e66ce8897580db3671180ef44520c53a151cd2f2cd9db7900245f3c7b14a58de5842e1e785497a6f0348d2161af29affd06d041234bcf3a91870b8d skip-old-tls-tests.patch "