git: 610b011fb307 - main - devel/catch: Convert REINPLACE_CMD to patch file

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Wed, 25 Sep 2024 04:25:31 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=610b011fb307f0fd5c58d04632f09d1a5e1e9881

commit 610b011fb307f0fd5c58d04632f09d1a5e1e9881
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-09-25 04:13:16 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-09-25 04:22:26 +0000

    devel/catch: Convert REINPLACE_CMD to patch file
---
 devel/catch/Makefile            |  4 ----
 devel/catch/files/patch-clang19 | 11 +++++++++++
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/devel/catch/Makefile b/devel/catch/Makefile
index d5c663b7c367..df4f7b4f3cea 100644
--- a/devel/catch/Makefile
+++ b/devel/catch/Makefile
@@ -23,10 +23,6 @@ PORTSCOUT=	limit:^2\.
 
 OPTIONS_DEFINE=	DOCS
 
-post-patch:
-	@${REINPLACE_CMD} -e 's/\(-Wno-error=pragmas\)/\1 -Wno-error=c++20-extensions/' \
-		${WRKSRC}/projects/CMakeLists.txt
-
 do-test:
 	${BUILD_WRKSRC}/projects/SelfTest
 
diff --git a/devel/catch/files/patch-clang19 b/devel/catch/files/patch-clang19
new file mode 100644
index 000000000000..672213fbe950
--- /dev/null
+++ b/devel/catch/files/patch-clang19
@@ -0,0 +1,11 @@
+--- projects/CMakeLists.txt.orig	2022-10-16 09:02:17 UTC
++++ projects/CMakeLists.txt
+@@ -354,7 +354,7 @@ if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|G
+ if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
+     target_compile_options( SelfTest PRIVATE -Wall -Wextra -Wunreachable-code -Wpedantic -Wmissing-declarations )
+     if (CATCH_ENABLE_WERROR)
+-        target_compile_options( SelfTest PRIVATE -Werror -Wno-error=pragmas )
++        target_compile_options( SelfTest PRIVATE -Werror -Wno-error=pragmas -Wno-error=c++20-extensions )
+     endif()
+ endif()
+ # Clang specific options go here