[dev-db/mongodb] sync, untested
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
--- mongo-r5.0.32/SConstruct.orig 2025-12-30 22:11:04.054613342 +0100
|
||||
+++ mongo-r5.0.32/SConstruct 2025-12-30 22:11:44.334813563 +0100
|
||||
@@ -1177,7 +1177,7 @@
|
||||
https://bugs.gentoo.org/969020
|
||||
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -1177,7 +1177,7 @@ def printLocalInfo():
|
||||
|
||||
printLocalInfo()
|
||||
|
||||
@@ -9,9 +11,9 @@
|
||||
|
||||
onlyServer = len( COMMAND_LINE_TARGETS ) == 0 or ( len( COMMAND_LINE_TARGETS ) == 1 and str( COMMAND_LINE_TARGETS[0] ) in [ "mongod" , "mongos" , "test" ] )
|
||||
|
||||
--- mongo-r5.0.32/src/third_party/SConscript.orig 2025-12-30 22:11:59.084886880 +0100
|
||||
+++ mongo-r5.0.32/src/third_party/SConscript 2025-12-30 22:13:11.795248298 +0100
|
||||
@@ -347,7 +347,6 @@
|
||||
--- a/src/third_party/SConscript
|
||||
+++ b/src/third_party/SConscript
|
||||
@@ -347,7 +347,6 @@ if use_system_version_of_library("boost"):
|
||||
SYSLIBDEPS=[
|
||||
env['LIBDEPS_BOOST_PROGRAM_OPTIONS_SYSLIBDEP'],
|
||||
env['LIBDEPS_BOOST_FILESYSTEM_SYSLIBDEP'],
|
||||
|
||||
110
dev-db/mongodb/files/mongodb-7.0.28-sconstruct.patch
Normal file
110
dev-db/mongodb/files/mongodb-7.0.28-sconstruct.patch
Normal file
@@ -0,0 +1,110 @@
|
||||
wrt PATH:
|
||||
"""
|
||||
https://jira.mongodb.org/browse/SERVER-94430 Upstream respond:
|
||||
|
||||
> we intentionally do not ingest the environment PATH as this makes build
|
||||
> reproducibility and hermiticity much harder. Instead, you should set the
|
||||
> absolute paths to the tools you want to use on the command line, instead of
|
||||
> relying on the PATH.
|
||||
|
||||
Gentoo bug https://bugs.gentoo.org/829340
|
||||
|
||||
In Gentoo, we have LLVM slotted and we put clang in /usr/lib/llvm/18/bin (or
|
||||
whatever), not in /usr/bin, and if upstream strip PATH and construct it
|
||||
themselves, they surely won't contain this location.
|
||||
|
||||
So we add PATH backup for scons.
|
||||
"""
|
||||
diff --git a/SConstruct b/SConstruct
|
||||
index 2ebeb0e..44ce93a 100644
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -3034,7 +3026,6 @@ if env.TargetOSIs('posix'):
|
||||
env.Append(
|
||||
CCFLAGS=[
|
||||
"-fasynchronous-unwind-tables",
|
||||
- "-g2" if not env.TargetOSIs('emscripten') else "-g",
|
||||
"-Wall",
|
||||
"-Wsign-compare",
|
||||
"-Wno-unknown-pragmas",
|
||||
@@ -3101,6 +3092,8 @@ if env.TargetOSIs('posix'):
|
||||
|
||||
# env.Append( " -Wconversion" ) TODO: this doesn't really work yet
|
||||
env.Append(CXXFLAGS=["-Woverloaded-virtual"])
|
||||
+ env.Append(CXXFLAGS=os.environ['CXXFLAGS'])
|
||||
+ env.Append(LINKFLAGS=os.environ['LDFLAGS'])
|
||||
|
||||
# On OS X, clang doesn't want the pthread flag at link time, or it
|
||||
# issues warnings which make it impossible for us to declare link
|
||||
@@ -3151,7 +3144,7 @@ if env.TargetOSIs('posix'):
|
||||
], )
|
||||
|
||||
#make scons colorgcc friendly
|
||||
- for key in ('HOME', 'TERM'):
|
||||
+ for key in ('HOME', 'TERM', 'PATH'):
|
||||
try:
|
||||
env['ENV'][key] = os.environ[key]
|
||||
except KeyError:
|
||||
@@ -3553,33 +3546,6 @@ def doConfigure(myenv):
|
||||
myenv.AddMethod(
|
||||
functools.partial(var_func, var=var, func=CheckFlag), f"Check{var}Supported")
|
||||
|
||||
- if myenv.ToolchainIs('gcc', 'clang'):
|
||||
- # This tells clang/gcc to use the gold linker if it is available - we prefer the gold linker
|
||||
- # because it is much faster. Don't use it if the user has already configured another linker
|
||||
- # selection manually.
|
||||
- if any(flag.startswith('-fuse-ld=') for flag in env['LINKFLAGS']):
|
||||
- myenv.FatalError(
|
||||
- f"Use the '--linker' option instead of modifying the LINKFLAGS directly.")
|
||||
-
|
||||
- linker_ld = get_option('linker')
|
||||
- if linker_ld == 'auto':
|
||||
- if not env.TargetOSIs('darwin', 'macOS'):
|
||||
- if not myenv.AddToLINKFLAGSIfSupported('-fuse-ld=lld'):
|
||||
- myenv.FatalError(
|
||||
- f"The recommended linker 'lld' is not supported with the current compiler configuration, you can try the 'gold' linker with '--linker=gold'."
|
||||
- )
|
||||
- elif link_model.startswith("dynamic") and linker_ld == 'bfd':
|
||||
- # BFD is not supported due to issues with it causing warnings from some of
|
||||
- # the third party libraries that mongodb is linked with:
|
||||
- # https://jira.mongodb.org/browse/SERVER-49465
|
||||
- myenv.FatalError(f"Linker {linker_ld} is not supported with dynamic link model builds.")
|
||||
- else:
|
||||
- if not myenv.AddToLINKFLAGSIfSupported(f'-fuse-ld={linker_ld}'):
|
||||
- myenv.FatalError(f"Linker {linker_ld} could not be configured.")
|
||||
-
|
||||
- if has_option('gcov') and myenv.AddToCCFLAGSIfSupported('-fprofile-update=single'):
|
||||
- myenv.AppendUnique(LINKFLAGS=['-fprofile-update=single'])
|
||||
-
|
||||
detectCompiler = Configure(
|
||||
myenv,
|
||||
help=False,
|
||||
@@ -5119,17 +5085,13 @@ def doConfigure(myenv):
|
||||
"BOOST_LOG_NO_SHORTHAND_NAMES",
|
||||
"BOOST_LOG_USE_NATIVE_SYSLOG",
|
||||
"BOOST_LOG_WITHOUT_THREAD_ATTR",
|
||||
+ "BOOST_LOG_DYN_LINK",
|
||||
"BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS",
|
||||
"BOOST_SYSTEM_NO_DEPRECATED",
|
||||
"BOOST_THREAD_USES_DATETIME",
|
||||
("BOOST_THREAD_VERSION", "5"),
|
||||
])
|
||||
|
||||
- if link_model.startswith("dynamic") and not link_model == 'dynamic-sdk':
|
||||
- conf.env.AppendUnique(CPPDEFINES=[
|
||||
- "BOOST_LOG_DYN_LINK",
|
||||
- ])
|
||||
-
|
||||
if use_system_version_of_library("boost"):
|
||||
if not conf.CheckCXXHeader("boost/filesystem/operations.hpp"):
|
||||
myenv.ConfError("can't find boost headers")
|
||||
@@ -5326,6 +5288,9 @@ def doConfigure(myenv):
|
||||
|
||||
mongoc_mode = get_option('use-system-mongo-c')
|
||||
conf.env['MONGO_HAVE_LIBMONGOC'] = False
|
||||
+ conf.env.ParseConfig('pkg-config libbson-1.0 libmongoc-1.0 --cflags')
|
||||
+ conf.env['LIBDEPS_LIBBSON_SYSLIBDEP'] = 'bson-1.0'
|
||||
+
|
||||
if mongoc_mode != 'off':
|
||||
if conf.CheckLibWithHeader(
|
||||
["mongoc-1.0"],
|
||||
@@ -1,6 +1,8 @@
|
||||
diff '--color=auto' -dupr mongo-r8.0.12.orig/SConstruct mongo-r8.0.12/SConstruct
|
||||
--- mongo-r8.0.12.orig/SConstruct 2025-12-24 07:40:37.384561186 +0100
|
||||
+++ mongo-r8.0.12/SConstruct 2025-12-24 07:40:53.107849946 +0100
|
||||
https://bugs.gentoo.org/963976
|
||||
https://bugs.gentoo.org/969020
|
||||
|
||||
--- mongo-r8.0.12.orig/SConstruct
|
||||
+++ mongo-r8.0.12/SConstruct
|
||||
@@ -1683,7 +1683,7 @@ def printLocalInfo():
|
||||
|
||||
printLocalInfo()
|
||||
@@ -10,9 +12,8 @@ diff '--color=auto' -dupr mongo-r8.0.12.orig/SConstruct mongo-r8.0.12/SConstruct
|
||||
|
||||
onlyServer = len(COMMAND_LINE_TARGETS) == 0 or (len(COMMAND_LINE_TARGETS) == 1 and str(
|
||||
COMMAND_LINE_TARGETS[0]) in ["mongod", "mongos", "test"])
|
||||
diff '--color=auto' -dupr mongo-r8.0.12.orig/src/third_party/SConscript mongo-r8.0.12/src/third_party/SConscript
|
||||
--- mongo-r8.0.12.orig/src/third_party/SConscript 2025-12-24 07:40:37.718019419 +0100
|
||||
+++ mongo-r8.0.12/src/third_party/SConscript 2025-12-24 07:41:15.134959202 +0100
|
||||
--- mongo-r8.0.12.orig/src/third_party/SConscript
|
||||
+++ mongo-r8.0.12/src/third_party/SConscript
|
||||
@@ -436,7 +436,6 @@ if use_system_version_of_library("boost"
|
||||
boostEnv = boostEnv.Clone(SYSLIBDEPS=[
|
||||
env['LIBDEPS_BOOST_PROGRAM_OPTIONS_SYSLIBDEP'],
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
|
||||
SCONS_MIN_VERSION="3.3.1"
|
||||
CHECKREQS_DISK_BUILD="2400M"
|
||||
@@ -23,7 +23,7 @@ S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="Apache-2.0 SSPL-1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 -riscv"
|
||||
KEYWORDS="amd64 ~arm64 -riscv"
|
||||
CPU_FLAGS="cpu_flags_x86_avx"
|
||||
IUSE="debug kerberos mongosh ssl +tools ${CPU_FLAGS}"
|
||||
|
||||
@@ -82,9 +82,7 @@ PATCHES=(
|
||||
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.30-gcc-15.patch"
|
||||
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.26-scons.patch"
|
||||
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.26-mozjs-remove-unused-constructor.patch"
|
||||
# removed in boost-1.89.0, unnecessary earlier
|
||||
"${FILESDIR}/${PN}-5.0.32-boost-system.patch"
|
||||
"${FILESDIR}/${PN}-5.0.32-pkg-resources.patch"
|
||||
"${FILESDIR}/mongodb-5.0.32-boost-system.patch"
|
||||
)
|
||||
|
||||
python_check_deps() {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
|
||||
SCONS_MIN_VERSION="3.3.1"
|
||||
CHECKREQS_DISK_BUILD="2400M"
|
||||
@@ -23,7 +23,7 @@ S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="Apache-2.0 SSPL-1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 -riscv"
|
||||
KEYWORDS="amd64 ~arm64 -riscv"
|
||||
CPU_FLAGS="cpu_flags_x86_avx"
|
||||
IUSE="debug kerberos mongosh ssl +tools ${CPU_FLAGS}"
|
||||
|
||||
@@ -74,19 +74,15 @@ PATCHES=(
|
||||
"${WORKDIR}/mongodb-6.0.22-patches/mongodb-6.0.7-gcc-13.patch"
|
||||
"${WORKDIR}/mongodb-6.0.22-patches/mongodb-6.0.21-boost-1.85.patch"
|
||||
"${WORKDIR}/mongodb-6.0.22-patches/mongodb-6.0.2-sconstruct-changes.patch"
|
||||
"${FILESDIR}/mongodb-6.0.21-mozjs-remove-unused-constructor.patch"
|
||||
"${FILESDIR}/mongodb-5.0.30-gcc-15.patch"
|
||||
# removed in boost-1.89.0, unnecessary earlier
|
||||
"${FILESDIR}/${PN}-5.0.32-boost-system.patch"
|
||||
"${FILESDIR}/${PN}-5.0.32-pkg-resources.patch"
|
||||
"${FILESDIR}/mongodb-5.0.32-boost-system.patch"
|
||||
)
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version -b ">=dev-build/scons-3.1.1[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/cheetah3[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/psutil[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/pymongo[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]"
|
||||
python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/pymongo[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
|
||||
SCONS_MIN_VERSION="4.9.1"
|
||||
CHECKREQS_DISK_BUILD="2400M"
|
||||
@@ -24,7 +24,7 @@ S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="Apache-2.0 SSPL-1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 -riscv"
|
||||
KEYWORDS="amd64 ~arm64 -riscv"
|
||||
CPU_FLAGS="cpu_flags_x86_avx"
|
||||
IUSE="debug kerberos mongosh ssl +tools ${CPU_FLAGS}"
|
||||
|
||||
@@ -38,6 +38,7 @@ RDEPEND="acct-group/mongodb
|
||||
app-arch/zstd:=
|
||||
>=dev-cpp/yaml-cpp-0.6.2:=
|
||||
dev-libs/boost:=[nls]
|
||||
>=dev-libs/libpcre-8.42[cxx]
|
||||
dev-libs/snowball-stemmer:=
|
||||
net-misc/curl
|
||||
dev-libs/libbson
|
||||
@@ -68,17 +69,13 @@ PDEPEND="
|
||||
|
||||
PATCHES=(
|
||||
"${WORKDIR}/mongodb-7.0.18-patches/mongodb-4.4.29-no-enterprise.patch"
|
||||
"${WORKDIR}/mongodb-7.0.18-patches/${PN}-5.0.2-no-compass.patch"
|
||||
"${WORKDIR}/mongodb-7.0.18-patches/${PN}-5.0.2-skip-reqs-check.patch"
|
||||
"${WORKDIR}/mongodb-7.0.18-patches/${PN}-4.4.10-boost-1.81.patch"
|
||||
"${FILESDIR}/${PN}-7.0.1-sconstruct.patch"
|
||||
"${WORKDIR}/mongodb-7.0.18-patches/mongodb-5.0.2-no-compass.patch"
|
||||
"${WORKDIR}/mongodb-7.0.18-patches/mongodb-5.0.2-skip-reqs-check.patch"
|
||||
"${WORKDIR}/mongodb-7.0.18-patches/mongodb-4.4.10-boost-1.81.patch"
|
||||
"${WORKDIR}/mongodb-7.0.18-patches/extrapatch-sconstruct.patch"
|
||||
"${WORKDIR}/mongodb-7.0.18-patches/mongodb-7.0.18-boost-1.85.patch"
|
||||
"${FILESDIR}/mongodb-7.0.28-gcc-15.patch"
|
||||
# removed in boost-1.89.0, unnecessary earlier
|
||||
"${FILESDIR}/${PN}-8.0.12-boost-system.patch"
|
||||
"${FILESDIR}/${PN}-5.0.32-pkg-resources.patch"
|
||||
|
||||
"${FILESDIR}/mongodb-7.0.28-sconstruct.patch"
|
||||
"${FILESDIR}/mongodb-8.0.12-boost-system.patch"
|
||||
)
|
||||
|
||||
python_check_deps() {
|
||||
|
||||
Reference in New Issue
Block a user