From amdmi3@amdmi3.ru  Thu Jul 29 14:36:29 2010
Return-Path: <amdmi3@amdmi3.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BF7311065675
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 29 Jul 2010 14:36:29 +0000 (UTC)
	(envelope-from amdmi3@amdmi3.ru)
Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.116.15])
	by mx1.freebsd.org (Postfix) with ESMTP id 7BA118FC1E
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 29 Jul 2010 14:36:28 +0000 (UTC)
Received: from [213.148.20.85] (helo=hive.panopticon)
	by smtp.timeweb.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256)
	(Exim 4.71)
	(envelope-from <amdmi3@amdmi3.ru>)
	id 1OeUDj-0007ZX-66
	for FreeBSD-gnats-submit@freebsd.org; Thu, 29 Jul 2010 18:36:27 +0400
Received: from hades.panopticon (hades.panopticon [192.168.0.32])
	by hive.panopticon (Postfix) with ESMTP id E1CC0B865
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 29 Jul 2010 18:36:25 +0400 (MSD)
Received: by hades.panopticon (Postfix, from userid 1000)
	id D437FB84E; Thu, 29 Jul 2010 18:36:25 +0400 (MSD)
Message-Id: <20100729143625.D437FB84E@hades.panopticon>
Date: Thu, 29 Jul 2010 18:36:25 +0400 (MSD)
From: Dmitry Marakasov <amdmi3@FreeBSD.org>
Reply-To: Dmitry Marakasov <amdmi3@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [bsd.licenses.mk]: make license framework optional
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         149070
>Category:       ports
>Synopsis:       [bsd.licenses.mk]: make license framework optional
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 29 14:40:00 UTC 2010
>Closed-Date:    Fri Aug 20 12:18:36 UTC 2010
>Last-Modified:  Fri Aug 20 12:20:03 UTC 2010
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 8.0-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #2: Wed Jun 2 02:28:21 MSD 2010 root@hades.panopticon:/async/obj/usr/src/sys/HADES i386


>Description:
FreeBSD ports are known to its vast customizability, but there are no means to disable newly added license framework. The patch fixes it.

>How-To-Repeat:
>Fix:

--- optional-licenses.patch begins here ---
Index: bsd.licenses.mk
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/Mk/bsd.licenses.mk,v
retrieving revision 1.2
diff -u -r1.2 bsd.licenses.mk
--- bsd.licenses.mk	26 May 2010 02:20:27 -0000	1.2
+++ bsd.licenses.mk	29 Jul 2010 14:35:08 -0000
@@ -42,6 +42,7 @@
 # Variables provided to the ports system and users in general, to modify the
 # behavior of the framework
 #
+# DISABLE_LICENSES			- Disable license auditing framework completely.
 # NO_LICENSES_INSTALL		- Do not install catalog, report and licenses.
 # NO_LICENSES_DIALOGS		- Disable interactive menus for asking licenses.
 
@@ -119,7 +120,7 @@
 
 .if defined(_POSTMKINCLUDED) && !defined(BEFOREPORTMK)
 
-.if defined(LICENSE)
+.if defined(LICENSE) && !defined(DISABLE_LICENSES)
 
 # Include known licenses from database
 
@@ -752,17 +753,11 @@
 
 .endif
 
-.else	# !LICENSE
+.elif !defined(DISABLE_LICENSES)	# !LICENSE
 
 check-license:
 	@${ECHO_MSG} "===>  License check disabled, port has not defined LICENSE"
 
-ask-license:
-	@${DO_NADA}
-
-install-license:
-	@${DO_NADA}
-
 .endif	# LICENSE
 
 .endif
Index: bsd.port.mk
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.643
diff -u -r1.643 bsd.port.mk
--- bsd.port.mk	15 Jul 2010 14:48:50 -0000	1.643
+++ bsd.port.mk	29 Jul 2010 14:26:36 -0000
@@ -6448,6 +6448,21 @@
 .endif
 .endif
 
+.if !target(check-license)
+check-license:
+	@${DO_NADA}
+.endif
+
+.if !target(ask-license)
+ask-license:
+	@${DO_NADA}
+.endif
+
+.if !target(install-license)
+install-license:
+	@${DO_NADA}
+.endif
+
 .endif
 # End of post-makefile section.
 
--- optional-licenses.patch ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: amdmi3 
Responsible-Changed-When: Mon Aug 2 19:34:00 UTC 2010 
Responsible-Changed-Why:  
Portmgr territory 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149070 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Fri Aug 20 12:18:30 UTC 2010 
State-Changed-Why:  
Committed, thanks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149070 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/149070: commit references a PR
Date: Fri, 20 Aug 2010 12:15:11 +0000 (UTC)

 pav         2010-08-20 12:15:02 UTC
 
   FreeBSD ports repository
 
   Modified files:
     Mk                   bsd.commands.mk bsd.licenses.mk 
                          bsd.port.mk 
   Log:
   - Fix plist leftovers when using LICENSE framework and having @cwd command in
     plist
   
   PR:             ports/147296
   Submitted by:   beat
   
   - Provide end-user DISABLE_LICENSES knob to disable licensing framework
   
   PR:             ports/149070
   Submitted by:   amdmi3
   
   - Include bsd.gnome.mk when INSTALLS_ICONS is defined
   
   PR:             ports/148051
   Submitted by:   amdmi3
   
   - Disable xz memory limit to fix port builds on low-memory systems
   
   PR:             ports/148250
   Submitted by:   Warren Block <wblock@wonkity.com>
   
   - Remove compatibility shim for 6.3-RELEASE and older in describe target
   
   PR:             ports/146067
   Submitted by:   Alex Kozlov <spam@rm-rf.kiev.ua>
   
   - Remove INSTALLS_SHLIB
   
   PR:             ports/146351
   Submitted by:   Alex Kozlov <spam@rm-rf.kiev.ua>
   
   - Remove last trace of APACHE_COMPAT
   
   PR:             ports/147114
   Submitted by:   pgollucci
   
   - Allow ports to override _MAKE_JOBS
   
   PR:             ports/148754
   Submitted by:   Anonymous <swell.k@gmail.com>
   
   - Fixes to comments block
   
   PR:             ports/135649, ports/148190
   Submitted by:   pgollucci, gcooper
   
   Revision  Changes    Path
   1.6       +4 -3      ports/Mk/bsd.commands.mk
   1.3       +6 -10     ports/Mk/bsd.licenses.mk
   1.644     +36 -139   ports/Mk/bsd.port.mk
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
