Sat Jun 13 15:11:11 2020 UTC ()
mk/configure: Replace SET(CMAKE_MODULE_PATH... like 'set' too.

This will break print/scribus-qt4.
It uses CMAKE_MODULE_PATH as not a directory list.
It is wrong assumption.


(ryoon)
diff -r1.18 -r1.19 pkgsrc/mk/configure/cmake.mk

cvs diff -r1.18 -r1.19 pkgsrc/mk/configure/cmake.mk (expand / switch to unified diff)

--- pkgsrc/mk/configure/cmake.mk 2020/05/12 17:36:20 1.18
+++ pkgsrc/mk/configure/cmake.mk 2020/06/13 15:11:11 1.19
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: cmake.mk,v 1.18 2020/05/12 17:36:20 rillig Exp $ 1# $NetBSD: cmake.mk,v 1.19 2020/06/13 15:11:11 ryoon Exp $
2# 2#
3# This file handles packages that use CMake as their primary build 3# This file handles packages that use CMake as their primary build
4# system. For more information about CMake, see http://www.cmake.org/. 4# system. For more information about CMake, see http://www.cmake.org/.
5# 5#
6# Package-settable variables: 6# Package-settable variables:
7# 7#
8# CMAKE_DEPENDENCIES_REWRITE 8# CMAKE_DEPENDENCIES_REWRITE
9# A list of files (XXX: variable name) relative to WRKSRC in 9# A list of files (XXX: variable name) relative to WRKSRC in
10# which, after configuring the package, buildlink3 dependencies 10# which, after configuring the package, buildlink3 dependencies
11# are resolved to the real ones. 11# are resolved to the real ones.
12# 12#
13# CMAKE_MODULE_PATH_OVERRIDE 13# CMAKE_MODULE_PATH_OVERRIDE
14# A list of files relative to WRKSRC in which the CMAKE_MODULE_PATH 14# A list of files relative to WRKSRC in which the CMAKE_MODULE_PATH
@@ -73,27 +73,29 @@ CMAKE_ARGS+=-DCMAKE_PREFIX_PATH:PATH=${C @@ -73,27 +73,29 @@ CMAKE_ARGS+=-DCMAKE_PREFIX_PATH:PATH=${C
73 73
74CMAKE_MODULE_PATH_OVERRIDE+= CMakeLists.txt 74CMAKE_MODULE_PATH_OVERRIDE+= CMakeLists.txt
75 75
76### configure-cmake-override modifies the cmake CMakeLists.txt file in 76### configure-cmake-override modifies the cmake CMakeLists.txt file in
77### ${WRKSRC} so that if CMAKE_MODULE_PATH is set we add our Module 77### ${WRKSRC} so that if CMAKE_MODULE_PATH is set we add our Module
78### directory before any others. 78### directory before any others.
79### 79###
80 80
81SUBST_CLASSES+= cmake 81SUBST_CLASSES+= cmake
82SUBST_STAGE.cmake= do-configure-pre-hook 82SUBST_STAGE.cmake= do-configure-pre-hook
83SUBST_MESSAGE.cmake= Fixing CMAKE_MODULE_PATH in CMakeLists.txt 83SUBST_MESSAGE.cmake= Fixing CMAKE_MODULE_PATH in CMakeLists.txt
84SUBST_FILES.cmake= ${CMAKE_MODULE_PATH_OVERRIDE} 84SUBST_FILES.cmake= ${CMAKE_MODULE_PATH_OVERRIDE}
85SUBST_SED.cmake= \ 85SUBST_SED.cmake= \
86 's|set *( *CMAKE_MODULE_PATH |set (CMAKE_MODULE_PATH "${_CMAKE_DIR}" |' 86 -e 's|set *( *CMAKE_MODULE_PATH |set (CMAKE_MODULE_PATH "${_CMAKE_DIR}" |'
 87SUBST_SED.cmake+= \
 88 -e 's|SET *( *CMAKE_MODULE_PATH |SET (CMAKE_MODULE_PATH "${_CMAKE_DIR}" |'
87SUBST_NOOP_OK.cmake= yes # not all packages need this 89SUBST_NOOP_OK.cmake= yes # not all packages need this
88 90
89do-configure-pre-hook: __cmake-copy-module-tree 91do-configure-pre-hook: __cmake-copy-module-tree
90__cmake-copy-module-tree: .PHONY 92__cmake-copy-module-tree: .PHONY
91 ${RUN} cd ${PKGSRCDIR}/mk; ${CP} -R cmake-Modules ${_CMAKE_DIR} 93 ${RUN} cd ${PKGSRCDIR}/mk; ${CP} -R cmake-Modules ${_CMAKE_DIR}
92 94
93### The cmake function export_library_dependencies() writes out 95### The cmake function export_library_dependencies() writes out
94### library dependency info to a file and this may contain buildlink 96### library dependency info to a file and this may contain buildlink
95### paths. 97### paths.
96### cmake-dependencies-rewrite modifies any such files, listed in 98### cmake-dependencies-rewrite modifies any such files, listed in
97### ${CMAKE_DEPENDENCIES_REWRITE} (relative to ${WRKSRC}) to have the 99### ${CMAKE_DEPENDENCIES_REWRITE} (relative to ${WRKSRC}) to have the
98### real dependencies 100### real dependencies
99### 101###