Subject: proposal 5: flexible distfile handling
To: None <>
From: Todd Vierling <>
List: tech-pkg
Date: 05/21/1999 13:09:32
Comments, please.


$Revision: 1.1 $

The package system assumes a lot about the distfiles, patchfiles, and other
files used in the extraction and build of a given package.  This proposal
offers a more flexible method of handling distfiles and patchfiles which
does not lose backwards compatibility.

- [replaces PATCHDIR]
  PATCHDIRS:  A list of directories containing patch files for this package.
  ALWAYS includes ${.CURDIR}/patches, if it exists.  Specializations of
  ${.CURDIR}/patches based on ${OPSYS}, ${MACHINE_ARCH}, or ${OS_VERSION}
  are removed for cleanliness (their application can be replaced by
  appropriate conditionalization inside the patches).  Patch names in these
  directories must match the pattern "patch-*".

- MASTER_SITES:  May contain directory URLs, as currently used, which will
  be applied to all of DISTFILES and PATCHFILES.  May also contain entries
  of the form:


  where GLOB is a csh(1) style glob pattern and URL is a directory URL.
  While iterating the DISTFILES list at fetch time, entries in MASTER_SITES
  with a GLOB must match the distfile in order to use that URL for fetching.

- PATCH_SITES:  Removed.  Instead, MASTER_SITES with appropriate glob
  matches is used.

- PATCHFILES:  This variable may be used along with the DECOMPRESS_CMD
  definitions in proposal 3, if both proposals are accepted.  Otherwise
  acts as it has in the past.

This proposal does not provide much more flexibility for handling of patch
files.  That may be addressed in a later proposal.


-- Todd Vierling (Personal; Bus.