public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/thrift/, dev-libs/thrift/files/
Date: Mon, 10 Mar 2025 00:22:58 +0000 (UTC)	[thread overview]
Message-ID: <1741566070.d9e15a75e6f60417f941868ae1761ab70a1116b2.sam@gentoo> (raw)

commit:     d9e15a75e6f60417f941868ae1761ab70a1116b2
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Wed Mar  5 01:23:28 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 10 00:21:10 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9e15a75

dev-libs/thrift: add 0.21.0

* Use github tarball over missing test files.
* Drop test patches and use CMAKE_SKIP_TESTS instead.
* Comprehensily set cmakeargs and use WITH_OPTION over BUILD_OPTION to
  stop cmake looking for the dependencies despite the feature being disabled.

Bug: https://bugs.gentoo.org/943012
Bug: https://bugs.gentoo.org/938100
Bug: https://bugs.gentoo.org/949634
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40903
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/thrift/Manifest                           |  1 +
 .../thrift/files/thrift-0.21.0-gcc15-cstdint.patch | 52 +++++++++++++++
 dev-libs/thrift/thrift-0.21.0.ebuild               | 73 ++++++++++++++++++++++
 3 files changed, 126 insertions(+)

diff --git a/dev-libs/thrift/Manifest b/dev-libs/thrift/Manifest
index 88cdbc2d6cce..2da2449b32fe 100644
--- a/dev-libs/thrift/Manifest
+++ b/dev-libs/thrift/Manifest
@@ -1,3 +1,4 @@
 DIST thrift-0.16.0.tar.gz 4085114 BLAKE2B 17c35096f6848fb0795e4cb125fed3068c8e1e53f67f404f4dcab67df7a42fc049a7d615591c861eb9e59e3333e21f185e8615663008bc7c846a03722ea8b834 SHA512 468fff6be2def85959fdf8adac92a0cfa7f786083b3bafb2c31427dfe5725f4d10962052d13ea960828f6a317778d35e66b602744a570212352bfc637ae586e0
 DIST thrift-0.18.1.tar.gz 4310494 BLAKE2B 3e6c7e03059341e79d3f58e16b55761888b530b3d31dd22853026486a1303725ee5d5e6e5dd7a5e6bf8e57a2d3cf36ffc829cdb194d990cadedfc63f4f3e0874 SHA512 9c9a462aa8b6fddefd5bb9d2c950570eb2d3beaa7c9d37fceee677bdc1fdeb521b796f4eeee8a1fd9a7649f84449f6c0572305210e67402eb97682ca7f6e851b
 DIST thrift-0.20.0.tar.gz 4397667 BLAKE2B 23422fdcdf7e0dbce8bc0f8017f54b5848594e2da21de56834152c17c74da7d1c4df23c5b57cf3ba811bb03f1a8588ddf1c2a05222bb726aceda4292a15af21e SHA512 8dc77f666e60141a6b3cf7ee1407b08a0e80d176f8ccfee69317d7df89ab87aea2c7b3ba3e59d4561835edf1ce23762443ad5aeed0099bf075b010853d5eb1cd
+DIST thrift-0.21.0.gh.tar.gz 3276565 BLAKE2B 806cda50086b592fa14723377ee0346ac77fff5c0002d0eea481a021c0d7ef4360a2ce347b1a1d969900fac10602534e25e9ac5df54a2d15d363bfc12d0cf055 SHA512 39566b7ecae7ae159822ee1c2c03a7af9ba6e228c3bbecea4079bdbd2332b42f03f79af08303a2685d04723f996d230cf95e5afc4d2a3880158a80429e21c190

