Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2014 01:06:28 -0600
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Volodymyr Kostyrko <c.kworr@gmail.com>
Cc:        Matthew Pounsett <matt@conundrum.com>, FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: per-port make.conf options and hyphenated port names
Message-ID:  <CACdU%2Bf9TMe8b9rCXpYGXnuyhh-=Zq-USfqkRVeo=7RzfB=RQ8g@mail.gmail.com>
In-Reply-To: <52DE3FA5.6040407@gmail.com>
References:  <92E0B243-3705-437A-80C8-DB9AAF938A3D@conundrum.com> <52DE3FA5.6040407@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 21, 2014 at 3:36 AM, Volodymyr Kostyrko <c.kworr@gmail.com> wro=
te:
> 21.01.2014 03:01, Matthew Pounsett wrote:
>>
>>
>> At some point in the last couple of weeks I was pointed at
>> <https://wiki.freebsd.org/Ports/Options/OptionsNG>; as what has been
>> implemented to deprecate make.conf settings such as =93WITHOUT_X11=3Dyes=
=94.
>> That document says it has been committed, but the porters handbook secti=
on
>> on OPTIONS doesn=92t discuss the ${port}_SET/${port}_UNSET syntax, and I=
 can=92t
>> find mention of it in /usr/ports/KNOBS either.
>>
>> I=92m trying to find specifics on the implementation because I=92ve run =
into a
>> case that document doesn=92t seem to plan for:  trying to set per-port o=
ptions
>> for a hyphenated port name.
>>
>> Specifically, I=92m trying to do this:
>> virtualbox-ose-additions_UNSET=3DX11
>>
>> Hyphenated variable names don=92t work in most shells.  I think some old=
er
>> versions of csh could set them, but couldn't reference them, and tinderb=
ox=92s
>> sh scripts blow right up when they encounter that.
>>
>> Digging through /usr/ports/Mk/ I can=92t find anywhere that $UNIQUENAME =
is
>> modified to guarantee that it references a safe variable name (i.e. I do=
n=92t
>> see anywhere that $UNIQUENAME has reserved characters removed from it be=
fore
>> use).  So, given that a lot of times $UNIQUENAME is just the name of the
>> port, and a lot of ports have hyphens in their names, how is this meant =
to
>> be dealt with?
>>
>> Thanks for any pointers or help!
>
>
> Excuse me hijacking the thread but doesn't ports-mgmt/portconf do almost =
the
> same?
>

With the change to the new Options frame work, most of the
WITH/WITHOUT_ variables were changed to SET/UNSET values:

WITH_X11
WITH_JPEG
WITHOUT_DOCS

New way:

SET=3D X11 JPEG
UNSET=3D DOCS

The old way to set port specific variables was by using
ports-mgmt/portconf.  But with the change to using SET/UNSET, port
specific options are now:

${UNIQUENAME}_SET=3D MYSQL
${UNIQUENAME}_UNSET=3D PGSQL BDB

Which can be added directly to the /etc/make.conf.

There may still be uses for portconf, as it can still assign values to
port specific variables.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACdU%2Bf9TMe8b9rCXpYGXnuyhh-=Zq-USfqkRVeo=7RzfB=RQ8g>