summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-12-29 16:37:02 +0200
committerDavid Seifert <soap@gentoo.org>2016-12-29 16:38:23 +0200
commit8a67edc44089837d2f95e6a7b2ab0a0bfdf38f1d (patch)
tree58b8a90ec95c033135da9790527c7daf2e72fd21
parentapp-arch/unshield: clean up old versions vulnerable to directory traversal. (diff)
downloadgentoo-8a67edc44089837d2f95e6a7b2ab0a0bfdf38f1d.tar.gz
gentoo-8a67edc44089837d2f95e6a7b2ab0a0bfdf38f1d.tar.bz2
gentoo-8a67edc44089837d2f95e6a7b2ab0a0bfdf38f1d.zip
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
-rw-r--r--dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch4
-rw-r--r--dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch15
-rw-r--r--dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild72
-rw-r--r--dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2.ebuild70
4 files changed, 89 insertions, 72 deletions
diff --git a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch
index 89ec03b11f30..2a8ce309b66c 100644
--- a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch
+++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch
@@ -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.
diff --git a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch
new file mode 100644
index 000000000000..9997dd57a2c1
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch
@@ -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 {
diff --git a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild
new file mode 100644
index 000000000000..eff48025a628
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild
@@ -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
+}
diff --git a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2.ebuild b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2.ebuild
deleted file mode 100644
index 724fdce18ff3..000000000000
--- a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2.ebuild
+++ /dev/null
@@ -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
-}