Commit graph

74 commits

Author SHA1 Message Date
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
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
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
f11ddc9186 Teach replace.mk about gzip, gunzip, and gzcat. 2005-04-24 03:59:44 +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
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
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
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