From b71f9cdab150109edc8269a523b87f471b2baaf4 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 9 May 2013 18:26:16 +0300 Subject: Make clucene build against libc++ (at least the one in Xcode 4.6) (Note that we don't build successfully against libc++ currently; this is just a fix for the first issue that I came across when trying.) Change-Id: If8b594177434e96a8b51c372b26a72236b9b5f5e --- clucene/UnpackedTarball_clucene.mk | 1 + clucene/patches/clucene-libcpp.patch | 42 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 clucene/patches/clucene-libcpp.patch (limited to 'clucene') diff --git a/clucene/UnpackedTarball_clucene.mk b/clucene/UnpackedTarball_clucene.mk index ed3c900cdd84..bc11f6db6493 100644 --- a/clucene/UnpackedTarball_clucene.mk +++ b/clucene/UnpackedTarball_clucene.mk @@ -24,6 +24,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,clucene,0)) # http://sourceforge.net/mailarchive/message.php?msg_id=29143260 $(eval $(call gb_UnpackedTarball_add_patches,clucene,\ clucene/patches/clucene-debug.patch \ + clucene/patches/clucene-libcpp.patch \ clucene/patches/clucene-multimap-put.patch \ clucene/patches/clucene-narrowing-conversions.patch \ clucene/patches/clucene-nullptr.patch \ diff --git a/clucene/patches/clucene-libcpp.patch b/clucene/patches/clucene-libcpp.patch new file mode 100644 index 000000000000..35235212c795 --- /dev/null +++ b/clucene/patches/clucene-libcpp.patch @@ -0,0 +1,42 @@ +--- src/shared/CLucene/LuceneThreads.h ++++ src/shared/CLucene/LuceneThreads.h +@@ -7,6 +7,7 @@ + #ifndef _LuceneThreads_h + #define _LuceneThreads_h + ++#include "CLucene/config/_threads.h" + + CL_NS_DEF(util) + class CLuceneThreadIdCompare; +--- src/core/CLucene/util/VoidMap.h ++++ 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) ++#ifdef _LIBCPP_VERSION ++ #include ++ #include ++#else + #include + #include ++#endif + #elif defined(_CL_HAVE_HASH_MAP) && defined(_CL_HAVE_HASH_SET) + //hashing is all or nothing! + #include +--- src/shared/CLucene/config/repl_tchar.h ++++ src/shared/CLucene/config/repl_tchar.h +@@ -36,8 +36,13 @@ + #define _tcsncpy wcsncpy //copy a specified amount of one string to another string. + #define _tcscat wcscat //copy a string onto the end of the other string + #define _tcsncat wcsncat ++#if defined(_LIBCPP_VERSION) && defined(__APPLE__) ++ #define _tcschr ::wcschr //find location of one character ++ #define _tcsstr ::wcsstr //find location of a string ++#else + #define _tcschr wcschr //find location of one character + #define _tcsstr wcsstr //find location of a string ++#endif + #define _tcslen wcslen //get length of a string + #define _tcscmp wcscmp //case sensitive compare two strings + #define _tcsncmp wcsncmp //case sensitive compare two strings -- cgit