# Template file for 'mongodb' pkgname=mongodb version=3.2.1 revision=1 hostmakedepends="scons" makedepends="boost-devel pcre-devel snappy-devel libressl-devel libpcap-devel gperftools-devel libsasl-devel yaml-cpp-devel valgrind-devel" conf_files="/etc/mongodb/mongodb.conf" system_accounts="mongodb" mongodb_homedir="/var/lib/mongodb" short_desc="High-performance, schema-free document-oriented database" maintainer="Enno Boland " homepage="http://www.mongodb.org" license="AGPL-3" distfiles="http://downloads.mongodb.org/src/mongodb-src-r${version}.tar.gz" checksum=50431a3ba5ab68bd0bed4a157a8528ca27753a63cf101f13135255e4e9d42f15 make_dirs=" /var/lib/mongodb 0700 mongodb mongodb /var/log/mongodb 0750 mongodb mongodb" wrksrc="mongodb-src-r${version}" _scons_args=" --use-system-boost \ --use-system-pcre \ --use-system-snappy \ --use-system-tcmalloc \ --use-system-yaml \ --use-system-zlib \ --use-sasl-client \ --ssl \ --nostrip \ --disable-warnings-as-errors" case "$XBPS_TARGET_MACHINE" in x86_64*|aarch64*) _scons_args+=" --wiredtiger=on";; *) _scons_args+=" --wiredtiger=off";; esac # ETOOHUGE nodebug=1 #nocross="http://build.voidlinux.eu/builders/armv7l_builder/builds/10684/steps/shell_3/logs/stdio" do_configure() { find . -name SConstruct -print0 | xargs -0 sed -i "s/-Werror/-Wno-error/g" } post_configure() { case "$XBPS_TARGET_MACHINE" in *-musl) # Disable strtouq(3) sed -i src/third_party/wiredtiger/build_linux/wiredtiger_config.h \ -e "s;#define HAVE_STRTOUQ 1;#undef HAVE_STRTOUQ;" esac } do_build() { scons core tools ${makejobs} \ CC=$CC \ CFLAGS="$CFLAGS" \ CXX=$CXX \ CXXFLAGS="$CXXFLAGS" \ LIBPATH="${XBPS_CROSS_BASE}/usr/lib" \ CPPPATH="${XBPS_CROSS_BASE}/usr/include" \ --prefix="/usr" \ $_scons_args } do_install() { for b in mongos mongod mongosniff mongo mongoperf; do vbin $b done vinstall ${FILESDIR}/mongodb.conf 644 etc/mongodb vsv mongodb }