diff --git a/dev-libs/thrift/files/thrift-0.21.0-gcc15-cstdint.patch b/dev-libs/thrift/files/thrift-0.21.0-gcc15-cstdint.patch
new file mode 100644
index 000000000000..ab3453e2bd0f
--- /dev/null
+++ b/dev-libs/thrift/files/thrift-0.21.0-gcc15-cstdint.patch
@@ -0,0 +1,52 @@
+https://bugs.gentoo.org/938100
+https://github.com/apache/thrift/commit/947ad66940cfbadd9b24ba31d892dfc1142dd330
+https://github.com/apache/thrift/pull/3078
+https://github.com/apache/arrow/issues/45096
+
+From 947ad66940cfbadd9b24ba31d892dfc1142dd330 Mon Sep 17 00:00:00 2001
+From: Sutou Kouhei <kou@clear-code.com>
+Date: Mon, 23 Dec 2024 12:33:22 +0900
+Subject: [PATCH] THRIFT-5842: Add missing cstdint include for int64_t in
+ Mutex.h
+
+Client: cpp
+
+GCC 15 (not released yet) requires `#include <cstdint>` for `int64_t`
+but `lib/cpp/src/thrift/concurrency/Mutex.h` doesn't have it. So we
+can't build Thrift with GCC 15:
+
+    [80/359] Building CXX object lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o
+    FAILED: lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o
+    /bin/g++-15 -DBOOST_ALL_DYN_LINK -DBOOST_TEST_DYN_LINK -DTHRIFT_STATIC_DEFINE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/kou/work/cpp/thrift.kou.build/lib/cpp -I/home/kou/work/cpp/thrift.kou/lib/cpp -I/home/kou/work/cpp/thrift.kou.build -I/home/kou/work/cpp/thrift.kou/lib/cpp/src -g -std=c++11 -MD -MT lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o -MF lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o.d -o lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o -c /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.cpp
+    In file included from /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TServerSocket.h:25,
+                     from /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.h:23,
+                     from /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.cpp:21:
+    /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:47:26: error: 'int64_t' has not been declared
+       47 |   virtual bool timedlock(int64_t milliseconds) const;
+          |                          ^~~~~~~
+    /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:25:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
+       24 | #include <thrift/TNonCopyable.h>
+      +++ |+#include <cstdint>
+       25 |
+    /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:60:29: error: 'int64_t' has not been declared
+       60 |   Guard(const Mutex& value, int64_t timeout = 0) : mutex_(&value) {
+          |                             ^~~~~~~
+    /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:60:29: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
+
+See also: https://github.com/apache/arrow/issues/45096
+---
+ lib/cpp/src/thrift/concurrency/Mutex.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/cpp/src/thrift/concurrency/Mutex.h b/lib/cpp/src/thrift/concurrency/Mutex.h
+index 1e5c3fba37c..12f1729d6bf 100644
+--- a/lib/cpp/src/thrift/concurrency/Mutex.h
++++ b/lib/cpp/src/thrift/concurrency/Mutex.h
+@@ -20,6 +20,7 @@
+ #ifndef _THRIFT_CONCURRENCY_MUTEX_H_
+ #define _THRIFT_CONCURRENCY_MUTEX_H_ 1
+ 
++#include <cstdint>
+ #include <memory>
+ #include <thrift/TNonCopyable.h>
+ 

diff --git a/dev-libs/thrift/thrift-0.21.0.ebuild b/dev-libs/thrift/thrift-0.21.0.ebuild
new file mode 100644
index 000000000000..885d01c25f6c
--- /dev/null
+++ b/dev-libs/thrift/thrift-0.21.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 2022-2025 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"
+# Misses testing files
+# SRC_URI="mirror://apache/thrift/${PV}/${P}.tar.gz"
+SRC_URI="
+	https://github.com/apache/thrift/archive/refs/tags/v${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+"
+
+LICENSE="Apache-2.0"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc64 ~riscv ~s390 ~x86"
+
+IUSE="libevent lua +ssl test"
+REQUIRED_USE="test? ( ssl libevent )"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	dev-libs/boost:=[nls(+)]
+	dev-libs/openssl:=
+	sys-libs/zlib:=
+	libevent? ( dev-libs/libevent:= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	app-alternatives/lex
+	app-alternatives/yacc
+"
+
+PATCHES=(
+	"${FILESDIR}/thrift-0.21.0-gcc15-cstdint.patch"
+)
+
+src_configure() {
+	local mycmakeargs=(
+		# follow order in build/cmake/DefineOptions.cmake
+		# Prefer WITH_OPTION over BUILD_OPTION for bug #943012
+		-DBUILD_COMPILER=ON
+		-DBUILD_TESTING=$(usex test)
+		-DBUILD_TUTORIALS=OFF
+		-DBUILD_LIBRARIES=ON
+		-DWITH_AS3=ON
+		-DWITH_CPP=ON
+		-DWITH_ZLIB=ON
+		-DWITH_LIBEVENT=$(usex libevent)
+		-DWITH_QT5=OFF
+		-DWITH_C_GLIB=OFF
+		-DWITH_OPENSSL=$(usex ssl)
+		-DWITH_JAVA=OFF
+		-DWITH_JAVASCRIPT=OFF
+		-DWITH_NODEJS=OFF
+		-DWITH_PYTHON=OFF
+		-Wno-dev
+	)
+	cmake_src_configure
+}
+
+src_test() {
+	local CMAKE_SKIP_TESTS=(
+		# network sandbox
+		StressTestConcurrent
+		StressTestNonBlocking
+		UnitTests
+	)
+	cmake_src_test
+}


             reply	other threads:[~2025-03-10  0:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10  0:22 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-23 22:20 [gentoo-commits] repo/gentoo:master commit in: dev-libs/thrift/, dev-libs/thrift/files/ Sam James
2022-04-29  0:31 Patrick McLean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1741566070.d9e15a75e6f60417f941868ae1761ab70a1116b2.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox