From nobody Mon Aug 15 20:28:15 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M65Sv2qhGz4YqNw; Mon, 15 Aug 2022 20:28:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M65Sv2D7Rz3TVj; Mon, 15 Aug 2022 20:28:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660595295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CDgni1VqBn0CEh1u+avL9CC7ZPq6UZ+QZzuFFZacHEo=; b=MnGrqOVGUq6PBxStIVXFpfjNLwgavdqClaQVd/JruAUxx/v2ddnt2wBEfzapLqzgRdMjZd R8CHnYx3DpSPNmKjz9Qa48872ktttSJIt3Zd3uiIcRbqat6nQxHkU/xyji76guAQpAX5qy ZIqEIwYSbhmqDmFnJlYV2jVSG9DryvWDSwx5CuQs950N+DiIQeIZy7xZaeMLMSHY+MCOVG zJlaOmQH+4JtFCoKvdEvsnx7oUlX+MmKQ2zMHSykHbT+CeaVpI3srx9XeQGDRxRFVC9VKh dAcdRE9RSIHyqzyUGGoFuxWo1/dnp5KT1qJ57BWE+ptcSwN3USw5NP1I38zzAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M65Sv1HlQzjdl; Mon, 15 Aug 2022 20:28:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27FKSFaG069363; Mon, 15 Aug 2022 20:28:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27FKSFUM069362; Mon, 15 Aug 2022 20:28:15 GMT (envelope-from git) Date: Mon, 15 Aug 2022 20:28:15 GMT Message-Id: <202208152028.27FKSFUM069362@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: cdca8109d6d0 - main - databases/mongodb50: Use more external libraries List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cdca8109d6d09b7f7b8ddcba55f9e1eb09332161 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660595295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CDgni1VqBn0CEh1u+avL9CC7ZPq6UZ+QZzuFFZacHEo=; b=isqWNjCypOEg0oyfstSgGUVtEySML/EHYOMCT3hVoblfxVPhWfgz50871WnQtuQosW7u8c NtwOEtWfJLMX58ylhHQYHGmql5gz8AL6Bx3rM1ox91Bz4UGjGg8w2AZx6LpA5YxMJSk8TJ slI8WniRdPSGbr7LiWxJTM3FkXzMr/tZw6DSXQJwPXLy/EVrwct31CGDt10dqyOuCXM5/v Cbba9qERKqmWRX8zWIfPL8DOmLImyjlcTOpqtt23HbZI8TtFR5GjNLo+cnBOLzDbGqSuiW lVlb72LfSNYmKiYQ8nfDGOyplR8OSrNFyQMiqrao6dVDfFzb/hLnSgMQzhzmlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660595295; a=rsa-sha256; cv=none; b=fyodCyf27WPjI+KnvL1Jcs+Z3t1+fy7PE5LIMEagYRw6XlnNp9xP2zmhxIaAbYrMeCnrBo BczO0JjD3vOLJ+97hcqUSjvvQfj7osTmmpwsMhfB0R72Z2XZPp35AEGV6MON377OSayi/U FPMq5nNboZK6Yrp0M4LFAvA8ENrkZC8WfeY88f4ZkGT1MHcPqDflEi0SvOk9QjzvMuCj5J MkpVU7MoCV/Xkyi/VjWRxlDjnS/tBdkPY/sry8AAH6P3Zrt6Uk7k+mH6dGTnvfuvam1UaU N6A8VbeWk2zVo8xKeuAAaasuM/kU1l8YaqMpIWPBgjZ7GV/QL3st3qKw7JUQzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=cdca8109d6d09b7f7b8ddcba55f9e1eb09332161 commit cdca8109d6d09b7f7b8ddcba55f9e1eb09332161 Author: Daniel Engberg AuthorDate: 2022-08-15 20:23:37 +0000 Commit: Daniel Engberg CommitDate: 2022-08-15 20:27:40 +0000 databases/mongodb50: Use more external libraries Make use of following libraries in tree: devel/boost-libs textproc/snowballstemmer devel/libunwind devel/yaml-cpp archivers/zstd While at it remove mtune option on amd64 as it potentially overrides CPUTYPE set by ports framework References: [1] https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-db/mongodb/files/mongodb-4.4.1-boost.patch https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-db/mongodb/files/mongodb-5.0.2-boost-1.79.patch PR: 265210 Reviewed by: Ronald Klop (maintainer) --- databases/mongodb50/Makefile | 24 +++++++- databases/mongodb50/files/patch-SConstruct | 9 +++ databases/mongodb50/files/patch-boost-179-compat | 70 ++++++++++++++++++++++ databases/mongodb50/files/patch-boost-179-link-fix | 21 +++++++ 4 files changed, 122 insertions(+), 2 deletions(-) diff --git a/databases/mongodb50/Makefile b/databases/mongodb50/Makefile index d7651e3e3103..853eb146a685 100644 --- a/databases/mongodb50/Makefile +++ b/databases/mongodb50/Makefile @@ -1,6 +1,7 @@ PORTNAME= mongodb DISTVERSIONPREFIX= r DISTVERSION= 5.0.10 +PORTREVISION= 1 CATEGORIES= databases net MASTER_SITES= https://fastdl.mongodb.org/src/ \ http://fastdl.mongodb.org/src/ @@ -23,9 +24,14 @@ BUILD_DEPENDS= ${LOCALBASE}/bin/ar:devel/binutils \ ${PYTHON_PKGNAMEPREFIX}cheetah3>0:devel/py-cheetah3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}yaml>=3.11:devel/py-yaml@${PY_FLAVOR} -LIB_DEPENDS= libcurl.so:ftp/curl \ +LIB_DEPENDS= libboost_log.so:devel/boost-libs \ + libcurl.so:ftp/curl \ libpcre.so:devel/pcre \ - libsnappy.so:archivers/snappy + libsnappy.so:archivers/snappy \ + libstemmer.so:textproc/snowballstemmer \ + libunwind.so:devel/libunwind \ + libyaml-cpp.so:devel/yaml-cpp \ + libzstd.so:archivers/zstd USES= compiler:c++17-lang cpe python:3.5+,build scons shebangfix USE_RC_SUBR= mongod @@ -37,9 +43,14 @@ MAKE_ARGS= --cxx-std=17 \ --disable-warnings-as-errors \ --libc++ \ --runtime-hardening=on \ + --use-system-boost \ --use-system-pcre \ --use-system-snappy \ + --use-system-stemmer \ + --use-system-libunwind \ + --use-system-yaml \ --use-system-zlib \ + --use-system-zstd \ -j ${MAKE_JOBS_NUMBER} \ AR=${PREFIX}/bin/ar \ VERBOSE=on @@ -79,6 +90,15 @@ CPE_PRODUCT= mongodb pre-patch: ${MV} ${WRKSRC}/src/third_party/wiredtiger/src/checksum/power8/crc32.sx ${WRKSRC}/src/third_party/wiredtiger/src/checksum/power8/crc32.S +post-patch: + ${RM} -rf ${WRKSRC}/src/third_party/boost + ${RM} -rf ${WRKSRC}/src/third_party/pcre-* + ${RM} -rf ${WRKSRC}/src/third_party/snappy-* + ${RM} -rf ${WRKSRC}/src/third_party/unwind + ${RM} -rf ${WRKSRC}/src/third_party/yaml-cpp + ${RM} -rf ${WRKSRC}/src/third_party/zlib-* + ${RM} -rf ${WRKSRC}/src/third_party/zstandard-* + do-build: ${WRKSRC}/buildscripts/scons.py -C ${WRKSRC} ${MAKE_ARGS} diff --git a/databases/mongodb50/files/patch-SConstruct b/databases/mongodb50/files/patch-SConstruct index fa8b0bb3ca4f..01af9a42437c 100644 --- a/databases/mongodb50/files/patch-SConstruct +++ b/databases/mongodb50/files/patch-SConstruct @@ -43,3 +43,12 @@ "i386" : { "-march=" : "nocona", "-mtune=" : "generic" }, "ppc64le" : { "-mcpu=" : "power8", "-mtune=" : "power8", "-mcmodel=" : "medium" }, "s390x" : { "-march=" : "z196", "-mtune=" : "zEC12" }, +@@ -2554,7 +2558,7 @@ if not env.TargetOSIs('windows', 'macOS') and (env.Too + if "sandybridge" in selected_experimental_optimizations: + default_targeting_flags_for_architecture["x86_64"] = { + "-march=" : "sandybridge", +- "-mtune=" : "generic", ++ # "-mtune=" : "generic", + "-mprefer-vector-width=" : "128", + } + diff --git a/databases/mongodb50/files/patch-boost-179-compat b/databases/mongodb50/files/patch-boost-179-compat new file mode 100644 index 000000000000..8135db48dd3c --- /dev/null +++ b/databases/mongodb50/files/patch-boost-179-compat @@ -0,0 +1,70 @@ +--- src/mongo/db/auth/security_key_test.cpp ++++ src/mongo/db/auth/security_key_test.cpp +@@ -30,6 +30,7 @@ + #include "mongo/platform/basic.h" + + #include ++#include + + #include "mongo/base/string_data.h" + #include "mongo/db/auth/authorization_manager.h" +--- src/mongo/db/storage/storage_repair_observer.cpp ++++ src/mongo/db/storage/storage_repair_observer.cpp +@@ -41,6 +41,7 @@ + #include + #endif + ++#include + #include + + #include "mongo/db/dbhelpers.h" +--- src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp ++++ src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp +@@ -34,6 +34,7 @@ + #include "mongo/db/storage/kv/kv_engine_test_harness.h" + + #include ++#include + #include + #include + +--- src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp ++++ src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp +@@ -36,6 +36,7 @@ + #include + + #include ++#include + #include + + #include "mongo/base/simple_string_data_comparator.h" +--- src/mongo/shell/shell_utils_extended.cpp ++++ src/mongo/shell/shell_utils_extended.cpp +@@ -37,6 +37,7 @@ + #endif + + #include ++#include + #include + #include + +--- src/mongo/util/stacktrace_threads.cpp ++++ src/mongo/util/stacktrace_threads.cpp +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- src/mongo/util/processinfo_linux.cpp ++++ src/mongo/util/processinfo_linux.cpp +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/databases/mongodb50/files/patch-boost-179-link-fix b/databases/mongodb50/files/patch-boost-179-link-fix new file mode 100644 index 000000000000..157ebaaf0221 --- /dev/null +++ b/databases/mongodb50/files/patch-boost-179-link-fix @@ -0,0 +1,21 @@ +--- SConstruct ++++ SConstruct +@@ -3511,17 +3511,11 @@ def doConfigure(myenv): + "BOOST_LOG_NO_SHORTHAND_NAMES", + "BOOST_LOG_USE_NATIVE_SYSLOG", + "BOOST_LOG_WITHOUT_THREAD_ATTR", ++ "BOOST_LOG_DYN_LINK", + "ABSL_FORCE_ALIGNED_ACCESS", + ] + ) + +- 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")