summaryrefslogtreecommitdiff
path: root/dev-cpp/lucene++/files
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2025-04-09 07:52:49 +0100
committerSam James <sam@gentoo.org>2025-04-09 07:52:58 +0100
commit9c3ff286d44fe05e31c2cbcbca8552acc467335d (patch)
tree3851d7d3329e2d9ad6ebec63b0606cafcd2688b7 /dev-cpp/lucene++/files
parent870542214e67aa263ca5b3c92661f3c313a7825e (diff)
downloadgentoo-9c3ff286d44fe05e31c2cbcbca8552acc467335d.tar.gz
gentoo-9c3ff286d44fe05e31c2cbcbca8552acc467335d.tar.bz2
gentoo-9c3ff286d44fe05e31c2cbcbca8552acc467335d.zip
dev-cpp/lucene++: add 3.0.9
Closes: https://bugs.gentoo.org/946534 Closes: https://bugs.gentoo.org/947796 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp/lucene++/files')
-rw-r--r--dev-cpp/lucene++/files/lucene++-3.0.9-boost-1.87.patch81
-rw-r--r--dev-cpp/lucene++/files/lucene++-3.0.9-pkgconfig.patch24
2 files changed, 105 insertions, 0 deletions
diff --git a/dev-cpp/lucene++/files/lucene++-3.0.9-boost-1.87.patch b/dev-cpp/lucene++/files/lucene++-3.0.9-boost-1.87.patch
new file mode 100644
index 000000000000..8851e2a6749b
--- /dev/null
+++ b/dev-cpp/lucene++/files/lucene++-3.0.9-boost-1.87.patch
@@ -0,0 +1,81 @@
+https://github.com/luceneplusplus/LucenePlusPlus/commit/e6a376836e5c891577eae6369263152106b9bc02
+
+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
+ }
+
+
diff --git a/dev-cpp/lucene++/files/lucene++-3.0.9-pkgconfig.patch b/dev-cpp/lucene++/files/lucene++-3.0.9-pkgconfig.patch
new file mode 100644
index 000000000000..36fea7bb60dd
--- /dev/null
+++ b/dev-cpp/lucene++/files/lucene++-3.0.9-pkgconfig.patch
@@ -0,0 +1,24 @@
+https://github.com/luceneplusplus/LucenePlusPlus/commit/f40f59c6e169b4e16b7a6439ecb26a629c6540d1
+
+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()
+
+