external/clucene/UnpackedTarball_clucene.mk    |    1 
 external/clucene/patches/binary_function.patch |   34 +++++++++++++++++++++++++
 2 files changed, 35 insertions(+)

New commits:
commit f7b396e9ca102fb8a53cd17a9cff20dfb0791e55
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Nov 9 09:06:47 2021 +0100
Commit:     Stephan Bergmann <stephan.bergm...@collabora.com>
CommitDate: Mon Jul 21 11:19:49 2025 +0200

    external/clucene: Remove unnecessary uses of obsolete std::binary_function
    
    ...which has been removed from C++17.  libc++ and libstdc++ still silently
    support it, but MSVC needs an explicit -D_HAS_AUTO_PTR_ETC, and this change 
is a
    prerequisite to drop that global define again from
    solenv/gbuild/platform/com_MSC_defs.mk (it had been added there with
    61c88ae6945c241f5f2aeb844eeca0776b487132 "gbuild: always compile as C++17 
with
    MSVC 2017", but code including external/clucene, like
    helpcompiler/source/LuceneHelper.cxx, appears to be the only code relying on
    that global define)
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124900
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    (cherry picked from commit becbabbb785545af6a1799f5ecd445785534d478)
    Conflicts:
            external/clucene/UnpackedTarball_clucene.mk
    
    Change-Id: I512d56f833c516dba3874cb0b4ef5190a88d3faf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188102
    Tested-by: Stephan Bergmann <stephan.bergm...@collabora.com>
    Reviewed-by: Stephan Bergmann <stephan.bergm...@collabora.com>

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index a878947b0871..19107ae193ab 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
        external/clucene/patches/clucene-mutex.patch \
        external/clucene/patches/clucene-asan.patch \
        
external/clucene/patches/clucene-mixes-uptemplate-parameter-msvc-14.patch \
+       external/clucene/patches/binary_function.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/binary_function.patch 
b/external/clucene/patches/binary_function.patch
new file mode 100644
index 000000000000..5b6f8ece9bee
--- /dev/null
+++ b/external/clucene/patches/binary_function.patch
@@ -0,0 +1,34 @@
+--- src/core/CLucene/util/Equators.h
++++ src/core/CLucene/util/Equators.h
+@@ -22,19 +22,19 @@
+ /** @internal */
+ class CLUCENE_INLINE_EXPORT Equals{
+ public:
+-      class CLUCENE_INLINE_EXPORT Int32:public 
CL_NS_STD(binary_function)<const int32_t*,const int32_t*,bool>
++      class CLUCENE_INLINE_EXPORT Int32
+       {
+       public:
+               bool operator()( const int32_t val1, const int32_t val2 ) const;
+       };
+       
+-      class CLUCENE_INLINE_EXPORT Char:public 
CL_NS_STD(binary_function)<const char*,const char*,bool>
++      class CLUCENE_INLINE_EXPORT Char
+       {
+       public:
+               bool operator()( const char* val1, const char* val2 ) const;
+       };
+ #ifdef _UCS2
+-      class CLUCENE_INLINE_EXPORT WChar: public 
CL_NS_STD(binary_function)<const wchar_t*,const wchar_t*,bool>
++      class CLUCENE_INLINE_EXPORT WChar
+       {
+       public:
+               bool operator()( const wchar_t* val1, const wchar_t* val2 ) 
const;
+@@ -48,7 +48,7 @@
+ 
+ 
+     template<typename _cl>
+-      class CLUCENE_INLINE_EXPORT Void:public 
CL_NS_STD(binary_function)<const void*,const void*,bool>
++      class CLUCENE_INLINE_EXPORT Void
+       {
+       public:
+               bool operator()( _cl* val1, _cl* val2 ) const{

Reply via email to