# Copyright 2014 Marc-Antoine Perennou # Copyright 2012 Michael Thomas # Distributed under the terms of the GNU General Public License v2 # Based in part upon 'mongodb-1.6.5.exheres-0', which is: # Copyright 2010 Jonathan Dahan require scons systemd-service [ systemd_files=[ debian/mongod.service ] ] SUMMARY="A scalable, high-performance, schema-free, document-oriented database" DESCRIPTION="Written in C++, MongoDB bridges the gap between key-value stores (which are fast and highly scalable) and traditional RDBMS systems (which provide structured schemas and powerful queries)." HOMEPAGE="https://www.mongodb.org" DOWNLOADS="https://downloads.mongodb.org/src/${PN}-src-r${PV}.tar.gz" LICENCES="AGPL-3" SLOT="0" PLATFORMS="~amd64" MYOPTIONS="" DEPENDENCIES=" build: sys-devel/scons[<3.1][python_abis:2.7] run: group/mongodb user/mongodb build+run: dev-libs/openssl:= dev-python/typing[python_abis:2.7] dev-python/Cheetah[python_abis:2.7] dev-python/PyYAML:2.7[python_abis:2.7] net-libs/cyrus-sasl " WORK="${WORKBASE}/${PN}-src-r${PV}" MONGO_PARAMS=( CC="${CC}" CXX="${CXX}" --release --nostrip --prefix="${IMAGE}"/usr/"$(exhost --target)" --ssl --use-sasl-client --disable-warnings-as-errors ) SCONS_SRC_CONFIGURE_PARAMS=("${MONGO_PARAMS[@]}") SCONS_SRC_COMPILE_PARAMS=("${MONGO_PARAMS[@]}") SCONS_SRC_INSTALL_PARAMS=("${MONGO_PARAMS[@]}") RESTRICT="test" DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/c388d2db35d576862ebf42758686df340bc0bb9f.patch ) src_prepare() { default edo sed -e '/"-ggdb",/d' -i SConstruct edo sed "s@/usr/bin@/usr/$(exhost --target)/bin@" -i debian/mongod.service # TLS 1.3 build is broken edo sed '/counts.tls13/d' -i src/mongo/util/net/ssl_manager_openssl.cpp } src_compile() { escons \ --config=cache \ --jobs=${EXJOBS:-1} \ CFLAGS="${CFLAGS}" \ CXXFLAGS="${CXXFLAGS}" \ "${SCONS_SRC_COMPILE_PARAMS[@]}" \ all } src_install() { escons \ --config=cache \ "${SCONS_SRC_INSTALL_PARAMS[@]}" \ install emagicdocs install_systemd_files insinto /etc/ doins debian/mongod.conf diropts -o mongodb -g mongodb keepdir /var/{lib,log}/mongodb } src_test() { escons \ --jobs ${EXJOBS:-1} \ "${MONGO_PARAMS[@]}" \ test edo ./test }