Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Apr 2024 05:04:53 +0800
From:      Po-Chuan Hsieh <sunpoet@freebsd.org>
To:        Max Brazhnikov <makc@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org,  dev-commits-ports-main@freebsd.org
Subject:   Re: git: 4963e985a45d - main - Mk/cmake.mk: add support for indirect argument
Message-ID:  <CAMHz58QQOKxcPGzgB%2BjtiMbysFt_pip89w8prtd%2BA1NcZ-_GMg@mail.gmail.com>
In-Reply-To: <202404080927.4389REPp012645@gitrepo.freebsd.org>
References:  <202404080927.4389REPp012645@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--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 <makc@freebsd.org> 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 <makc@FreeBSD.org>
> AuthorDate: 2024-04-08 09:15:42 +0000
> Commit:     Max Brazhnikov <makc@FreeBSD.org>
> 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<var>: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<var>:bool=3DON  to the CMAKE_TESTING_A=
RGS.
> +#                      Default: BUILD_TESTING
> +# CMAKE_TESTING_OFF    Appends -D<var>: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

<div dir=3D"ltr"><div dir=3D"ltr">On Mon, Apr 8, 2024 at 5:27=E2=80=AFPM Ma=
x Brazhnikov &lt;<a href=3D"mailto:makc@freebsd.org" target=3D"_blank">makc=
@freebsd.org</a>&gt; wrote:<br></div><div class=3D"gmail_quote"><blockquote=
 class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so=
