Commit graph

275 commits

Author SHA1 Message Date
wiz
bb579283d0 *: bump PKGREVISION for egg.mk users
They now have a tool dependency on py-setuptools instead of a DEPENDS
2022-01-04 20:53:26 +00:00
jperkin
8bbbddc27b regress: Remove reference to LOWER_OS_VERSION. 2021-11-30 09:40:10 +00:00
rillig
1d34782f4f regress: fix space-tab in the indentation 2021-09-09 18:23:44 +00:00
wiz
6eae1297d5 *: recursive bump for perl 5.34 2021-05-24 19:49:01 +00:00
rillig
89af673f89 regress/infra-unittests: use single quotes for string literals 2021-01-04 21:11:43 +00:00
rillig
3e52f68ccc check-portability: always skip files whose name ends with tilde
Suggested by wiz.
2021-01-04 21:10:01 +00:00
rillig
640875bf40 regress: add test for portability check in configure~ files 2021-01-04 21:07:31 +00:00
nia
f6dd9d2f87 Revbump packages with a runtime Python dep but no version prefix.
For the Python 3.8 default switch.
2020-12-04 20:44:57 +00:00
wiz
00da7815c0 *: bump PKGREVISION for perl-5.32. 2020-08-31 18:06:29 +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
rillig
d0f83f96f0 regress/infra-unittests: add test for help, topic followed by comma 2020-08-04 21:35:01 +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
025b6c90c5 regress/infra-unittests: add test for show-all with custom width 2020-07-01 09:10:11 +00:00
rillig
41c986d22c regress/show-all: migrate to regress/infra-unittests
The test framework over there makes it easier to run several independent
tests.  The previous way of squeezing all tests into a single package
Makefile did not scale well and made it invonvenient to add new tests.
In addition, there was no need to create a full-fledged package just to
test this tiny piece of the pkgsrc infrastructure, since that can be
used in categories and the top-level as well.
2020-07-01 08:15:58 +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
c31489d82a regress/infra-unittests: clean up tests for haskell.mk 2020-06-29 21:24:39 +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
5be59f27cb regress/infra-unittests: add more tests for haskell.mk
These tests demonstrate the current behavior, to document further changes
to haskell.mk.
2020-06-29 20:12:34 +00:00
rillig
970ecb7b6d regress/infra-unittests: add very basic tests for mk/haskell.mk 2020-06-27 10:51:12 +00:00
rillig
04c455e076 regress/infra-unittests: fix typo 2020-06-20 16:26:11 +00:00
rillig
7d38eac75e regress/infra-unittests: test SUBST_FILTER_CMD with empty SUBST_SED 2020-06-11 20:10:53 +00:00
rillig
1fb832cc6e mk/subst.mk: always remove temporary file
Fixes PR pkg/55364.
2020-06-11 18:04:41 +00:00
rillig
c2ae91afdb regress/infra-unittests: demonstrate leftover temporary file
Discovered by John Klos in PR pkg/55364.
2020-06-11 17:57:11 +00:00
rillig
6b0624ddd0 regress/infra-unittests: add test case for no-op detection 2020-06-07 05:53:53 +00:00
rillig
7e89e69b66 regress/infra-unittests: add test for larger_symbol_version.awk 2020-06-06 14:02:18 +00:00
rillig
16e188625b mk/subst.mk: fix wrong SUBST failure in mail/policyd-weight
The general rule is that a SUBST_SED that contains _any_ identity
substitution may leave files unmodified, no matter if there are other
substitutions as well.
2020-06-06 13:17:34 +00:00
rillig
4eaad76616 regress/infra-unittests: demonstrate wrong SUBST no-op failure
Discovered by Juraj in mail/policyd-weight.

https://mail-index.netbsd.org/pkgsrc-changes/2020/06/06/msg215480.html
2020-06-06 13:00:52 +00:00
rillig
ad0307e436 regress/plus_build_version: fix test 2020-05-24 13:45:39 +00:00
rillig
11dbf836d6 mk/configure: fix configure options check for custom CONFIGURE_SCRIPT
Seen in cross/arm-none-eabi-gdb.
2020-05-23 12:11:33 +00:00
rillig
5859bdc50b regress/infra-unittests: document creative AC_ARG_WITH in lang/mono4 2020-05-23 07:30:18 +00:00
rillig
4c58410ecc mk/configure: fix check for unknown configure options 2020-05-22 15:21:15 +00:00
rillig
da17aee62b regess/infra-unittests: add test for unknown configure option 2020-05-22 15:10:17 +00:00
rillig
e45d2e3458 mk/pkgformat/metadata.mk: fix relative paths in PATCHDIR and FILESDIR
Before, relative paths had been stored as-is.  This affected those
packages that defined PATCHDIR or FILESDIR as relative directory instead
of prefixing it with ${.CURDIR}.

