Skip to content

Commit 83d7342

Browse files
committed
luceneplusplus: pull in upstream fixes for boost <= 1.86
This isn't good enough to build with 1.87, but it's a piece of the puzzle. luceneplusplus/LucenePlusPlus#208
1 parent e08eb92 commit 83d7342

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

textproc/luceneplusplus/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
V = 3.0.8
22
PKGNAME = luceneplusplus-${V}
33
COMMENT = C++ port of the Java Lucene library, the text search engine
4+
REVISION = 0
45

56
GH_ACCOUNT = luceneplusplus
67
GH_PROJECT = LucenePlusPlus
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Fix build with boost >= 1.85
2+
https://github.com/luceneplusplus/LucenePlusPlus/pull/203
3+
4+
Index: src/core/store/MMapDirectory.cpp
5+
--- src/core/store/MMapDirectory.cpp.orig
6+
+++ src/core/store/MMapDirectory.cpp
7+
@@ -36,7 +36,7 @@ MMapIndexInput::MMapIndexInput(const String& path) {
8+
bufferPosition = 0;
9+
if (!path.empty()) {
10+
try {
11+
- file.open(boost::filesystem::wpath(path), _length);
12+
+ file.open(boost::filesystem::path(path), _length);
13+
} catch (...) {
14+
boost::throw_exception(FileNotFoundException(path));
15+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Fix build with boost >= 1.85
2+
https://github.com/luceneplusplus/LucenePlusPlus/pull/203
3+
4+
Index: src/core/util/FileUtils.cpp
5+
--- src/core/util/FileUtils.cpp.orig
6+
+++ src/core/util/FileUtils.cpp
7+
@@ -5,9 +5,9 @@
8+
/////////////////////////////////////////////////////////////////////////////
9+
10+
#include "LuceneInc.h"
11+
-#include <boost/filesystem/convenience.hpp>
12+
#include <boost/filesystem/operations.hpp>
13+
#include <boost/filesystem/path.hpp>
14+
+#include <boost/filesystem/directory.hpp>
15+
#include "LuceneThread.h"
16+
#include "StringUtils.h"
17+
#include "FileUtils.h"
18+
@@ -128,12 +128,12 @@ String joinPath(const String& path, const String& file
19+
}
20+
21+
String extractPath(const String& path) {
22+
- boost::filesystem::wpath parentPath(path.c_str());
23+
+ boost::filesystem::path parentPath(path.c_str());
24+
return parentPath.parent_path().wstring().c_str();
25+
}
26+
27+
String extractFile(const String& path) {
28+
- boost::filesystem::wpath fileName(path.c_str());
29+
+ boost::filesystem::path fileName(path.c_str());
30+
return fileName.filename().wstring().c_str();
31+
}
32+

0 commit comments

Comments
 (0)