Commit graph

74 commits

Author SHA1 Message Date
jlam
e78c6207f3 BUILDLINK_DEPENDS.* can be lists, so iterate over the lists when creating
a proper BUILD_DEPENDS or DEPENDS list.
2005-05-14 21:38:18 +00:00
jlam
8dba6226e7 Consider ${TAR} differently from ${GTAR}. Currently, mark pkgsrc down
as needing both (no impact since they're both satisfied by the tar
binary installed by the bootstrap kit).  There's some funniness in
the extraction code where we check for pax or GNU tar that needs to
be resolved.  Remove the TAR=${GTAR} hack since it's no longer needed
after these changes.

XXX Later, a sweep needs to be made to see where we actually need GTAR
XXX and where we only need TAR, probably triggered by whether we call it
XXX with the "z" option or not.  Packages that need GTAR should explicitly
XXX add USE_TOOLS+=gtar to the package Makefile.
2005-05-14 21:15:07 +00:00
jlam
214611316d Compute the installation prefix for every tool specified so that the
"TOOL" variables defined by replace.mk, e.g. AWK, GREP, SED, TRUE,
etc., can be used immediately after bsd.tools.mk is included.
2005-05-14 05:57:43 +00:00
jlam
ec7c68e97c Teach the new tools framework about lha, unrar, unzip, and unzoo and
modify bsd.pkg.extract.mk to use them.  As a side-effect, we stop
hardcoding ${LOCALBASE} as the install prefix for these tools so this
becomes more pkgviews-friendly.
2005-05-13 22:08:20 +00:00
jlam
b17ddaa794 Don't condtionally set the "TOOL" variables... set them explicitly. Also
fix variable name in the case where we're using the pkgsrc tool, since
we were referencing the wrong variable.
2005-05-13 21:57:13 +00:00
jlam
a136d7cc68 Observe the following:
VAR=	a
	PTR=	VAR
	${PTR}?= b

Given these definitions, ${VAR} == "b" (unintuitively).  We can work
around this by doing:

	VAR=	a
	PTR=	VAR
	.for _v_ in ${PTR}
	${_v_}?= b
	.endfor

In this case, ${VAR} == "a" (as expected).

Use the second form of assignment in this changeset so that the expected
behavior happens for the "TOOL" name variables.  This fixes "recursively
defined" errors for some of the "TOOL" variables when the pkgsrc tool
replaces the system-supplied one.
2005-05-12 03:57:40 +00:00
jlam
0dbd0c0762 Rename MAKE_VARS to MAKEVARS so that it more closely resembles
"MAKEFLAGS".  Both "MAKEVARS" and "MAKEFLAGS" affect the package-level
make process, not the software's own make process.
2005-05-11 22:08:18 +00:00
jlam
bb022af73a Use EVAL_PREFIX to be pkgviews-friendly. 2005-05-11 19:42:17 +00:00
jlam
a03def662e Define the "TOOL" names for the tools to be the same as the "TOOLS_TOOL"
names if the former are undefined.  This allows the "TOOL" names, e.g.
GMAKE, YACC, etc., to be used by package Makefiles for simplicity.
2005-05-11 05:05:03 +00:00
jlam
dfb5ed0037 Make a distinction between the tools that pkgsrc needs and the tools
that a package needs.  Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.

Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc.  for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g.  TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs.  These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 19:06:58 +00:00
jlam
525b3f42ce Replace TOOLS_WRAP and TOOLS_SYMLINK with TOOLS_CREATE, and let the tools
framework figure out by itself whether a wrapper or a symlink should be
created based on the real command and any arguments that may need to be
invoked.
2005-05-09 01:11:58 +00:00
jlam
61da5414f3 Rename TOOLS_ARGS.* to TOOLS_REAL_ARGS.* to follow naming convention for
other TOOLS_* variables relating to the real command executed.
2005-05-09 00:13:03 +00:00
jlam
110ac816ee Create a wrapper instead of a symlink if TOOLS_REAL_CMD.<tool> isn't an
absolute path.
2005-05-04 04:46:48 +00:00
jlam
3f770348b7 Teach the new tools framework about INSTALL and set the appropriate
default value for each platform.  Currently, the replacement tools
comes from sysutils/coreutils, but where there is no native BSD install
program, bootstrap-pkgsrc should probably be made to provide an install
shell script as an alternative, and mk/tools/bootstrap.mk should be
amended accordingly.

