summaryrefslogtreecommitdiff
path: root/mk/misc
diff options
context:
space:
mode:
authordholland <dholland>2015-01-01 06:06:06 +0000
committerdholland <dholland>2015-01-01 06:06:06 +0000
commiteaa71a7c32f8f5d6737f294674042438b9852532 (patch)
tree41aa726f7be3484cb9237c1ed9ebef94c543579f /mk/misc
parent8548f584058dc7bed74a905e7f52951e0300ec78 (diff)
downloadpkgsrc-eaa71a7c32f8f5d6737f294674042438b9852532.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.mk28
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."