Since there are already several other paths that are interpreted relative
to the package directory (CONFLICTS, DEPENDS), allow PATCHDIR and
FILESDIR to be specified as relative paths, too.  This makes the package
Makefiles a bit shorter.
2020-05-21 18:48:43 +00:00
rillig
cc8614f669 mk/configure: completely rewrite check for unknown configure options
The previous implementation could not reliably detect outdated configure
options.  This was apparent in devel/gettext-tools, where the option
--with-included-libcroco had become unknown between May 2019 and May
2020, but the check was not run.

The behavior is the same in the pkgsrc default configuration.  Only if
GNU_CONFIGURE_STRICT=yes, the new check is activated and will make
packages fail that previously succeeded to build.  Since that variable is
not widely known, there won't be much sudden breakage, if any.
2020-05-21 13:42:10 +00:00
rillig
71763e7061 regress/tools-platform: add test for "$@" and ksh 2020-05-21 13:33:35 +00:00
rillig
806ef3dba2 regress/infra-unittests: demonstrate relative paths in +BUILD_VERSION
Pointed out by wiz@.

This occured in math/libixion/Makefile.common until 2020-05-19, and still
occurs in math/xyconvert/Makefile.  In all other packages, PKGDIR is
prefixed with  ${.CURDIR} and is thus an absolute path.

It should not be necessary to always specify PATCHDIR as an absolute
path, and the code in mk/pkgformat/pkg/metadata.mk seems to be the only
place where relative paths are handled wrong.
2020-05-19 06:09:53 +00:00
rillig
dc03fe5b2b regress/infra-unittests: remove unnecessary tmpdir handling
The test infrastructure from test.subr already takes care of setting up a
temporary directory.
2020-05-19 05:14:18 +00:00
rillig
46a75b3b7e regress/plus_build_version: the bug has been fixed in January 2020 2020-05-19 05:02:42 +00:00
rillig
1126482bd5 mk/configure/replace-interpreter.mk: silently skip broken symlinks
Like directories, they probably come from shell globs.

Seen in misc/byobu.
2020-05-18 06:06:34 +00:00
rillig
6adb284e6e regress/infra-unittests: add test for variable precedence 2020-05-17 13:35:35 +00:00
rillig
83a6b93b31 regress/infra-unittests: replace double quotes with single quotes 2020-05-16 20:22:41 +00:00
rillig
67d8ae7d2b mk/subst.mk: change default value for SUBST_NOOP_OK from yes to no
This makes the SUBST blocks stricter than before, to detect outdated or
unnecessary definitions.

Filename patterns that are not affected by any of the SUBST_SED
expressions make the build fail.  It is still ok if only some of the
files from a pattern are affected and some aren't.

The latest bulk build shows that most of the build failures are fixed.
The packages that fail in that build are mostly due to other failures,
like missing C headers, wrong PLIST files, unresolved references at link
time.  There may be a few packages that still fail because of this, but
these are near the leaves of the dependency tree.

https://mail-index.netbsd.org/pkgsrc-bulk/2020/05/14/msg018919.html
2020-05-16 19:02:32 +00:00
rillig
f0feafbfc1 mk/subst.mk: properly detect s,a,a,1 as identity substitution
Seen in games/bastet.  The 1 is not necessary though since it only
repeats the default behavior of sed.
2020-05-16 12:43:10 +00:00
rillig
8e1a21443b regress/infra-unittests: clean up test code, add portability
The test can now be run with bash and ksh as well.

Bash exits if a function call returns failure, the NetBSD /bin/sh
doesn't.  After reading POSIX, sections "2.9.1 Simple Commands" and "set
-e", I'm in favor of bash here.

Ksh exits in "set -eu" mode if "$@" is used but no arguments are given.
2020-05-12 05:34:04 +00:00
rillig
d3db3fb365 regress/infra-unittests: clean up test code for subst.mk
There had been unnecessary variations in the code.
2020-05-12 04:35:55 +00:00
rillig
4675cfa4dc regress/infra-unittests: replace remaining double with single quotes 2020-05-12 04:22:44 +00:00
rillig
33257cda70 regress/infra-unittests: replace double quotes with single quotes
Strings in single quotes are simpler to understand and also need fewer
pixels on the screen.
2020-05-11 20:22:31 +00:00
rillig
21aab909de mk/subst.mk: fix edge case in detection of identity substitutions
In a basic regular expression, a dollar-sign only means end-of-string if
it appears at the end of the pattern, or (at the choice of the
implementation) at the end of a \(...\) subexpression.

This affects the package converters/help2man that uses a regular
expression containing a dollar in a non-final position.  This regular
expression had not been detected as an identity substitution even though
it is one.
2020-05-11 19:52:13 +00:00