summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2022-04-28 14:06:04 -0700
committerPatrick McLean <chutzpah@gentoo.org>2022-04-28 17:24:44 -0700
commit87b3515305f3198a73920b33cebc93816f36173a (patch)
treead165aa93a4c995a585958744566682cbd155296 /dev-libs/thrift
parentmail-client/mutt: Keyword 2.2.3 riscv, #841365 (diff)
downloadgentoo-87b3515305f3198a73920b33cebc93816f36173a.tar.gz
gentoo-87b3515305f3198a73920b33cebc93816f36173a.tar.bz2
gentoo-87b3515305f3198a73920b33cebc93816f36173a.zip
dev-libs/thrift: new package, add 0.16.0
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-libs/thrift')
-rw-r--r--dev-libs/thrift/Manifest1
-rw-r--r--dev-libs/thrift/files/thrift-0.16.0-network-tests.patch36
-rw-r--r--dev-libs/thrift/metadata.xml15
-rw-r--r--dev-libs/thrift/thrift-0.16.0.ebuild52
4 files changed, 104 insertions, 0 deletions
diff --git a/dev-libs/thrift/Manifest b/dev-libs/thrift/Manifest
new file mode 100644
index 000000000000..4e5bde988056
--- /dev/null
+++ b/dev-libs/thrift/Manifest
@@ -0,0 +1 @@
+DIST thrift-0.16.0.tar.gz 4085114 BLAKE2B 17c35096f6848fb0795e4cb125fed3068c8e1e53f67f404f4dcab67df7a42fc049a7d615591c861eb9e59e3333e21f185e8615663008bc7c846a03722ea8b834 SHA512 468fff6be2def85959fdf8adac92a0cfa7f786083b3bafb2c31427dfe5725f4d10962052d13ea960828f6a317778d35e66b602744a570212352bfc637ae586e0
diff --git a/dev-libs/thrift/files/thrift-0.16.0-network-tests.patch b/dev-libs/thrift/files/thrift-0.16.0-network-tests.patch
new file mode 100644
index 000000000000..cc1f1cf2c621
--- /dev/null
+++ b/dev-libs/thrift/files/thrift-0.16.0-network-tests.patch
@@ -0,0 +1,36 @@
+diff --git a/lib/cpp/test/ToStringTest.cpp b/lib/cpp/test/ToStringTest.cpp
+index 736b33c0a..f66909873 100644
+--- a/lib/cpp/test/ToStringTest.cpp
++++ b/lib/cpp/test/ToStringTest.cpp
+@@ -41,31 +41,6 @@ BOOST_AUTO_TEST_CASE(base_types_to_string) {
+ BOOST_CHECK_EQUAL(to_string("abc"), "abc");
+ }
+
+-// NOTE: Currently (as of 2021.08.12) the locale-based tests do not work on
+-// Windows in the AppVeyor Thrift CI build correctly. Therefore disabled on
+-// Windows:
+-#ifndef _WIN32
+-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"));
+-#endif
+- BOOST_CHECK_EQUAL(to_string(1000000), "1000000");
+-}
+-
+-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"));
+-#endif
+- BOOST_CHECK_EQUAL(to_string(1.5), "1.5");
+- BOOST_CHECK_EQUAL(to_string(1.5f), "1.5");
+- BOOST_CHECK_EQUAL(to_string(1.5L), "1.5");
+-}
+-#endif
+-
+ BOOST_AUTO_TEST_CASE(empty_vector_to_string) {
+ std::vector<int> l;
+ BOOST_CHECK_EQUAL(to_string(l), "[]");
diff --git a/dev-libs/thrift/metadata.xml b/dev-libs/thrift/metadata.xml
new file mode 100644
index 000000000000..e27373e1c1b8
--- /dev/null
+++ b/dev-libs/thrift/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <use>
+ <flag name="libevent">Build support for <pkg>dev-libs/libevent</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">apache/thrift/</remote-id>
+ <bugs-to>https://issues.apache.org/jira/projects/THRIFT</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/thrift/thrift-0.16.0.ebuild b/dev-libs/thrift/thrift-0.16.0.ebuild
new file mode 100644
index 000000000000..8ef3ac6644fb
--- /dev/null
+++ b/dev-libs/thrift/thrift-0.16.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="C++ bindings for Apache Thrift"
+HOMEPAGE="https://thrift.apache.org/lib/cpp.html"
+SRC_URI="mirror://apache/thrift/${PV}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/0"
+KEYWORDS="~amd64"
+IUSE="libevent lua +ssl test"
+
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-libs/openssl:=
+ libevent? ( dev-libs/libevent )
+ test? (
+ dev-libs/boost
+ )
+"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+REQUIRED_USE="
+ test? ( ssl )
+"
+
+PATCHES=(
+ "${FILESDIR}/thrift-0.16.0-network-tests.patch"
+)
+
+src_configure() {
+ local -a mycmakeargs=(
+ -DBUILD_CPP=ON
+ -DBUILD_C_GLIB=OFF
+ -DBUILD_JAVA=OFF
+ -DBUILD_JAVASCRIPT=OFF
+ -DBUILD_NODEJS=OFF
+ -DBUILD_PYTHON=OFF
+ -DBUILD_TESTING=$(usex test 'ON' 'OFF')
+ -DWITH_LIBEVENT=$(usex libevent 'ON' 'OFF')
+ -DWITH_OPENSSL=$(usex ssl 'ON' 'OFF')
+ -DWITH_ZLIB=ON
+ -Wno-dev
+ )
+ cmake_src_configure
+}