diff options
Diffstat (limited to 'source/l/strigi')
12 files changed, 1862 insertions, 22 deletions
diff --git a/source/l/strigi/libstreamanalyzer-0001-Fix-for-non-valid-values-in-Exif-field-ISOSpeedRatin.patch b/source/l/strigi/libstreamanalyzer-0001-Fix-for-non-valid-values-in-Exif-field-ISOSpeedRatin.patch new file mode 100644 index 00000000..45201c8a --- /dev/null +++ b/source/l/strigi/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@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/source/l/strigi/libstreamanalyzer-0002-order-matters-for-systems-that-have-things-already-i.patch b/source/l/strigi/libstreamanalyzer-0002-order-matters-for-systems-that-have-things-already-i.patch new file mode 100644 index 00000000..c940f6cf --- /dev/null +++ b/source/l/strigi/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@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/source/l/strigi/libstreamanalyzer-0003-Fix-Krazy-issues.patch b/source/l/strigi/libstreamanalyzer-0003-Fix-Krazy-issues.patch new file mode 100644 index 00000000..fab48832 --- /dev/null +++ b/source/l/strigi/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@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@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@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@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@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@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@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@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@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@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@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@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@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@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/source/l/strigi/libstreamanalyzer-0004-ffmpeg-Rename-mutex-to-g_mutex.patch b/source/l/strigi/libstreamanalyzer-0004-ffmpeg-Rename-mutex-to-g_mutex.patch new file mode 100644 index 00000000..a114d029 --- /dev/null +++ b/source/l/strigi/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@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/source/l/strigi/libstreamanalyzer-0005-use-rpath-only-when-needed.patch b/source/l/strigi/libstreamanalyzer-0005-use-rpath-only-when-needed.patch new file mode 100644 index 00000000..bcbf50bb --- /dev/null +++ b/source/l/strigi/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@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/source/l/strigi/libstreams-0001-Generate-config.h-after-looking-for-dependencies.patch b/source/l/strigi/libstreams-0001-Generate-config.h-after-looking-for-dependencies.patch new file mode 100644 index 00000000..895c9f7e --- /dev/null +++ b/source/l/strigi/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@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@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/source/l/strigi/libstreams-0002-Reduce-noise-in-analysis-tools-complain-about-resour.patch b/source/l/strigi/libstreams-0002-Reduce-noise-in-analysis-tools-complain-about-resour.patch new file mode 100644 index 00000000..7179526f --- /dev/null +++ b/source/l/strigi/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@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/source/l/strigi/libstreams-0003-Build-fix-for-gcc-4.8.patch b/source/l/strigi/libstreams-0003-Build-fix-for-gcc-4.8.patch new file mode 100644 index 00000000..20328638 --- /dev/null +++ b/source/l/strigi/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@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/source/l/strigi/libstreams-0004-Fix-Krazy-issues.patch b/source/l/strigi/libstreams-0004-Fix-Krazy-issues.patch new file mode 100644 index 00000000..57036e62 --- /dev/null +++ b/source/l/strigi/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@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@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@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/source/l/strigi/libstreams-0005-use-rpath-only-when-needed.patch b/source/l/strigi/libstreams-0005-use-rpath-only-when-needed.patch new file mode 100644 index 00000000..9a79c13b --- /dev/null +++ b/source/l/strigi/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@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/source/l/strigi/strigi-fix-ftbfs-with-gcc-4.7.diff b/source/l/strigi/strigi-fix-ftbfs-with-gcc-4.7.diff deleted file mode 100644 index d4721c39..00000000 --- a/source/l/strigi/strigi-fix-ftbfs-with-gcc-4.7.diff +++ /dev/null @@ -1,16 +0,0 @@ -Description: Fix FTBFS with gcc 4.7 due to missing <unistd.h> include. -Author: Cyril Brulebois <kibi@debian.org> -Bug-Debian: http://bugs.debian.org/667384 - ---- strigi-0.7.7.orig/strigidaemon/bin/daemon/eventlistener/eventlistenerqueue.cpp -+++ strigi-0.7.7/strigidaemon/bin/daemon/eventlistener/eventlistenerqueue.cpp -@@ -27,9 +27,7 @@ - #include <iostream> - #include <stdio.h> - --#if defined(__SUNPRO_CC) - #include <unistd.h> --#endif - - using namespace std; - diff --git a/source/l/strigi/strigi.SlackBuild b/source/l/strigi/strigi.SlackBuild index 8b7374fc..cefa4242 100755 --- a/source/l/strigi/strigi.SlackBuild +++ b/source/l/strigi/strigi.SlackBuild @@ -1,7 +1,7 @@ #!/bin/sh # Copyright 2007-2008 Robby Workman, Northport, Alabama, USA -# Copyright 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010, 2011, 2012, 2015 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # Redistribution and use of this script, with or without modification, is @@ -25,7 +25,7 @@ PKGNAM=strigi -VERSION=${VERSION:-0.7.7} +VERSION=${VERSION:-0.7.8} BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:--j7} @@ -34,7 +34,7 @@ NUMJOBS=${NUMJOBS:--j7} MARCH=$( uname -m ) if [ -z "$ARCH" ]; then case "$MARCH" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; armv7hl) export ARCH=$MARCH ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: @@ -42,8 +42,8 @@ if [ -z "$ARCH" ]; then esac fi -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" @@ -70,7 +70,13 @@ rm -rf $PKGNAM-$VERSION tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1 cd $PKGNAM-$VERSION || exit 1 -zcat $CWD/strigi-fix-ftbfs-with-gcc-4.7.diff.gz | patch -p1 --verbose || exit 1 +( cd libstreamanalyzer +zcat $CWD/libstreamanalyzer*.patch.gz | patch -p1 --verbose || exit 1 +) +( cd libstreams +zcat $CWD/libstreams*.patch.gz | patch -p1 --verbose || exit 1 +) +echo "target_link_libraries(index2dump streamanalyzer clucene-shared)" >> libstreamanalyzer/plugins/indexers/clucenengindexer/indexdump/CMakeLists.txt chown -R root:root . find . \ |