1 |
commit: 87b3515305f3198a73920b33cebc93816f36173a |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 28 21:06:04 2022 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 29 00:24:44 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87b35153 |
7 |
|
8 |
dev-libs/thrift: new package, add 0.16.0 |
9 |
|
10 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
11 |
|
12 |
dev-libs/thrift/Manifest | 1 + |
13 |
.../thrift/files/thrift-0.16.0-network-tests.patch | 36 +++++++++++++++ |
14 |
dev-libs/thrift/metadata.xml | 15 +++++++ |
15 |
dev-libs/thrift/thrift-0.16.0.ebuild | 52 ++++++++++++++++++++++ |
16 |
4 files changed, 104 insertions(+) |
17 |
|
18 |
diff --git a/dev-libs/thrift/Manifest b/dev-libs/thrift/Manifest |
19 |
new file mode 100644 |
20 |
index 000000000000..4e5bde988056 |
21 |
--- /dev/null |
22 |
+++ b/dev-libs/thrift/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST thrift-0.16.0.tar.gz 4085114 BLAKE2B 17c35096f6848fb0795e4cb125fed3068c8e1e53f67f404f4dcab67df7a42fc049a7d615591c861eb9e59e3333e21f185e8615663008bc7c846a03722ea8b834 SHA512 468fff6be2def85959fdf8adac92a0cfa7f786083b3bafb2c31427dfe5725f4d10962052d13ea960828f6a317778d35e66b602744a570212352bfc637ae586e0 |
25 |
|
26 |
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 |
27 |
new file mode 100644 |
28 |
index 000000000000..cc1f1cf2c621 |
29 |
--- /dev/null |
30 |
+++ b/dev-libs/thrift/files/thrift-0.16.0-network-tests.patch |
31 |
@@ -0,0 +1,36 @@ |
32 |
+diff --git a/lib/cpp/test/ToStringTest.cpp b/lib/cpp/test/ToStringTest.cpp |
33 |
+index 736b33c0a..f66909873 100644 |
34 |
+--- a/lib/cpp/test/ToStringTest.cpp |
35 |
++++ b/lib/cpp/test/ToStringTest.cpp |
36 |
+@@ -41,31 +41,6 @@ BOOST_AUTO_TEST_CASE(base_types_to_string) { |
37 |
+ BOOST_CHECK_EQUAL(to_string("abc"), "abc"); |
38 |
+ } |
39 |
+ |
40 |
+-// NOTE: Currently (as of 2021.08.12) the locale-based tests do not work on |
41 |
+-// Windows in the AppVeyor Thrift CI build correctly. Therefore disabled on |
42 |
+-// Windows: |
43 |
+-#ifndef _WIN32 |
44 |
+-BOOST_AUTO_TEST_CASE(locale_en_US_int_to_string) { |
45 |
+-#ifdef _WIN32 |
46 |
+- std::locale::global(std::locale("en-US.UTF-8")); |
47 |
+-#else |
48 |
+- std::locale::global(std::locale("en_US.UTF-8")); |
49 |
+-#endif |
50 |
+- BOOST_CHECK_EQUAL(to_string(1000000), "1000000"); |
51 |
+-} |
52 |
+- |
53 |
+-BOOST_AUTO_TEST_CASE(locale_de_DE_floating_point_to_string) { |
54 |
+-#ifdef _WIN32 |
55 |
+- std::locale::global(std::locale("de-DE.UTF-8")); |
56 |
+-#else |
57 |
+- std::locale::global(std::locale("de_DE.UTF-8")); |
58 |
+-#endif |
59 |
+- BOOST_CHECK_EQUAL(to_string(1.5), "1.5"); |
60 |
+- BOOST_CHECK_EQUAL(to_string(1.5f), "1.5"); |
61 |
+- BOOST_CHECK_EQUAL(to_string(1.5L), "1.5"); |
62 |
+-} |
63 |
+-#endif |
64 |
+- |
65 |
+ BOOST_AUTO_TEST_CASE(empty_vector_to_string) { |
66 |
+ std::vector<int> l; |
67 |
+ BOOST_CHECK_EQUAL(to_string(l), "[]"); |
68 |
|
69 |
diff --git a/dev-libs/thrift/metadata.xml b/dev-libs/thrift/metadata.xml |
70 |
new file mode 100644 |
71 |
index 000000000000..e27373e1c1b8 |
72 |
--- /dev/null |
73 |
+++ b/dev-libs/thrift/metadata.xml |
74 |
@@ -0,0 +1,15 @@ |
75 |
+<?xml version="1.0" encoding="UTF-8"?> |
76 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
77 |
+<pkgmetadata> |
78 |
+ <maintainer type="person"> |
79 |
+ <email>chutzpah@g.o</email> |
80 |
+ <name>Patrick McLean</name> |
81 |
+ </maintainer> |
82 |
+ <use> |
83 |
+ <flag name="libevent">Build support for <pkg>dev-libs/libevent</pkg></flag> |
84 |
+ </use> |
85 |
+ <upstream> |
86 |
+ <remote-id type="github">apache/thrift/</remote-id> |
87 |
+ <bugs-to>https://issues.apache.org/jira/projects/THRIFT</bugs-to> |
88 |
+ </upstream> |
89 |
+</pkgmetadata> |
90 |
|
91 |
diff --git a/dev-libs/thrift/thrift-0.16.0.ebuild b/dev-libs/thrift/thrift-0.16.0.ebuild |
92 |
new file mode 100644 |
93 |
index 000000000000..8ef3ac6644fb |
94 |
--- /dev/null |
95 |
+++ b/dev-libs/thrift/thrift-0.16.0.ebuild |
96 |
@@ -0,0 +1,52 @@ |
97 |
+# Copyright 2022 Gentoo Authors |
98 |
+# Distributed under the terms of the GNU General Public License v2 |
99 |
+ |
100 |
+EAPI=8 |
101 |
+ |
102 |
+inherit cmake |
103 |
+ |
104 |
+DESCRIPTION="C++ bindings for Apache Thrift" |
105 |
+HOMEPAGE="https://thrift.apache.org/lib/cpp.html" |
106 |
+SRC_URI="mirror://apache/thrift/${PV}/${P}.tar.gz" |
107 |
+ |
108 |
+LICENSE="Apache-2.0" |
109 |
+SLOT="0/0" |
110 |
+KEYWORDS="~amd64" |
111 |
+IUSE="libevent lua +ssl test" |
112 |
+ |
113 |
+RESTRICT="!test? ( test )" |
114 |
+ |
115 |
+DEPEND=" |
116 |
+ dev-libs/openssl:= |
117 |
+ libevent? ( dev-libs/libevent ) |
118 |
+ test? ( |
119 |
+ dev-libs/boost |
120 |
+ ) |
121 |
+" |
122 |
+RDEPEND="${DEPEND}" |
123 |
+BDEPEND="" |
124 |
+ |
125 |
+REQUIRED_USE=" |
126 |
+ test? ( ssl ) |
127 |
+" |
128 |
+ |
129 |
+PATCHES=( |
130 |
+ "${FILESDIR}/thrift-0.16.0-network-tests.patch" |
131 |
+) |
132 |
+ |
133 |
+src_configure() { |
134 |
+ local -a mycmakeargs=( |
135 |
+ -DBUILD_CPP=ON |
136 |
+ -DBUILD_C_GLIB=OFF |
137 |
+ -DBUILD_JAVA=OFF |
138 |
+ -DBUILD_JAVASCRIPT=OFF |
139 |
+ -DBUILD_NODEJS=OFF |
140 |
+ -DBUILD_PYTHON=OFF |
141 |
+ -DBUILD_TESTING=$(usex test 'ON' 'OFF') |
142 |
+ -DWITH_LIBEVENT=$(usex libevent 'ON' 'OFF') |
143 |
+ -DWITH_OPENSSL=$(usex ssl 'ON' 'OFF') |
144 |
+ -DWITH_ZLIB=ON |
145 |
+ -Wno-dev |
146 |
+ ) |
147 |
+ cmake_src_configure |
148 |
+} |