summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2018-07-18 11:13:06 +0000
committerMathieu Arnold <mat@FreeBSD.org>2018-07-18 11:13:06 +0000
commitf305cacf3a2bd562aa174b21fd40d45d4d734686 (patch)
tree490786ad9e67260d3cbc27c2747055793895752e
parentStart a debug-license target. (diff)
Add a license qa check to tell porters when their ports will be mostly
useless. Reviewed by: antoine Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D16103
Notes
Notes: svn path=/head/; revision=474850
-rw-r--r--Mk/Scripts/qa.sh25
-rw-r--r--Mk/bsd.port.mk2
2 files changed, 27 insertions, 0 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh
index b5301ded0c93..29e3b9d2f767 100644
--- a/Mk/Scripts/qa.sh
+++ b/Mk/Scripts/qa.sh
@@ -914,9 +914,34 @@ flavors()
return ${rc}
}
+license()
+{
+ local autoaccept pkgmirror #distsell distmirror pkgsell
+
+ if [ -n "$LICENSE" ]; then
+ case "$LICENSE_PERMS" in
+ auto-accept) autoaccept=1 ;;
+ #dist-mirror) distmirror=1 ;;
+ #dist-sell) distsell=1 ;;
+ pkg-mirror) pkgmirror=1 ;;
+ #pkg-sell) pkgsell=1 ;;
+ esac
+
+ if [ -z "$autoaccept" ]; then
+ warn "License is not auto-accepted, packages will not be built, ports depending on this one will be ignored."
+ fi
+ if [ -z "$pkgmirror" ]; then
+ warn "License does not allow package to be distributed, ports depending on this one will be ignored"
+ fi
+ fi
+
+ return 0
+}
+
checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo"
checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo"
checks="$checks proxydeps sonames perlcore no_arch gemdeps gemfiledeps flavors"
+checks="$checks license"
ret=0
cd ${STAGEDIR} || exit 1
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index cc2553c688e8..a9694781d711 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1631,6 +1631,8 @@ QA_ENV+= STAGEDIR=${STAGEDIR} \
LIB_RUN_DEPENDS='${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}' \
UNIFIED_DEPENDS=${_UNIFIED_DEPENDS:C,([^:]*:[^:]*):?.*,\1,:O:u:Q} \
PKGBASE=${PKGBASE} \
+ LICENSE="${LICENSE}" \
+ LICENSE_PERMS="${_LICENSE_PERMS}" \
PORTNAME=${PORTNAME} \
NO_ARCH=${NO_ARCH} \
"NO_ARCH_IGNORE=${NO_ARCH_IGNORE}" \