summaryrefslogtreecommitdiff
path: root/textproc/libclucene/patches
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/libclucene/patches')
-rw-r--r--textproc/libclucene/patches/patch-CMakeLists.txt33
-rw-r--r--textproc/libclucene/patches/patch-src_CLucene_config_repl__tchar.h13
-rw-r--r--textproc/libclucene/patches/patch-src_CLucene_index_SegmentMerger.cpp13
-rw-r--r--textproc/libclucene/patches/patch-src_CLucene_search_FieldCacheImpl.cpp13
-rw-r--r--textproc/libclucene/patches/patch-src_CLucene_util_Arrays.h13
-rw-r--r--textproc/libclucene/patches/patch-src_contribs-lib_CMakeLists.txt32
6 files changed, 65 insertions, 52 deletions
diff --git a/textproc/libclucene/patches/patch-CMakeLists.txt b/textproc/libclucene/patches/patch-CMakeLists.txt
new file mode 100644
index 00000000000..8a978133334
--- /dev/null
+++ b/textproc/libclucene/patches/patch-CMakeLists.txt
@@ -0,0 +1,33 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2013/08/11 16:06:25 jaapb Exp $
+
+Pkgsrc rewrites CMAKE_MODULE_PATH and it ends up being composed of multiple
+paths. We need to use another variable here or the intended file name will
+be invalid. This software also includes its own versions of Boost and zlib.
+Do not use them.
+Also, if contribs-lib is built, install it.
+--- CMakeLists.txt.orig 2011-03-17 00:21:07.000000000 +0000
++++ CMakeLists.txt
+@@ -153,7 +153,6 @@ GET_BOOST_INCLUDE_PATH(_CL_BOOST_INCLUDE
+ INCLUDE_DIRECTORIES( ${_CL_BOOST_INCLUDE_PATH} )
+
+ #include the projects
+-ADD_SUBDIRECTORY (src/ext)
+ ADD_SUBDIRECTORY (src/shared)
+ ADD_SUBDIRECTORY (src/core)
+ ADD_SUBDIRECTORY (src/test)
+@@ -163,13 +162,13 @@ 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 )
+
+
+ #add uninstall command
+ CONFIGURE_FILE(
+- "${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in"
++ "${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+
diff --git a/textproc/libclucene/patches/patch-src_CLucene_config_repl__tchar.h b/textproc/libclucene/patches/patch-src_CLucene_config_repl__tchar.h
deleted file mode 100644
index b7f64700cd3..00000000000
--- a/textproc/libclucene/patches/patch-src_CLucene_config_repl__tchar.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-src_CLucene_config_repl__tchar.h,v 1.1 2013/04/30 22:29:39 joerg Exp $
-
---- src/CLucene/config/repl_tchar.h.orig 2013-04-28 04:24:47.000000000 +0000
-+++ src/CLucene/config/repl_tchar.h
-@@ -33,7 +33,7 @@
- #define _tcscpy wcscpy //copy a string to another string
- #define _tcsncpy wcsncpy //copy a specified amount of one string to another string.
- #define _tcscat wcscat //copy a string onto the end of the other string
-- #define _tcschr wcschr //find location of one character
-+ #define _tcschr ::std::wcschr //find location of one character
- #define _tcsstr wcsstr //find location of a string
- #define _tcslen wcslen //get length of a string
- #define _tcscmp wcscmp //case sensitive compare two strings
diff --git a/textproc/libclucene/patches/patch-src_CLucene_index_SegmentMerger.cpp b/textproc/libclucene/patches/patch-src_CLucene_index_SegmentMerger.cpp
deleted file mode 100644
index 7bf439a1e1c..00000000000
--- a/textproc/libclucene/patches/patch-src_CLucene_index_SegmentMerger.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-src_CLucene_index_SegmentMerger.cpp,v 1.1 2012/11/16 01:07:27 joerg Exp $
-
---- src/CLucene/index/SegmentMerger.cpp.orig 2012-11-13 16:35:06.000000000 +0000
-+++ src/CLucene/index/SegmentMerger.cpp
-@@ -249,7 +249,7 @@ int32_t SegmentMerger::mergeFields() {
- CND_CONDITION(fieldsWriter != NULL,"Memory allocation for fieldsWriter failed");
-
- try {
-- IndexReader* reader = NULL;
-+ reader = NULL;
- int32_t maxDoc = 0;
- //Iterate through all readers
- for (uint32_t i = 0; i < readers.size(); i++) {
diff --git a/textproc/libclucene/patches/patch-src_CLucene_search_FieldCacheImpl.cpp b/textproc/libclucene/patches/patch-src_CLucene_search_FieldCacheImpl.cpp
deleted file mode 100644
index d2c5014fdd9..00000000000
--- a/textproc/libclucene/patches/patch-src_CLucene_search_FieldCacheImpl.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-src_CLucene_search_FieldCacheImpl.cpp,v 1.1 2012/11/16 01:07:27 joerg Exp $
-
---- src/CLucene/search/FieldCacheImpl.cpp.orig 2012-11-13 16:37:37.000000000 +0000
-+++ src/CLucene/search/FieldCacheImpl.cpp
-@@ -414,7 +414,7 @@ FieldCacheImpl::FileEntry::FileEntry (co
- _CLDECDELETE(term);
-
- try {
-- Term* term = enumerator->term(false);
-+ term = enumerator->term(false);
- if (term == NULL) {
- _CLTHROWA(CL_ERR_Runtime,"no terms in field - cannot determine sort type"); //todo: make rich error: " + field + "
- }
diff --git a/textproc/libclucene/patches/patch-src_CLucene_util_Arrays.h b/textproc/libclucene/patches/patch-src_CLucene_util_Arrays.h
deleted file mode 100644
index c59b78ab4ef..00000000000
--- a/textproc/libclucene/patches/patch-src_CLucene_util_Arrays.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-src_CLucene_util_Arrays.h,v 1.1 2012/11/16 01:07:27 joerg Exp $
-
---- src/CLucene/util/Arrays.h.orig 2012-11-13 16:36:53.000000000 +0000
-+++ src/CLucene/util/Arrays.h
-@@ -151,7 +151,7 @@ CL_NS_DEF(util)
-
- _itr1 itr1 = val1->begin();
- _itr2 itr2 = val2->begin();
-- while ( --size >= 0 ){
-+ while ( size-- > 0 ){
- if ( !comp(*itr1,*itr2) )
- return false;
- itr1++;
diff --git a/textproc/libclucene/patches/patch-src_contribs-lib_CMakeLists.txt b/textproc/libclucene/patches/patch-src_contribs-lib_CMakeLists.txt
new file mode 100644
index 00000000000..e992c27c40e
--- /dev/null
+++ b/textproc/libclucene/patches/patch-src_contribs-lib_CMakeLists.txt
@@ -0,0 +1,32 @@
+$NetBSD: patch-src_contribs-lib_CMakeLists.txt,v 1.1 2013/08/11 16:06:25 jaapb Exp $
+
+Install contribs-lib if built.
+--- src/contribs-lib/CMakeLists.txt.orig 2011-03-17 00:21:07.000000000 +0000
++++ 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 )