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.
It's a fair attempt at trying to match actual changed files
with the patchdir, and invent new patch file names.
There are a few things it doesn't do yet, such as dealing with
patch files with multiple patches, or dealing with context diffs.
Just watch out when you use it for the first time on a port, verify
you don't lose or duplicate patches.
I've been using this to update large ports recently, and it seemed too
good not to give it to other porters.
Approved by turan@
if a new directory was found, it is always marked for @dirrm.
But, if the directory is empty, nothing pertaining to it is recorded in
the PLIST... and thanks to pkg_*, we can't record directories in the PLIST.
So, just add an @exec mkdir -p right in front of the @dirrm, up to
the port maintainer to decide whether the @exec mkdir/@dirrm pair is
justified or not (for the port at hand).
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...