mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
clucene: clean up package, enable x86_64.
* enable contrib libs for LibreOffice.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From bcd1d27ed66d195552d689c322a3bded92bbec5d Mon Sep 17 00:00:00 2001
|
||||
From 3089fbbe004c3c18ca50ff9f826560365446861d Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@gmail.com>
|
||||
Date: Sat, 8 Nov 2014 17:51:36 +0100
|
||||
Subject: Fix include paths.
|
||||
@@ -43,5 +43,258 @@ index 0ab402e..1055a4b 100644
|
||||
ENDFOREACH(file)
|
||||
|
||||
--
|
||||
1.8.3.4
|
||||
2.10.2
|
||||
|
||||
|
||||
From 6c14fd5afc029f1442e4edb082808f82a733b693 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 24 Mar 2017 23:25:58 +0100
|
||||
Subject: Fedora patches
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4950ddb..349ed75 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -163,7 +163,7 @@ IF ( BUILD_CONTRIBS )
|
||||
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 --git a/src/contribs-lib/CMakeLists.txt b/src/contribs-lib/CMakeLists.txt
|
||||
index c3cd213..7109e02 100644
|
||||
--- a/src/contribs-lib/CMakeLists.txt
|
||||
+++ b/src/contribs-lib/CMakeLists.txt
|
||||
@@ -106,9 +106,26 @@ add_library(clucene-contribs-lib SHARED
|
||||
)
|
||||
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/src/core/libclucene-core.pc.cmake b/src/core/libclucene-core.pc.cmake
|
||||
index 0152b25..c3f68e9 100644
|
||||
--- a/src/core/libclucene-core.pc.cmake
|
||||
+++ b/src/core/libclucene-core.pc.cmake
|
||||
@@ -6,6 +6,6 @@ includedir=${prefix}/include:${prefix}/include/CLucene/ext
|
||||
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@
|
||||
~
|
||||
--
|
||||
2.10.2
|
||||
|
||||
|
||||
From 5b0afa71b2cfd609dd1db919f8df8ddc527f872b Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 24 Mar 2017 23:32:16 +0100
|
||||
Subject: LibreOffice patches
|
||||
|
||||
|
||||
diff --git a/src/core/CLucene/analysis/AnalysisHeader.h b/src/core/CLucene/analysis/AnalysisHeader.h
|
||||
index f79d8bf..5c19675 100644
|
||||
--- a/src/core/CLucene/analysis/AnalysisHeader.h
|
||||
+++ b/src/core/CLucene/analysis/AnalysisHeader.h
|
||||
@@ -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"
|
||||
diff --git a/src/core/CLucene/index/TermInfosReader.cpp b/src/core/CLucene/index/TermInfosReader.cpp
|
||||
index 6ede797..ebbb315 100644
|
||||
--- a/src/core/CLucene/index/TermInfosReader.cpp
|
||||
+++ b/src/core/CLucene/index/TermInfosReader.cpp
|
||||
@@ -111,7 +111,7 @@ CL_NS_DEF(index)
|
||||
//destroy their elements
|
||||
#ifdef _DEBUG
|
||||
for ( int32_t i=0; i<indexTermsLength;++i ){
|
||||
- indexTerms[i].__cl_refcount--;
|
||||
+ indexTerms[i].__cl_decref();
|
||||
}
|
||||
#endif
|
||||
//Delete the arrays
|
||||
diff --git a/src/core/CLucene/queryParser/QueryParser.cpp b/src/core/CLucene/queryParser/QueryParser.cpp
|
||||
index 2f9df9a..aa1d4ab 100644
|
||||
--- a/src/core/CLucene/queryParser/QueryParser.cpp
|
||||
+++ b/src/core/CLucene/queryParser/QueryParser.cpp
|
||||
@@ -79,7 +79,7 @@ const TCHAR* QueryParserConstants::tokenImage[] = {
|
||||
_T("<RANGEEX_GOOP>")
|
||||
};
|
||||
|
||||
-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 {
|
||||
diff --git a/src/core/CLucene/queryParser/QueryParserTokenManager.cpp b/src/core/CLucene/queryParser/QueryParserTokenManager.cpp
|
||||
index 14de0cf..5d9eccf 100644
|
||||
--- a/src/core/CLucene/queryParser/QueryParserTokenManager.cpp
|
||||
+++ b/src/core/CLucene/queryParser/QueryParserTokenManager.cpp
|
||||
@@ -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/src/core/CLucene/search/Searchable.h b/src/core/CLucene/search/Searchable.h
|
||||
index 86ab605..dfbf78a 100644
|
||||
--- a/src/core/CLucene/search/Searchable.h
|
||||
+++ b/src/core/CLucene/search/Searchable.h
|
||||
@@ -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)
|
||||
diff --git a/src/core/CLucene/store/IndexInput.h b/src/core/CLucene/store/IndexInput.h
|
||||
index 8a43d59..8ab61c4 100644
|
||||
--- a/src/core/CLucene/store/IndexInput.h
|
||||
+++ b/src/core/CLucene/store/IndexInput.h
|
||||
@@ -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"
|
||||
|
||||
diff --git a/src/core/CLucene/util/Array.h b/src/core/CLucene/util/Array.h
|
||||
index 969426a..0f07137 100644
|
||||
--- a/src/core/CLucene/util/Array.h
|
||||
+++ b/src/core/CLucene/util/Array.h
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef _lucene_util_Array_
|
||||
#define _lucene_util_Array_
|
||||
|
||||
+#pragma GCC system_header
|
||||
+
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
diff --git a/src/core/CLucene/util/PriorityQueue.h b/src/core/CLucene/util/PriorityQueue.h
|
||||
index ac25cde..ddd5854 100644
|
||||
--- a/src/core/CLucene/util/PriorityQueue.h
|
||||
+++ b/src/core/CLucene/util/PriorityQueue.h
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef _lucene_util_PriorityQueue_
|
||||
#define _lucene_util_PriorityQueue_
|
||||
|
||||
+#pragma GCC system_header
|
||||
+
|
||||
#include <stdlib.h>
|
||||
|
||||
CL_NS_DEF(util)
|
||||
diff --git a/src/core/CLucene/util/VoidMap.h b/src/core/CLucene/util/VoidMap.h
|
||||
index b666dcf..61a597b 100644
|
||||
--- a/src/core/CLucene/util/VoidMap.h
|
||||
+++ b/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/src/shared/CLucene/LuceneThreads.h b/src/shared/CLucene/LuceneThreads.h
|
||||
index 97072ee..d32d131 100644
|
||||
--- a/src/shared/CLucene/LuceneThreads.h
|
||||
+++ b/src/shared/CLucene/LuceneThreads.h
|
||||
@@ -70,7 +70,7 @@ class CLuceneThreadIdCompare;
|
||||
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/src/shared/CLucene/config/threads.cpp b/src/shared/CLucene/config/threads.cpp
|
||||
index 0b5f30a..15e766d 100644
|
||||
--- a/src/shared/CLucene/config/threads.cpp
|
||||
+++ b/src/shared/CLucene/config/threads.cpp
|
||||
@@ -185,7 +185,7 @@ CL_NS_DEF(util)
|
||||
}
|
||||
|
||||
int32_t atomic_threads::atomic_increment(_LUCENE_ATOMIC_INT *theInteger){
|
||||
- #ifdef _CL_HAVE_GCC_ATOMIC_FUNCTIONS
|
||||
+ #if ( __GNUC__ > 4 ) || (( __GNUC__ == 4) && ( __GNUC_MINOR__ >= 4 ))
|
||||
return __sync_add_and_fetch(theInteger, 1);
|
||||
#else
|
||||
SCOPED_LOCK_MUTEX(theInteger->THIS_LOCK)
|
||||
@@ -193,7 +193,7 @@ CL_NS_DEF(util)
|
||||
#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)
|
||||
--
|
||||
2.10.2
|
||||
|
||||
|
||||
From ab2f5f09c47ce204f837f1326e020f4c311f87c2 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 24 Mar 2017 23:41:45 +0100
|
||||
Subject: Fix include path.
|
||||
|
||||
|
||||
diff --git a/src/contribs-lib/CMakeLists.txt b/src/contribs-lib/CMakeLists.txt
|
||||
index 7109e02..c6e8fb1 100644
|
||||
--- a/src/contribs-lib/CMakeLists.txt
|
||||
+++ b/src/contribs-lib/CMakeLists.txt
|
||||
@@ -113,7 +113,7 @@ FOREACH(file ${HEADERS})
|
||||
file(RELATIVE_PATH relpath ${CMAKE_SOURCE_DIR}/src/contribs-lib ${apath})
|
||||
IF ( NOT aname MATCHES "^_.*" )
|
||||
install(FILES ${file}
|
||||
- DESTINATION include/${relpath}
|
||||
+ DESTINATION develop/headers/${relpath}
|
||||
COMPONENT development)
|
||||
ENDIF ( NOT aname MATCHES "^_.*" )
|
||||
ENDFOREACH(file)
|
||||
--
|
||||
2.10.2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user