How to build a framework at specified location? (related to AquaTerm)

Mojca Miklavec mojca.miklavec.lists at gmail.com
Thu Jan 19 07:27:21 PST 2012


Hello,

This is not a strict MacPorts questions, but I'm sure that there are
people here who know a simple answer.

I would like to fix a few problems related to gnuplot and AquaTerm (in
both projects).

In particular, let's say that users have both system-wide AquaTerm and
the one that MacPorts is shipping. I would like to patch gnuplot in
such a way that one could use something similar to
    ./configure --with-aquaterm=/opt/local/Library/Frameworks
that would build gnuplot with
    gcc -ObjC -framework Foundation -framework AquaTerm
-F/opt/local/Library/Frameworks ...
I would like to give the user the ability to select which AquaTerm
library to use.

But I would also like to be able to use
    ./configure --with-aquaterm=$HOME/some/exotic/location/

The problem is that I'm unable to figure out how exactly to run
"xcodebuild" in AquaTerm, so that Framework wouldn't point to
/Library/Frameworks. By default xcodebuild of AquaTerm project gives
me:

    > otool -L AquaTerm.framework/AquaTerm
    AquaTerm.framework/AquaTerm:
        /Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm
(compatibility version 1.0.0, current version 1.0.0)
        ...

and unless I manually change links with install_name_tool, I cannot
reliably test how such a flag (--with-aquaterm) would work. I see
that:
    > otool -L /opt/local/Library/Frameworks/AquaTerm.framework/AquaTerm
    /opt/local/Library/Frameworks/AquaTerm.framework/AquaTerm:
        /opt/local/Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm
(compatibility version 1.0.0, current version 1.0.0)
properly links to /opt/local/Library/... but I'm unable to figure out
how I'm supposed to build AquaTerm to reproduce that behaviour in a
directory of my choice.

I see

Build settings from command line:
    ARCHS = x86_64
    DSTROOT = /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_aquaterm/aquaterm/work/destroot
    FRAMEWORKS_DIR = /opt/local/Library/Frameworks
    GCC_VERSION = com.apple.compilers.llvm.clang.1_0
    MACOSX_DEPLOYMENT_TARGET = 10.7
    OBJROOT = build/
    SDKROOT =
    SYMROOT = build/
    USER_APPS_DIR = /Applications/MacPorts

in MacPorts, but setting
    export FRAMEWORKS_DIR=/some/exotic/location
before running xcodebuild didn't help.

Which flags exactly do I need to achieve what I want?

Thank you,
    Mojca

PS: I would like to request upgrading to a newer version of AquaTerm,
but the new version still has two bugs that I consider showstoppers.
One related to 32-vs-64-bit has been resolved, but there is still one
left. If we manage to find the reason for problems and fix the bug
(after "set term aqua size 500,300" the text labels in gnuplot are not
displayed in the first plot), I will create a trac ticket to ask for
upgrade.


More information about the macports-users mailing list