Commit graph

9960 commits

Author SHA1 Message Date
gutteridge
1bf8f4e1c2 options.description: +2 missing entries, -1 no longer used 2020-05-25 00:07:52 +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
adam
f616f8bf6d MySQL 5.5 and PostgreSQL 9.4 are no longer with us 2020-05-23 07:35:56 +00:00
rillig
4c58410ecc mk/configure: fix check for unknown configure options 2020-05-22 15:21:15 +00:00
joerg
84342eb5e0 Add a missing redirect to ensure that all files are picked up for
hashing.
2020-05-22 01:24:05 +00:00
rillig
dde6099996 mk/configure: remove outdated documentation 2020-05-21 21:05:51 +00:00
rillig
ecee64e6c9 mk/configure: add variable GNU_CONFIGURE_QUIET
This allows bulk builds or other setups to see interesting error
messages, without them being hidden in the noise of "checking ...".
2020-05-21 20:50:54 +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
6c80597618 mk/configure/gnu-configure.mk: disable built-in option check
The rewritten check for unknown configure options already checks for
options that are not defined anywhere.  After that, the configure scripts
don't need to check for these options anymore since all remaining options
are known to the package, in at least one of its configure scripts.
2020-05-21 15:29:25 +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
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
tnn
32e2e5830f g/c references to openjdk7 2020-05-17 00:54:00 +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
maya
309a5cc299 pkg_create -U doesn't do anything, don't pass the flag. 2020-05-15 22:13:39 +00:00
nia
24f16fcee8 mk/defaults: Revert PKG_DEVELOPER default change for now 2020-05-15 10:22:42 +00:00
nia
161d25a3e5 mk/defaults: Switch PKG_DEVELOPER on by default.
Bulk builds with PKG_DEVELOPER set have been the status quo for a while.

Every package in pkgsrc has to be expected to build with this.
2020-05-15 10:10:04 +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
bd18226445 mk/configure/cmake.mk: allow no-op SUBST block
For example, graphics/openjpeg on SunOS doesn't need it.
2020-05-12 17:36:20 +00:00
kleink
856b634d30 options.description: Add pygments. 2020-05-12 10:33:49 +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
rillig
3c7198b683 mk/haskell.mk: allow to generate PLIST files
Since GHC 7.10 or 7.8, the Haskell packages are installed in directories
whose name contains the package hash.  This made it harder to predict the
exact pathname.  Havin the exact pathnames in the PLIST file is the
ideal, it also helps to record the general structure of the installed
files to see whether some file unexpectedly appear or disappear.

To enable this for Haskell packages, the various base directories are
replaced with placeholders during print-PLIST.  These placeholders are
translated back to their respective paths when the +PLIST is generated
from the PLIST in the package directory.

Except for 2 packages, all Haskell packages in main pkgsrc had their
package PLIST file removed.  To help in adding them back, the pkgsrc
developer can set HS_UPDATE_PLIST=yes in mk.conf, which will generate the
PLIST directly into ${PKGDIR}/PLIST upon installation.

Most packages in pkgsrc-wip still have their old PLIST, and these are
migrated automatically as well.
2020-05-10 17:46:59 +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
2b1a9a3af0 mk/scripts: fix a few of the HTML injections in README generation
These are needed for the djb-errno-hack option, which includes the <>
characters.
2020-05-10 07:48:10 +00:00
rillig
026854da4d mk: move locking.mk from internal to misc
Locking is not really internal since it has user-settable variables.
2020-05-10 06:52:49 +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
85f1197b55 mk/check/check-portability.mk: improve documentation 2020-05-09 19:40:10 +00:00
rillig
3e147f8edf mk/pkginstall: fix output of show-all-pkginstall 2020-05-09 16:48:57 +00:00
rillig
e4719c2d8a mk/subst.mk: allow identity substitutions with escaped dots
This fixes the build of converters/help2man in SUBST_NOOP_OK=no mode.
2020-05-06 06:14:56 +00:00
rillig
78ff56665f mk/check/check-portability: opt-in for newer portability checks
There are a few portability checks that have been existing for years.
Later additions need an opt-in phase to avoid breaking existing usages.

