[packages/lucene++] - fixes from git, updated dependencies

qboosh qboosh at pld-linux.org
Sun Oct 11 16:08:40 CEST 2026


commit 05c314d42bbe0e0ad76b45978e5e6b01dc38f419
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Oct 11 15:53:37 2026 +0200

    - fixes from git, updated dependencies

 lucene++-boost-asio-update.patch | 78 ++++++++++++++++++++++++++++++++++++++++
 lucene++-c++17.patch             | 40 +++++++++++++++++++++
 lucene++-swap-typos.patch        | 39 ++++++++++++++++++++
 lucene++.spec                    | 13 +++++--
 4 files changed, 168 insertions(+), 2 deletions(-)
---
diff --git a/lucene++.spec b/lucene++.spec
index 3020738..3ebf125 100644
--- a/lucene++.spec
+++ b/lucene++.spec
@@ -9,10 +9,15 @@ Group:		Libraries
 Source0:	https://github.com/luceneplusplus/LucenePlusPlus/archive/rel_%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	33da6751de47523e22e7a1beebd78c29
 Patch0:		boost-1.85.patch
+Patch1:		%{name}-boost-asio-update.patch
+Patch2:		%{name}-swap-typos.patch
+Patch3:		%{name}-c++17.patch
 URL:		https://github.com/luceneplusplus/LucenePlusPlus
 BuildRequires:	boost-devel
-BuildRequires:	cmake >= 2.8.6
+BuildRequires:	cmake >= 3.5
+BuildRequires:	libstdc++-devel >= 6:7
 BuildRequires:	pkgconfig
+BuildRequires:	rpmbuild(macros) >= 1.605
 BuildRequires:	subversion
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -30,6 +35,7 @@ Summary:	Development files for lucene++
 Summary(pl.UTF-8):	Pliki programistyczne lucene++
 Group:		Development/Libraries
 Requires:	%{name}%{?_isa} = %{version}-%{release}
+Requires:	libstdc++-devel >= 6:7
 
 %description devel
 Development files for lucene++, a high-performance, full-featured text
@@ -41,7 +47,10 @@ funkcjonalnego silnika wyszukiwania pełnotekstowego.
 
 %prep
 %setup -q -n LucenePlusPlus-rel_%{version}
-%patch -P 0 -p1
+%patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
 
 %build
 mkdir -p build
diff --git a/lucene++-boost-asio-update.patch b/lucene++-boost-asio-update.patch
new file mode 100644
index 0000000..9e91f22
--- /dev/null
+++ b/lucene++-boost-asio-update.patch
@@ -0,0 +1,78 @@
+From e6a376836e5c891577eae6369263152106b9bc02 Mon Sep 17 00:00:00 2001
+From: Christian Heusel <christian at 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 at 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
+ }
+ 
diff --git a/lucene++-c++17.patch b/lucene++-c++17.patch
new file mode 100644
index 0000000..f383a8d
--- /dev/null
+++ b/lucene++-c++17.patch
@@ -0,0 +1,40 @@
+From 6e678a9588a5828172bac71c713f6eed6cb0570d Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <locutusofborg at debian.org>
+Date: Mon, 8 Sep 2025 15:05:58 +0200
+Subject: [PATCH] Bump minimum std-version to 17, fixing FTBFS with new gcc-15
+ and googletest
+
+---
+ CMakeLists.txt                | 2 +-
+ src/test/gtest/CMakeLists.txt | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 280d74a6..3677c6d5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -47,7 +47,7 @@ include(dependencies)
+ include(Lucene++Docs)
+ 
+ # Enable C++11
+-set(CMAKE_CXX_STANDARD 11)
++set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ 
+ ####################################
+diff --git a/src/test/gtest/CMakeLists.txt b/src/test/gtest/CMakeLists.txt
+index 41b50f64..a451d0b6 100644
+--- a/src/test/gtest/CMakeLists.txt
++++ b/src/test/gtest/CMakeLists.txt
+@@ -11,9 +11,9 @@ project(googletest-distribution)
+ set(GOOGLETEST_VERSION 1.10.0)
+ 
+ if (CMAKE_VERSION VERSION_LESS "3.1")
+-  add_definitions(-std=c++11)
++  add_definitions(-std=c++17)
+ else()
+-  set(CMAKE_CXX_STANDARD 11)
++  set(CMAKE_CXX_STANDARD 17)
+   set(CMAKE_CXX_STANDARD_REQUIRED ON)
+   if(NOT CYGWIN)
+     set(CMAKE_CXX_EXTENSIONS OFF)
diff --git a/lucene++-swap-typos.patch b/lucene++-swap-typos.patch
new file mode 100644
index 0000000..03ea62f
--- /dev/null
+++ b/lucene++-swap-typos.patch
@@ -0,0 +1,39 @@
+From b77d1c7569e6f5f361bea4850829ae4e70e193ec Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= <vaclav at slavik.io>
+Date: Thu, 3 Apr 2025 18:39:55 +0200
+Subject: [PATCH] Fix compilation with clang-17
+
+Fix typos in Set<T>::swap() and Collection<T>::swap().
+
+Apparently, no compiler ever tried to compile these methods before.
+---
+ include/lucene++/Collection.h | 2 +-
+ include/lucene++/Set.h        | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/lucene++/Collection.h b/include/lucene++/Collection.h
+index 0263f3f1..aeefda5f 100644
+--- a/include/lucene++/Collection.h
++++ b/include/lucene++/Collection.h
+@@ -167,7 +167,7 @@ class Collection : public LuceneSync {
+     }
+ 
+     void swap(this_type& other) {
+-        container.swap(other->container);
++        container.swap(other.container);
+     }
+ 
+     TYPE& operator[] (int32_t pos) {
+diff --git a/include/lucene++/Set.h b/include/lucene++/Set.h
+index 7282cc96..b211d881 100644
+--- a/include/lucene++/Set.h
++++ b/include/lucene++/Set.h
+@@ -108,7 +108,7 @@ class Set : public LuceneSync {
+     }
+ 
+     void swap(this_type& other) {
+-        setContainer.swap(other->setContainer);
++        setContainer.swap(other.setContainer);
+     }
+ 
+     operator bool() const {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lucene++.git/commitdiff/fbc12aa2117f1a84a5f8f222ea0a8fbe85d160a3



More information about the pld-cvs-commit mailing list