1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= C++ port of Lucene search engine
8 HOMEPAGE= http://clucene.sourceforge.net/
12 SITES[main]= SF/clucene/clucene-core-unstable/2.3
13 DISTFILE[1]= clucene-core-2.3.3.4.tar.gz:main
15 SPKGS[standard]= single
17 OPTIONS_AVAILABLE= none
18 OPTIONS_STANDARD= none
20 BUILD_DEPENDS= boost-libraries:rest:python_default
22 USES= cmake iconv zlib c++:single
24 DISTNAME= clucene-core-2.3.3.4
26 FPC_EQUIVALENT= textproc/clucene
28 PLIST_SUB= SOVERSION=2.3.3.4
30 CMAKE_ARGS= -DBUILD_CONTRIBS_LIB:BOOL=ON
34 -e 's|%%DATADIR%%|share/clucene|' \
36 ${WRKSRC}/src/core/CMakeLists.txt
37 ${ECHO_CMD} 'SET(CMAKE_NO_BUILTIN_CHRPATH OFF CACHE BOOL "" FORCE)' \
38 >> ${WRKSRC}/CMakeLists.txt
41 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so
43 [FILE:160:descriptions/desc.single]
44 CLucene is a C++ port of Lucene: the high-performance, full-featured text
45 search engine written in Java. CLucene is faster than lucene as it is
50 ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab 2241498 clucene-core-2.3.3.4.tar.gz
53 [FILE:7639:manifests/plist.single]
61 include/CLucene/analysis/
65 LanguageBasedAnalyzer.h
67 include/CLucene/analysis/cjk/CJKAnalyzer.h
68 include/CLucene/analysis/de/
72 include/CLucene/analysis/standard/
76 StandardTokenizerConstants.h
77 include/CLucene/debug/
81 include/CLucene/document/
88 include/CLucene/ext/boost/
97 include/CLucene/ext/boost/config/
103 select_compiler_config.hpp
104 select_platform_config.hpp
105 select_stdlib_config.hpp
109 include/CLucene/ext/boost/config/abi/
114 include/CLucene/ext/boost/config/compiler/
134 include/CLucene/ext/boost/config/no_tr1/
140 include/CLucene/ext/boost/config/platform/
154 include/CLucene/ext/boost/config/stdlib/
164 include/CLucene/ext/boost/detail/
166 allocator_utilities.hpp
175 has_default_constructor.hpp
179 is_function_ref_tester.hpp
184 lightweight_mutex.hpp
186 lightweight_thread.hpp
188 named_template_params.hpp
189 no_exceptions_support.hpp
193 ob_compressed_pair.hpp
195 reference_content.hpp
196 scoped_enum_emulation.hpp
199 templated_streams.hpp
200 utf8_codecvt_facet.hpp
202 include/CLucene/ext/boost/exception/
204 current_exception_cast.hpp
205 diagnostic_information.hpp
206 enable_current_exception.hpp
207 enable_error_info.hpp
208 errinfo_api_function.hpp
211 errinfo_file_handle.hpp
212 errinfo_file_name.hpp
213 errinfo_file_open_mode.hpp
214 errinfo_nested_exception.hpp
215 errinfo_type_info_name.hpp
223 include/CLucene/ext/boost/exception/detail/
224 attribute_noreturn.hpp
227 is_output_streamable.hpp
230 include/CLucene/ext/boost/smart_ptr/
232 enable_shared_from_this.hpp
233 enable_shared_from_this2.hpp
241 include/CLucene/ext/boost/smart_ptr/detail/
244 atomic_count_gcc_x86.hpp
245 atomic_count_pthreads.hpp
246 atomic_count_solaris.hpp
247 atomic_count_sync.hpp
248 atomic_count_win32.hpp
249 lightweight_mutex.hpp
260 sp_counted_base_acc_ia64.hpp
261 sp_counted_base_cw_ppc.hpp
262 sp_counted_base_cw_x86.hpp
263 sp_counted_base_gcc_ia64.hpp
264 sp_counted_base_gcc_mips.hpp
265 sp_counted_base_gcc_ppc.hpp
266 sp_counted_base_gcc_sparc.hpp
267 sp_counted_base_gcc_x86.hpp
268 sp_counted_base_nt.hpp
269 sp_counted_base_pt.hpp
270 sp_counted_base_solaris.hpp
271 sp_counted_base_spin.hpp
272 sp_counted_base_sync.hpp
273 sp_counted_base_w32.hpp
284 include/CLucene/highlighter/
295 SimpleHTMLFormatter.h
300 include/CLucene/index/
301 DirectoryIndexReader.h
302 IndexDeletionPolicy.h
309 MultipleTermPositions.h
314 include/CLucene/queryParser/
315 MultiFieldQueryParser.h
317 QueryParserConstants.h
318 QueryParserTokenManager.h
320 include/CLucene/queryParser/legacy/
321 MultiFieldQueryParser.h
324 include/CLucene/search/
328 CachingWrapperFilter.h
336 FieldSortedHitQueue.h
365 include/CLucene/search/spans/
375 include/CLucene/snowball/
379 include/CLucene/snowball/include/libstemmer.h
380 include/CLucene/snowball/libstemmer/modules.h
381 include/CLucene/snowball/runtime/
384 include/CLucene/snowball/src_c/
385 stem_ISO_8859_1_danish.h
386 stem_ISO_8859_1_dutch.h
387 stem_ISO_8859_1_english.h
388 stem_ISO_8859_1_finnish.h
389 stem_ISO_8859_1_french.h
390 stem_ISO_8859_1_german.h
391 stem_ISO_8859_1_italian.h
392 stem_ISO_8859_1_norwegian.h
393 stem_ISO_8859_1_porter.h
394 stem_ISO_8859_1_portuguese.h
395 stem_ISO_8859_1_spanish.h
396 stem_ISO_8859_1_swedish.h
397 stem_KOI8_R_russian.h
405 stem_UTF_8_norwegian.h
407 stem_UTF_8_portuguese.h
411 include/CLucene/store/
419 include/CLucene/util/
434 libclucene-contribs-lib.so
435 libclucene-contribs-lib.so.%%SOVERSION%%
436 libclucene-contribs-lib.so.1
438 libclucene-core.so.%%SOVERSION%%
441 libclucene-shared.so.%%SOVERSION%%
442 libclucene-shared.so.1
443 lib/pkgconfig/libclucene-core.pc
444 share/clucene/CLuceneConfig.cmake
447 [FILE:320:patches/patch-CMakeLists.txt]
448 --- CMakeLists.txt.orig 2011-03-17 00:21:07 UTC
450 @@ -163,7 +163,7 @@ IF ( BUILD_CONTRIBS )
451 SET(BUILD_CONTRIBS_LIB 1)
452 ENDIF ( BUILD_CONTRIBS )
453 IF ( BUILD_CONTRIBS_LIB )
454 - ADD_SUBDIRECTORY (src/contribs-lib EXCLUDE_FROM_ALL)
455 + ADD_SUBDIRECTORY (src/contribs-lib)
456 ENDIF ( BUILD_CONTRIBS_LIB )
461 [FILE:450:patches/patch-src__contribs-lib__CLucene__analysis__cjk__CJKAnalyzer.h]
462 --- src/contribs-lib/CLucene/analysis/cjk/CJKAnalyzer.h.orig 2011-03-17 00:21:07 UTC
463 +++ src/contribs-lib/CLucene/analysis/cjk/CJKAnalyzer.h
464 @@ -39,7 +39,7 @@ private:
465 * character buffer, store the characters which are used to compose <br>
468 - TCHAR buffer[LUCENE_MAX_WORD_LEN];
469 + TCHAR buffer[LUCENE_MAX_WORD_LEN+1];
472 * I/O buffer, used to store the content of the input(one of the <br>
475 [FILE:996:patches/patch-src__contribs-lib__CLucene__analysis__de__GermanStemmer.cpp]
476 --- src/contribs-lib/CLucene/analysis/de/GermanStemmer.cpp.orig 2011-03-17 00:21:07 UTC
477 +++ src/contribs-lib/CLucene/analysis/de/GermanStemmer.cpp
478 @@ -16,7 +16,7 @@ CL_NS_USE2(analysis,de)
481 TCHAR* GermanStemmer::stem(const TCHAR* term, size_t length) {
484 length = _tcslen(term);
487 @@ -38,7 +38,7 @@ CL_NS_USE2(analysis,de)
490 bool GermanStemmer::isStemmable(const TCHAR* term, size_t length) const {
493 length = _tcslen(term);
495 for (size_t c = 0; c < length; c++) {
496 @@ -144,7 +144,7 @@ CL_NS_USE2(analysis,de)
498 buffer.setCharAt( i, _T('$') );
499 buffer.deleteChars( i + 1, i + 3 );
503 else if ( c == _T('c') && buffer.charAt( i + 1 ) == _T('h') ) {
504 buffer.setCharAt( i, 0xa7 ); // section sign in UTF-16
507 [FILE:2092:patches/patch-src__contribs-lib__CLucene__highlighter__Highlighter.cpp]
508 --- src/contribs-lib/CLucene/highlighter/Highlighter.cpp.orig 2011-03-17 00:21:07 UTC
509 +++ src/contribs-lib/CLucene/highlighter/Highlighter.cpp
510 @@ -214,8 +214,9 @@ CL_NS_USE(util)
513 int32_t lastEndOffset = 0;
515 _textFragmenter->start(text);
516 - TCHAR substringBuffer[LUCENE_MAX_WORD_LEN];
517 + TCHAR substringBuffer[LUCENE_MAX_WORD_LEN+1];
519 TokenGroup* tokenGroup=_CLNEW TokenGroup();
521 @@ -229,8 +230,9 @@ CL_NS_USE(util)
522 startOffset = tokenGroup->getStartOffset();
523 endOffset = tokenGroup->getEndOffset();
525 - _tcsncpy(substringBuffer,text+startOffset,endOffset-startOffset);
526 - substringBuffer[endOffset-startOffset]=_T('\0');
527 + len = cl_min(endOffset-startOffset,LUCENE_MAX_WORD_LEN);
528 + _tcsncpy(substringBuffer,text+startOffset,len);
529 + substringBuffer[len]=_T('\0');
531 TCHAR* encoded = _encoder->encodeText(substringBuffer);
532 TCHAR* markedUpText=_formatter->highlightTerm(encoded, tokenGroup);
533 @@ -238,9 +240,7 @@ CL_NS_USE(util)
535 //store any whitespace etc from between this and last group
536 if (startOffset > lastEndOffset){
537 - int len = startOffset-lastEndOffset;
538 - if ( len > LUCENE_MAX_FIELD_LEN )
539 - len = LUCENE_MAX_FIELD_LEN;
540 + len = cl_min(startOffset-lastEndOffset,LUCENE_MAX_FIELD_LEN);
541 _tcsncpy(buffer,text+lastEndOffset,len);
542 buffer[len]=_T('\0');
544 @@ -287,8 +287,9 @@ CL_NS_USE(util)
545 startOffset = tokenGroup->getStartOffset();
546 endOffset = tokenGroup->getEndOffset();
548 - _tcsncpy(substringBuffer,text+startOffset,endOffset-startOffset);
549 - substringBuffer[endOffset-startOffset]=_T('\0');
550 + len = cl_min(endOffset-startOffset,LUCENE_MAX_WORD_LEN);
551 + _tcsncpy(substringBuffer,text+startOffset,len);
552 + substringBuffer[len]=_T('\0');
554 TCHAR* encoded = _encoder->encodeText(substringBuffer);
555 TCHAR* markedUpText=_formatter->highlightTerm(encoded, tokenGroup);
556 @@ -393,6 +394,7 @@ CL_NS_USE(util)
566 [FILE:381:patches/patch-src__contribs-lib__CLucene__highlighter__WeightedTerm.cpp]
567 --- src/contribs-lib/CLucene/highlighter/WeightedTerm.cpp.orig 2011-03-17 00:21:07 UTC
568 +++ src/contribs-lib/CLucene/highlighter/WeightedTerm.cpp
569 @@ -73,7 +73,7 @@ CL_NS_DEF2(search,highlight)
570 * @param weight the weight associated with this term
572 void WeightedTerm::setWeight(float_t weight) {
573 - this->_weight = _weight;
580 [FILE:2580:patches/patch-src__contribs-lib__CLucene__snowball__Snowball.cpp]
581 --- src/contribs-lib/CLucene/snowball/Snowball.cpp.orig 2011-03-17 00:21:07 UTC
582 +++ src/contribs-lib/CLucene/snowball/Snowball.cpp
583 @@ -19,16 +19,31 @@ CL_NS_USE2(analysis,standard)
585 CL_NS_DEF2(analysis,snowball)
587 + class SnowballAnalyzer::SavedStreams : public TokenStream {
589 + StandardTokenizer* tokenStream;
590 + TokenStream* filteredTokenStream;
592 + SavedStreams():tokenStream(NULL), filteredTokenStream(NULL) {}
594 + Token* next(Token* token) {return NULL;}
597 /** Builds the named analyzer with no stop words. */
598 SnowballAnalyzer::SnowballAnalyzer(const TCHAR* language) {
599 this->language = STRDUP_TtoT(language);
603 - SnowballAnalyzer::~SnowballAnalyzer(){
604 - _CLDELETE_CARRAY(language);
605 - if ( stopSet != NULL )
606 - _CLDELETE(stopSet);
607 + SnowballAnalyzer::~SnowballAnalyzer() {
608 + SavedStreams* streams = reinterpret_cast<SavedStreams*>(getPreviousTokenStream());
609 + if (streams != NULL) {
610 + _CLDELETE(streams->filteredTokenStream);
611 + _CLDELETE(streams);
613 + _CLDELETE_CARRAY(language);
614 + if (stopSet != NULL)
615 + _CLDELETE(stopSet);
618 /** Builds the named analyzer with the given stop words.
619 @@ -62,12 +77,29 @@ CL_NS_DEF2(analysis,snowball)
620 result = _CLNEW SnowballFilter(result, language, true);
630 + TokenStream* SnowballAnalyzer::reusableTokenStream(const TCHAR* fieldName, CL_NS(util)::Reader* reader) {
631 + SavedStreams* streams = reinterpret_cast<SavedStreams*>(getPreviousTokenStream());
633 + if (streams == NULL) {
634 + streams = _CLNEW SavedStreams();
635 + BufferedReader* bufferedReader = reader->__asBufferedReader();
637 + if (bufferedReader == NULL)
638 + streams->tokenStream = _CLNEW StandardTokenizer(_CLNEW FilteredBufferedReader(reader, false), true);
640 + streams->tokenStream = _CLNEW StandardTokenizer(bufferedReader);
642 + streams->filteredTokenStream = _CLNEW StandardFilter(streams->tokenStream, true);
643 + streams->filteredTokenStream = _CLNEW LowerCaseFilter(streams->filteredTokenStream, true);
644 + if (stopSet != NULL)
645 + streams->filteredTokenStream = _CLNEW StopFilter(streams->filteredTokenStream, true, stopSet);
646 + streams->filteredTokenStream = _CLNEW SnowballFilter(streams->filteredTokenStream, language, true);
647 + setPreviousTokenStream(streams);
649 + streams->tokenStream->reset(reader);
650 + return streams->filteredTokenStream;
653 /** Construct the named stemming filter.
657 [FILE:791:patches/patch-src__contribs-lib__CLucene__snowball__SnowballAnalyzer.h]
658 --- src/contribs-lib/CLucene/snowball/SnowballAnalyzer.h.orig 2011-03-17 00:21:07 UTC
659 +++ src/contribs-lib/CLucene/snowball/SnowballAnalyzer.h
660 @@ -22,6 +22,7 @@ CL_NS_DEF2(analysis,snowball)
661 class CLUCENE_CONTRIBS_EXPORT SnowballAnalyzer: public Analyzer {
663 CLTCSetList* stopSet;
664 + class SavedStreams;
667 /** Builds the named analyzer with no stop words. */
668 @@ -37,6 +38,8 @@ public:
669 StandardFilter}, a {@link LowerCaseFilter} and a {@link StopFilter}. */
670 TokenStream* tokenStream(const TCHAR* fieldName, CL_NS(util)::Reader* reader);
671 TokenStream* tokenStream(const TCHAR* fieldName, CL_NS(util)::Reader* reader, bool deleteReader);
673 + TokenStream* reusableTokenStream(const TCHAR* fieldName, CL_NS(util)::Reader* reader);
679 [FILE:868:patches/patch-src__contribs-lib__CLucene__snowball__libstemmer__libstemmer.c]
680 --- src/contribs-lib/CLucene/snowball/libstemmer/libstemmer.c.orig 2011-03-17 00:21:07 UTC
681 +++ src/contribs-lib/CLucene/snowball/libstemmer/libstemmer.c
682 @@ -35,9 +35,8 @@ sb_stemmer_new(const char * algorithm, c
684 stemmer_encoding enc;
685 struct stemmer_modules * module;
686 - struct sb_stemmer * stemmer =
687 - (struct sb_stemmer *) malloc(sizeof(struct sb_stemmer));
688 - if (stemmer == NULL) return NULL;
689 + struct sb_stemmer * stemmer;
691 enc = sb_getenc(charenc);
692 if (enc == ENC_UNKNOWN) return NULL;
694 @@ -46,6 +45,9 @@ sb_stemmer_new(const char * algorithm, c
696 if (module->name == NULL) return NULL;
698 + stemmer = (struct sb_stemmer *) malloc(sizeof(struct sb_stemmer));
699 + if (stemmer == NULL) return NULL;
701 stemmer->create = module->create;
702 stemmer->close = module->close;
703 stemmer->stem = module->stem;
706 [FILE:985:patches/patch-src__contribs-lib__CMakeLists.txt]
707 --- src/contribs-lib/CMakeLists.txt.orig 2011-03-17 00:21:07 UTC
708 +++ src/contribs-lib/CMakeLists.txt
709 @@ -106,9 +106,26 @@ add_library(clucene-contribs-lib SHARED
711 TARGET_LINK_LIBRARIES(clucene-contribs-lib ${clucene_contrib_extra_libs})
713 +#install public headers.
714 +FOREACH(file ${HEADERS})
715 + get_filename_component(apath ${file} PATH)
716 + get_filename_component(aname ${file} NAME)
717 + file(RELATIVE_PATH relpath ${CMAKE_SOURCE_DIR}/src/contribs-lib ${apath})
718 + IF ( NOT aname MATCHES "^_.*" )
719 + install(FILES ${file}
720 + DESTINATION include/${relpath}
721 + COMPONENT development)
722 + ENDIF ( NOT aname MATCHES "^_.*" )
725 #set properties on the libraries
726 SET_TARGET_PROPERTIES(clucene-contribs-lib PROPERTIES
727 VERSION ${CLUCENE_VERSION}
728 SOVERSION ${CLUCENE_SOVERSION}
729 COMPILE_DEFINITIONS_DEBUG _DEBUG
732 +#and install library
733 +install(TARGETS clucene-contribs-lib
734 + DESTINATION ${LIB_DESTINATION}
735 + COMPONENT runtime )
738 [FILE:394:patches/patch-src__core__CLucene__analysis__AnalysisHeader.cpp]
739 --- src/core/CLucene/analysis/AnalysisHeader.cpp.orig 2011-03-17 00:21:07 UTC
740 +++ src/core/CLucene/analysis/AnalysisHeader.cpp
741 @@ -212,7 +212,7 @@ TCHAR* Token::toString() const{
743 sb.appendInt( _endOffset );
745 - if (!_tcscmp( _type, _T("word")) == 0 ){
746 + if (_tcscmp( _type, _T("word")) != 0) {
747 sb.append(_T(",type="));
752 [FILE:504:patches/patch-src__core__CLucene__index__DocumentsWriter.cpp]
753 --- src/core/CLucene/index/DocumentsWriter.cpp.orig 2011-03-17 00:21:07 UTC
754 +++ src/core/CLucene/index/DocumentsWriter.cpp
755 @@ -125,7 +125,7 @@ DocumentsWriter::~DocumentsWriter(){
756 if (this->postingsFreeListDW.values){
757 if (this->postingsFreeCountDW < this->postingsFreeListDW.length) {
758 memset(this->postingsFreeListDW.values + this->postingsFreeCountDW
763 postingsFreeListDW.deleteUntilNULL();
766 [FILE:695:patches/patch-src__core__CLucene__index__DocumentsWriterThreadState.cpp]
767 --- src/core/CLucene/index/DocumentsWriterThreadState.cpp.orig 2011-03-17 00:21:07 UTC
768 +++ src/core/CLucene/index/DocumentsWriterThreadState.cpp
769 @@ -994,7 +994,7 @@ void DocumentsWriter::ThreadState::Field
770 const TCHAR* tokenText = token->termBuffer();
771 const int32_t tokenTextLen = token->termLength();
777 int32_t downto = tokenTextLen;
778 @@ -1203,7 +1203,8 @@ void DocumentsWriter::ThreadState::Field
779 const int32_t newMask = newSize-1;
781 ValueArray<Posting*> newHash(newSize);
782 - int32_t hashPos, code;
785 const TCHAR* pos = NULL;
786 const TCHAR* start = NULL;
790 [FILE:536:patches/patch-src__core__CLucene__index__IndexFileDeleter.cpp]
791 --- src/core/CLucene/index/IndexFileDeleter.cpp.orig 2011-03-17 00:21:07 UTC
792 +++ src/core/CLucene/index/IndexFileDeleter.cpp
793 @@ -129,7 +129,7 @@ IndexFileDeleter::IndexFileDeleter(Direc
795 string& fileName = files.at(i);
797 - if (filter->accept(NULL, fileName.c_str()) && !fileName.compare(IndexFileNames::SEGMENTS_GEN) == 0) {
798 + if (filter->accept(NULL, fileName.c_str()) && fileName.compare(IndexFileNames::SEGMENTS_GEN) != 0) {
800 // Add this file to refCounts with initial count 0:
801 getRefCount(fileName.c_str());
804 [FILE:2342:patches/patch-src__core__CLucene__index__IndexWriter.cpp]
805 --- src/core/CLucene/index/IndexWriter.cpp.orig 2011-03-17 00:21:07 UTC
806 +++ src/core/CLucene/index/IndexWriter.cpp
807 @@ -53,7 +53,6 @@ const int32_t IndexWriter::DEFAULT_MERGE
809 DEFINE_MUTEX(IndexWriter::MESSAGE_ID_LOCK)
810 int32_t IndexWriter::MESSAGE_ID = 0;
811 -const int32_t IndexWriter::MAX_TERM_LENGTH = DocumentsWriter::MAX_TERM_LENGTH;
813 class IndexWriter::Internal{
815 @@ -814,7 +813,7 @@ void IndexWriter::optimize(int32_t maxNu
818 if (maxNumSegments < 1)
819 - _CLTHROWA(CL_ERR_IllegalArgument, "maxNumSegments must be >= 1; got " + maxNumSegments);
820 + _CLTHROWA(CL_ERR_IllegalArgument, (string("maxNumSegments must be >= 1; got ") + Misc::toString(maxNumSegments)).c_str());
822 if (infoStream != NULL)
823 message("optimize: index now " + segString());
824 @@ -1392,7 +1391,7 @@ bool IndexWriter::doFlush(bool _flushDoc
825 // Check if the doc stores must be separately flushed
826 // because other segments, besides the one we are about
827 // to flush, reference it
828 - if (_flushDocStores && (!flushDocs || !docWriter->getSegment().compare(docWriter->getDocStoreSegment())==0 )) {
829 + if (_flushDocStores && (!flushDocs || docWriter->getSegment().compare(docWriter->getDocStoreSegment()) != 0)) {
830 // We must separately flush the doc store
831 if (infoStream != NULL)
832 message(" flush shared docStore segment " + docStoreSegment);
833 @@ -1631,7 +1630,7 @@ bool IndexWriter::commitMerge(MergePolic
834 // Load deletes present @ start of merge, for this segment:
835 BitVector previousDeletes(previousInfo->dir, previousInfo->getDelFileName().c_str());
837 - if (!currentInfo->getDelFileName().compare(previousInfo->getDelFileName())==0 ){
838 + if (currentInfo->getDelFileName().compare(previousInfo->getDelFileName()) != 0) {
839 // This means this segment has had new deletes
840 // committed since we started the merge, so we
842 @@ -1928,7 +1927,7 @@ void IndexWriter::_mergeInit(MergePolicy
843 mergeDocStores = true;
844 else if (lastDocStoreSegment.empty())
845 lastDocStoreSegment = docStoreSegment;
846 - else if (!lastDocStoreSegment.compare(docStoreSegment)==0 )
847 + else if (lastDocStoreSegment.compare(docStoreSegment) != 0)
848 mergeDocStores = true;
850 // Segments' docScoreOffsets must be in-order,
853 [FILE:624:patches/patch-src__core__CLucene__index__IndexWriter.h]
854 --- src/core/CLucene/index/IndexWriter.h.orig 2011-03-17 00:21:07 UTC
855 +++ src/core/CLucene/index/IndexWriter.h
856 @@ -384,14 +384,6 @@ public:
858 static const int32_t DEFAULT_MAX_MERGE_DOCS;
861 - * Absolute hard maximum length for a term. If a term
862 - * arrives from the analyzer longer than this length, it
863 - * is skipped and a message is printed to infoStream, if
864 - * set (see {@link #setInfoStream}).
866 - static const int32_t MAX_TERM_LENGTH;
869 /* Determines how often segment indices are merged by addDocument(). With
870 * smaller values, less RAM is used while indexing, and searches on
873 [FILE:399:patches/patch-src__core__CLucene__index__TermInfosReader.cpp]
874 --- src/core/CLucene/index/TermInfosReader.cpp.orig 2011-03-17 00:21:07 UTC
875 +++ src/core/CLucene/index/TermInfosReader.cpp
876 @@ -111,7 +111,7 @@ CL_NS_DEF(index)
877 //destroy their elements
879 for ( int32_t i=0; i<indexTermsLength;++i ){
880 - indexTerms[i].__cl_refcount--;
881 + indexTerms[i].__cl_decref();
887 [FILE:895:patches/patch-src__core__CLucene__queryParser__QueryParser.cpp]
888 --- src/core/CLucene/queryParser/QueryParser.cpp.orig 2011-03-17 00:21:07 UTC
889 +++ src/core/CLucene/queryParser/QueryParser.cpp
890 @@ -79,7 +79,7 @@ const TCHAR* QueryParserConstants::token
894 -const int32_t QueryParser::jj_la1_0[] = {0x180,0x180,0xe00,0xe00,0x1f69f80,0x48000,0x10000,0x1f69000,0x1348000,0x80000,0x80000,0x10000,0x18000000,0x2000000,0x18000000,0x10000,0x80000000,0x20000000,0x80000000,0x10000,0x80000,0x10000,0x1f68000};
895 +const int32_t QueryParser::jj_la1_0[] = {0x180,0x180,0xe00,0xe00,0x1f69f80,0x48000,0x10000,0x1f69000,0x1348000,0x80000,0x80000,0x10000,0x18000000,0x2000000,0x18000000,0x10000,int32_t(0x80000000),0x20000000,int32_t(0x80000000),0x10000,0x80000,0x10000,0x1f68000};
896 const int32_t QueryParser::jj_la1_1[] = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x0,0x0,0x0,0x0};
898 struct QueryParser::JJCalls {
901 [FILE:2469:patches/patch-src__core__CLucene__queryParser__QueryParserTokenManager.cpp]
902 --- src/core/CLucene/queryParser/QueryParserTokenManager.cpp.orig 2011-03-17 00:21:07 UTC
903 +++ src/core/CLucene/queryParser/QueryParserTokenManager.cpp
906 CL_NS_DEF(queryParser)
908 -const int64_t QueryParserTokenManager::jjbitVec2[]={0x0L, 0x0L, _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff)};
909 +const int64_t QueryParserTokenManager::jjbitVec2[]={0x0L, 0x0L, int64_t(_ILONGLONG(0xffffffffffffffff)), int64_t(_ILONGLONG(0xffffffffffffffff))};
910 const int64_t QueryParserTokenManager::jjbitVec0[] = {
911 - _ILONGLONG(0xfffffffffffffffe), _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff)
912 + int64_t(_ILONGLONG(0xfffffffffffffffe)), int64_t(_ILONGLONG(0xffffffffffffffff)), int64_t(_ILONGLONG(0xffffffffffffffff)), int64_t(_ILONGLONG(0xffffffffffffffff))
914 const int32_t QueryParserTokenManager::jjnextStates[]={
915 15, 17, 18, 29, 32, 23, 33, 30, 20, 21, 32, 23, 33, 31, 34, 27,
916 @@ -544,7 +544,10 @@ int32_t QueryParserTokenManager::jjMoveN
920 - if ((i = jjnewStateCnt) == (startsAt = 36 - (jjnewStateCnt = startsAt)))
922 + jjnewStateCnt = startsAt;
923 + startsAt = 36 - jjnewStateCnt;
926 try { curChar = input_stream->readChar(); }
927 catch(CLuceneError& e) {
928 @@ -756,7 +759,10 @@ int32_t QueryParserTokenManager::jjMoveN
932 - if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt)))
934 + jjnewStateCnt = startsAt;
935 + startsAt = 7 - jjnewStateCnt;
938 try { curChar = input_stream->readChar(); }
939 catch(CLuceneError& e) {
940 @@ -854,7 +860,10 @@ int32_t QueryParserTokenManager::jjMoveN
944 - if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
946 + jjnewStateCnt = startsAt;
947 + startsAt = 3 - jjnewStateCnt;
950 try { curChar = input_stream->readChar(); }
951 catch(CLuceneError& e) {
952 @@ -1066,7 +1075,10 @@ int32_t QueryParserTokenManager::jjMoveN
956 - if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt)))
958 + jjnewStateCnt = startsAt;
959 + startsAt = 7 - jjnewStateCnt;
962 try { curChar = input_stream->readChar(); }
963 catch(CLuceneError& e) {
966 [FILE:412:patches/patch-src__core__CLucene__queryParser__legacy__Lexer.cpp]
967 --- src/core/CLucene/queryParser/legacy/Lexer.cpp.orig 2011-03-17 00:21:07 UTC
968 +++ src/core/CLucene/queryParser/legacy/Lexer.cpp
969 @@ -117,7 +117,7 @@ bool Lexer::GetNextToken(QueryToken* tok
970 if( _istspace(ch)!=0 ) {
973 - TCHAR buf[2] = {ch,'\0'};
974 + TCHAR buf[2] = {TCHAR(ch),'\0'};
977 token->set(buf, QueryToken::PLUS);
980 [FILE:696:patches/patch-src__core__CLucene__search__ConstantScoreQuery.cpp]
981 --- src/core/CLucene/search/ConstantScoreQuery.cpp.orig 2011-03-17 00:21:07 UTC
982 +++ src/core/CLucene/search/ConstantScoreQuery.cpp
983 @@ -25,14 +25,17 @@ class ConstantScorer : public Scorer {
985 const float_t theScore;
990 ConstantScorer(Similarity* similarity, IndexReader* reader, Weight* w, Filter* filter) : Scorer(similarity),
991 bits(filter->bits(reader)), theScore(w->getValue()), _doc(-1)
993 + shouldDelete = filter->shouldDeleteBitSet(bits);
995 virtual ~ConstantScorer() {
1004 [FILE:349:patches/patch-src__core__CLucene__store__FSDirectory.cpp]
1005 --- src/core/CLucene/store/FSDirectory.cpp.orig 2011-03-17 00:21:07 UTC
1006 +++ src/core/CLucene/store/FSDirectory.cpp
1007 @@ -219,9 +219,8 @@ CL_NS_USE(util)
1008 _CLDECDELETE(handle);
1010 //printf("handle=%d\n", handle->__cl_refcount);
1015 + if ( !dounlock ) {
1021 [FILE:435:patches/patch-src__core__CLucene__store__IndexInput.cpp]
1022 --- src/core/CLucene/store/IndexInput.cpp.orig 2011-03-17 00:21:07 UTC
1023 +++ src/core/CLucene/store/IndexInput.cpp
1024 @@ -41,8 +41,8 @@ CL_NS_USE(util)
1027 int64_t IndexInput::readLong() {
1028 - int64_t i = ((int64_t)readInt() << 32);
1029 - return (i | ((int64_t)readInt() & 0xFFFFFFFFL));
1030 + uint64_t i = ((uint64_t)readInt() << 32);
1031 + return (i | ((uint64_t)readInt() & 0xFFFFFFFFL));
1034 int64_t IndexInput::readVLong() {
1037 [FILE:2407:patches/patch-src__core__CLucene__util__BitSet.cpp]
1038 --- src/core/CLucene/util/BitSet.cpp.orig 2011-03-17 00:21:07 UTC
1039 +++ src/core/CLucene/util/BitSet.cpp
1040 @@ -32,6 +32,25 @@ const uint8_t BitSet::BYTE_COUNTS[256] =
1041 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
1042 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8};
1044 +const uint8_t BitSet::BYTE_OFFSETS[256] = {
1045 + 8, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1046 + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1047 + 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1048 + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1049 + 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1050 + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1051 + 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1052 + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1053 + 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1054 + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1055 + 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1056 + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1057 + 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1058 + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1059 + 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
1060 + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0};
1063 BitSet::BitSet( const BitSet& copy ) :
1064 _size( copy._size ),
1066 @@ -180,19 +199,32 @@ BitSet* BitSet::clone() const {
1067 return factor * (4 + (8+40)*count()) < size();
1070 - int32_t BitSet::nextSetBit(int32_t fromIndex) const {
1071 + int32_t BitSet::nextSetBit(int32_t fromIndex) const
1074 _CLTHROWT(CL_ERR_IndexOutOfBounds, _T("fromIndex < 0"));
1076 if (fromIndex >= _size)
1080 - if ((bits[fromIndex >> 3] & (1 << (fromIndex & 7))) != 0)
1082 - if (++fromIndex == _size)
1084 + int _max = ( _size+7 ) >> 3;
1086 + unsigned int i = (int)( fromIndex>>3 );
1087 + unsigned int subIndex = fromIndex & 0x7; // index within the byte
1088 + uint8_t byte = bits[i] >> subIndex; // skip all the bits to the right of index
1092 + return ( ( i<<3 ) + subIndex + BYTE_OFFSETS[ byte ] );
1095 + while( ++i < _max )
1099 + return ( ( i<<3 ) + BYTE_OFFSETS[ byte ] );
1107 [FILE:438:patches/patch-src__core__CLucene__util__BitSet.h]
1108 --- src/core/CLucene/util/BitSet.h.orig 2011-03-17 00:21:07 UTC
1109 +++ src/core/CLucene/util/BitSet.h
1110 @@ -39,6 +39,7 @@ class CLUCENE_EXPORT BitSet:LUCENE_BASE
1111 /** Indicates if the bit vector is sparse and should be saved as a d-gaps list, or dense, and should be saved as a bit set. */
1113 static const uint8_t BYTE_COUNTS[256];
1114 + static const uint8_t BYTE_OFFSETS[256];
1116 BitSet( const BitSet& copy );
1120 [FILE:806:patches/patch-src__core__CLucene__util__MD5Digester.cpp]
1121 --- src/core/CLucene/util/MD5Digester.cpp.orig 2011-03-17 00:21:07 UTC
1122 +++ src/core/CLucene/util/MD5Digester.cpp
1123 @@ -72,18 +72,16 @@ static unsigned char PADDING[64] =
1124 // PrintMD5: Converts a completed md5 digest into a char* string.
1125 char* PrintMD5(uint8_t md5Digest[16])
1127 - char chBuffer[256];
1129 + const char toHex[] = "0123456789abcdef";
1130 + char chBuffer[16 * 2 + 1];
1133 - memset(chBuffer,0,256);
1134 - memset(chEach, 0, 10);
1136 for (nCount = 0; nCount < 16; nCount++)
1138 - cl_sprintf(chEach, 10, "%02x", md5Digest[nCount]);
1139 - strncat(chBuffer, chEach, sizeof(chEach));
1140 + chBuffer[nCount * 2] = toHex[(md5Digest[nCount] & 0xf0) >> 4];
1141 + chBuffer[nCount * 2 + 1] = toHex[md5Digest[nCount] & 0x0f];
1143 + chBuffer[nCount * 2] = '\0';
1145 return STRDUP_AtoA(chBuffer);
1149 [FILE:839:patches/patch-src__core__CLucene__util__VoidMap.h]
1150 --- src/core/CLucene/util/VoidMap.h.orig 2011-03-17 00:21:07 UTC
1151 +++ src/core/CLucene/util/VoidMap.h
1153 #include "CLucene/LuceneThreads.h"
1155 #if defined(_CL_HAVE_TR1_UNORDERED_MAP) && defined(_CL_HAVE_TR1_UNORDERED_SET)
1156 +#if defined(_LIBCPP_VERSION)
1157 + #include <unordered_map>
1158 + #include <unordered_set>
1160 #include <tr1/unordered_map>
1161 #include <tr1/unordered_set>
1163 #elif defined(_CL_HAVE_HASH_MAP) && defined(_CL_HAVE_HASH_SET)
1164 //hashing is all or nothing!
1166 @@ -83,7 +88,7 @@ public:
1167 _vt get( _kt k) const {
1168 const_iterator itr = base::find(k);
1169 if ( itr==base::end() )
1171 + return static_cast<_vt>(0);
1175 @@ -316,6 +321,7 @@ public:
1176 if ( _this::dk || _this::dv )
1185 [FILE:1093:patches/patch-src__core__CMakeLists.txt]
1186 --- src/core/CMakeLists.txt.orig 2011-03-17 00:21:07 UTC
1187 +++ src/core/CMakeLists.txt
1188 @@ -252,13 +252,13 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/
1189 set(CLUCENE_SOVERSION ${CLUCENE_SOVERSION})
1191 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/CLuceneConfig.cmake"
1192 - DESTINATION ${LIB_DESTINATION}/CLuceneConfig.cmake)
1193 + DESTINATION %%DATADIR%%)
1195 # install pkg-config file
1197 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libclucene-core.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libclucene-core.pc @ONLY)
1198 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libclucene-core.pc
1199 - DESTINATION ${LIB_DESTINATION}/pkgconfig )
1200 + DESTINATION libdata/pkgconfig )
1204 @@ -274,9 +274,6 @@ ELSE ( LUCENE_SYS_INCLUDES )
1205 install(FILES ${clucene-shared_BINARY_DIR}/CLucene/clucene-config.h
1206 DESTINATION include/CLucene
1207 COMPONENT development)
1208 - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CLuceneConfig.cmake
1209 - DESTINATION include/CLucene
1210 - COMPONENT development)
1211 ENDIF ( LUCENE_SYS_INCLUDES )
1216 [FILE:559:patches/patch-src__core__libclucene-core.pc.cmake]
1217 --- src/core/libclucene-core.pc.cmake.orig 2011-03-17 00:21:07 UTC
1218 +++ src/core/libclucene-core.pc.cmake
1219 @@ -6,6 +6,6 @@ includedir=${prefix}/include:${prefix}/i
1221 Description: CLucene - a C++ search engine, ported from the popular Apache Lucene
1222 Version: @CLUCENE_VERSION_MAJOR@.@CLUCENE_VERSION_MINOR@.@CLUCENE_VERSION_REVISION@.@CLUCENE_VERSION_PATCH@
1223 -Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core
1224 +Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core -lclucene-shared
1225 Cflags: -I${prefix}/include -I${prefix}/include/CLucene/ext
1229 [FILE:289:patches/patch-src__shared__CLucene__LuceneThreads.h]
1230 --- src/shared/CLucene/LuceneThreads.h.orig 2011-03-17 00:21:07 UTC
1231 +++ src/shared/CLucene/LuceneThreads.h
1233 #ifndef _LuceneThreads_h
1234 #define _LuceneThreads_h
1236 +#if defined(_CL_HAVE_PTHREAD)
1237 +#include <pthread.h>
1241 class CLuceneThreadIdCompare;
1244 [FILE:1062:patches/patch-src__shared__CMakeLists.txt]
1245 --- src/shared/CMakeLists.txt.orig 2011-03-17 00:21:07 UTC
1246 +++ src/shared/CMakeLists.txt
1247 @@ -42,7 +42,7 @@ INCLUDE (CheckAtomicFunctions)
1250 SET ( EXTRA_LIBS ${EXTRA_LIBS} ${ZLIB_LIBRARY} )
1251 -ELSEIF ( ZLIB_FOUND )
1252 +ELSE ( ZLIB_FOUND )
1253 MESSAGE( "ZLIB not found, using local: ${clucene-ext_SOURCE_DIR}/zlib" )
1254 SET(ZLIB_INCLUDE_DIR ${clucene-ext_SOURCE_DIR}/zlib )
1255 SET(ZLIB_LIBRARY ${clucene-ext_BINARY_DIR})
1256 @@ -62,7 +62,7 @@ CHECK_OPTIONAL_HEADERS ( string.h sys/ti
1257 stdint.h unistd.h io.h direct.h sys/dir.h sys/ndir.h dirent.h wctype.h fcntl.h
1258 stat.h sys/stat.h stdexcept errno.h fcntl.h windef.h windows.h wchar.h
1259 hash_map hash_set ext/hash_map ext/hash_map tr1/unordered_set tr1/unordered_map
1260 - sys/timeb.h tchar.h strings.h stdexcept sys/mman.h winerror.h )
1261 + tchar.h strings.h stdexcept sys/mman.h winerror.h )
1264 ########################################################################
1267 [FILE:470:patches/patch-src__shared__cmake__CheckHashmaps.cmake]
1268 --- src/shared/cmake/CheckHashmaps.cmake.orig 2011-03-17 00:21:07 UTC
1269 +++ src/shared/cmake/CheckHashmaps.cmake
1270 @@ -35,8 +35,12 @@ MACRO(HASHMAP_TEST HashingValue namespac
1271 #elif defined(_CL_HAVE_EXT_HASH_MAP)
1272 #include <ext/hash_map>
1273 #elif defined(_CL_HAVE_TR1_UNORDERED_MAP)
1274 +#if defined(_LIBCPP_VERSION)
1275 + #include <unordered_map>
1277 #include <tr1/unordered_map>
1281 ${namespace}::${_CL_HASH_MAP}<int,char> a;