Commit graph

9942 commits

Author SHA1 Message Date
rillig
fb1dd6fb9d show-all: use descriptive variable names
The show-all code is mostly line noise, therefore it is all the more
important to provide at least a few hints to a potential reader, by
using descriptive variable names for the iteration variables:

	g => grp
	c => cat
	v => var
	w => width
	x => word
2020-09-12 21:27:15 +00:00
rillig
40c4b60f02 show-all: use separator for long rows of backslashes
I had been confused by the printf commands since some of them used '\n'
and some used '\\\n', which seemed as if there were some quoting issue
that would make it necessary to double the backslashes.

This assumption was wrong though.  The printf commands for the
single-valued variables use the normal '\n', while the lines for the
multi-valued variables end with a real backslash in the output, to
mimick the continuation lines in makefiles.

As a hint that the '\\\n' means backslash + newline, add single quotes
between the two characters.
2020-09-12 21:00:10 +00:00
rillig
b234c33c38 show-all: fix escaping of '$' in variable modifiers
The previous code relied on the exact implementation of Var_Parse in
bmake, and that it does not issue any error messages in case of $$ in
variable modifiers.

In variable modifiers, a $ is escaped using \$, not $$, as documented in
the manual page.

At the time when I wrote the previous version with the _SHOW_ALL.d4 and
_SHOW_ALL.d8 hacks, I did not know about the backslash escaping rule,
and I just added dollar signs until everything seemed to work.  I
couldn't explain why it worked though, which is not surprising since the
code was using an undocumented implementation flaw of bmake.
2020-09-12 20:48:13 +00:00
rillig
245e6ba7ed mk/plist: fail fast on programming mistake 2020-09-12 06:55:08 +00:00
rillig
7ee8a6b95a bsd.build-vars.mk: describe MAKE_FLAGS in details, rewrite and reformat 2020-09-12 06:51:15 +00:00
gutteridge
17ea8d78c2 options.description: add several options offered by ffmpeg4 2020-09-12 03:18:30 +00:00
js
8f9699c585 mk/platform/QNX.mk: Add ACCEPT_INFERIOR_RM_PROGRAM=yes 2020-09-04 19:44:24 +00:00
js
32196b411d mk/platform/QNX.mk: Add /usr/qnx650 to _OPSYS_LIB_DIRS 2020-09-04 19:36:30 +00:00
gutteridge
cca85ce220 options.description: fix a couple of typos 2020-09-04 01:15:42 +00:00
gutteridge
fed75cdfa9 options.description: addition of py-game 2020-09-04 01:14:24 +00:00
kim
b3f2f0abe1 Use http with ftp.funet.fi 2020-09-02 22:16:48 +00:00
kim
c4c3218df0 Refresh the "Finland" section 2020-09-02 20:32:37 +00:00
ryoon
e00f3c4739 mk/compiler: Support GCC_REQD=9 or 10
A pert of PR pkg/55637.
2020-09-02 16:16:43 +00:00
ryoon
aebad2b83b mk/defaults: Add heif option description 2020-09-01 12:21:28 +00:00
jperkin
d26e851380 mk: Remove an unwanted NetBSD RCS tag. 2020-08-27 11:56:38 +00:00
jperkin
dc189ce30d mk: Rewrite the checksum script in awk.
The previous shell script version's runtime was quadratic against the
number of distfiles to verify.  Historically this has not been an issue,
with usually only a handful of files per package.  However, with the
introduction of Go modules the number of distfiles used by a single
package can be very high.

For example, in an upcoming update of www/grafana to version 7.1.5, the
number of GO_MODULE_FILES is 821.  Running 'bmake checksum' takes:

  real    18m20.743s
  user    17m27.975s
  sys     0m49.239s

With the awk code, this is reduced to a far more sensible:

  real    0m4.330s
  user    0m3.241s
  sys     0m0.875s

The script has been written to emulate the previous version precisely,
preserving the same output and error messages and supporting all of its
behaviour, with the one exception that previous exit values of 128 have
been changed to 3, in order to avoid any potential signed 8-bit issues.

