Bug 182110

Summary: databases/mongodb FreeBSD 10.0-ALPHA1 build broken
Product: Ports & Packages Reporter: Florent Peterschmitt <florent>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Florent Peterschmitt 2013-09-15 13:40:00 UTC
Many things have changed with FreeBSD 10, as CLang is now the default compiler and it uses it's own libc++.

Theses patchs make databases/mongodb building on FreeBSD 10.0-ALPHA1.

Fix: 

https://github.com/Leryan/patchs/tree/master/freebsd/ports/databases/mongodb/freebsd10.0a1
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-09-15 13:40:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2013-10-14 10:35:55 UTC
State Changed
From-To: open->feedback

Are you able to produce patches that work for both 8.x (gcc 4.2.1) and 10.x (clang) releases? 
Otherwise I'll have to selectively apply them.
Comment 3 Alex Dupre 2013-10-28 15:49:20 UTC
I'll commit mongodb 2.4.7 soon. Do you have updated patches for clang/gcc?

-- 
Alex Dupre
Comment 4 Florent Peterschmitt 2013-10-28 15:53:25 UTC
On 10/28/13 16:49, Alex Dupre wrote:
> I'll commit mongodb 2.4.7 soon. Do you have updated patches for clang/gcc?
> 

Hello,

I'm not in a good position for the moment to do update it (recent moving
through the France, new jobâ¦), so maybe you could apply patchs with a
"if" in the Makefile?

-- 
Florent Peterschmitt           | Please:
florent@peterschmitt.fr        |  * Avoid HTML/RTF in E-mail.
+33 (0)6 64 33 97 92           |  * Send PDF for documents.
http://florent.peterschmitt.fr |  * Trim your quotations. Really.
Proudly powered by Open Source | Thank you :)
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-10-29 15:48:48 UTC
Author: ale
Date: Tue Oct 29 15:48:39 2013
New Revision: 331962
URL: http://svnweb.freebsd.org/changeset/ports/331962

Log:
  Update to 2.4.7 release and fix build with clang [1].
  
  PR:		ports/182110 [1]
  Submitted by:	Florent Peterschmitt <florent@peterschmitt.fr>

Added:
  head/databases/mongodb/files/clang-patch-src_mongo_db_fts_stemmer.cpp   (contents, props changed)
  head/databases/mongodb/files/clang-patch-src_mongo_platform_unordered_map.h   (contents, props changed)
  head/databases/mongodb/files/clang-patch-src_mongo_platform_unordered_set.h   (contents, props changed)
  head/databases/mongodb/files/clang-patch-src_third_party_s2_hash.h   (contents, props changed)
Modified:
  head/databases/mongodb/Makefile
  head/databases/mongodb/distinfo
  head/databases/mongodb/pkg-plist

Modified: head/databases/mongodb/Makefile
==============================================================================
--- head/databases/mongodb/Makefile	Tue Oct 29 15:30:11 2013	(r331961)
+++ head/databases/mongodb/Makefile	Tue Oct 29 15:48:39 2013	(r331962)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	mongodb
-PORTVERSION=	2.4.6
+PORTVERSION=	2.4.7
 CATEGORIES=	databases net
 MASTER_SITES=	http://downloads.mongodb.org/src/
 DISTNAME=	${PORTNAME}-src-r${PORTVERSION}
@@ -14,11 +14,11 @@ COMMENT=	NOSQL distributed document-orie
 LICENSE=	AGPLv3 AL2
 LICENSE_COMB=	multi
 
-LIB_DEPENDS=	execinfo:${PORTSDIR}/devel/libexecinfo \
-		pcre:${PORTSDIR}/devel/pcre \
-		snappy:${PORTSDIR}/archivers/snappy
+LIB_DEPENDS=	libexecinfo.so:${PORTSDIR}/devel/libexecinfo \
+		libpcre.so:${PORTSDIR}/devel/pcre \
+		libsnappy.so:${PORTSDIR}/archivers/snappy
 # boost 1.52 from ports make mongod segfaulting with many tests