lid rgb(204,204,204);padding-left:1ex">The branch main has been updated by =
makc:<br>
<br>
URL: <a href=3D"https://cgit.FreeBSD.org/ports/commit/?id=3D4963e985a45dca5=
7a9dba4d3c39d8862ac9cc185" rel=3D"noreferrer" target=3D"_blank">https://cgi=
t.FreeBSD.org/ports/commit/?id=3D4963e985a45dca57a9dba4d3c39d8862ac9cc185</=
a><br>
<br>
commit 4963e985a45dca57a9dba4d3c39d8862ac9cc185<br>
Author:=C2=A0 =C2=A0 =C2=A0Max Brazhnikov &lt;makc@FreeBSD.org&gt;<br>
AuthorDate: 2024-04-08 09:15:42 +0000<br>
Commit:=C2=A0 =C2=A0 =C2=A0Max Brazhnikov &lt;makc@FreeBSD.org&gt;<br>
CommitDate: 2024-04-08 09:15:42 +0000<br>
<br>
=C2=A0 =C2=A0 Mk/<a href=3D"http://cmake.mk" rel=3D"noreferrer" target=3D"_=
blank">cmake.mk</a>: add support for indirect argument<br>
<br>
=C2=A0 =C2=A0 Add indirect to list of arguments for USES=3Dcmake. cmake:ind=
irect is intended primarily<br>
=C2=A0 =C2=A0 for ports, which use meson or pep517 for build, but rely on c=
make underneath.<br>
=C2=A0 =C2=A0 Update documentation while here.<br>
<br>
=C2=A0 =C2=A0 Differential Revision:=C2=A0 <a href=3D"https://reviews.freeb=
sd.org/D44509" rel=3D"noreferrer" target=3D"_blank">https://reviews.freebsd=
.org/D44509</a><br>
---<br>
=C2=A0CHANGES=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 8 ++++++++<br>
=C2=A0Mk/Uses/<a href=3D"http://cmake.mk" rel=3D"noreferrer" target=3D"_bla=
nk">cmake.mk</a> | 54 ++++++++++++++++++++++++++++++++++-------------------=
-<br>
=C2=A02 files changed, 42 insertions(+), 20 deletions(-)<br>
<br>
diff --git a/CHANGES b/CHANGES<br>
index b840bc11fdeb..ebfabbffd719 100644<br>
--- a/CHANGES<br>
+++ b/CHANGES<br>
@@ -10,6 +10,14 @@ in the release notes and/or placed into UPDATING.<br>
<br>
=C2=A0All ports committers are allowed to commit to this file.<br>
<br>
+20240408:<br>
+AUTHOR: makc@FreeBSD.org<br>
+<br>
+=C2=A0 USES=3Dcmake now supports `indirect&#39; argument. This argument ad=
ds cmake binary<br>
+=C2=A0 to the BUILD_DEPENDS and and exposes CMAKE_ARGS and some other help=
ers, but<br>
+=C2=A0 does not run cmake in the configure step. cmake:indirect is intende=
d<br>
+=C2=A0 primarily for ports which use meson or pep517 for build.<br>
+<br>
=C2=A020240229:<br>
=C2=A0AUTHOR: tijl@FreeBSD.org<br>
<br>
diff --git a/Mk/Uses/<a href=3D"http://cmake.mk" rel=3D"noreferrer" target=
=3D"_blank">cmake.mk</a> b/Mk/Uses/<a href=3D"http://cmake.mk" rel=3D"noref=
errer" target=3D"_blank">cmake.mk</a><br>
index 8229fa9cbb55..e9a9dc64df58 100644<br>
--- a/Mk/Uses/<a href=3D"http://cmake.mk" rel=3D"noreferrer" target=3D"_bla=
nk">cmake.mk</a><br>
+++ b/Mk/Uses/<a href=3D"http://cmake.mk" rel=3D"noreferrer" target=3D"_bla=
nk">cmake.mk</a><br>
@@ -2,9 +2,12 @@<br>
=C2=A0#<br>
=C2=A0# Feature:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmake<br>
=C2=A0# Usage:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0USES=
=3Dcmake or USES=3Dcmake:ARGS<br>
-# Valid ARGS:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 insource, run, noninja, te=
sting<br>
+# Valid ARGS:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 insource, indirect, noninj=
a, run, testing<br></blockquote><div><br></div><div>I guess the arguments a=
re listed in alphabetical order.</div><div>That means indirect is in front =
of insource.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">
=C2=A0# ARGS description:<br>
=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<br>
+# 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.<br>
+#=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,<br>
+#=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.<br>
=C2=A0# noninja=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 don&#39;t u=
se ninja instead of make<br>
=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<br>
=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.<br>
@@ -31,6 +34,7 @@<br>
=C2=A0# CMAKE_OFF=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Appends -D&lt;va=
r&gt;:bool=3DOFF to the CMAKE_ARGS.<br>
=C2=A0# CMAKE_ARGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- Arguments pass=
ed to cmake<br>
=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<br>
+# Variables for ports which use cmake for configure<br>
=C2=A0# CMAKE_BUILD_TYPE=C2=A0 =C2=A0 =C2=A0- Type of build (cmake predefin=
ed build types).<br>
=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.<br>
=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,<br>
@@ -38,19 +42,28 @@<br>
=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<br>
=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<br>
=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 &quot;-O2 -g&quot; and &quot;-Os -DNDEBUG&quot;.<br>
-#=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,<br>
-#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 Debug otherwise<br>
+#=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,<br>
+#=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,<br>
+#=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.<br>
=C2=A0# CMAKE_SOURCE_PATH=C2=A0 =C2=A0 - Path to the source directory<br>
=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}<br>
+# Variables for ports which use cmake for testing<br>
+# CMAKE_TESTING_ARGS=C2=A0 =C2=A0- Additional arguments passed to cmake on=
 test target.<br>
+# CMAKE_TESTING_ON=C2=A0 =C2=A0 =C2=A0Appends -D&lt;var&gt;:bool=3DON=C2=
=A0 to the CMAKE_TESTING_ARGS.<br>
+#=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<br>
+# CMAKE_TESTING_OFF=C2=A0 =C2=A0 Appends -D&lt;var&gt;:bool=3DOFF to the C=
MAKE_TESTING_ARGS.<br>
+#=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 Default: empty<br>
+# CMAKE_TESTING_TARGET - Name of the test target. Default: test<br>
=C2=A0#<br>
=C2=A0# MAINTAINER: kde@FreeBSD.org<br>
<br>
=C2=A0.if !defined(_INCLUDE_USES_CMAKE_MK)<br>
=C2=A0_INCLUDE_USES_CMAKE_MK=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 yes<br>
<br>
-_valid_ARGS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0insource run noninj=
a testing _internal<br>
+_valid_ARGS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0insource indirect n=
oninja run testing _internal<br>
<br>
=C2=A0_CMAKE_VERSION=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 3.28.3<br>
+CMAKE_BIN=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${LOCALBASE}/b=
in/cmake<br>
<br>
=C2=A0# Sanity check<br>
=C2=A0.=C2=A0 for arg in ${cmake_ARGS}<br>
@@ -59,12 +72,14 @@ IGNORE=3D=C2=A0 =C2=A0 =C2=A0Incorrect &#39;USES+=3D cm=
ake:${cmake_ARGS}&#39; usage: argument [${arg}] is not r<br>
=C2=A0.=C2=A0 =C2=A0 endif<br>
=C2=A0.=C2=A0 endfor<br>
<br>
-# Check whehter other flags than only &#39;_internal&#39; are passed (this=
 should be equivalent to PORT =3D devel/cmake-core<br>
-.=C2=A0 if ${cmake_ARGS} !=3D _internal<br>
-CMAKE_BIN=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${LOCALBASE}/b=
in/cmake<br>
+.=C2=A0 if !empty(cmake_ARGS:M_internal)<br>
+# _internal is intended only for devel/cmake-core<br>
+MASTER_SITES?=3D <a href=3D"https://github.com/Kitware/CMake/releases/down=
load/v$%7BDISTVERSION%7D/" rel=3D"noreferrer" target=3D"_blank">https://git=
hub.com/Kitware/CMake/releases/download/v${DISTVERSION}/</a> \<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<a href=3D"https://=
www.cmake.org/files/v$%7BDISTVERSION%7D/" rel=3D"noreferrer" target=3D"_bla=
nk">https://www.cmake.org/files/v${DISTVERSION}/</a><br>;
+.=C2=A0 else<br>
=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<br>
<br>
-.=C2=A0 =C2=A0 if ${cmake_ARGS:Mrun}<br>
+.=C2=A0 =C2=A0 if !empty(cmake_ARGS:Mrun)<br>
=C2=A0RUN_DEPENDS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${CMAKE_BIN}:devel/=
cmake-core<br>
=C2=A0.=C2=A0 =C2=A0 endif<br>
<br>
@@ -76,12 +91,6 @@ CMAKE_BUILD_TYPE?=3D=C2=A0 =C2=A0RelWithDebInfo<br>
=C2=A0CMAKE_BUILD_TYPE?=3D=C2=A0 =C2=A0 =C2=A0Release<br>
=C2=A0.=C2=A0 =C2=A0 endif #defined(WITH_DEBUG)<br>
<br>
-PLIST_SUB+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 CMAKE_BUILD_TYPE=3D=
&quot;${CMAKE_BUILD_TYPE:tl}&quot;<br>
-<br>
-.=C2=A0 =C2=A0 if defined(STRIP) &amp;&amp; ${STRIP} !=3D &quot;&quot; &am=
p;&amp; !defined(WITH_DEBUG) &amp;&amp; !defined(WITH_DEBUGINFO)<br>
-INSTALL_TARGET?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0install/strip<br>
-.=C2=A0 =C2=A0 endif<br>
-<br>
=C2=A0CMAKE_ARGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-DCMAKE_C_COMP=
ILER:STRING=3D&quot;${CC}&quot; \<br>
=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&quot;${CXX}&quot; \<br>
=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&quot;${CFLAGS}&quot; \<br>
@@ -116,6 +125,17 @@ CMAKE_NOCOLOR=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0yes<br>
=C2=A0.=C2=A0 =C2=A0 if defined(CMAKE_NOCOLOR)<br>
=C2=A0CMAKE_ARGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-DCMAKE_COLOR_=
MAKEFILE:BOOL=3DOFF<br>
=C2=A0.=C2=A0 =C2=A0 endif<br>
+.=C2=A0 endif<br>
+<br>
+.=C2=A0 if empty(cmake_ARGS:Mindirect)<br>
+.=C2=A0 =C2=A0 if defined(STRIP) &amp;&amp; ${STRIP} !=3D &quot;&quot; &am=
p;&amp; !defined(WITH_DEBUG) &amp;&amp; !defined(WITH_DEBUGINFO)<br>
+INSTALL_TARGET?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0install/strip<br>
+.=C2=A0 =C2=A0 endif<br>
+.=C2=A0 endif<br>
+<br>
+# Use cmake for configure stage and for testing<br>
+.=C2=A0 if empty(cmake_ARGS:M_internal) &amp;&amp; empty(cmake_ARGS:Mindir=
ect)<br>
+PLIST_SUB+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 CMAKE_BUILD_TYPE=3D=
&quot;${CMAKE_BUILD_TYPE:tl}&quot;<br>
<br>
=C2=A0_CMAKE_MSG=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;=3D=3D=
=3D&gt;=C2=A0 Performing in-source build&quot;<br>
=C2=A0CMAKE_SOURCE_PATH?=3D=C2=A0 =C2=A0 ${WRKSRC}<br>
@@ -176,10 +196,4 @@ do-test:<br>
=C2=A0.=C2=A0 =C2=A0 endif<br>
=C2=A0.=C2=A0 endif<br>
<br>
-.=C2=A0 if !empty(cmake_ARGS:M_internal)<br>
-MASTER_SITES?=3D <a href=3D"https://github.com/Kitware/CMake/releases/down=
load/v$%7BDISTVERSION%7D/" rel=3D"noreferrer" target=3D"_blank">https://git=
hub.com/Kitware/CMake/releases/download/v${DISTVERSION}/</a> \<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<a href=3D"https://=
www.cmake.org/files/v$%7BDISTVERSION%7D/" rel=3D"noreferrer" target=3D"_bla=
nk">https://www.cmake.org/files/v${DISTVERSION}/</a><br>;
-<br>
-.=C2=A0 endif<br>
-<br>
=C2=A0.endif #!defined(_INCLUDE_USES_CMAKE_MK)<br>
</blockquote></div></div>

--0000000000006d285306159c2a3d--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMHz58QQOKxcPGzgB%2BjtiMbysFt_pip89w8prtd%2BA1NcZ-_GMg>