Commit graph

4456 commits

Author SHA1 Message Date
jlam
a95ee34254 Revert part of revision 1.18. The new quoting was breaking some
assumptions being made by the USE_PKGLOCALEDIR code and the wrapper
framework since it added backtick expressions to the SUBST_FILES.*
variables, which were being mangled by the :Q modifier.  This is
evident when running "make regress" in regress/buildlink-unwrap.

Mea culpa.
2005-05-20 18:40:42 +00:00
dmcmahill
69dfa5b1c2 Rework how the lookup of binary packages in the cache is performed.
As data for a given binary package is loaded, increment a count
stored with PKGPATH as the index.  Then use a psuedo-multidimensional
array with PKGPATH and the # as the index.  This allows for much
faster lookups and scales linearly with the number of packages.
The old way scaled as the product of the number of pkgsrc entries
and the total number of binary packages.  Not a pretty value.

This makes the actual README.html generation part run about 3x faster.

Approach suggested by soda.
2005-05-20 04:39:44 +00:00
jlam
62acf70ba6 Only add the autoconf tool if the user also requested automake. This
avoids making autoconf required by every package in pkgsrc.
2005-05-20 03:08:45 +00:00
jlam
5a4310c9a2 Move the PLIST_SUBST lines that substitute for PERL5_* variables from
perl5/module.mk into tools/perl.mk so that the substitution occurs for
all packages that use perl.
2005-05-20 03:00:16 +00:00
jlam
169a6feefa Properly quote dependency to avoid creating garbage files in the pkgsrc
tree.
2005-05-20 02:57:23 +00:00
jlam
53e42fcf42 Based on the value of ${AUTOCONF_REQD}, choose the right autoconf tool
to use.  This fixes packages that want automake-1.4, but autoconf-2.50.
2005-05-20 02:40:23 +00:00
dillo
00369f3c0a list all the extracted variables, not just some of them 2005-05-19 22:58:21 +00:00
dmcmahill
49e27f3b48 make local variables in a few functions be local 2005-05-19 21:11:24 +00:00
kristerw
9fbb603b11 Use MACHINE_ARCH instead of arch to be consistent with things like the
subject line in the bulk mail.  This also prevents the quoting problem
on Darwin, where arch contains a space.
2005-05-19 20:56:36 +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
kristerw
ec780b54f1 Convert the last remaining usage of GTAR to use PAX instead. 2005-05-19 19:50:25 +00:00
jlam
a743d24806 Use PAX instead of GTAR since pax is provided on all systems while gtar
isn't.
2005-05-19 19:24:59 +00:00
dillo
7ca1903079 wiz says ``avifile is dead; i killed it'' 2005-05-19 19:20:29 +00:00
jmmv
f3d2e84d49 Add ku locale, used by gnome-backgrounds-2.10.1. 2005-05-19 16:45:33 +00:00
jlam
87110dbd7b PERL5_PKGSRCDIR is no more. Explicitly use "lang/perl58" for the
location of the perl package to install for bulk builds.
2005-05-19 15:18:13 +00:00
dmcmahill
e6574d0456 allow spaces after the "=" in the .pkgcache files. This was noted with
some of the older packages on ftp.netbsd.org.  For example,
pkg_info -B ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5.2/vax/All/cascade-1.4.tgz
will give

OPSYS= NetBSD

instead of

OPSYS=NetBSD
2005-05-19 11:46:40 +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
dmcmahill
82b5d7feb9 - if the mv of the temporary cache file to the real one fails, usually
due to a directory permissions error, then error out.

- when the master cache has just been newly created, don't also report
  that the master cache is up to date.

Both were suggested by Christian Hattemer.
2005-05-19 03:58:40 +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
dmcmahill
6d38639554 if the top level package cache file does not exist then exit with
a fatal error.  Noted by Christian Hattemer.
2005-05-19 03:50:39 +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
15cc40e17f The example is missing a definition for PKG_OPTIONS_VAR. 2005-05-19 01:15:57 +00:00
rillig
296e86963f Replaced the NO_WRKDIR_SYMLINK variable with CREATE_WRKDIR_SYMLINK, as
suggested by Alistair. If you don't want the symlinks, set the variable
to "no".
2005-05-18 23:59:44 +00:00
jlam
d6f6120540 Goal: Remove USE_PERL5 from pkgsrc.
Plan:
	(1) Change USE_PERL5=build into USE_TOOLS+=perl.
	(2) Change all other USE_PERL5 into including perl5/buildlink3.mk.

Possibly, for packages that don't actually build anything with perl,
but merely require it for the perl interpreter, we can instead do:

	USE_TOOLS+=		perl
	TOOLS_DEPMETHOD.perl=	DEPENDS

but this is more verbose than simply including the perl5/buildlink3.mk
file.

Move the PERL5_REQD computation into a lang/perl5/version.mk file,
and only do the USE_PERL5 logic in bsd.pkg.use.mk if we're not using
the new tools framework.  This consolidates all of the perl-handling
into two places -- lang/perl5 and mk/tools/perl.mk.
2005-05-18 22:42:07 +00:00
sketch
7cdf1cbaf4 Reinstall BULK_PREREQ before running the post-build script as there may be
dependancies required for that script, an smtpd for example, as well.
2005-05-18 20:12:49 +00:00
rillig
e6648d55fb If NO_WRKDIR_SYMLINK is defined, no symlink to ${WRKSRC} is created when
the WRKOBJDIR is set explicitly. This allows for having pkgsrc mounted
r/w without actually modifying it.
2005-05-18 19:42:01 +00:00
tv
6dd847be9f Since there may have been merge errors in libtool-base 1.5.18, force
LIBTOOL_REQD to 1.5.18nb1.
2005-05-18 14:41:50 +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
dmcmahill
afce691e43 make use of the new tools framework via the prereq-readme package to
extract tools needed for the README.html generation.  Suggested by
Johnny Lam and Rolland Illig.
2005-05-18 04:51:35 +00:00
rillig
eba78b2381 Removed the quoting for SUBST_MESSAGE.<class>. Most packages unnecessarily
define that inside double quotes.
2005-05-18 03:33:51 +00:00
jlam
d17d2e4a4f perl.mk was moved from being included by bsd.tools.mk to replace.mk.
Since replace.mk has its own loop to add dependencies, we can remove
the one from perl.mk.
2005-05-18 03:14:01 +00:00
rillig
8a83e6b802 Added the show-tools target, which emits a shell code fragment defining all
tools known to the pkgsrc infrastructure.
2005-05-18 02:52:38 +00:00
jlam
3823422ca7 If USE_TOOLS has "perl" then also define PERL5_PKGSRCDIR for use by
mk/tools/perl.mk.  This fixes broken dependencies on perl where the
path to the package wasn't defined.
2005-05-17 22:49:55 +00:00
jlam
39cbd126b0 Make USE_TOOLS+=imake imply USE_X11BASE=yes, along with the other
variable definitions that apply when USE_IMAKE is defined.
2005-05-17 22:22:52 +00:00
jlam
26e97aafd5 _tar.gz is a recognized suffix, so recognize that we need the right tool
to untar the archive.
2005-05-17 22:11:14 +00:00
jlam
876fcd9d31 Turn _MANCOMPRESSED into a strictly "yes" and "no" variable
(case-sensitive) to simplify writing the do-install target code that
automatically compresses or decompresses man pages after installation.
2005-05-17 22:07:56 +00:00
dmcmahill
832614bc4c Rework the README.html generation code. Major changes are:
- completely redo the code which decides on the machine architecture,
  operating system, and operating system version for the binary packages.
  The old way just used to directory names to take a guess.  The new
  way creates a cache file containing meta-data for all the binary packages
  in each "All" directory.  This cache file is consulted when generating
  the lists of available binary packages.  The meta-data is obtained with
  pkg_info so it should always be correct even if you do something silly
  like mix OS_VERSION or MACHINE_ARCH packages up in the same directory.

  Among the benefits are:  works when PACKAGES is not $PKGSRC/packages,
  works with a more or less arbitrary subdirectory structure, works
  when there are subdirectories for multiple operating systems.

  This portion of the fix should address PR25390.

  The cache files are only updated when the contents of an "All" directory
  changes or if the cache file format changes.  There is some room for
  improving the updating of the cache files, but its not too bad the way
  it is.

- fix up some of the awk code so that generadme.awk works with Solaris
  nawk as well as NetBSD's nawk and gawk (for pre-2.0 systems).

- remove some "if ! foo" shell constructs to increase portability.

- be more consistent with what variables get passed to mkreadme from
  make and which ones are determined automatically.  Mostly this meant
  moving stuff into mkreadme to make it easier to run it standalone.
2005-05-17 21:46:59 +00:00
jlam
0f437f77f6 Allow tweaking of options to pax/tar via EXTRACT_CMD_OPTS.*. 2005-05-17 21:34:29 +00:00
jlam
d3bca7af85 Missed (harmless) rename of "fuzz" to "fuzz_flags". 2005-05-17 19:11:02 +00:00
jlam
9513935c48 Simplify by using a for loop instead of "set -- ...; while ... done".
Also, rename "fuzz" to "fuzz_flags" to clarify that it's a set of flags
and should be used unquoted.  Output from rilligd :)
2005-05-17 19:08:30 +00:00
rillig
e251db98e2 The sunpro wrapper now creates aliases for gcc and g++, too. This is needed
because the <sys.mk> Makefile fragment sets CC?=gcc.
2005-05-17 19:06:21 +00:00
rillig
feabae83e2 Fixed shell quoting. Reviewed by jlam. 2005-05-17 19:01:36 +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
schmonz
fa12e66df0 Excise DJB_CONFIG_DIR. 2005-05-17 08:42:24 +00:00
jlam
62c3dfb798 Save the names of the patches applied during the patch phase into the
patch cookie file, one per line.  A package with no patches applied
will have a patch cookie file with no lines (zero bytes).
2005-05-17 06:31:00 +00:00
jlam
25dcb2dc7a We only need to run the apply-pkgsrc-patches target if the patches
directory or the local patches directory exist.  Also, emit the message
informing the user that pkgsrc patches are being applied that was lost
in the previous commit.
2005-05-17 05:00:06 +00:00
jlam
a546eb83fd Split up the do-patch target into two distinct targets --
apply-distribution-patches and apply-pkgsrc-patches.  Rewrite the
latter code to be more "whitespace-friendly" and to not need to invoke
${AWK} as many times.  Drop support for PKGSRC_SHOW_PATCH_ERRORMSG
and simply always show the error message.
2005-05-17 04:45:53 +00:00
jschauma
a3fb779cec When generating the report, add a list of top ten offenders at the top.
This makes it easy for people to track down which packages should receive
immediate attention.
2005-05-16 19:11:19 +00:00
jlam
f009001837 In the autoconf213 case, the AUTO* variables should point to the
TOOLS_CMD.* variables for the -2.13 variants.  Otherwise, they're
empty, which causes errors for packages that use ${AUTOCONF}.
2005-05-16 18:54:06 +00:00
jlam
482689cdaa NetBSD's (and bootstrap's) pax-as-tar is GNUish enough to extract most
GNU tar archives.  Create a new EXTRACT_USING value "nbtar" that causes
tar/ustar archives to be extracted using pax-as-tar, which understands
most GNU tar extensions.  Default to EXTRACT_USING=nbtar, as quite a
few packages are distributed in GNU tar archives.
2005-05-16 18:43:20 +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
e87497f3c3 Don't have USE_TOOLS+=imake replace USE_IMAKE. Rather let the former
specify that imake is used by the package, while the latter triggers
the special do-configure process.
2005-05-16 18:01:12 +00:00
jlam
06697c97a8 Add missing required argument to msg_log. 2005-05-16 17:54:51 +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
d48540d243 Fix mistake in previous commit -- expr is required by the wrapper
framework.  Problem & fix from tron@.
2005-05-16 15:20:15 +00:00
rillig
7168c9aa72 Changed option processing to evaluate the options strictly from left to
right in each variable, starting with the most generic one. Later
definitions override earlier ones. This makes the ``order'' testcase in
regress/pkg-options succeed.
2005-05-16 09:08:29 +00:00
jlam
4a3b99d323 No package seems to be using ${NICE} so don't require it. 2005-05-16 05:11:51 +00:00
jlam
1b0d713866 Don't require m4 for all packages, only for packages that use it. 2005-05-16 05:09:21 +00:00
jlam
e3326eaf55 tee is only used by bsd.bulk-pkg.mk. 2005-05-16 04:54:11 +00:00
jlam
86c375af36 We only need "date" to write the date into the +PRESERVE file. 2005-05-16 04:48:05 +00:00
jlam
6d30b7cae1 expr is only used by bsd.bulk-pkg.mk. 2005-05-16 04:39:04 +00:00
jlam
242f38689e tsort is only used by bsd.bulk-pkg.mk. 2005-05-16 04:30:41 +00:00
jlam
ed2ba77faa Document EXTRACT_USING in bsd.pkg.extract.mk where it is used. 2005-05-16 04:22:40 +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
e61f25dea9 We only need mtree if NO_MTREE isn't defined. 2005-05-16 00:11:50 +00:00
jlam
71215ccade Consolidate the bits that add to PKGSRC_USE_TOOLS, and improve the
comment for shlock.
2005-05-16 00:00:35 +00:00
jlam
bff1867aa9 Don't forcibly set XMKMF -- allow the package to override it if necessary. 2005-05-15 23:27: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
94ed41f339 In the tools framework, check that the directory doesn't exist before
creating it in case ${MKDIR} can't handle that situation.
2005-05-15 22:53:57 +00:00
jlam
f6bb82897e MAKE_PROGRAM:T isn't necessary... we can just call "make", and the PATH
is already properly constructed to call the one in ${TOOLS_DIR}, which
symlinks to the correct make tools.  From rillig@ in private mail.
2005-05-15 22:50:53 +00:00
jlam
2205e39726 Linux xargs is probably GNU xargs, so we need to invoke it with "-r".
From schwarz@ in private mail.
2005-05-15 22:37:46 +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
4298b295a5 gzip and gunzip don't exist on IRIX 5 so wrap then in existence checks.
Ditto for mailx.  Lastly, /usr/bsd/zcat isn't gzcat (doesn't understand
gzipped files), so don't use it as a gzcat replacement.  Changes from
Georg Schwarz in private email.
2005-05-15 22:31:50 +00:00
jlam
f1c74f3251 Fix the MANZ handling in bsd.pkg.mk. If MANZ is defined, then we want
the final man pages to be compressed.  If MANZ is not defined, then
we want the final man pages to be uncompressed.