Also remove one use of ${TYPE} in pkgsrc (bsd.pkg.mk) under the new tools
framework.
2005-05-03 20:41:53 +00:00
jlam
5562cbeeef GNU xargs must be invoked with "-r" so that we don't run the command at
all if the stdin is empty.
2005-05-03 17:14:14 +00:00
jlam
8861b6ba02 Teach the new tools framework about MAIL_CMD. We use mail/nail as a
"mail" replacement in case TOOLS_PLATFORM.mail is empty.
2005-05-03 16:30:34 +00:00
jlam
0c14b578db When using the pkgsrc versions of gzip/gunzip, also invoke them with
the same set of arguments that the system-supplied gzip/gunzip would
use.
2005-05-03 15:17:26 +00:00
jlam
b26519d8a4 * Push the imake- and xmkmf-handling into the new tools framework.
* Get rid of an explicit check for ${_IMAKE_MAKE} == ${GMAKE} in
  bsd.pkg.mk to check for whether we need to depend on gmake or not.
  Instead, we now note in Linux.mk that packages that need imake will
  also need to use gmake by setting _IMAKE_TOOLS+=gmake.

* Push the definition of MAKE_PROGRAM from bsd.pkg.mk into make.mk where
  it's closer to related code.
2005-05-02 21:10:02 +00:00
jlam
157b5ae130 If we only define the "TOOL" variable if the real command exists, then
the "TOOL" variables won't be properly defined for the top-leve make
after returning from making the install-depends target if we're using
the pkgsrc-supplied tool.  Define the "TOOL" variable unconditionally
instead.
2005-05-02 06:36:29 +00:00
jlam
96c5deea72 Teach the new tools framework about USE_TOOLS+=bzcat. 2005-05-02 02:50:33 +00:00
jlam
c368f44eea Split replace.mk into two parts, one of which is included by bsd.prefs.mk
to provide "TOOL" definitions for tools used by a top-level make process
(usually because it uses them in a != variable definition).  This allows
USE_TOOLS to be defined before bsd.prefs.mk is included by a package
Makefile, where USE_TOOLS lists the additional (non-default) tools that
are required to build the package.

Also, drop the fallback to existing "TOOL" definitions because we now
have TOOLS_PLATFORM.* for each platform in pkgsr/mk/tools/tools.*.mk.
2005-04-30 04:35:54 +00:00
jlam
c76976cd01 Only set the "TOOL" variable if one has been associated with the tool. 2005-04-28 17:40:52 +00:00
jlam
99661424ef Merge coreutils.mk into replace.mk. Also remove the "coreutils" option
to USE_TOOLS and replace it with the names of the various tools we're
getting from coreutils, e.g. "mv", "mkdir", "rm", etc.
2005-04-28 17:35:48 +00:00
jlam
f3cd319177 Remove unused variable _TOOLS_REPLACE_LIST. 2005-04-28 16:00:58 +00:00
jlam
2df0e6ccee whitespace changes to simplify merging with coreutils.mk. 2005-04-28 15:55:12 +00:00
jlam
26cfc5a79c We only need to loop over the tools that we say we're going to use. 2005-04-28 15:51:10 +00:00
jlam
38b0a624c8 Create _USE_TOOLS, a sanitized versino of USE_TOOLS that removes the
tools that are overridden by superseding ones.  Use it in place of
USE_TOOLS in most places.  This fixes the situation where we can
depend on the tool that overridden, e.g. USE_TOOLS= gawk awk.
2005-04-28 15:47:43 +00:00
jlam
a6262466a1 Correct the PKGPATH for gsed. 2005-04-28 04:00:15 +00:00
jlam
25ba4810c5 Split out the tools from the same package into separate clauses so that
you can specify wanting individual tools from that package.
2005-04-28 03:57:39 +00:00
jlam
efc8bca44c Define TOOLS_DEPENDS.* to be the dependency that will be added, and
filter out dependencies that have already been added.
2005-04-28 03:01:11 +00:00
jlam
9a3f617848 Rename TOOLS_DEPENDS.* to TOOLS_DEPMETHOD.* to roughly match the
buildlink terminology for the same concept.
2005-04-28 02:10:56 +00:00
jlam
6f10b02051 Split out the perl handling to a separate file, since we always use the
pkgsrc perl, and it isn't really like any of the other tools that we
replace based on a system-/pkgsrc-supplied distinction.
2005-04-27 17:29:06 +00:00
jlam
bb78ec6884 Handle cases where pkgsrc bootstrap installs tools, e.g. pax, tar, sed.
Where bootstrap installs these tools, they should be considered system-
supplied since pkgsrc won't be providing replacements for them.

