From 77c5529691824fc93c8e8fe203d020a84bcb3bca Mon Sep 17 00:00:00 2001 From: Ronald Klop Date: Sat, 28 Aug 2021 15:06:47 +0200 Subject: [PATCH] databases/mongodb50: Fix build failure with scons 4.2.0 by using in source scons 3.1.2 - Fix scons by using in source scons 3.1.2 (They are planning to move to Scons 4.2.0 in the future) - Disable LTO on clang12/aarch64, bug #257765 - Build already installs in $STAGEDIR, so only strip in do-install. - Fix a portlint warnings about the comment at the LICENSE section. PR: 257925 --- databases/mongodb50/Makefile | 15 ++++++++--- .../files/patch-buildscripts_scons.py | 25 +++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 databases/mongodb50/files/patch-buildscripts_scons.py diff --git a/databases/mongodb50/Makefile b/databases/mongodb50/Makefile index bbf4ae522253..593808b7b8e3 100644 --- a/databases/mongodb50/Makefile +++ b/databases/mongodb50/Makefile @@ -10,8 +10,7 @@ DISTNAME= mongodb-src-${DISTVERSIONPREFIX}${DISTVERSION} MAINTAINER= ronald-lists@klop.ws COMMENT= Distributed document-oriented "NoSQL" database (5.0.x Branch) -# mongodb is SSPLv1, C++ driver is APACHE20 -LICENSE= SSPLv1 APACHE20 +LICENSE= SSPLv1 APACHE20 # mongodb is SSPLv1, C++ driver is APACHE20 LICENSE_COMB= multi LICENSE_NAME_SSPLv1= Server Side Public License Version 1 LICENSE_FILE_SSPLv1= ${WRKSRC}/LICENSE-Community.txt @@ -28,13 +27,18 @@ LIB_DEPENDS= libpcre.so:devel/pcre \ libcurl.so:ftp/curl \ libsnappy.so:archivers/snappy -USES= compiler:c++17-lang cpe python:3.5+,build scons +USES= compiler:c++17-lang cpe python:3.5+,build scons shebangfix USE_RC_SUBR= mongod CONFLICTS_INSTALL= mongodb36 mongodb4[024] OPTIONS_DEFINE= LTO SASL SSL OPTIONS_DEFAULT=LTO SASL SSL +OPTIONS_EXCLUDE_aarch64= ${OPTIONS_EXCLUDE_${ARCH}_${OSREL:R}} +OPTIONS_EXCLUDE_aarch64_14= LTO # Does not work with llvm12 on aarch64. + +SHEBANG_FILES= buildscripts/scons.py +python_OLD_CMD= @python_interpreter@ MAKE_ARGS= --use-system-zlib \ --use-system-pcre \ @@ -79,9 +83,12 @@ 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 +do-build: + ${WRKSRC}/buildscripts/scons.py -C ${WRKSRC} ${MAKE_ARGS} + do-install: .for f in mongo mongod mongos - ${INSTALL_PROGRAM} ${WRKSRC}/build/install${PREFIX}/bin/${f} ${STAGEDIR}${PREFIX}/bin + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f} .endfor ${INSTALL_DATA} ${WRKSRC}/rpm/mongod.conf ${STAGEDIR}${PREFIX}/etc/mongodb.conf.sample diff --git a/databases/mongodb50/files/patch-buildscripts_scons.py b/databases/mongodb50/files/patch-buildscripts_scons.py new file mode 100644 index 000000000000..20d0429965af --- /dev/null +++ b/databases/mongodb50/files/patch-buildscripts_scons.py @@ -0,0 +1,25 @@ +--- buildscripts/scons.py.orig 2021-08-23 09:10:10 UTC ++++ buildscripts/scons.py +@@ -18,14 +18,14 @@ SITE_TOOLS_DIR = os.path.join(MONGODB_ROOT, 'site_scon + + sys.path = [SCONS_DIR, SITE_TOOLS_DIR] + sys.path + +-# pylint: disable=C0413 +-from mongo.pip_requirements import verify_requirements, MissingRequirements +- +-try: +- verify_requirements('etc/pip/compile-requirements.txt') +-except MissingRequirements as ex: +- print(ex) +- sys.exit(1) ++## pylint: disable=C0413 ++#from mongo.pip_requirements import verify_requirements, MissingRequirements ++# ++#try: ++# verify_requirements('etc/pip/compile-requirements.txt') ++#except MissingRequirements as ex: ++# print(ex) ++# sys.exit(1) + + try: + import SCons.Script