Opened 11 years ago

Closed 11 years ago

#38321 closed enhancement (fixed)

gnuplot @4.6.1 Enhancement: add variant for old bitmap formats

Reported by: predoehl@… Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: haspatch Cc: predoehl@…
Port: gnuplot

Description

A default build of Gnuplot >= 4.6.0 lacks terminal support for PBM and other old-school bitmap formats. Quoting the release notes, it is "available if needed but is no longer configured in by default." There is a configure option that turns it on.

I still happen to need PBM support, so I added a new variant to the corresponding port, calling it "bmpterm" -- maybe not the best name. I've tested it and it worked for me. It's a just tiny patch to the Portfile, so I'll just embed the whole patch here:

--- Portfile.orig	2013-03-06 22:35:07.000000000 -0700
+++ Portfile	2013-03-07 10:20:26.000000000 -0700
@@ -5,7 +5,7 @@
 PortGroup                   xcodeversion 1.0
 
 name                        gnuplot
-version                     4.6.1
+version                     4.6.2
 revision        1
 categories                  math science
 # the license has some inconvenient requirements that we're not meeting
@@ -111,6 +111,10 @@
     configure.args-delete   --without-cairo
 }
 
+variant bmpterm description "Enable bitmap-output terminals" {
+    configure.args-append   --with-bitmap-terminals
+}
+
 # One can in principle choose between wxWidgets and wxWidgets-devel,
 # but only 2.9 allows building 64-bit binaries.
 # If it is acceptable to depend on wxWidgets-devel only,

I'm new to MacPorts, so maybe I'm doing this wrong -- if so, I welcome your feedback. Thanks!

Change History (5)

comment:1 Changed 11 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to mojca@…

Please remember to Cc the maintainer.

comment:2 Changed 11 years ago by predoehl@…

Cc: predoehl@… added

Cc Me!

comment:3 Changed 11 years ago by mojca (Mojca Miklavec)

The name bmpterm seems a bit weird to me. My first thought would be that it support the windows BMP file format.

I would prefer to avoid an additional option in MacPorts completely and just make PBM terminal enabled by default, but option --with-bitmap-terminals enables lots of other completely obsolete terminals which only clutter set term when showing the list of available terminals and help confuse the user.

Gnuplot version 4.6.2 is going to be release within a week. I suggest to add this option together with upgrade (possibly in two separate commits, but so that people won't have to upgrade/rebuild gnuplot twice), but I'm looking for other suggestions for the name:

  • bitmap_terminals (With this name I would probably consider PNG as a bitmap terminal and would want to enable that option to get PNG working.)
  • pbm
  • ... (?)

For the description I would use something like "Enable PBM/Portable Bit Map (and other older bitmap terminals)".

Another option would be to patch gnuplot in such a way that PBM would be enabled by default.

Any thoughts?

comment:4 in reply to:  3 Changed 11 years ago by predoehl@…

Replying to mojca@…:

  • Clearer name: I agree, my suggested name above was cryptic -- I was trying to be very brief (which seemed to be the norm), but let's be clearer if that is OK. I think a longer, clearer name like old_bitmap_terminals would better communicate the semi-obsolete nature of the option.
  • To add a variant or not? I think on balance, it's better to add this extra option. One way to justify it is by considering this: the Gnuplot devs decided it would be good to turn off (by default) all those old terminal formats, yet keep them available through a configuration option. By adding this port variant, the port faithfully reflects the configuration structure of the Gnuplot project. Furthermore, the Gnuplot devs might have had good reasons to make those old terminal options opt-in rather than opt-out, so I think it's probably smart to organize the port the same way (i.e., also opt-in).
  • Better description:

    For the description I would use something like "Enable PBM/Portable Bit Map (and other older bitmap terminals)".

    That sounds good.
  • Version number increment: I notice my above patch erroneously increments the version variable, whereas I meant to increment the version of the port itself (from 2.1.3 to 2.1.4, I suppose). Oops. But it is fine with me to hold onto this patch until after the new Gnuplot version is released.

Thanks for the feedback!

comment:5 Changed 11 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed

Committed in r104175.

Note: See TracTickets for help on using tickets.