pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/textproc/lucene++
Module Name: pkgsrc
Committed By: wiz
Date: Thu Jan 23 20:56:32 UTC 2025
Modified Files:
pkgsrc/textproc/lucene++: distinfo
Added Files:
pkgsrc/textproc/lucene++/patches: patch-include_lucene++_ThreadPool.h
patch-src_core_util_ThreadPool.cpp
Log Message:
lucene++: fix build with latest boost
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/textproc/lucene++/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/textproc/lucene++/patches/patch-include_lucene++_ThreadPool.h \
pkgsrc/textproc/lucene++/patches/patch-src_core_util_ThreadPool.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/textproc/lucene++/distinfo
diff -u pkgsrc/textproc/lucene++/distinfo:1.6 pkgsrc/textproc/lucene++/distinfo:1.7
--- pkgsrc/textproc/lucene++/distinfo:1.6 Sun Apr 21 17:28:32 2024
+++ pkgsrc/textproc/lucene++/distinfo Thu Jan 23 20:56:32 2025
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.6 2024/04/21 17:28:32 adam Exp $
+$NetBSD: distinfo,v 1.7 2025/01/23 20:56:32 wiz Exp $
BLAKE2s (lucene++-3.0.9.tar.gz) = 3dcc3352e3c0e1f13c093be12f982f6ef9107a9250884c22288fc568d7205f69
SHA512 (lucene++-3.0.9.tar.gz) = 220fe1b46518018d176ae16434f03b1453fc345d8d552a294d1af927ea4ab69a83ee4b03c82938e648edaa3e7064526ca047fc86e1c71743b0958b520d59e225
Size (lucene++-3.0.9.tar.gz) = 2458287 bytes
SHA1 (patch-CMakeLists.txt) = db25e72a4c4d5dc38b9c805b75bf7c4469f7029d
SHA1 (patch-cmake_cotire.cmake) = a0a8416e54054ae9c4871ed987f8a2cb51848daa
+SHA1 (patch-include_lucene++_ThreadPool.h) = f7038f90852b45ff4ffe9775cd2878150bb996a9
SHA1 (patch-src_core_store_MMapDirectory.cpp) = b71a9f30cef213beb8f777f5bcbde721281e5f6c
SHA1 (patch-src_core_util_FileUtils.cpp) = e77b05f575cdcc56d5e4b85fad8411b11b53be26
+SHA1 (patch-src_core_util_ThreadPool.cpp) = 6ce4b1f0333c420a83a69fe3f2d8e89acb51e3e2
Added files:
Index: pkgsrc/textproc/lucene++/patches/patch-include_lucene++_ThreadPool.h
diff -u /dev/null pkgsrc/textproc/lucene++/patches/patch-include_lucene++_ThreadPool.h:1.1
--- /dev/null Thu Jan 23 20:56:32 2025
+++ pkgsrc/textproc/lucene++/patches/patch-include_lucene++_ThreadPool.h Thu Jan 23 20:56:32 2025
@@ -0,0 +1,37 @@
+$NetBSD: patch-include_lucene++_ThreadPool.h,v 1.1 2025/01/23 20:56:32 wiz Exp $
+
+https://github.com/luceneplusplus/LucenePlusPlus/commit/e6a376836e5c891577eae6369263152106b9bc02
+
+--- include/lucene++/ThreadPool.h.orig 2024-02-18 18:18:26.000000000 +0000
++++ 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 @@ public:
+ 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 @@ public:
+ 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;
+ }
+
Index: pkgsrc/textproc/lucene++/patches/patch-src_core_util_ThreadPool.cpp
diff -u /dev/null pkgsrc/textproc/lucene++/patches/patch-src_core_util_ThreadPool.cpp:1.1
--- /dev/null Thu Jan 23 20:56:32 2025
+++ pkgsrc/textproc/lucene++/patches/patch-src_core_util_ThreadPool.cpp Thu Jan 23 20:56:32 2025
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_core_util_ThreadPool.cpp,v 1.1 2025/01/23 20:56:32 wiz Exp $
+
+https://github.com/luceneplusplus/LucenePlusPlus/commit/e6a376836e5c891577eae6369263152106b9bc02
+
+--- src/core/util/ThreadPool.cpp.orig 2024-02-18 18:18:26.000000000 +0000
++++ 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
+ }
+
Home |
Main Index |
Thread Index |
Old Index