The one change in the pkgsrc infrastructure is that the mk/fetch/fetch
script no longer sets a working default value for ${CHECKSUM}.  This is
not a problem in a pkgsrc environment as all of the required variables
are set correctly, but if there happen to be any users who are using
this script in a standalone environment, they will need to set it
accordingly.  This was probably required in many situations previously
anyway, as none of the script's environment variables were set, and
trying to support this would be fragile at best.
2020-08-27 11:45:45 +00:00
sjmulder
55958d5bab mk/platform: Update Darwin version list 2020-08-21 21:29:16 +00:00
wiz
c2bc74e978 mk: describe notmuch option. 2020-08-21 14:55:37 +00:00
riastradh
aaabb1ab41 Add description for `fido' option. 2020-08-21 01:51:16 +00:00
riastradh
6ad068fca8 Add 0-clause-bsd to DEFAULT_ACCEPTABLE_LICENSES.
This is OSI-approved open source:

https://opensource.org/licenses/0BSD

Omitted from license.mk when introduced only because a freeze was on:

https://mail-index.netbsd.org/tech-pkg/2019/12/22/msg022374.html
2020-08-18 20:18:32 +00:00
schmonz
0b38123be9 Add CMAKE_INSTALL_NAME_DIR, a package-settable variable containing the
destination directory to install shlibs. It's used on macOS by
install_name_tool(1). The default is ${PREFIX}/lib.
2020-08-12 14:10:11 +00:00
hauke
b9d2c53c56 Up to 10.12.6 at least, the Mac OS X linker, does not support "-no_warn_inits". 2020-08-11 12:45:54 +00:00
brook
fb1eef408e Add URLs to the MASTER_SITE_R_CRAN list
At some point CRAN added the https protocol to its repositories, but
this was never reflected in MASTER_SITE_R_CRAN.  Add analogues for
all the http sites with responsive https servers.
2020-08-09 16:50:13 +00:00
rillig
6fb4f703ff mk/fetch/fetch.mk: add keywords for "bmake help" 2020-08-04 21:54:46 +00:00
rillig
10ce0dbeb1 mk/help: fix help parser for variable names followed by comma
Seen in mk/fetch/fetch.mk for FETCH_USE_IPV4_ONLY.
2020-08-04 21:46:44 +00:00
rjs
6e897e40af Allow use of openjdk11 on NetBSD/aarch64. 2020-07-29 21:42:30 +00:00
kardel
e285ded710 Complete import of bareos - a fork of bacula 5.2 around 2010 providing
LTO hardware encrytion, bandwidth limitation, data replication across
sites and more.
2020-07-28 06:42:44 +00:00
gdt
c05ad132ea mk/pgsql: Change default to 12
As discussed on foo-pkg at some length, with no significant
objections.
2020-07-27 00:17:12 +00:00
wiz
e92116bd91 mk: remove backwards compatibility for pkg_install from before 2010 2020-07-13 20:25:57 +00:00
jperkin
7880b72e99 mk: Skip unnecessary dirs for CTF/debug conversion.
There won't (or at least should never!) be any files under share/ or man/ that
require conversion for CTF or debug support, so set sensible defaults for both
CTF_FILES_SKIP and STRIP_FILES_SKIP.  Further additions are welcome.

While here rearrange the ordering of the debug skips to match CTF and deliver
a small performance improvement by avoiding unnecessary file tests.

Combined, these reduce the runtime for "make install-ctf install-strip-debug"
in lang/rust down from wall/user/sys 10m33s/2m34s/9m30s to 1m13s/0m46s/1m4s.
2020-07-08 12:37:13 +00:00
maya
a53780f17e revert metadata.mk:1.24, keep passing useless flag -U.
It wasn't useless in older pkg_create, as used by netbsd-7.
Reported by sborrill.
2020-07-06 18:29:11 +00:00
rillig
e806a92e54 mk/misc/show.mk: fix reference to further documentation 2020-07-04 18:08:35 +00:00
rillig
7c3702e7d7 mk/haskell.mk: clean up _VARGROUPS section and unused variables 2020-07-01 15:07:25 +00:00
rillig
207c2f13df mk/haskell.mk: remove variable HASKELL_COMPILER, clean up documentation
There was only a single valid value for HASKELL_COMPILER, therefore the
variable was useless.  It only made the implementation more complicated
than necessary.
2020-07-01 14:58:43 +00:00
adam
a7f1f67f9e remove clang-static-analyzer option 2020-07-01 14:48:04 +00:00
rillig
488f9fbd90 show-all: fix typo in variable name
The width only applies to a single group, not to several or even all
groups.
2020-07-01 09:13:12 +00:00
rillig
d10b39c41d mk/buildlink3: increase width of varnames in show-all-bl3
The buildlink3 variable names are quite long.  So long that using the
default column width of 24 characters, most of the variable values are
not aligned.  In this case, it makes sense to shift them all to the right
a bit.
2020-07-01 07:39:52 +00:00
rillig
ab8c506b0b mk/haskell.mk: regenerate PLIST if it is outdated
Now that haskell.mk distinguishes between plain and outdated PLIST files,
this is possible again.  When haskell.mk knew only missing and outdated,
this was still ambiguous and therefore skipped.
2020-06-29 22:00:58 +00:00
rillig
c8f6fed1ea mk/haskell.mk: fix PLIST status detection
As seen in devel/hs-hashable/PLIST r1.1, which listed only the
package-description but not the package-id.
2020-06-29 20:51:24 +00:00
rillig
a5039d7c3c mk/haskell.mk: only add PLIST_SUBST and PRINT_PLIST_AWK if useful
The PLIST_SUBST and PLIST_PRINT_AWK definitions for Haskell library
packages are only useful if the package-description file exists.  If
that file is absent though, these are skipped.

The test whether the file exists is made as late as possible since that
file does not yet exist at the point where the package Makefile is
parsed.

This also affects the show-all-haskell target, which only shows these
values after the install phase.  This is not perfect but good enough for
practical cases.
2020-06-29 20:30:13 +00:00
rillig
aeff688767 mk/haskell.mk: fix PLIST status detection
Before, running "HS_UPDATE_PLIST=yes bmake update" in wm/xmonad did not
apply the proper substitutions to the generated PLIST file since the
PLIST file was created empty during the GENERATE_PLIST command, and that
empty PLIST file changed the status to "plain" instead of "missing".
Because of that, the HS_INTF and related placeholders were not defined.

The 2 conditions for the status "missing" had to be written in separate
.if clauses because of a bug in bmake that was introduced in 2015 and
will be fixed with the next bmake update.  For further details, see
src/usr.bin/make/unit-tests/cond-short.mk.
2020-06-29 18:07:45 +00:00
rillig
c55271b9e5 mk/subst.mk: activate the SUBST no-op check again by default
It had been switched off to not affect packages in the stable branch
2020Q2.  Now starts the last round where it is possible to disable this
check.  After 2020Q3, all SUBST blocks must either find their patterns or
be explicitly marked as potential no-ops.  This will help to find
outdated SUBST blocks.
2020-06-29 18:04:13 +00:00
ryoon
41860cdb52 mk/defaults: Add option for apache24's mod_md 2020-06-29 13:59:29 +00:00
ryoon
24a47a57af mk: Add db18 to Berkeley DB framework 2020-06-29 13:36:50 +00:00
jperkin
167401291e mk: Handle pdksh issue with "set -e" in for loop.
With our current version of pdksh, a "false && something" construct under
"set -e" conditions will continue as it does with other shells, but if the
construct is within a for loop then it exits, causing failures in the
substitution code.  An explicit "|| true" is necessary to avoid this.

Approved during the freeze by wiz.
2020-06-25 08:45:00 +00:00
schmonz
3948870bde Retire 'djbware-errno-hack' and associated options.mk cleverness.
Instead:

1. Package makefiles including their own options.mk
2. Packages say "SUBST_CLASSES+=djberrno" to get the hack, if needed
3. Packages adjust SUBST_FILES.djberrno, if needed

Should fix bulk build failures due to multiple inclusions of options.mk
and/or incorrect definitions of DJB_ERRNO_HACK.

Approved during the freeze by wiz@.
2020-06-25 05:42:36 +00:00
nia
4b4cfb3fac mk: Add luajit option description 2020-06-24 13:29:23 +00:00
rillig
c842ae6257 mk/haskell.mk: fix PLIST generation for Haskell packages
The package textproc/hs-cgrep does not install a Haskell library.  This
was unexpected to mk/haskell.mk, which generated an obviously wrong PLIST
file for that package, and for 3 other packages.

Noticed by wiz.
2020-06-21 22:21:02 +00:00
taca
fe782b891f mk/defaults/options.description: rename two options
Rename ecap and esi to squid-ecap and squid-esi.
2020-06-21 16:07:06 +00:00
wiz
e597787c88 mk: do not check vulnerability when just fetching distfiles
This is intended to reduce the log output on ftp.NetBSD.org when
fetching all distfiles.

Also, we call the target in basically every step of package creation
(extract, patch, configure, build, install, package) - perhaps we should trim
this down some more.
2020-06-18 17:05:55 +00:00