-# LIB_DEPENDS+=	boost_system:${PORTSDIR}/devel/boost-libs
+# LIB_DEPENDS+=	libboost_system.so:${PORTSDIR}/devel/boost-libs
 # SCONS_ARGS+=	--use-system-boost
 
 ONLY_FOR_ARCHS=	i386 amd64
@@ -30,7 +30,7 @@ SM_DESC=	Use SpiderMonkey instead of V8 
 TEST_DESC=	Add support for running regression test
 
 USE_SCONS=	yes
-SCONS_ARGS=	--prefix=${PREFIX} --cc=${CC} --cxx=${CXX} \
+SCONS_ARGS=	--prefix=${STAGEDIR}${PREFIX} --cc=${CC} --cxx=${CXX} \
 		--use-system-pcre --use-system-snappy \
 		--full --sharedclient
 
@@ -39,17 +39,14 @@ GROUPS=	mongodb
 
 USE_RC_SUBR=	mongod
 
-USE_LDCONFIG=	yes
-
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MSM}
 SCONS_ARGS+=	--usesm --use-system-sm
-LIB_DEPENDS+=	js:${PORTSDIR}/lang/spidermonkey17
+LIB_DEPENDS+=	libjs.so:${PORTSDIR}/lang/spidermonkey17
 .else
 SCONS_ARGS+=	--usev8 --use-system-v8
-LIB_DEPENDS+=	v8:${PORTSDIR}/lang/v8
+LIB_DEPENDS+=	libv8.so:${PORTSDIR}/lang/v8
 .endif
 
 .if ${PORT_OPTIONS:MSSL}
@@ -59,7 +56,7 @@ SCONS_ARGS+=	--ssl
 
 .if ${PORT_OPTIONS:MSASL}
 SCONS_ARGS+=	--use-sasl-client
-LIB_DEPENDS+=	sasl2:${PORTSDIR}/security/cyrus-sasl2
+LIB_DEPENDS+=	libsasl2.so:${PORTSDIR}/security/cyrus-sasl2
 .endif
 
 .if ${PORT_OPTIONS:MTEST}
@@ -73,17 +70,19 @@ SMOKE_TESTS+=	smokeSsl
 SCONS_TARGET=	core tools
 .endif
 
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 1000024
+EXTRA_PATCHES=	${PATCHDIR}/clang-patch-src_mongo_db_fts_stemmer.cpp \
+		${PATCHDIR}/clang-patch-src_mongo_platform_unordered_map.h \
+		${PATCHDIR}/clang-patch-src_mongo_platform_unordered_set.h \
+		${PATCHDIR}/clang-patch-src_third_party_s2_hash.h
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} 's/\["-O3"\]/"${CFLAGS}"/' \
 		${WRKSRC}/SConstruct
 
-post-install:
-	@${LN} -s ${PREFIX}/lib/libmongoclient.so \
-		${PREFIX}/lib/libmongoclient.so.0
-	@if [ ! -f ${PREFIX}/etc/mongodb.conf ]; then \
-		${TOUCH} ${PREFIX}/etc/mongodb.conf ; \
-	fi
-
 .if ${PORT_OPTIONS:MTEST}
 test: build-depends build
 	@cd ${BUILD_WRKSRC} && \

Modified: head/databases/mongodb/distinfo
==============================================================================
--- head/databases/mongodb/distinfo	Tue Oct 29 15:30:11 2013	(r331961)
+++ head/databases/mongodb/distinfo	Tue Oct 29 15:48:39 2013	(r331962)
@@ -1,2 +1,2 @@
-SHA256 (mongodb-src-r2.4.6.tar.gz) = b5f397abc92d36d84a85753d15fb5d7dab6545ce9dfd9fb7685c630e6b050acb
-SIZE (mongodb-src-r2.4.6.tar.gz) = 14141660
+SHA256 (mongodb-src-r2.4.7.tar.gz) = 69e3cf697225efa2e6e65f5cfdc31742f3e4b2e069c27d84fc713abe0bf67ca7
+SIZE (mongodb-src-r2.4.7.tar.gz) = 14157198

