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

Markus Weissmann mww at macports.org
Fri Aug 10 07:24:04 PDT 2012


I'll try to sum up the problem:
1.) The terminal used by gnuplot must be decided at compile time and upstream is not willing to change that
2.) There exists a fairly large number of variants that let you do the decision from 1.) when installing gnuplot
3.) One of the possible targets is Aquaterm which is currently broken in the MacPorts repository

If I got this correct I see several (non necessarily disjunct) approaches to solve this problem:
1.) Fork gnuplot (cleanest solution but probably not what you want)
2.) Apply the patch to the MacPorts gnuplot
3.) Fix MacPorts Aquaterm
4.) Make the variants to a unique port each, preferably subports that can be installed side by side with a unique installation prefix (great side effect: binary packages for every choice)


Regards

-Markus

On Aug 10, 2012, at 01:58 , Mojca Miklavec wrote:

> On Fri, Aug 10, 2012 at 1:13 AM, Ryan Schmidt wrote:
>> 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.
> 
> Oh, that's perfect then, thank you.
> 
>>> 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.
> 
> If they go away, even better.
> 
>>> 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?
> 
> It may be set in a preference file or in an environmental variable
> GNUTERM, but it becomes problematic as soon as there are multiple
> gnuplot versions available on the system. Here's why:
> 
> I have my own version of gnuplot in PATH as my default/modified
> gnuplot, but also one provided by MacPorts for the sake of Octave.
> MacPorts currently ships with broken*** AquaTerm. So I *have to* set
> GNUTERM to x11 (or qt or wxt) for example. However, as soon as I
> launch the other gnuplot (compiled without the particular terminal
> from my settings), gnuplot launches with "unknown" terminal which is
> rather useless, and particularly nasty in case of Octave. Of course
> the reverse is also true. I used to have 'qt' as my GNUTERM, but that
> made Octave 'useless' until MacPorts was able to use gnuplot's qt
> terminal.
> 
> I also don't like the large number of long "default_<term>" options
> (it would be cool to have --default_term=qt :). But I don't know what
> else to do, except for, as already suggested, allowing the user to
> completely disable aquaterm and only enable his terminal of choice.
> 
> Mojca
> 
> *** I'm currently not able to disable AquaTerm in MacPorts' gnuplot
> and it always launches /Applications/AquaTerm.app instead of
> /Applications/MacPorts/AquaTerm.app. And *that* is fully broken at the
> moment: I cannot plot anything.
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/macports-dev



More information about the macports-dev mailing list