From owner-svn-ports-head@freebsd.org Fri Jun 9 18:12:55 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE121BFA228; Fri, 9 Jun 2017 18:12:55 +0000 (UTC) (envelope-from kwm@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 mx1.freebsd.org (Postfix) with ESMTPS id 7CD8D76432; Fri, 9 Jun 2017 18:12:55 +0000 (UTC) (envelope-from kwm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v59ICs3d011793; Fri, 9 Jun 2017 18:12:54 GMT (envelope-from kwm@FreeBSD.org) Received: (from kwm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v59ICsso011792; Fri, 9 Jun 2017 18:12:54 GMT (envelope-from kwm@FreeBSD.org) Message-Id: <201706091812.v59ICsso011792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kwm set sender to kwm@FreeBSD.org using -f From: Koop Mast Date: Fri, 9 Jun 2017 18:12:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r443024 - head/Mk X-SVN-Group: ports-head 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.23 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: Fri, 09 Jun 2017 18:12:55 -0000 Author: kwm Date: Fri Jun 9 18:12:54 2017 New Revision: 443024 URL: https://svnweb.freebsd.org/changeset/ports/443024 Log: Meson is picky about the arguments of build options. For example a option of the "boolean" type only accepts true/false this option is covered by ${opt}_MESON_TRUE/_FALSE. Add option helpers ${opt}_MESON_YES/_NO for the "combo" type which accepts yes and no. Approved by: portmgr@ (mat@) Differential Revision: https://reviews.freebsd.org/D11078 Modified: head/Mk/bsd.options.mk Modified: head/Mk/bsd.options.mk ============================================================================== --- head/Mk/bsd.options.mk Fri Jun 9 17:41:19 2017 (r443023) +++ head/Mk/bsd.options.mk Fri Jun 9 18:12:54 2017 (r443024) @@ -124,6 +124,13 @@ # Option enabled -D${content}=false # Option disabled -D${content}=true # +# ${opt}_MESON_YES Will add to MESON_ARGS: +# Option enabled -D${content}=yes +# Option disabled -D${content}=no +# ${opt}_MESON_NO Will add to MESON_ARGS: +# Option enabled -D${content}=no +# Option disabled -D${content}=yes +# # ${opt}_IMPLIES When opt is enabled, options named in IMPLIES will # get enabled too. # ${opt}_PREVENTS When opt is enabled, if any options in PREVENTS are @@ -539,6 +546,12 @@ MESON_ARGS+= ${${opt}_MESON_TRUE:C/.*/-D&=true/} . if defined(${opt}_MESON_FALSE) MESON_ARGS+= ${${opt}_MESON_FALSE:C/.*/-D&=false/} . endif +. if defined(${opt}_MESON_YES) +MESON_ARGS+= ${${opt}_MESON_YES:C/.*/-D&=yes/} +. endif +. if defined(${opt}_MESON_NO) +MESON_ARGS+= ${${opt}_MESON_NO:C/.*/-D&=no/} +. endif . for configure in CONFIGURE CMAKE MESON QMAKE . if defined(${opt}_${configure}_ON) ${configure}_ARGS+= ${${opt}_${configure}_ON} @@ -594,6 +607,12 @@ MESON_ARGS+= ${${opt}_MESON_TRUE:C/.*/-D&=false/} . endif . if defined(${opt}_MESON_FALSE) MESON_ARGS+= ${${opt}_MESON_FALSE:C/.*/-D&=true/} +. endif +. if defined(${opt}_MESON_YES) +MESON_ARGS+= ${${opt}_MESON_YES:C/.*/-D&=no/} +. endif +. if defined(${opt}_MESON_NO) +MESON_ARGS+= ${${opt}_MESON_NO:C/.*/-D&=yes/} . endif . for configure in CONFIGURE CMAKE MESON QMAKE . if defined(${opt}_${configure}_OFF)