PKGBUILD with 1.1.3, patched for openssl-1.0 and latest boost:
# $Id$
# Maintainer: monty <linksoft [at] gmx [dot] de>
_pkg=mongo-cxx-driver
_subpkg=legacy
pkgname=${_pkg}-${_subpkg}
pkgver=1.1.3
pkgrel=1
pkgdesc='Official MongoDB C++ driver (legacy).'
arch=('i686' 'x86_64')
url='http://www.mongodb.org'
license=(APACHE)
depends=('boost-libs' 'libsasl' 'openssl-1.0')
makedepends=('scons' 'boost' 'readline' 'openssl-1.0')
source=("https://github.com/mongodb/${_pkg}/archive/${_subpkg}-${pkgver//_/-}.tar.gz")
conflicts=("mongodb<2.6.0")
options=("staticlibs")
provides=("mongo-cxx-driver")
sha512sums=('c2b259a6cd10415efaa7ac464180640f7218d6e4e470ebedc03957e5651a79f4d62269ab4aa8f07d036286a8b9e34e3f9a2fc3183159dc54e50ebe487f9abb85')
prepare() {
cd ${pkgname}-${pkgver//_/-}
sed -e 's,boost::next,std::next,g' -i src/mongo/client/wire_protocol_writer.cpp
sed -e 's,boost::next,std::next,g' -i src/mongo/client/command_writer.cpp
}
package() {
cd ${pkgname}-${pkgver//_/-}
scons \
--use-sasl-client \
--ssl \
--prefix="$pkgdir/usr" \
--disable-warnings-as-errors \
--sharedclient \
--cpppath=/usr/include/openssl-1.0 \
--libpath=/usr/lib/openssl-1.0 \
install
}
Pinned Comments
mrohnstock commented on 2015-02-13 06:59
ATTENTION FOR C++11 USERS:
If you want to use this driver for a project which gets compiled with c++11 features enabled (-std=c++11), you have to add --c++11 flag to scons, otherwise intialize the driver will crash with segmentation fault (see https://jira.mongodb.org/browse/CXX-458).
I can't enable this flag by default, because your project has to compile with -std=c++11, too. I could create an other package for reflecting this issue, if someone ask for it.
Otherwise current develop-branch of this driver is for c++11 only, but will take some time until it's usable (at least for testing).