From owner-freebsd-ports@FreeBSD.ORG Sun Jun 9 22:12:13 2013 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B1E33643 for ; Sun, 9 Jun 2013 22:12:13 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) by mx1.freebsd.org (Postfix) with ESMTP id 4A18A174F for ; Sun, 9 Jun 2013 22:12:13 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id e11so264233wgh.6 for ; Sun, 09 Jun 2013 15:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=+M5TwWKeALNRPN0kVkNfSSU7Uq7rltmFfhyJf5LMxu4=; b=jV9knOycVeW4/YsfVFaSFS28seqj1yDz1kWFm9Ph7MalZJIU6yxNZtJYajzBfDJK6L GQ1YH5hxIpWw6J9YiBtnbKBK04km1s88qrkpADHndFZFugKtRWarunHIvYvH5V/u+vUX XFjQoP6dU1oV4hbEQjAyOZVl8rSDomLDwZX4vvbTRlV8vOIfeKinN0te9iSWD8pAot6X i+Z2zHqKyRr3d/35bUs5svm3tO9Pm7lAb1msFXo+m0m/QzFuil+QSD06an7YdF24dRVn 1Xv0GM7wzxB/HIizM05TTp53gpb9H2p6UiC7X7+WNfWwIPKpxw2xHOzY7CeaxSN8dAPR Z6EA== X-Received: by 10.194.89.39 with SMTP id bl7mr1848221wjb.15.1370815931786; Sun, 09 Jun 2013 15:12:11 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id eq15sm8300696wic.4.2013.06.09.15.12.10 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 09 Jun 2013 15:12:10 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 10 Jun 2013 00:12:08 +0200 From: Baptiste Daroussin To: ports@FreeBSD.org Subject: [CFT] New helpers now that new options frameworks allow them :) Message-ID: <20130609221208.GU35160@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rNtUoUA3Tn0/N1iC" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2013 22:12:13 -0000 --rNtUoUA3Tn0/N1iC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Here is a couple of new helpers that the new options framework allows. To simplify some ports here is a couple of helpers I propose to add to the ports tree: OPTIONS_SUB= yes if set, the framework will automatically some new PLIST_SUB: for example: OPTIONS_DEFINE= OPT1 if OPT1 is set OPT1="" will be added to PLIST_SUB if OPT1 is unset OPT1="@comment " will be added to the PLIST_SUB OPT1_CONFIGURE_ENABLE= option if OPT1 is set --enable-option will be added to CONFIGURE_ARGS if OPT1 is unset --disable-option will be added to CONFIGURE_ARGS OPT1_CONFIGURE_ON= --with-bla OPT1_CONFIGURE_OFF= --no-something if OPT1 is set --with-bla will be added to CONFIGURE_ARGS if OPT1 is unset --no-something will be added to CONFIGURE_ARGS OPT1_CFLAGS OPT1_LDFLAGS OPT1_CXXFLAGS OPT1_MAKE_ENV OPT1_CONFIGURE_ENV if OPT1 is set the flags will be appended to the corresponding MACROS. OPT1_USES= bla if OP1 is set bla will be added to USES OPT1_TYPE_DEPENDS= XXX:${PORTSDIR}/cat/port with TYPE being PKG EXTRACT PATCH FETCH BUILD LIB or RUN Will add the given dependency to the right place if OPT1 is set Patch is here: http://people.freebsd.org/~bapt/optionsng.diff An example of usage is: http://people.freebsd.org/~bapt/zsh-new-options.diff (on top of the zsh Makefile) Any opinion? regards, Bapt --rNtUoUA3Tn0/N1iC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlG0/bgACgkQ8kTtMUmk6Ew19QCgvMCOxFMGStp9Qidilt3qFGXm t7gAn2EP/Zj6mvorCUEHZApXV9sXJzD6 =rwYf -----END PGP SIGNATURE----- --rNtUoUA3Tn0/N1iC--