summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-07-30 03:29:06 +0100
committerSam James <sam@gentoo.org>2022-07-30 03:29:06 +0100
commitfe27109c7a1359fd22d5f9f0cbe9d76919e2cea0 (patch)
treee925f93ae5bf629b11017c94d89903383449727a /dev-cpp/clucene/files
parentsys-kernel/gentoo-kernel-bin: Bump to 5.4.208 (diff)
downloadgentoo-fe27109c7a1359fd22d5f9f0cbe9d76919e2cea0.tar.gz
gentoo-fe27109c7a1359fd22d5f9f0cbe9d76919e2cea0.tar.bz2
gentoo-fe27109c7a1359fd22d5f9f0cbe9d76919e2cea0.zip
dev-cpp/clucene: fix build w/ libcxx
Use FreeBSD's patches. Closes: https://bugs.gentoo.org/862195 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp/clucene/files')
-rw-r--r--dev-cpp/clucene/files/clucene-2.3.3.4-libcxx.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/dev-cpp/clucene/files/clucene-2.3.3.4-libcxx.patch b/dev-cpp/clucene/files/clucene-2.3.3.4-libcxx.patch
new file mode 100644
index 000000000000..268b887f6d86
--- /dev/null
+++ b/dev-cpp/clucene/files/clucene-2.3.3.4-libcxx.patch
@@ -0,0 +1,48 @@
+https://bugs.gentoo.org/862195
+https://cgit.freebsd.org/ports/tree/textproc/clucene/files/patch-src__core__CLucene__index__DocumentsWriter.cpp
+https://cgit.freebsd.org/ports/plain/textproc/clucene/files/patch-src__core__CLucene__util__VoidMap.h
+--- a/src/core/CLucene/index/DocumentsWriter.cpp
++++ b/src/core/CLucene/index/DocumentsWriter.cpp
+@@ -125,7 +125,7 @@
+ if (this->postingsFreeListDW.values){
+ if (this->postingsFreeCountDW < this->postingsFreeListDW.length) {
+ memset(this->postingsFreeListDW.values + this->postingsFreeCountDW
+- , NULL
++ , 0
+ , sizeof(Posting*));
+ }
+ postingsFreeListDW.deleteUntilNULL();
+
+--- a/src/core/CLucene/util/VoidMap.h
++++ b/src/core/CLucene/util/VoidMap.h
+@@ -11,8 +11,13 @@
+ #include "CLucene/LuceneThreads.h"
+
+ #if defined(_CL_HAVE_TR1_UNORDERED_MAP) && defined(_CL_HAVE_TR1_UNORDERED_SET)
++#if defined(_LIBCPP_VERSION)
++ #include <unordered_map>
++ #include <unordered_set>
++#else
+ #include <tr1/unordered_map>
+ #include <tr1/unordered_set>
++#endif
+ #elif defined(_CL_HAVE_HASH_MAP) && defined(_CL_HAVE_HASH_SET)
+ //hashing is all or nothing!
+ #include <hash_map>
+@@ -83,7 +88,7 @@
+ _vt get( _kt k) const {
+ const_iterator itr = base::find(k);
+ if ( itr==base::end() )
+- return (_vt)NULL;
++ return static_cast<_vt>(0);
+ else
+ return itr->second;
+ }
+@@ -316,6 +321,7 @@
+ if ( _this::dk || _this::dv )
+ _this::remove(k);
+
++ (*this)[k] = v;;
+ }
+ };
+