From owner-svn-doc-all@freebsd.org Tue Jan 9 13:06:55 2018 Return-Path: Delivered-To: svn-doc-all@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 6998CE7C73E; Tue, 9 Jan 2018 13:06:55 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 446297BBE1; Tue, 9 Jan 2018 13:06:55 +0000 (UTC) (envelope-from mat@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 8B140173DB; Tue, 9 Jan 2018 13:06:54 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w09D6s7A096960; Tue, 9 Jan 2018 13:06:54 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w09D6s9D096959; Tue, 9 Jan 2018 13:06:54 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201801091306.w09D6s9D096959@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Tue, 9 Jan 2018 13:06:54 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r51378 - head/en_US.ISO8859-1/books/porters-handbook/flavors X-SVN-Group: doc-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: head/en_US.ISO8859-1/books/porters-handbook/flavors X-SVN-Commit-Revision: 51378 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2018 13:06:55 -0000 Author: mat Date: Tue Jan 9 13:06:54 2018 New Revision: 51378 URL: https://svnweb.freebsd.org/changeset/doc/51378 Log: Enhance the flavors chapter with the experience from the past few weeks. Sponsored by: Absolight Modified: head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml Tue Jan 9 02:28:43 2018 (r51377) +++ head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml Tue Jan 9 13:06:54 2018 (r51378) @@ -29,6 +29,14 @@ The first flavor in FLAVORS is the default flavor. + + It can help simplify the logic of the + Makefile to also define + FLAVOR as: + + FLAVOR?= ${FLAVORS:[1]} + + To distinguish flavors from options, which are always uppercase letters, flavor names can only @@ -43,15 +51,38 @@ port can be removed, and the port can be converted to flavors with: - FLAVORS= normal lite + FLAVORS= default lite lite_PKGNAMESUFFIX= -lite [...] .if ${FLAVOR:U} != lite [enable non lite features] .endif + + + The first flavor is the default one, and is called, + here, default. It is not an obligation, + and if possible, use a more specific flavor name, like in + . + + Another Basic Flavors Usage + + If a port has a -nox11 slave port, the + slave port can be removed, and the port can be converted to + flavors with: + + FLAVORS= x11 nox11 +FLAVOR?= ${FLAVORS:[1]} +nox11_PKGNAMESUFFIX= -nox11 +[...] +.if ${FLAVOR} = x11 +[enable x11 features] +.endif + + + More Complex Flavors Usage Here is a slightly edited excerpt of what is present in