https://mail-index.netbsd.org/tech-pkg/2020/05/04/msg023084.html
2020-05-05 05:55:25 +00:00
rillig
80ac4ecc53 mk/check/check-portability: fix error message when no patches are found 2020-05-04 21:48:18 +00:00
rillig
4b2126055f mk/check/check-portability: skip X.in if X is patched
A commonly occuring scenario is that a package patches the configure
script, but that the corresponding configure.in contains shell code that
is not portable.  In cases like these, configure.in is typically not used
during the build, therefore there is no need to check it for portability.

This also applies to all other combinations where a file is patched and
the corresponding file.in contains unportable shell code.
2020-05-04 21:32:48 +00:00
rillig
8e20d19199 mk/configure/pkg-config-override.mk: ignore no-op SUBST blocks
There are many .pc files that don't have a "Libs:" line.  That is totally
ok, therefore just skip these files.
2020-05-04 18:06:56 +00:00
rillig
419777e0d9 mk/defaults/options.description: describe a few options 2020-05-03 19:11:31 +00:00
rillig
a58591ede9 mk/bsd.options.mk: make deprecated options more visible
Up to now, the generated warnings were not prefixed with anything.
2020-05-03 18:45:28 +00:00
rillig
7d303d13c4 mk/help: clean up code 2020-05-03 10:57:06 +00:00
rillig
71696d3d82 mk/help: remove negation from variable names 2020-05-03 10:51:06 +00:00
rillig
7b6dd6a591 mk/bsd.pkg.mk: improve documentation 2020-05-03 10:34:00 +00:00
rillig
6aaf94f2da mk/bsd.options.mk: fix comment for bmake help
Before, "bmake help" only printed the second section of the help topic.
2020-05-03 10:10:05 +00:00
rillig
1d397cf6b5 mk/bdb.buildlink3.mk: fix outdated comments 2020-05-03 10:00:42 +00:00
rillig
ff016ffa31 mk/help: do not treat continuation lines as textual comments 2020-05-03 09:51:07 +00:00
rillig
1673ec7820 mk/help: make variable more precise
The word "ignore" was too unspecific.  There are lines that should be
printed, and there are lines that should be evaluated.
2020-05-03 09:44:07 +00:00
rillig
df9c05e64b mk/bsd.pkg.mk: fix typos in documentation 2020-05-03 09:22:16 +00:00
rillig
1894997149 mk/help: clean up code for selecting relevant help topics 2020-05-03 09:06:59 +00:00
rillig
4e2bff9c98 mk/help: only list help topics that have associated keywords 2020-05-03 08:49:16 +00:00
rillig
35d85c0109 mk/wrapper/transform-gcc: pass -Wno-* without warning
Seen in lang/mono6.
2020-05-02 19:32:59 +00:00
rillig
25920342a9 sysutils/qlogtools: skip nonexistent error.h when fixing errno
Some packages using mk/djbware.mk do not have error.h but need to fix the
errno declaration in other files.  Up to now, there was no good way of
achieving exactly this.

Building packages like these in a SUBST_NOOP_OK=no build makes these
packages fail.  To fix these packages, the configuration of the files
needed to be a bit more flexible.
2020-05-02 11:49:40 +00:00
rillig
77b53694f0 mk/djbware.mk: indent nested .if and .include directives 2020-05-02 11:43:09 +00:00
rillig
ad23776a43 mk/subst.mk: fix shell parse error for special sed expressions
The escaping inside the backticks had been wrong.  Because of this,
parentheses and semicolons were interpreted as shell syntax.

Switching to $(...) command substitution removes the need for quoting
some of the characters and makes the whole command simpler to understand.
Doing the escaping for the backticks command properly would have involved
lots of special cases.

