dev-cpp/folly: add 2025.04.14.00

io_uring support is temporarily disabled because they depend on features
that haven't even been released in liburing yet.

Closes: https://bugs.gentoo.org/949607
Ref: https://github.com/facebook/folly/issues/2420
Signed-off-by: sin-ack <sin-ack@protonmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
sin-ack
2025-04-22 02:15:22 +01:00
committed by Sam James
parent 227e560cdd
commit 405f0da22d
3 changed files with 149 additions and 0 deletions
+1
View File
@@ -1,2 +1,3 @@
DIST folly-v2023.06.19.00.tar.gz 3850872 BLAKE2B 6332b6de28fd4a0c19b20c4b23fa7093bded940fb07de92ad9fa7f44b8347fb5e5543e5a57c32d2414f345b4f7b306eed806c5d48a871a06833c1d2a71a34584 SHA512 9189adddf59019787969c7edb27a3e57436c2dca772f3142cdbf66e3a69b398be7ae4f2c36a9576c7ad9c51fd3703555e2a7ad6ed1ddce4036f8760d8095d371
DIST folly-v2024.11.04.00.tar.gz 4185762 BLAKE2B 16eca3bde4320b2c5dd535afddb2640f567135ea90e7a270814bda56eb0d2ba4e864e07015879bb79d1146c68e05695eb06e2219e3dd3b4f71a1434e6f2998a5 SHA512 918ec7217a58789818c502c47302d9296867456bb3dd1c36480406905875eae9a7d52900def34ac1a936af9be6010b8b77897b351c36aa8ca09c16fe1775f508
DIST folly-v2025.04.14.00.tar.gz 4297358 BLAKE2B df2687d1fe27cc71b0e5a5bfc4b82e1b45d7537bd372f51b3db7c2d20b467d3f0354b377f1c0a64a795f125fd56fb472b585eaad656e07df84c83efe9373d1dd SHA512 19623482df0372a9e2b43b0e718aeed22571f773b0f4e479a41b3e2cac58814f7dc73fb4ae3a3311e87d2836b32c72b92cbe51ef8621242a059e820a70a75e48
@@ -0,0 +1,27 @@
From 1a86fa74e6468f1e10a361a79a441e95f2706d0d Mon Sep 17 00:00:00 2001
From: sin-ack <sin-ack@protonmail.com>
Date: Mon, 21 Apr 2025 14:43:56 +0200
Subject: [PATCH] Forcibly disable liburing support
Folly doesn't have a configure option for disabling liburing, so we
must manually disable it with this patch.
---
folly/io/async/Liburing.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/folly/io/async/Liburing.h b/folly/io/async/Liburing.h
index 8e81aaae9..64c3ffc0c 100644
--- a/folly/io/async/Liburing.h
+++ b/folly/io/async/Liburing.h
@@ -16,8 +16,4 @@
#pragma once
-#if defined(__linux__) && __has_include(<liburing.h>)
-#define FOLLY_HAS_LIBURING 1
-#else
#define FOLLY_HAS_LIBURING 0
-#endif
--
2.49.0
+121
View File
@@ -0,0 +1,121 @@
# Copyright 1999-2025 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/fb303
# dev-cpp/fbthrift
# dev-cpp/fizz
# dev-cpp/folly
# dev-cpp/mvfst
# dev-cpp/wangle
# dev-util/watchman
inherit flag-o-matic cmake toolchain-funcs
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 ~arm64 ~ppc64"
IUSE="llvm-libunwind test"
RESTRICT="!test? ( test )"
# NOTE: liburing support is disabled because Folly depends on features
# that are not available in the current stable version of liburing.
#
# See: https://github.com/facebook/folly/issues/2420
#
# NOTE: Re-check during next bump whether liburing released a version with
# zcrx support.
RDEPEND="
app-arch/bzip2
app-arch/lz4:=
app-arch/snappy:=
app-arch/xz-utils
app-arch/zstd:=
dev-cpp/fast_float:=
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/zlib
llvm-libunwind? ( llvm-runtimes/libunwind:= )
!llvm-libunwind? ( sys-libs/libunwind:= )
"
# libiberty is linked statically
DEPEND="
${RDEPEND}
sys-libs/binutils-libs
test? ( dev-cpp/gtest )
"
PATCHES=(
"${FILESDIR}"/${PN}-2024.11.04.00-musl-fix.patch
# NOTE: Disable liburing support as mentioned above. Folly doesn't have
# a configure flag for this so we must patch the check out.
"${FILESDIR}"/${PN}-2025.04.14.00-force-liburing-off.patch
)
src_unpack() {
# Workaround for bug #889420
mkdir -p "${S}" || die
cd "${S}" || die
default
}
src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_DIR="$(get_libdir)/cmake/${PN}"
-DLIB_INSTALL_DIR="$(get_libdir)"
-DBUILD_TESTS=$(usex test)
# https://github.com/gentoo/gentoo/pull/29393
-DCMAKE_LIBRARY_ARCHITECTURE=$(usex amd64 x86_64 ${ARCH})
)
# https://github.com/facebook/folly/issues/1984
use arm64 && append-cxxflags "-flax-vector-conversions"
cmake_src_configure
}
src_test() {
CMAKE_SKIP_TESTS=(
# Mysterious "invalid json" failure
io_async_ssl_session_test.SSLSessionTest
singleton_thread_local_test.SingletonThreadLocalDeathTest
# TODO: All SIGSEGV, report upstream!
'concurrency_concurrent_hash_map_test.*'
)
if use arm64; then
CMAKE_SKIP_TESTS+=(
# Tests are flaky/timing dependent on both QEMU chroot and real hardware
io_async_hh_wheel_timer_test.HHWheelTimerTest
# Times out on real hardware
concurrent_skip_list_test.ConcurrentSkipList
futures_retrying_test.RetryingTest.largeRetries
)
fi
if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
CMAKE_SKIP_TESTS+=(
# Aborts with libc++.
# https://github.com/facebook/folly/issues/2345
buffered_atomic_test.BufferedAtomic.singleThreadUnguardedAccess
)
fi
cmake_src_test
}