[MacPorts] #34423: gnuplot: patch for using -framework AquaTerm instead of -laquaterm
MacPorts
noreply at macports.org
Thu Aug 9 16:16:10 PDT 2012
#34423: gnuplot: patch for using -framework AquaTerm instead of -laquaterm
--------------------------------------------+-------------------------------
Reporter: mojca.miklavec.lists@… | Owner: macports-tickets@…
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.0.4
Keywords: haspatch | Port: gnuplot
--------------------------------------------+-------------------------------
Comment(by mojca.miklavec.lists@…):
The basic idea is the following. The system first calls {{{GP_APPLE}}}
which only sets $is_apple to yes or no. Later on (you may move the checks
to any other place you want), if system is Mac OS X, it checks if user
disabled AquaTerm. If yes, it proceeds without AquaTerm, else it checks if
user provided any special flag to tell against which AquaTerm gnuplot
should be linked and adds one "{{{LDFLAG}}}"
({{{LIBS=-F/path/to/Frameworks}}}). So if AquaTerm is not disabled, it
checks whether AquaTerm works. In case it does, it includes it.
An Apple user may:
* {{{./configure --without-aquaterm}}} which will disable AquaTerm
* {{{./configure --with-aquaterm[=yes]}}} which will keep AquaTerm
(default setting anyway)
* {{{./configure --with-aquaterm=/path/to/Frameworks}}} which will add
{{{-F/path/to/Frameworks to $LIBS}}}
The patch is composed of two parts:
* {{{AC_CHECK_FRAMEWORK}}} (borrowed from other OpenSource project - the
same code is in several projects; maybe it should be renamed into AX to
follow guidelines of local additions to autotools macros)
* the code in {{{configure.in}}} that I wrote myself and does what is
described above.
The resulting diff in {{{configure}}} is auto-generated.
What are problems of current (old) approach / why is the patch needed?
* Per (author of AquaTerm) wanted to get rid of {{{libaquaterm.dylib}}}
and only keep the framework (that is "the Mac way"). The versions of
AquaTerm 1.1.x don't ship with libaquaterm.dylib any more, and it's
somehow desired to get rid of those files also under MacPorts.
* Outside of MacPorts current configuration checks whether
"{{{-laquaterm}}}" works from system-wide installation, but if at least
some other library is included from MacPorts (because of
{{{-I/opt/local/include}}} which wasn't present during the test for
AquaTerm), it will use {{{AquaTerm.framework}}} from MacPorts (not the one
that was being checked for) and then again call system-wide AquaTerm.app.
In case of incompatibilities (different version in MacPorts than system-
wide) this will prevent AquaTerm from working at all.
* Patch adds flexibility to use a different AquaTerm framework in case
that there are multiple frameworks installed.
* Patch adds ability to disable AquaTerm terminal. That didn't make any
sense in past, but now that Qt, wxt and X11 all work satisfactory, there
might be people who don't want to have AquaTerm as the default terminal
(lack of mouse events) or don't want to have it built at all. Currently
the only option to avoid building with AquaTerm support is to remove
AquaTerm from the system.
I would eventually like to get this patch (or its improved version)
upstream, which is why I would be really grateful for
comments/suggestions.
--
Ticket URL: <https://trac.macports.org/ticket/34423#comment:3>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list