From nobody Fri Nov 24 08:13:39 2023 X-Original-To: dev-commits-ports-main@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 4Sc76C43vjz527LD; Fri, 24 Nov 2023 08:13:39 +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 4Sc76C3Ytsz3MhR; Fri, 24 Nov 2023 08:13:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700813619; 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=b+8SNWbdPsPwoPnlvFozQiHadnT7Yf7yeSN6mNynipg=; b=arcM12llzGzEH08cuzWI3mgOfaVBrpzqKxwUCuuewJYCQwyzA8TYwg0b2BX+jJtgTPNI7O /zqhVxG5v3WAl0YDzLBmocXDjOC1YHOWexspfmgZDnGEKVHedL6u+LvFCd33EunN9g0UAi s0x5VdEUhtS2w7benWk84AqTuhklQxBpLvAhpvPQjS5uYpWcsj2DebUXCn6urnKLdJJrZ6 6IlxI88gt33x0ppoFFCAL8gk5Yb3YZ+wg32UABMm73xhQiQ4c5K4RPrQSlmdw8vcUmGb6W 1o7K0bGQVNsHvikDJ+J4fA7LIAfErPF+Q3c822OsXeuaVMO0IhGi12ry2F+B6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700813619; 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=b+8SNWbdPsPwoPnlvFozQiHadnT7Yf7yeSN6mNynipg=; b=ZihB7WBogy/uxLLYbLXntFIVrpZcPeOjrBPJhUGhIivn2H1AYuabVh2fCvagnS1PvJBTNR 6K4DuRWJrG68LR9YL8qFvJiIgA2FDW3VQtFJpragyW5PUlxsn6lXDWjGdlaIfmOIhg1Sz/ zUdBsv1b/Sg/6dlNld+ApZ2uu9hvstXV6Z3LbLBX2Y8Zi2capf+dueniJ2DxZf03Yj9o/L GFtBrVNC2Dluujt5ClipbUClrGDm2e4LRTibBzWwY19Ul2wd9GrHghcvGTfd4JtliRRP3c 2mmJ4zatLVIU4m2+dvZgjQhkeYisa4ilMjFyFgO2O2gbi9h3jz4ShpAVl5QfnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700813619; a=rsa-sha256; cv=none; b=S3J0IPC1Nn34A+SLLFutodzduM0E5Yqn/BlIEZOJOzh8rK2ycNNGSf1n2k2v4coMR0fz+I OVKpb2MY/4VWrec0QcVdU/FF+4nTDojPuFoFEMc3KJM4pPXBdrlieekcgxPUsG/wZsi44E 5bw+l9Jez4PgPrOCJmxjF2fLyyP++vN+4/MhXUZNUKbvhgp0hb4ntyoIBQiEVJ4O1TEpUl oWtxbtkZkqJH/JusxeLtXOAndJEBvDYBs/7sBngmJY8aEG6zFMXAA+4Ps05jnF0nZIv37t SdixBE2DUjtLK6zwTGtrbkK4w0bqJU9Zj1dN+VcnjQcUhOEfxeDAZeicogjuNw== 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 4Sc76C2cJbzdGX; Fri, 24 Nov 2023 08:13:39 +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 3AO8DdBp029327; Fri, 24 Nov 2023 08:13:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AO8Ddkf029324; Fri, 24 Nov 2023 08:13:39 GMT (envelope-from git) Date: Fri, 24 Nov 2023 08:13:39 GMT Message-Id: <202311240813.3AO8Ddkf029324@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Fernando =?utf-8?Q?Apestegu=C3=ADa?= Subject: git: 01b1ed56de8d - main - audio/audacity: Fix build in 12 and 13 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@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/main X-Git-Reftype: branch X-Git-Commit: 01b1ed56de8dcd0622782b07ef6c4658e47ef071 Auto-Submitted: auto-generated The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=01b1ed56de8dcd0622782b07ef6c4658e47ef071 commit 01b1ed56de8dcd0622782b07ef6c4658e47ef071 Author: Tatsuki Makino AuthorDate: 2023-11-23 10:02:04 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2023-11-24 08:13:29 +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 --- 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 fd6239d386d4..5d441d67db12 100644 --- a/audio/audacity/Makefile +++ b/audio/audacity/Makefile @@ -8,9 +8,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 @@ -153,6 +150,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 + > {