Page MenuHomeFreeBSD

ports.7: Add an example of how to use flavors

Authored by 0mp on Mar 10 2019, 7:16 PM.


ports.7: Add an example of how to use flavors

At the moment the manual page is not documenting how to build a flavored
package. Let's start documenting flavors with an example of a typical use

Requested by:		cem, dim

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Small nit, the rest is fine. Thanks for adding the example, I think it is really useful to have.

608 ↗(On Diff #54900)


mat added inline comments.
614 ↗(On Diff #54900)

Looking at how FLAVOR is passed to sub-makes in, I wonder if it should not be:

env FLAVOR=py37 make build
  • While here, fix a typo in example 2.
  • Fix other typos.
  • Use env(1) as suggested by @mat. As we can see in, it's better to pass FLAVOR via the environment:
1049  # Disallow forced FLAVOR as make argument since we cannot change it to the
1050  # proper default.
1051  .if empty(FLAVOR) && !empty(.MAKEOVERRIDES:MFLAVOR)
1052  .error FLAVOR may not be passed empty as a make argument.
1053  .endif
cem requested changes to this revision.Mar 11 2019, 1:27 AM

Thanks for doing this, I really appreciate it!

608–609 ↗(On Diff #54907)
  1. Doc style suggestion: split it into two sentences. We prefer direct, simple sentences in manuals instead of complex ones, when possible.

For example, "The following command …. of a port. (In this case... support.)"

  1. Don't use .Po, .No, or .Pc macros. Just use normal parentheses directly. Stylized text goes on its own line, and ordinary text on a following line. E.g.,:
(In this case,
.Pa www/py-django
is going to be built with Python 3.7 support.)
This revision now requires changes to proceed.Mar 11 2019, 1:27 AM
  • Avoid Po, Pc & No macros
  • Simplify sentences
0mp marked 3 inline comments as done.Mar 11 2019, 9:11 AM

Thank you @bcr, @cem & @mat for your suggestions :)

matthew added inline comments.
610 ↗(On Diff #54915)

www/py-django was deprecated and then undeprecated last week -- it's quite likely that it will disappear in the relatively near future. Maybe choose a different example port?

Use devel/py-pip instead of www/py-django, as it is a much more stable Python port.

0mp marked an inline comment as done.Mar 11 2019, 10:47 AM

Looks good to me. Thank you!

This revision is now accepted and ready to land.Mar 11 2019, 5:51 PM
This revision was automatically updated to reflect the committed changes.