Commit graph

642 commits

Author SHA1 Message Date
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
2cbf83b8ed Let USE_TOOLS+=coreutils cause BASENAME, CAT, CHGRP, etc. to be overridden
to point to the pkgsrc versions of those tools.
2005-04-26 23:02:48 +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
jlam
ad6de2baf8 Make some code more cut-n-paste-friendly for packages that replace lots
of tools.
2005-04-26 22:10:53 +00:00
jlam
0958a8bb86 The gzip utilities aren't ever prefixed with ${GNU_PROGRAM_PREFIX}...
they're just "gzip", "gunzip" and "gzcat".
2005-04-26 21:57:44 +00:00
jlam
ec47def062 Fix conditions on grep and gzip so that if any of the TOOLS_IGNORE.* are
defined for their respective utilities, then we skip the processing to
avoid dependency loops.
2005-04-26 21:56:13 +00:00
jlam
e20d622f80 Sort the tool-specific sections for easier browsing. 2005-04-26 19:15:38 +00:00
jlam
5929e7de0c The gawk and gsed tools are called "awk" and "sed" under ${TOOLS_DIR}
since that's how most applications expect to invoke awk and sed.
2005-04-26 19:14:42 +00:00
jlam
99b5f1546f Rename the "sed" option for USE_TOOLS to "gsed" to note that we want
GNU sed.
2005-04-26 19:11:25 +00:00
jlam
82a12c033d Fix typo. 2005-04-26 19:01:30 +00:00
jlam
384c3b3c0c Only set the "TOOL" variable if it was associated with the corresponding
<tool>.
2005-04-26 18:59:48 +00:00
jlam
6860de7f8a PLATFORM_TOOL.<tool> is meant to be set like the "TOOL" variable, so
also create either a wrapper or a symlink depending on whether it has
any arguments or not.  While we're here, correct the comment block to
include a description of PLATFORM_TOOL.*.
2005-04-26 16:19:37 +00:00
jlam
191dd8648a As of bsd.tool.mk:1.6, TOOLS_CMD.<tool> defaults to
${TOOLS_DIR}/bin/<tool>, so remove redundant settings.
2005-04-26 15:32:05 +00:00
jlam
cb7d0584c0 Make the wrapper and the symlink default to the same name under the tools
directory -- ${TOOLS_DIR}/bin/<tool>.
2005-04-26 14:47:15 +00:00
jlam
9ff151f408 If PLATFORM_TOOL.<tool> is defined for a particular tool, then use it
instead of the pkgsrc version of the tool.  This is an alternative to
adding the appropriate platform to the _TOOLS_USE_PLATFORM.* tables.
2005-04-25 06:16:38 +00:00
jlam
6c70da15ee Alphabetize the platform tools lists. 2005-04-24 23:32:09 +00:00
jlam
ef65ba9109 Platforms that have GNU grep also have egrep and fgrep. 2005-04-24 23:28:20 +00:00
jlam
ab964a1c1f MAKEINFO usually has "makeinfo" plus arguments, so use a wrapper instead
of a symlink.
2005-04-24 22:57:23 +00:00
jlam
18a34b1575 Rename "m4" to "gm4" to more explicitly note that we want GNU m4. The
tool name under ${TOOLS_DIR} is still "m4".
2005-04-24 22:42:00 +00:00
jlam
b585711b14 Rename "awk" to "gawk" to make it more explicit that we want GNU awk
(probably for gensub() ).
2005-04-24 22:34:35 +00:00
jlam
1ce0bfab80 Use bsd.tools.mk to generate the wrapper script. Also, TOOLS_EXECDIRS
is no more, so search for rpcgen in /bin, /sbin, /usr/bin, and /usr/sbin.
2005-04-24 04:34:34 +00:00
jlam
f11ddc9186 Teach replace.mk about gzip, gunzip, and gzcat. 2005-04-24 03:59:44 +00:00
jlam
057ad9f56c Correct the use of quotes when using echo. 2005-04-24 03:54:29 +00:00
jlam
b9ba5fb74b If "TOOL" is already defined, then we don't need to redefine it. 2005-04-24 03:41:10 +00:00
jlam
52777660e0 Rewrite code for using system-supplied tools so that we can replace
tools that are defined as a command plus arguments, e.g. for gunzip,

	GUNZIP=	/usr/bin/gzip -d

