Page MenuHomeFreeBSD

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

Authored by 0mp on Mar 10 2019, 7:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 18, 6:09 AM
Unknown Object (File)
Mon, Feb 26, 8:37 AM
Unknown Object (File)
Fri, Feb 23, 7:01 PM
Unknown Object (File)
Jan 6 2024, 10:21 AM
Unknown Object (File)
Jan 5 2024, 12:28 PM
Unknown Object (File)
Dec 23 2023, 2:35 AM
Unknown Object (File)
Dec 21 2023, 6:24 AM
Unknown Object (File)
Nov 23 2023, 4:21 PM
Subscribers

Details

Summary
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
case.

Requested by:		cem, dim

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22999
Build 22072: arc lint + arc unit

Event Timeline

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

share/man/man7/ports.7
608

s/examples/example/

mat added inline comments.
share/man/man7/ports.7
614

Looking at how FLAVOR is passed to sub-makes in bsd.port.mk, 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 bsd.port.mk, 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!

share/man/man7/ports.7
608–609
  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.
share/man/man7/ports.7
610

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.