We need to figure out if during installation, we need either gunzip
or gzip to decompress or compress the installed man pages.  If a
package sets MANCOMPRESSED to "yes" or "no", then it's an indication
to the install code that the package itself installed the man pages
either compressed or uncompressed.  If a package sets
MANCOMPRESSED_IF_MANZ, then the package uses BSD-style makefiles, so
we need to determine if the BSD-style makefile causes the man pages
to be compressed or not.  In this case, we need to check in PKGMAKECONF
whether MANZ is set or not.

XXX Perhaps we should also check for MKMANZ if a package uses BSD-style
XXX makefiles?
2005-05-15 21:32:42 +00:00
jlam
75b0b9c5cc If we're using xpkgwedge, we need to force using pkgxmkmf so that we
pick up the xpkgwedge imake config files.
2005-05-15 18:37:44 +00:00
jlam
3ffba337c3 We only need gzcat when requested by the extract and patch phases, or
if the package itself requests it.
2005-05-15 05:05:47 +00:00
jlam
e0fd563afe distfiles that end in .Z require gzcat as part of the extraction process. 2005-05-15 03:57:21 +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
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
380f32d155 We also need a patch tool if there are patches for the package in
${LOCALPATCHES}.
2005-05-14 22:32:59 +00:00
jlam
3d3f88a72e Add the *cat tools needed by the patch phase to output the contents of
distribution patches to stdout.
2005-05-14 22:31:04 +00:00
rillig
af901ae040 Rewrote the show-depends-dirs target: fixed shell quoting, omitted
duplicates in the output, output warnings if necessary. The $$dlist at
the end is unquoted intentionally to omit spaces in the output.
Approved by jlam.
2005-05-14 22:19:07 +00:00
jlam
72de3f921e Document the variables and targets defined by bsd.pkg.patch.mk. 2005-05-14 22:12:01 +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
45e08b1210 Separate out the variables and targets for the "patch" phase into a
separate file pkgsrc/mk/bsd.pkg.patch.mk.  Also, include this file
ahead of the inclusion of bsd.tools.mk so that tools required to
patch are created by the tools framework.
2005-05-14 19:37:53 +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
335f53d761 If we use the new tools framework, the _USE_GMAKE is unnecessary as we
simply check for whether "gmake" is in USE_TOOLS.
2005-05-14 07:15:29 +00:00
jlam
2cc6e59e11 compiler.mk uses the following tools to compute the values of variables
at the time that they're defined: ${AWK}, ${GREP}, ${SED}, ${TRUE}.
Move the inclusion of compiler.mk below the inclusion of bsd.tools.mk
so that these variables are properly defined by the time they are
used.  This should fix problems where pkgsrc gcc was not being properly
detected when using the new tools framework.

This change has the side effect of changing the relative order of the
compiler directories and the tool directory in the PATH, but this has
no impact on existing packages, and actually makes more sense anyway.
2005-05-14 06:04:44 +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
676abf4b91 Simplify the check for whether we need a patch tool or not -- we simply
check for whether ${PATCHDIR} exists or not, or whether PATCHFILES is
defined or not.  This avoids the use of != in a variable definition
just to find out if we need patch or not.
2005-05-14 04:26:15 +00:00
rillig
fc4a97a8d8 Don't process the file if either of PKG_SUPPORTED_OPTIONS or PKG_OPTIONS_VAR
is undefined. This avoids many unnecessary make(1) warnings. As this file
is only intended to be used from packages, don't look for obsolete.mk in
other directories than ../../mk/defaults/.
2005-05-14 02:17:43 +00:00
rillig
eef497fdb0 Found another two uses of .ifndef and .ifdef.
Converted them to .if [!]defined().
2005-05-14 02:03:00 +00:00
rillig
d278d86d01 Replaced .ifdef with .if defined() and .ifnded with .if !defined(). This
will allow better error checking.
2005-05-14 01:51:52 +00:00
rillig
b82fa5067b Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
will allow better error checking in Makefiles.
2005-05-14 01:50:38 +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
a568e01cf3 Rewrite command to compute the installation prefix of a package to not
use awk -- a simple shell statement list suffices.
2005-05-13 23:37:54 +00:00
rillig
ca548bf623 Moved checking if ${SHLOCK} exists into the shell code fragment that
acquires the lock. This had to be done for the new tools framework and
because of the weird order of things in bsd.pkg.mk. Approved by jlam.
2005-05-13 22:22:44 +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
1fdc85c394 Don't check for ${SHLOCK}, which isn't defined yet that early in
bsd.pkg.mk under the new tools framework.  Instead, just note that if
we set PKGSRC_LOCKTYPE, that pkgsrc will require shlock.  Remove
"shlock" from the large PKGSRC_USE_TOOLS list since we don't need it
all of the time.  This fixes PKGSRC_LOCKTYPE != none when using the
new tools framework.
2005-05-13 21:13:01 +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
1c0da3d742 Make _USE_NEW_TOOLS default to "yes" to turn on using the new tools
framework.  This has been tested by successfully building a meta-package
that pulled in 81 dependencies during the installation.
2005-05-13 17:22:43 +00:00
jlam
cd4f3767d3 Change references to M4 & YACC into TOOLS_M4 & TOOLS_YACC to simplify
transition to new tools framework.
2005-05-13 16:54:12 +00:00
jlam
564a72cde1 postgresql80-client is the correct BUILDLINK_PACKAGE word to use when
referring to BUILDLINK_* variables.
2005-05-12 22:19:16 +00:00
jlam
bdde62cc40 Adding "${GREP} ." into pipeline that I inadvertently left out when
moving the EVAL_PREFIX code from bsd.pkg.mk to find-prefix.mk.
2005-05-12 21:56:11 +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
436d9bbbd5 Instead of structuring code so that variables defined by the EVAL_PREFIX
loop are only used afterwards, split out the EVAL_PREFIX code into a
separate file find-prefix.mk that can be included at any point to
generate a prefix-computation for the variables specified by FIND_PREFIX
at the inclusion point.
2005-05-12 20:41:10 +00:00
jlam
69406c81f0 Don't check for whether variables are defined or not before adding
them to PLIST_SUBST.  They may simply be defined later on in the
Makefile processing.  Instead check whether USE_PERL5 was specified
to determine whether to pass along PERL5_{SITEARCH,SITELIB,ARCHLIB}
to PLIST_SUBST.
2005-05-12 20:31:56 +00:00
jlam
78bb5672f0 Only cache the variable if it's been defined. 2005-05-12 18:07:30 +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
714ab3325d There's no need to check for EXTRACT_SUFX when figuring out whether we
need to use bzcat for patches.  bsd.pkg.extract.mk can figure out
independently whether bzcat is needed for distfiles.  This fixes
PR pkg/30206.
2005-05-12 01:14:05 +00:00
jlam
f08ed08387 Under the new tools framework, we use TOOLS_AWK to represent the awk
program that the software itself uses.  Duplicate that using the old
framework to ease integration.
2005-05-11 22:19:00 +00:00
jlam
34ecbb9d9b Make these two files aware of the new tools framework to ease integration.
These files would normally go away after packages have been taught to
replace including autoconf.mk with "USE_TOOLS+= autoconf", and similarly
for automake.mk.
2005-05-11 22:17:26 +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
tv
c5d2c9dd6a Ditto citkit.dl.sourceforge.net. 2005-05-11 15:52:14 +00:00
tv
a00ed630f7 Remove belnet.dl.sourceforge.net; it may as well be completely dead. 2005-05-11 15:51:09 +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
0e589ad8af Separate out the variables and targets for the "extract" phase into a
separate file pkgsrc/mk/bsd.pkg.extract.mk.  Also, include this file
ahead of the inclusion of bsd.tools.mk so that tools required to
extract are created by the tools framework.
2005-05-11 04:01:49 +00:00
jlam
962622ba7d Rename mk/bsd.pkg.install.mk to mk/install/bsd.pkginstall.mk to
consolidate the files for that framework in one directory.
2005-05-11 02:07:37 +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
06b6c2b595 In make variables, quotes protect embedded whitespace in words, so we
can replace :C/^ *//:C/ *$// with :M* to get the same effect -- removing
leading and trailing whitespace and extra spaces between words.
2005-05-10 01:34:04 +00:00
kristerw
1400eaeabd Do not add the things in pkgsrc/regress to the bulk build since they
are not meant to be built -- regress testing is done using the
pkgtools/pkg_regress tool.
2005-05-09 16:03:58 +00:00
xtraeme
7b05cc47b6 Add a small Makefile fragment for packages requiring X11 clients
apps. Used at the moment for X11_TYPE=[xorg|XFree86] to fix
the build/installation of some packages, see
http://mail-index.netbsd.org/tech-pkg/2005/05/05/0024.html
for more information.

