git: 6cfe6970007d - main - devel/unittest-cpp: Deprecate and set expiration date to 2022-12-31

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Thu, 20 Oct 2022 08:12:33 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6cfe6970007d6f56d4f7c0bd8c4905d08a06da84

commit 6cfe6970007d6f56d4f7c0bd8c4905d08a06da84
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2022-10-20 08:00:41 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2022-10-20 08:01:43 +0000

    devel/unittest-cpp: Deprecate and set expiration date to 2022-12-31
    
    Upstream have listed project on hiatus for more than 2 years
    Disable broken test when NDEBUG is defined
    
    Reference: https://github.com/unittest-cpp/unittest-cpp/issues/180
    
    PR:             266853
    Approved by:    portmgr (maintainer timeout, 2+ weeks)
---
 devel/unittest-cpp/Makefile                       |  3 +++
 devel/unittest-cpp/files/patch-tests_TestTest.cpp | 32 +++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/devel/unittest-cpp/Makefile b/devel/unittest-cpp/Makefile
index 0a0d679fe162..c5c06247e4e0 100644
--- a/devel/unittest-cpp/Makefile
+++ b/devel/unittest-cpp/Makefile
@@ -10,6 +10,9 @@ WWW=		https://github.com/unittest-cpp/unittest-cpp
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+DEPRECATED=	Upstream have declared hiatus status since 2+ years back. Please consider using devel/googletest instead
+EXPIRATION_DATE=2022-12-31
+
 USE_GITHUB=	yes
 
 USES=		cmake
diff --git a/devel/unittest-cpp/files/patch-tests_TestTest.cpp b/devel/unittest-cpp/files/patch-tests_TestTest.cpp
new file mode 100644
index 000000000000..ed09c84e203e
--- /dev/null
+++ b/devel/unittest-cpp/files/patch-tests_TestTest.cpp
@@ -0,0 +1,32 @@
+--- tests/TestTest.cpp.orig	2022-10-05 11:53:09 UTC
++++ tests/TestTest.cpp
+@@ -74,29 +74,6 @@ namespace {
+ 
+ #if !defined(UNITTEST_MINGW) && !defined(UNITTEST_WIN32)
+ // Skip this test in debug because some debuggers don't like it.
+-#if defined(NDEBUG)
+-   TEST(CrashingTestsAreReportedAsFailures)
+-   {
+-      class CrashingTest : public Test
+-      {
+-      public:
+-         CrashingTest() : Test("crashing") {}
+-         virtual void RunImpl() const
+-         {
+-
+-            reinterpret_cast< void (*)() >(0)();
+-         }
+-      };
+-
+-      TestResults results;
+-      {
+-         ScopedCurrentTest scopedResult(results);
+-         CrashingTest().Run();
+-      }
+-
+-      CHECK_EQUAL(1, results.GetFailureCount());
+-   }
+-#endif
+ #endif
+ #endif
+