git: 53d2b997aba6 - main - graphics/geos: Add make test

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Wed, 25 Dec 2024 19:26:23 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=53d2b997aba6f272d3f78e504e3c1911a6ff5b15

commit 53d2b997aba6f272d3f78e504e3c1911a6ff5b15
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2024-12-25 19:01:58 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-12-25 19:16:58 +0000

    graphics/geos: Add make test
    
    - Add workaround for an unit test
    
    PR:             283183
    Submitted by:   Daniel Engberg <diizzy@FreeBSD.org>
    Reference:      https://github.com/libgeos/geos/issues/1206
---
 graphics/geos/Makefile                   |  6 ++++--
 graphics/geos/files/patch-CMakeLists.txt | 11 +++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/graphics/geos/Makefile b/graphics/geos/Makefile
index 62e9ec883bed..fe44cd9d405d 100644
--- a/graphics/geos/Makefile
+++ b/graphics/geos/Makefile
@@ -12,9 +12,11 @@ WWW=		https://libgeos.org/ \
 LICENSE=	LGPL21
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake compiler:c++14-lang pathfix tar:bzip2
+USES=		cmake:testing compiler:c++14-lang pathfix tar:bzip2
 
-CMAKE_OFF=	BUILD_BENCHMARKS DISABLE_GEOS_INLINE
+CMAKE_OFF=	BUILD_BENCHMARKS \
+		BUILD_TESTING \
+		DISABLE_GEOS_INLINE
 CMAKE_ON=	BUILD_SHARED_LIBS
 USE_LDCONFIG=	yes
 
diff --git a/graphics/geos/files/patch-CMakeLists.txt b/graphics/geos/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..ead3fac57d52
--- /dev/null
+++ b/graphics/geos/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2024-12-07 16:18:30 UTC
++++ CMakeLists.txt
+@@ -215,7 +215,7 @@ target_compile_options(geos_cxx_flags INTERFACE
+ #-----------------------------------------------------------------------------
+ 
+ target_compile_options(geos_cxx_flags INTERFACE
+-	"$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-ffp-contract=off>"
++	"$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-ffp-model=strict>"
+ 	"$<$<CXX_COMPILER_ID:GNU>:-ffp-contract=off>"
+ 	"$<$<BOOL:${MSVC}>:/fp:precise>"
+ 	)