public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/folly/, dev-cpp/folly/files/
@ 2022-08-12 18:40 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-08-12 18:40 UTC (permalink / raw
  To: gentoo-commits

commit:     4ad0d9de826a89b6ff0dec451e73bbeecd93e4a8
Author:     brahmajit das <listout <AT> protonmail <DOT> com>
AuthorDate: Wed Aug 10 10:37:58 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug 12 18:39:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ad0d9de

dev-cpp/folly: Fix musl build

Fixes "ELFCLASSFOLLY_ELF_NATIVE_CLASS was not declared in this scope".

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#issuecomment-719883898

Closes: https://bugs.gentoo.org/835744
Signed-off-by: brahmajit das <listout <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26807
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../folly/files/folly-2022.07.04.00-musl-fix.patch | 36 ++++++++++++++++++++++
 dev-cpp/folly/folly-2022.07.04.00.ebuild           |  4 +++
 2 files changed, 40 insertions(+)

diff --git a/dev-cpp/folly/files/folly-2022.07.04.00-musl-fix.patch b/dev-cpp/folly/files/folly-2022.07.04.00-musl-fix.patch
new file mode 100644
index 000000000000..001af39625c5
--- /dev/null
+++ b/dev-cpp/folly/files/folly-2022.07.04.00-musl-fix.patch
@@ -0,0 +1,36 @@
+# 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/experimental/symbolizer/Elf.cpp
++++ b/folly/experimental/symbolizer/Elf.cpp
+@@ -39,12 +39,10 @@
+
+ #if defined(__ELF_NATIVE_CLASS)
+ #define FOLLY_ELF_NATIVE_CLASS __ELF_NATIVE_CLASS
+-#elif defined(__FreeBSD__)
+-#if defined(__LP64__)
++#elif defined(__LP64__)
+ #define FOLLY_ELF_NATIVE_CLASS 64
+ #else
+ #define FOLLY_ELF_NATIVE_CLASS 32
+-#endif
+ #endif // __ELF_NATIVE_CLASS
+
+ namespace folly {
+--- a/folly/experimental/symbolizer/Elf.h
++++ b/folly/experimental/symbolizer/Elf.h
+@@ -24,6 +24,7 @@
+ #include <initializer_list>
+ #include <stdexcept>
+ #include <system_error>
++#include <sys/types.h>
+
+ #include <folly/Conv.h>
+ #include <folly/Likely.h>

diff --git a/dev-cpp/folly/folly-2022.07.04.00.ebuild b/dev-cpp/folly/folly-2022.07.04.00.ebuild
index e4b9470d848e..4107d94ca13b 100644
--- a/dev-cpp/folly/folly-2022.07.04.00.ebuild
+++ b/dev-cpp/folly/folly-2022.07.04.00.ebuild
@@ -39,6 +39,10 @@ DEPEND="${RDEPEND}
 	sys-libs/binutils-libs"
 BDEPEND="test? ( sys-devel/clang )"
 
+PATCHES=(
+	"${FILESDIR}/${PN}"-2022.07.04.00-musl-fix.patch
+)
+
 pkg_setup() {
 	[[ ${BUILD_TYPE} == "binary" ]] && return
 


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/folly/, dev-cpp/folly/files/
@ 2023-11-25  6:21 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-11-25  6:21 UTC (permalink / raw
  To: gentoo-commits

commit:     a316d1d8e85646caa2a8bd8ff5238aacd3123b93
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 25 06:17:14 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 25 06:19:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a316d1d8

dev-cpp/folly: drop 2023.02.06.00, 2023.05.22.00

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-cpp/folly/Manifest                             |   2 -
 .../folly/files/folly-2022.07.04.00-musl-fix.patch |  36 -------
 dev-cpp/folly/folly-2023.02.06.00.ebuild           | 105 ---------------------
 dev-cpp/folly/folly-2023.05.22.00.ebuild           |  90 ------------------
 4 files changed, 233 deletions(-)

diff --git a/dev-cpp/folly/Manifest b/dev-cpp/folly/Manifest
index 0f7c876c562f..6516ea9b2298 100644
--- a/dev-cpp/folly/Manifest
+++ b/dev-cpp/folly/Manifest
@@ -1,3 +1 @@
-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-2022.07.04.00-musl-fix.patch b/dev-cpp/folly/files/folly-2022.07.04.00-musl-fix.patch
deleted file mode 100644
index 001af39625c5..000000000000
--- a/dev-cpp/folly/files/folly-2022.07.04.00-musl-fix.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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/experimental/symbolizer/Elf.cpp
-+++ b/folly/experimental/symbolizer/Elf.cpp
-@@ -39,12 +39,10 @@
-
- #if defined(__ELF_NATIVE_CLASS)
- #define FOLLY_ELF_NATIVE_CLASS __ELF_NATIVE_CLASS
--#elif defined(__FreeBSD__)
--#if defined(__LP64__)
-+#elif defined(__LP64__)
- #define FOLLY_ELF_NATIVE_CLASS 64
- #else
- #define FOLLY_ELF_NATIVE_CLASS 32
--#endif
- #endif // __ELF_NATIVE_CLASS
-
- namespace folly {
---- a/folly/experimental/symbolizer/Elf.h
-+++ b/folly/experimental/symbolizer/Elf.h
-@@ -24,6 +24,7 @@
- #include <initializer_list>
- #include <stdexcept>
- #include <system_error>
-+#include <sys/types.h>
-
- #include <folly/Conv.h>
- #include <folly/Likely.h>

diff --git a/dev-cpp/folly/folly-2023.02.06.00.ebuild b/dev-cpp/folly/folly-2023.02.06.00.ebuild
deleted file mode 100644
index 0e5c76e971c1..000000000000
--- a/dev-cpp/folly/folly-2023.02.06.00.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# 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 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"
-S="${WORKDIR}"
-
-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 )"
-BDEPEND="test? ( sys-devel/clang )"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-2022.07.04.00-musl-fix.patch
-)
-
-pkg_setup() {
-	[[ ${BUILD_TYPE} == binary ]] && return
-
-	if use test && ! tc-is-clang ; then
-		# Always build w/ Clang for now to avoid gcc ICE
-		# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106230
-		#if [[ $(gcc-major-version) -eq 12 ]] ; then
-		#	return
-		#fi
-
-		## Only older GCC 11 is broken
-		#if [[ $(gcc-major-version) -eq 11 && $(gcc-minor-version) -ge 3 && $(gcc-micro-version) -ge 1 ]] ; then
-		#	return
-		#fi
-
-		ewarn "Forcing build with Clang due to GCC bug (because tests are enabled)"
-		#ewarn "(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104008)"
-
-		export CC=${CHOST}-clang
-		export CXX=${CHOST}-clang++
-	fi
-}
-
-src_configure() {
-	# Fragile when changing compilers
-	export CCACHE_DISABLE=1
-
-	# 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!
-		-E "(timeseries_histogram_test.TimeseriesHistogram.Percentile|HHWheelTimerTest.HHWheelTimerTest.CancelTimeout|concurrent_hash_map_test.*)"
-	)
-
-	cmake_src_test
-}

diff --git a/dev-cpp/folly/folly-2023.05.22.00.ebuild b/dev-cpp/folly/folly-2023.05.22.00.ebuild
deleted file mode 100644
index 11d6692f182c..000000000000
--- a/dev-cpp/folly/folly-2023.05.22.00.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# 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
-)
-
-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
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/folly/, dev-cpp/folly/files/
@ 2024-11-11 22:25 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-11-11 22:25 UTC (permalink / raw
  To: gentoo-commits

commit:     1be380a22acfc4365324d0a8fa3b2904e32ed284
Author:     sin-ack <sin-ack <AT> protonmail <DOT> com>
AuthorDate: Sun Nov 10 19:44:20 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 11 22:24:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1be380a2

dev-cpp/folly: add 2024.11.04.00

Signed-off-by: sin-ack <sin-ack <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-cpp/folly/Manifest                             |  1 +
 .../folly/files/folly-2024.11.04.00-musl-fix.patch | 30 +++++++
 dev-cpp/folly/folly-2024.11.04.00.ebuild           | 91 ++++++++++++++++++++++
 3 files changed, 122 insertions(+)

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
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/folly/, dev-cpp/folly/files/
@ 2025-04-24 23:33 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2025-04-24 23:33 UTC (permalink / raw
  To: gentoo-commits

commit:     8ac2ad88832e37b7df16a842a1cbc57d259431e4
Author:     sin-ack <sin-ack <AT> protonmail <DOT> com>
AuthorDate: Thu Apr 24 21:06:43 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 24 23:31:44 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ac2ad88

dev-cpp/folly: add IUSE io-uring

There are three different problems being addressed here:

1. Recent Folly versions depend on liburing features that have not yet
   been released.
2. Folly has no build system configuration option to disable io_uring
   support.
3. Folly's CMake build system will unconditionally add liburing as a
   library to link against, which downstream Facebook libraries rely on.

The third one creates an implicit dependency between Folly and liburing
which means if liburing gets depcleaned or otherwise unmerged, other
Facebook packages will fail to build.

We solve this by conditionally patching out io_uring support based on
USE=io-uring and having a (currently technically invalid) dependency
on the yet-unreleased liburing-2.10, which will make it automagically
start working once we do have that release in ::gentoo.

Ref: https://github.com/facebook/folly/issues/2420
Bug: https://bugs.gentoo.org/954335
Signed-off-by: sin-ack <sin-ack <AT> protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41734
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...025.04.14.00-CMake-Avoid-finding-liburing.patch | 30 ++++++++++++++++++++++
 ....14.00.ebuild => folly-2025.04.14.00-r1.ebuild} | 25 +++++++++---------
 2 files changed, 43 insertions(+), 12 deletions(-)

diff --git a/dev-cpp/folly/files/folly-2025.04.14.00-CMake-Avoid-finding-liburing.patch b/dev-cpp/folly/files/folly-2025.04.14.00-CMake-Avoid-finding-liburing.patch
new file mode 100644
index 000000000000..80399fb9c432
--- /dev/null
+++ b/dev-cpp/folly/files/folly-2025.04.14.00-CMake-Avoid-finding-liburing.patch
@@ -0,0 +1,30 @@
+From a0d86ed3bc2150ddfad50ab1b2eb09bea7a277d2 Mon Sep 17 00:00:00 2001
+From: sin-ack <sin-ack@protonmail.com>
+Date: Thu, 24 Apr 2025 20:59:06 +0000
+Subject: [PATCH] CMake: Avoid finding liburing
+
+Otherwise, Folly will unconditionally add it to the list of libraries to
+link even if io_uring support is otherwise disabled, creating an
+implicit dependency on it that can't be tracked by package managers.
+---
+ CMake/folly-deps.cmake | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
+index 6ce4c679a..b1e20a901 100644
+--- a/CMake/folly-deps.cmake
++++ b/CMake/folly-deps.cmake
+@@ -139,10 +139,6 @@ find_package(LibAIO)
+ list(APPEND FOLLY_LINK_LIBRARIES ${LIBAIO_LIBRARIES})
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBAIO_INCLUDE_DIRS})
+ 
+-find_package(LibUring)
+-list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES})
+-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS})
+-
+ find_package(Libsodium)
+ list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES})
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBSODIUM_INCLUDE_DIRS})
+-- 
+2.49.0
+