The $(...) command substitution was used sparingly in pkgsrc up to now
because some older or broken shells do not support it.  Since these
shells do not end up as the shell that runs the commands from Makefiles,
that's not a problem.
2020-05-02 05:52:09 +00:00
rillig
63aa1c16fe mk/fuse.buildlink3.mk: make patching of configure scripts optional
Some packages that don't need this patch are:
fuse-afpfs-ng-0.8.1nb5
fuse-bindfs-1.8.4nb1
fuse-chironfs-1.1.1nb1
fuse-cryptofs-0.6.0nb6
2020-05-01 21:12:05 +00:00
rillig
b51e961dae mk/subst.mk: fix typo in diagnostic 2020-05-01 19:53:48 +00:00
rillig
d834a09e98 mk/subst.mk: switch command substitution back to backticks
To work properly, the $(...) should have been $$(...).

In pkgsrc the command substitution is usually done via `backticks`, for
compatibility with /bin/sh from Solaris.  To fix the shell parse errors,
the special characters are properly escaped inside the command
substitution.
2020-05-01 06:42:32 +00:00
joerg
9e908222f3 Simplify 2020-04-30 23:52:30 +00:00
joerg
8298e916c9 Use $() as it gives more consistent quoting behavior as seen by
devel/ruby-redmine.
2020-04-30 23:51:45 +00:00
joerg
a6cd5059b6 Terminate case properly 2020-04-30 23:51:15 +00:00
joerg
495466824a Suppress unnecessary output when not debugging 2020-04-30 23:50:28 +00:00
plunky
1736d74179 add afl-3.0 to acceptable defaults 2020-04-30 08:43:25 +00:00
rillig
ac62ef6aaf mk/subst.mk: fix combination of SUBST_FILTER_CMD with SUBST_NOOP_OK=no
Since SUBST_FILTER_CMD is a shell command, it may contain arbitrary
characters.  The condition in mk/subst.mk that tested whether
SUBST_FILTER_CMD was the default filter command was evaluated at run
time.  In such an evaluation, the variables (lhs and rhs) are fully
expanded before parsing the condition.  This means that these variables
must not contain quotes or unquoted condition operators.

Exactly this situation came up in one of the regression tests.  The
quoted "0-9" was copied verbatimly into the condition, including the
quotes.  The resulting condition was:

	"tr -d "0-9"" == "LC_ALL=C /usr/bin/sed "

This produced a syntax error because of the left-hand side. Adding a :Q
modifier would have helped for the left-hand side, but this would have
been necessary for the right-hand side as well.  Since an empty SUBST_SED
is defined not to "contain only identity substitutions", the first
condition can simply be removed.

The whole condition in the shell program had not worked anyway since it
expanded to either "[ true ]" or to "[ false ]", and both of these
commands exited successfully.
2020-04-29 22:46:42 +00:00
rillig
4bafb8759a mk/subst.mk: allow identity substitutions in SUBST_NOOP_OK=no mode
There are several cases where patterns like s|man|${PKGMANDIR}| appear in
SUBST_SED.  Up to now, these had been categorized as no-ops and required
extra code to make the package build when SUBST_NOOP_OK was set to "no".

This was against the original intention of SUBST_NOOP_OK, which was to
find outdated substitution patterns that do not occur in SUBST_FILES
anymore, most often because the packages have been updated since.

The identity substitutions do appear in the files, they just don't change
them.  Typical cases are for PKGMANDIR, DEVOSSAUDIO, PREFIX, and these
variables may well be different in another pkgsrc setup.  These patterns
are therefore excluded from the SUBST_NOOP_OK check.
2020-04-29 18:33:56 +00:00
rillig
ec5b9249a5 mk/wrapper: allow "unwrap" to be a no-op SUBST block
Discovered in pkgtools/pkg, where libpkg/pkg.pc was left unmodified.
2020-04-27 05:23:11 +00:00
rillig
fe5c19b1df mk/check/check-wrkref.mk: fix shell quoting
Before, adding "Binary file matches" (including the quotes) to
CHECK_WRKREF_EXTRA_DIRS led to a syntax error. Adding this string is so
obvious that it should have been added a long time ago already.
2020-04-26 14:23:25 +00:00
rillig
363de64c50 mk/misc/can-be-built-here.mk: remove NOT_FOT_UNPRIVILEGED
It is unused, and its error message wrongly said "only for unprivileged",
which nobody complained about for 13 years.
2020-04-26 06:56:29 +00:00
gutteridge
94a653defe options.description: add openbox and xfce4-wm (used by LXQt) 2020-04-26 03:17:41 +00:00
rillig
ab30dd14be mk/build/build.mk: use the login shell by default for build-env 2020-04-25 21:36:17 +00:00
js
9da7e8bc30 mk/fetch/fetch.mk: Use -f with ofhttp
pkgsrc wants to be able to override files when the checksum didn't
match.
2020-04-25 11:36:20 +00:00
js
c982f1310b mk/fetch/fetch.mk: Add ofhttp as fetcher 2020-04-25 11:21:06 +00:00
rillig
ae56c6b318 mk/subst.mk: don't recommend {pre,do,post}-patch
These often lead to broken patches, unless the patches are generated very
cautiously. Because of this, pkglint already warns about this.
2020-04-23 19:32:53 +00:00
rillig
5a278be828 mk/subst.mk: warn about all noop patterns before erroring out 2020-04-23 19:30:29 +00:00
rillig
aef7a2d723 mk/subst.mk: omit ./ for sanely named files, quote filename patterns 2020-04-23 19:16:49 +00:00
rillig
a7fc59f213 mk/subst.mk: refactor main code
The indentation of the inner loop has been fixed.

