Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 2013 00:12:08 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports@FreeBSD.org
Subject:   [CFT] New helpers now that new options frameworks allow them :)
Message-ID:  <20130609221208.GU35160@ithaqua.etoilebsd.net>

next in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130609221208.GU35160>