Commit graph

132 commits

Author SHA1 Message Date
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
29988e2252 Make TOOLS_REAL_CMDLINE_DFLT.<tool> into a publicly-readable value. 2005-05-15 03:09:52 +00:00
jlam
2f3b9ec6f2 Make implementation match documentation for when a wrapper is created and
when a symlink is created.
2005-05-15 01:17:05 +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
42d411e6b9 Temporarily define TAR here until I figure out a better way to deal
with TAR vs. GTAR.  This fixes pkg_install not being created with a
tar command.
2005-05-14 20:05:05 +00:00
jlam
e692366547 The mk/tools/defaults.mk is included by bsd.prefs.mk, so it must include
other files without making assumptions about the location of the top of
the pkgsrc tree.  This fixes problems with running "make bulk-cache"
in /usr/pkgsrc (PR pkg/30288).
2005-05-14 19:01:14 +00:00
rillig
31952ae630 Typo: if exists /bin/gzip, use /bin/gzip (not /usr/bin/gzip). 2005-05-14 10:19:36 +00:00
rillig
064ca17fa9 Fixed a typo: now using /usr/sbin/gzcat, like in platform/IRIX.mk. 2005-05-14 10:17:10 +00:00
rillig
1eddab530b Fixed a typo when looking for /usr/bin/cmp. 2005-05-14 10:14:29 +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
rillig
6c2804ebbe Fixed typo in finding grep(1). 2005-05-14 01:25:19 +00:00
rillig
fb358b0e89 Fixed two obvious typos that leaded to syntax errors. 2005-05-14 01:04:37 +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
rillig
ca96c47d1e Fixed a typo in the comment. 2005-05-13 21:00:12 +00:00
minskim
a96a4d2bc8 if-if-endif -> if-elif-endif 2005-05-13 19:53:08 +00:00
jlam
1ee9760a81 Teach the new tools framework more about perl. We include perl5/vars.mk
in mk/tools/perl.mk since many packages expect to be able to use the
variables defined in vars.mk, but those variables can only be defined
if PERL5 is correctly defined, and that is only true after it is set
here.
2005-05-12 21:03:46 +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
5e67c262e4 Needing automake implies needing autoconf. Match the version requirements
outlined in mk/automake.mk.
2005-05-11 20:21:32 +00:00
jlam
840f6f2978 Rewrite so that we avoid needing to check the value of TOOLS_REAL_CMD.*
within make.  This allows us to use EVAL_PREFIX to locate the installation
prefix for autoconf and automake, which is more pkgviews-friendly.  In any
case, this implementation is a lot simpler anyway.
2005-05-11 20:09:44 +00:00
jlam
bb022af73a Use EVAL_PREFIX to be pkgviews-friendly. 2005-05-11 19:42:17 +00:00
jlam
0536415df7 Rewrite logic that defines the targets that create the tools under
${TOOLS_DIR} so that we avoid inspecting various variables during the
top-level make invocation -- rather, we defer inspection until the
target is actually made.  This allows TOOLS_REAL_CMDLINE.*,
TOOLS_REAL_CMD.*, and TOOLS_REAL_ARGS.* to be defined after bsd.tools.mk
is included and still affect the creation of the tools under ${TOOLS_DIR}.
2005-05-11 08:41:50 +00:00
jlam
62c0222458 Don't forget to pass the rest of the command-line arguments "$@" to
the command, or else the wrapper will ignore all of its arguments.
This fixes the rpcgen script to actually work.
2005-05-11 05:44:58 +00:00
jlam
52a8db644e Fix the makeinfo wrapper to actually accept arguments by fixing the
value of TOOLS_REAL_CMDLINE.makeinfo.  In this case, we split MAKEINFO
into the command and the arguments, and allow the default command line
to be constructed.
2005-05-11 05:43:48 +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
029735c838 It's actually /usr/contrib/bin/gawk. 2005-05-10 21:15:22 +00:00
jlam
fb1593ba8b Split out ldconfig handling from the USE_TOOLS processing in replace.mk.
This makes more sense since there is never going to be a pkgsrc
replacement for ldconfig.  We now always create an ldconfig tool in
${TOOLS_DIR} that either calls the system-supplied one if it exists,
or is a no-op.
2005-05-10 20:14:27 +00:00
jlam
ef1665c54f Remove conditional expression from tools.*.mk files. Strip handling has
moved to its own file, and we only need to define TOOLS_PLATFORM.strip
if it actually exists on the system.
2005-05-10 19:56:51 +00:00
jlam
137ec423f9 Split out "strip" from the USE_TOOLS processing in replace.mk. Instead,
we create a "strip" tool unconditionally, and make it either a no-op or
the real thing depending on the whether we want unstripped files or not.
2005-05-10 19:52:30 +00:00
jlam
f97b83c30b TOOLS_CREATE has replaced TOOLS_{SYMLINK,WRAP}. 2005-05-10 19:34:02 +00:00
jlam
e8fbc39538 Fix typo in comment. 2005-05-10 19:25:06 +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
7aa40022bd TOOLS_ALIASES.<tool> can be set to the list of names that should also be
created under ${TOOLS_DIR} that invoke <tool>, e.g.

	TOOLS_ALIASES.gawk=	awk

The example above causes the "gawk" tool to be added to ${TOOLS_DIR} as
both "gawk" and "awk".
2005-05-10 18:42:59 +00:00
jlam
1e0343b80b Remove redundant variable definitions that simply match their defaults. 2005-05-09 02:43:06 +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
90726c6163 IRIX and Interix use the install-sh script from bootstrap as their install
tool.  This is handled directly within bootstrap.mk, so remove these
unnecessary definitions.
2005-05-05 18:59:25 +00:00
jlam
05f46273d6 Interix has /bin/strip. 2005-05-05 18:47:00 +00:00
jlam
e04b9022ad Back out previous change as it was accidentally committed with some other
changes.
2005-05-04 06:44:45 +00:00
jlam
91092c5789 Teach the new tools framework about ${STRIP}, which is used in some
packages to strip installed executables.  If INSTALL_UNSTRIPPED ==
"yes", then we create a "strip" wrapper in ${TOOLS_DIR} that just
calls ${TRUE} by considering ${TRUE} the system-supplied strip command.
2005-05-04 06:42:43 +00:00
jlam
87e59af8e3 If we're using the tools from the packages, set TOOLS_REAL_CMD.*
unconditionally so they will correctly refer to the packages' tools.
2005-05-04 06:25:59 +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
dbbc7d55d0 Darwin has /usr/bin/lex and /usr/bin/yacc according to:
http://darwinsource.opendarwin.org/10.3/pbx_jamfiles-237/commands.jam
2005-05-03 21:06:14 +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