From owner-svn-doc-head@freebsd.org Tue Mar 12 12:37:42 2019 Return-Path: Delivered-To: svn-doc-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F2AE152FC5F; Tue, 12 Mar 2019 12:37:42 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1C418CA9E; Tue, 12 Mar 2019 12:37:41 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D607422C15; Tue, 12 Mar 2019 12:37:41 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2CCbfDO016430; Tue, 12 Mar 2019 12:37:41 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2CCbf8R016427; Tue, 12 Mar 2019 12:37:41 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201903121237.x2CCbf8R016427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Tue, 12 Mar 2019 12:37:41 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r52860 - in head/en_US.ISO8859-1/books/porters-handbook: makefiles special uses X-SVN-Group: doc-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/en_US.ISO8859-1/books/porters-handbook: makefiles special uses X-SVN-Commit-Revision: 52860 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F1C418CA9E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 12:37:42 -0000 Author: tobik (ports committer) Date: Tue Mar 12 12:37:40 2019 New Revision: 52860 URL: https://svnweb.freebsd.org/changeset/doc/52860 Log: Porter's Handbook: Add Meson section - Document new opt_MESON_{DIS,EN}ABLED helpers - Fix existing examples Approved by: bcr Differential Revision: https://reviews.freebsd.org/D19554 Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Tue Mar 12 10:02:49 2019 (r52859) +++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Tue Mar 12 12:37:40 2019 (r52860) @@ -6389,6 +6389,10 @@ FOO_CONFIGURE_ENABLE= foo no, use . + For arguments that take enabled + or disabled, see . + For all other cases, use . @@ -6711,7 +6715,7 @@ CMAKE_ARGS+= -DOPTIMIZE:BOOL=true -Dentry:BOOL=false is appended to CONFIGURE_ARGS. OPT_CMAKE_BOOL_OFF - is the oposite, + is the opposite, -Dentry:BOOL=false is appended to CMAKE_ARGS when the option is selected, and @@ -6782,15 +6786,15 @@ MESON_ARGS+= -Dopt=2 OPT_MESON_TRUE then -Dentry=true - is appended to CMAKE_ARGS. When option + is appended to MESON_ARGS. When option OPT is not selected, -Dentry=false - is appended to CONFIGURE_ARGS. + is appended to MESON_ARGS. OPT_MESON_FALSE - is the oposite, + is the opposite, -Dentry=false - is appended to CMAKE_ARGS when the + is appended to MESON_ARGS when the option is selected, and -Dentry=true when the option is not selected. For @@ -6825,15 +6829,15 @@ MESON_ARGS+= -Dtest=false -Ddebug=false \ OPT_MESON_YES then -Dentry=yes - is appended to CMAKE_ARGS. When option + is appended to MESON_ARGS. When option OPT is not selected, -Dentry=no - is appended to CONFIGURE_ARGS. + is appended to MESON_ARGS. OPT_MESON_NO - is the oposite, + is the opposite, -Dentry=no - is appended to CMAKE_ARGS when the + is appended to MESON_ARGS when the option is selected, and -Dentry=yes when the option is not selected. For @@ -6850,11 +6854,52 @@ OPT1_MESON_NO= optimize .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MOPT1} -CMAKE_ARGS+= -Dtest=yes -Ddebug=yes \ +MESON_ARGS+= -Dtest=yes -Ddebug=yes \ -Doptimize=no .else -CMAKE_ARGS+= -Dtest=no -Ddebug=no \ +MESON_ARGS+= -Dtest=no -Ddebug=no \ -Doptimize=yes +.endif + + + + <varname><replaceable>OPT</replaceable>_MESON_ENABLED</varname> + and + <varname><replaceable>OPT</replaceable>_MESON_DISABLED</varname> + + When option OPT is + selected, for each entry in + OPT_MESON_ENABLED + then + -Dentry=enabled + is appended to MESON_ARGS. When option + OPT is not + selected, + -Dentry=disabled + is appended to MESON_ARGS. + OPT_MESON_DISABLED + is the opposite, + -Dentry=disabled + is appended to MESON_ARGS when the + option is selected, and + -Dentry=enabled + when the option is not selected. For + example: + + OPTIONS_DEFINE= OPT1 +OPT1_MESON_ENABLED= test +OPT1_MESON_DISABLED= debug + + is equivalent to: + + OPTIONS_DEFINE= OPT1 + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MOPT1} +MESON_ARGS+= -Dtest=enabled -Ddebug=disabled +.else +MESON_ARGS+= -Dtest=disabled -Ddebug=enabled .endif Modified: head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Tue Mar 12 10:02:49 2019 (r52859) +++ head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Tue Mar 12 12:37:40 2019 (r52860) @@ -1164,6 +1164,53 @@ byteorder-1.2.2 Unlicense/MIT + + + Using <command>meson</command> + + For ports that use Meson, + define USES=meson. + + + Variables for Ports That Use + <command>meson</command> + + + + + Variable + Description + + + + + + MESON_ARGS + Port specific Meson + flags to be passed to the meson + binary. + + + + MESON_BUILD_DIR + Path to the build directory relative to + WRKSRC. Default is + _build. + + + +
+ + + <literal>USES=meson</literal> Example + + This snippet demonstrates the use of + Meson for a port. + + USES= meson +MESON_ARGS= -Dfoo=enabled + +
Modified: head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml Tue Mar 12 10:02:49 2019 (r52859) +++ head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml Tue Mar 12 12:37:40 2019 (r52860) @@ -1965,7 +1965,8 @@ USE_MATE= menus:build intlhack Possible arguments: (none) - Provide support for Meson based projects. + Provide support for Meson based projects. For more + information see .