diff options
author | dholland <dholland@pkgsrc.org> | 2015-01-01 06:06:06 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2015-01-01 06:06:06 +0000 |
commit | cd5b6e5552c28a18ae81436f8d3ae8a880eaa9da (patch) | |
tree | 41aa726f7be3484cb9237c1ed9ebef94c543579f /mk/misc | |
parent | 56637bf53c5be79ee7d53924beff1773c9d62889 (diff) | |
download | pkgsrc-cd5b6e5552c28a18ae81436f8d3ae8a880eaa9da.tar.gz |
Add support for BROKEN_ON_PLATFORM and BROKEN_EXCEPT_ON_PLATFORM, as per
discussion on tech-pkg.
BROKEN_ON_PLATFORM and NOT_FOR_PLATFORM are the same, except that
(now) BROKEN_ON_PLATFORM sets PKG_FAIL_REASON and NOT_FOR_PLATFORM
sets PKG_SKIP_REASON. BROKEN_EXCEPT_FOR_PLATFORM and ONLY_FOR_PLATFORM
correspond in the same way.
The idea is that going forward we will distinguish unbuildable
packages that theoretically ought to be fixed (these are BROKEN) from
packages where it doesn't make sense to build (these are NOT_FOR)...
examples of the former include most non-64-bit-clean packges; examples
of the latter include OS-specific language bindings.
A general review of the uses of NOT_FOR_PLATFORM and ONLY_FOR_PLATFORM
(converting many of them to BROKEN...) is coming up.
Similarly, a general review of the uses of PKG_FAIL_REASON and
PKG_SKIP_REASON is coming up.
For this to become useful, pbulk needs to be taught to report failing
and skipped packages differently - the idea is that failing packages
should be reported up front and skipped packages don't need to be. This
has not been done yet, but one set of things at a time...
Diffstat (limited to 'mk/misc')
-rw-r--r-- | mk/misc/can-be-built-here.mk | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/mk/misc/can-be-built-here.mk b/mk/misc/can-be-built-here.mk index 8218687a38c..ba23f0be8bb 100644 --- a/mk/misc/can-be-built-here.mk +++ b/mk/misc/can-be-built-here.mk @@ -1,10 +1,11 @@ -# $NetBSD: can-be-built-here.mk,v 1.7 2014/12/30 15:13:19 wiz Exp $ +# $NetBSD: can-be-built-here.mk,v 1.8 2015/01/01 06:06:06 dholland Exp $ # # This file checks whether a package can be built in the current pkgsrc # environment. It checks the following variables: # # * NOT_FOR_COMPILER, ONLY_FOR_COMPILER # * NOT_FOR_PLATFORM, ONLY_FOR_PLATFORM +# * BROKEN_ON_PLATFORM, BROKEN_EXCEPT_ON_PLATFORM # * NOT_FOR_BULK_PLATFORM # * NOT_FOR_UNPRIVILEGED, ONLY_FOR_UNPRIVILEGED # * PKG_FAIL_REASON, PKG_SKIP_REASON @@ -89,6 +90,31 @@ _CBBH.oplat= yes . endfor .endif +# Check BROKEN_ON_PLATFORM +_CBBH_CHECKS+= bplat +_CBBH_MSGS.bplat= "This package is broken on these platforms: "${BROKEN_ON_PLATFORM:Q}"." + +_CBBH.bplat= yes +.for p in ${BROKEN_ON_PLATFORM} +. if !empty(MACHINE_PLATFORM:M${p}) +_CBBH.bplat= no +. endif +.endfor + +# Check BROKEN_EXCEPT_ON_PLATFORM +_CBBH_CHECKS+= beplat +_CBBH_MSGS.beplat= "This package is broken except on these platforms: "${BROKEN_EXCEPT_ON_PLATFORM:Q}"." + +_CBBH.beplat= yes +.if defined(BROKEN_EXCEPT_ON_PLATFORM) && !empty(BROKEN_EXCEPT_ON_PLATFORM) +_CBBH.beplat= no +. for p in ${BROKEN_EXCEPT_ON_PLATFORM} +. if !empty(MACHINE_PLATFORM:M${p}) +_CBBH.beplat= yes +. endif +. endfor +.endif + # Check NOT_FOR_UNPRIVILEGED _CBBH_CHECKS+= nunpriv _CBBH_MSGS.nunpriv= "This package is not available in unprivileged mode." |