[Midnightbsd-mports] Extension Loading

Chris Reinhardt ctriv at midnightbsd.org
Wed May 21 13:29:12 EDT 2008


Going forward there are going to be some changes to extension loading.

(Extensions are bits of extra logic that get loading into the ports
system as needed.  There are extensions for building perl ports, or
dealing with xorg dependencies for example.)

Right now there are no rules for this.  Each extension has a different
syntax for being loaded.  Most have a syntax of

USE_FOO=yes

Where FOO is the extension, however many extensions use the variable
for more than just loading the extension.  Often this notes a minimal
version or sets dependencies.   WANT_FOO is also sometimes used.  As
is USE_FOO_BUILD or USE_FOO_RUN.  Any of these variables will cause
the extension to be loaded under the new rules as well.  Additionally,
the extension will be loaded if LOAD_FOO_EXT is set.  This variable
has no action attached to it.

Take apache for example.  Right now the apache extension is loaded if
USE_APACHE is set or if APACHE_COMPAT is set.   We will continue to
load the extension for APACHE_COMPAT for a long time to come (a
year?), but for new ports and extensions the rule is:

    Either USE_FOO, USE_FOO_RUN, USE_FOO_BUILD, WANT_FOO, or
LOAD_FOO_EXT must be set.

So if you had a new port, you would write APACHE_COMPAT=yes as:

LOAD_APACHE_EXT=yes
APACHE_COMPAT=yes

-- 
Chris Reinhardt - chris.reinhardt at gmail.com


More information about the Midnightbsd-mports mailing list