forked from pool/lucene__
- export CMAKE_POLICY_VERSION_MINIMUM="3.5" to ignore cmakes
minimum version warnings OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/lucene++?expand=0&rev=25
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
67
lucene++-3.0.9-fix-boost1.85.patch
Normal file
67
lucene++-3.0.9-fix-boost1.85.patch
Normal file
@@ -0,0 +1,67 @@
|
||||
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 beac782..46156e3 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 51508b5..d92efbb 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();
|
||||
}
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
||||
129
lucene++-3.0.9-fix-linking-DefaultSimilarity.patch
Normal file
129
lucene++-3.0.9-fix-linking-DefaultSimilarity.patch
Normal file
File diff suppressed because one or more lines are too long
78
lucene++-3.0.9-migrate-to-boost-asio-io_context.patch
Normal file
78
lucene++-3.0.9-migrate-to-boost-asio-io_context.patch
Normal file
@@ -0,0 +1,78 @@
|
||||
From e6a376836e5c891577eae6369263152106b9bc02 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Heusel <christian@heusel.eu>
|
||||
Date: Tue, 21 Jan 2025 01:01:58 +0100
|
||||
Subject: [PATCH] Migrate to boost::asio::io_context
|
||||
|
||||
The code previously used the deprecated (and with bost 1.87.0 removed)
|
||||
`boost::asio::io_service`, which used to be an alias to `io_context`.
|
||||
The new version heavily changes the `io_context` API and therefore is no
|
||||
the old interface was removed.
|
||||
|
||||
Fixes https://github.com/luceneplusplus/LucenePlusPlus/issues/208
|
||||
|
||||
Signed-off-by: Christian Heusel <christian@heusel.eu>
|
||||
---
|
||||
include/lucene++/ThreadPool.h | 10 ++++++----
|
||||
src/core/util/ThreadPool.cpp | 9 +++++----
|
||||
2 files changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/include/lucene++/ThreadPool.h b/include/lucene++/ThreadPool.h
|
||||
index dc6446ff..175ac8ad 100644
|
||||
--- a/include/lucene++/ThreadPool.h
|
||||
+++ b/include/lucene++/ThreadPool.h
|
||||
@@ -14,7 +14,9 @@
|
||||
|
||||
namespace Lucene {
|
||||
|
||||
-typedef boost::shared_ptr<boost::asio::io_service::work> workPtr;
|
||||
+
|
||||
+typedef boost::asio::io_context io_context_t;
|
||||
+typedef boost::asio::executor_work_guard<io_context_t::executor_type> work_t;
|
||||
|
||||
/// A Future represents the result of an asynchronous computation. Methods are provided to check if the computation
|
||||
/// is complete, to wait for its completion, and to retrieve the result of the computation. The result can only be
|
||||
@@ -51,8 +53,8 @@ class ThreadPool : public LuceneObject {
|
||||
LUCENE_CLASS(ThreadPool);
|
||||
|
||||
protected:
|
||||
- boost::asio::io_service io_service;
|
||||
- workPtr work;
|
||||
+ io_context_t io_context;
|
||||
+ work_t work;
|
||||
boost::thread_group threadGroup;
|
||||
|
||||
static const int32_t THREADPOOL_SIZE;
|
||||
@@ -64,7 +66,7 @@ class ThreadPool : public LuceneObject {
|
||||
template <typename FUNC>
|
||||
FuturePtr scheduleTask(FUNC func) {
|
||||
FuturePtr future(newInstance<Future>());
|
||||
- io_service.post(boost::bind(&ThreadPool::execute<FUNC>, this, func, future));
|
||||
+ boost::asio::post(io_context, boost::bind(&ThreadPool::execute<FUNC>, this, func, future));
|
||||
return future;
|
||||
}
|
||||
|
||||
diff --git a/src/core/util/ThreadPool.cpp b/src/core/util/ThreadPool.cpp
|
||||
index 8086d8b1..116f521c 100644
|
||||
--- a/src/core/util/ThreadPool.cpp
|
||||
+++ b/src/core/util/ThreadPool.cpp
|
||||
@@ -14,15 +14,16 @@ Future::~Future() {
|
||||
|
||||
const int32_t ThreadPool::THREADPOOL_SIZE = 5;
|
||||
|
||||
-ThreadPool::ThreadPool() {
|
||||
- work.reset(new boost::asio::io_service::work(io_service));
|
||||
+ThreadPool::ThreadPool()
|
||||
+ :
|
||||
+ work(boost::asio::make_work_guard(io_context))
|
||||
+{
|
||||
for (int32_t i = 0; i < THREADPOOL_SIZE; ++i) {
|
||||
- threadGroup.create_thread(boost::bind(&boost::asio::io_service::run, &io_service));
|
||||
+ threadGroup.create_thread(boost::bind(&boost::asio::io_context::run, &io_context));
|
||||
}
|
||||
}
|
||||
|
||||
ThreadPool::~ThreadPool() {
|
||||
- work.reset(); // stop all threads
|
||||
threadGroup.join_all(); // wait for all competition
|
||||
}
|
||||
|
||||
3
lucene++-3.0.9.tar.gz
Normal file
3
lucene++-3.0.9.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4e69e29d5d79a976498ef71eab70c9c88c7014708be4450a9fda7780fe93584e
|
||||
size 2458287
|
||||
108
lucene++.changes
Normal file
108
lucene++.changes
Normal file
@@ -0,0 +1,108 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 7 08:10:23 UTC 2025 - Simon Lees <sflees@suse.de>
|
||||
|
||||
- export CMAKE_POLICY_VERSION_MINIMUM="3.5" to ignore cmakes
|
||||
minimum version warnings
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 8 20:39:19 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 3.0.9:
|
||||
* fix race conditions whe initializing static variables
|
||||
* build system fixes
|
||||
- add patch lucene++-3.0.9-fix-linking-DefaultSimilarity.patch
|
||||
- Drop patches merged upstream:
|
||||
* lucene++-3.0.8-fix-contrib-soname.patch
|
||||
* lucene++-3.0.8-fix-pc-libdir.patch
|
||||
* lucene++-3.0.8-fix-missing-headers.patch
|
||||
* lucene++-3.0.8-fix-cmake-issues.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 18 08:51:27 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add lucene++-3.0.9-migrate-to-boost-asio-io_context.patch
|
||||
* fix with boost 1.87
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 26 08:11:30 UTC 2024 - Ana Guerrero <ana.guerrero@suse.com>
|
||||
|
||||
- Fix build with boost 1.85, add patch lucene++-3.0.9-fix-boost1.85.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 12 12:55:45 UTC 2023 - Antoine Belvire <antoine.belvire@opensuse.org>
|
||||
|
||||
- Add explicit build dependency on libboost_atomic-devel: Fix build
|
||||
with older boost version (Leap 15.5).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 8 06:41:05 UTC 2021 - Hillwood Yang <hillwood@opensuse.org>
|
||||
|
||||
- Contrib headers should be installed, add lucene++-3.0.8-fix-missing-headers.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 21 20:00:18 UTC 2021 - antoine.belvire@opensuse.org
|
||||
|
||||
- Add CMake option to prevent installation of gtest files instead
|
||||
of removing them by hand.
|
||||
- Remove obsolete build dependency on subversion.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 16 16:43:36 UTC 2021 - antoine.belvire@opensuse.org
|
||||
|
||||
- Update to version 3.0.8:
|
||||
* No changelog provided.
|
||||
- Remove 0001-Fix-compilation-with-Boost-1.58.patch: Merged
|
||||
upstream.
|
||||
- Add some patches from upstream, mainly build system fixes:
|
||||
* lucene++-3.0.8-fix-contrib-soname.patch
|
||||
* lucene++-3.0.8-fix-pc-libdir.patch
|
||||
* lucene++-3.0.8-fix-cmake-issues.patch
|
||||
- Require CMake >= 3.5 to build.
|
||||
- Run test suite on build.
|
||||
- Add new cmake files to list of installed files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 26 18:09:24 UTC 2020 - antoine.belvire@opensuse.org
|
||||
|
||||
- Add some build dependencies (used to be implicitly pulled):
|
||||
* pkgconfig(bzip2)
|
||||
* pkgconfig(zlib)
|
||||
- Remove obsolete conditionals.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 1 14:51:41 UTC 2017 - adam.majer@suse.de
|
||||
|
||||
- use individual libboost-*-devel packages instead of boost-devel
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 19 20:35:16 UTC 2015 - astieger@suse.com
|
||||
|
||||
- fix build with boost 1.58, adding upstream patch
|
||||
0001-Fix-compilation-with-Boost-1.58.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 27 09:31:43 UTC 2015 - astieger@suse.com
|
||||
|
||||
- lucene++ 3.0.7:
|
||||
* no upstream changelog
|
||||
* remove patches now upstream:
|
||||
lucene++-3.0.6-fix_installing_headers.patch
|
||||
lucene++-3.0.6-multiarch.patch
|
||||
lucene++-3.0.6-pc_files_fix.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 19 19:34:10 UTC 2014 - andreas.stieger@gmx.de
|
||||
|
||||
- fixes for .pc files in lucene++-3.0.6-pc_files_fix.patch
|
||||
- add upstream patch lucene++-3.0.6-multiarch.patch to work with
|
||||
%cmake makro
|
||||
- fix build for openSUSE 12.3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 18 09:55:11 UTC 2014 - andreas.stieger@gmx.de
|
||||
|
||||
- lucene++ 3.0.6, a high-performance, full-featured text search
|
||||
engine written in C++,
|
||||
- upstream patches:
|
||||
* lucene++-3.0.6-pc_files_fix.patch - fix pkgconfig files
|
||||
* lucene++-3.0.6-fix_installing_headers.patch fix header install
|
||||
112
lucene++.spec
Normal file
112
lucene++.spec
Normal file
@@ -0,0 +1,112 @@
|
||||
#
|
||||
# spec file for package lucene++
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: lucene++
|
||||
Version: 3.0.9
|
||||
Release: 0
|
||||
Summary: A high-performance, full-featured text search engine written in C++
|
||||
License: Apache-2.0 OR LGPL-3.0-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://github.com/luceneplusplus/LucenePlusPlus
|
||||
Source: https://github.com/luceneplusplus/LucenePlusPlus/archive/rel_%{version}/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM lucene++-3.0.9-fix-cmake-issues.patch -- https://github.com/luceneplusplus/LucenePlusPlus/pull/203
|
||||
Patch4: lucene++-3.0.9-fix-boost1.85.patch
|
||||
# PATCH-FIX-UPSTREAM lucene++-3.0.9-migrate-to-boost-asio-io_context.patch -- https://github.com/luceneplusplus/LucenePlusPlus/pull/210
|
||||
Patch5: lucene++-3.0.9-migrate-to-boost-asio-io_context.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/luceneplusplus/LucenePlusPlus/pull/200
|
||||
Patch6: lucene++-3.0.9-fix-linking-DefaultSimilarity.patch
|
||||
BuildRequires: cmake >= 3.5
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libboost_atomic-devel
|
||||
BuildRequires: libboost_filesystem-devel
|
||||
BuildRequires: libboost_iostreams-devel
|
||||
BuildRequires: libboost_regex-devel
|
||||
BuildRequires: libboost_system-devel
|
||||
BuildRequires: libboost_thread-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(bzip2)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
|
||||
%description
|
||||
An up to date C++ port of the popular Java Lucene library, a high-performance, full-featured text search engine.
|
||||
|
||||
%package -n liblucene++0
|
||||
Summary: A high-performance, full-featured text search engine written in C++
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
%description -n liblucene++0
|
||||
An up to date C++ port of the popular Java Lucene library, a high-performance, full-featured text search engine.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for lucene++
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: liblucene++0 = %{version}
|
||||
|
||||
%description devel
|
||||
Development files for lucene++, a high-performance, full-featured text search engine written in C++
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n LucenePlusPlus-rel_%{version}
|
||||
|
||||
%build
|
||||
# Remove cmake4 error due to not setting
|
||||
# min cmake version - sflees.de
|
||||
export CMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
%cmake -DINSTALL_GTEST=OFF
|
||||
%make_build lucene++ lucene++-contrib
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
%check
|
||||
# Disable test failing with "config out of range"
|
||||
export skip_tests_filter=-$(echo \
|
||||
SortTest.testEmptyFieldSort \
|
||||
SortTest.testParallelMultiSort \
|
||||
ParallelMultiSearcherTest.testEmptyIndex \
|
||||
ParallelMultiSearcherTest.testFieldSelector \
|
||||
ParallelMultiSearcherTest.testNormalization \
|
||||
ParallelMultiSearcherTest.testCustomSimilarity \
|
||||
ParallelMultiSearcherTest.testDocFreq \
|
||||
%ifarch %{ix86} # Exclude known failing test on ix86 (https://github.com/luceneplusplus/LucenePlusPlus/issues/98)
|
||||
Boolean2Test.testRandomQueries \
|
||||
%endif
|
||||
%{nil} | tr ' ' ':')
|
||||
# Tweak path to allow lucene++-tester to find liblucene++ and libgtest
|
||||
export LD_LIBRARY_PATH="$PWD/build/src/core:$PWD/build/src/contrib:$PWD/build/lib"
|
||||
build/src/test/lucene++-tester --gtest_filter="${skip_tests_filter}"
|
||||
|
||||
%ldconfig_scriptlets -n liblucene++0
|
||||
|
||||
%files -n liblucene++0
|
||||
%{_libdir}/liblucene++.so.*
|
||||
%{_libdir}/liblucene++-contrib.so.*
|
||||
%license COPYING APACHE.license GPL.license LGPL.license
|
||||
%doc AUTHORS README* REQUESTS
|
||||
|
||||
%files devel
|
||||
%license COPYING APACHE.license GPL.license LGPL.license
|
||||
%{_includedir}/lucene++/
|
||||
%{_libdir}/cmake/liblucene++/
|
||||
%{_libdir}/cmake/liblucene++-contrib/
|
||||
%{_libdir}/liblucene++.so
|
||||
%{_libdir}/liblucene++-contrib.so
|
||||
%{_libdir}/pkgconfig/liblucene++.pc
|
||||
%{_libdir}/pkgconfig/liblucene++-contrib.pc
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user