dev-libs/mongo-cxx-driver: Fix building with more recent boost

Gentoo-bug: 598340
* Make PATCHES -p1 compliant
* Make multilib-strict compliant
* Misc QA fixes

Package-Manager: Portage-2.3.3, Repoman-2.3.1
This commit is contained in:
David Seifert
2016-12-29 16:37:02 +02:00
parent c7fd3ef455
commit 8a67edc440
4 changed files with 89 additions and 72 deletions

View File

@@ -1,5 +1,5 @@
--- /tmp/a/SConstruct 2016-06-21 21:15:24.000000000 +0200
+++ /tmp/b/SConstruct 2016-08-19 11:40:45.916695952 +0200
--- a/SConstruct
+++ b/SConstruct
@@ -865,7 +865,6 @@
# -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.

View File

@@ -0,0 +1,15 @@
Fix missing implicit include.
Patch by Jan-Matthias Braun
See also: https://bugs.gentoo.org/show_bug.cgi?id=598340
--- a/src/mongo/client/examples/connect.cpp
+++ b/src/mongo/client/examples/connect.cpp
@@ -29,6 +29,8 @@
#include "mongo/client/dbclient.h"
#include "mongo/stdx/functional.h"
+#include <boost/core/ref.hpp>
+
namespace {
class OstreamAppender : public mongo::logger::MessageLogDomain::EventAppender {

View File

@@ -0,0 +1,72 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
SCONS_MIN_VERSION=2.3.0
inherit scons-utils toolchain-funcs
DESCRIPTION="C++ Driver for MongoDB"
HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver"
SRC_URI="https://github.com/mongodb/${PN}/archive/legacy-${PV}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug libressl sasl ssl static-libs"
RDEPEND="
!dev-db/tokumx
dev-libs/boost:=[threads(+)]
sasl? ( dev-libs/cyrus-sasl )
ssl? (
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
)"
DEPEND="${RDEPEND}"
# Maintainer notes
# TODO: enable test in IUSE with
# test? ( >=dev-cpp/gtest-1.7.0 dev-db/mongodb )
PATCHES=(
"${FILESDIR}"/${PN}-1.1.0-fix-scons.patch
"${FILESDIR}"/${PN}-1.1.2-boost-ref.patch
)
S="${WORKDIR}/${PN}-legacy-${PV}"
src_configure() {
scons_opts=(
--cc=$(tc-getCC)
--cxx=$(tc-getCXX)
--cpppath="${EPREFIX}"/usr/include
--libpath="${EPREFIX}"/usr/$(get_libdir)
--variant-dir=build
--disable-warnings-as-errors
--sharedclient
)
use debug && scons_opts+=( --dbg=on )
use sasl && scons_opts+=( --use-sasl-client )
use ssl && scons_opts+=( --ssl )
}
src_compile() {
escons "${scons_opts[@]}" all
}
src_install() {
escons "${scons_opts[@]}" install --prefix="${ED%/}"/usr
# fix multilib-strict QA failures
mv "${ED%/}"/usr/{lib,$(get_libdir)} || die
einstalldocs
if ! use static-libs; then
find "${D}" -name '*.a' -delete || die
fi
}

View File

@@ -1,70 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
SCONS_MIN_VERSION="2.3.0"
inherit eutils multilib scons-utils
DESCRIPTION="C++ Driver for MongoDB"
HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver"
SRC_URI="https://github.com/mongodb/${PN}/archive/legacy-${PV}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug libressl sasl ssl static-libs"
RDEPEND="!dev-db/tokumx
>=dev-libs/boost-1.50[threads(+)]
sasl? ( dev-libs/cyrus-sasl )
ssl? (
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
)"
DEPEND="${RDEPEND}"
# Maintainer notes
# TODO: enable test in IUSE with
# test? ( >=dev-cpp/gtest-1.7.0 dev-db/mongodb )
DOCS=( README.md )
S="${WORKDIR}/${PN}-legacy-${PV}"
pkg_setup() {
scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)"
scons_opts+=" --disable-warnings-as-errors --sharedclient"
if use debug; then
scons_opts+=" --dbg=on"
fi
if use prefix; then
scons_opts+=" --cpppath=${EPREFIX}/usr/include"
scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)"
fi
if use sasl; then
scons_opts+=" --use-sasl-client"
fi
if use ssl; then
scons_opts+=" --ssl"
fi
}
src_prepare() {
eapply_user
epatch "${FILESDIR}/${PN}-1.1.0-fix-scons.patch"
}
src_compile() {
escons "${scons_opts}" all
}
src_install() {
escons ${scons_opts} install --prefix="${ED}"/usr
use static-libs || find "${D}" -name '*.a' -delete
}