mongodb: factor out common parts to Makefile.inc
This commit is contained in:
parent
f2bc2fe97f
commit
f090a020af
@ -1,91 +1,24 @@
|
||||
PORTROACH = limitw:1,even
|
||||
USE_WXNEEDED = Yes
|
||||
|
||||
# The default storage engine (WiredTiger) only works on amd64.
|
||||
ONLY_FOR_ARCHS = amd64
|
||||
DPB_PROPERTIES = parallel
|
||||
|
||||
COMMENT = scalable, high-performance document-oriented database
|
||||
PORTROACH = limitw:^3\.6\.
|
||||
|
||||
# db upgrades are only supported across one major version (3.2-3.4,
|
||||
# 3.4-3.6, 3.6-4.0, etc) and mongodump wasn't in ports until after
|
||||
# OpenBSD-7.1, so holding off on >3.6 until after OpenBSD 7.2.
|
||||
DISTNAME = mongodb-src-r3.6.23
|
||||
PKGNAME = ${DISTNAME:S/src-r//}
|
||||
CATEGORIES = databases
|
||||
|
||||
REVISION = 0
|
||||
|
||||
HOMEPAGE = https://www.mongodb.com/
|
||||
|
||||
# mongodb itself: SSPLv1
|
||||
# abseil-cpp: Apache
|
||||
# asio: Boost
|
||||
# mozjs-60: MPL
|
||||
# wiredtiger: GPLv2 or v3
|
||||
# (later versions: fmt: MIT)
|
||||
PERMIT_PACKAGE = Yes
|
||||
V = 3.6.23
|
||||
REVISION = 1
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX}
|
||||
WANTLIB += boost_chrono-mt boost_filesystem-mt boost_iostreams-mt
|
||||
WANTLIB += boost_program_options-mt boost_regex-mt boost_system-mt
|
||||
WANTLIB += boost_thread-mt c crypto execinfo icudata icui18n icuuc
|
||||
WANTLIB += boost_filesystem-mt boost_iostreams-mt
|
||||
WANTLIB += boost_program_options-mt boost_system-mt
|
||||
WANTLIB += c crypto execinfo icudata icui18n icuuc
|
||||
WANTLIB += kvm m pcre pcrecpp snappy ssl stemmer yaml-cpp z
|
||||
|
||||
MASTER_SITES = https://fastdl.mongodb.org/src/
|
||||
FIX_CRLF_FILES = src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
|
||||
|
||||
PATCH_LIST = patch-* python3-*
|
||||
MODULES = devel/scons \
|
||||
lang/python
|
||||
|
||||
# C++14 (newer versions: C++17; when updating remove -Wno-c++17-extensions)
|
||||
COMPILER = base-clang ports-gcc
|
||||
CXXFLAGS += -Wno-c++17-extensions
|
||||
|
||||
MODPY_RUNDEP = No
|
||||
MODSCONS_ENV = CC="${CC}" \
|
||||
CXX="${CXX}" \
|
||||
CCFLAGS="${CFLAGS} -DBOOST_NO_USER_CONFIG -isystem ${LOCALBASE}/include/bind" \
|
||||
CXXFLAGS="${CXXFLAGS} -Wno-c++17-extensions" \
|
||||
LINKFLAGS="${LDFLAGS} ${LOCALBASE}/lib/libbind/libbind.a" \
|
||||
CPPPATH="${LOCALBASE}/include" \
|
||||
LIBPATH="${LOCALBASE}/lib" \
|
||||
VERBOSE=true
|
||||
# (later versions: add -DBOOST_LOG_DYN_LINK to CXXFLAGS)
|
||||
MODSCONS_FLAGS += --prefix="${PREFIX}" \
|
||||
--opt=on \
|
||||
--ssl=on \
|
||||
--allocator=system \
|
||||
--use-system-boost \
|
||||
--use-system-icu \
|
||||
--use-system-pcre \
|
||||
--use-system-snappy \
|
||||
--use-system-stemmer \
|
||||
--use-system-yaml \
|
||||
--use-system-zlib \
|
||||
-j${MAKE_JOBS}
|
||||
# (later versions: --use-system-zstd; also have --use-system-fmt but
|
||||
# "fails at linking because mongo reaches into fmt internals; see
|
||||
# src/mongo/logv2/log_attr.h)
|
||||
MODSCONS_FLAGS += --prefix="${PREFIX}"
|
||||
|
||||
ALL_TARGET = core tools
|
||||
# (later versions: ALL_TARGET = install-core)
|
||||
LIB_DEPENDS = archivers/snappy \
|
||||
devel/boost \
|
||||
devel/pcre \
|
||||
devel/yaml-cpp \
|
||||
textproc/icu4c \
|
||||
textproc/libstemmer
|
||||
TEST_DEPENDS = databases/py-mongo${MODPY_FLAVOR}
|
||||
# - later versions may need sysutils/py-psutil${MODPY_FLAVOR}
|
||||
# - can't cope with OpenBSD's nameser.h with ancient defines, plus uses
|
||||
# res_ninit/res_nclose which are not supported by the libc resolver
|
||||
BUILD_DEPENDS = devel/py-cheetah${MODPY_FLAVOR} \
|
||||
net/libbind \
|
||||
textproc/py-yaml${MODPY_FLAVOR}
|
||||
|
||||
# later versions: post-extract:
|
||||
# cd ${WRKSRC}/src/third_party/mozjs-60/platform/x86_64/ && cp -R freebsd openbsd
|
||||
|
||||
do-install:
|
||||
.for bin in mongo mongod mongos mongobridge mongoperf
|
||||
@ -94,9 +27,6 @@ do-install:
|
||||
${INSTALL_MAN} ${WRKSRC}/debian/${bin}.1 ${PREFIX}/man/man1; \
|
||||
fi
|
||||
.endfor
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mongodb
|
||||
${INSTALL_DATA} ${FILESDIR}/mongodb.conf \
|
||||
${PREFIX}/share/examples/mongodb
|
||||
|
||||
do-test:
|
||||
@${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC} \
|
||||
|
@ -1,5 +1,5 @@
|
||||
@pkgpath databases/mongodb
|
||||
@option is-branch
|
||||
@pkgpath databases/mongodb
|
||||
@newgroup _mongodb:670
|
||||
@newuser _mongodb:670:670:daemon:MongoDB Account:/nonexistent:/sbin/nologin
|
||||
@rcscript ${RCDIR}/mongod
|
||||
|
@ -1,31 +1,7 @@
|
||||
PORTROACH = limitw:1,even
|
||||
USE_WXNEEDED = Yes
|
||||
|
||||
# The default storage engine (WiredTiger) only works on amd64.
|
||||
ONLY_FOR_ARCHS = amd64
|
||||
DPB_PROPERTIES = parallel
|
||||
|
||||
COMMENT = scalable, high-performance document-oriented database
|
||||
|
||||
# db upgrades are only supported across one major version
|
||||
# 3.4-3.6, 3.6-4.0, etc) and mongodump wasn't in ports until after
|
||||
# OpenBSD-7.1, so holding off on >3.6 until after OpenBSD 7.2.
|
||||
V = 4.4.15
|
||||
|
||||
DISTNAME = mongodb-src-r$V
|
||||
PKGNAME = ${DISTNAME:S/src-r//}
|
||||
|
||||
CATEGORIES = databases
|
||||
|
||||
HOMEPAGE = https://www.mongodb.com/
|
||||
|
||||
# mongodb itself: SSPLv1
|
||||
# abseil-cpp: Apache
|
||||
# asio: Boost
|
||||
# mozjs-60: MPL
|
||||
# wiredtiger: GPLv2 or v3
|
||||
# (later versions: fmt: MIT)
|
||||
PERMIT_PACKAGE = Yes
|
||||
REVISION = 0
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX}
|
||||
WANTLIB += boost_filesystem-mt boost_iostreams-mt boost_log-mt
|
||||
@ -33,57 +9,14 @@ WANTLIB += boost_program_options-mt boost_system-mt boost_thread-mt
|
||||
WANTLIB += c crypto curl execinfo icudata icui18n icuuc kvm m
|
||||
WANTLIB += pcre pcrecpp snappy ssl stemmer yaml-cpp z zstd
|
||||
|
||||
MASTER_SITES = https://fastdl.mongodb.org/src/
|
||||
FIX_CRLF_FILES = src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
|
||||
|
||||
MODULES = devel/scons \
|
||||
lang/python
|
||||
|
||||
# C++17
|
||||
COMPILER = base-clang ports-gcc
|
||||
|
||||
MODPY_RUNDEP = No
|
||||
MODSCONS_ENV = CC="${CC}" \
|
||||
CXX="${CXX}" \
|
||||
CCFLAGS="${CFLAGS} -DBOOST_NO_USER_CONFIG -isystem ${LOCALBASE}/include/bind" \
|
||||
CXXFLAGS="${CXXFLAGS} -DBOOST_LOG_DYN_LINK" \
|
||||
LINKFLAGS="${LDFLAGS} ${LOCALBASE}/lib/libbind/libbind.a" \
|
||||
CPPPATH="${LOCALBASE}/include" \
|
||||
LIBPATH="${LOCALBASE}/lib" \
|
||||
PREFIX="${PREFIX}" \
|
||||
VERBOSE=true
|
||||
MODSCONS_FLAGS += --opt=on \
|
||||
--ssl=on \
|
||||
--allocator=system \
|
||||
--use-system-boost \
|
||||
--use-system-icu \
|
||||
--use-system-pcre \
|
||||
--use-system-snappy \
|
||||
--use-system-stemmer \
|
||||
--use-system-yaml \
|
||||
--use-system-zlib \
|
||||
--use-system-zstd \
|
||||
-j${MAKE_JOBS}
|
||||
# --use-system-fmt fails at linking because mongo reaches into
|
||||
# fmt internals; see src/mongo/logv2/log_attr.h
|
||||
MODSCONS_ENV += PREFIX="${PREFIX}"
|
||||
MODSCONS_FLAGS += --use-system-zstd
|
||||
|
||||
ALL_TARGET = install-core
|
||||
LIB_DEPENDS = archivers/snappy \
|
||||
archivers/zstd \
|
||||
devel/boost \
|
||||
devel/pcre \
|
||||
devel/yaml-cpp \
|
||||
net/curl \
|
||||
textproc/icu4c \
|
||||
textproc/libstemmer
|
||||
TEST_DEPENDS = databases/py-mongo${MODPY_FLAVOR}
|
||||
LIB_DEPENDS = archivers/zstd \
|
||||
net/curl
|
||||
|
||||
# - can't cope with OpenBSD's nameser.h with ancient defines, plus uses
|
||||
# res_ninit/res_nclose which are not supported by the libc resolver
|
||||
BUILD_DEPENDS = devel/py-cheetah${MODPY_FLAVOR} \
|
||||
net/libbind \
|
||||
sysutils/py-psutil${MODPY_FLAVOR} \
|
||||
textproc/py-yaml${MODPY_FLAVOR}
|
||||
BUILD_DEPENDS = sysutils/py-psutil${MODPY_FLAVOR}
|
||||
|
||||
post-extract:
|
||||
cd ${WRKSRC}/src/third_party/mozjs-60/platform/x86_64/ && cp -R freebsd openbsd
|
||||
@ -96,9 +29,6 @@ do-install:
|
||||
fi
|
||||
.endfor
|
||||
${INSTALL_MAN} ${WRKSRC}/debian/mongodb-parameters.5 ${PREFIX}/man/man5
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mongodb
|
||||
${INSTALL_DATA} ${FILESDIR}/mongodb.conf \
|
||||
${PREFIX}/share/examples/mongodb
|
||||
|
||||
do-test:
|
||||
@${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC} \
|
||||
|
72
databases/mongodb/Makefile.inc
Normal file
72
databases/mongodb/Makefile.inc
Normal file
@ -0,0 +1,72 @@
|
||||
USE_WXNEEDED = Yes
|
||||
|
||||
# The default storage engine (WiredTiger) only works on amd64.
|
||||
ONLY_FOR_ARCHS = amd64
|
||||
DPB_PROPERTIES = parallel
|
||||
|
||||
COMMENT = scalable, high-performance document-oriented database
|
||||
|
||||
DISTNAME = mongodb-src-r$V
|
||||
PKGNAME = ${DISTNAME:S/src-r//}
|
||||
|
||||
CATEGORIES = databases
|
||||
|
||||
HOMEPAGE = https://www.mongodb.com/
|
||||
|
||||
# mongodb itself: SSPLv1
|
||||
# abseil-cpp: Apache
|
||||
# asio: Boost
|
||||
# mozjs-60: MPL
|
||||
# wiredtiger: GPLv2 or v3
|
||||
# (later versions: fmt: MIT)
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
MASTER_SITES = https://fastdl.mongodb.org/src/
|
||||
FIX_CRLF_FILES = src/third_party/IntelRDFPMathLib*/LIBRARY/src/bid_functions.h
|
||||
|
||||
MODULES = devel/scons \
|
||||
lang/python
|
||||
|
||||
# C++14 (3.6.x), C++17 (4.x)
|
||||
COMPILER = base-clang ports-gcc
|
||||
|
||||
MODPY_RUNDEP = No
|
||||
MODSCONS_ENV += CC="${CC}" \
|
||||
CXX="${CXX}" \
|
||||
CCFLAGS="${CFLAGS} -DBOOST_NO_USER_CONFIG -isystem ${LOCALBASE}/include/bind" \
|
||||
CXXFLAGS="${CXXFLAGS} -DBOOST_LOG_DYN_LINK" \
|
||||
LINKFLAGS="${LDFLAGS} ${LOCALBASE}/lib/libbind/libbind.a" \
|
||||
CPPPATH="${LOCALBASE}/include" \
|
||||
LIBPATH="${LOCALBASE}/lib" \
|
||||
VERBOSE=true
|
||||
MODSCONS_FLAGS += --opt=on \
|
||||
--ssl=on \
|
||||
--allocator=system \
|
||||
--use-system-boost \
|
||||
--use-system-icu \
|
||||
--use-system-pcre \
|
||||
--use-system-snappy \
|
||||
--use-system-stemmer \
|
||||
--use-system-yaml \
|
||||
--use-system-zlib
|
||||
# --use-system-fmt exists too, but linking fails with ports fmt (seems
|
||||
# that mongo reaches into fmt internals; see src/mongo/logv2/log_attr.h)
|
||||
|
||||
LIB_DEPENDS += archivers/snappy \
|
||||
devel/boost \
|
||||
devel/pcre \
|
||||
devel/yaml-cpp \
|
||||
textproc/icu4c \
|
||||
textproc/libstemmer
|
||||
TEST_DEPENDS += databases/py-mongo${MODPY_FLAVOR}
|
||||
|
||||
# - can't cope with OpenBSD's nameser.h with ancient defines, plus uses
|
||||
# res_ninit/res_nclose which are not supported by the libc resolver
|
||||
BUILD_DEPENDS = devel/py-cheetah${MODPY_FLAVOR} \
|
||||
net/libbind \
|
||||
textproc/py-yaml${MODPY_FLAVOR}
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mongodb
|
||||
${INSTALL_DATA} ${FILESDIR}/mongodb.conf \
|
||||
${PREFIX}/share/examples/mongodb
|
Loading…
Reference in New Issue
Block a user