In this case, we generate a wrapper script that invokes the real
command plus arguments.  If there are no arguments, then just symlink
the command for simplicity.

Also, restructure the tool-specific blocks so that we always define
TOOLS_CMD.<tool> to the correct name (important for yacc/bison), and
check that the real command actually exists before assigning it to
the "TOOL" name.
2005-04-24 03:07:36 +00:00
jlam
6c2f242248 Improve the documentation in the header comments. 2005-04-22 05:23:12 +00:00
jlam
e1606f16ff Remove the search for TOOLS_REAL_CMD.<tool> in ${TOOL_EXECDIRS}. This
behavior is deemed too undeterministic and too complex for bsd.tools.mk,
which should just be providing simple building blocks for creating
simple wrappers and symlinks.  These searches are better implemented
elsewhere.
2005-04-22 04:22:37 +00:00
jlam
dfd7ca6531 MAKE_PROGRAM should already be a full path, so don't bother with the
check.
2005-04-22 04:19:26 +00:00
jlam
935fb20230 Avoid using a for loop (optimization) which also broke when using the
bootstrap bmake.
2005-04-22 02:29:28 +00:00
jlam
e5be01e361 Make sure that USE_TOOLS contains all of "grep egrep fgrep" if it
contains any one of them.  This causes the final loop to correctly
set TOOLS_REAL_CMD.{grep,egrep,fgrep} for all three tools.
2005-04-16 05:16:29 +00:00
jlam
03225a6007 Consolidate the egrep/fgrep/grep cases into a single case as an example
of how to make on pkgsrc package replace multiple related tools.
2005-04-15 17:55:33 +00:00
jlam
6fd70ecd8b Teach replace.mk about egrep, fgrep, and file. 2005-04-15 16:01:23 +00:00
jlam
e859cd5c5f Allow for USE_TOOLS+=coreutils and USE_TOOLS+=findutils to use pkgsrc
replacements for "core" and "find" utilities, e.g. basename, cat, find,
etc.
2005-04-15 07:33:43 +00:00
jlam
2dd44d3004 Allow TOOLS_DEPENDS.<tool> to be set to change the nature of the
dependency if we're using the pkgsrc tool, e.g.
TOOL_DEPENDS.yacc=DEPENDS.  By default, we use BUILD_DEPENDS.
2005-04-15 06:52:25 +00:00
jlam
1f5cfd3416 Avoid dependency loops by setting and checking TOOLS_IGNORE.* guards. 2005-04-15 05:30:48 +00:00
jlam
32d9220281 Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing.  To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.

The major changes from the old tools framework are:

(1) The new interface to using the tools framework is through setting
    USE_TOOLS in the package Makefile, e.g.,

	USE_TOOLS+=	autoconf gmake yacc

(2) Bison/yacc handling is improved.  Instead of adding checks for
    /usr/bin/yacc to the package Makefile and explicitly setting YACC,
    e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
    If bison is explicitly required, then add "bison" to USE_TOOLS
    instead.

(3) GNU auto* tools are handled differently.  "autoconf", "aclocal",
    "automake", etc. will be tools in ${TOOLS_DIR} that point to the
    correct versions of the auto* tools.  Instead of patching Makefiles
    or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
    versions of the tools will be called if they are invoked simply
    by their bare names.  This is selected by adding either "autoconf"
    or "autoconf213", or "automake" or "automake14" to USE_TOOLS.

The new tools framework will deprecate the following variables:

	ACLOCAL		AUTORECONF
	AUTOCONF	BUILD_USES_GETTEXT_M4
	AUTOHEADER	USE_GNU_TOOLS
	AUTOMAKE	USE_TBL

The new tools framework will deprecate the following *.mk files:

	mk/autoconf.mk
	mk/automake.mk
	mk/tools.mk

Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 00:00:21 +00:00