Index: Mk/Uses/cmake.mk =================================================================== --- Mk/Uses/cmake.mk +++ Mk/Uses/cmake.mk @@ -17,6 +17,7 @@ # testing add the test target based on ctest # Additionally, CMAKE_TESTING_ON, CMAKE_TESTING_OFF, CMAKE_TESTING_ARGS, CMAKE_TESTING_TARGET # can be defined to override the default values. +# _internal Not to be used by any other ports than the ones created from the release-tarball of cmake # # # Additional variables that affect cmake behaviour: @@ -47,7 +48,9 @@ .if !defined(_INCLUDE_USES_CMAKE_MK) _INCLUDE_USES_CMAKE_MK= yes -_valid_ARGS= insource run noninja testing +_valid_ARGS= insource run noninja testing _internal + +_CMAKE_VERSION= 3.21.0 # Sanity check .for arg in ${cmake_ARGS} @@ -56,6 +59,8 @@ . endif .endfor +# Check whehter other flags than only '_internal' are passed (this should be equivalent to PORT = devel/cmake +.if ${cmake_ARGS} != _internal CMAKE_BIN= ${LOCALBASE}/bin/cmake BUILD_DEPENDS+= ${CMAKE_BIN}:devel/cmake @@ -158,5 +163,12 @@ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${CMAKE_TESTING_TARGET} .endif +.endif + +.if !empty(cmake_ARGS:M_internal) +MASTER_SITES?= https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \ + https://www.cmake.org/files/v${PORTVERSION}/ + +.endif .endif #!defined(_INCLUDE_USES_CMAKE_MK) Index: devel/cmake-doc/Makefile =================================================================== --- devel/cmake-doc/Makefile +++ devel/cmake-doc/Makefile @@ -1,7 +1,6 @@ PORTNAME= cmake -DISTVERSION= 3.21.0 +DISTVERSION= ${_CMAKE_VERSION} CATEGORIES= devel -MASTER_SITES= https://www.cmake.org/files/v${PORTVERSION:R}/ PKGNAMESUFFIX= -doc MAINTAINER= kde@FreeBSD.org Index: devel/cmake-gui/Makefile =================================================================== --- devel/cmake-gui/Makefile +++ devel/cmake-gui/Makefile @@ -1,7 +1,6 @@ PORTNAME= cmake -DISTVERSION= 3.21.0 +DISTVERSION= ${_CMAKE_VERSION} CATEGORIES= devel -MASTER_SITES= https://www.cmake.org/files/v${PORTVERSION:R}/ PKGNAMESUFFIX= -gui MAINTAINER= kde@FreeBSD.org Index: devel/cmake/Makefile =================================================================== --- devel/cmake/Makefile +++ devel/cmake/Makefile @@ -1,11 +1,8 @@ # Created by: Kyle Martin PORTNAME= cmake -# Remember to update devel/cmake-doc and devel/cmake-gui as well. -DISTVERSION= 3.21.0 +DISTVERSION= ${_CMAKE_VERSION} CATEGORIES= devel -MASTER_SITES= https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \ - https://www.cmake.org/files/v${PORTVERSION}/ MAINTAINER= kde@FreeBSD.org COMMENT= Cross-platform Makefile generator @@ -19,7 +16,7 @@ libuv.so:devel/libuv \ librhash.so:security/rhash -USES= compiler:c++11-lang ncurses +USES= cmake:_internal compiler:c++11-lang ncurses HAS_CONFIGURE= yes CONFIGURE_ENV= MAKE=make Index: devel/kms-cmake-utils/Makefile =================================================================== --- devel/kms-cmake-utils/Makefile +++ devel/kms-cmake-utils/Makefile @@ -14,6 +14,6 @@ NO_ARCH= yes -PLIST_SUB= CMAKE_VERSION=3.21 +PLIST_SUB= CMAKE_VERSION=${_CMAKE_VERSION:R} .include