Skip to content

Commit

Permalink
thrift: update, patch
Browse files Browse the repository at this point in the history
  • Loading branch information
dkwo committed Jan 30, 2023
1 parent 97b6579 commit b42f89e
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 9 deletions.
17 changes: 17 additions & 0 deletions srcpkgs/thrift/patches/missing-signal-h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
From: https://git.alpinelinux.org/aports/plain/community/thrift/missing-signal-h.patch

Add missing include for signal.h
--- a/lib/cpp/test/TNonblockingSSLServerTest.cpp
+++ b/lib/cpp/test/TNonblockingSSLServerTest.cpp
@@ -30,6 +30,10 @@

#include <event.h>

+#ifdef __linux__
+#include <signal.h>
+#endif
+
using namespace apache::thrift;
using apache::thrift::concurrency::Guard;
using apache::thrift::concurrency::Monitor;

24 changes: 24 additions & 0 deletions srcpkgs/thrift/patches/musl-libc-locale.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From: https://git.alpinelinux.org/aports/plain/community/thrift/musl-libc-locale.patch

Skip tests using locale functionality
--- a/lib/cpp/test/ToStringTest.cpp
+++ b/lib/cpp/test/ToStringTest.cpp
@@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE(locale_en_US_int_to_string) {
#ifdef _WIN32
std::locale::global(std::locale("en-US.UTF-8"));
#else
- std::locale::global(std::locale("en_US.UTF-8"));
+ // musl libc has no locale support
#endif
BOOST_CHECK_EQUAL(to_string(1000000), "1000000");
}
@@ -58,7 +58,7 @@ BOOST_AUTO_TEST_CASE(locale_de_DE_floating_point_to_string) {
#ifdef _WIN32
std::locale::global(std::locale("de-DE.UTF-8"));
#else
- std::locale::global(std::locale("de_DE.UTF-8"));
+ // musl libc has no locale support
#endif
BOOST_CHECK_EQUAL(to_string(1.5), "1.5");
BOOST_CHECK_EQUAL(to_string(1.5f), "1.5");

44 changes: 44 additions & 0 deletions srcpkgs/thrift/patches/skip-old-tls-tests.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From: https://git.alpinelinux.org/aports/plain/community/thrift/skip-old-tls-tests.patch

Skip TLSv1_0 and TLSv1_1 test cases
--- a/lib/cpp/test/SecurityFromBufferTest.cpp
+++ b/lib/cpp/test/SecurityFromBufferTest.cpp
@@ -224,6 +224,16 @@ BOOST_AUTO_TEST_CASE(ssl_security_matrix) {
}
#endif

+ if (si == 3 || ci == 3) {
+ // Skip all TLSv1_0 cases - protocol not supported
+ continue;
+ }
+
+ if (si == 4 || ci == 4) {
+ // Skip all TLSv1_1 cases - protocol not supported
+ continue;
+ }
+
boost::mutex::scoped_lock lock(mMutex);

BOOST_TEST_MESSAGE(boost::format("TEST: Server = %1%, Client = %2%") % protocol2str(si)
--- a/lib/cpp/test/SecurityTest.cpp
+++ b/lib/cpp/test/SecurityTest.cpp
@@ -250,6 +250,18 @@ BOOST_AUTO_TEST_CASE(ssl_security_matrix)
}
#endif

+ if (si == 3 || ci == 3)
+ {
+ // Skip all TLSv1_0 cases - protocol not supported
+ continue;
+ }
+
+ if (si == 4 || ci == 4)
+ {
+ // Skip all TLSv1_1 cases - protocol not supported
+ continue;
+ }
+
boost::mutex::scoped_lock lock(mMutex);

BOOST_TEST_MESSAGE(boost::format("TEST: Server = %1%, Client = %2%")

23 changes: 14 additions & 9 deletions srcpkgs/thrift/template
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# Template file for 'thrift'
pkgname=thrift
version=0.13.0
revision=6
build_style=gnu-configure
configure_args="--without-python"
makedepends="boost-devel openssl-devel"
version=0.17.0
revision=1
build_style=cmake
configure_args="-DBUILD_SHARED_LIBS=ON
-DWITH_AS3=OFF
-DWITH_JAVA=OFF
-DWITH_JAVASCRIPT=OFF
-DWITH_NODEJS=OFF
-DWITH_PYTHON=OFF"
hostmakedepends="flex"
makedepends="boost-devel openssl-devel flex"
checkdepends="zlib-devel libevent-devel"
short_desc="Apache Thrift compiler"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://thrift.apache.org/"
distfiles="http://www-us.apache.org/dist/thrift/${version}/thrift-${version}.tar.gz"
checksum=7ad348b88033af46ce49148097afe354d513c1fca7c607b59c33ebb6064b5179
distfiles="https://github.com/apache/thrift/archive/v${version}.tar.gz"
checksum=54c30b6ac27d62aee29e8d07831c1c785bf7ed8cd351e84130abe7d4f564335d

if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi

if [ "$CROSS_BUILD" ]; then
configure_args+=" --disable-tests --disable-tutorial"
configure_args+=" -DBUILD_TESTING=OFF -DBUILD_TUTORIALS=OFF"
fi

post_configure() {
Expand All @@ -35,7 +41,6 @@ thrift-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
Expand Down

0 comments on commit b42f89e

Please sign in to comment.