git: 3292ccea5b5c - main - databases/mongodb42: unbreak build after 620968a43a5f

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Mon, 04 Oct 2021 22:08:59 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3292ccea5b5c050100cc64bbbb9fcf13de177161

commit 3292ccea5b5c050100cc64bbbb9fcf13de177161
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-10-04 21:46:00 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-10-04 22:08:23 +0000

    databases/mongodb42: unbreak build after 620968a43a5f
    
    Checking if C compiler supports -flto... yes
    Checking if linker supports -flto... no
    Link time optimization requested, but selected compiler does not honor -flto
    [...]
    /usr/local/bin/ld.gold: error: /usr/bin/../lib/LLVMgold.so: could not load plugin library: Cannot open "/usr/bin/../lib/LLVMgold.so"
    /usr/local/bin/ld.gold: error: build/scons/opt/sconf_temp/conftest_25fe9b7eeda4aef15b03635be7f9c29c_6.o:1:3: invalid character
    /usr/local/bin/ld.gold: error: build/scons/opt/sconf_temp/conftest_25fe9b7eeda4aef15b03635be7f9c29c_6.o:1:3: syntax error, unexpected $end
    /usr/local/bin/ld.gold: error: build/scons/opt/sconf_temp/conftest_25fe9b7eeda4aef15b03635be7f9c29c_6.o: not an object or archive
    /usr/src/lib/csu/amd64/crt1.c:76: error: undefined reference to 'main'
    cc: error: linker command failed with exit code 1 (use -v to see invocation)
    
    Reported by:    pkg-fallout
    Obtained from:  upstream (via mongodb44)
---
 databases/mongodb42/Makefile | 4 ++++
 databases/mongodb42/distinfo | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/databases/mongodb42/Makefile b/databases/mongodb42/Makefile
index 13a88e3913b3..f91e039c0aac 100644
--- a/databases/mongodb42/Makefile
+++ b/databases/mongodb42/Makefile
@@ -7,6 +7,10 @@ MASTER_SITES=	https://fastdl.mongodb.org/src/ \
 PKGNAMESUFFIX=	${DISTVERSION:R:S/.//}
 DISTNAME=	mongodb-src-${DISTVERSIONPREFIX}${DISTVERSION}
 
+PATCH_SITES=	https://github.com/${PORTNAME}/${PORTNAME:S/db//}/commit/
+PATCHFILES+=	a0a70c53cc7a.patch:-p1 # https://jira.mongodb.org/browse/SERVER-41827
+PATCHFILES+=	edf4ab0f8174.patch:-p1 # https://jira.mongodb.org/browse/SERVER-43979
+
 MAINTAINER=	ronald-lists@klop.ws
 COMMENT=	Distributed document-oriented "NoSQL" database (4.2.x Branch)
 
diff --git a/databases/mongodb42/distinfo b/databases/mongodb42/distinfo
index b793bea07a60..549598a2012f 100644
--- a/databases/mongodb42/distinfo
+++ b/databases/mongodb42/distinfo
@@ -1,3 +1,7 @@
 TIMESTAMP = 1632392379
 SHA256 (mongodb-src-r4.2.17.tar.gz) = e329ef22656337aef855d0ff6c9e79572fc8ace94c37c8996f63c0871c1bbf50
 SIZE (mongodb-src-r4.2.17.tar.gz) = 62216350
+SHA256 (a0a70c53cc7a.patch) = 1435de7b6e6343c996fd58556d721f184b208d90d280996bd0c35dd32339b6b2
+SIZE (a0a70c53cc7a.patch) = 1078
+SHA256 (edf4ab0f8174.patch) = 87be45f996b1b7fc3700407d6d6671ec6b4b6a593de54ca5355bb6daec3d0213
+SIZE (edf4ab0f8174.patch) = 1220