diff --git a/dev-cpp/folly/folly-2025.04.14.00.ebuild b/dev-cpp/folly/folly-2025.04.14.00-r1.ebuild
similarity index 81%
rename from dev-cpp/folly/folly-2025.04.14.00.ebuild
rename to dev-cpp/folly/folly-2025.04.14.00-r1.ebuild
index 05ec9d0a3f03..48695a36dd84 100644
--- a/dev-cpp/folly/folly-2025.04.14.00.ebuild
+++ b/dev-cpp/folly/folly-2025.04.14.00-r1.ebuild
@@ -22,16 +22,9 @@ SRC_URI="https://github.com/facebook/folly/releases/download/v${PV}/${PN}-v${PV}
 LICENSE="Apache-2.0"
 SLOT="0/${PV}"
 KEYWORDS="~amd64 ~arm64 ~ppc64"
-IUSE="llvm-libunwind test"
+IUSE="io-uring 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:=
@@ -51,8 +44,8 @@ RDEPEND="
 	sys-libs/zlib
 	llvm-libunwind? ( llvm-runtimes/libunwind:= )
 	!llvm-libunwind? ( sys-libs/libunwind:= )
+	io-uring? ( >=sys-libs/liburing-2.10:= )
 "
-# libiberty is linked statically
 DEPEND="
 	${RDEPEND}
 	sys-libs/binutils-libs
@@ -61,9 +54,6 @@ DEPEND="
 
 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() {
@@ -73,6 +63,17 @@ src_unpack() {
 	default
 }
 
+src_prepare() {
+	# Folly has no configuration option for disabling io_uring support
+	# so we need to patch it out.
+	if use !io-uring; then
+		eapply "${FILESDIR}"/${PN}-2025.04.14.00-force-liburing-off.patch
+		eapply "${FILESDIR}"/${PN}-2025.04.14.00-CMake-Avoid-finding-liburing.patch
+	fi
+
+	cmake_src_prepare
+}
+
 src_configure() {
 	local mycmakeargs=(
 		-DCMAKE_INSTALL_DIR="$(get_libdir)/cmake/${PN}"


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-24 23:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-12 18:40 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/folly/, dev-cpp/folly/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-11-25  6:21 Sam James
2024-11-11 22:25 Sam James
2025-04-24 23:33 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox