Commit graph

704 commits

Author SHA1 Message Date
gutteridge
03278bccfb Reflect GNU grep locations on some SunOS variants 2020-12-09 01:24:24 +00:00
js
3a435e0e01 tools.Linux.mk: Consider /bin/find as well 2020-12-05 13:15:58 +00:00
jperkin
381af86204 mk: Stop using XCode binaries on Big Sur.
These no longer support being executed via a symlink, failing with errors
such as:

  xcode-select: Failed to locate 'gmake', and no install could be requested

This breaks the entire .tools/bin directory, so we just have to avoid them
and use tools from pkgsrc instead.

It's likely a lot more will need to be added to this list, but this is
enough to get devel/cmake building at least.
2020-10-10 09:31:50 +00:00
rillig
c44518e90f mk: fix undefined variables for current make running in -dL mode
In lint mode, NetBSD's make is stricter about undefined variables.  In
conditions, the function arguments must be fully defined.
2020-10-06 17:36:50 +00:00
nia
bee9205d2d mk/tools: not all linuxes have bash (e.g. alpine) 2020-05-28 14:47:36 +00:00
rillig
b634189104 mk/tools/bsd.tools.mk: list _USE_TOOLS in show-all-tools
This variable is used in quite a few places, which makes it interesting
enough, even though it is an implementation detail.
2020-05-13 04:24:17 +00:00
rillig
7f4b055291 mk/tools: don't create empty symlink for wrong tool definition
This case can only happen in the following special case:

TOOLS_CREATE+=		asdf
TOOLS_PATH.asdf=	# empty

If there is a lonely TOOLS_CREATE without a corresponding TOOLS_PATH, it
defaults to ${FALSE} and thus doesn't trigger this code.
2020-05-10 14:36:18 +00:00
rillig
10f1774814 mk/tools/perl.mk: allow to silence the USE_TOOLS+=perl warning
Packages that don't declare USE_TOOLS+=perl and whose configure script
invokes perl produce a warning.

Usually warnings are ignored, but they can also be configured as errors,
for example during a strict bulk build.  In this situation it is
necessary to override the default behavior of the perl tool to fail
silently.  Up to now, defining both TOOLS_BROKEN+=perl and
TOOLS_FAIL+=perl produced a duplicate make target.

To handle this situation, let TOOLS_BROKEN+=perl take precedence over
TOOLS_FAIL+=perl.  This is much easier than finding out in each case how
to disable the perl check in the configure script, which is most often
done by adding any of the following to CONFIGURE_ENV: PERL=#none,
ac_cv_prog_PERL=#none, ac_cv_path_PERL=#none.
2020-05-10 06:05:35 +00:00
rillig
3ab427f38a mk/tools/create.mk: make tool wrappers smaller
There is no need to include the comments from the shquote function.
2020-05-09 21:08:05 +00:00
rillig
959e1dbe9a mk/tools/bsd.tools.mk: include _TOOLS_VARNAME in show-all-tools
This information is useful for getting the variable name that corresponds
to a tool.  In most cases this is just the uppercase name of the tool,
but there are exceptions like ${SETENV} for env, ${HOSTNAME_CMD} for
hostname.
2020-05-09 21:04:14 +00:00
rillig
a17e4f77d6 mk/tools/create.mk: add new variable TOOLS_ALWAYS_WRAP for debugging 2020-05-09 20:50:20 +00:00
rillig
c166122011 mk/tools: in show-all-tools, sort tool variables by relevance
Before, these variables were sorted alphabetically, which made the output
more difficult to read.
2020-03-13 17:33:02 +00:00
tnn
78df98ea63 put back bsdtar as host tool, conditional on MKBSDTAR
http://mail-index.netbsd.org/source-changes/2020/01/17/msg112935.html
2020-02-25 11:20:28 +00:00
kamil
0e2f37cee8 tools/tools.NetBSD.mk: Register TOOLS_PLATFORM.realpath 2020-02-13 00:40:35 +00:00
tnn
672bc47484 remove bsdtar as tool because it was reverted in src for some reason ... 2019-11-21 21:11:22 +00:00
ryoon
914dc9f9ab NetBSD 9 or later has bsdtar as /bin/tar 2019-09-06 03:52:55 +00:00
jperkin
6a956a0ad2 mk/tools: Ensure GNU grep is used when requested.
Previously a "grep" tool was created, but GREP still pointed at the platform
grep, breaking any package that used the environment variables rather than
PATH when the native platform grep does not have GNU features.
2019-06-06 11:54:33 +00:00
rillig
122d791da2 mk/tools: in the wrapper log, quote arguments containing = naturally 2019-05-22 20:47:05 +00:00
leot
f127cb7934 mk/tools: Add support for autoconf*:test and automake*:test
Thanks to <martin> for catching the unintended autoconf tool dependency!
2019-05-15 10:49:28 +00:00
rillig
b88d952e81 mk: allow "bmake clean depends" as shortcut
When "bmake clean depends" was called for a package where the various
cookie files already existed, these would enable different rules than a
clean package directory.

Since "bmake clean" deletes all the cookie files before "bmake depends"
starts, in these combined command lines the cookie files must be treated
as absent.
2019-05-07 19:36:43 +00:00
rillig
119b552796 mk/tools/replace.mk: take versions of FLEX_REQD into account
If a package had said FLEX_REQD=1000.0, the actual dependency had still
been flex>=2.5.4. Now all version numbers from FLEX_REQD are taken into
account, too.
2019-04-03 18:37:24 +00:00
rillig
81a41d0b94 mk/tools: correctly quote arguments in the tool wrapper log
Before, the tool arguments were written to the log as plain strings. Now
the arguments are properly quoted, which makes it possible to replay the
commands by copying them from the .work.log file.

This only affects tools that are shell builtins (echo, true, false), get
additional arguments (mkdir -p) or define a custom TOOLS_SCRIPT
(pkg-config, to set an environment variable; or autotools). Tools that
are symlinked to the real tool are not affected.

The calls to the compiler are already properly logged since cwrappers
takes care of that. This commit therefore makes the log entries for the
compilers and the other tools more similar.
2019-03-24 11:29:19 +00:00
rillig
575f219e37 mk/tools: fix quoting when logging tool invocations
When a package or the infrastructure defined a tool with custom
TOOLS_ARGS or TOOLS_SCRIPT containing special characters, these could
lead to unintuitive interactions at the time when that tool invocation
was logged in the tool wrapper log. Some of the logging output ended up
on stdout, while some of the normal output ended up in the log, and parts
of the quoted arguments were even evaluated as shell commands.

The logging of the wrapped tool commands is not perfect yet, but at least
it's much more predictable now.
2019-03-24 08:40:07 +00:00
rillig
23128f791d mk/tools: fix unintended filename expansion in the tool wrapper log file 2019-03-22 22:13:21 +00:00
rillig
016d9a0f3d mk/tools: sort tools by name when calling "make show-all-tools" 2019-03-22 16:17:50 +00:00
rillig
09dc181cca mk/tools: fix BISON_REQD handling for lists of multiple Bison versions 2019-03-21 21:47:29 +00:00
joerg
6537bdc125 ghostscript-esp is long gone. 2019-03-10 19:52:18 +00:00
wiz
0b07edd732 mk/: let fonts/mkfontscale provide mkfontdir 2019-03-04 11:56:05 +00:00
triaxx
43226095e2 tools.FreeBSD.mk: make groff conditional
FreeBSD 12 removes groff: test its existence before using it.
2019-02-12 18:40:16 +00:00
leot
948e68bb1f mk/tools/replace.mk: Update the check to devel/nbpatch
The check to avoid possible dependency loop was not updated to
check devel/nbpatch (instead of devel/patch).

Fix PR pkg/53920 reported by Dean Matzkov.
2019-01-29 22:41:00 +00:00
wiz
0b260f2148 mk/tools/automake.mk: support automake-1.16 2018-12-01 04:58:55 +00:00
rillig
858c6cfd69 mk/misc: make configuration for show-all targets more configurable
Up to now, there was a central list of variable name patterns that
defined whether a variable was printed as a sorted list, as a list or as
a single value.

Now each variable group decides on its own which of the variables are
printed in which way, using the usual glob patterns. This is more
flexible since different files sometimes differ in their naming
conventions.

Two variable groups are added: license (for everything related to
LICENSE) and go (for lang/go).
2018-11-30 18:38:19 +00:00
jperkin
71e098497c mk: Add CTF infrastructure support.
Platform support is determined by _OPSYS_SUPPORTS_CTF from mk/platform, the
user enables support by setting PKGSRC_USE_CTF=yes, and packages can
explicitly disable support with CTF_SUPPORTED=no or skip certain files with
CTF_FILES_SKIP.

The path to ctfconvert is configured via TOOLS_PLATFORM.ctfconvert.

If all of the requisite variables are enabled, a compiler-specific debug flag
is passed via the wrappers to ensure we have DWARF information to convert,
_INSTALL_UNSTRIPPED is explicitly defined to avoid binaries being stripped
prior to conversion, and the conversion is performed during the install stage.

It is recommended that users who enable the feature also set STRIP_DEBUG=yes
to reduce the final binary size once the conversion has been performed.

This has been used for the past year in Joyent SmartOS builds.  FreeBSD is
marked as supported but is untested.
2018-11-12 14:22:58 +00:00
jperkin
c34c184787 mk/tools: Create a strip-dbg tool.
On platform where strip supports -g it is used, otherwise this is a no-op.
2018-11-12 13:36:50 +00:00
jperkin
3bf4c3441e mk/tools: Add a gstrip tool on platforms where it exists.
This will be used in places where GNU strip (or equivalent) is required,
specifically for the "-g" flag.
2018-11-12 13:34:39 +00:00
sevan
d192480c51 Add unzip. From Minix 3.4RC6 2018-11-05 13:44:05 +00:00
sevan
1764d6ec78 Reduce whitespace noise when compared to NetBSD config. NFC 2018-11-05 13:42:24 +00:00
sevan
f869fad911 Add gsoelim, readlink, sdiff, shlock, soelim. From Minix 3.4RC6 2018-11-05 13:32:53 +00:00
sevan
dfe1a14b98 Add the relevant parts for cross compilation on Minix. - untested but the
relevant paths are set as expected.
2018-11-05 13:24:46 +00:00
sevan
15f2653da5 provide paths for byacc, gegrep, gfgrep, ggrep, install-info, makeinfo, openssl,
xz, xzcat on Minix. From Minix 3.4RC6
2018-11-05 12:57:47 +00:00
sevan
aa7df6147c Update some more paths from Minix 3.4RC6 2018-10-29 10:44:29 +00:00
sevan
77fb75889d Update path to chown(8) as found on Minix 3.4RC6 2018-10-29 10:31:05 +00:00
sevan
277e45c036 Update location for true(1), taken from 3.4RC6 build. 2018-10-28 17:17:40 +00:00
jperkin
2aa8c6b07e mk: Add native GNU/BSD grep where they are known to exist. 2018-10-17 08:30:43 +00:00
jperkin
c61f061ba7 mk: Add support for a ggrep tool.
This is for when GNU features are required that aren't available in some
other greps, for example -o or --color.  If ggrep is requested then it
takes precedence over grep/egrep/fgrep and the GNU versions are used for
all three.

BSD grep aims for GNU compatibility so it is anticipated that it can be
used as a native tool to avoid a dependency on textproc/grep on platforms
that provide it.
2018-10-17 08:22:19 +00:00
maya
6c25dec844 Remove clauses 3,4 from TNF-only copyright blocks.
This is based on the decision The NetBSD Foundation made in 2008 to
do so, which was already applied to src.

This change has been applied to code which is likely not in other
repositories.

ok board@, reviewed by riastradh@
2018-08-22 20:48:36 +00:00
adam
107ec1e19d pkglint fix 2018-08-19 09:37:12 +00:00
rillig
ce6481904d mk/tools/create.mk: revert filtering duplicate tool names
The "split" program is not managed by the tools framework. It just has a
wrapper that is placed into the same directory. This is confusing since
intuitively, "split" is a tool like many others.

The "duplicate script for target" warning from Make is therefore correct,
albeit obscure.

Currently, neither the pkgsrc infrastructure nor pkglint check for
allowed tool names.
2018-04-27 20:53:14 +00:00
rillig
6357c6f5e5 mk/tools/create.mk: sort tools before creating the wrapper targets
The TOOLS_CREATE variable is only ever appended to, without checking for
duplicates. In some rare cases, this produces warnings about
doubly-defined make targets. An example is adding USE_TOOLS+=strip to
pkgtools/pkglint:

".../mk/tools/create.mk" line 149: warning:
    duplicate script for target ".../work/.tools/bin/strip" ignored

The above line number 149 is zero-based, which in reality means the
duplicate definition is in line 150.
2018-04-27 20:16:36 +00:00
rillig
afd12090f3 mk/tools/autoconf.mk: improve documentation for autoreconf 2018-03-09 21:51:20 +00:00