diff options
Diffstat (limited to 'dev-libs/thrift')
-rw-r--r-- | dev-libs/thrift/Manifest | 4 | ||||
-rw-r--r-- | dev-libs/thrift/files/thrift-0.16.0-network-tests.patch | 36 | ||||
-rw-r--r-- | dev-libs/thrift/metadata.xml | 15 | ||||
-rw-r--r-- | dev-libs/thrift/thrift-0.16.0-r1.ebuild | 50 |
4 files changed, 105 insertions, 0 deletions
diff --git a/dev-libs/thrift/Manifest b/dev-libs/thrift/Manifest new file mode 100644 index 000000000000..4220514578e7 --- /dev/null +++ b/dev-libs/thrift/Manifest @@ -0,0 +1,4 @@ +AUX thrift-0.16.0-network-tests.patch 1184 BLAKE2B fc1737e6169a480718edeff366734a01cee43626f84a0785b0f7fe2cdad4ef964da5ef9c685d8c8fee32d8f719e1f4eb7c260a6c6a960e8fea89898a59cd6f16 SHA512 248de672f603c94919bf67890715a037030d378c80ec7dc849ee3677392353d89903e35ed3c0144ab3e1ff371bfb6eba861d11332844fec99b87bcb3476a1a7e +DIST thrift-0.16.0.tar.gz 4085114 BLAKE2B 17c35096f6848fb0795e4cb125fed3068c8e1e53f67f404f4dcab67df7a42fc049a7d615591c861eb9e59e3333e21f185e8615663008bc7c846a03722ea8b834 SHA512 468fff6be2def85959fdf8adac92a0cfa7f786083b3bafb2c31427dfe5725f4d10962052d13ea960828f6a317778d35e66b602744a570212352bfc637ae586e0 +EBUILD thrift-0.16.0-r1.ebuild 943 BLAKE2B c71eb6f0d62c7c5a50eb42f27410706e84cfa12d374ff15343d5c0f189b9e0d92a742e824dd04b8fd0cb1c23dad884495538874cbd12644ea85734be2660179a SHA512 52985cc93cca5104a19dc20be727fbaebfb8a04ff1ba7957e53c95d3037f288b859ebb367f93673f4c93c97d909945f21ec67f835eb2b2ea63d1d9bc9e2115b4 +MISC metadata.xml 490 BLAKE2B 97d5f5a81f7532a4b8e0953c99ae0e702c0f68dd33f6d07df1e412e429be3ead863a06298a3caa50e5a627b5f78200f7d4421264ca0eaccbcbea312d951040a3 SHA512 dc6ba8af22bae65ee0dc0089075403663b0fe6e24c322d4527b3ddb3059b92c640f0c36c4ac47c0649c8365279184fbb0e44801749aee26d99be1ab282e927b0 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-r1.ebuild b/dev-libs/thrift/thrift-0.16.0-r1.ebuild new file mode 100644 index 000000000000..d4db37319da1 --- /dev/null +++ b/dev-libs/thrift/thrift-0.16.0-r1.ebuild @@ -0,0 +1,50 @@ +# 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 ~arm64" +IUSE="libevent lua +ssl test" + +RESTRICT="!test? ( test )" + +DEPEND=" + dev-libs/boost:= + dev-libs/openssl:= + libevent? ( dev-libs/libevent ) +" +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 +} |