WRKPKG should seldom be changed, unless it conflicts with the port's
actual naming conventions (default is ${WRKBUILD}/pkg).
Substitute stuff in INSTALL/DEINSTALL script as well.
The only drawback is that those LOOK like shell variables, but are actually
simple sed substitution.
Preconise a style such as
prefix=${PREFIX}
(then use ${prefix}) to avoid confusion.
invocations. This works around a bug in autoconf-generated scripts that
is present up to autoconf 2.13.
In recursive configure, INSTALL is re-set from ac_given_INSTALL, to handle
relative paths correctly. However, sometimes ac_given_INSTALL hasn't been
set yet, and we end up with a `BSD compatible INSTALL' of ../
- the PLIST, MESSAGE, DESCR variables refer to the sources.
- files are generated under ${WRKBUILD}, always.
- SUBST_VARS refer to the variables being substituted. ARCH,
HOMEPAGE, PREFIX are always substituted.
Use $\{VAR} to escape substitution.
Plus ${FLAVORS} -> -flavor1-flavor2 for PLIST.
- the %%FRAG%% and %%!FRAG%% notations are always used for PLIST.
- SED_PLIST can be augmented if needed.
Plus some compatibility kludges with the current situation.
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@