Line 0
Link Here
|
|
|
1 |
# $FreeBSD$ |
2 |
|
3 |
PORTNAME= mongodb |
4 |
PORTVERSION= ${DISTVERSION:S/-//g} |
5 |
DISTVERSIONPREFIX= r |
6 |
CATEGORIES= databases net |
7 |
MASTER_SITES= https://fastdl.mongodb.org/src/ \ |
8 |
http://fastdl.mongodb.org/src/ \ |
9 |
http://download.mongodb.org/src/ |
10 |
PKGNAMESUFFIX= ${PORTVERSION:R:S/.//} |
11 |
DISTVERSION= 3.4.1 |
12 |
DISTNAME= mongodb-src-${DISTVERSIONPREFIX}${DISTVERSION} |
13 |
|
14 |
MAINTAINER= brendan+freebsd@bbqsrc.net |
15 |
COMMENT= Distributed document-oriented "NoSQL" database |
16 |
|
17 |
# mongodb is AGPLv3, C++ driver is APACHE20 |
18 |
LICENSE= AGPLv3 APACHE20 |
19 |
LICENSE_COMB= multi |
20 |
|
21 |
LIB_DEPENDS= libpcre.so:devel/pcre \ |
22 |
libsnappy.so:archivers/snappy |
23 |
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>=3.11:devel/py-yaml \ |
24 |
${PYTHON_PKGNAMEPREFIX}pymongo>=3.0:databases/pymongo |
25 |
|
26 |
CHOSEN_COMPILER_TYPE= clang |
27 |
|
28 |
ONLY_FOR_ARCHS= amd64 |
29 |
ONLY_FOR_ARCHS_REASON= "Only supported on amd64 (i386 deprecated in v3)" |
30 |
|
31 |
CONFLICTS_BUILD= mongo-cxx-driver |
32 |
OPTIONS_DEFINE= SASL SSL |
33 |
OPTIONS_DEFAULT= SASL SSL |
34 |
|
35 |
SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 |
36 |
SASL_MAKE_ARGS= --use-sasl-client |
37 |
|
38 |
SSL_USE= yes |
39 |
SSL_MAKE_ARGS= --ssl |
40 |
|
41 |
USES= compiler:c++14-lang cpe execinfo python:build scons |
42 |
|
43 |
MAKE_ARGS= --prefix=${STAGEDIR}${PREFIX} \ |
44 |
--use-system-pcre --use-system-snappy \ |
45 |
--cxx-std=14 --runtime-hardening=on \ |
46 |
--release VERBOSE=on |
47 |
|
48 |
USERS= mongodb |
49 |
GROUPS= mongodb |
50 |
|
51 |
USE_RC_SUBR= mongod |
52 |
|
53 |
ALL_TARGET= core |
54 |
TEST_TARGET= unittests |
55 |
|
56 |
.include <bsd.port.options.mk> |
57 |
|
58 |
.if ${PORT_OPTIONS:MSSL} |
59 |
USES+= ssl |
60 |
.endif |
61 |
|
62 |
.include <bsd.port.pre.mk> |
63 |
|
64 |
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1002000 |
65 |
# Cannot be built |
66 |
IGNORE= unsupported on FreeBSD 10.1 or older |
67 |
.endif |
68 |
# Bugs when compiled with < Clang 3.7 |
69 |
# - https://jira.mongodb.org/browse/SERVER-21217 |
70 |
# - https://jira.mongodb.org/browse/SERVER-22740 |
71 |
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 37 |
72 |
BUILD_DEPENDS+= ${LOCALBASE}/bin/clang37:lang/clang37 |
73 |
CPP= ${LOCALBASE}/bin/clang-cpp37 |
74 |
CC= ${LOCALBASE}/bin/clang37 |
75 |
CXX= ${LOCALBASE}/bin/clang++37 |
76 |
.endif |
77 |
|
78 |
post-install: |
79 |
.for f in mongo mongod mongoperf mongos |
80 |
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f} |
81 |
.endfor |
82 |
${CP} ${WRKSRC}/rpm/mongod.conf ${STAGEDIR}${PREFIX}/etc/mongodb.conf.sample |
83 |
|
84 |
do-test: |
85 |
@cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} \ |
86 |
${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${TEST_TARGET} &&\ |
87 |
${PYTHON_CMD} ${BUILD_WRKSRC}/buildscripts/resmoke.py\ |
88 |
--suites=unittests --jobs=${MAKE_JOBS_NUMBER} |
89 |
|
90 |
PORTSCOUT= limitw:1,even |
91 |
|
92 |
CPE_PRODUCT= mongodb |
93 |
|
94 |
.include <bsd.port.post.mk> |