Commit graph

95 commits

Author SHA1 Message Date
jlam
72f6164581 Teach the tools framework about nroff. 2005-05-26 21:46:13 +00:00
jlam
19ef841612 Teach the tools framework about "flex" so that packages can specify
that they require flex instead of any old lex.
2005-05-23 01:20:50 +00:00
jlam
163b6e6c2b Remove USE_TBL from pkgsrc and replace with USE_TOOLS+=tbl. 2005-05-22 21:04:41 +00:00
jlam
585534220c Remove USE_GNU_TOOLS and replace with the correct USE_TOOLS definitions:
USE_GNU_TOOLS	-> USE_TOOLS
	awk		-> gawk
	m4		-> gm4
	make		-> gmake
	sed		-> gsed
	yacc		-> bison
2005-05-22 20:07:36 +00:00
jlam
b3ff0bed40 Allow a tool to be passed to GNU configure scripts under more than
one name.
2005-05-22 01:56:27 +00:00
jlam
5792714269 For packages that use GNU configure scripts, pass the real command
paths for the tools that the package uses through the shell environment.
We do this since these paths may be hardcoded into package scripts,
and if they're not pre-specified, then they'll be searched for in the
PATH, which would find the ones in ${TOOLS_DIR}.

The variable names that GNU configure scripts expect are named in
_TOOLS_VARNAME_GNU.* for the various tools.
2005-05-21 23:09:36 +00:00
jlam
3b3b871622 Grammar 101 -- sentences should end in a period. 2005-05-21 04:53:17 +00:00
jlam
6cb4436e71 Add TNF copyright to the new tools framework makefiles. 2005-05-21 04:46:52 +00:00
jlam
28e2995cd1 We can only use the subst.mk framework if the files are relative to
${WRKSRC}.  Just directly create the msgfmt wrapper in the proper
target.  Also, note that the msgfmt handling should eventually migrate
to the tools framework so that build dependencies and binary paths are
correct.
2005-05-19 20:08:44 +00:00
jlam
10b0f8d012 Merge most of imake.mk into replace.mk and leave imake.mk to contain
the extra bits required by packages that use imake/xmkmf.  This
consolidates most of the replacement tools handling into replace.mk.
2005-05-19 05:27:25 +00:00
jlam
0e05f46639 Merge most of perl.mk into replace.mk and leave perl.mk to contain
the extra bits required by packages that use perl.  This causes
PKGSRC_USE_TOOLS+=perl to work properly.
2005-05-19 03:52:23 +00:00
jlam
2046497558 Properly deal with case where TOOL_DEPENDS.* is a list of values by
iterating over each dependency in the list.
2005-05-19 02:27:38 +00:00
jlam
5a008c838b Use nawk as the default "awk" replacement since it has no dependencies
and is still strong enough for pkgsrc use.
2005-05-18 05:31:55 +00:00
jlam
8c1f92916b Move perl handling into replace.mk. We now can specify USE_TOOLS+=perl
to note that we need the perl binary and the associated PERL5 and
TOOLS_PERL5 variable definitions.
2005-05-17 18:34:45 +00:00
jlam
a77257ee11 USE_GNU_TOOLS+=m4 should translate to USE_TOOLS+=gm4 to get the same
meaning.
2005-05-16 18:35:30 +00:00
jlam
3966d98d38 Treat USE_GNU_TOOLS+=yacc the same as USE_TOOLS+=bison, since there is
the implication that the system yacc(1) is not good enough anyway.
2005-05-16 16:28:54 +00:00
jlam
2338cbae27 Change the EXTRACT_USING_PAX defined/undefined option into a EXTRACT_USING
which can take multiple values -- "pax" or "gtar".  The default value
of EXTRACT_USING is "pax", which more closely matches reality since
before, we were using bootstrap "tar" for ${GTAR} and it was actually
pax-as-tar.  Also, stop pretending pax-as-tar from the bootstrap kit
or on NetBSD is GNU tar.  Lastly, in bsd.pkg.extract.mk, note whether
we need "pax" or "gtar" depending on what we need to extract the
distfiles.
2005-05-16 03:04:44 +00:00
jlam
0582157fdb Asking the tools framework for "bison" now provides two distinct tools:
"bison" and "bison-yacc".  bison is just a symlink to the real bison,
but "bison-yacc" provides a "yacc" in ${TOOLS_DIR} that does "bison
-y".  This allows the tools framework to provide everything that a
package might look for when asking for "bison" and avoids relying on
the bison being available in the PATH.
2005-05-15 23:20:38 +00:00
jlam
2e18822098 gzip-base installs "zcat" not "gzcat". 2005-05-15 22:34:43 +00:00
jlam
f680604f3c We want to check if we're in gzip-base to avoid circular dependencies on
gzip.
2005-05-15 22:33:08 +00:00
jlam
2adc6c7d19 Old versions of pax-as-tar don't do the right thing when invoked as
"gtar".  Force the gtar in the tools directory to be a wrapper script
so that we invoke the (possibly) pax-as-tar as "tar".
2005-05-15 03:27:20 +00:00
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