env and OptionsNG

Tomoyuki Sakurai tomoyukis at reallyenglish.com
Wed Jan 23 11:47:48 EST 2013


hi list,

as you have already know, new OptionsNG requires to set ${UNIQUENAME}_SET
instead of WITH_FOO. as UNIQUENAME is unique, you don't have to write ".if
${.CURDIR:M*/foo/bar} ... .endif" anymore. it seems the best current practice
to set ports options is using "${TB_ROOT}/scripts/env/etc/build.${BUILD}",
which is sourced by sh(1).

my question is, how do you set environment variables with "-", e.g.
"apache22-worker-mpm", "rubygem-foo", etc.

FreeBSD kernel and make(1) do accept "foo-bar" environment variable but sh(1)
does not.

$ export foo-bar="buz"
export: foo-bar: bad variable name

we have been using postBuildExtract hook to copy make.conf(5) into the build
environment, but make.conf is not used when tinderbox retreives dependencies.
that is, if the option changes dependency of the port, the build fails with
"mtree" error.

it looks to me that, as long as sh(1) is used to setup environment variables,
there is no way to "export foo-bar=buz". as such, tinderbox will have to support
make.conf(5). also, "env" lacks per-port environment variable support. e.g.

.if ${.CURDIR:M*/www/mod_perl}
APACHE_PORT=  www/apache13
.else
APACHE_PORT=  www/apache22
.endif

any thoughts?

p.s. my __DSVERSION__ is 3.3.2.

-- 
Tomoyuki Sakurai


More information about the tinderbox-list mailing list