How to make a new option default during upgrade? (gnuplot/aquaterm)

Ryan Schmidt ryandesign at macports.org
Thu Aug 9 16:13:15 PDT 2012


On Aug 9, 2012, at 16:53, Mojca Miklavec wrote:

> After the discussion about transition from "no_x11" to "x11" and the
> need for the following lines
> 
> if {[variant_isset no_x11]} {
>    default_variants -x11
> } else {
>    default_variants +x11
> }
> 
> the following question popped up in my mind. In this suggested patch:
>    http://trac.macports.org/attachment/ticket/34423/gnuplot-use-aqt-framework-extra-option.patch
> I added a new default option "+aquaterm". This option should be used
> by everyone except when explicitly disabled with "-aquaterm". During
> upgrade the option +aquaterm should automatically be used.
> 
> My question is: how can I add the +aquaterm option and:
> - make sure that "port upgrade gnuplot" won't delete aquaterm
> - make sure that "port install gnuplot -aquaterm" & "port upgrade
> gnuplot" won't install aquaterm

That's what adding +aquaterm to default_variants does. So the patch already includes that functionality.


> At the same time it might be nice to replace no_x11 with x11 ... and
> all those flags & transitional "if"s look like a mess ;)

They're a little bit unpretty, but it's only a few extra lines, and they go away after a year.


> As far as a new +aquaterm option is concerned, the reason why I
> suggested its addition is that removing aquaterm support is a
> "quick-and-dirty" solution to make a different terminal the default
> one. With working x11/qt/wxt there are a lot of options to choose
> from, and there is reasonable number of people wanting to change the
> default.
> 
> An alternative to "+aquaterm" is to add a patch (rejected by gnuplot
> developers last time when I asked) which would enable setting the
> default terminal. So instead of
> 
>    [+]aqua, [+]luaterm, (legacy) no_x11, [+]pangocairo, qt, tutorial,
> universal, wxwidgets, wxwidgets_devel, [+]x11
> 
> one would end up with
> 
>    [+]default_aqua, default_x11, default_qt, default_wxt, [+]luaterm,
> (legacy) no_x11, [+]pangocairo, qt, tutorial, universal, wxwidgets,
> wxwidgets_devel, [+]x11
> 
> Maybe that option is better after all.

That sounds nasty. Why can't the selection of what kind of terminal to use by default be a setting that gnuplot reads from a preferences file? That would seem to be the immediately obvious way that such a feature would be implemented, wouldn't it?




More information about the macports-dev mailing list