From abbda3f7014704cf42a1ecacba6833416a1b16a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Tue, 17 Dec 2024 16:19:51 +0100 Subject: [PATCH] [dev-db/mongodb] fix patch for 6 and up --- ...0.19-mozjs-remove-unused-constructor.patch | 23 +++++++++++++++++++ dev-db/mongodb/mongodb-6.0.19.ebuild | 7 +++++- dev-db/mongodb/mongodb-7.0.15.ebuild | 7 +++++- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 dev-db/mongodb/files/mongodb-6.0.19-mozjs-remove-unused-constructor.patch diff --git a/dev-db/mongodb/files/mongodb-6.0.19-mozjs-remove-unused-constructor.patch b/dev-db/mongodb/files/mongodb-6.0.19-mozjs-remove-unused-constructor.patch new file mode 100644 index 0000000..372c2f5 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-6.0.19-mozjs-remove-unused-constructor.patch @@ -0,0 +1,23 @@ +https://phabricator.services.mozilla.com/D209108 +https://github.com/mozilla/gecko-dev/commit/33cdc6655b0de44cb7a431216dcbb0d5a552aec6 + +clang 19 will report error if w/o this patch: + + src/third_party/mozjs/extract/js/src/threading/ExclusiveData.h:113:29: error: reference to non-static member function must be called + +diff --git a/src/third_party/mozjs/extract/js/src/threading/ExclusiveData.h b/src/third_party/mozjs/extract/js/src/threading/ExclusiveData.h +index c43cd1797ca..c401797fafd 100644 +--- a/src/third_party/mozjs/extract/js/src/threading/ExclusiveData.h ++++ b/src/third_party/mozjs/extract/js/src/threading/ExclusiveData.h +@@ -109,11 +109,6 @@ class ExclusiveData { + explicit ExclusiveData(const MutexId& id, Args&&... args) + : lock_(id), value_(std::forward(args)...) {} + +- ExclusiveData(ExclusiveData&& rhs) +- : lock_(std::move(rhs.lock)), value_(std::move(rhs.value_)) { +- MOZ_ASSERT(&rhs != this, "self-move disallowed!"); +- } +- + ExclusiveData& operator=(ExclusiveData&& rhs) { + this->~ExclusiveData(); + new (mozilla::KnownNotNull, this) ExclusiveData(std::move(rhs)); diff --git a/dev-db/mongodb/mongodb-6.0.19.ebuild b/dev-db/mongodb/mongodb-6.0.19.ebuild index d531103..d4a2da9 100644 --- a/dev-db/mongodb/mongodb-6.0.19.ebuild +++ b/dev-db/mongodb/mongodb-6.0.19.ebuild @@ -76,7 +76,7 @@ PATCHES=( "${FILESDIR}/${PN}-6.0.18-boost-1.85.patch" "${FILESDIR}/${PN}-5.0.30-gcc-15.patch" "${FILESDIR}/${PN}-5.0.26-scons.patch" - "${FILESDIR}/${PN}-5.0.26-mozjs-remove-unused-constructor.patch" + "${FILESDIR}/${PN}-6.0.19-mozjs-remove-unused-constructor.patch" ) python_check_deps() { @@ -123,6 +123,11 @@ src_configure() { # --use-system-tcmalloc is strongly NOT recommended: # for MONGO_GIT_HASH use GitOrigin-RevId from the commit of the tag scons_opts=( + AR="$(tc-getAR)" + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + CCFLAGS="${CXXFLAGS}" + VERBOSE=1 VARIANT_DIR=gentoo MONGO_VERSION="${PV}" diff --git a/dev-db/mongodb/mongodb-7.0.15.ebuild b/dev-db/mongodb/mongodb-7.0.15.ebuild index 3f6226b..550b1e1 100644 --- a/dev-db/mongodb/mongodb-7.0.15.ebuild +++ b/dev-db/mongodb/mongodb-7.0.15.ebuild @@ -69,7 +69,7 @@ PATCHES=( "${FILESDIR}/${PN}-7.0.15-system-boost.patch" "${FILESDIR}/${PN}-7.0.15-gcc-15.patch" "${FILESDIR}/${PN}-5.0.26-scons.patch" - "${FILESDIR}/${PN}-5.0.26-mozjs-remove-unused-constructor.patch" + "${FILESDIR}/${PN}-6.0.19-mozjs-remove-unused-constructor.patch" ) python_check_deps() { @@ -116,6 +116,11 @@ src_configure() { # --use-system-tcmalloc is strongly NOT recommended: # for MONGO_GIT_HASH use GitOrigin-RevId from the commit of the tag scons_opts=( + AR="$(tc-getAR)" + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + CCFLAGS="${CXXFLAGS}" + VERBOSE=1 VARIANT_DIR=gentoo MONGO_VERSION="${PV}"