Added: head/databases/mongodb/files/clang-patch-src_mongo_db_fts_stemmer.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mongodb/files/clang-patch-src_mongo_db_fts_stemmer.cpp	Tue Oct 29 15:48:39 2013	(r331962)
@@ -0,0 +1,10 @@
+--- src/mongo/db/fts/stemmer.cpp.orig	2013-10-14 09:21:23.732674604 +0000
++++ src/mongo/db/fts/stemmer.cpp	2013-10-14 09:21:35.339894547 +0000
+@@ -16,6 +16,7 @@
+ *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+ 
++#include <cstdlib>
+ #include <string>
+ 
+ #include "mongo/db/fts/stemmer.h"

Added: head/databases/mongodb/files/clang-patch-src_mongo_platform_unordered_map.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mongodb/files/clang-patch-src_mongo_platform_unordered_map.h	Tue Oct 29 15:48:39 2013	(r331962)
@@ -0,0 +1,11 @@
+--- src/mongo/platform/unordered_map.h.orig  2013-08-18 18:24:57.000000000 +0000
++++ src/mongo/platform/unordered_map.h       2013-09-15 14:09:09.843821449 +0000
+@@ -48,7 +48,7 @@
+ 
+ namespace mongo {
+ 
+-    using std::tr1::unordered_map;
++    using std::unordered_map;
+ 
+ }  // namespace mongo
+ 

Added: head/databases/mongodb/files/clang-patch-src_mongo_platform_unordered_set.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mongodb/files/clang-patch-src_mongo_platform_unordered_set.h	Tue Oct 29 15:48:39 2013	(r331962)
@@ -0,0 +1,11 @@
+--- src/mongo/platform/unordered_set.h.orig   2013-09-15 14:05:01.015524128 +0000
++++ src/mongo/platform/unordered_set.h        2013-08-18 18:24:57.000000000 +0000
+@@ -48,7 +48,7 @@
+ 
+ namespace mongo {
+ 
+-    using std::tr1::unordered_set;
++    using std::unordered_set;
+ 
+ }  // namespace mongo
+ 

Added: head/databases/mongodb/files/clang-patch-src_third_party_s2_hash.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mongodb/files/clang-patch-src_third_party_s2_hash.h	Tue Oct 29 15:48:39 2013	(r331962)
@@ -0,0 +1,13 @@
+--- src/third_party/s2/hash_orig.h	2013-09-15 13:43:35.601932885 +0000
++++ src/third_party/s2/hash.h		2013-09-15 13:43:49.767929768 +0000
+@@ -8,8 +8,8 @@
+ #define hash_set mongo::unordered_set
+ 
+ #if defined OS_LINUX || defined OS_MACOSX || defined __sunos__ || defined __freebsd__
+-#define HASH_NAMESPACE_START namespace std { namespace tr1 {
+-#define HASH_NAMESPACE_END }}
++#define HASH_NAMESPACE_START namespace std {
++#define HASH_NAMESPACE_END }
+ #elif defined OS_WINDOWS
+ #define HASH_NAMESPACE_START namespace std {
+ #define HASH_NAMESPACE_END }

Modified: head/databases/mongodb/pkg-plist
==============================================================================
--- head/databases/mongodb/pkg-plist	Tue Oct 29 15:30:11 2013	(r331961)
+++ head/databases/mongodb/pkg-plist	Tue Oct 29 15:48:39 2013	(r331962)
@@ -389,7 +389,6 @@ include/mongo/util/version.h
 include/mongo/util/winutil.h
 lib/libmongoclient.a
 lib/libmongoclient.so
-lib/libmongoclient.so.0
 @dirrm include/mongo/base
 @dirrm include/mongo/bson/util
 @dirrm include/mongo/bson
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Alex Dupre freebsd_committer freebsd_triage 2013-10-29 15:49:01 UTC
State Changed
From-To: feedback->closed

Committed!