aboutsummaryrefslogtreecommitdiff
path: root/databases/mongodb/Makefile
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2013-03-29 08:56:13 +0000
committerAlex Dupre <ale@FreeBSD.org>2013-03-29 08:56:13 +0000
commit62166b29b30b86fcbf9b04b69e1b1bf11965b16f (patch)
tree6f87c1c82c1e497b2b3d31d3b77b31dab36589e9 /databases/mongodb/Makefile
parent0d883f21c44f82b8069695ddbc8e08ee5fb56d52 (diff)
downloadports-62166b29b30b86fcbf9b04b69e1b1bf11965b16f.tar.gz
ports-62166b29b30b86fcbf9b04b69e1b1bf11965b16f.zip
Update to 2.4.1 release and overhaul:
- use bundled boost lib, since 1.52 from ports make mongod segfaulting - set LICENSE - use V8 Javascript engine by default (SM still an option, deprecated) - make SSL optional (ON by default) - add support for running regression tests - enhance rc script - add support for ccache - install c++ driver / client library - take maintainership Approved by: maintainer timeout (> 6 months)
Notes
Notes: svn path=/head/; revision=315530
Diffstat (limited to 'databases/mongodb/Makefile')
-rw-r--r--databases/mongodb/Makefile58
1 files changed, 45 insertions, 13 deletions
diff --git a/databases/mongodb/Makefile b/databases/mongodb/Makefile
index 081058d5e320..0b49ac54c966 100644
--- a/databases/mongodb/Makefile
+++ b/databases/mongodb/Makefile
@@ -2,29 +2,35 @@
# $FreeBSD$
PORTNAME= mongodb
-PORTVERSION= 2.2.3
+PORTVERSION= 2.4.1
CATEGORIES= databases net
MASTER_SITES= http://downloads.mongodb.org/src/
DISTNAME= ${PORTNAME}-src-r${PORTVERSION}
-MAINTAINER= mail@derzinn.de
+MAINTAINER= ale@FreeBSD.org
COMMENT= NOSQL distributed document-oriented database
-LIB_DEPENDS= boost_system:${PORTSDIR}/devel/boost-libs \
- execinfo.1:${PORTSDIR}/devel/libexecinfo \
- nspr4:${PORTSDIR}/devel/nspr \
+# mongodb is AGPLv3, C++ driver is AL2
+LICENSE= AGPLv3 AL2
+LICENSE_COMB= multi
+
+LIB_DEPENDS= execinfo:${PORTSDIR}/devel/libexecinfo \
pcre:${PORTSDIR}/devel/pcre \
snappy:${PORTSDIR}/archivers/snappy
+# boost 1.52 from ports make mongod segfaulting with many tests
+# LIB_DEPENDS+= boost_system:${PORTSDIR}/devel/boost-libs
+# SCONS_ARGS+= --use-system-boost
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= "not yet ported to anything other than i386 and amd64"
-OPTIONS_DEFINE= V8
-V8_DESC= Use v8 instead of spider monkey for javascript
+OPTIONS_DEFINE= SM SSL TEST
+OPTIONS_DEFAULT=SSL
+SM_DESC= Use SpiderMonkey instead of V8 for JavaScript
+TEST_DESC= Add support for running regression test
USE_SCONS= yes
-SCONS_TARGET= all
-SCONS_ARGS= --prefix=${PREFIX} --cxx=${CXX} --cpp=${CPP} --use-system-all --ssl
+SCONS_ARGS= --prefix=${PREFIX} --cc=${CC} --cxx=${CXX} --use-system-pcre --use-system-snappy
USERS= mongodb
GROUPS= mongodb
@@ -33,17 +39,43 @@ USE_RC_SUBR= mongod
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MV8}
-SCONS_ARGS+= --usev8
+.if ${PORT_OPTIONS:MSM}
+SCONS_ARGS+= --usesm --use-system-sm
+LIB_DEPENDS+= js:${PORTSDIR}/lang/spidermonkey17
+.else
+SCONS_ARGS+= --usev8 --use-system-v8
LIB_DEPENDS+= v8:${PORTSDIR}/lang/v8
+.endif
+
+.if ${PORT_OPTIONS:MSSL}
+USE_OPENSSL= yes
+SCONS_ARGS+= --ssl
+.endif
+
+.if ${PORT_OPTIONS:MTEST}
+BUILD_DEPENDS= pymongo>=2.5:${PORTSDIR}/databases/pymongo
+SCONS_TARGET= all
+SMOKE_TESTS= smokeAll smokeCppUnittests
+. if ${PORT_OPTIONS:MSSL}
+SMOKE_TESTS+= smokeSsl
+. endif
.else
-SCONS_ARGS+= --usesm
-LIB_DEPENDS+= js:${PORTSDIR}/lang/spidermonkey17
+SCONS_TARGET= core tools
.endif
+post-patch:
+ @${REINPLACE_CMD} 's/\["-O3"\]/"${CFLAGS}"/' \
+ ${WRKSRC}/SConstruct
+
post-install:
@if [ ! -f ${PREFIX}/etc/mongodb.conf ]; then \
${TOUCH} ${PREFIX}/etc/mongodb.conf ; \
fi
+.if ${PORT_OPTIONS:MTEST}
+test: build-depends build
+ @cd ${BUILD_WRKSRC} && \
+ ${SCONS_BIN} ${SCONS_ENV} ${SCONS_ARGS} ${SMOKE_TESTS}
+.endif
+
.include <bsd.port.mk>