From nobody Mon Jun 05 20:46:38 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QZlyQ3QxPz4b7hT; Mon, 5 Jun 2023 20:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QZlyQ2jRjz44D7; Mon, 5 Jun 2023 20:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685997998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W/ahvmhUkEtOTHbed5lwR04QCGUTPmXe92NBZnkTZTc=; b=vBoKXMkMdrWFz9CqMh9Ii5+uYZpO2q8wuHtdbCdesz4D6A5bVDP8GUNQ39ijpf4+Vqponr 1ibeXhI944qtyI/kXGhwWbr22bjHjrB3AHIgx6kK7OrDNgwBwAYpEHb0l/DgTIspsn24XK 2Bms3Qdbp9DpiFtNzyLuwYGHB+xwdVr5qwb77n+CRELtKkZVsYNKrgvEVujrTrkc4m9omk l5OR8Y/Svvdp1kmoEOTw4QNvCzf9G2kXz4sfYfkse1myTWXtpcTesVwC2CgGlw33Cdh28t /OlWm9HG+nlZYMeZ07TM5LNCsYKH5+ZmWWIyIMTDoGK5loB/1HMk3fgt3Y/5mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685997998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W/ahvmhUkEtOTHbed5lwR04QCGUTPmXe92NBZnkTZTc=; b=OiwVOYN2sP/omNl6QU/3iDfqjRhBA4mPNN1VcRX2EhKf39HWWkP9yC+UyVtotUmBMY8qBA s5o6I/d3KIOsthoG/6mK+dE+t811HJVNRAy1xnkvBycYGy2qBblO+C3ebq4FHxJ6Azhl3N z3GeFn5IQmfSdE9RNtYFhIJbBkm7IXnkSsKx/P3UwTH+u8e/ZaO07BJWQBjcKMIRonkjsX t4dDBH15QQpMrYqyzc6MIA58R0tTh6DKzfKWxop0BX/mVVxgNedxsGxTRraB1pHUS0X3Pz uiIF17ixQ+VIsqQTVSfZCO/EBAEiaC7OJq4V1oQJaBMLIxKwQ3IP95tv5rTkSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685997998; a=rsa-sha256; cv=none; b=H+V9QMHqASjmwSptO9LHhHU1243lv8wFOGmyM9QfoBWYKd6rfjXJBstDUzx/t18naLNfdq 9BJ5b88vW87tkUgePJlyxaVdFxTOr1IPJbNEcRhC9AflzasmLHJEIrJ9NFgmE7Yyj6/Cox O9CRhIZxcXPMpGUDEI8RP90VO9QvLs2tN0ThngCOINUcxSbmgWhXI6xlLGargNMk6s/kHi gohEHn011y8usedhk6+hKwSuefl1H6EdmiElB4kz3UIDBcOPyGYSOF/oNsUlV2fDjpUKoX xmifoBhohJ+z7gMwsBKGB572oKdys99ZBsTsHaLpoi0Mg7yQF8CpoZRURWVROw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QZlyQ1mtcz12Qb; Mon, 5 Jun 2023 20:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 355Kkcqc049770; Mon, 5 Jun 2023 20:46:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 355KkcN5049769; Mon, 5 Jun 2023 20:46:38 GMT (envelope-from git) Date: Mon, 5 Jun 2023 20:46:38 GMT Message-Id: <202306052046.355KkcN5049769@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: 36efbbee6de9 - main - textproc/clucene: apply gentoo patch for C++17 conformance List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36efbbee6de97066e076a994b05dcb076a4ca6c2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=36efbbee6de97066e076a994b05dcb076a4ca6c2 commit 36efbbee6de97066e076a994b05dcb076a4ca6c2 Author: Dimitry Andric AuthorDate: 2023-06-05 17:10:41 +0000 Commit: Dimitry Andric CommitDate: 2023-06-05 20:45:44 +0000 textproc/clucene: apply gentoo patch for C++17 conformance Some parts of CLucene use std::binary_function, which was deprecated in C++11, and has been completely removed as of C++17. This shows up while building libreoffice with clang >= 16 or gcc >= 11, because C++17 is the default standard now. Apply a diff from https://bugs.gentoo.org/869170 that fixes this, by removing usage of std::binary_function, and replacing it with typedefs. PR: 271846 Approved by: fluffy (maintainer) MFH: 2023Q2 --- textproc/clucene/Makefile | 2 +- textproc/clucene/files/patch-fix-binary-function | 147 +++++++++++++++++++++++ 2 files changed, 148 insertions(+), 1 deletion(-) diff --git a/textproc/clucene/Makefile b/textproc/clucene/Makefile index 811c85bafb4f..a048399054c8 100644 --- a/textproc/clucene/Makefile +++ b/textproc/clucene/Makefile @@ -1,6 +1,6 @@ PORTNAME= clucene PORTVERSION= 2.3.3.4 -PORTREVISION= 20 +PORTREVISION= 21 CATEGORIES= textproc MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-core-unstable/2.3 DISTNAME= ${PORTNAME}-core-${PORTVERSION} diff --git a/textproc/clucene/files/patch-fix-binary-function b/textproc/clucene/files/patch-fix-binary-function new file mode 100644 index 000000000000..3a79f266fd5b --- /dev/null +++ b/textproc/clucene/files/patch-fix-binary-function @@ -0,0 +1,147 @@ +Replace std::binary_function with typedefs (deprecated in c++11 and removed in c++17). +Bug: https://bugs.gentoo.org/869170 +--- src/core/CLucene/index/_Term.h ++++ src/core/CLucene/index/_Term.h +@@ -13,9 +13,12 @@ + CL_NS_DEF(index) + + +-class Term_Equals:public CL_NS_STD(binary_function) ++class Term_Equals + { + public: ++ using first_argument_type = const Term*; ++ using second_argument_type = const Term*; ++ using result_type = bool; + bool operator()( const Term* val1, const Term* val2 ) const{ + return val1->equals(val2); + } +--- src/core/CLucene/search/BooleanQuery.cpp ++++ src/core/CLucene/search/BooleanQuery.cpp +@@ -25,9 +25,12 @@ CL_NS_USE(index) + CL_NS_USE(util) + CL_NS_DEF(search) + +- class BooleanClause_Compare:public CL_NS_STD(binary_function) ++ class BooleanClause_Compare + { + public: ++ using first_argument_type = const BooleanClause*; ++ using second_argument_type = const BooleanClause*; ++ using result_type = bool; + bool operator()( const BooleanClause* val1, const BooleanClause* val2 ) const { + return val1->equals(val2); + } +--- src/core/CLucene/search/MultiPhraseQuery.cpp ++++ src/core/CLucene/search/MultiPhraseQuery.cpp +@@ -377,9 +377,12 @@ TCHAR* MultiPhraseQuery::toString(const TCHAR* f) const { + return buffer.giveBuffer(); + } + +-class TermArray_Equals:public CL_NS_STD(binary_function) ++class TermArray_Equals + { + public: ++ using first_argument_type = const Term**; ++ using second_argument_type = const Term**; ++ using result_type = bool; + bool operator()( CL_NS(util)::ArrayBase* val1, CL_NS(util)::ArrayBase* val2 ) const{ + if ( val1->length != val2->length ) + return false; +--- src/core/CLucene/util/Equators.h ++++ src/core/CLucene/util/Equators.h +@@ -22,21 +22,30 @@ CL_NS_DEF(util) + /** @internal */ + class CLUCENE_INLINE_EXPORT Equals{ + public: +- class CLUCENE_INLINE_EXPORT Int32:public CL_NS_STD(binary_function) ++ class CLUCENE_INLINE_EXPORT Int32 + { + public: ++ using first_argument_type = const int32_t*; ++ using second_argument_type = const int32_t*; ++ using result_type = bool; + bool operator()( const int32_t val1, const int32_t val2 ) const; + }; + +- class CLUCENE_INLINE_EXPORT Char:public CL_NS_STD(binary_function) ++ class CLUCENE_INLINE_EXPORT Char + { + public: ++ using first_argument_type = const char*; ++ using second_argument_type = const char*; ++ using result_type = bool; + bool operator()( const char* val1, const char* val2 ) const; + }; + #ifdef _UCS2 +- class CLUCENE_INLINE_EXPORT WChar: public CL_NS_STD(binary_function) ++ class CLUCENE_INLINE_EXPORT WChar + { + public: ++ using first_argument_type = const wchar_t*; ++ using second_argument_type = const wchar_t*; ++ using result_type = bool; + bool operator()( const wchar_t* val1, const wchar_t* val2 ) const; + }; + class CLUCENE_INLINE_EXPORT TChar: public WChar{ +@@ -48,9 +57,12 @@ public: + + + template +- class CLUCENE_INLINE_EXPORT Void:public CL_NS_STD(binary_function) ++ class CLUCENE_INLINE_EXPORT Void + { + public: ++ using first_argument_type = const void*; ++ using second_argument_type = const void*; ++ using result_type = bool; + bool operator()( _cl* val1, _cl* val2 ) const{ + return val1==val2; + } +--- src/core/CLucene/util/_Arrays.h ++++ src/core/CLucene/util/_Arrays.h +@@ -124,12 +124,14 @@ CL_NS_DEF(util) + + template +- class CLListEquals: +- public CL_NS_STD(binary_function) ++ class CLListEquals + { + typedef typename class1::const_iterator _itr1; + typedef typename class2::const_iterator _itr2; + public: ++ using first_argument_type = class1*; ++ using second_argument_type = class2*; ++ using result_type = bool; + CLListEquals(){ + } + bool equals( class1* val1, class2* val2 ) const{ +--- src/test/index/TestTermVectorsReader.cpp ++++ src/test/index/TestTermVectorsReader.cpp +@@ -93,17 +93,21 @@ CL_NS_USE(util); + } + }; + +- struct MyTCharCompare : +- public std::binary_function ++ struct MyTCharCompare + { ++ using first_argument_type = const TCHAR*; ++ using second_argument_type = const TCHAR*; ++ using result_type = bool; + bool operator () (const TCHAR* v1, const TCHAR* v2) const { + return _tcscmp(v1, v2) < 0; + } + }; + +- struct TestTokenCompare : +- public std::binary_function ++ struct TestTokenCompare + { ++ using first_argument_type = const TestToken*; ++ using second_argument_type = const TestToken*; ++ using result_type = bool; + bool operator () (const TestToken* t1, const TestToken* t2) const { + return t1->pos < t2->pos; + }