From owner-svn-ports-head@FreeBSD.ORG Mon Jul 16 11:38:36 2012 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CFAC21065672; Mon, 16 Jul 2012 11:38:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB7988FC08; Mon, 16 Jul 2012 11:38:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6GBcafF037164; Mon, 16 Jul 2012 11:38:36 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6GBcaYX037161; Mon, 16 Jul 2012 11:38:36 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201207161138.q6GBcaYX037161@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 16 Jul 2012 11:38:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r300943 - head/Mk X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2012 11:38:36 -0000 Author: bapt Date: Mon Jul 16 11:38:36 2012 New Revision: 300943 URL: http://svn.freebsd.org/changeset/ports/300943 Log: - Document new options framework in bsd.options.mk - new OPTIONS_DEFINE_${ARCH} and OPTIONS_DEFAULT_${ARCH} to define and activate options per arches. - No more append to PORT_OPTIONS options that are not in OPTIONS_DEFINE, (in the expection of DOCS, NLS, EXAMPLES for compatibility) Modified: head/Mk/bsd.options.mk head/Mk/bsd.port.mk Modified: head/Mk/bsd.options.mk ============================================================================== --- head/Mk/bsd.options.mk Mon Jul 16 11:31:09 2012 (r300942) +++ head/Mk/bsd.options.mk Mon Jul 16 11:38:36 2012 (r300943) @@ -2,6 +2,25 @@ # $FreeBSD$ # Global options # +# OPTIONS_DEFINE - List of options this ports accept +# OPTIONS_DEFINE_${ARCH} - List of options this ports accept and are +# specific to ${ARCH} +# OPTIONS_DEFAULT - List of options activated by default +# OPTIONS_DEFAULT_${ARCH} - List of options activated by default for a +# given arch +# +# OPTIONS_EXCLUDE_${ARCH} - List of options unsupported on a given ${ARCH} +# ${OPTION}_DESC - Description the the ${OPTION} +# +# OPTIONS_SINGLE - List of radio choice grouped options +# OPTIONS_MULTI - List of multiple-choice grouped options +# +# OPTIONS_SINGLE_${NAME} - List of OPTIONS grouped as radio choice (for +# the single named as ${NAME} as defined in +# OPTIONS_SINGLE) +# OTPIONS_MULTI_${NAME} - List of OPTIONS grouped as multiple-choice +# (for the multi named as ${NAME} as defined in +# OPTIONS_MULTI) ## # Set all the options available for the ports, beginning with the @@ -27,11 +46,26 @@ PORT_OPTIONS+= NLS PORT_OPTIONS+= EXAMPLES .endif +# Exclude per arch options .for opt in ${OPTIONS_EXCLUDE_${ARCH}} OPTIONS_DEFINE:= ${OPTIONS_DEFINE:N${opt}} OPTIONS_DEFAULT:= ${OPTIONS_DEFAULT:N${opt}} .endfor +# Add per arch options +.for opt in ${OPTIONS_DEFINE_${ARCH}} +.if empty(OPTIONS_DEFINE:M${opt}) +OPTIONS_DEFINE+= ${opt} +.endif +.endfor + +# Add per arch defaults +.for opt in ${OPTIONS_DEFAULT_${ARCH}} +.if empty(OPTIONS_DEFAULT:M${opt}} +OPTIONS_DEFAULT+= ${opt} +.endif +.endfor + # Append options set by the port Makefile .for opt in ${OPTIONS_DEFINE} ALL_OPTIONS+= ${opt} @@ -98,7 +132,9 @@ PORT_OPTIONS:= ${PORT_OPTIONS:O:u} ## Set system-wide defined options (set by user in make.conf) . for opt in ${OPTIONS_SET} +. if !empty(OPTIONS_DEFINE:M${opt}) PORT_OPTIONS+= ${opt} +. endif . endfor PORT_OPTIONS:= ${PORT_OPTIONS:O:u} @@ -109,7 +145,9 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} ## Set the options specified per-port (set by user in make.conf) . for opt in ${${UNIQUENAME}_SET} +. if !empty(OPTIONS_DEFINE:M${opt}) PORT_OPTIONS+= ${opt} +. endif . endfor PORT_OPTIONS:= ${PORT_OPTIONS:O:u} @@ -139,7 +177,9 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} ## Finish by using the options set by the port config dialog, if any . for opt in ${OPTIONS_FILE_SET} +. if !empty(OPTIONS_DEFINE:M${opt}) PORT_OPTIONS+= ${opt} +. endif . endfor PORT_OPTIONS:= ${PORT_OPTIONS:O:u} Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Mon Jul 16 11:31:09 2012 (r300942) +++ head/Mk/bsd.port.mk Mon Jul 16 11:38:36 2012 (r300943) @@ -809,18 +809,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # # Here are some variables used in various stages. # -# For options: -# OPTIONS - List of what WITH_