dev-libs/mongo-cxx-driver: Fix building with more recent boost
authorDavid Seifert <soap@gentoo.org>
Thu, 29 Dec 2016 14:37:02 +0000 (16:37 +0200)
committerDavid Seifert <soap@gentoo.org>
Thu, 29 Dec 2016 14:38:23 +0000 (16:38 +0200)
Gentoo-bug: 598340
* Make PATCHES -p1 compliant
* Make multilib-strict compliant
* Misc QA fixes

Package-Manager: Portage-2.3.3, Repoman-2.3.1

dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch
dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch [new file with mode: 0644]
dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild [new file with mode: 0644]
dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2.ebuild [deleted file]

index 89ec03b11f305d44875994fe48e1c4730cd5d648..2a8ce309b66c8a4eadb9bf31d76a1d784cdd6c73 100644 (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.
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 (file)
index 0000000..9997dd5
--- /dev/null
@@ -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 (file)
index 0000000..eff4802
--- /dev/null
@@ -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 (file)
index 724fdce..0000000
+++ /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
-}