From owner-svn-ports-head@freebsd.org Mon May 14 18:28:36 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 933BADFEF2E; Mon, 14 May 2018 18:28:36 +0000 (UTC) (envelope-from jrm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 474A184086; Mon, 14 May 2018 18:28:36 +0000 (UTC) (envelope-from jrm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 276791FCFD; Mon, 14 May 2018 18:28:36 +0000 (UTC) (envelope-from jrm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4EISaJU081286; Mon, 14 May 2018 18:28:36 GMT (envelope-from jrm@FreeBSD.org) Received: (from jrm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4EISa5M081285; Mon, 14 May 2018 18:28:36 GMT (envelope-from jrm@FreeBSD.org) Message-Id: <201805141828.w4EISa5M081285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrm set sender to jrm@FreeBSD.org using -f From: Joseph Mingrone Date: Mon, 14 May 2018 18:28:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r469945 - head/Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: jrm X-SVN-Commit-Paths: head/Mk/Uses X-SVN-Commit-Revision: 469945 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.26 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, 14 May 2018 18:28:36 -0000 Author: jrm Date: Mon May 14 18:28:35 2018 New Revision: 469945 URL: https://svnweb.freebsd.org/changeset/ports/469945 Log: Mk/Uses/Emacs: Add noflavors argument to USES=emacs Reported by: des Reviewed by: des Approved by: ashish Differential Revision: https://reviews.freebsd.org/D15265 Modified: head/Mk/Uses/emacs.mk Modified: head/Mk/Uses/emacs.mk ============================================================================== --- head/Mk/Uses/emacs.mk Mon May 14 18:26:36 2018 (r469944) +++ head/Mk/Uses/emacs.mk Mon May 14 18:28:35 2018 (r469945) @@ -5,14 +5,16 @@ # # Feature: emacs # Usage: USES=emacs or USES=emacs:args -# Valid ARGS: build, run +# Valid ARGS: build, run, noflavors # -# build Indicates that Emacs is needed at build time. -# run Indicates that Emacs is needed at run time. +# build Indicates that Emacs is required at build time. +# run Indicates that Emacs is required at run time. +# noflavors Prevents flavors. This is implied when there is no run +# dependency on Emacs. # # If build and run are omitted from the argument list, Emacs will be added to # BUILD_DEPENDS and RUN_DEPENDS. EMACS_NO_DEPENDS can be set to prevent both -# Emacs dependencies. +# dependencies. # # Variables, which can be set in make.conf: # DEFAULT_VERSIONS+= The default flavor for Emacs ports (ports with @@ -20,14 +22,18 @@ # can be added to DEFAULT_VERSIONS. For example, # DEFAULT_VERSIONS+= emacs=nox # Valid flavors: full canna nox devel_full devel_nox -# Flavors specified on the command line take precedence. +# Flavors specified on the command line take +# precedence. # # Variables, which can be set by ports: # EMACS_FLAVORS_EXCLUDE: Do NOT build these Emacs flavors. -# If EMACS_FLAVORS_EXCLUDE is not define then all -# valid Emacs flavors are assumed. +# If EMACS_FLAVORS_EXCLUDE is not defined and +# - there is a run dependency on Emacs +# - the noflavors argument is not specified +# then all valid Emacs flavors are assumed. # # EMACS_NO_DEPENDS: Do NOT add build or run dependencies on Emacs. +# This will prevent flavors. # # Variables, which can be read by ports: # EMACS_CMD: Emacs command with full path (e.g. /usr/local/bin/emacs-25.3) @@ -50,15 +56,20 @@ _INCLUDE_USES_EMACS_MK= yes # pollutes the build/run dependency detection .undef _EMACS_BUILD_DEP .undef _EMACS_RUN_DEP +.undef _EMACS_NOFLAVORS _EMACS_ARGS= ${emacs_ARGS:S/,/ /g} .if ${_EMACS_ARGS:Mbuild} _EMACS_BUILD_DEP= yes _EMACS_ARGS:= ${_EMACS_ARGS:Nbuild} .endif .if ${_EMACS_ARGS:Mrun} -_EMACS_RUN_DEP= yes +_EMACS_RUN_DEP= yes _EMACS_ARGS:= ${_EMACS_ARGS:Nrun} .endif +.if ${_EMACS_ARGS:Mnoflavors} +_EMACS_NOFLAVORS= yes +_EMACS_ARGS:= ${_EMACS_ARGS:Nnoflavors} +.endif # If the port does not specify a build or run dependency, and does not define # EMACS_NO_DEPENDS, assume both dependencies are required. @@ -68,23 +79,28 @@ _EMACS_BUILD_DEP= yes _EMACS_RUN_DEP= yes .endif -.if defined(_EMACS_RUN_DEP) +# Only set FLAVORS when... +.if defined(_EMACS_RUN_DEP) && !defined(_EMACS_NOFLAVORS) FLAVORS= full canna nox devel_full devel_nox .for flavor in ${EMACS_FLAVORS_EXCLUDE} FLAVORS:= ${FLAVORS:N${flavor}} .endfor -.elif !defined(EMACS_NO_DEPENDS) -FLAVORS= full .endif -.if empty(FLAVOR) +# Only set FLAVOR when... +.if defined(_EMACS_RUN_DEP) && !defined(_EMACS_NOFLAVORS) && empty(FLAVOR) .if defined(EMACS_DEFAULT) FLAVOR= ${EMACS_DEFAULT} .else FLAVOR= ${FLAVORS:[1]} -.endif -.endif +.endif # defined(EMACS_DEFAULT) +.endif # !defined(_EMACS_NOFLAVORS) && defined(_EMACS_RUN_DEP) && empty(FLAVOR) + +.if !empty(FLAVOR) EMACS_FLAVOR= ${FLAVOR} +.else +EMACS_FLAVOR= full +.endif .if ${FLAVOR:Mdevel*} EMACS_VER= 27.0.50