The chmod is only run if the file has actually changed. In the other
case, the file would have been removed right after the chmod, which made
the chmod unnecessary.

For compatibility with ancient operating systems whose /bin/sh still does
not understand negated conditions (SunOS), these conditions have been
avoided and were written using && and || instead.

The inner loop has been flattened a bit, to compensate for the
indentation of the outer loop.
2020-04-23 19:06:09 +00:00
rillig
48d391c218 mk/subst.mk: prevent filename expansion using "set -f"
This avoids creating a temporary directory.

The "set -f" option is not used anywhere else in pkgsrc, even though it
has been available since 1985 in the 8th Edition of Research Unix. Even
AIX and IRIX have that option, so it seems a safe bet.
2020-04-23 18:06:13 +00:00
mef
c4fe655544 (mk/fetch/site.mk) ftp.cse.buffalo.edu has not been responded for a week 2020-04-21 23:00:14 +00:00
jaapb
680ebe308b Use MAKE_ENV when calling dune in ocaml.mk 2020-04-21 11:23:29 +00:00
rillig
73681614b9 mk/license.mk: adjust location of the ninka package 2020-04-19 12:53:21 +00:00
rillig
058d3e5132 mk/subst.mk: document that SUBST_VARS does not support dollar 2020-04-18 15:04:34 +00:00
rillig
2bacc5cd9b mk/subst.mk: make error message for filename pattern easier readable 2020-04-18 12:59:42 +00:00
rillig
2a5426f9ce mk/subst.mk: avoid undefined behavior in regular expressions
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html
says in section 9.3.2 BRE Ordinary Characters that only very few
characters may be preceded with a backslash.

As a side effect, this change allows parentheses in the variable names
listed in SUBST_VARS (even if that will never happen in practice).

The reason that the regression test had not replaced VAR.[] before was
simply that this variable had not been listed in SUBST_VARS.
2020-04-18 12:21:10 +00:00
rillig
068572da5d mk/subst.mk: fix pkglint warnings and notes 2020-04-18 11:42:34 +00:00
rillig
dc1bafda16 mk/subst.mk: rename local variable _class_ to class
This makes the code a bit more readable.
2020-04-18 11:32:01 +00:00
rillig
8cfd3cfc77 mk/plist/print-plist.mk: add show-all-print-PLIST target
This makes it easier to see what happens during print-PLIST.
2020-04-18 10:54:21 +00:00
joerg
7134516a02 Adjust last to really prepend in the case of cwrappers. 2020-04-17 13:36:26 +00:00
joerg
76dab5b3cc clang 10 defaults to -fno-common with significant fallout in pkgsrc.
Override that by prepending -fcommon.
2020-04-17 13:35:36 +00:00
sborrill
d14997ed69 Work around a potential shell bug where "${FOO=${BAR%/*}}" does not work
if quoted. Seen on NetBSD 7.

#!/bin/sh
in="/path/to/dir with space/file"

