summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsin-ack <sin-ack@protonmail.com>2024-11-10 20:44:20 +0100
committerSam James <sam@gentoo.org>2024-11-11 22:24:15 +0000
commit1be380a22acfc4365324d0a8fa3b2904e32ed284 (patch)
tree270a1c3af3b3b8b2a64952ba65f734f63604ccfa /dev-cpp
parentprofiles/arch/loong: force dev-util/bpftool[clang] (diff)
downloadgentoo-1be380a22acfc4365324d0a8fa3b2904e32ed284.tar.gz
gentoo-1be380a22acfc4365324d0a8fa3b2904e32ed284.tar.bz2
gentoo-1be380a22acfc4365324d0a8fa3b2904e32ed284.zip
dev-cpp/folly: add 2024.11.04.00
Signed-off-by: sin-ack <sin-ack@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/folly/Manifest1
-rw-r--r--dev-cpp/folly/files/folly-2024.11.04.00-musl-fix.patch30
-rw-r--r--dev-cpp/folly/folly-2024.11.04.00.ebuild91
3 files changed, 122 insertions, 0 deletions
diff --git a/dev-cpp/folly/Manifest b/dev-cpp/folly/Manifest
index 6516ea9b2298..529f0a646c6e 100644
--- a/dev-cpp/folly/Manifest
+++ b/dev-cpp/folly/Manifest
@@ -1 +1,2 @@
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
diff --git a/dev-cpp/folly/files/folly-2024.11.04.00-musl-fix.patch b/dev-cpp/folly/files/folly-2024.11.04.00-musl-fix.patch
new file mode 100644
index 000000000000..df9a1db734a3
--- /dev/null
+++ b/dev-cpp/folly/files/folly-2024.11.04.00-musl-fix.patch
@@ -0,0 +1,30 @@
+# Elf.cpp expects __ELF_NATIVE_CLASS to be defined at least for platforms
+# besides FreeBSD-based ones, and so it defines FOLLY_ELF_NATIVE_CLASS with it.
+# Without __ELF_NATIVE_CLASS (and apparently musl does not define it),
+# FOLLY_ELF_NATIVE_CLASS is also not defined so what was supposed to be
+# expanded to ELFCLASS32 or ELFCLASS64 ends up being
+# ELFCLASSFOLLY_ELF_NATIVE_CLASS.
+#
+# Please refer: https://github.com/facebook/folly/issues/1478
+#
+# Closes: https://bugs.gentoo.org/835744
+--- a/folly/debugging/symbolizer/Elf.cpp
++++ b/folly/debugging/symbolizer/Elf.cpp
+@@ -40,14 +40,12 @@
+
+ #if defined(__ELF_NATIVE_CLASS)
+ #define FOLLY_ELF_NATIVE_CLASS __ELF_NATIVE_CLASS
+-#elif defined(__FreeBSD__)
+-#if defined(__LP64__)
++#elif defined(__ANDROID__)
++#define FOLLY_ELF_NATIVE_CLASS __WORDSIZE
++#elif defined(__LP64__)
+ #define FOLLY_ELF_NATIVE_CLASS 64
+ #else
+ #define FOLLY_ELF_NATIVE_CLASS 32
+-#endif
+-#elif defined(__ANDROID__)
+-#define FOLLY_ELF_NATIVE_CLASS __WORDSIZE
+ #endif // __ELF_NATIVE_CLASS
+
+ namespace folly {
diff --git a/dev-cpp/folly/folly-2024.11.04.00.ebuild b/dev-cpp/folly/folly-2024.11.04.00.ebuild
new file mode 100644
index 000000000000..27be95cd3414
--- /dev/null
+++ b/dev-cpp/folly/folly-2024.11.04.00.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2024 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 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/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/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}-2024.11.04.00-musl-fix.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() {
+ 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.*'
+ )
+
+ cmake_src_test
+}