From owner-svn-doc-head@freebsd.org Mon Aug 24 13:11:24 2015 Return-Path: Delivered-To: svn-doc-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D7479C10AC; Mon, 24 Aug 2015 13:11:24 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DFC51EB9; Mon, 24 Aug 2015 13:11:24 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7ODBOn1037442; Mon, 24 Aug 2015 13:11:24 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7ODBOt1037441; Mon, 24 Aug 2015 13:11:24 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201508241311.t7ODBOt1037441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Mon, 24 Aug 2015 13:11:24 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r47304 - head/en_US.ISO8859-1/books/porters-handbook/makefiles X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 24 Aug 2015 13:11:24 -0000 Author: mat Date: Mon Aug 24 13:11:23 2015 New Revision: 47304 URL: https://svnweb.freebsd.org/changeset/doc/47304 Log: Document the opt_IMPLIES/opt_PREVENTS/opt_PREVENTS_MSG helpers. Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D3409 Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/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 Mon Aug 24 08:23:54 2015 (r47303) +++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Mon Aug 24 13:11:23 2015 (r47304) @@ -4390,6 +4390,112 @@ QMAKE_ARGS+= -DTEST:BOOL=false .endif + + <varname><replaceable>OPT</replaceable>_IMPLIES</varname> + + Provides a way to add dependencies between + options. + + When OPT is selected, all the + options listed in this variable will be selected too. Using + the OPT_CONFIGURE_ENABLE + described earlier to illustrate: + + OPTIONS_DEFINE= OPT1 OPT2 +OPT1_IMPLIES= OPT2 + +OPT1_CONFIGURE_ENABLE= opt1 +OPT2_CONFIGURE_ENABLE= opt2 + + Is equivalent to: + + OPTIONS_DEFINE= OPT1 OPT2 + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MOPT1} +CONFIGURE_ARGS+= --enable-opt1 +.else +CONFIGURE_ARGS+= --disable-opt1 +.endif + +.if ${PORT_OPTIONS:MOPT2} || ${PORT_OPTIONS:MOPT1} +CONFIGURE_ARGS+= --enable-opt2 +.else +CONFIGURE_ARGS+= --disable-opt2 +.endif + + + Simple Use of + <varname><replaceable>OPT</replaceable>_IMPLIES</varname> + + This port has a X11 option, and a + GNOME option that needs the + X11 option to be selected to + build. + + OPTIONS_DEFINE= X11 GNOME +OPTIONS_DEFAULT= X11 + +X11_USE= xorg=xi,xextproto +GNOME_USE= gnome=gtk30 +GNOME_IMPLIES= X11 + + + + + <varname><replaceable>OPT</replaceable>_PREVENTS</varname> + and + <varname><replaceable>OPT</replaceable>_PREVENTS_MSG</varname> + + Provides a way to add conflicts between options. + + When OPT is selected, all the + options listed in this variable must be un-selected. If + OPT_PREVENTS_MSG + is also selected, its content will be shown, explaining why + they conflict. For example: + + OPTIONS_DEFINE= OPT1 OPT2 +OPT1_PREVENTS= OPT2 +OPT1_PREVENTS_MSG= OPT1 and OPT2 enable conflicting options + + Is roughly equivalent to: + + OPTIONS_DEFINE= OPT1 OPT2 + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MOPT2} || ${PORT_OPTIONS:MOPT1} +BROKEN= Option OPT1 conflicts with OPT2 (select only one) +.endif + + The only difference is that the first one will write an + error after running make config, + suggesting changing the selected options. + + + Simple Use of + <varname><replaceable>OPT</replaceable>_PREVENTS</varname> + + This port has X509 and + SCTP options. Both options add + patches, but the patches conflict with each other, so they + cannot be selected at the same time. + + OPTIONS_DEFINE= X509 SCTP + +SCTP_PATCHFILES= ${PORTNAME}-6.8p1-sctp-2573.patch.gz:-p1 +SCTP_CONFIGURE_WITH= sctp + +X509_PATCH_SITES= http://www.roumenpetrov.info/openssh/x509/:x509 +X509_PATCHFILES= ${PORTNAME}-7.0p1+x509-8.5.diff.gz:-p1:x509 +X509_PREVENTS= SCTP +X509_PREVENTS= X509 and SCTP patches conflict + + + Dependencies