diff options
author | rillig <rillig> | 2006-10-23 16:07:12 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-10-23 16:07:12 +0000 |
commit | 3c516cdac9f3a8211600d955292ab9f33c573668 (patch) | |
tree | 4d0f6e8bc23294d1114801049b0de2d10ecf780f /mk/configure | |
parent | 7b0dd995c255f846ca2bfbc80d247f18371019be (diff) | |
download | pkgsrc-3c516cdac9f3a8211600d955292ab9f33c573668.tar.gz |
Added the CHECK_PORTABILITY_SKIP variable that may be defined by packages
to exclude some files from the portability checks.
Diffstat (limited to 'mk/configure')
-rw-r--r-- | mk/configure/check-portability.mk | 12 | ||||
-rw-r--r-- | mk/configure/check-portability.sh | 13 |
2 files changed, 18 insertions, 7 deletions
diff --git a/mk/configure/check-portability.mk b/mk/configure/check-portability.mk index 2d06a80ae9d..1679671f825 100644 --- a/mk/configure/check-portability.mk +++ b/mk/configure/check-portability.mk @@ -1,4 +1,4 @@ -# $NetBSD: check-portability.mk,v 1.6 2006/10/21 19:07:18 rillig Exp $ +# $NetBSD: check-portability.mk,v 1.7 2006/10/23 16:07:12 rillig Exp $ # # This file contains some checks that are applied to the configure # scripts to check for certain constructs that are known to cause @@ -20,12 +20,19 @@ # # Default value: no # +# CHECK_PORTABILITY_SKIP: List of Pathmask +# The list of files that should be skipped in the portability +# check. +# +# Default value: empty. +# .if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss]) CHECK_PORTABILITY?= yes .endif CHECK_PORTABILITY?= no SKIP_PORTABILITY_CHECK?= no +CHECK_PORTABILITY_SKIP?= # none .if ${CHECK_PORTABILITY:M[Yy][Ee][Ss]} != "" && \ ${SKIP_PORTABILITY_CHECK:M[Yy][Ee][Ss]} == "" @@ -37,4 +44,5 @@ _configure-check-for-test: ${_PKG_SILENT}${_PKG_DEBUG} \ [ -d ${WRKSRC}/. ] || exit 0; \ cd ${WRKSRC} \ - && sh ${PKGSRCDIR}/mk/configure/check-portability.sh + && env SKIP_FILTER=${CHECK_PORTABILITY_SKIP:@p@${p}) continue;;@:Q} \ + sh ${PKGSRCDIR}/mk/configure/check-portability.sh diff --git a/mk/configure/check-portability.sh b/mk/configure/check-portability.sh index dd1d2c6dc0b..ad9fa46bbb3 100644 --- a/mk/configure/check-portability.sh +++ b/mk/configure/check-portability.sh @@ -1,4 +1,4 @@ -# $NetBSD: check-portability.sh,v 1.3 2006/10/21 10:37:48 rillig Exp $ +# $NetBSD: check-portability.sh,v 1.4 2006/10/23 16:07:12 rillig Exp $ # # This program checks the extracted files for portability issues that # are likely to result in false assumptions by the package. @@ -10,9 +10,15 @@ # the PATH, it calls the utilities by their base names. It also assumes # to be interpreted by a POSIX-conforming shell. # +# ENVIRONMENT VARIABLES +# +# SKIP_FILTER: A shell command that excludes some patterns. +# set -eu +: ${SKIP:=""} + exitcode=0 last_heading="" @@ -93,10 +99,7 @@ find * -type f -print 2>/dev/null \ | { while read fname; do - case "$fname" in - *.orig) - continue;; - esac + eval "case \"\$fname\" in $SKIP_FILTER *.orig) continue;; esac" read firstline < "$fname" || continue case "$firstline" in |