aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils
diff options
context:
space:
mode:
authorrakuco <rakuco@FreeBSD.org>2015-01-08 20:29:21 +0800
committerrakuco <rakuco@FreeBSD.org>2015-01-08 20:29:21 +0800
commitb33184539d5fbdea154bef99cf47fb5ef6484147 (patch)
tree357ada4364efa84efbee20ecda986066dd0bb154 /deskutils
parentc0a13c1b10c3ee215e8c9547cbb90ee7ae2f8da9 (diff)
downloadfreebsd-ports-gnome-b33184539d5fbdea154bef99cf47fb5ef6484147.tar.gz
freebsd-ports-gnome-b33184539d5fbdea154bef99cf47fb5ef6484147.tar.zst
freebsd-ports-gnome-b33184539d5fbdea154bef99cf47fb5ef6484147.zip
Add an upstream patch that fixes the build with libc++ r224926.
The upstream commit is somewhat big, but we're mostly interested in the change to XesamSearch::operator==(), which is necessary for fixing the build with the upcoming version of libc++ that will be committed to base. PR: 196603
Diffstat (limited to 'deskutils')
-rw-r--r--deskutils/strigidaemon/Makefile2
-rw-r--r--deskutils/strigidaemon/files/patch-git_2667f0bf482
2 files changed, 483 insertions, 1 deletions
diff --git a/deskutils/strigidaemon/Makefile b/deskutils/strigidaemon/Makefile
index 4b636a1e27f5..d81c438ff017 100644
--- a/deskutils/strigidaemon/Makefile
+++ b/deskutils/strigidaemon/Makefile
@@ -2,7 +2,7 @@
PORTNAME= strigidaemon
PORTVERSION= ${STRIGI_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= deskutils
MASTER_SITES= ${STRIGI_MASTER_SITES}
diff --git a/deskutils/strigidaemon/files/patch-git_2667f0bf b/deskutils/strigidaemon/files/patch-git_2667f0bf
new file mode 100644
index 000000000000..a7d5a159d95d
--- /dev/null
+++ b/deskutils/strigidaemon/files/patch-git_2667f0bf
@@ -0,0 +1,482 @@
+The change to XesamSearch::operator==() is required for the port to build with
+libc++ r224926. See https://bugs.freebsd.org/196603.
+
+commit 2667f0bf37bc52c3375d0bc3727d2474568508a7
+Author: Jos van den Oever <jos@vandenoever.info>
+Date: Fri Jul 12 15:55:07 2013 +0200
+
+ Fix Krazy issues.
+
+--- /dev/null
++++ strigidaemon/.krazy
+@@ -0,0 +1,2 @@
++# see http://techbase.kde.org/Development/Tutorials/Code_Checking#Controlling_Krazy_on_the_EBN for an explanation of this file
++EXCLUDE syscalls,typedefs
+--- strigidaemon/bin/daemon/dbus/dbuscpp/dbusbytearray.h
++++ strigidaemon/bin/daemon/dbus/dbuscpp/dbusbytearray.h
+@@ -30,7 +30,7 @@ private:
+ const char* array;
+ int32_t length;
+ public:
+- DBusByteArray(DBusMessage* msg);
++ explicit DBusByteArray(DBusMessage* msg);
+ ~DBusByteArray() {
+ if (msg) {
+ dbus_message_unref(msg);
+--- strigidaemon/bin/daemon/dbus/dbuscpp/dbusobjectcallhandler.h
++++ strigidaemon/bin/daemon/dbus/dbuscpp/dbusobjectcallhandler.h
+@@ -37,7 +37,7 @@ private:
+ std::map<std::string, DBusObjectInterface*> interfaces;
+ public:
+ static const DBusObjectPathVTable vtable;
+- DBusObjectCallHandler(const std::string& path);
++ explicit DBusObjectCallHandler(const std::string& path);
+ ~DBusObjectCallHandler();
+ void addInterface(DBusObjectInterface* interface);
+ void registerOnConnection(DBusConnection* c);
+--- strigidaemon/bin/daemon/dbus/dbuscpp/dbusobjectinterface.h
++++ strigidaemon/bin/daemon/dbus/dbuscpp/dbusobjectinterface.h
+@@ -27,7 +27,7 @@ class DBusObjectInterface {
+ private:
+ const std::string interfacename;
+ public:
+- DBusObjectInterface(const std::string& i) :interfacename(i) {}
++ explicit DBusObjectInterface(const std::string& i) :interfacename(i) {}
+ virtual ~DBusObjectInterface() {};
+ virtual DBusHandlerResult handleCall(DBusConnection* connection,
+ DBusMessage* msg) = 0;
+--- strigidaemon/bin/daemon/dbus/testinterface.cpp
++++ strigidaemon/bin/daemon/dbus/testinterface.cpp
+@@ -38,6 +38,6 @@ TestInterface::upload(const std::vector<char>& upload) {
+ map<string, string>
+ TestInterface::giveMap() {
+ map<string, string> m;
+- m["a"] = "b";
++ m["a"] = 'b';
+ return m;
+ }
+--- strigidaemon/bin/daemon/eventlistener/pollinglistener.h
++++ strigidaemon/bin/daemon/eventlistener/pollinglistener.h
+@@ -47,7 +47,7 @@ class Event;
+ class PollingListener : public EventListener, Strigi::AnalysisCaller {
+ public:
+ PollingListener();
+- PollingListener(std::set<std::string>& dirs);
++ explicit PollingListener(std::set<std::string>& dirs);
+
+ ~PollingListener();
+
+--- strigidaemon/bin/daemon/indexscheduler.cpp
++++ strigidaemon/bin/daemon/indexscheduler.cpp
+@@ -126,7 +126,7 @@ IndexScheduler::processListenerEvents(vector<Event*>& events) {
+ Event* event = *iter;
+
+ STRIGI_LOG_DEBUG ("strigi.IndexScheduler",
+- "event infos: " + event->toString());
++ "event information: " + event->toString());
+
+ switch (event->getType())
+ {
+--- strigidaemon/bin/daemon/queue/jobqueue.h
++++ strigidaemon/bin/daemon/queue/jobqueue.h
+@@ -27,7 +27,7 @@ public:
+ private:
+ Private* p;
+ public:
+- JobQueue(unsigned int n=20);
++ explicit JobQueue(unsigned int n=20);
+ ~JobQueue();
+ void stop();
+ bool addJob(Job* job);
+--- strigidaemon/bin/daemon/xesam/xesamlivesearchinterface.h
++++ strigidaemon/bin/daemon/xesam/xesamlivesearchinterface.h
+@@ -29,7 +29,7 @@ private:
+ XesamLiveSearchInterface(const XesamLiveSearchInterface&);
+ void operator=(const XesamLiveSearchInterface&);
+ public:
+- XesamLiveSearchInterface(XesamLiveSearchInterface* x) :iface(x) {}
++ explicit XesamLiveSearchInterface(XesamLiveSearchInterface* x) :iface(x) {}
+ virtual ~XesamLiveSearchInterface() {}
+ virtual std::string /*session*/ NewSession() {
+ return iface->NewSession();
+--- strigidaemon/bin/daemon/xesam/xesamsearch.h
++++ strigidaemon/bin/daemon/xesam/xesamsearch.h
+@@ -40,10 +40,10 @@ public:
+ XesamSearch(XesamSession& s, const std::string& n,
+ const std::string& query);
+ XesamSearch(const XesamSearch&);
+- XesamSearch(Private* p);
++ explicit XesamSearch(Private* p);
+ ~XesamSearch();
+ void operator=(const XesamSearch& xs);
+- bool operator==(const XesamSearch& xs) { return p == xs.p; }
++ bool operator==(const XesamSearch& xs) const { return p == xs.p; }
+ void startSearch();
+ void getHitCount(void* msg);
+ void getHits(void* msg, uint32_t num);
+--- strigidaemon/bin/daemon/xesam/xesamsession.h
++++ strigidaemon/bin/daemon/xesam/xesamsession.h
+@@ -33,11 +33,11 @@ private:
+
+ XesamSession();
+ public:
+- XesamSession(XesamLiveSearch& x);
++ explicit XesamSession(XesamLiveSearch& x);
+ XesamSession(const XesamSession& xs);
+ ~XesamSession();
+ void operator=(const XesamSession& xs);
+- bool operator==(const XesamSession& xs) { return p == xs.p; }
++ bool operator==(const XesamSession& xs) const { return p == xs.p; }
+ /**
+ * Attempt to set a parameter to the given value.
+ * A runtime_error will be thrown if this function was called after a
+--- strigidaemon/bin/daemon/xsd/xsdparser/xmlstream.h
++++ strigidaemon/bin/daemon/xsd/xsdparser/xmlstream.h
+@@ -35,7 +35,7 @@ private:
+ class Private;
+ Private* p;
+ public:
+- XMLStream(const std::string& xml);
++ explicit XMLStream(const std::string& xml);
+ ~XMLStream();
+ void setFromAttribute(bool&, const char*);
+ void setFromAttribute(int&, const char*);
+@@ -82,7 +82,7 @@ public:
+ std::list<SimpleNode> nodes;
+ std::string text;
+
+- SimpleNode(const std::string& xml);
++ explicit SimpleNode(const std::string& xml);
+ };
+
+
+--- strigidaemon/include/strigi/clientinterface.h
++++ strigidaemon/include/strigi/clientinterface.h
+@@ -37,7 +37,7 @@ public:
+ std::string error;
+ };
+
+- ClientInterface(ClientInterface* i) :iface(i) {}
++ explicit ClientInterface(ClientInterface* i) :iface(i) {}
+ virtual ~ClientInterface() {}
+ virtual int32_t countHits(const std::string& query) {
+ return iface->countHits(query);
+--- strigidaemon/tests/daemon/daemonconfiguratortest.cpp
++++ strigidaemon/tests/daemon/daemonconfiguratortest.cpp
+@@ -68,7 +68,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION( DaemonConfiguratorTest );
+ bool DaemonConfiguratorTest::checkEq(set<string>& ori, set<string>& last,
+ string& errMsg)
+ {
+- for (set<string>::iterator itOri = ori.begin(); itOri != ori.end(); itOri++)
++ for (set<string>::iterator itOri = ori.begin(); itOri != ori.end(); ++itOri)
+ {
+ set<string>::iterator itLast = last.find(*itOri);
+ if (itLast == last.end())
+@@ -105,7 +105,7 @@ bool DaemonConfiguratorTest::checkEq(Strigi::AnalyzerConfiguration& oriConf,
+
+ // check retrieved values
+ for (vector<pair<bool,string> >::iterator itOri = filtersOri.begin();
+- itOri != filtersOri.end(); itOri++)
++ itOri != filtersOri.end(); ++itOri)
+ {
+ FindFilterRule findRule (itOri->first, itOri->second);
+
+@@ -213,8 +213,7 @@ void DaemonConfiguratorTest::testIndexedDirs()
+
+ dirsLast = dirsSet;
+ for (set<string>::iterator it = dirsDelta.begin(); it != dirsDelta.end();
+- it++)
+- {
++ ++it) {
+ dirsLast.insert(*it);
+ }
+
+@@ -244,7 +243,7 @@ void DaemonConfiguratorTest::testFilters()
+ // check retrieved values
+ bool check = true;
+ for (vector<pair<bool,string> >::iterator itSet = filtersSet.begin();
+- itSet != filtersSet.end(); itSet++)
++ itSet != filtersSet.end(); ++itSet)
+ {
+ FindFilterRule findRule (itSet->first, itSet->second);
+
+--- strigidaemon/tests/daemon/dbus/strigidaemonunittestsession.cpp
++++ strigidaemon/tests/daemon/dbus/strigidaemonunittestsession.cpp
+@@ -1,3 +1,22 @@
++/* This file is part of Strigi Desktop Search
++ *
++ * Copyright (C) 2008 Jos van den Oever <jos@vandenoever.info>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public License
++ * along with this library; see the file COPYING.LIB. If not, write to
++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ * Boston, MA 02110-1301, USA.
++ */
+ #include "config.h"
+ #include "strigidaemonunittestsession.h"
+ #include <QtCore/QMap>
+@@ -11,7 +30,6 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <signal.h>
+-#include "config.h"
+ #include "strigilogging.h"
+
+ using namespace std;
+--- strigidaemon/tests/daemon/dbus/strigidaemonunittestsession.h
++++ strigidaemon/tests/daemon/dbus/strigidaemonunittestsession.h
+@@ -1,3 +1,22 @@
++/* This file is part of Strigi Desktop Search
++ *
++ * Copyright (C) 2008 Jos van den Oever <jos@vandenoever.info>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public License
++ * along with this library; see the file COPYING.LIB. If not, write to
++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ * Boston, MA 02110-1301, USA.
++ */
+ #ifndef STRIGIDAEMONUNITTESTSESSION_H
+ #define STRIGIDAEMONUNITTESTSESSION_H
+
+--- strigidaemon/tests/daemon/dbus/test.cpp
++++ strigidaemon/tests/daemon/dbus/test.cpp
+@@ -1,3 +1,22 @@
++/* This file is part of Strigi Desktop Search
++ *
++ * Copyright (C) 2008 Jos van den Oever <jos@vandenoever.info>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public License
++ * along with this library; see the file COPYING.LIB. If not, write to
++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ * Boston, MA 02110-1301, USA.
++ */
+ #include "config.h"
+ #include "strigiclient.h"
+ #include <signal.h>
+@@ -101,7 +120,7 @@ setupTestDir() {
+ ofstream out(file.c_str());
+ out << "<strigiDaemonConfiguration useDBus='1'>" << endl;
+ out << " <repository name='localhost' indexdir='" + strigitestdir
+- + "/" + backend + "' type='" + backend + "'>" << endl;
++ + '/' + backend + "' type='" + backend + "'>" << endl;
+ out << " <path path='" + testdatadir + "'/>" << endl;
+ out << " </repository>" << endl;
+ out << "</strigiDaemonConfiguration>" << endl;
+--- strigidaemon/tests/daemon/dbus/xesamlistener.cpp
++++ strigidaemon/tests/daemon/dbus/xesamlistener.cpp
+@@ -25,14 +25,14 @@
+
+ XesamListener::XesamListener(OrgFreedesktopXesamSearchInterface* xesam)
+ :eventloop(this) {
+- connect(xesam, SIGNAL(HitsAdded(const QString&, uint)),
+- this, SLOT(slotHitsAdded(const QString&, uint)));
+- connect(xesam, SIGNAL(HitsRemoved(const QString &, const QList<uint> &)),
+- this, SLOT(slotHitsRemoved(const QString &, const QList<uint> &)));
+- connect(xesam, SIGNAL(SearchDone(const QString&)),
+- this, SLOT(slotSearchDone(const QString&)));
+- connect(xesam, SIGNAL(StateChanged(const QStringList&)),
+- this, SLOT(slotStateChanged(const QStringList&)));
++ connect(xesam, SIGNAL(HitsAdded(QString, uint)),
++ this, SLOT(slotHitsAdded(QString, uint)));
++ connect(xesam, SIGNAL(HitsRemoved(QString, QList<uint>)),
++ this, SLOT(slotHitsRemoved(QString, QList<uint>)));
++ connect(xesam, SIGNAL(SearchDone(QString)),
++ this, SLOT(slotSearchDone(QString)));
++ connect(xesam, SIGNAL(StateChanged(QStringList)),
++ this, SLOT(slotStateChanged(QStringList)));
+ }
+ bool
+ XesamListener::waitForSearchToFinish(const QString& searchid,
+--- strigidaemon/tests/indextesters/indexmanagertester.cpp
++++ strigidaemon/tests/indextesters/indexmanagertester.cpp
+@@ -42,7 +42,7 @@ void
+ IndexManagerTest::tearDown() {
+ Strigi::IndexPluginLoader::deleteIndexManager(m_manager);
+ // clean up data (if any)
+- string cmd("rm -rf '" + m_indexpath + "'");
++ string cmd("rm -rf '" + m_indexpath + '\'');
+ int r = system(cmd.c_str());
+ CPPUNIT_ASSERT_MESSAGE("cleanup failed", r == 0);
+ }
+--- strigidaemon/tests/indextesters/indexsearchtester.cpp
++++ strigidaemon/tests/indextesters/indexsearchtester.cpp
+@@ -60,9 +60,9 @@ IndexSearchTest::setUp() {
+ }
+
+ #ifdef _WIN32
+- separator = "\\";
++ separator = '\\';
+ #else
+- separator = "/";
++ separator = '/';
+ #endif
+
+ // prepare files to be indexed
+@@ -79,7 +79,7 @@ IndexSearchTest::setUp() {
+
+ // create files on file system
+ for (map<string,string>::iterator iter = indexedFiles.begin();
+- iter != indexedFiles.end(); iter++) {
++ iter != indexedFiles.end(); ++iter) {
+ ofstream file;
+ string fullpath = filedir + separator + iter->first;
+ file.open( fullpath.c_str());
+@@ -96,7 +96,7 @@ IndexSearchTest::setUp() {
+ streamindexer->setIndexWriter(*m_writer);
+
+ for (map<string,string>::iterator iter = indexedFiles.begin();
+- iter != indexedFiles.end(); iter++) {
++ iter != indexedFiles.end(); ++iter) {
+ string temp = filedir + separator + iter->first;
+ fprintf (stderr, "going to index %s\n", temp.c_str());
+ streamindexer->indexFile(temp);
+@@ -110,7 +110,7 @@ IndexSearchTest::setUp() {
+ void
+ IndexSearchTest::tearDown() {
+ // clean up data (does not work on windows)
+- string cmd = "rm -r '" + filedir + "'";
++ string cmd = "rm -r '" + filedir + '\'';
+ int r = system(cmd.c_str());
+ CPPUNIT_ASSERT_MESSAGE ("command failed", r == 0);
+
+--- strigidaemon/tests/indextesters/indextest.cpp
++++ strigidaemon/tests/indextesters/indextest.cpp
+@@ -18,11 +18,10 @@
+ * Boston, MA 02110-1301, USA.
+ */
+
+-#include <cstdlib>
+-
+ #include "indextest.h"
+ #include <strigi/indexmanager.h>
+ #include <strigi/indexpluginloader.h>
++#include <cstdlib>
+
+ using namespace std;
+ using namespace Strigi;
+@@ -50,7 +49,7 @@ void
+ IndexTest::tearDown() {
+ IndexPluginLoader::deleteIndexManager(m_manager);
+ // clean up data (if any)
+- string cmd("rm -rf '" + m_indexpath + "'");
++ string cmd("rm -rf '" + m_indexpath + '\'');
+ int r = system(cmd.c_str());
+ CPPUNIT_ASSERT_MESSAGE("cleanup failed", r == 0);
+ }
+--- strigidaemon/tests/streamanalyzer/diranalyzertester.cpp
++++ strigidaemon/tests/streamanalyzer/diranalyzertester.cpp
+@@ -38,9 +38,9 @@ using namespace std;
+ using namespace strigiunittest;
+
+ #ifdef _WIN32
+- const string DirAnalyzerTester::separator = "\\";
++ const string DirAnalyzerTester::separator = '\\';
+ #else
+- const string DirAnalyzerTester::separator = "/";
++ const string DirAnalyzerTester::separator = '/';
+ #endif
+
+ void DirAnalyzerTester::setUp() {
+@@ -87,7 +87,7 @@ void DirAnalyzerTester::setUp() {
+
+ // create files on file system
+ for (map<string,string>::iterator iter = indexedFiles.begin();
+- iter != indexedFiles.end(); iter++)
++ iter != indexedFiles.end(); ++iter)
+ {
+ string fullpath = filedir + separator + iter->first;
+
+@@ -114,7 +114,7 @@ void DirAnalyzerTester::tearDown()
+ // clean up data
+ string cmd = "rm -r ";
+ cmd += indexdir;
+- cmd += " ";
++ cmd += ' ';
+ cmd += filedir;
+ int r = system(cmd.c_str());
+ CPPUNIT_ASSERT_MESSAGE("cleanup failed", r == 0);
+@@ -144,7 +144,7 @@ void DirAnalyzerTester::testCreateIndex()
+ Strigi::DirAnalyzer* analyzer = new Strigi::DirAnalyzer(*manager, config);
+
+ for (map<string,string>::iterator iter = indexedFiles.begin();
+- iter != indexedFiles.end(); iter++)
++ iter != indexedFiles.end(); ++iter)
+ {
+ string path = filedir + separator + iter->first;
+ // cerr << "going to index " << path << endl;
+--- strigidaemon/tests/streamanalyzer/diranalyzertester.h
++++ strigidaemon/tests/streamanalyzer/diranalyzertester.h
+@@ -17,8 +17,8 @@
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+-#ifndef UNIT_TEST_DIRANALYZER_TEST_H
+-#define UNIT_TEST_DIRANALYZER_TEST_H
++#ifndef UNIT_TEST_DIRANALYZER_TESTER_H
++#define UNIT_TEST_DIRANALYZER_TESTER_H
+
+ #include <cppunit/TestFixture.h>
+ #include <cppunit/extensions/HelperMacros.h>
+--- strigidaemon/tests/streamanalyzer/xesam/xesam2strigitest.cpp
++++ strigidaemon/tests/streamanalyzer/xesam/xesam2strigitest.cpp
+@@ -67,7 +67,7 @@ void Xesam2StrigiTest::tearDown()
+ void Xesam2StrigiTest::parseUlFromString()
+ {
+ for (set<string>::iterator iter = m_ulQueries.begin();
+- iter != m_ulQueries.end(); iter++)
++ iter != m_ulQueries.end(); ++iter)
+ {
+ if (!xesam2strigi->parse (*iter, Xesam2Strigi::UserLanguage)) {
+ string msg = "Failed to parse xesam userlanguage query: |";
+@@ -96,7 +96,7 @@ void Xesam2StrigiTest::parseUlFromFile()
+ printf ("created temporary file: %s\n", filename);
+
+ for (set<string>::iterator iter = m_ulQueries.begin();
+- iter != m_ulQueries.end(); iter++)
++ iter != m_ulQueries.end(); ++iter)
+ {
+ out.open(filename);
+ out << *iter;
+--- strigidaemon/tests/utils/unittestfunctions.h
++++ strigidaemon/tests/utils/unittestfunctions.h
+@@ -18,8 +18,8 @@
+ * Boston, MA 02110-1301, USA.
+ */
+
+-#ifndef UNIT_TEST_FUNTIONS_H
+-#define UNIT_TEST_FUNTIONS_H
++#ifndef UNIT_TEST_FUNCTIONS_H
++#define UNIT_TEST_FUNCTIONS_H
+
+ #include <string>
+