summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2018-07-06 13:20:06 +0100
committerTony Vroon <chainsaw@gentoo.org>2018-07-09 09:59:26 +0100
commit80b554b3f8965c2bfaed570d3e17927164c4228b (patch)
treee67b4de389486ef83cff8eed60b911ce2dc56a4c /dev-db
parentsys-apps/gptfdisk: We need nucurses with unicode support. (diff)
downloadgentoo-80b554b3f8965c2bfaed570d3e17927164c4228b.tar.gz
gentoo-80b554b3f8965c2bfaed570d3e17927164c4228b.tar.bz2
gentoo-80b554b3f8965c2bfaed570d3e17927164c4228b.zip
dev-db/tokumx: GCC 7 build breakage fixes.
Unresolved symbol issue at final link addressed by Mariusz Ceier. Implicit casts of smart pointers to boolean made explicit by me. No revision bump. Closes: https://bugs.gentoo.org/625158 Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch102
-rw-r--r--dev-db/tokumx/files/tokumx-2.0.2-undefined-reference.patch47
-rw-r--r--dev-db/tokumx/tokumx-2.0.2.ebuild9
3 files changed, 155 insertions, 3 deletions
diff --git a/dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch b/dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch
new file mode 100644
index 000000000000..1203d1fc8098
--- /dev/null
+++ b/dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch
@@ -0,0 +1,102 @@
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/client_load.cpp tokumx-enterprise-2.0.2/src/mongo/db/client_load.cpp
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/client_load.cpp 2018-07-03 15:57:40.709360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/client_load.cpp 2018-07-03 15:57:48.127361253 +0100
+@@ -74,7 +74,7 @@
+ }
+
+ bool Client::loadInProgress() const {
+- return _loadInfo;
++ return bool(_loadInfo);
+ }
+
+ } // namespace mongo
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/collection_map.h tokumx-enterprise-2.0.2/src/mongo/db/collection_map.h
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/collection_map.h 2018-07-03 15:57:40.709360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/collection_map.h 2018-07-03 15:57:48.127361253 +0100
+@@ -66,7 +66,7 @@
+ // which must succeed, by the first invariant.
+ Collection *getCollection(const StringData &ns);
+
+- bool allocated() const { return _metadb; }
++ bool allocated() const { return bool(_metadb); }
+
+ void getNamespaces( list<string>& tofill );
+
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/ops/query.cpp tokumx-enterprise-2.0.2/src/mongo/db/ops/query.cpp
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/ops/query.cpp 2018-07-03 15:57:40.703360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/ops/query.cpp 2018-07-03 15:58:08.348362094 +0100
+@@ -635,7 +635,7 @@
+ shared_ptr<ExplainRecordingStrategy> ret
+ ( new SimpleCursorExplainStrategy( ancillaryInfo, _cursor ) );
+ ret->notePlan( queryPlan.valid() && queryPlan.scanAndOrderRequired,
+- queryPlan.keyFieldsOnly );
++ bool(queryPlan.keyFieldsOnly) );
+ return ret;
+ }
+
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/pipeline/document_source_sort.cpp tokumx-enterprise-2.0.2/src/mongo/db/pipeline/document_source_sort.cpp
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/pipeline/document_source_sort.cpp 2018-07-03 15:57:40.707360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/pipeline/document_source_sort.cpp 2018-07-03 15:57:48.128361253 +0100
+@@ -106,7 +106,7 @@
+ bool DocumentSourceSort::coalesce(const intrusive_ptr<DocumentSource> &pNextSource) {
+ if (!limitSrc) {
+ limitSrc = dynamic_cast<DocumentSourceLimit*>(pNextSource.get());
+- return limitSrc; // false if next is not a $limit
++ return bool(limitSrc); // false if next is not a $limit
+ }
+ else {
+ return limitSrc->coalesce(pNextSource);
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/queryoptimizercursorimpl.cpp tokumx-enterprise-2.0.2/src/mongo/db/queryoptimizercursorimpl.cpp
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/queryoptimizercursorimpl.cpp 2018-07-03 15:57:40.702360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/queryoptimizercursorimpl.cpp 2018-07-03 15:57:48.128361253 +0100
+@@ -370,7 +370,7 @@
+
+ // The query plan must have a matcher. The matcher's constructor performs some aspects
+ // of query validation that should occur before a cursor is returned.
+- fassert( 16449, singlePlan->matcher() );
++ fassert( 16449, bool(singlePlan->matcher()) );
+
+ if ( needMatcher ) {
+ single->setMatcher( singlePlan->matcher() );
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_optimizer_internal.cpp tokumx-enterprise-2.0.2/src/mongo/db/query_optimizer_internal.cpp
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_optimizer_internal.cpp 2018-07-03 15:57:40.707360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/query_optimizer_internal.cpp 2018-07-03 15:57:48.129361253 +0100
+@@ -234,7 +234,7 @@
+ // The query plan must have a matcher. The matcher's constructor performs some aspects
+ // of query validation that should occur as part of this class's init() if not handled
+ // already.
+- fassert( 16249, queryPlan().matcher() );
++ fassert( 16249, bool(queryPlan().matcher()) );
+
+ // TODO This violates the current Cursor interface abstraction, but for now it's simpler to keep our own set of
+ // dups rather than avoid poisoning the cursor's dup set with unreturned documents. Deduping documents
+@@ -257,7 +257,7 @@
+ _explainPlanInfo.reset( new ExplainPlanInfo() );
+ _explainPlanInfo->notePlan( *_c,
+ queryPlan().scanAndOrderRequired(),
+- queryPlan().keyFieldsOnly() );
++ bool(queryPlan().keyFieldsOnly()) );
+ return _explainPlanInfo;
+ }
+
+@@ -1226,7 +1226,7 @@
+ _explainPlanInfo.reset( new ExplainPlanInfo() );
+ _explainPlanInfo->notePlan( *_c,
+ _queryPlan->scanAndOrderRequired(),
+- _queryPlan->keyFieldsOnly() );
++ bool(_queryPlan->keyFieldsOnly()) );
+ shared_ptr<ExplainClauseInfo> clauseInfo( new ExplainClauseInfo() );
+ clauseInfo->addPlanInfo( _explainPlanInfo );
+ _mps->addClauseInfo( clauseInfo );
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_plan_summary.h tokumx-enterprise-2.0.2/src/mongo/db/query_plan_summary.h
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_plan_summary.h 2018-07-03 15:57:40.705360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/query_plan_summary.h 2018-07-03 15:57:48.129361253 +0100
+@@ -35,7 +35,7 @@
+ * The 'fieldRangeMulti' attribute is required, and its presence indicates the object has
+ * been configured with a query plan.
+ */
+- bool valid() const { return fieldRangeSetMulti; }
++ bool valid() const { return bool(fieldRangeSetMulti); }
+
+ // A description of the valid values for the fields of a query, in the context of a multikey
+ // index or in memory sort.
diff --git a/dev-db/tokumx/files/tokumx-2.0.2-undefined-reference.patch b/dev-db/tokumx/files/tokumx-2.0.2-undefined-reference.patch
new file mode 100644
index 000000000000..012498f7ecd0
--- /dev/null
+++ b/dev-db/tokumx/files/tokumx-2.0.2-undefined-reference.patch
@@ -0,0 +1,47 @@
+diff -uNr a/src/third_party/backup/copier.cc b/src/third_party/backup/copier.cc
+--- a/src/third_party/backup/copier.cc 2018-07-06 12:43:52.698825122 +0200
++++ b/src/third_party/backup/copier.cc 2018-07-06 12:41:40.066804121 +0200
+@@ -107,10 +107,12 @@
+ int r = 0;
+ char *fname = 0;
+ size_t n_known = 0;
++ char *dupname;
+ {
+ with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL));
+ // Start with "."
+- m_todo.push_back(strdup("."));
++ dupname = strdup(".");
++ m_todo.push_back(dupname);
+ n_known = m_todo.size();
+ }
+ while (n_known != 0) {
+@@ -697,6 +699,7 @@
+ int error = 0;
+ with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL));
+ struct dirent const *e = NULL;
++ char *dupname;
+ while((e = readdir(dir)) != NULL) {
+ if (!the_manager.copy_is_enabled()) break;
+ if(is_dot(e)) {
+@@ -716,8 +719,9 @@
+ goto out;
+ }
+
++ dupname = strdup(new_name);
+ // Add it to our todo list.
+- m_todo.push_back(strdup(new_name));
++ m_todo.push_back(dupname);
+ TRACE("~~~Added this file to todo list:", new_name);
+ }
+ }
+@@ -730,7 +734,9 @@
+ //
+ void copier::add_file_to_todo(const char *file) throw() {
+ with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL));
+- m_todo.push_back(strdup(file));
++ char *dupname;
++ dupname = strdup(file);
++ m_todo.push_back(dupname);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
diff --git a/dev-db/tokumx/tokumx-2.0.2.ebuild b/dev-db/tokumx/tokumx-2.0.2.ebuild
index 987be829e3bc..04851a084620 100644
--- a/dev-db/tokumx/tokumx-2.0.2.ebuild
+++ b/dev-db/tokumx/tokumx-2.0.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -19,10 +19,11 @@ KEYWORDS="~amd64"
IUSE="pax_kernel"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RDEPEND="!dev-db/mongodb
+RDEPEND="!app-admin/mongo-tools
+ !dev-db/mongodb
+ !dev-libs/mongo-cxx-driver
${PYTHON_DEPS}
dev-libs/jemalloc
- !dev-libs/mongo-cxx-driver
>=dev-libs/boost-1.50[threads(+)]
>=dev-libs/libpcre-8.30[cxx]
net-libs/libpcap"
@@ -40,6 +41,8 @@ CHECKREQS_DISK_BUILD="13G"
src_prepare() {
eapply "${FILESDIR}/${P}-no-werror.patch"
eapply "${FILESDIR}/${P}-boost-57.patch"
+ eapply "${FILESDIR}/${P}-gcc-7.patch"
+ eapply "${FILESDIR}/${P}-undefined-reference.patch"
cmake-utils_src_prepare
}