From nobody Mon Apr 8 21:04:53 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VD1p50Lt5z5Fp0V for ; Mon, 8 Apr 2024 21:05:33 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VD1p45Zxfz4Hsn for ; Mon, 8 Apr 2024 21:05:32 +0000 (UTC) (envelope-from sunpoet@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712610332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BaNpdv9ok8fn49YCUgX2XjZnmzFX3NLnNz+g7A0qwTQ=; b=AEqOtJtawuVVTjZM+ESKO6ZF1M44IGsDvltZiLpsOQ5HNYV2ShoFUKJuIgLPNqLWazGkAF I31iGJAn2+NNuBh3Eq3D9ytqIQnVA5/7YJ801dPL1JW/pK8mnELx9D4BKGnpeVBsLFChN9 ydU8lddQah8X0XXJdtWIjBvGkbeD8j8syWYC86FiUkqPiWsgMFuI9sh7A62dveyux6q0nH bABJLXMTvumd6IqsgQofFExYC1CPSaaAbBXwYKw+ou8erH6og82A3TK25oAWZSRxIjavwX z98bVO5xTJCztaMIDN/H17b1BPMHAETg2qEY22pb7gDM0kiiFr1n9gPJKEENAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712610332; a=rsa-sha256; cv=none; b=wGS572N18hQ7/NsBzay2jDYzwRzbwJwgXMn8YUIn3drNW9Mva5h20iNJAfQkThsyqWNdq7 WXxY14NGGtWs7jqvvVhSNRKMHtYHqp0w22q4m/Bs6ByztyH+ohm0eUJTf0cwCTEG+p2vOk EmPMzZhuUDosy7nCJsS1zwEgMTYi+4NG4t4KGggLGYUQmjpYXSFh82Mcw8vn1y4rPnK+ZS haS57r9DWkdEdjg8OQ1brvAlt+ELueXxFtg5vVPsvLSyu2IV59exWmOwFe2hlr93x6OPms DykCgStJBG9J5Kwf0QKWv9hFZl3NsvwNZhvVo6DSCpHZJxCAADO5uoRTBvR1eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712610332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BaNpdv9ok8fn49YCUgX2XjZnmzFX3NLnNz+g7A0qwTQ=; b=PbakHmUY1UTNWfjkMgNn5Ugq0FnDvH7ePGr7L4BWkRkep3Cy9gXVB/I+1TghEj27+HR+aB VlFzx7oLQxF3j4q+unoKApQtFQawbTLjU5BXm28sFY3ekckdf5LK7BpcXF1YWqBY41cwhw wObfJsQgXAxIu9ok0zjfs4sZW7hQRvkPFujB02u2gNqApn315l6+hRF7i3MQNwh0oaIqv2 a6mUn14tbBkhbYoTSVygF00M7boZlNrNP/hssZhMjIZSCdG6IxM9jf6uUJFs6Bmd5oGr6N MTDoKwKkSqzfI1RbhjhnrlMJZYqtfOtl+No06ONiI//aj69Kq7drQyzwQhKtng== Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: sunpoet) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VD1p44mNXzXG0 for ; Mon, 8 Apr 2024 21:05:32 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-56e69888a36so1509497a12.3 for ; Mon, 08 Apr 2024 14:05:32 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCW7NYgriZzgA2sYlHYwMrqVSawUWq5Y8oVLGCLPdcZuWahZHIsaVnfjuivH/pMA12rD6G3T83gqVd5Z1mQX7mSR82jrhSRWeYJl4bMwW7acsJs= X-Gm-Message-State: AOJu0YzcuRbvsbuIaID7twVWBD6IJB+Y2lT+v9NSeG20PHWjok6I0mB4 PTxcKKGcg4LL7ssU4sxTX9GF9iAQUPR2TSpwnfxGAwAEjSwXJB5FzIvAsPcsnuNvkqvm+fUOyvc tfOK4OxVRr6PlXvsC6XD84lyWGWclTMmLBg0INg== X-Google-Smtp-Source: AGHT+IGMaN5d1OEV1l+zpHEgsa2s/PX73YjppsvSHHwtwhIO43pl7FdjTweIWGbIot7k0NGwUg9S7RwvHTf1bCj9SB8= X-Received: by 2002:a17:907:7f11:b0:a46:966b:ebfe with SMTP id qf17-20020a1709077f1100b00a46966bebfemr8702827ejc.46.1712610331124; Mon, 08 Apr 2024 14:05:31 -0700 (PDT) List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 References: <202404080927.4389REPp012645@gitrepo.freebsd.org> In-Reply-To: <202404080927.4389REPp012645@gitrepo.freebsd.org> From: Po-Chuan Hsieh Date: Tue, 9 Apr 2024 05:04:53 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 4963e985a45d - main - Mk/cmake.mk: add support for indirect argument To: Max Brazhnikov Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000006d285306159c2a3d" --0000000000006d285306159c2a3d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 8, 2024 at 5:27=E2=80=AFPM Max Brazhnikov wr= ote: > The branch main has been updated by makc: > > URL: > https://cgit.FreeBSD.org/ports/commit/?id=3D4963e985a45dca57a9dba4d3c39d8= 862ac9cc185 > > commit 4963e985a45dca57a9dba4d3c39d8862ac9cc185 > Author: Max Brazhnikov > AuthorDate: 2024-04-08 09:15:42 +0000 > Commit: Max Brazhnikov > CommitDate: 2024-04-08 09:15:42 +0000 > > Mk/cmake.mk: add support for indirect argument > > Add indirect to list of arguments for USES=3Dcmake. cmake:indirect is > intended primarily > for ports, which use meson or pep517 for build, but rely on cmake > underneath. > Update documentation while here. > > Differential Revision: https://reviews.freebsd.org/D44509 > --- > CHANGES | 8 ++++++++ > Mk/Uses/cmake.mk | 54 > ++++++++++++++++++++++++++++++++++-------------------- > 2 files changed, 42 insertions(+), 20 deletions(-) > > diff --git a/CHANGES b/CHANGES > index b840bc11fdeb..ebfabbffd719 100644 > --- a/CHANGES > +++ b/CHANGES > @@ -10,6 +10,14 @@ in the release notes and/or placed into UPDATING. > > All ports committers are allowed to commit to this file. > > +20240408: > +AUTHOR: makc@FreeBSD.org > + > + USES=3Dcmake now supports `indirect' argument. This argument adds cmak= e > binary > + to the BUILD_DEPENDS and and exposes CMAKE_ARGS and some other helpers= , > but > + does not run cmake in the configure step. cmake:indirect is intended > + primarily for ports which use meson or pep517 for build. > + > 20240229: > AUTHOR: tijl@FreeBSD.org > > diff --git a/Mk/Uses/cmake.mk b/Mk/Uses/cmake.mk > index 8229fa9cbb55..e9a9dc64df58 100644 > --- a/Mk/Uses/cmake.mk > +++ b/Mk/Uses/cmake.mk > @@ -2,9 +2,12 @@ > # > # Feature: cmake > # Usage: USES=3Dcmake or USES=3Dcmake:ARGS > -# Valid ARGS: insource, run, noninja, testing > +# Valid ARGS: insource, indirect, noninja, run, testing > I guess the arguments are listed in alphabetical order. That means indirect is in front of insource. > # ARGS description: > # insource do not perform an out-of-source build > +# indirect do not run cmake for configure step, only add > build dependency. > +# This should be set only for ports which use other > build systems, > +# e.g. pep517 or meson, but rely internally on cmak= e. > # noninja don't use ninja instead of make > # Setting this should be an exception, and hints to > an issue > # inside the ports build system. > @@ -31,6 +34,7 @@ > # CMAKE_OFF Appends -D:bool=3DOFF to the CMAKE_ARGS. > # CMAKE_ARGS - Arguments passed to cmake > # Default: see below > +# Variables for ports which use cmake for configure > # CMAKE_BUILD_TYPE - Type of build (cmake predefined build types). > # Projects may have their own build profiles. > # CMake supports the following types: Debug, > @@ -38,19 +42,28 @@ > # Debug and Release profiles respect system > # CFLAGS, RelWithDebInfo and MinSizeRel will set > # CFLAGS to "-O2 -g" and "-Os -DNDEBUG". > -# Default: Release, if WITH_DEBUG is not set, > -# Debug otherwise > +# Default: Release, if neither WITH_DEBUG nor > WITH_DEBUGINFO is set, > +# RelWithDebInfo, if WITH_DEBUGINFO is set, > +# Debug, if WITH_DEBUG is set. > # CMAKE_SOURCE_PATH - Path to the source directory > # Default: ${WRKSRC} > +# Variables for ports which use cmake for testing > +# CMAKE_TESTING_ARGS - Additional arguments passed to cmake on test > target. > +# CMAKE_TESTING_ON Appends -D:bool=3DON to the CMAKE_TESTING_A= RGS. > +# Default: BUILD_TESTING > +# CMAKE_TESTING_OFF Appends -D:bool=3DOFF to the CMAKE_TESTING_A= RGS. > +# Default: empty > +# CMAKE_TESTING_TARGET - Name of the test target. Default: test > # > # MAINTAINER: kde@FreeBSD.org > > .if !defined(_INCLUDE_USES_CMAKE_MK) > _INCLUDE_USES_CMAKE_MK=3D yes > > -_valid_ARGS=3D insource run noninja testing _internal > +_valid_ARGS=3D insource indirect noninja run testing _internal > > _CMAKE_VERSION=3D 3.28.3 > +CMAKE_BIN=3D ${LOCALBASE}/bin/cmake > > # Sanity check > . for arg in ${cmake_ARGS} > @@ -59,12 +72,14 @@ IGNORE=3D Incorrect 'USES+=3D cmake:${cmake_ARGS}= ' > usage: argument [${arg}] is not r > . endif > . endfor > > -# Check whehter other flags than only '_internal' are passed (this shoul= d > be equivalent to PORT =3D devel/cmake-core > -. if ${cmake_ARGS} !=3D _internal > -CMAKE_BIN=3D ${LOCALBASE}/bin/cmake > +. if !empty(cmake_ARGS:M_internal) > +# _internal is intended only for devel/cmake-core > +MASTER_SITES?=3D > https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \ > + https://www.cmake.org/files/v${DISTVERSION}/ > +. else > BUILD_DEPENDS+=3D ${CMAKE_BIN}:devel/cmake-core > > -. if ${cmake_ARGS:Mrun} > +. if !empty(cmake_ARGS:Mrun) > RUN_DEPENDS+=3D ${CMAKE_BIN}:devel/cmake-core > . endif > > @@ -76,12 +91,6 @@ CMAKE_BUILD_TYPE?=3D RelWithDebInfo > CMAKE_BUILD_TYPE?=3D Release > . endif #defined(WITH_DEBUG) > > -PLIST_SUB+=3D CMAKE_BUILD_TYPE=3D"${CMAKE_BUILD_TYPE:tl}" > - > -. if defined(STRIP) && ${STRIP} !=3D "" && !defined(WITH_DEBUG) && > !defined(WITH_DEBUGINFO) > -INSTALL_TARGET?=3D install/strip > -. endif > - > CMAKE_ARGS+=3D -DCMAKE_C_COMPILER:STRING=3D"${CC}" \ > -DCMAKE_CXX_COMPILER:STRING=3D"${CXX}" \ > -DCMAKE_C_FLAGS:STRING=3D"${CFLAGS}" \ > @@ -116,6 +125,17 @@ CMAKE_NOCOLOR=3D yes > . if defined(CMAKE_NOCOLOR) > CMAKE_ARGS+=3D -DCMAKE_COLOR_MAKEFILE:BOOL=3DOFF > . endif > +. endif > + > +. if empty(cmake_ARGS:Mindirect) > +. if defined(STRIP) && ${STRIP} !=3D "" && !defined(WITH_DEBUG) && > !defined(WITH_DEBUGINFO) > +INSTALL_TARGET?=3D install/strip > +. endif > +. endif > + > +# Use cmake for configure stage and for testing > +. if empty(cmake_ARGS:M_internal) && empty(cmake_ARGS:Mindirect) > +PLIST_SUB+=3D CMAKE_BUILD_TYPE=3D"${CMAKE_BUILD_TYPE:tl}" > > _CMAKE_MSG=3D "=3D=3D=3D> Performing in-source build" > CMAKE_SOURCE_PATH?=3D ${WRKSRC} > @@ -176,10 +196,4 @@ do-test: > . endif > . endif > > -. if !empty(cmake_ARGS:M_internal) > -MASTER_SITES?=3D > https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \ > - https://www.cmake.org/files/v${DISTVERSION}/ > - > -. endif > - > .endif #!defined(_INCLUDE_USES_CMAKE_MK) > --0000000000006d285306159c2a3d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Apr 8, 2024 at 5:27=E2=80=AFPM Ma= x Brazhnikov <makc= @freebsd.org> wrote:
The branch main has been updated by = makc:

URL: https://cgi= t.FreeBSD.org/ports/commit/?id=3D4963e985a45dca57a9dba4d3c39d8862ac9cc185

commit 4963e985a45dca57a9dba4d3c39d8862ac9cc185
Author:=C2=A0 =C2=A0 =C2=A0Max Brazhnikov <makc@FreeBSD.org>
AuthorDate: 2024-04-08 09:15:42 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Max Brazhnikov <makc@FreeBSD.org>
CommitDate: 2024-04-08 09:15:42 +0000

=C2=A0 =C2=A0 Mk/
cmake.mk: add support for indirect argument

=C2=A0 =C2=A0 Add indirect to list of arguments for USES=3Dcmake. cmake:ind= irect is intended primarily
=C2=A0 =C2=A0 for ports, which use meson or pep517 for build, but rely on c= make underneath.
=C2=A0 =C2=A0 Update documentation while here.

=C2=A0 =C2=A0 Differential Revision:=C2=A0 https://reviews.freebsd= .org/D44509
---
=C2=A0CHANGES=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 8 ++++++++
=C2=A0Mk/Uses/cmake.mk | 54 ++++++++++++++++++++++++++++++++++-------------------= -
=C2=A02 files changed, 42 insertions(+), 20 deletions(-)

diff --git a/CHANGES b/CHANGES
index b840bc11fdeb..ebfabbffd719 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,14 @@ in the release notes and/or placed into UPDATING.

=C2=A0All ports committers are allowed to commit to this file.

+20240408:
+AUTHOR: makc@FreeBSD.org
+
+=C2=A0 USES=3Dcmake now supports `indirect' argument. This argument ad= ds cmake binary
+=C2=A0 to the BUILD_DEPENDS and and exposes CMAKE_ARGS and some other help= ers, but
+=C2=A0 does not run cmake in the configure step. cmake:indirect is intende= d
+=C2=A0 primarily for ports which use meson or pep517 for build.
+
=C2=A020240229:
=C2=A0AUTHOR: tijl@FreeBSD.org

diff --git a/Mk/Uses/cmake.mk b/Mk/Uses/cmake.mk
index 8229fa9cbb55..e9a9dc64df58 100644
--- a/Mk/Uses/cmake.mk
+++ b/Mk/Uses/cmake.mk
@@ -2,9 +2,12 @@
=C2=A0#
=C2=A0# Feature:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmake
=C2=A0# Usage:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0USES= =3Dcmake or USES=3Dcmake:ARGS
-# Valid ARGS:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 insource, run, noninja, te= sting
+# Valid ARGS:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 insource, indirect, noninj= a, run, testing

I guess the arguments a= re listed in alphabetical order.
That means indirect is in front = of insource.
=C2=A0
=C2=A0# ARGS description:
=C2=A0# insource=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do not perf= orm an out-of-source build
+# indirect=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do not run cmake= for configure step, only add build dependency.
+#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 This should be set only for ports which use other build systems,
+#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 e.g. pep517 or meson, but rely internally on cmake.
=C2=A0# noninja=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 don't u= se ninja instead of make
=C2=A0#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 Setting this should be an exception, and hints to an issue
=C2=A0#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 inside the ports build system.
@@ -31,6 +34,7 @@
=C2=A0# CMAKE_OFF=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Appends -D<va= r>:bool=3DOFF to the CMAKE_ARGS.
=C2=A0# CMAKE_ARGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- Arguments pass= ed to cmake
=C2=A0#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 Default: see below
+# Variables for ports which use cmake for configure
=C2=A0# CMAKE_BUILD_TYPE=C2=A0 =C2=A0 =C2=A0- Type of build (cmake predefin= ed build types).
=C2=A0#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 Projects may have their own build profiles.
=C2=A0#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 CMake supports the following types: Debug,
@@ -38,19 +42,28 @@
=C2=A0#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 Debug and Release profiles respect system
=C2=A0#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 CFLAGS, RelWithDebInfo and MinSizeRel will set
=C2=A0#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 CFLAGS to "-O2 -g" and "-Os -DNDEBUG".
-#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 Default: Release, if WITH_DEBUG is not set,
-#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 Debug otherwise
+#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 Default: Release, if neither WITH_DEBUG nor WITH_DEBUGINFO is set,
+#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 RelWithDebInfo, if WITH_DEBUGINFO is set,
+#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 Debug, if WITH_DEBUG is set.
=C2=A0# CMAKE_SOURCE_PATH=C2=A0 =C2=A0 - Path to the source directory
=C2=A0#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 Default: ${WRKSRC}
+# Variables for ports which use cmake for testing
+# CMAKE_TESTING_ARGS=C2=A0 =C2=A0- Additional arguments passed to cmake on= test target.
+# CMAKE_TESTING_ON=C2=A0 =C2=A0 =C2=A0Appends -D<var>:bool=3DON=C2= =A0 to the CMAKE_TESTING_ARGS.
+#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 Default: BUILD_TESTING
+# CMAKE_TESTING_OFF=C2=A0 =C2=A0 Appends -D<var>:bool=3DOFF to the C= MAKE_TESTING_ARGS.
+#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 Default: empty
+# CMAKE_TESTING_TARGET - Name of the test target. Default: test
=C2=A0#
=C2=A0# MAINTAINER: kde@FreeBSD.org

=C2=A0.if !defined(_INCLUDE_USES_CMAKE_MK)
=C2=A0_INCLUDE_USES_CMAKE_MK=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 yes

-_valid_ARGS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0insource run noninj= a testing _internal
+_valid_ARGS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0insource indirect n= oninja run testing _internal

=C2=A0_CMAKE_VERSION=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 3.28.3
+CMAKE_BIN=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${LOCALBASE}/b= in/cmake

=C2=A0# Sanity check
=C2=A0.=C2=A0 for arg in ${cmake_ARGS}
@@ -59,12 +72,14 @@ IGNORE=3D=C2=A0 =C2=A0 =C2=A0Incorrect 'USES+=3D cm= ake:${cmake_ARGS}' usage: argument [${arg}] is not r
=C2=A0.=C2=A0 =C2=A0 endif
=C2=A0.=C2=A0 endfor

-# Check whehter other flags than only '_internal' are passed (this= should be equivalent to PORT =3D devel/cmake-core
-.=C2=A0 if ${cmake_ARGS} !=3D _internal
-CMAKE_BIN=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${LOCALBASE}/b= in/cmake
+.=C2=A0 if !empty(cmake_ARGS:M_internal)
+# _internal is intended only for devel/cmake-core
+MASTER_SITES?=3D https://git= hub.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0https://www.cmake.org/files/v${DISTVERSION}/
+.=C2=A0 else
=C2=A0BUILD_DEPENDS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 ${CMAKE_BIN}:devel/cmake-core

-.=C2=A0 =C2=A0 if ${cmake_ARGS:Mrun}
+.=C2=A0 =C2=A0 if !empty(cmake_ARGS:Mrun)
=C2=A0RUN_DEPENDS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${CMAKE_BIN}:devel/= cmake-core
=C2=A0.=C2=A0 =C2=A0 endif

@@ -76,12 +91,6 @@ CMAKE_BUILD_TYPE?=3D=C2=A0 =C2=A0RelWithDebInfo
=C2=A0CMAKE_BUILD_TYPE?=3D=C2=A0 =C2=A0 =C2=A0Release
=C2=A0.=C2=A0 =C2=A0 endif #defined(WITH_DEBUG)

-PLIST_SUB+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 CMAKE_BUILD_TYPE=3D= "${CMAKE_BUILD_TYPE:tl}"
-
-.=C2=A0 =C2=A0 if defined(STRIP) && ${STRIP} !=3D "" &am= p;& !defined(WITH_DEBUG) && !defined(WITH_DEBUGINFO)
-INSTALL_TARGET?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0install/strip
-.=C2=A0 =C2=A0 endif
-
=C2=A0CMAKE_ARGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-DCMAKE_C_COMP= ILER:STRING=3D"${CC}" \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 -DCMAKE_CXX_COMPILER:STRING=3D"${CXX}" \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 -DCMAKE_C_FLAGS:STRING=3D"${CFLAGS}" \
@@ -116,6 +125,17 @@ CMAKE_NOCOLOR=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0yes
=C2=A0.=C2=A0 =C2=A0 if defined(CMAKE_NOCOLOR)
=C2=A0CMAKE_ARGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-DCMAKE_COLOR_= MAKEFILE:BOOL=3DOFF
=C2=A0.=C2=A0 =C2=A0 endif
+.=C2=A0 endif
+
+.=C2=A0 if empty(cmake_ARGS:Mindirect)
+.=C2=A0 =C2=A0 if defined(STRIP) && ${STRIP} !=3D "" &am= p;& !defined(WITH_DEBUG) && !defined(WITH_DEBUGINFO)
+INSTALL_TARGET?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0install/strip
+.=C2=A0 =C2=A0 endif
+.=C2=A0 endif
+
+# Use cmake for configure stage and for testing
+.=C2=A0 if empty(cmake_ARGS:M_internal) && empty(cmake_ARGS:Mindir= ect)
+PLIST_SUB+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 CMAKE_BUILD_TYPE=3D= "${CMAKE_BUILD_TYPE:tl}"

=C2=A0_CMAKE_MSG=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "=3D=3D= =3D>=C2=A0 Performing in-source build"
=C2=A0CMAKE_SOURCE_PATH?=3D=C2=A0 =C2=A0 ${WRKSRC}
@@ -176,10 +196,4 @@ do-test:
=C2=A0.=C2=A0 =C2=A0 endif
=C2=A0.=C2=A0 endif

-.=C2=A0 if !empty(cmake_ARGS:M_internal)
-MASTER_SITES?=3D https://git= hub.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0https://www.cmake.org/files/v${DISTVERSION}/
-
-.=C2=A0 endif
-
=C2=A0.endif #!defined(_INCLUDE_USES_CMAKE_MK)
--0000000000006d285306159c2a3d--