1 |
commit: 8a67edc44089837d2f95e6a7b2ab0a0bfdf38f1d |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 29 14:37:02 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 29 14:38:23 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a67edc4 |
7 |
|
8 |
dev-libs/mongo-cxx-driver: Fix building with more recent boost |
9 |
|
10 |
Gentoo-bug: 598340 |
11 |
* Make PATCHES -p1 compliant |
12 |
* Make multilib-strict compliant |
13 |
* Misc QA fixes |
14 |
|
15 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
16 |
|
17 |
.../files/mongo-cxx-driver-1.1.0-fix-scons.patch | 4 +- |
18 |
.../files/mongo-cxx-driver-1.1.2-boost-ref.patch | 15 +++++ |
19 |
.../mongo-cxx-driver-1.1.2-r1.ebuild | 72 ++++++++++++++++++++++ |
20 |
.../mongo-cxx-driver/mongo-cxx-driver-1.1.2.ebuild | 70 --------------------- |
21 |
4 files changed, 89 insertions(+), 72 deletions(-) |
22 |
|
23 |
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 |
24 |
index 89ec03b..2a8ce30 100644 |
25 |
--- a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch |
26 |
+++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch |
27 |
@@ -1,5 +1,5 @@ |
28 |
---- /tmp/a/SConstruct 2016-06-21 21:15:24.000000000 +0200 |
29 |
-+++ /tmp/b/SConstruct 2016-08-19 11:40:45.916695952 +0200 |
30 |
+--- a/SConstruct |
31 |
++++ b/SConstruct |
32 |
@@ -865,7 +865,6 @@ |
33 |
|
34 |
# -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. |
35 |
|
36 |
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 |
37 |
new file mode 100644 |
38 |
index 00000000..9997dd5 |
39 |
--- /dev/null |
40 |
+++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch |
41 |
@@ -0,0 +1,15 @@ |
42 |
+Fix missing implicit include. |
43 |
+Patch by Jan-Matthias Braun |
44 |
+See also: https://bugs.gentoo.org/show_bug.cgi?id=598340 |
45 |
+ |
46 |
+--- a/src/mongo/client/examples/connect.cpp |
47 |
++++ b/src/mongo/client/examples/connect.cpp |
48 |
+@@ -29,6 +29,8 @@ |
49 |
+ #include "mongo/client/dbclient.h" |
50 |
+ #include "mongo/stdx/functional.h" |
51 |
+ |
52 |
++#include <boost/core/ref.hpp> |
53 |
++ |
54 |
+ namespace { |
55 |
+ |
56 |
+ class OstreamAppender : public mongo::logger::MessageLogDomain::EventAppender { |
57 |
|
58 |
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 |
59 |
new file mode 100644 |
60 |
index 00000000..eff4802 |
61 |
--- /dev/null |
62 |
+++ b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild |
63 |
@@ -0,0 +1,72 @@ |
64 |
+# Copyright 1999-2016 Gentoo Foundation |
65 |
+# Distributed under the terms of the GNU General Public License v2 |
66 |
+# $Id$ |
67 |
+ |
68 |
+EAPI=6 |
69 |
+ |
70 |
+SCONS_MIN_VERSION=2.3.0 |
71 |
+ |
72 |
+inherit scons-utils toolchain-funcs |
73 |
+ |
74 |
+DESCRIPTION="C++ Driver for MongoDB" |
75 |
+HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver" |
76 |
+SRC_URI="https://github.com/mongodb/${PN}/archive/legacy-${PV}.tar.gz" |
77 |
+ |
78 |
+LICENSE="Apache-2.0" |
79 |
+SLOT="0" |
80 |
+KEYWORDS="~amd64 ~x86" |
81 |
+IUSE="debug libressl sasl ssl static-libs" |
82 |
+ |
83 |
+RDEPEND=" |
84 |
+ !dev-db/tokumx |
85 |
+ dev-libs/boost:=[threads(+)] |
86 |
+ sasl? ( dev-libs/cyrus-sasl ) |
87 |
+ ssl? ( |
88 |
+ !libressl? ( dev-libs/openssl:0= ) |
89 |
+ libressl? ( dev-libs/libressl:0= ) |
90 |
+ )" |
91 |
+DEPEND="${RDEPEND}" |
92 |
+ |
93 |
+# Maintainer notes |
94 |
+# TODO: enable test in IUSE with |
95 |
+# test? ( >=dev-cpp/gtest-1.7.0 dev-db/mongodb ) |
96 |
+ |
97 |
+PATCHES=( |
98 |
+ "${FILESDIR}"/${PN}-1.1.0-fix-scons.patch |
99 |
+ "${FILESDIR}"/${PN}-1.1.2-boost-ref.patch |
100 |
+) |
101 |
+ |
102 |
+S="${WORKDIR}/${PN}-legacy-${PV}" |
103 |
+ |
104 |
+src_configure() { |
105 |
+ scons_opts=( |
106 |
+ --cc=$(tc-getCC) |
107 |
+ --cxx=$(tc-getCXX) |
108 |
+ --cpppath="${EPREFIX}"/usr/include |
109 |
+ --libpath="${EPREFIX}"/usr/$(get_libdir) |
110 |
+ --variant-dir=build |
111 |
+ --disable-warnings-as-errors |
112 |
+ --sharedclient |
113 |
+ ) |
114 |
+ |
115 |
+ use debug && scons_opts+=( --dbg=on ) |
116 |
+ use sasl && scons_opts+=( --use-sasl-client ) |
117 |
+ use ssl && scons_opts+=( --ssl ) |
118 |
+} |
119 |
+ |
120 |
+src_compile() { |
121 |
+ escons "${scons_opts[@]}" all |
122 |
+} |
123 |
+ |
124 |
+src_install() { |
125 |
+ escons "${scons_opts[@]}" install --prefix="${ED%/}"/usr |
126 |
+ |
127 |
+ # fix multilib-strict QA failures |
128 |
+ mv "${ED%/}"/usr/{lib,$(get_libdir)} || die |
129 |
+ |
130 |
+ einstalldocs |
131 |
+ |
132 |
+ if ! use static-libs; then |
133 |
+ find "${D}" -name '*.a' -delete || die |
134 |
+ fi |
135 |
+} |
136 |
|
137 |
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 |
138 |
deleted file mode 100644 |
139 |
index 724fdce..00000000 |
140 |
--- a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2.ebuild |
141 |
+++ /dev/null |
142 |
@@ -1,70 +0,0 @@ |
143 |
-# Copyright 1999-2016 Gentoo Foundation |
144 |
-# Distributed under the terms of the GNU General Public License v2 |
145 |
-# $Id$ |
146 |
- |
147 |
-EAPI=6 |
148 |
-SCONS_MIN_VERSION="2.3.0" |
149 |
- |
150 |
-inherit eutils multilib scons-utils |
151 |
- |
152 |
-DESCRIPTION="C++ Driver for MongoDB" |
153 |
-HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver" |
154 |
-SRC_URI="https://github.com/mongodb/${PN}/archive/legacy-${PV}.tar.gz" |
155 |
- |
156 |
-LICENSE="Apache-2.0" |
157 |
-SLOT="0" |
158 |
-KEYWORDS="~amd64 ~x86" |
159 |
-IUSE="debug libressl sasl ssl static-libs" |
160 |
- |
161 |
-RDEPEND="!dev-db/tokumx |
162 |
- >=dev-libs/boost-1.50[threads(+)] |
163 |
- sasl? ( dev-libs/cyrus-sasl ) |
164 |
- ssl? ( |
165 |
- !libressl? ( dev-libs/openssl:0= ) |
166 |
- libressl? ( dev-libs/libressl:0= ) |
167 |
- )" |
168 |
-DEPEND="${RDEPEND}" |
169 |
- |
170 |
-# Maintainer notes |
171 |
-# TODO: enable test in IUSE with |
172 |
-# test? ( >=dev-cpp/gtest-1.7.0 dev-db/mongodb ) |
173 |
- |
174 |
-DOCS=( README.md ) |
175 |
- |
176 |
-S="${WORKDIR}/${PN}-legacy-${PV}" |
177 |
- |
178 |
-pkg_setup() { |
179 |
- scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)" |
180 |
- scons_opts+=" --disable-warnings-as-errors --sharedclient" |
181 |
- |
182 |
- if use debug; then |
183 |
- scons_opts+=" --dbg=on" |
184 |
- fi |
185 |
- |
186 |
- if use prefix; then |
187 |
- scons_opts+=" --cpppath=${EPREFIX}/usr/include" |
188 |
- scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)" |
189 |
- fi |
190 |
- |
191 |
- if use sasl; then |
192 |
- scons_opts+=" --use-sasl-client" |
193 |
- fi |
194 |
- |
195 |
- if use ssl; then |
196 |
- scons_opts+=" --ssl" |
197 |
- fi |
198 |
-} |
199 |
- |
200 |
-src_prepare() { |
201 |
- eapply_user |
202 |
- epatch "${FILESDIR}/${PN}-1.1.0-fix-scons.patch" |
203 |
-} |
204 |
- |
205 |
-src_compile() { |
206 |
- escons "${scons_opts}" all |
207 |
-} |
208 |
- |
209 |
-src_install() { |
210 |
- escons ${scons_opts} install --prefix="${ED}"/usr |
211 |
- use static-libs || find "${D}" -name '*.a' -delete |
212 |
-} |