From nobody Fri Nov 24 11:24:21 2023 X-Original-To: dev-commits-ports-branches@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 4ScCLF6y0Lz51MSY; Fri, 24 Nov 2023 11:24:21 +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 4ScCLF54nVz4cYL; Fri, 24 Nov 2023 11:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700825061; 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=DjbeJBqasgVINzAHp9G8OBzE9SezX3OcEAhnaSKWDAk=; b=IRX1S3Q++pJGusQi04En1o+1bKGg4jo79M9/mb2JWYvn1JkYZ94DIfZVm5LPOI8OZobpRb OkP4Rids7gWvLX7tBn+i4nqbL9XkEngeJPzHeTazTxrFO04ZzGlZoCavBYe/xVYAEWBih4 WvZ/htPUNSkb/qh2d3o0CHXeLsr7finQ7aBQ97isNBYUOMDGlYjaEufcKL4MuMzIDAvpxM l1ihB5JSGcRw1zQ8oy8XbztZCxi0ByHWPz8D/fYHFgYIgxAiWuKUznveaZt36bkJ3H2Hn7 ABuZ+Z8RqeSRhXK+aKrDxftF2k91jUZseMpG3as73kTCnkgDaP2Ul9NMfgAU3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700825061; 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=DjbeJBqasgVINzAHp9G8OBzE9SezX3OcEAhnaSKWDAk=; b=OuZ7FOUL5EoCYxNtFuyYd2CMByRGK51WNN4RrJKQAuuPei3r1Tn+YuVTqvtxei9JvjjaC+ ClgO7ANOfiz4ZGS4xtm4u+msalTkwbqt2H3V99vTIP0PoBmpgL1Z6QZtyor5Mog9CGnCS3 SyhGCahpX9VWRsP4C55FFj3HzL+1lQi6V/PQmYBIp1yKSH+hvESkkemfyUk4XkTgSdLm9b HAa2KpJzEW+9TBMnX5XGWoFTQMwgX7u23a9sXsDnC3chFjNwAfblHfCRk8mR/p27b8YOLA 3kBWxw8KDLZ7cyOeuS98rn8nAk6/YPNI9+n8ihFQYV7eze+OqjvgL70qgDyFBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700825061; a=rsa-sha256; cv=none; b=FSVy2yV/uEDTCwPPWm0w0MFcCLnsqQtO8yFJOxp2RwBdIBgNvD/MT9z9m+9j+HC/Eo2hkP uH2Y+bjwLwaz2klhD1yrb0DWsImEEYhwPZrPoQfj4UnLfDtfPvkYejtDbGkm/hjjWsjIN9 UTvpa8b5VP7c7hjqsX0Pm18O06tM0tsCpYFOdOsTbMONjpJ615cDkQKUX+dXv+Up2qxi6n cH3WASt6t92xnZ+kt2PmTpOVuKkhaRFzyRQlrZqtxIL0MWLMximHlnG3NFNlRo3PaYNEDl fdbolMV+vuBoLTGUmLGmZxmhyoMN8QXTJTuspdWKyVLeCUqU3Lk8hreT5uHZrg== 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 4ScCLF48bzzjc8; Fri, 24 Nov 2023 11:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AOBOL7H048133; Fri, 24 Nov 2023 11:24:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AOBOL80048130; Fri, 24 Nov 2023 11:24:21 GMT (envelope-from git) Date: Fri, 24 Nov 2023 11:24:21 GMT Message-Id: <202311241124.3AOBOL80048130@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Fernando =?utf-8?Q?Apestegu=C3=ADa?= Subject: git: 284736b3ae3f - 2023Q4 - audio/audacity: Fix build in 12 and 13 List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: ports X-Git-Refname: refs/heads/2023Q4 X-Git-Reftype: branch X-Git-Commit: 284736b3ae3f7dc500bd2da7ccb073cf0de16ed3 Auto-Submitted: auto-generated The branch 2023Q4 has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=284736b3ae3f7dc500bd2da7ccb073cf0de16ed3 commit 284736b3ae3f7dc500bd2da7ccb073cf0de16ed3 Author: Tatsuki Makino AuthorDate: 2023-11-23 10:02:04 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2023-11-24 11:22:08 +0000 audio/audacity: Fix build in 12 and 13 Conditional workaround for the problem with old libc++ and the buggy implementation of std::conjunction Patch by tatsuki_makino@hotmail.com PR: 275192 (cherry picked from commit 01b1ed56de8dcd0622782b07ef6c4658e47ef071) --- audio/audacity/Makefile | 10 ++++-- .../files/extra-libraries_lib-utility_TypeList.cpp | 23 +++++++++++++ .../files/extra-libraries_lib-utility_TypeList.h | 39 ++++++++++++++++++++++ .../files/extra-libraries_lib-utility_TypeSwitch.h | 20 +++++++++++ 4 files changed, 89 insertions(+), 3 deletions(-) diff --git a/audio/audacity/Makefile b/audio/audacity/Makefile index 6e142376fd5d..9e5f84903705 100644 --- a/audio/audacity/Makefile +++ b/audio/audacity/Makefile @@ -10,9 +10,6 @@ MAINTAINER= xxjack12xx@gmail.com COMMENT= GUI editor for digital audio waveforms WWW= https://www.audacityteam.org/ -BROKEN_FreeBSD_13= compiler bug -BROKEN_FreeBSD_12= compiler bug - LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/LICENSE.txt @@ -158,6 +155,13 @@ CMAKE_ARGS+= -DHAVE_MMX:BOOL=OFF \ -DHAVE_SSE2:BOOL=OFF .endif +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1302508 +# Workarounds for buggy libc++ std::conjunction +EXTRA_PATCHES= ${PATCHDIR}/extra-libraries_lib-utility_TypeList.cpp \ + ${PATCHDIR}/extra-libraries_lib-utility_TypeList.h \ + ${PATCHDIR}/extra-libraries_lib-utility_TypeSwitch.h +.endif + post-install: @${RM} ${STAGEDIR}${DOCSDIR}/LICENSE.txt #delete empty directories: https://github.com/audacity/audacity/issues/808 diff --git a/audio/audacity/files/extra-libraries_lib-utility_TypeList.cpp b/audio/audacity/files/extra-libraries_lib-utility_TypeList.cpp new file mode 100644 index 000000000000..2575d8f5f745 --- /dev/null +++ b/audio/audacity/files/extra-libraries_lib-utility_TypeList.cpp @@ -0,0 +1,23 @@ +--- libraries/lib-utility/TypeList.cpp.orig 2023-11-16 11:58:21 UTC ++++ libraries/lib-utility/TypeList.cpp +@@ -118,16 +118,16 @@ static_assert(Is_v); + static_assert(Is_v); + + static_assert(Every_v, Example>); +-static_assert(is_base_of_v, Example>>); ++static_assert(TypeList::is_base_of_v, Example>>); + static_assert(!Every_v, Example>); +-static_assert(is_base_of_v, ++static_assert(TypeList::is_base_of_v, + Every, Example>>); + + static_assert(Some_v, Example>); +-static_assert(is_base_of_v, ++static_assert(TypeList::is_base_of_v, + Some, Example>>); + static_assert(!Some_v, Example>); +-static_assert(is_base_of_v, Example>>); ++static_assert(TypeList::is_base_of_v, Example>>); + + static_assert(NotEvery_v, Example>); + static_assert(NotAny_v, Example>); diff --git a/audio/audacity/files/extra-libraries_lib-utility_TypeList.h b/audio/audacity/files/extra-libraries_lib-utility_TypeList.h new file mode 100644 index 000000000000..dfc77dc2be3d --- /dev/null +++ b/audio/audacity/files/extra-libraries_lib-utility_TypeList.h @@ -0,0 +1,39 @@ +--- libraries/lib-utility/TypeList.h.orig 2023-11-16 11:58:21 UTC ++++ libraries/lib-utility/TypeList.h +@@ -54,6 +54,18 @@ namespace TypeList { + can make compound predicates out of simpler ones. + */ + ++template ++struct conjunction : std::true_type {}; ++ ++template ++struct conjunction<_Arg> : _Arg {}; ++ ++template ++struct conjunction<_Arg, _Args...> : std::conditional_t> {}; ++ ++template ++inline constexpr bool is_base_of_v = __is_base_of(_Bp, _Dp); ++ + //! standard in C++20; add a level of indirection to a type + template struct type_identity { using type = T; }; + +@@ -429,7 +441,7 @@ struct And { (private) + static constexpr bool value = Is_v, T>; + }; + public: +- template using typemap = typename std::conjunction< ++ template using typemap = typename TypeList::conjunction< + typename Predicate::template typemap, Rest + >; + }; +@@ -437,7 +449,7 @@ struct And { (private) + //! Derived from the Predicate, applied to the first of the types (often boolean + //! constant types), for which the value is false; or std::true_type + template struct Every +- : Apply_t> {}; ++ : Apply_t> {}; + //! The constant value in the corresponding type + template constexpr auto Every_v = + Every::value; diff --git a/audio/audacity/files/extra-libraries_lib-utility_TypeSwitch.h b/audio/audacity/files/extra-libraries_lib-utility_TypeSwitch.h new file mode 100644 index 000000000000..f0291a0356a8 --- /dev/null +++ b/audio/audacity/files/extra-libraries_lib-utility_TypeSwitch.h @@ -0,0 +1,20 @@ +--- libraries/lib-utility/TypeSwitch.h.orig 2023-11-16 11:58:21 UTC ++++ libraries/lib-utility/TypeSwitch.h +@@ -127,7 +127,7 @@ struct Executor { + // Case 1: Compatible, and invocable on the next function, giving + // another function, that accepts BaseClass: + struct Case1_; +- using Case1 = std::conjunction; ++ using Case1 = TypeList::conjunction; + struct Case1_ { + static constexpr bool value = std::is_invocable_v< + std::invoke_result_t, BaseClass&, Args&&...>; +@@ -135,7 +135,7 @@ struct Executor { + }; + + // Case 2: Invocable directly on the object +- struct Case2 : std::conjunction< ++ struct Case2 : TypeList::conjunction< + Compatible, std::negation, + std::is_invocable + > {