Introduce subpackages to the ports framework - this allows ports to be built once, but have multiple packages created. For example, have a subpackage for docs and examples.
To add subpackages to a port, define:
SUBPACKAGES= foo bar
and in the plist, prefix files to put in a subpackage with @@foo@@.
For each subpackage, some variables can be set, if needed.
- DESCR.<subpkg> defaults to the pkg-descr if pkg-descr.<subpkg> does not exist.
- COMMENT.<subpkg> defaults to ${COMMENT} (subpkg: <subpkg>)
- All the PKGMESSAGE/PKGINSTALL/... variable have .<subpkg> version, pointing to pkg-message.<subpkg>/pkg-install.<subpkg> files.
- A few options helpers <opt>_SUBPACKAGES and <opt>_*_DEPENDS.<subpkg> can be used. See lang/perl5-devel example.
- PLIST_FILES.<subpkg> and PLIST_DIRS.subpkg were added too.
Subpackages can depend on each other, a new variable has been introduced, SELF_DEPENDS, and a special subpackage name has been introduced to refer to the main package. For example:
If the foo subpackage depends on the main subpackage:
SUBPACKAGES= foo SELF_DEPENDS.foo= main
If the main package depends on the tools subpackage:
SUBPACKAGE= tools SELF_DEPENDS= tools