git: 7f6220a9b5d9 - main - graphics/poppler: ignore graphics/openjpeg15 presence

From: Tobias C. Berner <tcberner_at_FreeBSD.org>
Date: Fri, 01 Apr 2022 14:20:54 UTC
The branch main has been updated by tcberner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7f6220a9b5d9ee74b0564706001a5287094b0428

commit 7f6220a9b5d9ee74b0564706001a5287094b0428
Author:     Tobias C. Berner <tcberner@FreeBSD.org>
AuthorDate: 2022-03-31 03:58:43 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2022-04-01 14:19:30 +0000

    graphics/poppler: ignore graphics/openjpeg15 presence
    
    - cmake can under some non-determinstic circumstances find
      the OpenJPEGConfig.cmake in
            ${PREFIX}/lib/openjpeg-1.5
      prior to the one in
            ${PREFIX}/lib/openjpeg2
      with would be the wanted one.
    
    - Use CMAKE_IGNORE_PATH to explicitely make it not see
      that prefix.
            https://cmake.org/cmake/help/latest/variable/CMAKE_IGNORE_PATH.html#variable:CMAKE_IGNORE_PATH
    
    PR:             262888
---
 graphics/poppler/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/graphics/poppler/Makefile b/graphics/poppler/Makefile
index ea57d64e88bd..b13c08e85ac6 100644
--- a/graphics/poppler/Makefile
+++ b/graphics/poppler/Makefile
@@ -34,6 +34,11 @@ CMAKE_ON=	ENABLE_LIBJPEG  \
 		ENABLE_NSS \
 		ENABLE_SPLASH
 CMAKE_OFF=	BUILD_GTK_TESTS
+# Ensure that path ordering does not lead to openjpeg15 being found and picked
+# instead of openjpeg2 on systems that have both installed
+# Note: since f3ba77e14cac05d43caf35100848eeaee3bc64b4 graphics/openjpeg15 installs
+# its cmake files to ${PREFIX}/lib/openjpeg15
+CMAKE_ARGS+=	-DCMAKE_IGNORE_PATH:PATH=${PREFIX}/lib/openjpeg-1.5
 
 # Slave ports.
 _POPPLER_SLAVES=	library glib qt5 utils