summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-06-24 06:46:57 +0100
committerSam James <sam@gentoo.org>2023-06-24 07:32:26 +0100
commit8640d53a4bbaefe2e7b2c27a89a1188a92f68f6d (patch)
tree0a1e3cdfc85bb5f5321c3ac29f62495f10c4b100 /dev-cpp/folly
parentdev-cpp/folly: fix UnusedInherits (diff)
downloadgentoo-8640d53a4bbaefe2e7b2c27a89a1188a92f68f6d.tar.gz
gentoo-8640d53a4bbaefe2e7b2c27a89a1188a92f68f6d.tar.bz2
gentoo-8640d53a4bbaefe2e7b2c27a89a1188a92f68f6d.zip
dev-cpp/folly: add 2023.06.19.00
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp/folly')
-rw-r--r--dev-cpp/folly/Manifest1
-rw-r--r--dev-cpp/folly/files/folly-2023.06.19.00-fmt.patch62
-rw-r--r--dev-cpp/folly/folly-2023.06.19.00.ebuild91
3 files changed, 154 insertions, 0 deletions
diff --git a/dev-cpp/folly/Manifest b/dev-cpp/folly/Manifest
index f1cbc3a5f9f9..0f7c876c562f 100644
--- a/dev-cpp/folly/Manifest
+++ b/dev-cpp/folly/Manifest
@@ -1,2 +1,3 @@
DIST folly-v2023.02.06.00.tar.gz 3790845 BLAKE2B b1c0eed7a2dccba3ccb5e25aa24cc0a6d628fbc3134bf0ed82a1e0e614825a3ae620d79a54e2bea398274afcb662bdfca48d7193f69db35f624ed6a2fa9bae99 SHA512 b9cd8132a702e88e4c9fefcce190d9fd403253c9b71dc22316f237922d99f9cd980ab81d50ddb48ae0e614a493b3d61865b03eee46d59805f83fce528f831646
DIST folly-v2023.05.22.00.tar.gz 3834791 BLAKE2B e981f844b12620b274a78fa6640d1510525c1b4cc3bb35594bd5c5daf238eb19291a1ddf19f29e26269effbe79c22ccc9c002f5f547e06566aa804f0d92a0a9c SHA512 4af93f23a6835efaca317dc7a15abe13619d498efbaa5b349a30682be35c129bd87ab9723c5186e63e3d3b646a80816b994f5237108f8d489a50a028bb16c9da
+DIST folly-v2023.06.19.00.tar.gz 3850872 BLAKE2B 6332b6de28fd4a0c19b20c4b23fa7093bded940fb07de92ad9fa7f44b8347fb5e5543e5a57c32d2414f345b4f7b306eed806c5d48a871a06833c1d2a71a34584 SHA512 9189adddf59019787969c7edb27a3e57436c2dca772f3142cdbf66e3a69b398be7ae4f2c36a9576c7ad9c51fd3703555e2a7ad6ed1ddce4036f8760d8095d371
diff --git a/dev-cpp/folly/files/folly-2023.06.19.00-fmt.patch b/dev-cpp/folly/files/folly-2023.06.19.00-fmt.patch
new file mode 100644
index 000000000000..80e4a2fbf80a
--- /dev/null
+++ b/dev-cpp/folly/files/folly-2023.06.19.00-fmt.patch
@@ -0,0 +1,62 @@
+https://github.com/facebook/folly/commit/a65b35c03797c86969a7b0d9ec281935a21cfa18
+https://github.com/facebook/folly/pull/2022
+
+From a65b35c03797c86969a7b0d9ec281935a21cfa18 Mon Sep 17 00:00:00 2001
+From: Giuseppe Ottaviano <ott@meta.com>
+Date: Sun, 18 Jun 2023 00:40:43 -0700
+Subject: [PATCH] fmt/core.h is enough in Core.cpp
+
+Reviewed By: Orvid, luciang
+
+Differential Revision: D46788525
+
+fbshipit-source-id: 03da65f3499ca56b34baa4e75b2340bea36690f6
+---
+ folly/futures/detail/Core.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/folly/futures/detail/Core.cpp b/folly/futures/detail/Core.cpp
+index 26bd4afbffe..858229100f9 100644
+--- a/folly/futures/detail/Core.cpp
++++ b/folly/futures/detail/Core.cpp
+@@ -18,7 +18,7 @@
+
+ #include <new>
+
+-#include <fmt/format.h>
++#include <fmt/core.h>
+ #include <folly/lang/Assume.h>
+
+ namespace folly {
+
+From d783a64391c02b40d78dfc6be04932fa45c46b9a Mon Sep 17 00:00:00 2001
+From: Marcus Holland-Moritz <github@mhxnet.de>
+Date: Tue, 20 Jun 2023 11:59:42 +0200
+Subject: [PATCH] Fix libfmt errors from not finding enum formatter
+
+Recent versions of libfmt have become more strict and require
+`enum` types to be formattable:
+
+ static assertion failed due to requirement 'formattable': Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
+
+This is a quick fix to simply use the underlying type.
+--- a/folly/futures/detail/Core.cpp
++++ b/folly/futures/detail/Core.cpp
+@@ -19,6 +19,7 @@
+ #include <new>
+
+ #include <fmt/core.h>
++#include <folly/Utility.h>
+ #include <folly/lang/Assume.h>
+
+ namespace folly {
+@@ -30,7 +31,7 @@ namespace {
+ template <class Enum>
+ void terminate_unexpected_state(fmt::string_view context, Enum state) {
+ terminate_with<std::logic_error>(
+- fmt::format("{} unexpected state: {}", context, state));
++ fmt::format("{} unexpected state: {}", context, to_underlying(state)));
+ }
+
+ } // namespace
+
diff --git a/dev-cpp/folly/folly-2023.06.19.00.ebuild b/dev-cpp/folly/folly-2023.06.19.00.ebuild
new file mode 100644
index 000000000000..48db76046492
--- /dev/null
+++ b/dev-cpp/folly/folly-2023.06.19.00.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# These must be bumped together:
+# dev-cpp/edencommon
+# dev-cpp/folly
+# dev-util/watchman
+
+inherit cmake
+
+DESCRIPTION="An open-source C++ library developed and used at Facebook"
+HOMEPAGE="https://github.com/facebook/folly"
+SRC_URI="https://github.com/facebook/folly/releases/download/v${PV}/${PN}-v${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc64"
+IUSE="llvm-libunwind test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ app-arch/bzip2
+ app-arch/lz4:=
+ app-arch/snappy:=
+ app-arch/xz-utils
+ app-arch/zstd:=
+ dev-cpp/gflags:=
+ dev-cpp/glog:=[gflags]
+ dev-libs/boost:=[context]
+ dev-libs/double-conversion:=
+ dev-libs/libaio
+ dev-libs/libevent:=
+ dev-libs/libfmt:=
+ dev-libs/libsodium:=
+ dev-libs/openssl:=
+ >=sys-libs/liburing-2.3:=
+ sys-libs/zlib
+ llvm-libunwind? ( sys-libs/llvm-libunwind:= )
+ !llvm-libunwind? ( sys-libs/libunwind:= )
+"
+# libiberty is linked statically
+DEPEND="
+ ${RDEPEND}
+ sys-libs/binutils-libs
+ test? ( dev-cpp/gtest )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2023.05.22.00-musl-fix.patch
+ "${FILESDIR}"/${PN}-2023.06.19.00-fmt.patch
+)
+
+src_unpack() {
+ # Workaround for bug #889420
+ mkdir -p "${S}" || die
+ cd "${S}" || die
+ default
+}
+
+src_configure() {
+ # TODO: liburing could in theory be optional but fails to link
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+
+ -DBUILD_TESTS=$(usex test)
+
+ # https://github.com/gentoo/gentoo/pull/29393
+ -DCMAKE_LIBRARY_ARCHITECTURE=$(usex amd64 x86_64 ${ARCH})
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local myctestargs=(
+ # - timeseries_histogram_test.TimeseriesHistogram.Percentile|HHWheelTimerTest
+ # Long-standing known test failure
+ # TODO: report upstream
+ # - HHWheelTimerTest.HHWheelTimerTest.CancelTimeout
+ # Timeouts are fragile
+ # - concurrent_hash_map_test.*
+ # TODO: All SIGSEGV, report upstream!
+ # - ssl_errors_test.SSLErrorsTest.TestMessage
+ # Network...?
+ -E "(timeseries_histogram_test.TimeseriesHistogram.Percentile|HHWheelTimerTest.HHWheelTimerTest.CancelTimeout|concurrent_hash_map_test.*|ssl_errors_test.SSLErrorsTest.TestMessage)"
+ )
+
+ cmake_src_test
+}