Page MenuHomeFreeBSD

Subpackages
AbandonedPublic

Authored by pizzamig on Jun 14 2023, 8:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 4, 6:32 AM
Unknown Object (File)
Mon, Aug 4, 3:33 AM
Unknown Object (File)
Fri, Jul 25, 11:28 AM
Unknown Object (File)
Jun 22 2025, 5:43 PM
Unknown Object (File)
Jun 22 2025, 8:23 AM
Unknown Object (File)
Jun 22 2025, 12:37 AM
Unknown Object (File)
Jun 21 2025, 7:29 AM
Unknown Object (File)
Jun 21 2025, 12:17 AM

Details

Reviewers
None
Group Reviewers
portmgr
Summary

Initial implementation of subpackages.

Based on previous mat's implementation: https://reviews.freebsd.org/D16457
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 (with a warning)
  • 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.
  • 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

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 52060
Build 48951: arc lint + arc unit