bootstrap.mk encapulates the information from the bootstrap script.  It
should eventually go away after the bootstrap script has been taught to
write out the correct TOOLS_PLATFORM.* entries to the example mk.conf
file.
2005-04-27 17:15:13 +00:00
jlam
1f5fbfd47d Rename PLATFORM_TOOLS.* to TOOLS_PLATFORM.* to bring the variable names
under the same namespace as the other parts of the new tools framework.
2005-04-27 16:52:28 +00:00
jlam
c8a17ff550 Remove conflict between bison and yacc... now "bison" simply overrides
"yacc" when both are specified.  Also add comments to note other
instances where we override other tools: gsed & sed, gawk & awk, gm4 & m4.
2005-04-27 16:41:11 +00:00
jlam
7c19bbbfb7 cmp should be a symlink, not a wrapper. 2005-04-27 16:29:45 +00:00
jlam
05bb461206 Teach replace.mk about awk, m4, and sed when the GNU versions aren't
required.
2005-04-27 16:28:19 +00:00
jlam
7b2de543a7 Get rid of the _TOOLS_USE_PLATFORM.* table as the information has now
been placed in the various tools.${OPSYS}.mk files using PLATFORM_TOOL.*
definitions.
2005-04-27 16:02:08 +00:00
jlam
ad38b77969 Initial stab at creating lists of system-supplied tools for each platform.
These were culled from pkgsrc/mk/${OPSYS}.mk.  These files should only be
listing utilities that aren't installed by pkgsrc.
2005-04-27 15:28:16 +00:00
jlam
94c112be85 We can't add dependencies on packages that are never registered.
archivers/pax and pkgtools/mtree fall in this category since they are
usually installed by pkgsrc bootstrap.
2005-04-27 15:21:50 +00:00
jlam
7618926f30 Teach replace about mtree/MTREE. 2005-04-27 06:15:53 +00:00
jlam
a127769fb0 Fix typo. 2005-04-27 05:07:57 +00:00
jlam
d9de65c7ac Teach replace.mk about replacements for SH (shells/pdksh) and SHLOCK
(pkgtools/shlock).
2005-04-27 04:47:41 +00:00
jlam
4551017b68 Teach replace.mk about GTAR and PAX (replace with archivers/pax if
necessary).
2005-04-27 03:41:17 +00:00
jlam
43916c013f Teach replace.mk about cmp/CMP. 2005-04-26 23:20:35 +00:00
jlam
94265ac3ca To avoid errors, check that there is a TOOL variable associated with
the tool before we set it.
2005-04-26 22:51:00 +00:00
jlam
7940a4a8c3 Packages that want GNU m4 will probably still invoke it as "m4". 2005-04-26 22:31:34 +00:00
jlam
f9ae355e00 Merge findutils.mk into replace.mk. We now just use USE_TOOLS+=find
or USE_TOOLS+=xargs, and cause FIND and XARGS to point to the correct
commands.
2005-04-26 22:28:03 +00:00
jlam
6467dde017 If we're using one of the package's utilities, we're going to be using
them all, so make sure _TOOLS_USE_PKGSRC.* is set to "yes".
2005-04-26 22:20:42 +00:00
jlam
e8487f79c7 Continue the work in previous commit by making the code more
cut-n-paste-friendly for packages with large numbers of utilities.
2005-04-26 22:18:14 +00:00