: "${file=${in##*/}}"
: "${dir=${in%/*}}"
echo "dir:$dir"
echo "file:$file"
[ "$dir" = "$file" ] && echo "dir and file are same"

Leads to errors when adding packages such as:
./+FILES: cannot create /var/db/pkg.refcount/files/etc/rc.d/xenguest//var/db/pkg/xe-guest-utilities-7.0.0: directory nonexistent
2020-04-15 13:33:32 +00:00
nia
acc40588e7 mk/oss.buildlink3.mk: Simplify per-OS DEV* conditionals. Add MIDI. 2020-04-11 10:31:14 +00:00
rillig
7c41eda88e mk/subst.mk: add user-settable SUBST_NOOP_OK
This variable allows to make SUBST stricter than before. This will break
several packages that have redundant filename patterns. Most of these are
typos or outdated and should be updated or removed.
2020-04-01 15:10:09 +00:00
rillig
cb79642b88 mk/configure/replace-localedir.mk: allow SUBST to be a no-op
Since the SUBST_FILES of this class are generated by running find(1) in
WRKSRC, there may be files that are unaffected by the substitution.
2020-03-30 22:57:18 +00:00
rillig
b9804ebb15 mk/plist/plist.mk: use less verbose code for picking up PLIST files
While here, add more verbose documentation on PLIST_SUBST since the way
from the package's PLIST file to the +PLIST file can easily be confused
with the other way round, which is handled by print-PLIST.
2020-03-30 22:54:24 +00:00
rillig
d0c3b5301f mk/misc/show.mk: prevent unnecessary .for loop expansion
The .for loops are expanded by bmake as soon as they are parsed. Since
there are many variable groups, and since each of these groups has
several variables, this takes quite a bit of time.

The time for running "bmake clean" in pkgtools/pkglint went down from 1.0
second to 0.7 seconds. This may not seem much, but when multiplied with
23088 times 9, this little change may speed up a full bulk build by 62000
seconds, which is about 18 hours.

The side-effect is that the show-all-* targets can only be run from the
command line, not as a dependency of other targets. This restriction will
probably go unnoticed.
2020-03-30 22:49:30 +00:00
rillig
55e7cdf4de mk/fetch/fetch.mk: don't print double-slash in pathname 2020-03-30 22:44:26 +00:00
riastradh
ea504032f9 Missed a spot -- set MAKE_ENV during haddock build too. 2020-03-30 18:23:48 +00:00
riastradh
270c7f3e7b In Haskell packages, set MAKE_ENV while running ./Setup build. 2020-03-30 17:51:07 +00:00
riastradh
4c01312406 New package variable HASKELL_PKG_NAME.
Used to form _HASKELL_PKG_DESCR_DIR.  Defaults to DISTNAME, but for
some packages (hledger, incoming), the same DISTNAME is shared by
multiple packages.  So let the package define it explicitly if need
be.
2020-03-30 16:51:53 +00:00
wiz
d0ebe3c3a1 subversion-base: add option for plaintext password storage, default off.
Requested by Thomas Orgis.
2020-03-30 11:44:10 +00:00
nia
73411e4b5f mk/compiler: Make gfortran the default fortran compiler.
Discussed on tech-pkg@ before freeze.
2020-03-30 09:39:24 +00:00
rillig
b140f1fa76 mk/help/help.awk: find library functions in undefined-references.help
Before, searching for topic=socket did not find the documentation.

The detection of useful help topics is still not perfect since it now
finds sections that consist of a single word, such as the word
"undo-replace" in mk/install/replace.mk, but that will be fixed later,
after adding a few unit tests.
2020-03-30 06:21:52 +00:00
taca
4979d54327 mk/defaults/options.description: add esi
Add description for esi, ESI (Edge Side Includes).
2020-03-29 05:23:54 +00:00
rillig
97aab57291 mk/subst.mk: fix typo in documentation 2020-03-28 20:39:50 +00:00
joerg
4347ed3fcc Allow mk.conf to actually overwrite USE_PKG_ADMIN_DIGEST. 2020-03-27 20:57:34 +00:00
gdt
555a3776ae mk/compiler/gfortran.mk: Add comment about gcc 4.8 handling
The code maps gcc-4.8.x to "4", and then won't find gcc4.  This is a
bug, but it may be that it's just as well to never match 4.X of any
kind, and use 7 anyway.   Explain this issue with a \todo to fix the
bug or document the consequences as intended.

