Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Apr 2000 02:32:37 -0700
From:      Jeremy Lea <reg@FreeBSD.org>
To:        freebsd-ports@FreeBSD.org
Cc:        Satoshi Asami <asami@FreeBSD.org>
Subject:   WITH/WITHOUT options cleanup
Message-ID:  <20000410023237.F32928@shale.csir.co.za>

next in thread | raw e-mail | index | archive | help
Hi all,

I've placed a patch at http://www.freebsd.org/~reg/with.patch, which
cleans up the handling of options in ports.  Basically these are any
things the user can define while building ports.  We had a mixture of
NO_, WANT_, WITH_, WITHOUT_, DONT_USE_ and USE_, and these were being
tested against YES, yes, NO or no.  This was confusing.

This patch makes two kinds of variables:

WITH_FOO - Turns on support for FOO.
WITHOUT_FOO - Turns off support for FOO.

These are boolean, and should only be tested with defined().

If a port autodetect's support then it should use something like:

.if defined(WITH_X11) || (exists(${X11BASE}/lib/libX11.a) \
    && !defined(WITHOUT_X11))
...
.endif

(bsd.port.pre.mk needs to be included before this to get X11BASE).

The patch also removes nearly all occurances of WITH_ variables in
ports, since I want to be able to scan for the options above
automatically.  I will write something for the handbook reserving WITH_
and WITHOUT_ as variable names.  USE_ should also be reserved for knobs
in bsd.port.mk.

The ports I've not touched are the emacs/mule/canna cancer^H^H^H set
of ports, which have a set of WITH_ options, which should be
CONFIGURE_ARGS+= options.  I'm scared of breaking these...

Also, I've not tried to alter any setttings with have multiple values
(like ispell's languages (although these should be WITH_), or glx's
chipset).

Comments please.

 -Jeremy

-- 
FreeBSD - Because the best things in life are free...
                                           http://www.freebsd.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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