diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-05-17 22:42:16 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-05-18 00:12:03 +0700 |
commit | d9a458f2e56883a00d0097d1f79d3788902d482b (patch) | |
tree | b19bd95353fcbfc3f036bb18104125b23ff5d8af /libraries | |
parent | 88eb1db3f508318dc9f070284ededc585d680203 (diff) |
libraries/LucenePlusPlus: Updated for version 3.0.9.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
5 files changed, 93 insertions, 226 deletions
diff --git a/libraries/LucenePlusPlus/76dc90f2b65d81be018c499714ff11e121ba5585.patch b/libraries/LucenePlusPlus/76dc90f2b65d81be018c499714ff11e121ba5585.patch new file mode 100644 index 000000000000..05babf97a08d --- /dev/null +++ b/libraries/LucenePlusPlus/76dc90f2b65d81be018c499714ff11e121ba5585.patch @@ -0,0 +1,64 @@ +From c18ead2b0c4aa62af01450cb12353a0baa51411f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= <bero@lindev.ch> +Date: Wed, 27 Mar 2024 12:00:18 +0100 +Subject: [PATCH] Fix build with boost 1.85.0 + +boost::filesystem::wpath has been deprecated (and typedef-ed to +boost::filesystem::path) for a long time; it is removed from boost +starting with 1.85.0-beta1. + +Use boost::filesystem::path instead. + +boost/filesystem/convenience.hpp has been removed (and was being +included without being used anyway - its only use was indirectly +pulling in boost/filesystem/directory.hpp, which is actually used). + +Include boost/filesystem/directory.hpp directly instead. +--- + src/core/store/MMapDirectory.cpp | 2 +- + src/core/util/FileUtils.cpp | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/core/store/MMapDirectory.cpp b/src/core/store/MMapDirectory.cpp +index beac7828..46156e3a 100644 +--- a/src/core/store/MMapDirectory.cpp ++++ b/src/core/store/MMapDirectory.cpp +@@ -36,7 +36,7 @@ MMapIndexInput::MMapIndexInput(const String& path) { + bufferPosition = 0; + if (!path.empty()) { + try { +- file.open(boost::filesystem::wpath(path), _length); ++ file.open(boost::filesystem::path(path), _length); + } catch (...) { + boost::throw_exception(FileNotFoundException(path)); + } +diff --git a/src/core/util/FileUtils.cpp b/src/core/util/FileUtils.cpp +index 51508b57..d92efbb8 100644 +--- a/src/core/util/FileUtils.cpp ++++ b/src/core/util/FileUtils.cpp +@@ -5,9 +5,9 @@ + ///////////////////////////////////////////////////////////////////////////// + + #include "LuceneInc.h" +-#include <boost/filesystem/convenience.hpp> + #include <boost/filesystem/operations.hpp> + #include <boost/filesystem/path.hpp> ++#include <boost/filesystem/directory.hpp> + #include "LuceneThread.h" + #include "StringUtils.h" + #include "FileUtils.h" +@@ -128,12 +128,12 @@ String joinPath(const String& path, const String& file) { + } + + String extractPath(const String& path) { +- boost::filesystem::wpath parentPath(path.c_str()); ++ boost::filesystem::path parentPath(path.c_str()); + return parentPath.parent_path().wstring().c_str(); + } + + String extractFile(const String& path) { +- boost::filesystem::wpath fileName(path.c_str()); ++ boost::filesystem::path fileName(path.c_str()); + return fileName.filename().wstring().c_str(); + } + diff --git a/libraries/LucenePlusPlus/LucenePlusPlus.SlackBuild b/libraries/LucenePlusPlus/LucenePlusPlus.SlackBuild index aca15253162e..338cd26ea9d9 100644 --- a/libraries/LucenePlusPlus/LucenePlusPlus.SlackBuild +++ b/libraries/LucenePlusPlus/LucenePlusPlus.SlackBuild @@ -25,8 +25,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=LucenePlusPlus -VERSION=${VERSION:-3.0.8} -BUILD=${BUILD:-2} +VERSION=${VERSION:-3.0.9} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -76,8 +76,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -patch -p1 < $CWD/soname.patch - +patch -p1 < $CWD/a460863810b3a6a473780686e5d3fd70bf4378ba.patch +patch -p1 < $CWD/76dc90f2b65d81be018c499714ff11e121ba5585.patch mkdir -p build cd build cmake \ diff --git a/libraries/LucenePlusPlus/LucenePlusPlus.info b/libraries/LucenePlusPlus/LucenePlusPlus.info index 46b54dbfd10e..b9da9031e49f 100644 --- a/libraries/LucenePlusPlus/LucenePlusPlus.info +++ b/libraries/LucenePlusPlus/LucenePlusPlus.info @@ -1,8 +1,8 @@ PRGNAM="LucenePlusPlus" -VERSION="3.0.8" +VERSION="3.0.9" HOMEPAGE="https://github.com/luceneplusplus/LucenePlusPlus" -DOWNLOAD="https://github.com/luceneplusplus/LucenePlusPlus/archive/rel_3.0.8/LucenePlusPlus-rel_3.0.8.tar.gz" -MD5SUM="cb9b2e7cb37b7dd68c1e24a65c6eda9d" +DOWNLOAD="https://github.com/luceneplusplus/LucenePlusPlus/archive/rel_3.0.9/LucenePlusPlus-rel_3.0.9.tar.gz" +MD5SUM="33da6751de47523e22e7a1beebd78c29" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/libraries/LucenePlusPlus/a460863810b3a6a473780686e5d3fd70bf4378ba.patch b/libraries/LucenePlusPlus/a460863810b3a6a473780686e5d3fd70bf4378ba.patch new file mode 100644 index 000000000000..1c9d5681e450 --- /dev/null +++ b/libraries/LucenePlusPlus/a460863810b3a6a473780686e5d3fd70bf4378ba.patch @@ -0,0 +1,22 @@ +From f40f59c6e169b4e16b7a6439ecb26a629c6540d1 Mon Sep 17 00:00:00 2001 +From: Sergey Fedorov <vital.had@gmail.com> +Date: Thu, 14 Mar 2024 20:37:34 +0800 +Subject: [PATCH] Fix install path for liblucene++.pc + +--- + src/config/core/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/config/core/CMakeLists.txt b/src/config/core/CMakeLists.txt +index e5691f54..69cfefcc 100644 +--- a/src/config/core/CMakeLists.txt ++++ b/src/config/core/CMakeLists.txt +@@ -9,7 +9,7 @@ if(NOT WIN32) + install( + FILES + "${CMAKE_CURRENT_BINARY_DIR}/liblucene++.pc" +- DESTINATION "${LIB_DESTINATION}/pkgconfig") ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + endif() + + diff --git a/libraries/LucenePlusPlus/soname.patch b/libraries/LucenePlusPlus/soname.patch deleted file mode 100644 index d8ddf049558b..000000000000 --- a/libraries/LucenePlusPlus/soname.patch +++ /dev/null @@ -1,219 +0,0 @@ -commit 1cd2509ed74ae47965006d16de3c09db029b4efe -Author: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> -Date: Mon Jan 4 23:45:13 2021 +0100 - - Fix various cmake issues: - "CMAKE_INSTALL_FULL_LIBDIR" not being correctly evaluated and used - pkgconfig directory wrongly set to include instead of lib - cmake directory wrongly set to include instead of lib - core_libname contrib_libname PACKAGE_CMAKE_INSTALL_INCLUDEDIR PACKAGE_CMAKE_INSTALL_LIBDIR variables not being substituted to cmake.in files - cmake helpers not being correctly set - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 41de688..71dbbd5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -21,7 +21,7 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) - endif() - - set(LIB_DESTINATION -- "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE STRING "Define lib output directory name") -+ "${CMAKE_INSTALL_LIBDIR}" CACHE STRING "Define lib output directory name") - - - #################################### -diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt -index e5e6624..fe8e8b8 100644 ---- a/src/config/CMakeLists.txt -+++ b/src/config/CMakeLists.txt -@@ -1,16 +1,16 @@ - #################################### - # Set config vars - #################################### --set(core_libname, "lucene++") --set(contrib_libname, "lucene++-contrib") -+set(core_libname "lucene++") -+set(contrib_libname "lucene++-contrib") - - set( -- PACKAGE_CMAKE_INSTALL_INCLUDEDIR, -- "${lucene++_INCLUDE_DIR}/lucene++/") -+ PACKAGE_CMAKE_INSTALL_INCLUDEDIR -+ "${CMAKE_INSTALL_INCLUDEDIR}/lucene++/") - - set( -- PACKAGE_CMAKE_INSTALL_LIBDIR, -- "${LIB_INSTALL_DIR}/cmake") -+ PACKAGE_CMAKE_INSTALL_LIBDIR -+ "${LIB_DESTINATION}") - - - #################################### -diff --git a/src/config/contrib/CMakeLists.txt b/src/config/contrib/CMakeLists.txt -index c0dd86f..b4a4391 100644 ---- a/src/config/contrib/CMakeLists.txt -+++ b/src/config/contrib/CMakeLists.txt -@@ -9,7 +9,7 @@ if(NOT WIN32) - install( - FILES - "${CMAKE_CURRENT_BINARY_DIR}/liblucene++-contrib.pc" -- DESTINATION "include/pkgconfig") -+ DESTINATION "${LIB_DESTINATION}/pkgconfig") - endif() - - -@@ -19,7 +19,8 @@ endif() - configure_package_config_file( - "${CMAKE_CURRENT_SOURCE_DIR}/liblucene++-contribConfig.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/liblucene++-contribConfig.cmake" -- INSTALL_DESTINATION "${LIB_DESTINATION}/cmake") -+ INSTALL_DESTINATION "${LIB_DESTINATION}/cmake/liblucene++-contrib" -+ PATH_VARS contrib_libname PACKAGE_CMAKE_INSTALL_INCLUDEDIR PACKAGE_CMAKE_INSTALL_LIBDIR) - - write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/liblucene++-contribConfigVersion.cmake" -@@ -30,4 +31,4 @@ install( - FILES - "${CMAKE_CURRENT_BINARY_DIR}/liblucene++-contribConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/liblucene++-contribConfigVersion.cmake" -- DESTINATION "include/cmake") -+ DESTINATION "${LIB_DESTINATION}/cmake/liblucene++-contrib") -diff --git a/src/config/contrib/liblucene++-contribConfig.cmake.in b/src/config/contrib/liblucene++-contribConfig.cmake.in -index f92f683..85fdfd2 100644 ---- a/src/config/contrib/liblucene++-contribConfig.cmake.in -+++ b/src/config/contrib/liblucene++-contribConfig.cmake.in -@@ -20,6 +20,6 @@ if (NOT DEFINED set_and_check) - endif() - - --set_and_check(liblucene++-contrib_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/@contrib_libname@") --set_and_check(liblucene++-contrib_LIBRARY_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@") --set(liblucene++-contrib_LIBRARIES "@PACKAGE_CMAKE_INSTALL_LIBDIR@/@contrib_libname@") -+set_and_check(liblucene++-contrib_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") -+set_and_check(liblucene++-contrib_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@PACKAGE_CMAKE_INSTALL_LIBDIR@") -+set(liblucene++-contrib_LIBRARIES "@contrib_libname@") -diff --git a/src/config/core/CMakeLists.txt b/src/config/core/CMakeLists.txt -index a3eb17a..65376f5 100644 ---- a/src/config/core/CMakeLists.txt -+++ b/src/config/core/CMakeLists.txt -@@ -9,7 +9,7 @@ if(NOT WIN32) - install( - FILES - "${CMAKE_CURRENT_BINARY_DIR}/liblucene++.pc" -- DESTINATION "include/pkgconfig") -+ DESTINATION "${LIB_DESTINATION}/pkgconfig") - endif() - - -@@ -19,7 +19,8 @@ endif() - configure_package_config_file( - "${CMAKE_CURRENT_SOURCE_DIR}/liblucene++Config.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/liblucene++Config.cmake" -- INSTALL_DESTINATION "${LIB_DESTINATION}/cmake") -+ INSTALL_DESTINATION "${LIB_DESTINATION}/cmake/liblucene++" -+ PATH_VARS core_libname PACKAGE_CMAKE_INSTALL_INCLUDEDIR PACKAGE_CMAKE_INSTALL_LIBDIR) - - write_basic_package_version_file( - ${CMAKE_CURRENT_BINARY_DIR}/liblucene++ConfigVersion.cmake -@@ -30,4 +31,4 @@ install( - FILES - "${CMAKE_CURRENT_BINARY_DIR}/liblucene++Config.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/liblucene++ConfigVersion.cmake" -- DESTINATION "include/cmake") -+ DESTINATION "${LIB_DESTINATION}/cmake/liblucene++") -diff --git a/src/config/core/liblucene++Config.cmake.in b/src/config/core/liblucene++Config.cmake.in -index 89b48a3..574f812 100644 ---- a/src/config/core/liblucene++Config.cmake.in -+++ b/src/config/core/liblucene++Config.cmake.in -@@ -20,8 +20,8 @@ if (NOT DEFINED set_and_check) - endif() - - --set_and_check(liblucene++_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/@core_libname@") --set_and_check(liblucene++_LIBRARY_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@") --set(liblucene++_LIBRARIES "@PACKAGE_CMAKE_INSTALL_LIBDIR@/@core_libname@") -+set_and_check(liblucene++_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") -+set_and_check(liblucene++_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@PACKAGE_CMAKE_INSTALL_LIBDIR@") -+set(liblucene++_LIBRARIES "@core_libname@") - - - -commit 127492f1ab85fd74ab9f9dff0be5b0a63bf7c271 -Merge: df65bf5 fd9eaf1 -Author: Alan Wright <85800+alanw@users.noreply.github.com> -Date: Tue Dec 29 17:46:39 2020 +0000 - - Merge pull request #160 from Kakueeen/master - - fix a bug of ChineseTokenizer - - -commit fd9eaf10c49239d700af848062acc1d5efd54aa8 -Author: liuzhangjian <liuzhangjian@uniontech.com> -Date: Fri Dec 4 15:41:31 2020 +0800 - - Title:fix a bug of ChineseTokenizer - - Description:When I use ChineseAnalyzer for Chinese word segmentation, I find that English and numbers are treated as one word and I think they should be separated. - - RootCause:Null - - Solution: - -diff --git a/src/contrib/analyzers/common/analysis/cn/ChineseFilter.cpp b/src/contrib/analyzers/common/analysis/cn/ChineseFilter.cpp -index d2a19f3..8313445 100644 ---- a/src/contrib/analyzers/common/analysis/cn/ChineseFilter.cpp -+++ b/src/contrib/analyzers/common/analysis/cn/ChineseFilter.cpp -@@ -38,7 +38,7 @@ bool ChineseFilter::incrementToken() { - if (text.length() > 1) { - return true; - } -- } else if (UnicodeUtil::isOther(text[0])) { -+ } else if (UnicodeUtil::isOther(text[0]) || UnicodeUtil::isDigit(text[0])) { - // One Chinese character as one Chinese word. - // Chinese word extraction to be added later here. - return true; -diff --git a/src/contrib/analyzers/common/analysis/cn/ChineseTokenizer.cpp b/src/contrib/analyzers/common/analysis/cn/ChineseTokenizer.cpp -index 38bf987..3b4de74 100644 ---- a/src/contrib/analyzers/common/analysis/cn/ChineseTokenizer.cpp -+++ b/src/contrib/analyzers/common/analysis/cn/ChineseTokenizer.cpp -@@ -65,6 +65,7 @@ bool ChineseTokenizer::incrementToken() { - - length = 0; - start = offset; -+ bool last_is_en = false, last_is_num = false; - - while (true) { - wchar_t c; -@@ -82,11 +83,30 @@ bool ChineseTokenizer::incrementToken() { - c = ioBuffer[bufferIndex++]; - } - -- if (UnicodeUtil::isDigit(c) || UnicodeUtil::isLower(c) || UnicodeUtil::isUpper(c)) { -+ if (UnicodeUtil::isLower(c) || UnicodeUtil::isUpper(c)) { -+ if (last_is_num) { -+ --bufferIndex; -+ --offset; -+ return flush(); -+ } -+ -+ push(c); -+ if (length == MAX_WORD_LEN) { -+ return flush(); -+ } -+ last_is_en = true; -+ } else if (UnicodeUtil::isDigit(c)) { -+ if (last_is_en) { -+ --bufferIndex; -+ --offset; -+ return flush(); -+ } -+ - push(c); - if (length == MAX_WORD_LEN) { - return flush(); - } -+ last_is_num = true; - } else if (UnicodeUtil::isOther(c)) { - if (length > 0) { - --bufferIndex; |