Commit graph

690 commits

Author SHA1 Message Date
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
leot
b637c0c04c mk/tools/replace.mk: Add support for `:test' to add tools to TEST_DEPENDS
With this change is now possible to mark tools only needed for testing via:

 USE_TOOLS+= <tool>:test

Discussed with <joerg>
2018-01-24 13:30:04 +00:00
rillig
06317929ae Improved documentation for "make help".
The check for target(help) prevents a warning when "make help" is run from
a category directory.
2018-01-07 11:23:37 +00:00
wiz
d678f8f800 Switch from mdocml to mandoc; remove obsolete references. 2017-08-01 15:09:52 +00:00
maya
17b7efc0d1 freebsd 12 doesn't have /usr/bin/tbl, so check for its existence before
deciding to use it.
2017-07-22 18:10:25 +00:00
joerg
80852c70a2 Deal with wc in /bin. From Thomas Orgis. 2017-07-10 12:32:30 +00:00
maya
7e02908133 Use the fgrep binary explicitly on OSF1
Fixes PR pkg/52312: "Checking for fgrep" causes Fork bomb
From Naruaki Etomi
2017-06-19 06:25:45 +00:00
sevan
2302c91479 Whilst the version of find in Darwin 8 & prior is insufficient for installing Python modules,
there are further issues with circular dependencies which need to be resolved
before the change to using find from coreutils can be made.
Revert previous change for now.
2017-06-12 16:11:51 +00:00
sevan
13b404e17b The version of find(1) included in Darwin did not support {} + being passed to
the exec option up until version 9 (Leopard). sysutils/findutils should be used on
prior releases.
This resolves packaging Python modules which utilise lang/python/egg.mk. find(1)
is called here with '{}' +; passed to exec option.
2017-05-06 16:33:54 +00:00
taca
efbc2f124b Remove reference to misc/rubygems and RUBY_VER is "18". 2017-04-23 14:18:09 +00:00
maya
e76c53d7c0 Check for paxctl's existence rather than version+arch check.
It likely only matched amd64 before (looks like i386 had a typo),
but it's necessary on most netbsd archs since netbsd-7.99.x.
2017-04-21 16:03:10 +00:00
ryoon
20ddaf0877 Workaround for make(1) from recent NetBSD-current to detect paxctl 2017-04-21 14:45:07 +00:00
brook
3f7b4beddb Always take the flex version from the second word of the version string.
When necessary, the flex version is obtained from the version string reported
by running flex.  Generally, the first word of the version string is flex and
and the second is a version number.  At least for MacOS, there is a third
vendor-specific word.  The sed command previously used to capture the flex
version captured the last word, not the second one, because the first capture
group was too greedy and could capture more than a single word.  Instead,
force the capture groups to capture only words, i.e., no blanks, and use the
second word for the version.
2017-01-21 17:10:26 +00:00
joerg
fea8495735 Handle optional ctfmerge/ctfconvert presence on NetBSD by explicitly
passing down NOCTF when they don't exist.
2016-11-10 20:58:46 +00:00
khorben
169865dfeb Import mini-framework for paxctl(8) on NetBSD/{amd64,i386}
This allows setting flags for PaX on select binaries. Two new variables
are introduced for packages: NOT_PAX_ASLR_SAFE and NOT_PAX_MPROTECT_SAFE.
They both expect a list of binaries are known to not support PaX ASLR
and/or PaX MPROTECT, respectively.

"Please commit" wiz@
2016-05-26 16:03:04 +00:00