summaryrefslogtreecommitdiff
path: root/databases/mongodb70/files/patch-SConstruct
diff options
context:
space:
mode:
authorRonald Klop <ronald@FreeBSD.org>2023-02-15 20:30:54 +0100
committerRonald Klop <ronald@FreeBSD.org>2023-05-02 22:29:48 +0200
commita677d700a675abbbf6587954d9e2afd7eb772af7 (patch)
tree02511d6ced1ad6cd4daacbd763fac2edee3da561 /databases/mongodb70/files/patch-SConstruct
parentdatabases/mongodb50: update to 5.0.17 (diff)
databases/mongodb70: add new port
Mind that this is still a RC. Changelog: https://www.mongodb.com/docs/v7.0/release-notes/7.0/ * based on databases/mongodb60 * disabled --use-system-icu as version from ports gives an error on start-up: https://www.mongodb.com/community/forums/t/mongodb-7-0-rc0-cycle-in-dependency-graph-loadicudata/224571 * patch to compile asio-master with c++20 * commented out 'metrics_client' in SConstruct, symbol is not available in the repo, doesn't seem to be needed for the build
Diffstat (limited to 'databases/mongodb70/files/patch-SConstruct')
-rw-r--r--databases/mongodb70/files/patch-SConstruct98
1 files changed, 98 insertions, 0 deletions
diff --git a/databases/mongodb70/files/patch-SConstruct b/databases/mongodb70/files/patch-SConstruct
new file mode 100644
index 000000000000..1a7673bdce1c
--- /dev/null
+++ b/databases/mongodb70/files/patch-SConstruct
@@ -0,0 +1,98 @@
+--- SConstruct.orig 2023-04-24 16:15:19 UTC
++++ SConstruct
+@@ -23,9 +23,9 @@ import SCons.Script
+
+ import SCons
+ import SCons.Script
+-from mongo_tooling_metrics.client import get_mongo_metrics_client
+-from mongo_tooling_metrics.errors import ExternalHostException
+-from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics
++#from mongo_tooling_metrics.client import get_mongo_metrics_client
++#from mongo_tooling_metrics.errors import ExternalHostException
++#from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics
+ from site_scons.mongo import build_profiles
+
+ # This must be first, even before EnsureSConsVersion, if
+@@ -1659,22 +1659,22 @@ env.AddMethod(lambda env, name, **kwargs: add_option(n
+
+ # The placement of this is intentional. Here we setup an atexit method to store tooling metrics.
+ # We should only register this function after env, env_vars and the parser have been properly initialized.
+-try:
+- metrics_client = get_mongo_metrics_client()
+- metrics_client.register_metrics(
+- SConsToolingMetrics,
+- utc_starttime=datetime.utcnow(),
+- artifact_dir=env.Dir('$BUILD_DIR').get_abspath(),
+- env_vars=env_vars,
+- env=env,
+- parser=_parser,
+- )
+-except ExternalHostException as _:
+- pass
+-except Exception as _:
+- print(
+- "This MongoDB Virtual Workstation could not connect to the internal cluster\nThis is a non-issue, but if this message persists feel free to reach out in #server-dev-platform"
+- )
++#try:
++# metrics_client = get_mongo_metrics_client()
++# metrics_client.register_metrics(
++# SConsToolingMetrics,
++# utc_starttime=datetime.utcnow(),
++# artifact_dir=env.Dir('$BUILD_DIR').get_abspath(),
++# env_vars=env_vars,
++# env=env,
++# parser=_parser,
++# )
++#except ExternalHostException as _:
++# pass
++#except Exception as _:
++# print(
++# "This MongoDB Virtual Workstation could not connect to the internal cluster\nThis is a non-issue, but if this message persists feel free to reach out in #server-dev-platform"
++# )
+
+ if get_option('build-metrics'):
+ env['BUILD_METRICS_ARTIFACTS_DIR'] = '$BUILD_ROOT/$VARIANT_DIR'
+@@ -1812,9 +1812,9 @@ if has_option('variables-help'):
+ print(env_vars.GenerateHelpText(env))
+ Exit(0)
+
+-unknown_vars = env_vars.UnknownVariables()
+-if unknown_vars:
+- env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys())))
++#unknown_vars = env_vars.UnknownVariables()
++#if unknown_vars:
++# env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys())))
+
+ install_actions.setup(env, get_option('install-action'))
+
+@@ -3033,7 +3033,7 @@ if env.TargetOSIs('posix'):
+ # If runtime hardening is requested, then build anything
+ # destined for an executable with the necessary flags for PIE.
+ env.AppendUnique(
+- PROGCCFLAGS=['-fPIE'],
++ PROGCCFLAGS=['-fpic'],
+ PROGLINKFLAGS=['-pie'],
+ )
+
+@@ -3041,7 +3041,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",
+@@ -3224,8 +3223,12 @@ if not env.TargetOSIs('windows', 'macOS') and (env.Too
+ # setting it for both C and C++ by setting both of CFLAGS and
+ # CXXFLAGS.
+
++ arm_march_flag = "armv8-a"
++ if get_option('use-hardware-crc32') == "on":
++ arm_march_flag += "+crc"
++
+ default_targeting_flags_for_architecture = {
+- "aarch64": {"-march=": "armv8.2-a", "-mtune=": "generic"},
++ "aarch64": {"-march=": arm_march_flag, "-mtune=": "generic"},
+ "i386": {"-march=": "nocona", "-mtune=": "generic"},
+ "ppc64le": {"-mcpu=": "power8", "-mtune=": "power8", "-mcmodel=": "medium"},
+ "s390x": {"-march=": "z196", "-mtune=": "zEC12"},