To switch between 'build' or 'full' dependency method use:

X11CLIENTS_DEPMETHOD=[full|build]
2005-05-09 13:01:29 +00:00
jlam
03e9337879 Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
caches variable definitions that were computed by make.  These variables
are specified by listing them in MAKE_VARS, e.g.,

	.if !defined(FOO)
	FOO!=	very_time_consuming_command
	.endif
	MAKE_VARS+=	FOO

bsd.pkg.mk will include only the one generated during the most recent
phase.  A particular phase's makevars.mk file consists of variable
definitions that are a superset of all of the ones produced in previous
phases of the build.

The caching is useful because bsd.pkg.mk invokes make recursively,
which in the example above has the potential to run the very time-consuming
command each time unless we cause FOO to be defined for the sub-make
processes.  We don't cache via MAKE_FLAGS because MAKE_FLAGS isn't
consistently applied to every invocation of make, and also because
MAKE_FLAGS can overflow the maximum length of a make variable very
quickly if we add many values to it.

One important and desirable property of variables cached via MAKE_VARS
is that they only apply to the current package, and not to any
dependencies whose builds may have been triggered by the current
package.

The makevars.mk files are generated by new targets fetch-vars,
extract-vars, patch-vars, etc., and these targets are built during
the corresponding real-* target to ensure that they are being invoked
with PKG_PHASE set to the proper value.

Also, remove the variables cache file that bsd.wrapper.mk was generating
since the new makevars.mk files provide the same functionality at a
higher level.  Change all WRAPPER_VARS definitions that were used by
the old wrapper-phase cache file into MAKE_VARS definitions.
2005-05-09 05:06:55 +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
dillo
a05c767c7c Add a dummy describe-options target for package not using the
options framework.
2005-05-08 13:52:25 +00:00