commit:     6e2a1355dea10e09d9fb4d04320fb0913801cb89
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Tue May 21 16:57:07 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Tue May 21 16:57:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e2a1355

dev-cpp/lucene++: fixed compilation with boost 1.85

Closes: https://bugs.gentoo.org/932253
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../lucene++/files/lucene++-3.0.7-boost-1.85.patch | 64 ++++++++++++++++++++++
 dev-cpp/lucene++/lucene++-3.0.7-r3.ebuild          |  7 ++-
 2 files changed, 69 insertions(+), 2 deletions(-)

diff --git a/dev-cpp/lucene++/files/lucene++-3.0.7-boost-1.85.patch 
b/dev-cpp/lucene++/files/lucene++-3.0.7-boost-1.85.patch
new file mode 100644
index 000000000000..05babf97a08d
--- /dev/null
+++ b/dev-cpp/lucene++/files/lucene++-3.0.7-boost-1.85.patch
@@ -0,0 +1,64 @@
+From c18ead2b0c4aa62af01450cb12353a0baa51411f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= <[email protected]>
+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/dev-cpp/lucene++/lucene++-3.0.7-r3.ebuild 
b/dev-cpp/lucene++/lucene++-3.0.7-r3.ebuild
index 025c5aad888e..29cd859016d7 100644
--- a/dev-cpp/lucene++/lucene++-3.0.7-r3.ebuild
+++ b/dev-cpp/lucene++/lucene++-3.0.7-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -23,7 +23,10 @@ RDEPEND="${DEPEND}"
 
 DOCS=( AUTHORS README.rst )
 
-PATCHES=( "${FILESDIR}/${P}-boost-1.58.patch" )
+PATCHES=(
+       "${FILESDIR}/${P}-boost-1.58.patch"
+       "${FILESDIR}/${P}-boost-1.85.patch"
+)
 
 src_configure() {
        local mycmakeargs=(

Reply via email to