mirror of
https://github.com/netbirdio/FreeBSD-ports.git
synced 2026-05-22 18:42:42 -07:00
databases/mongodb70: 7.0.20
Changes: https://www.mongodb.com/docs/v7.0/release-notes/7.0/#7.0.20---apr-29--2025 Announcement: https://www.mongodb.com/community/forums/t/mongodb-7-0-20-is-released/321461?u=r_k - refactored do-configure to use HAS_CONFIGURE which properly passes CONFIGURE_ENV - updates spidermonkey to MozJS 128.8-ESR - needs cbindgen now - pet portclippy and portfmt (moved vars around) - replaced multiple paths with MOZJS_WRKSRC - removed a mozjs patch which is in upstream now
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
PORTNAME= mongodb
|
||||
DISTVERSIONPREFIX= r
|
||||
DISTVERSION= 7.0.19
|
||||
PORTREVISION= 1
|
||||
DISTVERSION= 7.0.20
|
||||
CATEGORIES= databases net
|
||||
MASTER_SITES= https://hg.mozilla.org/mozilla-central/raw-rev/:patches
|
||||
PKGNAMESUFFIX= ${DISTVERSION:R:S/.//}
|
||||
DISTFILES= 223087fdc29f18678f6174e9807b8780e439acf6:patches # https://bugzilla.mozilla.org/1894423
|
||||
EXTRACT_ONLY= ${GH_ACCOUNT}-${GH_PROJECT}-${DISTVERSIONPREFIX}${DISTVERSION}_GH0.tar.gz \
|
||||
${GH_ACCOUNT}-forks-spidermonkey-${MOZJS_TAG}_GH0.tar.gz
|
||||
|
||||
MAINTAINER= ronald@FreeBSD.org
|
||||
COMMENT= MongoDB Community Edition (7.0.x Branch)
|
||||
@@ -27,7 +22,8 @@ BUILD_DEPENDS= ${PY_SETUPTOOLS} \
|
||||
${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pymongo>0:databases/py-pymongo@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pyyaml>=3.11:devel/py-pyyaml@${PY_FLAVOR}
|
||||
${PYTHON_PKGNAMEPREFIX}pyyaml>=3.11:devel/py-pyyaml@${PY_FLAVOR} \
|
||||
rust-cbindgen>0:devel/rust-cbindgen
|
||||
# build depends used while running ${WRKSRC}/src/third_party/mozjs/gen-config.sh
|
||||
BUILD_DEPENDS+= gm4:devel/m4 \
|
||||
gsed:textproc/gsed
|
||||
@@ -39,14 +35,16 @@ LIB_DEPENDS= libcurl.so:ftp/curl \
|
||||
libzstd.so:archivers/zstd
|
||||
|
||||
FLAVORS= default armv80a
|
||||
|
||||
armv80a_PKGNAMESUFFIX= ${DISTVERSION:R:S/.//}-armv80a
|
||||
|
||||
USES= compiler:c++20-lang cpe python:build scons shebangfix ssl
|
||||
# gmake is used while running ${WRKSRC}/src/third_party/mozjs/gen-config.sh
|
||||
USES+= gmake pkgconfig
|
||||
CPE_PRODUCT= mongodb
|
||||
|
||||
# mozjs tag comes from ${WRKSRC}/src/third_party/mozjs/get-sources.sh
|
||||
MOZJS_TAG= 4c197344dfc48dfbbd242333878f17f0379e6205
|
||||
MOZJS_TAG= ee5eabe03bfae1cba9d97eb380fbc9408707b9ee
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= mongodb mongodb-forks:mozjs
|
||||
@@ -57,7 +55,12 @@ USE_RC_SUBR= mongod
|
||||
SHEBANG_FILES= buildscripts/scons.py
|
||||
python_OLD_CMD= @python_interpreter@
|
||||
|
||||
CONFIGURE_ENV+= M4=${LOCALBASE}/bin/gm4
|
||||
HAS_CONFIGURE= yes
|
||||
CONFIGURE_SCRIPT= gen-config.sh
|
||||
CONFIGURE_ARGS+= ${MOZJS_ARCH} \
|
||||
freebsd
|
||||
CONFIGURE_ENV+= PYTHON3="${PYTHON_CMD}"
|
||||
|
||||
MAKE_ARGS= --allocator=system \
|
||||
--cxx-std=20 \
|
||||
--disable-warnings-as-errors \
|
||||
@@ -74,6 +77,7 @@ MAKE_ARGS= --allocator=system \
|
||||
AR=llvm-ar \
|
||||
MONGO_VERSION=${DISTVERSION} \
|
||||
VERBOSE=on
|
||||
ALL_TARGET= install-core
|
||||
|
||||
CFLAGS+= -DBOOST_NO_CXX98_FUNCTION_BASE
|
||||
|
||||
@@ -87,15 +91,18 @@ EXTRACT_AFTER_ARGS= --exclude src/third_party/snappy-* \
|
||||
--exclude src/third_party/zstandard \
|
||||
--no-same-owner --no-same-permissions
|
||||
|
||||
# This ports is only following the Major Release.
|
||||
# https://docs.mongodb.com/manual/reference/versioning/
|
||||
PORTSCOUT= limit:^7\.0\.
|
||||
|
||||
CONFIGURE_WRKSRC= ${MOZJS_WRKSRC}
|
||||
|
||||
USERS= mongodb
|
||||
GROUPS= mongodb
|
||||
|
||||
OPTIONS_DEFINE= LTO NOAVX SASL
|
||||
OPTIONS_DEFINE_aarch64= ARMV80A
|
||||
OPTIONS_DEFAULT= NOAVX SASL
|
||||
.if ${FLAVOR:U} == armv80a
|
||||
OPTIONS_SET+= ARMV80A
|
||||
.endif
|
||||
|
||||
# MongoDB on non-LSE ARM cpu like Raspberry Pi can work but is unsupported upstream.
|
||||
# Can give corruption on high concurrency.
|
||||
@@ -114,20 +121,18 @@ NOAVX_EXTRA_PATCHES= ${FILESDIR}/extrapatch-src_third__party_mozjs_SConscript \
|
||||
SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
|
||||
SASL_MAKE_ARGS= --use-sasl-client
|
||||
|
||||
MOZJS_WRKSRC= ${WRKSRC}/src/third_party/mozjs
|
||||
|
||||
.if ${FLAVOR:U} == armv80a
|
||||
OPTIONS_SET+= ARMV80A
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${FLAVOR:U} == armv80a && ${ARCH} != aarch64
|
||||
IGNORE= flavor armv80a is only valid on aarch64
|
||||
.endif
|
||||
|
||||
ALL_TARGET= install-core
|
||||
|
||||
# This ports is only following the Major Release.
|
||||
# https://docs.mongodb.com/manual/reference/versioning/
|
||||
PORTSCOUT= limit:^7\.0\.
|
||||
|
||||
CPE_PRODUCT= mongodb
|
||||
|
||||
.if ${ARCH} == amd64
|
||||
MOZJS_ARCH= x86_64
|
||||
.elif ${ARCH} == powerpc64le
|
||||
@@ -138,7 +143,7 @@ MOZJS_ARCH= ${ARCH}
|
||||
|
||||
post-extract:
|
||||
# Verify we downloaded the proper mozjs git tag.
|
||||
${SH} -xc "test \"X`grep -E '^LIB_GIT_REVISION=' ${WRKSRC}/src/third_party/mozjs/get-sources.sh`\" = \"XLIB_GIT_REVISION=${MOZJS_TAG}\""
|
||||
${SH} -xc "test \"X`grep -E '^LIB_GIT_REVISION=' ${MOZJS_WRKSRC}/get-sources.sh`\" = \"XLIB_GIT_REVISION=${MOZJS_TAG}\""
|
||||
|
||||
post-patch:
|
||||
# fix build with python-3.11
|
||||
@@ -146,12 +151,10 @@ post-patch:
|
||||
${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/preprocessor.py
|
||||
${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/backend/base.py
|
||||
${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/action/process_define_files.py
|
||||
${PATCH} -d ${WRKSRC}/src/third_party/mozjs/extract --quiet -p1 -V none < ${DISTDIR}/223087fdc29f18678f6174e9807b8780e439acf6
|
||||
|
||||
do-configure:
|
||||
pre-configure:
|
||||
# Replacement of ${WRKSRC}/src/third_party/mozjs/get-sources.sh
|
||||
${LN} -sF ${WRKDIR}/spidermonkey-${MOZJS_TAG} ${WRKSRC}/src/third_party/mozjs/mozilla-release
|
||||
cd ${WRKSRC}/src/third_party/mozjs && PYTHON3="${PYTHON_CMD}" ${SH} ./gen-config.sh ${MOZJS_ARCH} freebsd
|
||||
${LN} -sF ${WRKDIR}/spidermonkey-${MOZJS_TAG} ${MOZJS_WRKSRC}/mozilla-release
|
||||
|
||||
do-build:
|
||||
${WRKSRC}/buildscripts/scons.py -C ${WRKSRC} ${MAKE_ARGS}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
TIMESTAMP = 1745704517
|
||||
SHA256 (223087fdc29f18678f6174e9807b8780e439acf6) = f234371584e2b2bc9953ae4fd145da19c99a6f04087f53d59616aecf29df039c
|
||||
SIZE (223087fdc29f18678f6174e9807b8780e439acf6) = 1597
|
||||
SHA256 (mongodb-mongo-r7.0.19_GH0.tar.gz) = 552358bf46936f2ebe53b414d8e15b9932baf38a191ef2d50eef5dabba663396
|
||||
SIZE (mongodb-mongo-r7.0.19_GH0.tar.gz) = 87222348
|
||||
SHA256 (mongodb-forks-spidermonkey-4c197344dfc48dfbbd242333878f17f0379e6205_GH0.tar.gz) = 25ddc30c800d44231798793f788765e0ae8060b9f9f2f09d7f23955b2f63f034
|
||||
SIZE (mongodb-forks-spidermonkey-4c197344dfc48dfbbd242333878f17f0379e6205_GH0.tar.gz) = 164661704
|
||||
TIMESTAMP = 1747294177
|
||||
SHA256 (mongodb-mongo-r7.0.20_GH0.tar.gz) = 5946b2ec223f156b1eb67226d074f14a6f218d0a43920c266bafc431b936e124
|
||||
SIZE (mongodb-mongo-r7.0.20_GH0.tar.gz) = 88002907
|
||||
SHA256 (mongodb-forks-spidermonkey-ee5eabe03bfae1cba9d97eb380fbc9408707b9ee_GH0.tar.gz) = ff2f5ed45ae507d64022e3af17d11dc984b66f9b99931d8da34ce92fe5b6d816
|
||||
SIZE (mongodb-forks-spidermonkey-ee5eabe03bfae1cba9d97eb380fbc9408707b9ee_GH0.tar.gz) = 280291333
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--- SConstruct.orig 2024-06-19 03:26:19 UTC
|
||||
--- SConstruct.orig 2025-05-13 16:37:03 UTC
|
||||
+++ SConstruct
|
||||
@@ -23,7 +23,6 @@ import SCons.Script
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
if get_option('build-metrics'):
|
||||
env['BUILD_METRICS_ARTIFACTS_DIR'] = '$BUILD_ROOT/$VARIANT_DIR'
|
||||
env.Tool('build_metrics')
|
||||
@@ -1799,9 +1788,9 @@ if has_option('variables-help'):
|
||||
print(env_vars.GenerateHelpText(env))
|
||||
Exit(0)
|
||||
@@ -1801,7 +1790,7 @@ if unknown_vars:
|
||||
|
||||
unknown_vars = env_vars.UnknownVariables()
|
||||
if unknown_vars:
|
||||
@@ -36,7 +34,7 @@
|
||||
|
||||
install_actions.setup(env, get_option('install-action'))
|
||||
|
||||
@@ -3024,7 +3013,7 @@ if env.TargetOSIs('posix'):
|
||||
@@ -3013,7 +3002,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(
|
||||
@@ -45,7 +43,7 @@
|
||||
PROGLINKFLAGS=['-pie'],
|
||||
)
|
||||
|
||||
@@ -3032,7 +3021,6 @@ if env.TargetOSIs('posix'):
|
||||
@@ -3021,7 +3010,6 @@ if env.TargetOSIs('posix'):
|
||||
env.Append(
|
||||
CCFLAGS=[
|
||||
"-fasynchronous-unwind-tables",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
--- src/third_party/mozjs/gen-config.sh.orig 2022-08-05 16:21:29 UTC
|
||||
--- src/third_party/mozjs/gen-config.sh.orig 2025-05-13 16:37:03 UTC
|
||||
+++ src/third_party/mozjs/gen-config.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
|
||||
set -e
|
||||
set -v
|
||||
@@ -29,6 +29,9 @@ case "$_Path" in
|
||||
}
|
||||
|
||||
@@ -10,16 +16,16 @@
|
||||
"platform/aarch64/linux")
|
||||
_CONFIG_OPTS="--host=aarch64-linux"
|
||||
;;
|
||||
@@ -108,7 +111,7 @@ CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS" \
|
||||
--disable-js-shell \
|
||||
--disable-tests "$_CONFIG_OPTS"
|
||||
@@ -111,7 +114,7 @@ CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS" \
|
||||
--disable-wasm-moz-intgemm \
|
||||
"$_CONFIG_OPTS"
|
||||
|
||||
-make recurse_export
|
||||
+gmake recurse_export
|
||||
|
||||
cd ../../../..
|
||||
|
||||
@@ -159,7 +162,7 @@ find "$_Path/build" -name '*.cpp' |
|
||||
@@ -166,7 +169,7 @@ find "$_Path/build" -name '*.cpp' |
|
||||
find "$_Path/build" -name '*.cpp' |
|
||||
while read unified_file ; do
|
||||
echo "Processing $unified_file"
|
||||
|
||||
Reference in New Issue
Block a user