1 |
commit: 7f12cace81b63c922641029471c832b7f1666736 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 2 18:54:40 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 2 18:54:53 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f12cace |
7 |
|
8 |
dev-db/mongodb: Fix boost::none usage |
9 |
|
10 |
Gentoo-Bug: 578846 |
11 |
|
12 |
Package-Manager: portage-2.2.28 |
13 |
|
14 |
.../mongodb/files/mongodb-3.2.4-boost-1.60.patch | 84 ++++++++++++++++++++++ |
15 |
dev-db/mongodb/mongodb-3.2.4.ebuild | 3 +- |
16 |
2 files changed, 86 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch b/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch |
19 |
new file mode 100644 |
20 |
index 0000000..41c9bd2 |
21 |
--- /dev/null |
22 |
+++ b/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch |
23 |
@@ -0,0 +1,84 @@ |
24 |
+Fix issues caused by boost::none changes. |
25 |
+See also: https://bugs.gentoo.org/show_bug.cgi?id=578846 |
26 |
+Adapted from: https://github.com/mongodb/mongo/commit/92c3f80f384d2825efeabd0d26aa534c0deb6988 |
27 |
+ |
28 |
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor.cpp |
29 |
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor.cpp |
30 |
+@@ -47,7 +47,7 @@ |
31 |
+ if (_referenceDoc.isEmpty()) { |
32 |
+ FTDCBSONUtil::extractMetricsFromDocument(sample, sample, &_metrics); |
33 |
+ _reset(sample, date); |
34 |
+- return {boost::none_t()}; |
35 |
++ return {boost::none}; |
36 |
+ } |
37 |
+ |
38 |
+ _metrics.resize(0); |
39 |
+@@ -107,7 +107,7 @@ |
40 |
+ } |
41 |
+ |
42 |
+ // The buffer is not full, inform the caller |
43 |
+- return {boost::none_t()}; |
44 |
++ return {boost::none}; |
45 |
+ } |
46 |
+ |
47 |
+ StatusWith<std::tuple<ConstDataRange, Date_t>> FTDCCompressor::getCompressedSamples() { |
48 |
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor_test.cpp |
49 |
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor_test.cpp |
50 |
+@@ -122,7 +122,7 @@ |
51 |
+ TestTie() : _compressor(&_config) {} |
52 |
+ |
53 |
+ ~TestTie() { |
54 |
+- validate(boost::none_t()); |
55 |
++ validate(boost::none); |
56 |
+ } |
57 |
+ |
58 |
+ StatusWith<boost::optional<std::tuple<ConstDataRange, FTDCCompressor::CompressorState, Date_t>>> |
59 |
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/file_writer.cpp |
60 |
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/file_writer.cpp |
61 |
+@@ -205,7 +205,7 @@ |
62 |
+ |
63 |
+ Status FTDCFileWriter::close() { |
64 |
+ if (_archiveStream.is_open()) { |
65 |
+- Status s = flush(boost::none_t(), Date_t()); |
66 |
++ Status s = flush(boost::none, Date_t()); |
67 |
+ |
68 |
+ _archiveStream.close(); |
69 |
+ |
70 |
+--- mongodb-src-r3.2.4/src/mongo/util/concurrency/shared_mutex_win.hpp |
71 |
++++ mongodb-src-r3.2.4/src/mongo/util/concurrency/shared_mutex_win.hpp |
72 |
+@@ -175,7 +175,7 @@ |
73 |
+ return true; |
74 |
+ } |
75 |
+ |
76 |
+- unsigned long const res=detail::win32::WaitForSingleObject(unlock_sem,::boost::detail::get_milliseconds_until(wait_until)); |
77 |
++ unsigned long const res=WaitForSingleObject(unlock_sem,::boost::detail::get_milliseconds_until(wait_until)); |
78 |
+ if(res==detail::win32::timeout) |
79 |
+ { |
80 |
+ for(;;) |
81 |
+@@ -328,7 +328,7 @@ |
82 |
+ { |
83 |
+ return true; |
84 |
+ } |
85 |
+- unsigned long const wait_res=detail::win32::WaitForMultipleObjects(2,semaphores,true,::boost::detail::get_milliseconds_until(wait_until)); |
86 |
++ unsigned long const wait_res=WaitForMultipleObjects(2,semaphores,true,::boost::detail::get_milliseconds_until(wait_until)); |
87 |
+ if(wait_res==detail::win32::timeout) |
88 |
+ { |
89 |
+ for(;;) |
90 |
+@@ -421,7 +421,7 @@ |
91 |
+ return; |
92 |
+ } |
93 |
+ |
94 |
+- BOOST_VERIFY(!detail::win32::WaitForSingleObject(unlock_sem,detail::win32::infinite)); |
95 |
++ BOOST_VERIFY(!WaitForSingleObject(unlock_sem,detail::win32::infinite)); |
96 |
+ } |
97 |
+ } |
98 |
+ |
99 |
+@@ -502,7 +502,7 @@ |
100 |
+ { |
101 |
+ if(!last_reader) |
102 |
+ { |
103 |
+- BOOST_VERIFY(!detail::win32::WaitForSingleObject(upgrade_sem,detail::win32::infinite)); |
104 |
++ BOOST_VERIFY(!WaitForSingleObject(upgrade_sem,detail::win32::infinite)); |
105 |
+ } |
106 |
+ break; |
107 |
+ } |
108 |
|
109 |
diff --git a/dev-db/mongodb/mongodb-3.2.4.ebuild b/dev-db/mongodb/mongodb-3.2.4.ebuild |
110 |
index e1e5a32..dce800b 100644 |
111 |
--- a/dev-db/mongodb/mongodb-3.2.4.ebuild |
112 |
+++ b/dev-db/mongodb/mongodb-3.2.4.ebuild |
113 |
@@ -101,7 +101,8 @@ pkg_setup() { |
114 |
} |
115 |
|
116 |
src_prepare() { |
117 |
- epatch "${FILESDIR}/${PN}-3.2.0-fix-scons.patch" |
118 |
+ epatch "${FILESDIR}/${PN}-3.2.0-fix-scons.patch" \ |
119 |
+ "${FILESDIR}/${P}-boost-1.60.patch" |
120 |
epatch_user |
121 |
} |