Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jul 2018 11:13:06 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r474850 - in head/Mk: . Scripts
Message-ID:  <201807181113.w6IBD6EX017603@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Wed Jul 18 11:13:06 2018
New Revision: 474850
URL: https://svnweb.freebsd.org/changeset/ports/474850

Log:
  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

Modified:
  head/Mk/Scripts/qa.sh   (contents, props changed)
  head/Mk/bsd.port.mk   (contents, props changed)

Modified: head/Mk/Scripts/qa.sh
==============================================================================
--- head/Mk/Scripts/qa.sh	Wed Jul 18 11:13:02 2018	(r474849)
+++ head/Mk/Scripts/qa.sh	Wed Jul 18 11:13:06 2018	(r474850)
@@ -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

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Wed Jul 18 11:13:02 2018	(r474849)
+++ head/Mk/bsd.port.mk	Wed Jul 18 11:13:06 2018	(r474850)
@@ -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}" \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807181113.w6IBD6EX017603>