From 5ed6ef6bf8e46192179cb0dc72ba7fa83e957c73 Mon Sep 17 00:00:00 2001 From: ayhanyalcinsoy Date: Thu, 2 Mar 2017 20:41:40 +0300 Subject: [PATCH] clucene:LO recommended dep --- programming/misc/clucene/actions.py | 33 +++++++++ .../clucene-2.3.3.4-contribs_lib-1.patch | 49 +++++++++++++ .../clucene/files/clucene-2.3.3.4-gcc6.patch | 24 +++++++ .../clucene-core-2.3.3.4-pkgconfig.patch | 12 ++++ .../files/clucene-core-2.3.3.4-usleep.patch | 11 +++ .../misc/clucene/files/clucene-debug.patch | 11 +++ .../clucene/files/clucene-gcc-atomics.patch | 31 +++++++++ .../clucene/files/clucene-multimap-put.patch | 10 +++ .../files/clucene-narrowing-conversions.patch | 25 +++++++ .../misc/clucene/files/clucene-warnings.patch | 54 +++++++++++++++ .../clucene/files/fix_zlib_detections.diff | 21 ++++++ programming/misc/clucene/pspec.xml | 68 +++++++++++++++++++ programming/misc/clucene/translations.xml | 14 ++++ 13 files changed, 363 insertions(+) create mode 100644 programming/misc/clucene/actions.py create mode 100644 programming/misc/clucene/files/clucene-2.3.3.4-contribs_lib-1.patch create mode 100644 programming/misc/clucene/files/clucene-2.3.3.4-gcc6.patch create mode 100644 programming/misc/clucene/files/clucene-core-2.3.3.4-pkgconfig.patch create mode 100644 programming/misc/clucene/files/clucene-core-2.3.3.4-usleep.patch create mode 100644 programming/misc/clucene/files/clucene-debug.patch create mode 100644 programming/misc/clucene/files/clucene-gcc-atomics.patch create mode 100644 programming/misc/clucene/files/clucene-multimap-put.patch create mode 100644 programming/misc/clucene/files/clucene-narrowing-conversions.patch create mode 100644 programming/misc/clucene/files/clucene-warnings.patch create mode 100644 programming/misc/clucene/files/fix_zlib_detections.diff create mode 100644 programming/misc/clucene/pspec.xml create mode 100644 programming/misc/clucene/translations.xml diff --git a/programming/misc/clucene/actions.py b/programming/misc/clucene/actions.py new file mode 100644 index 0000000000..8d6cc37cc8 --- /dev/null +++ b/programming/misc/clucene/actions.py @@ -0,0 +1,33 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import cmaketools +from pisi.actionsapi import pisitools +from pisi.actionsapi import get +from pisi.actionsapi import shelltools + + +def setup(): + shelltools.export("CFLAGS", "-lpthread") + shelltools.makedirs("build") + shelltools.cd("build") + cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \ + -DENABLE_ASCII_MODE=OFF \ + -DENABLE_PACKAGING=OFF \ + -DBUILD_CONTRIBS_LIB:BOOL=ON \ + -DLIB_DESTINATION:PATH=/usr/lib \ + -DLUCENE_SYS_INCLUDES:PATH=/usr/lib \ + -DDISABLE_MULTITHREADING=OFF", sourceDir="..") + +def build(): + shelltools.cd("build") + cmaketools.make() + +def install(): + shelltools.cd("build") + cmaketools.install() + shelltools.cd("..") + pisitools.dodoc("AUTHORS","README","COPYING","ChangeLog") diff --git a/programming/misc/clucene/files/clucene-2.3.3.4-contribs_lib-1.patch b/programming/misc/clucene/files/clucene-2.3.3.4-contribs_lib-1.patch new file mode 100644 index 0000000000..50c080be8e --- /dev/null +++ b/programming/misc/clucene/files/clucene-2.3.3.4-contribs_lib-1.patch @@ -0,0 +1,49 @@ +Submitted By: Igor Živković +Date: 2013-10-17 +Initial Package Version: 2.3.3.4 +Upstream Status: Reported +Origin: Debian +Description: Fixed building and installing of contribs-lib if specified by config. + +diff -Naur clucene-2.3.3.4.orig/CMakeLists.txt clucene-2.3.3.4/CMakeLists.txt +--- clucene-2.3.3.4.orig/CMakeLists.txt 2013-10-17 11:32:30.064546492 +0200 ++++ clucene-core-2.3.3.4/CMakeLists.txt 2013-10-17 11:33:58.559550441 +0200 +@@ -163,7 +163,7 @@ + SET(BUILD_CONTRIBS_LIB 1) + ENDIF ( BUILD_CONTRIBS ) + IF ( BUILD_CONTRIBS_LIB ) +- ADD_SUBDIRECTORY (src/contribs-lib EXCLUDE_FROM_ALL) ++ ADD_SUBDIRECTORY (src/contribs-lib) + ENDIF ( BUILD_CONTRIBS_LIB ) + + +diff -Naur clucene-2.3.3.4.orig/src/contribs-lib/CMakeLists.txt clucene-2.3.3.4/src/contribs-lib/CMakeLists.txt +--- clucene-2.3.3.4.orig/src/contribs-lib/CMakeLists.txt 2013-10-17 11:32:30.076546493 +0200 ++++ clucene-core-2.3.3.4/src/contribs-lib/CMakeLists.txt 2013-10-17 11:33:58.560550441 +0200 +@@ -106,9 +106,26 @@ + ) + TARGET_LINK_LIBRARIES(clucene-contribs-lib ${clucene_contrib_extra_libs}) + ++#install public headers. ++FOREACH(file ${HEADERS}) ++ get_filename_component(apath ${file} PATH) ++ get_filename_component(aname ${file} NAME) ++ file(RELATIVE_PATH relpath ${CMAKE_SOURCE_DIR}/src/contribs-lib ${apath}) ++ IF ( NOT aname MATCHES "^_.*" ) ++ install(FILES ${file} ++ DESTINATION include/${relpath} ++ COMPONENT development) ++ ENDIF ( NOT aname MATCHES "^_.*" ) ++ENDFOREACH(file) ++ + #set properties on the libraries + SET_TARGET_PROPERTIES(clucene-contribs-lib PROPERTIES + VERSION ${CLUCENE_VERSION} + SOVERSION ${CLUCENE_SOVERSION} + COMPILE_DEFINITIONS_DEBUG _DEBUG + ) ++ ++#and install library ++install(TARGETS clucene-contribs-lib ++ DESTINATION ${LIB_DESTINATION} ++ COMPONENT runtime ) diff --git a/programming/misc/clucene/files/clucene-2.3.3.4-gcc6.patch b/programming/misc/clucene/files/clucene-2.3.3.4-gcc6.patch new file mode 100644 index 0000000000..b0d87139c5 --- /dev/null +++ b/programming/misc/clucene/files/clucene-2.3.3.4-gcc6.patch @@ -0,0 +1,24 @@ +From b5a1b3488a72abd250cbd5d4dfbeac3e3739c237 Mon Sep 17 00:00:00 2001 +From: Hodorgasm +Date: Thu, 12 May 2016 20:38:12 -0400 +Subject: [PATCH] Support GCC-6 + +--- + src/shared/cmake/MacroCheckGccVisibility.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/shared/cmake/MacroCheckGccVisibility.cmake b/src/shared/cmake/MacroCheckGccVisibility.cmake +index 2022aa3..020f913 100644 +--- a/src/shared/cmake/MacroCheckGccVisibility.cmake ++++ b/src/shared/cmake/MacroCheckGccVisibility.cmake +@@ -15,7 +15,7 @@ macro(MACRO_CHECK_GCC_VISIBILITY GccVisibility) + # get the gcc version + exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info) + +- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}") ++ string (REGEX MATCH "[3456]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}") + if (NOT _gcc_version) + + # clang reports: clang version 1.1 (trunk 95754) +-- +2.8.2 diff --git a/programming/misc/clucene/files/clucene-core-2.3.3.4-pkgconfig.patch b/programming/misc/clucene/files/clucene-core-2.3.3.4-pkgconfig.patch new file mode 100644 index 0000000000..aff20d7b4a --- /dev/null +++ b/programming/misc/clucene/files/clucene-core-2.3.3.4-pkgconfig.patch @@ -0,0 +1,12 @@ +diff -up clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake.pkgconfig_sys_includes clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake +--- clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake.pkgconfig_sys_includes 2011-03-16 19:21:07.000000000 -0500 ++++ clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake 2012-03-19 09:01:00.689263954 -0500 +@@ -6,6 +6,6 @@ includedir=${prefix}/include:${prefix}/i + Name: libclucene + Description: CLucene - a C++ search engine, ported from the popular Apache Lucene + Version: @CLUCENE_VERSION_MAJOR@.@CLUCENE_VERSION_MINOR@.@CLUCENE_VERSION_REVISION@.@CLUCENE_VERSION_PATCH@ +-Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core +-Cflags: -I${prefix}/include -I${prefix}/include/CLucene/ext ++Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core -lclucene-shared ++Cflags: -I${prefix}/include -I${prefix}/include/CLucene/ext -I@LUCENE_SYS_INCLUDES@ + ~ diff --git a/programming/misc/clucene/files/clucene-core-2.3.3.4-usleep.patch b/programming/misc/clucene/files/clucene-core-2.3.3.4-usleep.patch new file mode 100644 index 0000000000..31eb09524d --- /dev/null +++ b/programming/misc/clucene/files/clucene-core-2.3.3.4-usleep.patch @@ -0,0 +1,11 @@ +diff -up clucene-core-2.3.3.4/src/test/search/TestIndexSearcher.cpp.usleep clucene-core-2.3.3.4/src/test/search/TestIndexSearcher.cpp +--- clucene-core-2.3.3.4/src/test/search/TestIndexSearcher.cpp.usleep 2011-03-16 19:21:07.000000000 -0500 ++++ clucene-core-2.3.3.4/src/test/search/TestIndexSearcher.cpp 2014-10-07 19:35:20.854480798 -0500 +@@ -4,6 +4,7 @@ + * Distributable under the terms of either the Apache License (Version 2.0) or + * the GNU Lesser General Public License, as specified in the COPYING file. + ------------------------------------------------------------------------------*/ ++#include + #include "test.h" + + DEFINE_MUTEX(searchMutex); diff --git a/programming/misc/clucene/files/clucene-debug.patch b/programming/misc/clucene/files/clucene-debug.patch new file mode 100644 index 0000000000..640454e2fb --- /dev/null +++ b/programming/misc/clucene/files/clucene-debug.patch @@ -0,0 +1,11 @@ +--- src/core/CLucene/index/TermInfosReader.cpp ++++ src/core/CLucene/index/TermInfosReader.cpp +@@ -111,7 +111,7 @@ + //destroy their elements + #ifdef _DEBUG + for ( int32_t i=0; i 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 )) + return __sync_add_and_fetch(theInteger, 1); + #else + SCOPED_LOCK_MUTEX(theInteger->THIS_LOCK) +@@ -193,7 +193,7 @@ + #endif + } + int32_t atomic_threads::atomic_decrement(_LUCENE_ATOMIC_INT *theInteger){ +- #ifdef _CL_HAVE_GCC_ATOMIC_FUNCTIONS ++ #if ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 )) + return __sync_sub_and_fetch(theInteger, 1); + #else + SCOPED_LOCK_MUTEX(theInteger->THIS_LOCK) +--- src/shared/CLucene/LuceneThreads.h 2012-02-23 12:36:28.388299322 +0000 ++++ src/shared/CLucene/LuceneThreads.h 2012-02-23 12:37:23.131885433 +0000 +@@ -70,7 +70,7 @@ + void NotifyAll(); + }; + +- #ifdef _CL_HAVE_GCC_ATOMIC_FUNCTIONS ++ #if ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 )) + #define _LUCENE_ATOMIC_INT uint32_t + #define _LUCENE_ATOMIC_INT_SET(x,v) x=v + #define _LUCENE_ATOMIC_INT_GET(x) x diff --git a/programming/misc/clucene/files/clucene-multimap-put.patch b/programming/misc/clucene/files/clucene-multimap-put.patch new file mode 100644 index 0000000000..36ed1fe22b --- /dev/null +++ b/programming/misc/clucene/files/clucene-multimap-put.patch @@ -0,0 +1,10 @@ +--- src/core/CLucene/util/VoidMap.h ++++ src/core/CLucene/util/VoidMap.h +@@ -316,6 +316,7 @@ public: + if ( _this::dk || _this::dv ) + _this::remove(k); + ++ (*this)[k] = v; + } + }; + diff --git a/programming/misc/clucene/files/clucene-narrowing-conversions.patch b/programming/misc/clucene/files/clucene-narrowing-conversions.patch new file mode 100644 index 0000000000..f0e971c55d --- /dev/null +++ b/programming/misc/clucene/files/clucene-narrowing-conversions.patch @@ -0,0 +1,25 @@ +--- src/core/CLucene/queryParser/QueryParser.cpp.sav 2011-03-17 01:21:07.000000000 +0100 ++++ src/core/CLucene/queryParser/QueryParser.cpp 2012-03-09 18:20:58.000000000 +0100 +@@ -79,7 +79,7 @@ + _T("") + }; + +-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}; ++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}; + 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}; + + struct QueryParser::JJCalls { +--- src/core/CLucene/queryParser/QueryParserTokenManager.cpp.sav 2011-03-17 01:21:07.000000000 +0100 ++++ src/core/CLucene/queryParser/QueryParserTokenManager.cpp 2012-03-09 18:20:24.000000000 +0100 +@@ -15,9 +15,9 @@ + + CL_NS_DEF(queryParser) + +-const int64_t QueryParserTokenManager::jjbitVec2[]={0x0L, 0x0L, _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff)}; ++const int64_t QueryParserTokenManager::jjbitVec2[]={0x0L, 0x0L, int64_t(_ILONGLONG(0xffffffffffffffff)), int64_t(_ILONGLONG(0xffffffffffffffff))}; + const int64_t QueryParserTokenManager::jjbitVec0[] = { +- _ILONGLONG(0xfffffffffffffffe), _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff) ++ int64_t(_ILONGLONG(0xfffffffffffffffe)), int64_t(_ILONGLONG(0xffffffffffffffff)), int64_t(_ILONGLONG(0xffffffffffffffff)), int64_t(_ILONGLONG(0xffffffffffffffff)) + }; + const int32_t QueryParserTokenManager::jjnextStates[]={ + 15, 17, 18, 29, 32, 23, 33, 30, 20, 21, 32, 23, 33, 31, 34, 27, diff --git a/programming/misc/clucene/files/clucene-warnings.patch b/programming/misc/clucene/files/clucene-warnings.patch new file mode 100644 index 0000000000..b9676d9026 --- /dev/null +++ b/programming/misc/clucene/files/clucene-warnings.patch @@ -0,0 +1,54 @@ +--- src/core/CLucene/analysis/AnalysisHeader.h 2012-02-22 12:37:22.531637934 +0000 ++++ src/core/CLucene/analysis/AnalysisHeader.h 2012-02-22 12:39:15.369916728 +0000 +@@ -7,6 +7,8 @@ + #ifndef _lucene_analysis_AnalysisHeader_ + #define _lucene_analysis_AnalysisHeader_ + ++#pragma GCC system_header ++ + #include "CLucene/index/Payload.h" + #include "CLucene/util/VoidList.h" + #include "CLucene/LuceneThreads.h" +--- src/core/CLucene/search/Searchable.h 2012-02-22 12:37:22.513637729 +0000 ++++ src/core/CLucene/search/Searchable.h 2012-02-22 12:38:51.073641550 +0000 +@@ -7,6 +7,7 @@ + #ifndef _lucene_search_Searcher_ + #define _lucene_search_Searcher_ + ++#pragma GCC system_header + + //#include "CLucene/index/IndexReader.h" + CL_CLASS_DEF(index,Term) +--- src/core/CLucene/store/IndexInput.h 2012-02-22 12:37:22.508637673 +0000 ++++ src/core/CLucene/store/IndexInput.h 2012-02-22 12:39:00.465747935 +0000 +@@ -7,6 +7,8 @@ + #ifndef _lucene_store_IndexInput_ + #define _lucene_store_IndexInput_ + ++#pragma GCC system_header ++ + #include "CLucene/LuceneThreads.h" + #include "CLucene/util/Equators.h" + +--- src/core/CLucene/util/Array.h 2012-02-22 12:37:22.510637696 +0000 ++++ src/core/CLucene/util/Array.h 2012-02-22 12:38:33.714444884 +0000 +@@ -7,6 +7,8 @@ + #ifndef _lucene_util_Array_ + #define _lucene_util_Array_ + ++#pragma GCC system_header ++ + #include + #include + +--- src/core/CLucene/util/PriorityQueue.h 2012-02-22 12:37:22.510637696 +0000 ++++ src/core/CLucene/util/PriorityQueue.h 2012-02-22 12:38:40.316519685 +0000 +@@ -7,6 +7,8 @@ + #ifndef _lucene_util_PriorityQueue_ + #define _lucene_util_PriorityQueue_ + ++#pragma GCC system_header ++ + #include + + CL_NS_DEF(util) diff --git a/programming/misc/clucene/files/fix_zlib_detections.diff b/programming/misc/clucene/files/fix_zlib_detections.diff new file mode 100644 index 0000000000..2b08883f59 --- /dev/null +++ b/programming/misc/clucene/files/fix_zlib_detections.diff @@ -0,0 +1,21 @@ +From: Veit Jahns +Date: Thu, 26 May 2011 11:35:28 +0000 (+0200) +Subject: Fixing ZLIB configuration in shared's CMakeLists +X-Git-Url: http://clucene.git.sourceforge.net/git/gitweb.cgi?p=clucene%2Fclucene;a=commitdiff_plain;h=772481ca94071ddfe65102a451926e4f9aeb4d2c;hp=a834f87bad3543b2a0331cef7202c15ded4245be + +Fixing ZLIB configuration in shared's CMakeLists +--- + +diff --git a/src/shared/CMakeLists.txt b/src/shared/CMakeLists.txt +index 68314a7..3d1975e 100644 +--- a/src/shared/CMakeLists.txt ++++ b/src/shared/CMakeLists.txt +@@ -42,7 +42,7 @@ INCLUDE (CheckAtomicFunctions) + find_package(ZLIB) + IF ( ZLIB_FOUND ) + SET ( EXTRA_LIBS ${EXTRA_LIBS} ${ZLIB_LIBRARY} ) +-ELSEIF ( ZLIB_FOUND ) ++ELSE ( ZLIB_FOUND ) + MESSAGE( "ZLIB not found, using local: ${clucene-ext_SOURCE_DIR}/zlib" ) + SET(ZLIB_INCLUDE_DIR ${clucene-ext_SOURCE_DIR}/zlib ) + SET(ZLIB_LIBRARY ${clucene-ext_BINARY_DIR}) diff --git a/programming/misc/clucene/pspec.xml b/programming/misc/clucene/pspec.xml new file mode 100644 index 0000000000..cf5460b531 --- /dev/null +++ b/programming/misc/clucene/pspec.xml @@ -0,0 +1,68 @@ + + + + + clucene + http://clucene.sourceforge.net + + PisiLinux Community + admins@pisilinux.org + + LGPLv2.1 + Apache-2.0 + library + A high-performance indexing and searching API + CLucene is a high-performance, scalable, cross platform, full-featured, open-source indexing and searching API. It is written in C++. + http://downloads.sourceforge.net/clucene/clucene-core-2.3.3.4.tar.gz + + boost-devel + cmake + zlib-devel + + + + clucene-2.3.3.4-gcc6.patch + + clucene-core-2.3.3.4-pkgconfig.patch + clucene-2.3.3.4-contribs_lib-1.patch + fix_zlib_detections.diff + clucene-core-2.3.3.4-usleep.patch + + clucene-warnings.patch + clucene-gcc-atomics.patch + clucene-debug.patch + clucene-narrowing-conversions.patch + clucene-multimap-put.patch + + + + + clucene + + /usr/lib + /usr/share + + + + + clucene-devel + Development files for clucene + + clucene + + + /usr/include + /usr/lib/pkgconfig + + + + + + 2017-03-02 + 2.3.3.4 + First Release + Ayhan Yalçınsoy + ayhanyalcinsoy@pisilinux.org + + + diff --git a/programming/misc/clucene/translations.xml b/programming/misc/clucene/translations.xml new file mode 100644 index 0000000000..2a7e1b980d --- /dev/null +++ b/programming/misc/clucene/translations.xml @@ -0,0 +1,14 @@ + + + + clucene + CLucene es una API para indexación y búsqueda de alta performance, escalable, cross plataforma, full-featured, código abierto. Está escrito en C++. + Yüksek performanslı bir indeksleme ve arama API'si + CLucene yüksek performanslı, ölçeklenebilir, platform bağımsız, çok özellikli, açık kaynak arama ve indeksleme programlama arayüzüdür. C++ ile yazılmıştır. + + + + clucene-devel + clucene için geliştirme dosyaları + +