summaryrefslogtreecommitdiff
path: root/mk
AgeCommit message (Collapse)AuthorFilesLines
2020-04-25mk/fetch/fetch.mk: Use -f with ofhttpjs1-2/+2
pkgsrc wants to be able to override files when the checksum didn't match.
2020-04-25mk/fetch/fetch.mk: Add ofhttp as fetcherjs1-1/+7
2020-04-23mk/subst.mk: don't recommend {pre,do,post}-patchrillig1-2/+2
These often lead to broken patches, unless the patches are generated very cautiously. Because of this, pkglint already warns about this.
2020-04-23mk/subst.mk: warn about all noop patterns before erroring outrillig1-5/+16
2020-04-23mk/subst.mk: omit ./ for sanely named files, quote filename patternsrillig1-3/+3
2020-04-23mk/subst.mk: refactor main coderillig1-33/+34
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-23mk/subst.mk: prevent filename expansion using "set -f"rillig1-8/+6
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-21(mk/fetch/site.mk) ftp.cse.buffalo.edu has not been responded for a weekmef1-2/+1
2020-04-21Use MAKE_ENV when calling dune in ocaml.mkjaapb1-2/+3
2020-04-19mk/license.mk: adjust location of the ninka packagerillig1-2/+2
2020-04-18mk/subst.mk: document that SUBST_VARS does not support dollarrillig1-2/+2
2020-04-18mk/subst.mk: make error message for filename pattern easier readablerillig1-2/+2
2020-04-18mk/subst.mk: avoid undefined behavior in regular expressionsrillig1-2/+2
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-18mk/subst.mk: fix pkglint warnings and notesrillig1-10/+11
2020-04-18mk/subst.mk: rename local variable _class_ to classrillig1-33/+33
This makes the code a bit more readable.
2020-04-18mk/plist/print-plist.mk: add show-all-print-PLIST targetrillig1-2/+17
This makes it easier to see what happens during print-PLIST.
2020-04-17Adjust last to really prepend in the case of cwrappers.joerg1-2/+3
2020-04-17clang 10 defaults to -fno-common with significant fallout in pkgsrc.joerg1-3/+3
Override that by prepending -fcommon.
2020-04-15Work around a potential shell bug where "${FOO=${BAR%/*}}" does not worksborrill1-3/+3
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-11mk/oss.buildlink3.mk: Simplify per-OS DEV* conditionals. Add MIDI.nia1-14/+7
2020-04-01mk/subst.mk: add user-settable SUBST_NOOP_OKrillig1-3/+13
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-03-30mk/configure/replace-localedir.mk: allow SUBST to be a no-oprillig1-1/+2
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-30mk/plist/plist.mk: use less verbose code for picking up PLIST filesrillig1-24/+26
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-30mk/misc/show.mk: prevent unnecessary .for loop expansionrillig1-2/+2
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-30mk/fetch/fetch.mk: don't print double-slash in pathnamerillig1-2/+2
2020-03-30Missed a spot -- set MAKE_ENV during haddock build too.riastradh1-1/+2
2020-03-30In Haskell packages, set MAKE_ENV while running ./Setup build.riastradh1-1/+2
2020-03-30New package variable HASKELL_PKG_NAME.riastradh1-2/+4
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-30subversion-base: add option for plaintext password storage, default off.wiz1-2/+3
Requested by Thomas Orgis.
2020-03-30mk/compiler: Make gfortran the default fortran compiler.nia2-13/+2
Discussed on tech-pkg@ before freeze.
2020-03-30mk/help/help.awk: find library functions in undefined-references.helprillig1-6/+33
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-29mk/defaults/options.description: add esitaca1-0/+1
Add description for esi, ESI (Edge Side Includes).
2020-03-28mk/subst.mk: fix typo in documentationrillig1-2/+2
2020-03-27Allow mk.conf to actually overwrite USE_PKG_ADMIN_DIGEST.joerg1-2/+2
2020-03-26mk/compiler/gfortran.mk: Add comment about gcc 4.8 handlinggdt1-1/+4
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-26mk/compiler/gfortran.mk: Fix bugs in version selectiongdt1-3/+3
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-26mk: Support undefined UNLIMIT_RESOURCES.jperkin1-2/+2
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-24Don't use normal memory size limits with GHC for module builds.joerg1-7/+10
2020-03-24datasize limits for VMs should also be matched by VM limits.joerg1-5/+5
2020-03-24replace-interpreter: make documentation more preciserillig1-4/+4
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-23mk/subst.mk: Unbreak builds with no substitutions.jperkin1-2/+2
At least some implementations of rmdir(1) do not allow you to remove the current working directory. Fixes bootstrap on SunOS.
2020-03-23mk: Explain what SSP is, requested by rillig@.jperkin1-2/+3
2020-03-23mk: Remove warning messages for unsupported check targets.jperkin3-30/+12
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-23New target test-env, like build-env and configure-env.riastradh2-4/+37
2020-03-22mk/configure/replace-interpreter.mk: add missing empty linerillig1-1/+2
The optional /usr/bin/env is independent from sh. It applies to all languages.
2020-03-22Add a ulimit flag for address space limits. Support it on NetBSD forjoerg2-6/+8
now.
2020-03-22mk/subst.mk: only create cookie after everything is finishedrillig1-3/+3
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-22mk/subst.mk: ignore directories in SUBST_FILESrillig1-2/+2
Seen in multimedia/libmp4v2, where a pattern also matches the CVS directory from the distfiles.
2020-03-22mk/subst.mk: use the same severity for all messagesrillig1-4/+5
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-22mk/bsd.prefs.mk: add PREFIX to show-all-dirsrillig1-2/+2