pkgsrc/mk/patch/bsd.patch-vars.mk
jlam 7a2c97d53f * Add a new stage "bootstrap-depends" that happens before all other
stages, and that installs dependencies listed in BOOTSTRAP_DEPENDS.
  The bootstrap-depends step works just like the normal depends step
  and honors the value of DEPENDS_TARGET.  It's now possible to add
  dependencies solely to facilitate fetching the distfiles, e.g.

	BOOTSTRAP_DEPENDS+=	curl-[0-9]*:../../www/curl

* Teach the tools framework about ":bootstrap" as a tools modifier
  which indicates the tool should be added as a dependency via
  BOOTSTRAP_DEPENDS.

* Add "digest" to the tools framework.

* Use USE_TOOLS+=digest:bootstrap to force pkgsrc to install digest
  before anything else.  Get rid of unused "uptodate-digest" target
  and related digest version-checking code.

* Finish the refactoring work: split checksum-related code out of
  bsd.pkg.mk and into pkgsrc/mk/checksum and replace the "checksum"
  target command list with a script that does all the real work.

* Make DIGEST_ALGORITHMS and PATCH_DIGEST_ALGORITHM into private
  variables by prepending them with an underscore.  Also, rename
  _PATCH_DIGEST_ALGORITHM to _PATCH_DIGEST_ALGORITHMS and adjust the
  makepatchsum target to allow that variable to contain a list of
  algorithms, all of which are used when creating the patch checksums
  for ${DISTINFO_FILE}.
2006-07-13 14:02:34 +00:00

50 lines
1.6 KiB
Makefile

# $NetBSD: bsd.patch-vars.mk,v 1.3 2006/07/13 14:02:34 jlam Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
# bsd.patch.mk is included.
#
# The following variables may be set in a package Makefile:
#
# PATCHFILES is a list of distribution patches relative to
# ${_DISTDIR} that are applied first to the package.
#
# PATCHDIR is the location of the pkgsrc patches for the package.
# This defaults to the "patches" subdirectory of the package
# directory.
#
# The following variables may be set by the user:
#
# LOCALPATCHES is the location of local patches that are maintained
# in a directory tree reflecting the same hierarchy as the pkgsrc
# tree, e.g., local patches for www/apache would be found in
# ${LOCALPATCHES}/www/apache. These patches are applied after
# the patches in ${PATCHDIR}.
#
# The default PATCHDIR is currently set in bsd.prefs.mk
#PATCHDIR?= ${.CURDIR}/patches
.if (defined(PATCHFILES) && !empty(PATCHFILES)) || \
(defined(PATCHDIR) && exists(${PATCHDIR})) || \
(defined(LOCALPATCHES) && exists(${LOCALPATCHES}/${PKGPATH}))
USE_TOOLS+= patch
.endif
.if (defined(PATCHDIR) && exists(${PATCHDIR})) || \
(defined(LOCALPATCHES) && exists(${LOCALPATCHES}/${PKGPATH}))
USE_TOOLS+= digest:bootstrap
.endif
# These tools are used to output the contents of the distribution patches
# to stdout.
#
.if defined(PATCHFILES)
USE_TOOLS+= cat
. if !empty(PATCHFILES:M*.Z) || !empty(PATCHFILES:M*.gz)
USE_TOOLS+= gzcat
. endif
. if !empty(PATCHFILES:M*.bz2)
USE_TOOLS+= bzcat
. endif
.endif