head 1.3; access; symbols pkgsrc-2026Q1:1.3.0.2 pkgsrc-2026Q1-base:1.3 pkgsrc-2025Q4:1.2.0.6 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.4 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.2 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.1.0.14 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.12 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.10 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.8 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.6 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.4 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.2 pkgsrc-2023Q3-base:1.1; locks; strict; comment @# @; 1.3 date 2026.02.19.08.38.08; author wiz; state Exp; branches; next 1.2; commitid pcKbwt7Ejy0jPXuG; 1.2 date 2025.04.26.13.53.10; author tnn; state Exp; branches; next 1.1; commitid mtHYrItyUKN78zSF; 1.1 date 2023.07.29.11.51.15; author adam; state Exp; branches; next ; commitid ac6VFWlHRfbRYGyE; desc @@ 1.3 log @mongodb4: fix build with setuptools 82 @ text @$NetBSD: patch-SConstruct,v 1.2 2025/04/26 13:53:10 tnn Exp $ Add support for NetBSD and Dragonfly. Fix locations. Don't compile with debug info. Don't mess with the linker. Respect LDFLAGS and CXXFLAGS. Fix compatibility issue with scons 4.9's CheckLibWithHeader Fix build with setuptools 82 (pkg_resources removal). --- SConstruct.orig 2025-12-22 23:06:05.000000000 +0000 +++ SConstruct @@@@ -16,8 +16,6 @@@@ from glob import glob import uuid from glob import glob -from pkg_resources import parse_version - import SCons # This must be first, even before EnsureSConsVersion, if @@@@ -1189,6 +1187,7 @@@@ envDict = dict(BUILD_ROOT=buildDir, CONFIGURELOG='$BUILD_ROOT/scons/config.log', CONFIG_HEADER_DEFINES={}, LIBDEPS_TAG_EXPANSIONS=[], + ENV=os.environ, ) # TODO: Remove these when hygienic builds are default. @@@@ -1360,7 +1359,9 @@@@ os_macros = { os_macros = { "windows": "defined(_WIN32)", "solaris": "defined(__sun)", + "dragonfly": "defined(__DragonFly__)", "freebsd": "defined(__FreeBSD__)", + "netbsd": "defined(__NetBSD__)", "openbsd": "defined(__OpenBSD__)", "iOS": "defined(__APPLE__) && TARGET_OS_IOS && !TARGET_OS_SIMULATOR", "iOS-sim": "defined(__APPLE__) && TARGET_OS_IOS && TARGET_OS_SIMULATOR", @@@@ -1852,7 +1853,7 @@@@ if env['_LIBDEPS'] == '$_LIBDEPS_LIBS': if not env.TargetOSIs('solaris', 'darwin', 'windows', 'openbsd'): env.Tool('thin_archive') -if env.TargetOSIs('linux', 'freebsd', 'openbsd'): +if env.TargetOSIs('linux', 'freebsd', 'openbsd', 'netbsd', 'dragonfly'): # NOTE: The leading and trailing spaces here are important. Do not remove them. env['LINK_WHOLE_ARCHIVE_LIB_START'] = '-Wl,--whole-archive ' env['LINK_WHOLE_ARCHIVE_LIB_END'] = ' -Wl,--no-whole-archive' @@@@ -1892,14 +1893,14 @@@@ elif env.TargetOSIs('solaris'): elif env.TargetOSIs('solaris'): env.Append( LIBS=["socket","resolv","lgrp"] ) -elif env.TargetOSIs('freebsd'): +elif env.TargetOSIs('freebsd', 'dragonfly'): env.Append( LIBS=[ "kvm" ] ) env.Append( CCFLAGS=[ "-fno-omit-frame-pointer" ] ) elif env.TargetOSIs('darwin'): env.Append( LIBS=["resolv"] ) -elif env.TargetOSIs('openbsd'): +elif env.TargetOSIs('netbsd', 'openbsd'): env.Append( LIBS=[ "kvm" ] ) elif env.TargetOSIs('windows'): @@@@ -2197,7 +2198,6 @@@@ if env.TargetOSIs('posix'): env.Append( CCFLAGS=["-fno-omit-frame-pointer", "-fno-strict-aliasing", "-fasynchronous-unwind-tables", - "-ggdb" if not env.TargetOSIs('emscripten') else "-g", "-pthread", "-Wall", "-Wsign-compare", @@@@ -2860,9 +2860,9 @@@@ def doConfigure(myenv): if usingLibStdCxx: def CheckModernLibStdCxx(context): test_body = """ - #if !__has_include() - #error "libstdc++ from GCC 5.3.0 or newer is required" - #endif + //#if !__has_include() + //#error "libstdc++ from GCC 5.3.0 or newer is required" + //#endif """ context.Message('Checking for libstdc++ 5.3.0 or better... ') @@@@ -3217,7 +3217,7 @@@@ def doConfigure(myenv): # myenv.Append( CCFLAGS=["/Zc:inline"]) - if myenv.ToolchainIs('gcc', 'clang'): + if myenv.ToolchainIs('gcc', 'clang') and get_option('runtime-hardening') == "on": # 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. @@@@ -3449,8 +3449,9 @@@@ def doConfigure(myenv): def checkOpenSSL(conf): sslLibName = "ssl" cryptoLibName = "crypto" - sslLinkDependencies = ["crypto", "dl"] - if conf.env.TargetOSIs('freebsd'): + if conf.env.TargetOSIs('linux', 'solaris'): + sslLinkDependencies = ["crypto", "dl"] + else: sslLinkDependencies = ["crypto"] if conf.env.TargetOSIs('windows'): @@@@ -3499,7 +3500,7 @@@@ def doConfigure(myenv): cryptoLibName, ["openssl/crypto.h"], "C", - "SSLeay_version(0);", + call="SSLeay_version(0);", autoadd=True): maybeIssueDarwinSSLAdvice(conf.env) conf.env.ConfError("Couldn't find OpenSSL crypto.h header and library") @@@@ -3656,7 +3657,7 @@@@ def doConfigure(myenv): if conf.CheckLibWithHeader( "curl", ["curl/curl.h"], "C", - "curl_global_init(0);", + call="curl_global_init(0);", autoadd=False): return True @@@@ -3782,12 +3783,12 @@@@ def doConfigure(myenv): "sasl2", ["stddef.h","sasl/sasl.h"], "C", - "sasl_version_info(0, 0, 0, 0, 0, 0);", + call="sasl_version_info(0, 0, 0, 0, 0, 0);", autoadd=False ): myenv.ConfError("Couldn't find SASL header/libraries") # requires ports devel/libexecinfo to be installed - if env.TargetOSIs('freebsd', 'openbsd'): + if env.TargetOSIs('dragonfly', 'freebsd', 'netbsd', 'openbsd'): if not conf.CheckLib("execinfo"): myenv.ConfError("Cannot find libexecinfo, please install devel/libexecinfo.") @@@@ -3947,7 +3948,7 @@@@ def doConfigure(myenv): ["mongoc-1.0"], ["mongoc/mongoc.h"], "C", - "mongoc_get_major_version();", + call="mongoc_get_major_version();", autoadd=False ): conf.env['MONGO_HAVE_LIBMONGOC'] = "library" if not conf.env['MONGO_HAVE_LIBMONGOC'] and env.TargetOSIs('darwin') and conf.CheckMongoCFramework(): @@@@ -4130,10 +4131,6 @@@@ if get_option('ninja') != 'disabled': env.SetOption('num_jobs', cpu_count) if get_option('ninja') != 'disabled': - - if 'ICECREAM_VERSION' in env and not env.get('CCACHE', None): - if env['ICECREAM_VERSION'] < parse_version("1.2"): - env.FatalError("Use of ccache is mandatory with --ninja and icecream older than 1.2. You are running {}.".format(env['ICECREAM_VERSION'])) ninja_builder = Tool("ninja") env["NINJA_BUILDDIR"] = env.Dir("$BUILD_DIR/ninja") @ 1.2 log @mongodb4: fix compatibility issue with scons 4.9's CheckLibWithHeader @ text @d1 1 a1 1 $NetBSD: patch-SConstruct,v 1.1 2023/07/29 11:51:15 adam Exp $ d9 1 d11 1 a11 1 --- SConstruct.orig 2024-02-13 08:46:45.000000000 +0000 d13 10 a22 1 @@@@ -1189,6 +1189,7 @@@@ envDict = dict(BUILD_ROOT=buildDir, d30 1 a30 1 @@@@ -1360,7 +1361,9 @@@@ def CheckForProcessor(context, which_arc d40 1 a40 1 @@@@ -1852,7 +1855,7 @@@@ if env['_LIBDEPS'] == '$_LIBDEPS_LIBS': d49 1 a49 1 @@@@ -1892,14 +1895,14 @@@@ if env.TargetOSIs('linux'): d66 1 a66 1 @@@@ -2197,7 +2200,6 @@@@ if env.TargetOSIs('posix'): d74 1 a74 1 @@@@ -2860,9 +2862,9 @@@@ def doConfigure(myenv): d87 1 a87 1 @@@@ -3217,7 +3219,7 @@@@ def doConfigure(myenv): d96 1 a96 1 @@@@ -3449,8 +3451,9 @@@@ def doConfigure(myenv): d108 1 a108 1 @@@@ -3499,7 +3502,7 @@@@ def doConfigure(myenv): d117 1 a117 1 @@@@ -3656,7 +3659,7 @@@@ def doConfigure(myenv): d126 1 a126 1 @@@@ -3782,12 +3785,12 @@@@ def doConfigure(myenv): d141 1 a141 1 @@@@ -3947,7 +3950,7 @@@@ def doConfigure(myenv): d150 11 @ 1.1 log @mongodb4: added version 4.4.23 https://www.mongodb.com/docs/manual/release-notes/4.4/ @ text @d1 1 a1 1 $NetBSD: patch-SConstruct,v 1.10 2021/12/27 09:36:10 nia Exp $ d8 1 d10 1 a10 1 --- SConstruct.orig 2023-06-29 02:35:52.000000000 +0000 d12 1 a12 1 @@@@ -1196,6 +1196,7 @@@@ envDict = dict(BUILD_ROOT=buildDir, d20 1 a20 1 @@@@ -1367,7 +1368,9 @@@@ def CheckForProcessor(context, which_arc d30 1 a30 1 @@@@ -1859,7 +1862,7 @@@@ if env['_LIBDEPS'] == '$_LIBDEPS_LIBS': d39 1 a39 1 @@@@ -1899,14 +1902,14 @@@@ if env.TargetOSIs('linux'): d56 1 a56 1 @@@@ -2204,7 +2207,6 @@@@ if env.TargetOSIs('posix'): d64 1 a64 1 @@@@ -2869,9 +2871,9 @@@@ def doConfigure(myenv): d77 1 a77 1 @@@@ -3226,7 +3228,7 @@@@ def doConfigure(myenv): d86 1 a86 1 @@@@ -3458,8 +3460,9 @@@@ def doConfigure(myenv): d98 25 a122 1 @@@@ -3796,7 +3799,7 @@@@ def doConfigure(myenv): d131 9 @