On Mon Jan 05, 2026 at 05:57:01PM +0000, Stuart Henderson wrote:
> On 2026/01/01 10:38, Rafael Sadowski wrote:
> > Here is a suggestion to better document cmake.port.mk.
>
> sorry I missed this when I committed a few to that file, here's an
> updated diff that applies to -current switching to your text, only
> difference in end result is that I kept the alphabetic sort of
> variables.
>
> (don't mind the rcs id lines in the diff, cvs will fix that up)
>
> I think this is ok
Thanks Stuart, ok rsadowski
>
> Index: port-modules.5
> ===================================================================
> RCS file: /cvs/src/share/man/man5/port-modules.5,v
> diff -u -p -r1.281 port-modules.5
> --- port-modules.5 5 Jan 2026 17:38:38 -0000 1.281
> +++ port-modules.5 5 Jan 2026 17:46:42 -0000
> @@ -1,4 +1,4 @@
> -.\" $OpenBSD: port-modules.5,v 1.281 2026/01/05 17:38:38 sthen Exp $
> +.\" $OpenBSD: port-modules.5,v 1.278 2025/12/02 13:05:28 stu Exp $
> .\"
> .\" Copyright (c) 2008 Marc Espie
> .\"
> @@ -24,7 +24,7 @@
> .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
> .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> .\"
> -.Dd $Mdocdate: January 5 2026 $
> +.Dd $Mdocdate: December 2 2025 $
> .Dt PORT-MODULES 5
> .Os
> .Sh NAME
> @@ -573,8 +573,15 @@ The exact effects on the build process d
> the CMake config files.
> Default value is `No'.
> .It MODCMAKE_LDFLAGS
> -If set, the contents will be passed to CMake in the environment variable
> -.Ev LDFLAGS .
> +If set, the value will be passed to CMake via the
> +.Ev LDFLAGS
> +environment variable during configuration.
> +CMake uses this only on the first configuration to set
> +.Ev CMAKE_EXE_LINKER_FLAGS_INIT ,
> +.Ev CMAKE_SHARED_LINKER_FLAGS_INIT ,
> +and
> +.Ev CMAKE_MODULE_LINKER_FLAGS_INIT .
> +Default value is empty.
> .It MODCMAKE_VERBOSE
> If set to `Yes', CMake will print details during configure and build
> stages about exact command being run, etc.
> @@ -585,15 +592,55 @@ If set to `Yes', CMake will colorize its
> Should not be used in ports Makefiles.
> Default value is `No'.
> .It USE_NINJA
> -If set to `Yes', CMake will use the ninja build system.
> -Otherwise, it will use
> -.Xr make 1 ,
> -and add
> +If set to `Yes', use
> +.Xr ninja 1
> +as the build system instead of
> +.Xr make 1 .
> +Adds
> +.Pa devel/ninja
> +to
> +.Ev BUILD_DEPENDS .
> +If set to `No', uses Unix Makefiles generator and adds
> .Sq nojunk
> -to DPB_PROPERTIES due to problems with CMake's include files parser
> -in this mode.
> +to
> +.Ev DPB_PROPERTIES .
> Default value is `Yes'.
> .El
> +.Pp
> +When used together with other modules, appropriate variables are
> +automatically passed to CMake:
> +.Bl -tag -width "lang/python" -compact
> +.It java
> +.Ev JAVA_HOME
> +is set in
> +.Ev CONFIGURE_ENV
> +and
> +.Ev MAKE_ENV .
> +.It lang/python
> +Python executable, library, and include paths are set for FindPython,
> +FindPython3, and FindPythonN modules.
> +.It lang/lua
> +Lua include directory and library path are set for FindLua.
> +.It lang/ruby
> +Ruby executable is set for FindRuby.
> +.It lang/tcl
> +Tcl version, include, library directories and library name are set in
> +.Ev CONFIGURE_ENV .
> +.It x11/tk
> +Tk version, include, library directories and library name are set in
> +.Ev CONFIGURE_ENV .
> +.El
> +.Pp
> +The environment variable
> +.Ev MODCMAKE_PORT_BUILD
> +is automatically set to `yes' in
> +.Ev CONFIGURE_ENV
> +and
> +.Ev MAKE_ENV .
> +This disables CMake's default optimization flags, putting them under
> +ports control, and prevents network operations
> +.Pq file DOWNLOAD/UPLOAD
> +during the build.
> .It devel/cabal
> See
> .Xr cabal-module 5
>
No comments:
Post a Comment