use _DEPEND_THRU uniformously.
Note that this actually needs something very similar to what is used
in bsd.port.subdir.mk to work.
In particular `default' FLAVORs not being empty is probably a bad idea,
and won't work uniformously.
The right way to set a default flavor is probably to:
- not have empty as a valid flavor.
- do things in two steps:
FLAVOR?=default
.if empty(FLAVOR)
FLAVOR:=default
.endif
so that flavor always gets set correctly.
This is somewhat orthogonal to FLAVORS.
Principle: one port may build several packages in one go.
For instance, egcs will build all compilers, and package stuff as
base, C++, Fortran, etc.
This simplifies some japanese ports greatly, e.g., one Canna port that
builds libs/server/app packages.
How to use:
just set
MULTI_PACKAGES=-ext1 -ext2...
in the Makefile.
Then make package will invoke itself recursively with SUBPACKAGE set to
-ext1, -ext2.
The SUBPACKAGE will fetch package info as PLIST-ext1, COMMENT-ext1,
DESCR-ext1, etc.
The port Makefile itself can test the value of SUBPACKAGE if things differ.
Some problems:
- there still is a main package (with PLIST, DESCR, etc), and it's built
last, so you can't add RUN_DEPENDS=main_package to subpackages, you have
to encode them explicitly in the PLIST for now.
- other ports can't depend on subpackages yet. This is usually not a
problem, it's just a question of choosing the `right' main package (e.g.,
for Canna, it will be canna-lib).
- PLIST.sed recognize @FLAVOR@, which is extended to the current flavor,
so that a subpackage may depend on the corresponding main package in
explicit ways.
describe is also invoked recursively, so that all subpackages appear in
the INDEX.
ports tree to be shared by hosts of different types. Note: you
may want to do something like this to move any existing packages:
cd /usr/ports/packages
mkdir .tmp
mv * .tmp
mv .tmp sparc
patch approved by espie@
- test for NO_SHARED before reading PFRAG.shared
- pipe several sed together, otherwise keyword recognition won't work
in fragments.
- put PFRAG.shared replacement at front, so that further flavor will
use it.
- various typos...