(This is a comment-only change.)
2020-03-26 12:44:46 +00:00
gdt
19ce42d824 mk/compiler/gfortran.mk: Fix bugs in version selection
Adjust regexp that removes .Y.Z from gcc-X.Y.Z.

Test for gcc being contained in PKGSRC_COMPILER, vs ==, so that a
value of "ccache gcc" is handled properly.

(ok for mk during freeze jperkin@)
2020-03-26 12:42:02 +00:00
jperkin
071d314936 mk: Support undefined UNLIMIT_RESOURCES.
Currently virtualsize is only defined for NetBSD, breaking builds that use it
on any other platform.  Adding defaults for all other platforms should be done
at some point, this at least unbreaks package builds for now and provides a
safer default for any future additions.
2020-03-26 12:23:54 +00:00
joerg
a1e7953bb0 Don't use normal memory size limits with GHC for module builds. 2020-03-24 20:43:17 +00:00
joerg
d2c378ee5e datasize limits for VMs should also be matched by VM limits. 2020-03-24 20:41:58 +00:00
rillig
62a0adf4a6 replace-interpreter: make documentation more precise
There are several places in pkgsrc where the files to be patched are
listed individually instead of just saying util/*/*.sh. This is
unnecessarily detailed. Encourage package authors to use filename
patterns more often.

An example is REPLACE_PYTHON in lang/clang, which currently fails because
some of the listed files don't exist anymore.
2020-03-24 04:40:34 +00:00
jperkin
b1d6962311 mk/subst.mk: Unbreak builds with no substitutions.
At least some implementations of rmdir(1) do not allow you to remove the
current working directory.  Fixes bootstrap on SunOS.
2020-03-23 11:27:29 +00:00
jperkin
f4e4c8e04e mk: Explain what SSP is, requested by rillig@. 2020-03-23 09:25:58 +00:00
jperkin
b44d00ddbd mk: Remove warning messages for unsupported check targets.
These appear to have been cargo culted around for a while, don't even have
anything to do with DESTDIR mode, and are completely useless.  Simplify the
logic a little while here.  Noticed by rillig@.
2020-03-23 09:24:35 +00:00
riastradh
89445637ce New target test-env, like build-env and configure-env. 2020-03-23 00:33:48 +00:00
rillig
a739837b20 mk/configure/replace-interpreter.mk: add missing empty line
The optional /usr/bin/env is independent from sh. It applies to all
languages.
2020-03-22 21:31:21 +00:00
joerg
3430630848 Add a ulimit flag for address space limits. Support it on NetBSD for
now.
2020-03-22 21:17:30 +00:00
rillig
7d0baa0a1f mk/subst.mk: only create cookie after everything is finished
When fixing the SUBST definitions in a package, it can hapen that the
substitution aborts in the middle. In such a case the cookie should not
be written and the substitution should be retried. Otherwise the build
may continue with half the substitutions done.
2020-03-22 18:43:46 +00:00
rillig
b885ff75ea mk/subst.mk: ignore directories in SUBST_FILES
Seen in multimedia/libmp4v2, where a pattern also matches the CVS
directory from the distfiles.
2020-03-22 13:19:50 +00:00
rillig
4d12683e99 mk/subst.mk: use the same severity for all messages
The severity now depends only on the setting of SUBST_NOOP_OK. Right now
this means that some former warnings will be reported as info only, but
that will change after switching the default of SUBST_NOOP_OK after
2020Q1. Then they will all be reported as warnings, followed by the final
error saying that the pattern has no effect.

This change makes it easier to detect inconsistencies and outdated
definitions, for example by setting the global SUBST_NOOP_OK=no and
redefining WARNING_MSG to actuall fail.
2020-03-22 12:15:59 +00:00
rillig
12053e22a2 mk/bsd.prefs.mk: add PREFIX to show-all-dirs 2020-03-22 11:07:14 +00:00
rillig
c61b55368a mk/wrapper/transform-gcc: pass -Werror=* without warning 2020-03-22 11:05:50 +00:00
nia
88d9bac28d mk/fonts.mk: Empty USE_LANGUAGES 2020-03-22 09:46:10 +00:00
rillig
fdc3adecd5 mk/subst.mk: run diff in the default locale
The diff program is only used to produce informative output in the build
logs, nevertheless its output might be translated if there are lines that
do not end with a newline.
2020-03-21 19:26:12 +00:00
rillig
8e82112864 mk/subst.mk: add global SUBST_SHOW_DIFF variable
This is useful in bulk builds or when trying to understand what happens
under the hood, since the SUBST code leaves no .orig files around.
2020-03-21 13:30:35 +00:00
rillig
68730ad3f1 mk/subst.mk: fix bmake warnings in case of duplicate SUBST classes 2020-03-21 12:22:31 +00:00
rillig
53a584aaf8 mk/djbware.mk: make the errno.h hack configurable
This hack is mostly needed for older software like sysutils/daemontools
that was created when errno was still a global variable. Newer packages
like devel/bglibs don't need that hack anymore. Therefore make it
configurable, to avoid build failures when subst.mk does not find any
error.h to patch.
2020-03-20 19:40:39 +00:00
rillig
3059f09896 mk/extract/bsd.extract-vars.mk: make documentation more user-friendly
The variables are now sorted chronologically instead of alphabetically,
to express the order in which the actions happen. The sentences are a bit
shorter than before.

The visual layout has been changed to make the whole variable name stick
out more. Before, the part that was easily visible was the same "EXTRACT_"
for all of them.
2020-03-20 17:16:34 +00:00
rillig
caf5567d50 show-all: fix output for list variables containing dollar characters
Before, variables containing dollar characters displayed so wrong that it
was hard to explain.

To fix the problem, I typed almost random characters into the code until
the output was exactly as expected. I still do not understand:

* why the list variables need 8 dollars to survive the @x@ loop,
* why the code only works if the dollars come from an external variable
  instead of being written inline,
* why the backslash in the :C modifier needs to be doubled.

Anyway, the output of "bmake show-all-extract" now contains the shell
variable $${extract_file}, just as it should. The dollars are now doubled
in the output and thereby match the source code from the Makefile
exactly.
2020-03-20 16:39:03 +00:00
rillig
172f1091af mk/extract/extract.mk: enclose extract_file in quotes
This prevents unintended shell word expansion.

It also makes that argument visible in "bmake show-all-extract". Before,
it was left out entirely from the output. Now it is printed as an empty
string literal, which at least gives a hint that "there is something".
2020-03-20 15:00:45 +00:00
rillig
d1f0656e94 mk/subst.mk: evaluate SUBST_MESSAGE only once, and late
The default value of SUBST_MESSAGE is based on SUBST_FILES, and that
variable may use the :sh modifier to list files from WRKSRC, which may
not exist at load time.
2020-03-20 09:00:44 +00:00
rillig
59545c5e44 mk/subst.mk: fix early evaluation of SUBST_FILES
In the case of pkglocaledir, the SUBST_FILES are generated by a shell
command. That command assumes that the WRKDIR already exists. Therefore
SUBST_FILES must be evaluated as late as possible.

See mk/configure/replace-localedir.mk; an example package that fails is
devel/gettext-tools.
2020-03-20 06:17:48 +00:00
rillig
a99bca4dad mk/subst.mk: add SUBST_NOOP_OK to catch typos and outdated definitions
In a bulk build with very strict settings (WARNING_MSG fails, as well as
no-op substitutions), it became clear that nearly all of the cases where
SUBST didn't replace anything were bugs in the package definition.

Most of them were just outdated, which is no surprise given that some
packages are already over 20 years old.

For backwards compatibility, SUBST_NOOP_OK defaults to "yes" right now.
After correcting the affected packages, the default will change to "no".
2020-03-19 16:57:35 +00:00
joerg
0837007143 Increase developer friendliness by including the line number. 2020-03-18 17:47:40 +00:00
tnn
788d7e0251 iscsi -> iSCSI 2020-03-16 22:09:54 +00:00
gdt
edc827c20c mk/wxGTK.mk: Remove (no users, almost no point)
This file allowed one to in theory specify a wxGTK version, but only
two programs used it.  Both now directly include a preferred version.
Generally, packages should use wxGTK30, unless there is a good reason
to use 28.

A major motivation earlier was not being able to install 28 and 30 at
once, but this has been solved.

As briefly discussed on pkgsrc-users.
2020-03-16 16:55:41 +00:00
rillig
2ebc134b4f mk/linux-pam: replace obsolete _PKG_SILENT with RUN 2020-03-15 23:03:03 +00:00
gutteridge
8e35d11866 options.description: document rust-llvm 2020-03-15 21:32:11 +00:00
rillig
035bd00993 mk/mysql.buildlink3.mk: fix fatal error when no MySQL version is found
This happened in a bulk build with PKGSRC_RUN_TEST=yes.
2020-03-15 17:50:28 +00:00
rillig
ef473259f9 mk/pkg-build-options: fail immediately if pkgbase is not set 2020-03-15 10:33:42 +00:00
wiz
e397308403 mk: fix typo in example 2020-03-14 13:28:38 +00:00
rillig
7ae24c3684 mk/pkg-build-options.mk: fix example
In most cases this pattern is used to query the options of the package
to which the buildlink3.mk file belongs.
2020-03-14 11:56:29 +00:00
rillig
6d39619f3d mk/pkg-build-options.mk: make the documentation more precise 2020-03-14 10:32:30 +00:00
nia
f4ab3d48e8 mk: default to gfortran on aarch64, there's no g95 for aarch64 2020-03-14 10:00:37 +00:00
gdt
52d38b3cdb mk/extract: move EXTRACT_USING earlier
In an attempt to resolve problems on SunOS, move EXTRACT_USING to the
early variables file, in the hopes that it will be defined before code
that checks it is executed.
2020-03-14 00:14:35 +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
dfc42e92b5 mk: document iscsi PKG_OPTION 2020-03-13 13:26:34 +00:00
nia
af217bc787 *: Remove mysql51 - EOL since 2013, completely broken with OpenSSL 1.1 2020-03-13 10:05:41 +00:00
rillig
774a30f68e mk/check: revert collateral damage from previous commit
Killing the editor does not stop cvs from committing; to achieve that, it
is necessary to remove the file containing the commit message being
edited.
2020-03-13 08:11:36 +00:00
rillig
f481cb99f6 mk/check/check-perms: allow packages to skip the check completely
When all files are skipped, the tool dependency is not added as well.
This allows packages to skip the check without defining the user-settable
variable CHECK_PERMS.
2020-03-13 08:04:08 +00:00
rillig
5efaae1b1b mk/check/check-portability: exclude REPLACE_BASH by default
Since the portability checks are concerned about bashisms, it doesn't make
sense to apply them to programs that will later be run in bash anyway.

Suggested by gdt via private mail.
2020-03-13 06:31:43 +00:00
rillig
8f5b373f2f mk/check/check-portability: check plain Makefiles as well
Like Makefile.in, these files contain shell commands but don't start with
a #! line.

Suggested by gdt via private mail.
2020-03-12 19:09:41 +00:00
rillig
0418380975 mk/check/check-portability: don't check Makefile.am
These files typically come with a corresponding Makefile.in file, and the
same portability issue is in the .in file as well. For building the
package it is only necessary to patch the .in file. Patching the .am file
as well would mean additional work for the pkgsrc package maintainer.

Nevertheless, such fixes should be reported upstream. The upstream
maintainer is more interested in a patch for Makefile.am, since the .in
file is only generated.

Suggested by wiz via private mail.
2020-03-12 18:54:59 +00:00
rillig
a05002b399 mk/check/check-portability: support file names with spaces
Before, file names that start or end with spaces were trimmed by read(1),
as specified by POSIX 2004 and POSIX 2018.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html

This edge case bug had been present since the very beginning of this
code, in November 2006.

Filenames containing backslashes or newlines are still not supported, and
probably never will be intentionally supported.
2020-03-12 18:40:06 +00:00