[strigi] 0.7.8-4
Rex Dieter
rdieter at fedoraproject.org
Wed Jan 1 16:31:16 UTC 2014
commit 4092dfc8fb16b609abcd0abd0dd0706850f67560
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Wed Jan 1 10:31:11 2014 -0600
0.7.8-4
- cleanup, drop deprecated bits
- -devel: drop dep on cmake
- pull in some upstream patches (particular rpath fixes)
- %check: +make test
...-valid-values-in-Exif-field-ISOSpeedRatin.patch | 30 +
...rs-for-systems-that-have-things-already-i.patch | 33 +
libstreamanalyzer-0003-Fix-Krazy-issues.patch | 1266 ++++++++++++++++++++
...lyzer-0004-ffmpeg-Rename-mutex-to-g_mutex.patch | 50 +
...manalyzer-0005-use-rpath-only-when-needed.patch | 31 +
...e-config.h-after-looking-for-dependencies.patch | 43 +
...e-in-analysis-tools-complain-about-resour.patch | 65 +
libstreams-0003-Build-fix-for-gcc-4.8.patch | 25 +
libstreams-0004-Fix-Krazy-issues.patch | 276 +++++
libstreams-0005-use-rpath-only-when-needed.patch | 31 +
strigi.spec | 71 +-
strigiclient-0001-use-rpath-only-when-needed.patch | 31 +
strigidaemon-0001-Fix-Krazy-issues.patch | 561 +++++++++
strigidaemon-0002-use-rpath-only-when-needed.patch | 31 +
strigiutils-0001-use-rpath-only-when-needed.patch | 31 +
15 files changed, 2562 insertions(+), 13 deletions(-)
---
diff --git a/libstreamanalyzer-0001-Fix-for-non-valid-values-in-Exif-field-ISOSpeedRatin.patch b/libstreamanalyzer-0001-Fix-for-non-valid-values-in-Exif-field-ISOSpeedRatin.patch
new file mode 100644
index 0000000..45201c8
--- /dev/null
+++ b/libstreamanalyzer-0001-Fix-for-non-valid-values-in-Exif-field-ISOSpeedRatin.patch
@@ -0,0 +1,30 @@
+From b6dc8d4c14135c2fddb1143106d90cbb3acf94b7 Mon Sep 17 00:00:00 2001
+From: Jos van den Oever <jos at vandenoever.info>
+Date: Thu, 7 Feb 2013 06:11:22 +0100
+Subject: [PATCH 1/5] Fix for non valid values in Exif field ISOSpeedRatings
+ reported in bug https://bugs.kde.org/show_bug.cgi?id=304439
+
+BUG: 304439
+---
+ plugins/endplugins/jpegendanalyzer.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/plugins/endplugins/jpegendanalyzer.cpp b/plugins/endplugins/jpegendanalyzer.cpp
+index 78ed36a..02b095b 100644
+--- a/plugins/endplugins/jpegendanalyzer.cpp
++++ b/plugins/endplugins/jpegendanalyzer.cpp
+@@ -322,6 +322,11 @@ JpegEndAnalyzer::analyze(AnalysisResult& ar, ::InputStream* in) {
+ ar.addValue(factory->exifFields.find("Exif.Image.DateTime")->second, uint32_t(mktime(&date)));
+ }
+ }
++ else if (i->key() == "Exif.Photo.ISOSpeedRatings") {
++ stringstream st;
++ st << i->toLong();
++ ar.addValue(factory->exifFields.find("Exif.Photo.ISOSpeedRatings")->second, st.str());
++ }
+ else if (i->key() != "Exif.Photo.PixelXDimension" && i->key() != "Exif.Photo.PixelYDimension") {
+ map<string,const RegisteredField*>::const_iterator f
+ = factory->exifFields.find(i->key());
+--
+1.8.4.2
+
diff --git a/libstreamanalyzer-0002-order-matters-for-systems-that-have-things-already-i.patch b/libstreamanalyzer-0002-order-matters-for-systems-that-have-things-already-i.patch
new file mode 100644
index 0000000..c940f6c
--- /dev/null
+++ b/libstreamanalyzer-0002-order-matters-for-systems-that-have-things-already-i.patch
@@ -0,0 +1,33 @@
+From 22d1b9923a61e0f890a39c80f661aeffaaeb2cb5 Mon Sep 17 00:00:00 2001
+From: Aaron Seigo <aseigo at kde.org>
+Date: Wed, 13 Feb 2013 17:29:52 +0100
+Subject: [PATCH 2/5] order matters for systems that have things already
+ installed
+
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7819ddf..6dee36b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -119,13 +119,13 @@ configure_file(${libstreamanalyzer_SOURCE_DIR}/strigi_thread.h.cmake
+ ${libstreamanalyzer_BINARY_DIR}/include/strigi/strigi_thread.h)
+
+ # every directory needs the headers that will be installed
+-include_directories(${LIBSTREAMS_INCLUDE_DIRS}
+- ${libstreamanalyzer_SOURCE_DIR}/include
++include_directories(${libstreamanalyzer_SOURCE_DIR}/include
+ ${libstreamanalyzer_SOURCE_DIR}/include/strigi
+ ${libstreamanalyzer_BINARY_DIR}/include
+ ${libstreamanalyzer_BINARY_DIR}/include/strigi
+ ${libstreamanalyzer_SOURCE_DIR}/lib
+ ${libstreamanalyzer_BINARY_DIR}/lib
++ ${LIBSTREAMS_INCLUDE_DIRS}
+ ${ICONV_INCLUDE_DIR}
+ ${LIBSTREAMS_LIBRARY_DIRS}
+ ${EXIV2_INCLUDEDIR}
+--
+1.8.4.2
+
diff --git a/libstreamanalyzer-0003-Fix-Krazy-issues.patch b/libstreamanalyzer-0003-Fix-Krazy-issues.patch
new file mode 100644
index 0000000..fab4883
--- /dev/null
+++ b/libstreamanalyzer-0003-Fix-Krazy-issues.patch
@@ -0,0 +1,1266 @@
+From 8af24118fec3a0effee3a01ad37f4c4daddfe700 Mon Sep 17 00:00:00 2001
+From: Jos van den Oever <jos at vandenoever.info>
+Date: Fri, 12 Jul 2013 15:15:18 +0200
+Subject: [PATCH 3/5] Fix Krazy issues.
+
+---
+ .krazy | 2 +
+ cmake/FindCLucene.cmake | 18 ++++++++
+ cmake/FindCLucene1.cmake | 18 ++++++++
+ cmake/FindExiv2.cmake | 2 +-
+ cmake/FindFFmpeg.cmake | 2 +-
+ cmake/FindIconv.cmake | 19 ++++++++
+ cmake/FindXAttr.cmake | 19 ++++++++
+ include/strigi/classproperties.h | 4 +-
+ include/strigi/fieldproperties.h | 4 +-
+ include/strigi/fieldtypes.h | 4 +-
+ include/strigi/filelister.h | 4 +-
+ include/strigi/streamanalyzer.h | 2 +-
+ include/strigi/variant.h | 14 +++---
+ lib/endanalyzers/arendanalyzer.h | 2 +-
+ lib/endanalyzers/bmpendanalyzer.h | 2 +-
+ lib/endanalyzers/bz2endanalyzer.h | 2 +-
+ lib/endanalyzers/flacendanalyzer.h | 2 +-
+ lib/endanalyzers/gzipendanalyzer.h | 2 +-
+ lib/endanalyzers/id3endanalyzer.cpp | 6 +--
+ lib/endanalyzers/id3endanalyzer.h | 2 +-
+ lib/endanalyzers/lzmaendanalyzer.h | 2 +-
+ lib/endanalyzers/mailendanalyzer.h | 2 +-
+ lib/endanalyzers/mpegendanalyzer.h | 2 +-
+ lib/endanalyzers/odfendanalyzer.h | 2 +-
+ lib/endanalyzers/oleendanalyzer.h | 2 +-
+ lib/endanalyzers/pdfendanalyzer.h | 2 +-
+ lib/endanalyzers/pngendanalyzer.h | 2 +-
+ lib/endanalyzers/rpmendanalyzer.h | 2 +-
+ lib/endanalyzers/sdfendanalyzer.h | 2 +-
+ lib/endanalyzers/tarendanalyzer.h | 2 +-
+ lib/endanalyzers/zipendanalyzer.h | 2 +-
+ lib/eventanalyzers/mimeeventanalyzer.h | 2 +-
+ lib/eventthroughanalyzer.h | 2 +-
+ lib/fieldpropertiesdb.cpp | 20 ++++----
+ lib/helperanalyzers/odfcontenthelperanalyzer.cpp | 1 -
+ lib/helperanalyzers/odfmetahelperanalyzer.cpp | 1 -
+ lib/libstreamanalyzer.pc.cmake | 19 ++++++++
+ lib/lineanalyzers/m3ustreamanalyzer.h | 2 +-
+ lib/lineanalyzers/odfmimetypelineanalyzer.h | 2 +-
+ lib/lineeventanalyzer.h | 2 +-
+ lib/logging.h | 2 +-
+ lib/rdfnamespaces.h | 4 +-
+ lib/saxeventanalyzer.h | 2 +-
+ lib/throughanalyzers/oggthroughanalyzer.h | 2 +-
+ lib/xmlparser/xmlstream.h | 4 +-
+ plugins/endplugins/ffmpegendanalyzer.cpp | 6 +--
+ plugins/eventplugins/SHA1.h | 6 +--
+ .../indexers/cluceneindexer/cluceneindexreader.cpp | 4 +-
+ .../indexers/cluceneindexer/cluceneindexwriter.cpp | 54 +---------------------
+ .../cluceneindexer/jsgzipcompressstream.cpp | 2 +-
+ .../indexers/cluceneindexer/tests/CLuceneTest.cpp | 19 ++++++++
+ plugins/indexers/cluceneindexer/timeofday.h | 39 ++++++++--------
+ .../clucenengindexer/cluceneindexreader.cpp | 8 ++--
+ .../clucenengindexer/cluceneindexwriter.cpp | 4 +-
+ .../clucenengindexer/indexdump/indexdump.cpp | 5 +-
+ .../clucenengindexer/tests/CLuceneTest.cpp | 19 ++++++++
+ plugins/indexers/clucenengindexer/timeofday.h | 39 ++++++++--------
+ plugins/lineplugins/deblineanalyzer.h | 2 +-
+ plugins/throughplugins/authroughanalyzer.h | 2 +-
+ plugins/throughplugins/dummy.cpp | 19 ++++++++
+ plugins/throughplugins/pcxthroughanalyzer.h | 2 +-
+ 61 files changed, 271 insertions(+), 176 deletions(-)
+ create mode 100644 .krazy
+
+diff --git a/.krazy b/.krazy
+new file mode 100644
+index 0000000..b0e1177
+--- /dev/null
++++ b/.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
+diff --git a/cmake/FindCLucene.cmake b/cmake/FindCLucene.cmake
+index 906afcc..31d1557 100644
+--- a/cmake/FindCLucene.cmake
++++ b/cmake/FindCLucene.cmake
+@@ -1,3 +1,21 @@
++# This file is part of Strigi Desktop Search
++#
++# Copyright (C) 2007 Jos van den Oever <jos at 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.
+ #
+ # This module looks for clucene (http://clucene.sf.net) support
+ # It will define the following values
+diff --git a/cmake/FindCLucene1.cmake b/cmake/FindCLucene1.cmake
+index ae431c8..d8ce7dd 100644
+--- a/cmake/FindCLucene1.cmake
++++ b/cmake/FindCLucene1.cmake
+@@ -1,3 +1,21 @@
++# This file is part of Strigi Desktop Search
++#
++# Copyright (C) 2007 Jos van den Oever <jos at 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.
+ #
+ # This module looks for clucene (http://clucene.sf.net) support
+ # It will define the pkgconfig values with a CLUCENE1_ prefix...
+diff --git a/cmake/FindExiv2.cmake b/cmake/FindExiv2.cmake
+index 5997c98..7ddb6ac 100644
+--- a/cmake/FindExiv2.cmake
++++ b/cmake/FindExiv2.cmake
+@@ -13,7 +13,7 @@
+ # The minimum required version of Exiv2 can be specified using the
+ # standard syntax, e.g. find_package(Exiv2 0.17)
+ #
+-# For compatiblity, also the variable EXIV2_MIN_VERSION can be set to the minimum version
++# For compatibility, also the variable EXIV2_MIN_VERSION can be set to the minimum version
+ # you need before doing FIND_PACKAGE(Exiv2). The default is 0.12.
+
+ # Copyright (c) 2010, Alexander Neundorf, <neundorf at kde.org>
+diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake
+index 526be5f..4e1d50e 100644
+--- a/cmake/FindFFmpeg.cmake
++++ b/cmake/FindFFmpeg.cmake
+@@ -7,7 +7,7 @@
+ # FFMPEG_LIBRARIES - Link these to use the required ffmpeg components.
+ # FFMPEG_DEFINITIONS - Compiler switches required for using the required ffmpeg components.
+ #
+-# For each of the components it will additionaly set.
++# For each of the components it will additionally set.
+ # - AVCODEC
+ # - AVDEVICE
+ # - AVFORMAT
+diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake
+index ce40ab2..fd5a3af 100644
+--- a/cmake/FindIconv.cmake
++++ b/cmake/FindIconv.cmake
+@@ -1,3 +1,22 @@
++# This file is part of Strigi Desktop Search
++#
++# Copyright (C) 2006 Jos van den Oever <jos at 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.
++
+ # - Try to find Iconv
+ # Once done this will define
+ #
+diff --git a/cmake/FindXAttr.cmake b/cmake/FindXAttr.cmake
+index c285a46..c66884e 100644
+--- a/cmake/FindXAttr.cmake
++++ b/cmake/FindXAttr.cmake
+@@ -1,3 +1,22 @@
++# This file is part of Strigi Desktop Search
++#
++# Copyright (C) 2007 Jos van den Oever <jos at 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.
++
+ # - Try to find the xattr header
+ # Once done this will define
+ #
+diff --git a/include/strigi/classproperties.h b/include/strigi/classproperties.h
+index 0a8d5d5..688bc6a 100644
+--- a/include/strigi/classproperties.h
++++ b/include/strigi/classproperties.h
+@@ -39,8 +39,8 @@ public:
+ };
+ ClassProperties();
+ ClassProperties(const ClassProperties&);
+- ClassProperties(const Private&);
+- ClassProperties(const std::string& key);
++ explicit ClassProperties(const Private&);
++ explicit ClassProperties(const std::string& key);
+ ~ClassProperties();
+ const ClassProperties& operator=(const ClassProperties&);
+ bool valid() const;
+diff --git a/include/strigi/fieldproperties.h b/include/strigi/fieldproperties.h
+index dc53703..f1a9f77 100644
+--- a/include/strigi/fieldproperties.h
++++ b/include/strigi/fieldproperties.h
+@@ -39,8 +39,8 @@ public:
+ };
+ FieldProperties();
+ FieldProperties(const FieldProperties&);
+- FieldProperties(const Private&);
+- FieldProperties(const std::string& key);
++ explicit FieldProperties(const Private&);
++ explicit FieldProperties(const std::string& key);
+ ~FieldProperties();
+ const FieldProperties& operator=(const FieldProperties&);
+ /**
+diff --git a/include/strigi/fieldtypes.h b/include/strigi/fieldtypes.h
+index e369ad4..8bc9669 100644
+--- a/include/strigi/fieldtypes.h
++++ b/include/strigi/fieldtypes.h
+@@ -69,7 +69,7 @@ private:
+ * @param fieldname a (unique) name for what this field represents
+ * the same name should be used in .fieldproperties files in [] brackets
+ */
+- RegisteredField(const std::string& key);
++ explicit RegisteredField(const std::string& key);
+ public:
+ /**
+ * @brief Get the key for this field.
+@@ -101,7 +101,7 @@ public:
+ * primitive type, an array or an object of some
+ * description.
+ *
+- * It is up the the caller to keep track of the type of
++ * It is up the caller to keep track of the type of
+ * the data that is pointed to. The RegisteredField does
+ * not take ownership of the data, and it the caller's
+ * responsibility to ensure that any data allocated with
+diff --git a/include/strigi/filelister.h b/include/strigi/filelister.h
+index 5fe7f3e..ab1b6ef 100644
+--- a/include/strigi/filelister.h
++++ b/include/strigi/filelister.h
+@@ -50,7 +50,7 @@ private:
+ class Private;
+ Private* p;
+ public:
+- FileLister(const Strigi::AnalyzerConfiguration* ic=0);
++ explicit FileLister(const Strigi::AnalyzerConfiguration* ic=0);
+ ~FileLister();
+
+ void startListing(const std::string& dir);
+@@ -76,7 +76,7 @@ private:
+ class Private;
+ Private* p;
+ public:
+- DirLister(const Strigi::AnalyzerConfiguration* ic=0);
++ explicit DirLister(const Strigi::AnalyzerConfiguration* ic=0);
+ ~DirLister();
+
+ void startListing(const std::string& dir);
+diff --git a/include/strigi/streamanalyzer.h b/include/strigi/streamanalyzer.h
+index 4074463..5a5ed0e 100644
+--- a/include/strigi/streamanalyzer.h
++++ b/include/strigi/streamanalyzer.h
+@@ -50,7 +50,7 @@ private:
+ StreamAnalyzerPrivate* const p;
+
+ public:
+- StreamAnalyzer(AnalyzerConfiguration& c);
++ explicit StreamAnalyzer(AnalyzerConfiguration& c);
+ ~StreamAnalyzer();
+ void setIndexWriter(IndexWriter& writer);
+ signed char indexFile(const char *filepath);
+diff --git a/include/strigi/variant.h b/include/strigi/variant.h
+index f81b604..bb2ccab 100644
+--- a/include/strigi/variant.h
++++ b/include/strigi/variant.h
+@@ -40,13 +40,13 @@ private:
+ VariantPrivate* const p;
+ public:
+ Variant();
+- Variant(bool v);
+- Variant(int32_t v);
+- Variant(uint32_t v);
+- Variant(const char* v);
+- Variant(const std::string& v);
+- Variant(const std::vector<std::string>& v);
+- Variant(const std::vector<std::vector<std::string> >& v);
++ explicit Variant(bool v);
++ explicit Variant(int32_t v);
++ explicit Variant(uint32_t v);
++ explicit Variant(const char* v);
++ explicit Variant(const std::string& v);
++ explicit Variant(const std::vector<std::string>& v);
++ explicit Variant(const std::vector<std::vector<std::string> >& v);
+ Variant(const Variant& v);
+ ~Variant();
+ Type type() const;
+diff --git a/lib/endanalyzers/arendanalyzer.h b/lib/endanalyzers/arendanalyzer.h
+index 801964d..0a12f84 100644
+--- a/lib/endanalyzers/arendanalyzer.h
++++ b/lib/endanalyzers/arendanalyzer.h
+@@ -28,7 +28,7 @@ class ArEndAnalyzer : public Strigi::StreamEndAnalyzer {
+ private:
+ const ArEndAnalyzerFactory* factory;
+ public:
+- ArEndAnalyzer(const ArEndAnalyzerFactory* f)
++ explicit ArEndAnalyzer(const ArEndAnalyzerFactory* f)
+ :factory(f) {}
+
+ bool checkHeader(const char* header, int32_t headersize) const;
+diff --git a/lib/endanalyzers/bmpendanalyzer.h b/lib/endanalyzers/bmpendanalyzer.h
+index c829a5c..38e1109 100644
+--- a/lib/endanalyzers/bmpendanalyzer.h
++++ b/lib/endanalyzers/bmpendanalyzer.h
+@@ -28,7 +28,7 @@ class BmpEndAnalyzer : public Strigi::StreamEndAnalyzer {
+ private:
+ const BmpEndAnalyzerFactory* factory;
+ public:
+- BmpEndAnalyzer(const BmpEndAnalyzerFactory* f) :factory(f) {}
++ explicit BmpEndAnalyzer(const BmpEndAnalyzerFactory* f) :factory(f) {}
+ bool checkHeader(const char* header, int32_t headersize) const;
+ signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
+ const char* name() const { return "BmpEndAnalyzer"; }
+diff --git a/lib/endanalyzers/bz2endanalyzer.h b/lib/endanalyzers/bz2endanalyzer.h
+index e88c158..e7266b2 100644
+--- a/lib/endanalyzers/bz2endanalyzer.h
++++ b/lib/endanalyzers/bz2endanalyzer.h
+@@ -28,7 +28,7 @@ class Bz2EndAnalyzer : public Strigi::StreamEndAnalyzer {
+ private:
+ const Bz2EndAnalyzerFactory* factory;
+ public:
+- Bz2EndAnalyzer(const Bz2EndAnalyzerFactory* f)
++ explicit Bz2EndAnalyzer(const Bz2EndAnalyzerFactory* f)
+ :factory(f) {}
+
+ bool checkHeader(const char* header, int32_t headersize) const;
+diff --git a/lib/endanalyzers/flacendanalyzer.h b/lib/endanalyzers/flacendanalyzer.h
+index 535940e..f1bcf1f 100644
+--- a/lib/endanalyzers/flacendanalyzer.h
++++ b/lib/endanalyzers/flacendanalyzer.h
+@@ -33,7 +33,7 @@ class FlacEndAnalyzer : public Strigi::StreamEndAnalyzer {
+ private:
+ const FlacEndAnalyzerFactory* factory;
+ public:
+- FlacEndAnalyzer(const FlacEndAnalyzerFactory* f) :factory(f) {}
++ explicit FlacEndAnalyzer(const FlacEndAnalyzerFactory* f) :factory(f) {}
+ bool checkHeader(const char* header, int32_t headersize) const;
+ signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
+ const char* name() const { return "FlacEndAnalyzer"; }
+diff --git a/lib/endanalyzers/gzipendanalyzer.h b/lib/endanalyzers/gzipendanalyzer.h
+index 51b9008..2793721 100644
+--- a/lib/endanalyzers/gzipendanalyzer.h
++++ b/lib/endanalyzers/gzipendanalyzer.h
+@@ -28,7 +28,7 @@ class GZipEndAnalyzer : public Strigi::StreamEndAnalyzer {
+ private:
+ const GZipEndAnalyzerFactory* factory;
+ public:
+- GZipEndAnalyzer(const GZipEndAnalyzerFactory* f)
++ explicit GZipEndAnalyzer(const GZipEndAnalyzerFactory* f)
+ :factory(f) {}
+
+ bool checkHeader(const char* header, int32_t headersize) const;
+diff --git a/lib/endanalyzers/id3endanalyzer.cpp b/lib/endanalyzers/id3endanalyzer.cpp
+index a453a39..c500715 100644
+--- a/lib/endanalyzers/id3endanalyzer.cpp
++++ b/lib/endanalyzers/id3endanalyzer.cpp
+@@ -342,7 +342,7 @@ ID3EndAnalyzer::checkHeader(const char* header, int32_t headersize) const {
+ const unsigned char* usbuf = (const unsigned char*)header;
+ int32_t i;
+
+- for(i=0; (header[i] == '\0') && (i<headersize); i++);
++ for(i=0; (header[i] == '\0') && (i<headersize); ++i);
+ return (headersize>=6+i)
+ && (
+ (strncmp("ID3", header+i, 3) == 0 // check that it's ID3
+@@ -411,7 +411,7 @@ class genre_number_parser {
+ parse_string(genre);
+ }
+ /**
+- * wether or not parsing was successful
++ * whether or not parsing was successful
+ */
+ operator bool() {
+ return success;
+@@ -480,7 +480,7 @@ ID3EndAnalyzer::analyze(Strigi::AnalysisResult& indexable, Strigi::InputStream*
+ string deunsyncbuf;
+ if (unsync) {
+ deunsyncbuf.reserve(size-1);
+- for(int32_t i = 0; i<size-1; i++)
++ for(int32_t i = 0; i<size-1; ++i)
+ if ( (i==0) || (p[11+i]!=0) || (p[10+i]!=0xff) )
+ deunsyncbuf.push_back(p[11+i]);
+ decoded_value = deunsyncbuf.c_str();
+diff --git a/lib/endanalyzers/id3endanalyzer.h b/lib/endanalyzers/id3endanalyzer.h
+index 293c993..337dcfd 100644
+--- a/lib/endanalyzers/id3endanalyzer.h
++++ b/lib/endanalyzers/id3endanalyzer.h
+@@ -30,7 +30,7 @@ class ID3EndAnalyzer : public Strigi::StreamEndAnalyzer {
+ private:
+ const ID3EndAnalyzerFactory* factory;
+ public:
+- ID3EndAnalyzer(const ID3EndAnalyzerFactory* f) :factory(f) {}
++ explicit ID3EndAnalyzer(const ID3EndAnalyzerFactory* f) :factory(f) {}
+ bool checkHeader(const char* header, int32_t headersize) const;
+ signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
+ const char* name() const { return "ID3EndAnalyzer"; }
+diff --git a/lib/endanalyzers/lzmaendanalyzer.h b/lib/endanalyzers/lzmaendanalyzer.h
+index cad65aa..7fb118a 100644
+--- a/lib/endanalyzers/lzmaendanalyzer.h
++++ b/lib/endanalyzers/lzmaendanalyzer.h
+@@ -28,7 +28,7 @@ class LzmaEndAnalyzer : public Strigi::StreamEndAnalyzer {
+ private:
+ const LzmaEndAnalyzerFactory* factory;
+ public:
+- LzmaEndAnalyzer(const LzmaEndAnalyzerFactory* f)
++ explicit LzmaEndAnalyzer(const LzmaEndAnalyzerFactory* f)
+ :factory(f) {}
+
+ bool checkHeader(const char* header, int32_t headersize) const;
+diff --git a/lib/endanalyzers/mailendanalyzer.h b/lib/endanalyzers/mailendanalyzer.h
+index 4c7d391..8d77420 100644
+--- a/lib/endanalyzers/mailendanalyzer.h
++++ b/lib/endanalyzers/mailendanalyzer.h
+@@ -28,7 +28,7 @@ class MailEndAnalyzer : public Strigi::StreamEndAnalyzer {
+ private:
+ const MailEndAnalyzerFactory* factory;
+ public:
+- MailEndAnalyzer(const MailEndAnalyzerFactory* f) :factory(f) {}
++ explicit MailEndAnalyzer(const MailEndAnalyzerFactory* f) :factory(f) {}
+ bool checkHeader(const char* header, int32_t headersize) const;
+ signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
+ const char* name() const { return "MailEndAnalyzer"; }
+diff --git a/lib/endanalyzers/mpegendanalyzer.h b/lib/endanalyzers/mpegendanalyzer.h
+index 42b65e9..1d0a2f2 100644
+--- a/lib/endanalyzers/mpegendanalyzer.h
++++ b/lib/endanalyzers/mpegendanalyzer.h
+@@ -58,7 +58,7 @@ private:
+
+
+ public:
+- MpegEndAnalyzer(const MpegEndAnalyzerFactory* f) :factory(f)
++ explicit MpegEndAnalyzer(const MpegEndAnalyzerFactory* f) :factory(f)
+ {
+ this->frame_rate_table[0] = 0.0; /* Pad */
+ //Official frame rates
+diff --git a/lib/endanalyzers/odfendanalyzer.h b/lib/endanalyzers/odfendanalyzer.h
+index f426c25..8da3137 100644
+--- a/lib/endanalyzers/odfendanalyzer.h
++++ b/lib/endanalyzers/odfendanalyzer.h
+@@ -36,7 +36,7 @@ public:
+ Strigi::OdfMetaHelperAnalyzer metaHelper;
+ Strigi::OdfContentHelperAnalyzer contentHelper;
+
+- OdfEndAnalyzer(const OdfEndAnalyzerFactory* f) :factory(f){};
++ explicit OdfEndAnalyzer(const OdfEndAnalyzerFactory* f) :factory(f){};
+ bool checkHeader(const char* header, int32_t headersize) const;
+ signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
+ const char* name() const { return "OdfEndAnalyzer"; }
+diff --git a/lib/endanalyzers/oleendanalyzer.h b/lib/endanalyzers/oleendanalyzer.h
+index df89ce4..b94bc40 100644
+--- a/lib/endanalyzers/oleendanalyzer.h
++++ b/lib/endanalyzers/oleendanalyzer.h
+@@ -64,7 +64,7 @@ private:
+ std::string getStreamString(Strigi::InputStream*) const;
+ bool tryFIB(Strigi::AnalysisResult& ar, Strigi::InputStream* in);
+ public:
+- OleEndAnalyzer(const OleEndAnalyzerFactory* const f) :factory(f) {}
++ explicit OleEndAnalyzer(const OleEndAnalyzerFactory* const f) :factory(f) {}
+ bool checkHeader(const char* header, int32_t headersize) const;
+ bool tryPropertyStream(Strigi::AnalysisResult& idx, Strigi::InputStream* s);
+ signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
+diff --git a/lib/endanalyzers/pdfendanalyzer.h b/lib/endanalyzers/pdfendanalyzer.h
+index b157bdb..c72fc71 100644
+--- a/lib/endanalyzers/pdfendanalyzer.h
++++ b/lib/endanalyzers/pdfendanalyzer.h
+@@ -40,7 +40,7 @@ private:
+ Strigi::StreamStatus handle(Strigi::InputStream* s);
+ Strigi::StreamStatus handle(const std::string& s);
+ public:
+- PdfEndAnalyzer(const PdfEndAnalyzerFactory* f);
++ explicit PdfEndAnalyzer(const PdfEndAnalyzerFactory* f);
+ };
+
+ class PdfEndAnalyzerFactory : public Strigi::StreamEndAnalyzerFactory {
+diff --git a/lib/endanalyzers/pngendanalyzer.h b/lib/endanalyzers/pngendanalyzer.h
+index 9144758..066aaac 100644
+--- a/lib/endanalyzers/pngendanalyzer.h
++++ b/lib/endanalyzers/pngendanalyzer.h
+@@ -42,7 +42,7 @@ private:
+ signed char addMetaData(const std::string& key, Strigi::AnalysisResult& as,
+ Strigi::InputStream* in);
+ public:
+- PngEndAnalyzer(const PngEndAnalyzerFactory* f);
++ explicit PngEndAnalyzer(const PngEndAnalyzerFactory* f);
+ };
+
+ class PngEndAnalyzerFactory : public Strigi::StreamEndAnalyzerFactory {
+diff --git a/lib/endanalyzers/rpmendanalyzer.h b/lib/endanalyzers/rpmendanalyzer.h
+index fdaf0f4..b5ccbd6 100644
+--- a/lib/endanalyzers/rpmendanalyzer.h
++++ b/lib/endanalyzers/rpmendanalyzer.h
+@@ -28,7 +28,7 @@ class RpmEndAnalyzer : public Strigi::StreamEndAnalyzer {
+ private:
+ const RpmEndAnalyzerFactory* factory;
+ public:
+- RpmEndAnalyzer(const RpmEndAnalyzerFactory* f)
++ explicit RpmEndAnalyzer(const RpmEndAnalyzerFactory* f)
+ :factory(f) {}
+
+ bool checkHeader(const char* header, int32_t headersize) const;
+diff --git a/lib/endanalyzers/sdfendanalyzer.h b/lib/endanalyzers/sdfendanalyzer.h
+index f6ab67f..56b1d77 100644
+--- a/lib/endanalyzers/sdfendanalyzer.h
++++ b/lib/endanalyzers/sdfendanalyzer.h
+@@ -29,7 +29,7 @@ class SdfEndAnalyzer : public Strigi::StreamEndAnalyzer {
+ private:
+ const SdfEndAnalyzerFactory* factory;
+ public:
+- SdfEndAnalyzer(const SdfEndAnalyzerFactory* f) :factory(f) {}
++ explicit SdfEndAnalyzer(const SdfEndAnalyzerFactory* f) :factory(f) {}
+ bool checkHeader(const char* header, int32_t headersize) const;
+ signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
+ const char* name() const { return "SdfEndAnalyzer"; }
+diff --git a/lib/endanalyzers/tarendanalyzer.h b/lib/endanalyzers/tarendanalyzer.h
+index 875d560..28bedf0 100644
+--- a/lib/endanalyzers/tarendanalyzer.h
++++ b/lib/endanalyzers/tarendanalyzer.h
+@@ -28,7 +28,7 @@ class TarEndAnalyzer : public Strigi::StreamEndAnalyzer {
+ private:
+ const TarEndAnalyzerFactory* factory;
+ public:
+- TarEndAnalyzer(const TarEndAnalyzerFactory* f)
++ explicit TarEndAnalyzer(const TarEndAnalyzerFactory* f)
+ :factory(f) {}
+
+ bool checkHeader(const char* header, int32_t headersize) const;
+diff --git a/lib/endanalyzers/zipendanalyzer.h b/lib/endanalyzers/zipendanalyzer.h
+index 3d87217..653645d 100644
+--- a/lib/endanalyzers/zipendanalyzer.h
++++ b/lib/endanalyzers/zipendanalyzer.h
+@@ -28,7 +28,7 @@ class ZipEndAnalyzer : public Strigi::StreamEndAnalyzer {
+ public:
+ const ZipEndAnalyzerFactory* const factory;
+
+- ZipEndAnalyzer(const ZipEndAnalyzerFactory* f) :factory(f) {}
++ explicit ZipEndAnalyzer(const ZipEndAnalyzerFactory* f) :factory(f) {}
+ bool checkHeader(const char* header, int32_t headersize) const;
+ signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
+ const char* name() const { return "ZipEndAnalyzer"; }
+diff --git a/lib/eventanalyzers/mimeeventanalyzer.h b/lib/eventanalyzers/mimeeventanalyzer.h
+index d0d2506..fd28b7b 100644
+--- a/lib/eventanalyzers/mimeeventanalyzer.h
++++ b/lib/eventanalyzers/mimeeventanalyzer.h
+@@ -39,7 +39,7 @@ private:
+ void handleData(const char* data, uint32_t length);
+ bool isReadyWithStream();
+ public:
+- MimeEventAnalyzer(const MimeEventAnalyzerFactory*);
++ explicit MimeEventAnalyzer(const MimeEventAnalyzerFactory*);
+ ~MimeEventAnalyzer();
+ };
+
+diff --git a/lib/eventthroughanalyzer.h b/lib/eventthroughanalyzer.h
+index 1b45312..b866402 100644
+--- a/lib/eventthroughanalyzer.h
++++ b/lib/eventthroughanalyzer.h
+@@ -50,7 +50,7 @@ private:
+ void handleEnd();
+ const char* name() const { return "EventThroughAnalyzer"; }
+ public:
+- EventThroughAnalyzer(std::vector<StreamEventAnalyzer*>& e)
++ explicit EventThroughAnalyzer(std::vector<StreamEventAnalyzer*>& e)
+ : event(e), datastream(0), result(0), ready(true){}
+ ~EventThroughAnalyzer();
+ };
+diff --git a/lib/fieldpropertiesdb.cpp b/lib/fieldpropertiesdb.cpp
+index 79264ce..07d5204 100644
+--- a/lib/fieldpropertiesdb.cpp
++++ b/lib/fieldpropertiesdb.cpp
+@@ -291,30 +291,30 @@ FieldPropertiesDb::Private::addEssentialProperties() {
+
+ props.typeuri = FieldRegister::datetimeType;
+ props.uri = FieldRegister::mtimeFieldName;
+- properties[FieldRegister::mtimeFieldName] = props;
++ properties[FieldRegister::mtimeFieldName] = FieldProperties(props);
+
+ props.typeuri = FieldRegister::integerType;
+ props.uri = FieldRegister::sizeFieldName;
+- properties[FieldRegister::sizeFieldName] = props;
++ properties[FieldRegister::sizeFieldName] = FieldProperties(props);
+
+ props.uri = FieldRegister::embeddepthFieldName;
+- properties[FieldRegister::embeddepthFieldName] = props;
++ properties[FieldRegister::embeddepthFieldName] = FieldProperties(props);
+
+ props.typeuri = FieldRegister::stringType;
+ props.uri = FieldRegister::pathFieldName;
+ props.tokenized = false; // should not be tokenized: needed for retrieval
+- properties[FieldRegister::pathFieldName] = props;
++ properties[FieldRegister::pathFieldName] = FieldProperties(props);
+
+ props.uri = FieldRegister::filenameFieldName;
+ props.tokenized = true;
+- properties[FieldRegister::filenameFieldName] = props;
++ properties[FieldRegister::filenameFieldName] = FieldProperties(props);
+
+ props.uri = FieldRegister::mimetypeFieldName;
+- properties[FieldRegister::mimetypeFieldName] = props;
++ properties[FieldRegister::mimetypeFieldName] = FieldProperties(props);
+
+ props.uri = FieldRegister::parentLocationFieldName;
+ props.tokenized = false; // should not be tokenized: needed for retrieval
+- properties[FieldRegister::parentLocationFieldName] = props;
++ properties[FieldRegister::parentLocationFieldName] = FieldProperties(props);
+ }
+ void
+ FieldPropertiesDb::Private::loadProperties(const string& dir) {
+@@ -751,7 +751,7 @@ FieldPropertiesDb::Private::endElementNsSAX2Func(void *ctx,
+ void
+ FieldPropertiesDb::Private::storeProperties(FieldProperties::Private& p) {
+ if (p.uri.size()) {
+- properties[p.uri] = p;
++ properties[p.uri] = FieldProperties(p);
+ }
+ p.clear();
+ }
+@@ -773,14 +773,14 @@ FieldPropertiesDb::addField(const std::string& key, const std::string& type,
+ if (parent.size()) {
+ props.parentUris.push_back(parent);
+ }
+- p->properties[key] = props;
++ p->properties[key] = FieldProperties(props);
+ }
+ void
+ FieldPropertiesDb::addField(const std::string& key) {
+ FieldProperties::Private props;
+ props.uri = key;
+ props.typeuri = FieldRegister::stringType;
+- p->properties[key] = props;
++ p->properties[key] = FieldProperties(props);
+ }
+ void
+ FieldProperties::Private::clear() {
+diff --git a/lib/helperanalyzers/odfcontenthelperanalyzer.cpp b/lib/helperanalyzers/odfcontenthelperanalyzer.cpp
+index d2a0a72..df3352a 100644
+--- a/lib/helperanalyzers/odfcontenthelperanalyzer.cpp
++++ b/lib/helperanalyzers/odfcontenthelperanalyzer.cpp
+@@ -25,7 +25,6 @@
+ #include <cstring>
+ #include <string>
+
+-#include <strigi/analysisresult.h>
+ #include <strigi/fieldtypes.h>
+ #include "../rdfnamespaces.h"
+
+diff --git a/lib/helperanalyzers/odfmetahelperanalyzer.cpp b/lib/helperanalyzers/odfmetahelperanalyzer.cpp
+index 3409707..6b53be0 100644
+--- a/lib/helperanalyzers/odfmetahelperanalyzer.cpp
++++ b/lib/helperanalyzers/odfmetahelperanalyzer.cpp
+@@ -27,7 +27,6 @@
+ #include <string>
+ #include <iostream>
+
+-#include <strigi/analysisresult.h>
+ #include <strigi/fieldtypes.h>
+ #include "../rdfnamespaces.h"
+
+diff --git a/lib/libstreamanalyzer.pc.cmake b/lib/libstreamanalyzer.pc.cmake
+index bd13339..38c0ccb 100644
+--- a/lib/libstreamanalyzer.pc.cmake
++++ b/lib/libstreamanalyzer.pc.cmake
+@@ -1,3 +1,22 @@
++# This file is part of Strigi Desktop Search
++#
++# Copyright (C) 2007 Jos van den Oever <jos at 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.
++
+ prefix=${CMAKE_INSTALL_PREFIX}
+ exec_prefix=${CMAKE_INSTALL_PREFIX}/bin
+ libdir=${LIB_DESTINATION}
+diff --git a/lib/lineanalyzers/m3ustreamanalyzer.h b/lib/lineanalyzers/m3ustreamanalyzer.h
+index 9033f14..d3fe71d 100644
+--- a/lib/lineanalyzers/m3ustreamanalyzer.h
++++ b/lib/lineanalyzers/m3ustreamanalyzer.h
+@@ -42,7 +42,7 @@ private:
+ std::string constructAbsolutePath(const std::string& relative) const;
+
+ public:
+- M3uLineAnalyzer(const M3uLineAnalyzerFactory* f) : factory(f) {}
++ explicit M3uLineAnalyzer(const M3uLineAnalyzerFactory* f) : factory(f) {}
+ ~M3uLineAnalyzer() {}
+
+ const char* name() const {
+diff --git a/lib/lineanalyzers/odfmimetypelineanalyzer.h b/lib/lineanalyzers/odfmimetypelineanalyzer.h
+index c53aa19..0bb81aa 100644
+--- a/lib/lineanalyzers/odfmimetypelineanalyzer.h
++++ b/lib/lineanalyzers/odfmimetypelineanalyzer.h
+@@ -40,7 +40,7 @@ public:
+
+ class OdfMimeTypeLineAnalyzer : public Strigi::StreamLineAnalyzer {
+ public:
+- OdfMimeTypeLineAnalyzer(const OdfMimeTypeLineAnalyzerFactory *factory);
++ explicit OdfMimeTypeLineAnalyzer(const OdfMimeTypeLineAnalyzerFactory *factory);
+
+ const char* name() const {
+ return "OdfMimeTypeLineAnalyzer";
+diff --git a/lib/lineeventanalyzer.h b/lib/lineeventanalyzer.h
+index 5c67eac..ccd9043 100644
+--- a/lib/lineeventanalyzer.h
++++ b/lib/lineeventanalyzer.h
+@@ -57,7 +57,7 @@ private:
+ void emitData(const char* data, uint32_t length);
+ void initEncoding(std::string encoding);
+ public:
+- LineEventAnalyzer(std::vector<StreamLineAnalyzer*>&s);
++ explicit LineEventAnalyzer(std::vector<StreamLineAnalyzer*>&s);
+ ~LineEventAnalyzer();
+ };
+
+diff --git a/lib/logging.h b/lib/logging.h
+index 8a42795..c9e34c6 100644
+--- a/lib/logging.h
++++ b/lib/logging.h
+@@ -44,4 +44,4 @@
+ #define slog(x) (void)
+ #endif
+
+-#endif
+\ No newline at end of file
++#endif
+diff --git a/lib/rdfnamespaces.h b/lib/rdfnamespaces.h
+index 9aad41d..aa35714 100644
+--- a/lib/rdfnamespaces.h
++++ b/lib/rdfnamespaces.h
+@@ -18,8 +18,8 @@
+ * Boston, MA 02110-1301, USA.
+ */
+
+-#ifndef RDFNAMESAPCES
+-#define RDFNAMESPACES
++#ifndef RDFNAMESPACES_H
++#define RDFNAMESPACES_H
+
+ // This is a list of the most often encountered rdf namespaces used by analyzers
+ // For internal use ONLY and should not be installed
+diff --git a/lib/saxeventanalyzer.h b/lib/saxeventanalyzer.h
+index 3bb9101..b5eec45 100644
+--- a/lib/saxeventanalyzer.h
++++ b/lib/saxeventanalyzer.h
+@@ -40,7 +40,7 @@ private:
+ void handleData(const char* data, uint32_t length);
+ bool isReadyWithStream();
+ public:
+- SaxEventAnalyzer(std::vector<StreamSaxAnalyzer*>&s);
++ explicit SaxEventAnalyzer(std::vector<StreamSaxAnalyzer*>&s);
+ ~SaxEventAnalyzer();
+ };
+
+diff --git a/lib/throughanalyzers/oggthroughanalyzer.h b/lib/throughanalyzers/oggthroughanalyzer.h
+index c28853a..c3530a1 100644
+--- a/lib/throughanalyzers/oggthroughanalyzer.h
++++ b/lib/throughanalyzers/oggthroughanalyzer.h
+@@ -35,7 +35,7 @@ private:
+ Strigi::AnalysisResult* indexable;
+ const OggThroughAnalyzerFactory* factory;
+ public:
+- OggThroughAnalyzer(const OggThroughAnalyzerFactory* f) :factory(f) {}
++ explicit OggThroughAnalyzer(const OggThroughAnalyzerFactory* f) :factory(f) {}
+ ~OggThroughAnalyzer() {}
+ void setIndexable(Strigi::AnalysisResult*);
+ Strigi::InputStream *connectInputStream(Strigi::InputStream *in);
+diff --git a/lib/xmlparser/xmlstream.h b/lib/xmlparser/xmlstream.h
+index 083e55e..6b48eb5 100644
+--- a/lib/xmlparser/xmlstream.h
++++ b/lib/xmlparser/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);
+ };
+
+
+diff --git a/plugins/endplugins/ffmpegendanalyzer.cpp b/plugins/endplugins/ffmpegendanalyzer.cpp
+index 25e2a9a..f219912 100644
+--- a/plugins/endplugins/ffmpegendanalyzer.cpp
++++ b/plugins/endplugins/ffmpegendanalyzer.cpp
+@@ -377,7 +377,7 @@ FFMPEGEndAnalyzer::analyze(AnalysisResult& ar, ::InputStream* in) {
+ ar.addValue(factory->typeProperty, NFO "Video");
+ }
+
+- for(uint32_t i=0; i<fc->nb_streams; i++) {
++ for(uint32_t i=0; i<fc->nb_streams; ++i) {
+ const AVStream &stream = *fc->streams[i];
+ const AVCodecContext &codec = *stream.codec;
+
+@@ -394,9 +394,9 @@ FFMPEGEndAnalyzer::analyze(AnalysisResult& ar, ::InputStream* in) {
+ }
+
+ #if (LIBAVUTIL_VERSION_MAJOR < 51)
+- //FIXME we must stop using the deprecated fuction av_metadata_get and use
++ //FIXME we must stop using the deprecated function av_metadata_get and use
+ // av_dict_get once we are able to detect the version of FFMpeg being used
+- // using version macros. same goes for all occurences of this function.
++ // using version macros. same goes for all occurrences of this function.
+ AVMetadataTag *entry = av_metadata_get(stream.metadata, "language", NULL, 0);
+ #else
+ AVDictionaryEntry *entry = av_dict_get(stream.metadata, "language", NULL, 0);
+diff --git a/plugins/eventplugins/SHA1.h b/plugins/eventplugins/SHA1.h
+index 47c2558..d78bbfc 100644
+--- a/plugins/eventplugins/SHA1.h
++++ b/plugins/eventplugins/SHA1.h
+@@ -115,10 +115,7 @@
+ #define SHA1_WIPE_VARIABLES
+ #endif
+
+-#if defined(SHA1_HAS_TCHAR)
+-#include <tchar.h>
+-#else
+-#ifdef _MSC_VER
++#if defined(SHA1_HAS_TCHAR) || defined(_MSC_VER)
+ #include <tchar.h>
+ #else
+ #ifndef TCHAR
+@@ -136,7 +133,6 @@
+ #define _sntprintf snprintf
+ #endif
+ #endif
+-#endif
+
+ // Fallback, if no 64-bit support
+ #ifndef _fseeki64
+diff --git a/plugins/indexers/cluceneindexer/cluceneindexreader.cpp b/plugins/indexers/cluceneindexer/cluceneindexreader.cpp
+index 6e0ea36..17738b2 100644
+--- a/plugins/indexers/cluceneindexer/cluceneindexreader.cpp
++++ b/plugins/indexers/cluceneindexer/cluceneindexreader.cpp
+@@ -310,11 +310,11 @@ CLuceneIndexReader::Private::createSingleFieldQuery(const string& field,
+ q = _CLNEW TermQuery(t);
+ break;
+ case Strigi::Query::Contains:
+- t = createWildCardTerm(fieldname.c_str(), "*" + val + "*");
++ t = createWildCardTerm(fieldname.c_str(), '*' + val + '*');
+ q = _CLNEW WildcardQuery(t);
+ break;
+ case Strigi::Query::StartsWith:
+- t = createWildCardTerm(fieldname.c_str(), val + "*");
++ t = createWildCardTerm(fieldname.c_str(), val + '*');
+ q = _CLNEW WildcardQuery(t);
+ break;
+ case Strigi::Query::Equals:
+diff --git a/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp b/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp
+index 8658180..b340db3 100644
+--- a/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp
++++ b/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp
+@@ -270,7 +270,7 @@ CLuceneIndexWriter::deleteEntry(const string& entry,
+ }
+ {
+ // delete all deeper nested files
+- wstring v = utf8toucs2(entry+"/");
++ wstring v = utf8toucs2(entry + '/');
+ Term* t = _CLNEW Term(parentlocation(), v.c_str());
+ PrefixFilter* filter = _CLNEW PrefixFilter(t);
+ BitSet* b = filter->bits(reader);
+@@ -372,58 +372,6 @@ CLuceneIndexWriter::cleanUp() {
+ if (!locked) {
+ return;
+ }
+- /*
+- //this is a hack and will not work with new versions of the index..
+- //furthermore, segmentinfos is a private class.
+- lucene::index::SegmentInfos infos;
+- try {
+- //Have SegmentInfos read the segments file in directory
+- infos.read(directory);
+- } catch(...) {
+- lock->release();
+- return; //todo: this may suggest an error...
+- }
+- lock->release();
+-
+- int i;
+- set<string> segments;
+- for (i = 0; i < infos.size(); i++) {
+- lucene::index::SegmentInfo* info = infos.info(i);
+- segments.insert(info->name);
+- }
+-
+- char** files = directory->list();
+- char tmp[CL_MAX_PATH];
+- for (i = 0; files[i] != NULL; ++i) {
+- char* file = files[i];
+-
+- int fileLength = strlen(file);
+- if ( fileLength < 6 ) {
+- continue;
+- }
+-
+- if (strncmp(file,"segments", 8) == 0
+- || strncmp(file, "deletable", 9) == 0) {
+- continue;
+- }
+- if (!isLuceneFile(file)) {
+- continue;
+- }
+-
+- strcpy(tmp, file);
+- tmp[fileLength-4] = '\0';
+-
+- if (segments.find(tmp) != segments.end()) {
+- continue;
+- }
+-
+- directory->deleteFile(file, false);
+- }
+- for (i = 0; files[i] != NULL; i++) {
+- _CLDELETE_CaARRAY(files[i]);
+- }
+- _CLDELETE_ARRAY(files);
+- */
+ }
+
+ void
+diff --git a/plugins/indexers/cluceneindexer/jsgzipcompressstream.cpp b/plugins/indexers/cluceneindexer/jsgzipcompressstream.cpp
+index 2e428a2..d39505f 100644
+--- a/plugins/indexers/cluceneindexer/jsgzipcompressstream.cpp
++++ b/plugins/indexers/cluceneindexer/jsgzipcompressstream.cpp
+@@ -17,8 +17,8 @@
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+-#include <CLucene/StdHeader.h>
+ #include "jsgzipcompressstream.h"
++#include <CLucene/StdHeader.h>
+ #include <CLucene/util/jstreamsconfig.h>
+ #include <zlib.h>
+
+diff --git a/plugins/indexers/cluceneindexer/tests/CLuceneTest.cpp b/plugins/indexers/cluceneindexer/tests/CLuceneTest.cpp
+index 9b1ff75..836c653 100644
+--- a/plugins/indexers/cluceneindexer/tests/CLuceneTest.cpp
++++ b/plugins/indexers/cluceneindexer/tests/CLuceneTest.cpp
+@@ -1,3 +1,22 @@
++/* This file is part of Strigi Desktop Search
++ *
++ * Copyright (C) 2006 Jos van den Oever <jos at 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 <strigi/strigiconfig.h>
+ #include "compat.h"
+ #include "indexpluginloader.h"
+diff --git a/plugins/indexers/cluceneindexer/timeofday.h b/plugins/indexers/cluceneindexer/timeofday.h
+index 7c8bb7e..97a8c41 100644
+--- a/plugins/indexers/cluceneindexer/timeofday.h
++++ b/plugins/indexers/cluceneindexer/timeofday.h
+@@ -1,22 +1,23 @@
+-/*
+-* Defines gettimeofday
+-*
+-* Based on timeval.h Copyright (c) by Wu Yongwei <wuyongwei at gmail.com>
+-*
+-* This library is free software; you can redistribute it and/or
+-* modify it under the terms of the GNU Lesser General Public
+-* License as published by the Free Software Foundation; either
+-* version 2.1 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
+-* Lesser General Public License for more details.
+-*
+-* You should have received a copy of the GNU Lesser General Public
+-* License along with this library; if not, write to the Free Software
+-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-*/
++/**
++ * Defines gettimeofday
++ *
++ * Based on timeval.h Copyright (c) by Wu Yongwei <wuyongwei at gmail.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 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
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; see the file COPYING. If not, write to
++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ * Boston, MA 02110-1301, USA.
++ */
+
+ #include "config.h"
+ #include <errno.h>
+diff --git a/plugins/indexers/clucenengindexer/cluceneindexreader.cpp b/plugins/indexers/clucenengindexer/cluceneindexreader.cpp
+index 0274329..8e20847 100644
+--- a/plugins/indexers/clucenengindexer/cluceneindexreader.cpp
++++ b/plugins/indexers/clucenengindexer/cluceneindexreader.cpp
+@@ -476,8 +476,8 @@ CLuceneIndexReader::getDocuments(const std::vector<std::string>& fullFields,
+ doc.resize(fullFields.size());
+
+ const Document::FieldsType& fields = *d.getFields();
+- for ( Document::FieldsType::const_iterator itr = fields.begin();
+- itr != fields.end(); itr++ ) {
++ for (Document::FieldsType::const_iterator itr = fields.begin();
++ itr != fields.end(); ++itr) {
+ Field* field = *itr;
+ string name(wchartoutf8(field->name()));
+ for (uint j = 0; j < fullFields.size(); ++j) {
+@@ -546,8 +546,8 @@ CLuceneIndexReader::getHits(const Strigi::Query& q,
+ doc.resize(fields.size());
+
+ const Document::FieldsType fields = *d->getFields();
+- for ( Document::FieldsType::const_iterator itr = fields.begin();
+- itr != fields.end(); itr++ ) {
++ for (Document::FieldsType::const_iterator itr = fields.begin();
++ itr != fields.end(); ++itr) {
+ Field* field = *itr;
+
+ string name(wchartoutf8(field->name()));
+diff --git a/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp b/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp
+index 3ba6eeb..b0a9ff7 100644
+--- a/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp
++++ b/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp
+@@ -229,7 +229,7 @@ CLuceneIndexWriter::deleteEntry(const string& entry, lucene::index::IndexWriter*
+ }
+ {
+ // delete all deeper nested files
+- wstring v = utf8toucs2(entry+"/");
++ wstring v = utf8toucs2(entry + '/');
+ Term* t(_CLNEW Term(parentlocation(), v.c_str()));
+ PrefixFilter* filter = _CLNEW PrefixFilter(t);
+ BitSet* b = filter->bits(reader);
+@@ -248,7 +248,7 @@ void
+ CLuceneIndexWriter::deleteAllEntries() {
+ lucene::index::IndexReader* reader = manager->checkReader();
+ if ( reader != NULL ){
+- for ( int32_t i=0;i<reader->maxDoc();i++ ){
++ for ( int32_t i=0;i<reader->maxDoc(); ++i) {
+ reader->deleteDocument(i);
+ }
+ reader->flush();
+diff --git a/plugins/indexers/clucenengindexer/indexdump/indexdump.cpp b/plugins/indexers/clucenengindexer/indexdump/indexdump.cpp
+index e2b4e1c..5937d3c 100644
+--- a/plugins/indexers/clucenengindexer/indexdump/indexdump.cpp
++++ b/plugins/indexers/clucenengindexer/indexdump/indexdump.cpp
+@@ -48,9 +48,8 @@ t2a(const TCHAR* t) {
+ void
+ docdump(Document* doc) {
+ Document::FieldsType fields = doc->getFields();
+- for ( Document::FieldsType::iterator itr = fields.begin();
+- itr != fields.end();
+- itr++ ){
++ for (Document::FieldsType::iterator itr = fields.begin();
++ itr != fields.end(); ++itr) {
+ TCHAR* s = (*itr)->toString();
+ printf("%s\n", t2a(s).c_str());
+ _CLDELETE_CARRAY(s);
+diff --git a/plugins/indexers/clucenengindexer/tests/CLuceneTest.cpp b/plugins/indexers/clucenengindexer/tests/CLuceneTest.cpp
+index f5e1b7f..19d69b7 100644
+--- a/plugins/indexers/clucenengindexer/tests/CLuceneTest.cpp
++++ b/plugins/indexers/clucenengindexer/tests/CLuceneTest.cpp
+@@ -1,3 +1,22 @@
++/* This file is part of Strigi Desktop Search
++ *
++ * Copyright (C) 2006 Jos van den Oever <jos at 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 <strigi/strigiconfig.h>
+ #include "indexpluginloader.h"
+ #include "indexmanager.h"
+diff --git a/plugins/indexers/clucenengindexer/timeofday.h b/plugins/indexers/clucenengindexer/timeofday.h
+index 7c8bb7e..97a8c41 100644
+--- a/plugins/indexers/clucenengindexer/timeofday.h
++++ b/plugins/indexers/clucenengindexer/timeofday.h
+@@ -1,22 +1,23 @@
+-/*
+-* Defines gettimeofday
+-*
+-* Based on timeval.h Copyright (c) by Wu Yongwei <wuyongwei at gmail.com>
+-*
+-* This library is free software; you can redistribute it and/or
+-* modify it under the terms of the GNU Lesser General Public
+-* License as published by the Free Software Foundation; either
+-* version 2.1 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
+-* Lesser General Public License for more details.
+-*
+-* You should have received a copy of the GNU Lesser General Public
+-* License along with this library; if not, write to the Free Software
+-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-*/
++/**
++ * Defines gettimeofday
++ *
++ * Based on timeval.h Copyright (c) by Wu Yongwei <wuyongwei at gmail.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 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
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; see the file COPYING. If not, write to
++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ * Boston, MA 02110-1301, USA.
++ */
+
+ #include "config.h"
+ #include <errno.h>
+diff --git a/plugins/lineplugins/deblineanalyzer.h b/plugins/lineplugins/deblineanalyzer.h
+index 25b40b0..e2b3cd9 100644
+--- a/plugins/lineplugins/deblineanalyzer.h
++++ b/plugins/lineplugins/deblineanalyzer.h
+@@ -36,7 +36,7 @@ private:
+ unsigned int finished;
+ Strigi::AnalysisResult* result;
+ public:
+- DebLineAnalyzer(const DebLineAnalyzerFactory* f) : factory(f) {}
++ explicit DebLineAnalyzer(const DebLineAnalyzerFactory* f) : factory(f) {}
+ };
+
+ class DebLineAnalyzerFactory : public Strigi::StreamLineAnalyzerFactory {
+diff --git a/plugins/throughplugins/authroughanalyzer.h b/plugins/throughplugins/authroughanalyzer.h
+index 18ae6d6..75335d1 100644
+--- a/plugins/throughplugins/authroughanalyzer.h
++++ b/plugins/throughplugins/authroughanalyzer.h
+@@ -36,7 +36,7 @@ private:
+ Strigi::AnalysisResult* analysisResult;
+ const AuThroughAnalyzerFactory* factory;
+ public:
+- AuThroughAnalyzer(const AuThroughAnalyzerFactory* f) :factory(f) {}
++ explicit AuThroughAnalyzer(const AuThroughAnalyzerFactory* f) :factory(f) {}
+ ~AuThroughAnalyzer() {}
+ void setIndexable(Strigi::AnalysisResult* i);
+ Strigi::InputStream *connectInputStream(Strigi::InputStream *in);
+diff --git a/plugins/throughplugins/dummy.cpp b/plugins/throughplugins/dummy.cpp
+index 2bfadc3..73d9ffb 100644
+--- a/plugins/throughplugins/dummy.cpp
++++ b/plugins/throughplugins/dummy.cpp
+@@ -1,3 +1,22 @@
++/* This file is part of Strigi Desktop Search
++ *
++ * Copyright (C) 2008 Sebastian Trueg<sebastian at trueg.de>
++ *
++ * 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 <strigi/streamthroughanalyzer.h>
+ #include <strigi/analyzerplugin.h>
+
+diff --git a/plugins/throughplugins/pcxthroughanalyzer.h b/plugins/throughplugins/pcxthroughanalyzer.h
+index a16fb5e..cde824a 100644
+--- a/plugins/throughplugins/pcxthroughanalyzer.h
++++ b/plugins/throughplugins/pcxthroughanalyzer.h
+@@ -30,7 +30,7 @@ private:
+ Strigi::AnalysisResult* indexable;
+ const PcxThroughAnalyzerFactory* factory;
+ public:
+- PcxThroughAnalyzer(const PcxThroughAnalyzerFactory* f) :factory(f) {}
++ explicit PcxThroughAnalyzer(const PcxThroughAnalyzerFactory* f) :factory(f) {}
+ ~PcxThroughAnalyzer() {}
+ void setIndexable(Strigi::AnalysisResult*);
+ Strigi::InputStream *connectInputStream(Strigi::InputStream *in);
+--
+1.8.4.2
+
diff --git a/libstreamanalyzer-0004-ffmpeg-Rename-mutex-to-g_mutex.patch b/libstreamanalyzer-0004-ffmpeg-Rename-mutex-to-g_mutex.patch
new file mode 100644
index 0000000..a114d02
--- /dev/null
+++ b/libstreamanalyzer-0004-ffmpeg-Rename-mutex-to-g_mutex.patch
@@ -0,0 +1,50 @@
+From ae11c0b24fd3be995185ebdc5a5bbbb92ff30843 Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa <rakuco at FreeBSD.org>
+Date: Tue, 10 Sep 2013 17:50:56 +0300
+Subject: [PATCH 4/5] ffmpeg: Rename `mutex' to `g_mutex'.
+
+std::mutex is an actual type in C++11 and is implemented by libc++. The
+build was failing because references to `mutex' in lockmgr were ambiguous,
+as both the mutex variable defined above and std::mutex (because of the
+`using namespace std' statement) were found.
+---
+ plugins/endplugins/ffmpegendanalyzer.cpp | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/plugins/endplugins/ffmpegendanalyzer.cpp b/plugins/endplugins/ffmpegendanalyzer.cpp
+index f219912..eaed07f 100644
+--- a/plugins/endplugins/ffmpegendanalyzer.cpp
++++ b/plugins/endplugins/ffmpegendanalyzer.cpp
+@@ -56,22 +56,22 @@ public:
+ signed char analyze(AnalysisResult& idx, ::InputStream* in);
+ };
+
+-STRIGI_MUTEX_DEFINE(mutex);
++STRIGI_MUTEX_DEFINE(g_mutex);
+
+ static int
+ lockmgr(void **mtx, enum AVLockOp op) {
+ // pre-allocating a single mutex is the only way to get it to work without changing strigi_thread.h
+- assert( (*mtx == &mutex) || (op == AV_LOCK_CREATE) );
++ assert( (*mtx == &g_mutex) || (op == AV_LOCK_CREATE) );
+ switch(op) {
+ case AV_LOCK_CREATE:
+- *mtx = &mutex;
+- return !!STRIGI_MUTEX_INIT(&mutex);
++ *mtx = &g_mutex;
++ return !!STRIGI_MUTEX_INIT(&g_mutex);
+ case AV_LOCK_OBTAIN:
+- return !!STRIGI_MUTEX_LOCK(&mutex);
++ return !!STRIGI_MUTEX_LOCK(&g_mutex);
+ case AV_LOCK_RELEASE:
+- return !!STRIGI_MUTEX_UNLOCK(&mutex);
++ return !!STRIGI_MUTEX_UNLOCK(&g_mutex);
+ case AV_LOCK_DESTROY:
+- STRIGI_MUTEX_DESTROY(&mutex);
++ STRIGI_MUTEX_DESTROY(&g_mutex);
+ return 0;
+ }
+ return 1;
+--
+1.8.4.2
+
diff --git a/libstreamanalyzer-0005-use-rpath-only-when-needed.patch b/libstreamanalyzer-0005-use-rpath-only-when-needed.patch
new file mode 100644
index 0000000..bcbf50b
--- /dev/null
+++ b/libstreamanalyzer-0005-use-rpath-only-when-needed.patch
@@ -0,0 +1,31 @@
+From 82c277bc0264798b291417e675611d7e3bead176 Mon Sep 17 00:00:00 2001
+From: Rex Dieter <rdieter at math.unl.edu>
+Date: Wed, 1 Jan 2014 09:55:46 -0600
+Subject: [PATCH 5/5] use rpath only when needed
+
+cmake code borrowed from soprano
+---
+ CMakeLists.txt | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6dee36b..d5cd1eb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -57,8 +57,13 @@ set(DATA_DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}")
+ # These two options below make it set the RPATH of the installed targets to all
+ # RPATH directories outside the current CMAKE_BINARY_DIR and also the library
+ # install directory. Alex
++list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemPlatformLibDir)
++list(FIND CMAKE_C_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemCLibDir)
++list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemCxxLibDir)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
++if("${_isSystemPlatformLibDir}" STREQUAL "-1" AND "${_isSystemCLibDir}" STREQUAL "-1" AND "${_isSystemCxxLibDir}" STREQUAL "-1")
+ set(CMAKE_INSTALL_RPATH ${LIB_DESTINATION} )
++endif()
+
+ if(NOT WIN32 AND NOT CMAKE_SYSTEM MATCHES "SunOS-5*.")
+ add_definitions(-fPIC)
+--
+1.8.4.2
+
diff --git a/libstreams-0001-Generate-config.h-after-looking-for-dependencies.patch b/libstreams-0001-Generate-config.h-after-looking-for-dependencies.patch
new file mode 100644
index 0000000..895c9f7
--- /dev/null
+++ b/libstreams-0001-Generate-config.h-after-looking-for-dependencies.patch
@@ -0,0 +1,43 @@
+From b82f954e71be45aef152bbf8925a3070b7e4c69a Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa <rakuco at FreeBSD.org>
+Date: Fri, 5 Apr 2013 02:13:31 +0300
+Subject: [PATCH 1/5] Generate config.h after looking for dependencies.
+
+At least lib/config.h.cmake's ICONV_SECOND_ARGUMENT_IS_CONST depends
+on FindIconv.cmake having been called before, otherwise it is always
+undefined.
+
+This fixes a regression introduced in 61a7ffe.
+
+CCMAIL: cgiboudeaux at gmx.com
+---
+ CMakeLists.txt | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cd95c92..b2d959c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -46,9 +46,6 @@ endif()
+ # check for visibility support
+ macro_check_gcc_visibility(__STRIGI_HAVE_GCC_VISIBILITY)
+
+-# Generate include/strigi/strigiconfig.h and lib/config.h
+-include(ConfigureChecks.cmake)
+-
+ # check for required packages
+ find_package(ZLIB)
+ set_package_properties(ZLIB PROPERTIES
+@@ -77,6 +74,9 @@ set_package_properties(Threads PROPERTIES
+
+ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+
++# Generate include/strigi/strigiconfig.h and lib/config.h
++include(ConfigureChecks.cmake)
++
+ ##### building and testing #####
+ # every directory needs the headers that will be installed
+ include_directories(${libstreams_SOURCE_DIR}/include
+--
+1.8.4.2
+
diff --git a/libstreams-0002-Reduce-noise-in-analysis-tools-complain-about-resour.patch b/libstreams-0002-Reduce-noise-in-analysis-tools-complain-about-resour.patch
new file mode 100644
index 0000000..7179526
--- /dev/null
+++ b/libstreams-0002-Reduce-noise-in-analysis-tools-complain-about-resour.patch
@@ -0,0 +1,65 @@
+From 314f9d8f4fc50323e9f670ef54f0263cec08abc3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=96mer=20Fad=C4=B1l=20USTA?= <omerusta at gmail.com>
+Date: Tue, 9 Apr 2013 04:01:23 +0300
+Subject: [PATCH 2/5] Reduce noise in analysis tools complain about resource
+ leak
+
+Cppcheck gives false alerts. This will stop it complaining about
+resource leakage.
+Thanks to mpyne for review of patch
+
+REVIEW: 109920
+---
+ lib/fileinputstream.cpp | 4 ++--
+ lib/skippingfileinputstream.cpp | 4 ++--
+ lib/skippingfileinputstream2.cpp | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/lib/fileinputstream.cpp b/lib/fileinputstream.cpp
+index 2801d1b..820b831 100644
+--- a/lib/fileinputstream.cpp
++++ b/lib/fileinputstream.cpp
+@@ -39,8 +39,8 @@ FileInputStream::FileInputStream(const char* filepath, int32_t buffersize) {
+ m_status = Error;
+ return;
+ }
+- FILE* f = fopen(filepath, "rb");
+- open(f, filepath, buffersize);
++ file = fopen(filepath, "rb");
++ open(file, filepath, buffersize);
+ }
+ FileInputStream::FileInputStream(FILE* file, const char* filepath,
+ int32_t buffersize) {
+diff --git a/lib/skippingfileinputstream.cpp b/lib/skippingfileinputstream.cpp
+index dcb4d32..9759c54 100644
+--- a/lib/skippingfileinputstream.cpp
++++ b/lib/skippingfileinputstream.cpp
+@@ -38,8 +38,8 @@ SkippingFileInputStream::SkippingFileInputStream(const char* filepath) {
+ m_status = Error;
+ return;
+ }
+- FILE* f = fopen(filepath, "rb");
+- open(f, filepath);
++ file = fopen(filepath, "rb");
++ open(file, filepath);
+ }
+ void
+ SkippingFileInputStream::open(FILE* f, const char* path) {
+diff --git a/lib/skippingfileinputstream2.cpp b/lib/skippingfileinputstream2.cpp
+index dc618f4..dcfcef2 100644
+--- a/lib/skippingfileinputstream2.cpp
++++ b/lib/skippingfileinputstream2.cpp
+@@ -36,8 +36,8 @@ SkippingFileInputStream2::SkippingFileInputStream2(const char* filepath, int32_t
+ m_status = Error;
+ return;
+ }
+- FILE* f = fopen(filepath, "rb");
+- open(f, filepath, buffersize);
++ file = fopen(filepath, "rb");
++ open(file, filepath, buffersize);
+ }
+ SkippingFileInputStream2::SkippingFileInputStream2(FILE* file, const char* filepath,
+ int32_t buffersize) {
+--
+1.8.4.2
+
diff --git a/libstreams-0003-Build-fix-for-gcc-4.8.patch b/libstreams-0003-Build-fix-for-gcc-4.8.patch
new file mode 100644
index 0000000..2032863
--- /dev/null
+++ b/libstreams-0003-Build-fix-for-gcc-4.8.patch
@@ -0,0 +1,25 @@
+From 6fedeb66cc3c59bce24146f079295a1d404c749c Mon Sep 17 00:00:00 2001
+From: Jos van den Oever <jos at vandenoever.info>
+Date: Sat, 1 Jun 2013 17:59:36 +0200
+Subject: [PATCH 3/5] Build fix for gcc 4.8.
+
+---
+ include/strigi/bufferedstream.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/strigi/bufferedstream.h b/include/strigi/bufferedstream.h
+index 563da8a..05f5500 100644
+--- a/include/strigi/bufferedstream.h
++++ b/include/strigi/bufferedstream.h
+@@ -34,7 +34,7 @@ namespace Strigi {
+ * BufferedStream will do the rest.
+ */
+ template <class T>
+-class BufferedStream : public StreamBase<T> {
++class STREAMS_EXPORT BufferedStream : public StreamBase<T> {
+ private:
+ StreamBuffer<T> buffer;
+ bool finishedWritingToBuffer;
+--
+1.8.4.2
+
diff --git a/libstreams-0004-Fix-Krazy-issues.patch b/libstreams-0004-Fix-Krazy-issues.patch
new file mode 100644
index 0000000..57036e6
--- /dev/null
+++ b/libstreams-0004-Fix-Krazy-issues.patch
@@ -0,0 +1,276 @@
+From 8aa2b21fe596ddfe9de250190ede78ee34f19d2d Mon Sep 17 00:00:00 2001
+From: Jos van den Oever <jos at vandenoever.info>
+Date: Fri, 12 Jul 2013 13:04:44 +0200
+Subject: [PATCH 4/5] Fix Krazy issues.
+
+---
+ .krazy | 3 +++
+ cmake/FindIconv.cmake | 19 +++++++++++++++++++
+ include/strigi/archivereader.h | 6 +++---
+ include/strigi/bz2inputstream.h | 2 +-
+ include/strigi/dataeventinputstream.h | 2 +-
+ include/strigi/kmpsearcher.h | 2 +-
+ include/strigi/lzmainputstream.h | 2 +-
+ include/strigi/stringterminatedsubstream.h | 2 +-
+ include/strigi/substreamprovider.h | 2 +-
+ lib/libstreams.pc.cmake | 19 +++++++++++++++++++
+ lib/signatureinputstream.h | 2 +-
+ lib/strigiconfig.cpp | 2 +-
+ lib/stringreader.h | 2 --
+ tests/api/ArchiveReaderTest.cpp | 4 ++--
+ tests/sharedtestcode/unknownsizestream.h | 4 ++--
+ 15 files changed, 56 insertions(+), 17 deletions(-)
+ create mode 100644 .krazy
+
+diff --git a/.krazy b/.krazy
+new file mode 100644
+index 0000000..4822bdd
+--- /dev/null
++++ b/.krazy
+@@ -0,0 +1,3 @@
++# see http://techbase.kde.org/Development/Tutorials/Code_Checking#Controlling_Krazy_on_the_EBN for an explanation of this file
++EXCLUDE syscalls,typedefs
++IGNORESUBS tests/data
+diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake
+index ce40ab2..fd5a3af 100644
+--- a/cmake/FindIconv.cmake
++++ b/cmake/FindIconv.cmake
+@@ -1,3 +1,22 @@
++# This file is part of Strigi Desktop Search
++#
++# Copyright (C) 2006 Jos van den Oever <jos at 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.
++
+ # - Try to find Iconv
+ # Once done this will define
+ #
+diff --git a/include/strigi/archivereader.h b/include/strigi/archivereader.h
+index 823a432..ffe3f22 100644
+--- a/include/strigi/archivereader.h
++++ b/include/strigi/archivereader.h
+@@ -38,7 +38,7 @@ public:
+ * @brief Opens a stream for the given url.
+ *
+ * What is meant by @p url will depend on context. In the context of an
+- * archive with a file system-like directory stucture, it will be the path
++ * archive with a file system-like directory structure, it will be the path
+ * to the file relative the root of the archive (eg: /foo/bar).
+ *
+ * @param url unique name of or path to an item
+@@ -49,7 +49,7 @@ public:
+ * @brief Gets information about a given url
+ *
+ * What is meant by @p url will depend on context. In the context of an
+- * archive with a file system-like directory stucture, it will be the path
++ * archive with a file system-like directory structure, it will be the path
+ * to the file relative the root of the archive (eg: /foo/bar).
+ *
+ * @param url unique name of or path to an item
+@@ -89,7 +89,7 @@ public:
+ * @param e a vector containing information about each
+ * item in the directory
+ */
+- DirLister(Private* p);
++ explicit DirLister(Private* p);
+ /**
+ * @brief Copy constructor
+ */
+diff --git a/include/strigi/bz2inputstream.h b/include/strigi/bz2inputstream.h
+index aa40e88..09e566a 100644
+--- a/include/strigi/bz2inputstream.h
++++ b/include/strigi/bz2inputstream.h
+@@ -30,7 +30,7 @@ private:
+ Private* const p;
+ int32_t fillBuffer(char* start, int32_t space);
+ public:
+- BZ2InputStream(InputStream* input);
++ explicit BZ2InputStream(InputStream* input);
+ ~BZ2InputStream();
+ static bool checkHeader(const char* data, int32_t datasize);
+ };
+diff --git a/include/strigi/dataeventinputstream.h b/include/strigi/dataeventinputstream.h
+index 05368e2..c8205c4 100644
+--- a/include/strigi/dataeventinputstream.h
++++ b/include/strigi/dataeventinputstream.h
+@@ -48,7 +48,7 @@ public:
+ * When handleEnd is called, it is guaranteed that each
+ * element in the input stream has been passed in exactly
+ * one call to this function, and that the calls happened
+- * in the same order as the the data occurred in the
++ * in the same order as the data occurred in the
+ * InputStream.
+ *
+ * You should not call this function yourself. It forms
+diff --git a/include/strigi/kmpsearcher.h b/include/strigi/kmpsearcher.h
+index e3ec19d..28d049b 100644
+--- a/include/strigi/kmpsearcher.h
++++ b/include/strigi/kmpsearcher.h
+@@ -39,7 +39,7 @@ private:
+ int32_t maxlen;
+ public:
+ KmpSearcher() :table(0) { }
+- KmpSearcher(const std::string& query);
++ explicit KmpSearcher(const std::string& query);
+ ~KmpSearcher() {
+ if (table) {
+ free(table);
+diff --git a/include/strigi/lzmainputstream.h b/include/strigi/lzmainputstream.h
+index fa7cf87..530edc3 100644
+--- a/include/strigi/lzmainputstream.h
++++ b/include/strigi/lzmainputstream.h
+@@ -30,7 +30,7 @@ private:
+ Private* const p;
+ int32_t fillBuffer(char* start, int32_t space);
+ public:
+- LZMAInputStream(InputStream* input);
++ explicit LZMAInputStream(InputStream* input);
+ ~LZMAInputStream();
+ static bool checkHeader(const char* data, int32_t datasize);
+ };
+diff --git a/include/strigi/stringterminatedsubstream.h b/include/strigi/stringterminatedsubstream.h
+index 9f96bcc..fabb40d 100644
+--- a/include/strigi/stringterminatedsubstream.h
++++ b/include/strigi/stringterminatedsubstream.h
+@@ -30,7 +30,7 @@ namespace Strigi {
+ *
+ * This class stops reading data when either the end of the
+ * underlying stream is reacher, or a given terminator is encountered
+- * in the the stream.
++ * in the stream.
+ */
+ class STREAMS_EXPORT StringTerminatedSubStream : public InputStream {
+ private:
+diff --git a/include/strigi/substreamprovider.h b/include/strigi/substreamprovider.h
+index 21ce324..3036d32 100644
+--- a/include/strigi/substreamprovider.h
++++ b/include/strigi/substreamprovider.h
+@@ -88,7 +88,7 @@ public:
+ *
+ * @param input the inputstream that will be split into substreams
+ */
+- SubStreamProvider(InputStream *input)
++ explicit SubStreamProvider(InputStream *input)
+ : m_status(Ok)
+ , m_input(input)
+ , m_entrystream(0)
+diff --git a/lib/libstreams.pc.cmake b/lib/libstreams.pc.cmake
+index 8259b46..ce1205d 100644
+--- a/lib/libstreams.pc.cmake
++++ b/lib/libstreams.pc.cmake
+@@ -1,3 +1,22 @@
++# This file is part of Strigi Desktop Search
++#
++# Copyright (C) 2007 Jos van den Oever <jos at 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.
++
+ prefix=${CMAKE_INSTALL_PREFIX}
+ exec_prefix=${CMAKE_INSTALL_PREFIX}/bin
+ libdir=${LIB_DESTINATION}
+diff --git a/lib/signatureinputstream.h b/lib/signatureinputstream.h
+index 7302c75..63a2f0d 100644
+--- a/lib/signatureinputstream.h
++++ b/lib/signatureinputstream.h
+@@ -30,7 +30,7 @@ namespace Strigi {
+ *
+ * This class stops reading data when either the end of the
+ * underlying stream is reacher, or a given terminator is encountered
+- * in the the stream.
++ * in the stream.
+ */
+ class SignatureInputStream : public InputStream {
+ private:
+diff --git a/lib/strigiconfig.cpp b/lib/strigiconfig.cpp
+index 6607ebd..9d9d8f9 100644
+--- a/lib/strigiconfig.cpp
++++ b/lib/strigiconfig.cpp
+@@ -32,4 +32,4 @@ namespace Strigi {
+ const char* versionString() {
+ return STRIGI_VERSION_STRING;
+ }
+-}
+\ No newline at end of file
++}
+diff --git a/lib/stringreader.h b/lib/stringreader.h
+index 4d60b67..1a57c5c 100644
+--- a/lib/stringreader.h
++++ b/lib/stringreader.h
+@@ -20,11 +20,9 @@
+ #ifndef STRINGREADER_H
+ #define STRINGREADER_H
+
+-#ifdef __GNUC__
+ #error stringreader.h is deprecated. Include stringstream.h instead.
+ #error StringReader has been renamed to StringStream
+ #error Use StringInputStream for StringStream<char>
+ #error Use StringReader for StringStream<wchar_t>
+-#endif
+
+ #endif
+diff --git a/tests/api/ArchiveReaderTest.cpp b/tests/api/ArchiveReaderTest.cpp
+index ffb7cd7..6d38050 100644
+--- a/tests/api/ArchiveReaderTest.cpp
++++ b/tests/api/ArchiveReaderTest.cpp
+@@ -50,7 +50,7 @@ test2(const char* path) {
+ EntryInfo e;
+ while (dl.nextEntry(e)) {
+ string filepath(path);
+- filepath += "/";
++ filepath += '/';
+ filepath += e.filename;
+ if (e.type == EntryInfo::File) {
+ test1(filepath.c_str());
+@@ -83,7 +83,7 @@ walkdirectories(const char* path, void (*callback)(const char*)) {
+ if (S_ISREG(dirstat.st_mode)) {
+ callback(filepath.c_str());
+ } else if (S_ISDIR(dirstat.st_mode)) {
+- filepath += "/";
++ filepath += '/';
+ walkdirectories(filepath.c_str(), callback);
+ }
+ }
+diff --git a/tests/sharedtestcode/unknownsizestream.h b/tests/sharedtestcode/unknownsizestream.h
+index bde063e..73d3d49 100644
+--- a/tests/sharedtestcode/unknownsizestream.h
++++ b/tests/sharedtestcode/unknownsizestream.h
+@@ -17,8 +17,8 @@
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+-#ifndef STRIGI_UNKNOWNSIZEINPUTSTREAM
+-#define STRIGI_UNKNOWNSIZEINPUTSTREAM
++#ifndef STRIGI_UNKNOWNSIZEINPUTSTREAM_H
++#define STRIGI_UNKNOWNSIZEINPUTSTREAM_H
+
+ #include <strigi/strigiconfig.h>
+ #include <strigi/streambase.h>
+--
+1.8.4.2
+
diff --git a/libstreams-0005-use-rpath-only-when-needed.patch b/libstreams-0005-use-rpath-only-when-needed.patch
new file mode 100644
index 0000000..9a79c13
--- /dev/null
+++ b/libstreams-0005-use-rpath-only-when-needed.patch
@@ -0,0 +1,31 @@
+From f552becab291908030f8cc27de83155eb182c7ba Mon Sep 17 00:00:00 2001
+From: Rex Dieter <rdieter at math.unl.edu>
+Date: Wed, 1 Jan 2014 09:53:44 -0600
+Subject: [PATCH 5/5] use rpath only when needed
+
+cmake code borrowed from soprano
+---
+ CMakeLists.txt | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b2d959c..a3948c2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -34,8 +34,13 @@ set(INCLUDE_DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
+ # These two options below make it set the RPATH of the installed targets to all
+ # RPATH directories outside the current CMAKE_BINARY_DIR and also the library
+ # install directory. Alex
++list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemPlatformLibDir)
++list(FIND CMAKE_C_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemCLibDir)
++list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemCxxLibDir)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
++if("${_isSystemPlatformLibDir}" STREQUAL "-1" AND "${_isSystemCLibDir}" STREQUAL "-1" AND "${_isSystemCxxLibDir}" STREQUAL "-1")
+ set(CMAKE_INSTALL_RPATH ${LIB_DESTINATION})
++endif()
+
+ if(NOT MSVC AND NOT MINGW AND NOT CMAKE_SYSTEM MATCHES "SunOS-5*.")
+ add_definitions(-fPIC)
+--
+1.8.4.2
+
diff --git a/strigi.spec b/strigi.spec
index cc2b701..fad839e 100644
--- a/strigi.spec
+++ b/strigi.spec
@@ -1,18 +1,14 @@
-%if 0%{?fedora} && 0%{?fedora} < 16
-%define dt_vendor fedora
-# include clucene support
-%global clucene 1
-%endif
-
-#define snap 20120626
+## include clucene support (not used since fedora 15)
+#global clucene 1
Name: strigi
+Summary: A desktop search program
Version: 0.7.8
-Release: 3%{?dist}
-Summary: A desktop search program
+Release: 4%{?dist}
+
License: LGPLv2+
-#URL: http://strigi.sf.net/
+#URL: https://projects.kde.org/projects/kdesupport/strigi
URL: http://www.vandenoever.info/software/strigi/
Source0: http://www.vandenoever.info/software/strigi/strigi-%{version}%{?pre:-%{pre}}.tar.bz2
#Source0: http://rdieter.fedorapeople.org/strigi/strigi-%{version}%{?pre:-%{pre}}.tar.xz
@@ -20,6 +16,20 @@ Source1: strigiclient.desktop
Source2: strigi-daemon.desktop
## upstream patches
+Patch11: libstreamanalyzer-0001-Fix-for-non-valid-values-in-Exif-field-ISOSpeedRatin.patch
+Patch12: libstreamanalyzer-0002-order-matters-for-systems-that-have-things-already-i.patch
+Patch13: libstreamanalyzer-0003-Fix-Krazy-issues.patch
+Patch14: libstreamanalyzer-0004-ffmpeg-Rename-mutex-to-g_mutex.patch
+Patch15: libstreamanalyzer-0005-use-rpath-only-when-needed.patch
+Patch21: libstreams-0001-Generate-config.h-after-looking-for-dependencies.patch
+Patch22: libstreams-0002-Reduce-noise-in-analysis-tools-complain-about-resour.patch
+Patch23: libstreams-0003-Build-fix-for-gcc-4.8.patch
+Patch24: libstreams-0004-Fix-Krazy-issues.patch
+Patch25: libstreams-0005-use-rpath-only-when-needed.patch
+Patch31: strigiclient-0001-use-rpath-only-when-needed.patch
+Patch41: strigidaemon-0001-Fix-Krazy-issues.patch
+Patch42: strigidaemon-0002-use-rpath-only-when-needed.patch
+Patch51: strigiutils-0001-use-rpath-only-when-needed.patch
BuildRequires: bison
BuildRequires: bzip2-devel
@@ -55,8 +65,6 @@ daemon can.
%package devel
Summary: Development files for the strigi desktop search engine
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
-# directory ownership
-Requires: cmake
%description devel
Development files for the strigi desktop search engine
@@ -69,6 +77,31 @@ Strigi search engine libraries
%prep
%setup -q -n %{name}-%{version}%{?pre:-%{pre}}
+pushd libstreamanalyzer
+%patch11 -p1 -b .11
+%patch12 -p1 -b .12
+%patch13 -p1 -b .13
+%patch14 -p1 -b .14
+%patch15 -p1 -b .15
+popd
+pushd libstreams
+%patch21 -p1 -b .21
+%patch22 -p1 -b .22
+%patch23 -p1 -b .23
+%patch24 -p1 -b .24
+%patch25 -p1 -b .25
+popd
+pushd strigiclient
+%patch31 -p1 -b .31
+popd
+pushd strigidaemon
+%patch41 -p1 -b .41
+%patch42 -p1 -b .42
+popd
+pushd strigiutils
+%patch51 -p1 -b .51
+popd
+
%build
mkdir -p %{_target_platform}
@@ -81,7 +114,6 @@ pushd %{_target_platform}
-DENABLE_DBUS:BOOL=ON \
-DENABLE_FAM:BOOL=ON \
-DENABLE_FFMPEG:BOOL=OFF \
- %{?_cmake_skip_rpath} \
..
popd
@@ -100,6 +132,11 @@ desktop-file-install \
install -p -m644 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/xdg/autostart/strigi-daemon.desktop
+%check
+export CTEST_OUTPUT_ON_FAILURE=1
+make test -C %{_target_platform}
+
+
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
@@ -117,6 +154,7 @@ install -p -m644 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/xdg/autostart/strigi-d
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/libstreamanalyzer.pc
%{_libdir}/pkgconfig/libstreams.pc
+%dir %{_libdir}/cmake/
%{_libdir}/cmake/Strigi/
%{_libdir}/cmake/LibSearchClient/
%{_libdir}/cmake/LibStreamAnalyzer/
@@ -137,6 +175,13 @@ install -p -m644 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/xdg/autostart/strigi-d
%changelog
+* Wed Jan 01 2014 Rex Dieter <rdieter at fedoraproject.org>
+- 0.7.8-4
+- cleanup, drop deprecated bits
+- -devel: drop dep on cmake
+- pull in some upstream patches (particular rpath fixes)
+- %%check: +make test
+
* Tue Dec 03 2013 Rex Dieter <rdieter at fedoraproject.org> 0.7.8-3
- rebuild (exiv2)
diff --git a/strigiclient-0001-use-rpath-only-when-needed.patch b/strigiclient-0001-use-rpath-only-when-needed.patch
new file mode 100644
index 0000000..b9105b3
--- /dev/null
+++ b/strigiclient-0001-use-rpath-only-when-needed.patch
@@ -0,0 +1,31 @@
+From 28ac91951a5b32a74c0fe7fe43c592bfd2312507 Mon Sep 17 00:00:00 2001
+From: Rex Dieter <rdieter at math.unl.edu>
+Date: Wed, 1 Jan 2014 09:56:01 -0600
+Subject: [PATCH] use rpath only when needed
+
+cmake code borrowed from soprano
+---
+ CMakeLists.txt | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7b7d6c7..656381e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -22,8 +22,13 @@ set(LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
+ # These two options below make it set the RPATH of the installed targets to all
+ # RPATH directories outside the current CMAKE_BINARY_DIR and also the library
+ # install directory. Alex
++list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemPlatformLibDir)
++list(FIND CMAKE_C_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemCLibDir)
++list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemCxxLibDir)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
++if("${_isSystemPlatformLibDir}" STREQUAL "-1" AND "${_isSystemCLibDir}" STREQUAL "-1" AND "${_isSystemCxxLibDir}" STREQUAL "-1")
+ set(CMAKE_INSTALL_RPATH ${LIB_DESTINATION} )
++endif()
+
+
+ ##### environment inspection #####
+--
+1.8.4.2
+
diff --git a/strigidaemon-0001-Fix-Krazy-issues.patch b/strigidaemon-0001-Fix-Krazy-issues.patch
new file mode 100644
index 0000000..dc71805
--- /dev/null
+++ b/strigidaemon-0001-Fix-Krazy-issues.patch
@@ -0,0 +1,561 @@
+From 2667f0bf37bc52c3375d0bc3727d2474568508a7 Mon Sep 17 00:00:00 2001
+From: Jos van den Oever <jos at vandenoever.info>
+Date: Fri, 12 Jul 2013 15:55:07 +0200
+Subject: [PATCH 1/2] Fix Krazy issues.
+
+---
+ .krazy | 2 ++
+ bin/daemon/dbus/dbuscpp/dbusbytearray.h | 2 +-
+ bin/daemon/dbus/dbuscpp/dbusobjectcallhandler.h | 2 +-
+ bin/daemon/dbus/dbuscpp/dbusobjectinterface.h | 2 +-
+ bin/daemon/dbus/testinterface.cpp | 2 +-
+ bin/daemon/eventlistener/pollinglistener.h | 2 +-
+ bin/daemon/indexscheduler.cpp | 2 +-
+ bin/daemon/queue/jobqueue.h | 2 +-
+ bin/daemon/xesam/xesamlivesearchinterface.h | 2 +-
+ bin/daemon/xesam/xesamsearch.h | 4 ++--
+ bin/daemon/xesam/xesamsession.h | 4 ++--
+ bin/daemon/xsd/xsdparser/xmlstream.h | 4 ++--
+ include/strigi/clientinterface.h | 2 +-
+ tests/daemon/daemonconfiguratortest.cpp | 9 ++++-----
+ tests/daemon/dbus/strigidaemonunittestsession.cpp | 20 +++++++++++++++++++-
+ tests/daemon/dbus/strigidaemonunittestsession.h | 19 +++++++++++++++++++
+ tests/daemon/dbus/test.cpp | 21 ++++++++++++++++++++-
+ tests/daemon/dbus/xesamlistener.cpp | 16 ++++++++--------
+ tests/indextesters/indexmanagertester.cpp | 2 +-
+ tests/indextesters/indexsearchtester.cpp | 10 +++++-----
+ tests/indextesters/indextest.cpp | 5 ++---
+ tests/streamanalyzer/diranalyzertester.cpp | 10 +++++-----
+ tests/streamanalyzer/diranalyzertester.h | 4 ++--
+ tests/streamanalyzer/xesam/xesam2strigitest.cpp | 4 ++--
+ tests/utils/unittestfunctions.h | 4 ++--
+ 25 files changed, 106 insertions(+), 50 deletions(-)
+ create mode 100644 .krazy
+
+diff --git a/.krazy b/.krazy
+new file mode 100644
+index 0000000..b0e1177
+--- /dev/null
++++ b/.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
+diff --git a/bin/daemon/dbus/dbuscpp/dbusbytearray.h b/bin/daemon/dbus/dbuscpp/dbusbytearray.h
+index dceb103..f37e7d0 100644
+--- a/bin/daemon/dbus/dbuscpp/dbusbytearray.h
++++ b/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);
+diff --git a/bin/daemon/dbus/dbuscpp/dbusobjectcallhandler.h b/bin/daemon/dbus/dbuscpp/dbusobjectcallhandler.h
+index 85ab675..811a6e3 100644
+--- a/bin/daemon/dbus/dbuscpp/dbusobjectcallhandler.h
++++ b/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);
+diff --git a/bin/daemon/dbus/dbuscpp/dbusobjectinterface.h b/bin/daemon/dbus/dbuscpp/dbusobjectinterface.h
+index 2dd46a7..ca64575 100644
+--- a/bin/daemon/dbus/dbuscpp/dbusobjectinterface.h
++++ b/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;
+diff --git a/bin/daemon/dbus/testinterface.cpp b/bin/daemon/dbus/testinterface.cpp
+index 63ae557..d6ff306 100644
+--- a/bin/daemon/dbus/testinterface.cpp
++++ b/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;
+ }
+diff --git a/bin/daemon/eventlistener/pollinglistener.h b/bin/daemon/eventlistener/pollinglistener.h
+index 8627897..4e9631c 100644
+--- a/bin/daemon/eventlistener/pollinglistener.h
++++ b/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();
+
+diff --git a/bin/daemon/indexscheduler.cpp b/bin/daemon/indexscheduler.cpp
+index 0f4dbf3..37bbfb7 100644
+--- a/bin/daemon/indexscheduler.cpp
++++ b/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())
+ {
+diff --git a/bin/daemon/queue/jobqueue.h b/bin/daemon/queue/jobqueue.h
+index c2b2448..84c79be 100644
+--- a/bin/daemon/queue/jobqueue.h
++++ b/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);
+diff --git a/bin/daemon/xesam/xesamlivesearchinterface.h b/bin/daemon/xesam/xesamlivesearchinterface.h
+index 0bc6cdc..dca9960 100644
+--- a/bin/daemon/xesam/xesamlivesearchinterface.h
++++ b/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();
+diff --git a/bin/daemon/xesam/xesamsearch.h b/bin/daemon/xesam/xesamsearch.h
+index bd93d20..acb30a5 100644
+--- a/bin/daemon/xesam/xesamsearch.h
++++ b/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);
+diff --git a/bin/daemon/xesam/xesamsession.h b/bin/daemon/xesam/xesamsession.h
+index 945e928..1d0fe88 100644
+--- a/bin/daemon/xesam/xesamsession.h
++++ b/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
+diff --git a/bin/daemon/xsd/xsdparser/xmlstream.h b/bin/daemon/xsd/xsdparser/xmlstream.h
+index 083e55e..6b48eb5 100644
+--- a/bin/daemon/xsd/xsdparser/xmlstream.h
++++ b/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);
+ };
+
+
+diff --git a/include/strigi/clientinterface.h b/include/strigi/clientinterface.h
+index 026035a..97f3bdf 100644
+--- a/include/strigi/clientinterface.h
++++ b/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);
+diff --git a/tests/daemon/daemonconfiguratortest.cpp b/tests/daemon/daemonconfiguratortest.cpp
+index d43ef67..38f2188 100644
+--- a/tests/daemon/daemonconfiguratortest.cpp
++++ b/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);
+
+diff --git a/tests/daemon/dbus/strigidaemonunittestsession.cpp b/tests/daemon/dbus/strigidaemonunittestsession.cpp
+index 874a655..836aa07 100644
+--- a/tests/daemon/dbus/strigidaemonunittestsession.cpp
++++ b/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 at 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;
+diff --git a/tests/daemon/dbus/strigidaemonunittestsession.h b/tests/daemon/dbus/strigidaemonunittestsession.h
+index 57497ae..18cdc5e 100644
+--- a/tests/daemon/dbus/strigidaemonunittestsession.h
++++ b/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 at 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
+
+diff --git a/tests/daemon/dbus/test.cpp b/tests/daemon/dbus/test.cpp
+index df75882..cff7a3d 100644
+--- a/tests/daemon/dbus/test.cpp
++++ b/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 at 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;
+diff --git a/tests/daemon/dbus/xesamlistener.cpp b/tests/daemon/dbus/xesamlistener.cpp
+index 243de69..4eec0a5 100644
+--- a/tests/daemon/dbus/xesamlistener.cpp
++++ b/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,
+diff --git a/tests/indextesters/indexmanagertester.cpp b/tests/indextesters/indexmanagertester.cpp
+index 8a23113..ccd98fb 100644
+--- a/tests/indextesters/indexmanagertester.cpp
++++ b/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);
+ }
+diff --git a/tests/indextesters/indexsearchtester.cpp b/tests/indextesters/indexsearchtester.cpp
+index 9f601b5..1af07af 100644
+--- a/tests/indextesters/indexsearchtester.cpp
++++ b/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);
+
+diff --git a/tests/indextesters/indextest.cpp b/tests/indextesters/indextest.cpp
+index 7d4be70..d9be00f 100644
+--- a/tests/indextesters/indextest.cpp
++++ b/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);
+ }
+diff --git a/tests/streamanalyzer/diranalyzertester.cpp b/tests/streamanalyzer/diranalyzertester.cpp
+index 4e675b7..3cd40be 100644
+--- a/tests/streamanalyzer/diranalyzertester.cpp
++++ b/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;
+diff --git a/tests/streamanalyzer/diranalyzertester.h b/tests/streamanalyzer/diranalyzertester.h
+index a390d52..9d696e7 100644
+--- a/tests/streamanalyzer/diranalyzertester.h
++++ b/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>
+diff --git a/tests/streamanalyzer/xesam/xesam2strigitest.cpp b/tests/streamanalyzer/xesam/xesam2strigitest.cpp
+index a5dfc16..a4d12a6 100644
+--- a/tests/streamanalyzer/xesam/xesam2strigitest.cpp
++++ b/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;
+diff --git a/tests/utils/unittestfunctions.h b/tests/utils/unittestfunctions.h
+index 2f84095..5d2a08b 100644
+--- a/tests/utils/unittestfunctions.h
++++ b/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>
+
+--
+1.8.4.2
+
diff --git a/strigidaemon-0002-use-rpath-only-when-needed.patch b/strigidaemon-0002-use-rpath-only-when-needed.patch
new file mode 100644
index 0000000..58ee68f
--- /dev/null
+++ b/strigidaemon-0002-use-rpath-only-when-needed.patch
@@ -0,0 +1,31 @@
+From d941b44685135731f554800a20bf7e4c113d2b38 Mon Sep 17 00:00:00 2001
+From: Rex Dieter <rdieter at math.unl.edu>
+Date: Wed, 1 Jan 2014 09:56:16 -0600
+Subject: [PATCH 2/2] use rpath only when needed
+
+cmake code borrowed from soprano
+---
+ CMakeLists.txt | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6eb4ead..9ce10ba 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -23,8 +23,13 @@ set(INCLUDE_DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
+ # These two options below make it set the RPATH of the installed targets to all
+ # RPATH directories outside the current CMAKE_BINARY_DIR and also the library
+ # install directory. Alex
++list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemPlatformLibDir)
++list(FIND CMAKE_C_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemCLibDir)
++list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemCxxLibDir)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
++if("${_isSystemPlatformLibDir}" STREQUAL "-1" AND "${_isSystemCLibDir}" STREQUAL "-1" AND "${_isSystemCxxLibDir}" STREQUAL "-1")
+ set(CMAKE_INSTALL_RPATH ${LIB_DESTINATION} )
++endif()
+
+ option(ENABLE_DBUS "enable dbus support in the daemon" ON)
+ option(ENABLE_INOTIFY "enable monitoring the filesystem with inotify" OFF)
+--
+1.8.4.2
+
diff --git a/strigiutils-0001-use-rpath-only-when-needed.patch b/strigiutils-0001-use-rpath-only-when-needed.patch
new file mode 100644
index 0000000..d6e0f72
--- /dev/null
+++ b/strigiutils-0001-use-rpath-only-when-needed.patch
@@ -0,0 +1,31 @@
+From f0dd04f94bbd3fea979c6c67e3b79cfc4ae2fc01 Mon Sep 17 00:00:00 2001
+From: Rex Dieter <rdieter at math.unl.edu>
+Date: Wed, 1 Jan 2014 09:56:29 -0600
+Subject: [PATCH] use rpath only when needed
+
+cmake code borrowed from soprano
+---
+ CMakeLists.txt | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7dfa0ad..21e2ca1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -16,8 +16,13 @@ enable_testing()
+ # These two options below make it set the RPATH of the installed targets to all
+ # RPATH directories outside the current CMAKE_BINARY_DIR and also the library
+ # install directory. Alex
++list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemPlatformLibDir)
++list(FIND CMAKE_C_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemCLibDir)
++list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${LIB_DESTINATION}" _isSystemCxxLibDir)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
++if("${_isSystemPlatformLibDir}" STREQUAL "-1" AND "${_isSystemCLibDir}" STREQUAL "-1" AND "${_isSystemCxxLibDir}" STREQUAL "-1")
+ set(CMAKE_INSTALL_RPATH ${LIB_DESTINATION} )
++endif()
+
+
+ ##### environment inspection #####
+--
+1.8.4.2
+
More information about the scm-commits
mailing list