summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2023-03-07 15:29:34 -0800
committerPatrick McLean <chutzpah@gentoo.org>2023-03-07 15:29:46 -0800
commitfcd52ff08483e30cfd2ea2d8e5f207dc0540f769 (patch)
treec6916446d59665447029b99b6ecdf5bb43ef1709 /dev-libs
parentdev-libs/thrift: Add MAKEOPTS=j1 (bug #843929) (diff)
downloadgentoo-fcd52ff08483e30cfd2ea2d8e5f207dc0540f769.tar.gz
gentoo-fcd52ff08483e30cfd2ea2d8e5f207dc0540f769.tar.bz2
gentoo-fcd52ff08483e30cfd2ea2d8e5f207dc0540f769.zip
dev-libs/thrift: add 0.18.1
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/thrift/files/thrift-0.18.1-tests.patch33
-rw-r--r--dev-libs/thrift/thrift-0.18.1.ebuild59
2 files changed, 92 insertions, 0 deletions
diff --git a/dev-libs/thrift/files/thrift-0.18.1-tests.patch b/dev-libs/thrift/files/thrift-0.18.1-tests.patch
new file mode 100644
index 000000000000..7716e0c743c2
--- /dev/null
+++ b/dev-libs/thrift/files/thrift-0.18.1-tests.patch
@@ -0,0 +1,33 @@
+diff --git a/lib/cpp/test/CMakeLists.txt b/lib/cpp/test/CMakeLists.txt
+index 1117cd9f3..5f56aaca8 100644
+--- a/lib/cpp/test/CMakeLists.txt
++++ b/lib/cpp/test/CMakeLists.txt
+@@ -318,28 +318,6 @@ target_link_libraries(OpenSSLManualInitTest
+ target_link_libraries(OpenSSLManualInitTest thrift)
+ add_test(NAME OpenSSLManualInitTest COMMAND OpenSSLManualInitTest)
+
+-add_executable(SecurityTest SecurityTest.cpp)
+-target_link_libraries(SecurityTest
+- testgencpp
+- ${Boost_LIBRARIES}
+-)
+-target_link_libraries(SecurityTest thrift)
+-if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
+- target_link_libraries(SecurityTest -lrt)
+-endif ()
+-add_test(NAME SecurityTest COMMAND SecurityTest -- "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
+-
+-add_executable(SecurityFromBufferTest SecurityFromBufferTest.cpp)
+-target_link_libraries(SecurityFromBufferTest
+- testgencpp
+- ${Boost_LIBRARIES}
+-)
+-target_link_libraries(SecurityFromBufferTest thrift)
+-if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
+- target_link_libraries(SecurityFromBufferTest -lrt)
+-endif ()
+-add_test(NAME SecurityFromBufferTest COMMAND SecurityFromBufferTest -- "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
+-
+ endif()
+
+ if(WITH_QT5)
diff --git a/dev-libs/thrift/thrift-0.18.1.ebuild b/dev-libs/thrift/thrift-0.18.1.ebuild
new file mode 100644
index 000000000000..aa5ea1c6aa6b
--- /dev/null
+++ b/dev-libs/thrift/thrift-0.18.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 2022-2023 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:=
+ sys-libs/zlib:=
+ libevent? ( dev-libs/libevent:= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ sys-devel/flex
+ sys-devel/bison
+"
+
+REQUIRED_USE="
+ test? ( ssl libevent )
+"
+
+PATCHES=(
+ "${FILESDIR}/thrift-0.16.0-network-tests.patch"
+ "${FILESDIR}/thrift-0.18.1-tests.patch"
+)
+
+src_configure() {
+ local 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
+}
+
+src_test() {
+ MAKEOPTS="-j1" cmake_src_test
+}