summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2019-08-13 14:46:28 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2019-08-13 14:46:28 +0000
commit5223f58a4891cb4b842355aa2cdaaed78d901b3c (patch)
treef186b130a66fd45a90789815010748bae1750cef /Mk
parentStyle: move GH_* variables closer to each other (diff)
Mk/bsd.sanity.mk: Flag non-integer PORTREVISION/PORTEPOCH
Currently they are not checked and something like PORTREVISION=foo or just PORTREVISION= is accepted. Some ports use indirection via custom variables for them so it is worthwhile to check that they are set to sane values. While here fix ports that currently have non-integer PORTREVISION or PORTEPOCH. Approved by: portmgr (mat) Differential Revision: https://reviews.freebsd.org/D21225
Notes
Notes: svn path=/head/; revision=508829
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.sanity.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
index 2aa0f21fe4c8..04542537d798 100644
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -168,6 +168,14 @@ DEV_ERROR+= "PORT${_type} does not do anything unless the ${_type} option is pre
. endif
.endfor
+.if empty(PORTEPOCH) || !empty(PORTEPOCH:C/[0-9]+//)
+DEV_ERROR+= "PORTEPOCH needs to be an integer \>= 0"
+.endif
+
+.if empty(PORTREVISION) || !empty(PORTREVISION:C/[0-9]+//)
+DEV_ERROR+= "PORTREVISION needs to be an integer \>= 0"
+.endif
+
# Whitelist of options helper lookalikes that should not be reported on:
_OPTIONS_HELPERS_SEEN+= OPENSSL_LDFLAGS
_BROKEN_OPTIONS_HELPERS=