Getting HOPS running via MacPorts.

0) get Macports.

    http://guide.macports.org

    From the dmg, it installs the same way as other *.dmg packages do--and
    by default it goes into /opt/local (which is ok with me:  /opt has
    nothing in it on my mac).

1) The install process will modify ~/.bash_profile (if you already
    have one, macports saves it but you may wish to review the mods)
    by adding /opt/local/bin and /opt/local/sbin to your PATH.

    The main commands are similar to debian/rh/fink packaging commands
    via a command named "port":

    sudo port selfupdate	    # brings macports itself up-to-date
				    # apparently 1.9.2 is the latest
    port search <portname>	    # look for packages (or see their site)
    sudo port install <portname>    # to actually install something

2) For FFT support you'll need to install fftw3.

    sudo port install fftw-3
    # no dependencies

3) You'll need an explicit reference to ghostscript as /usr/bin/gs

    sudo port install ghostscript
    # required dependencies
    autoconf help2man p5-locale-gettext perl5 perl5.8 m4 automake
    fontconfig freetype jpeg libpaper libpng libtool pkgconfig tiff
    xorg-libXext xorg-libX11 xorg-bigreqsproto xorg-inputproto
    xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb
    python27 bzip2 db46 gdbm readline sqlite3 xorg-libpthread-stubs
    xorg-xcb-proto libxml2 xorg-util-macros xorg-xcmiscproto
    xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-libXt
    xorg-libsm xorg-libice

    You may need to install java as well.

4) pgplot

    sudo port install pgplot

    pgplot is probably now compiled with libpng16 and the underlying
    png driver in pgplot may or may not be compatible with it.  HOPS
    is currently wired to require libpng12, so create libpng12.*
    links to whatever you have installed.  Ugly, but as long as you
    don't actually try to make a png with HOPS you should be ok, and
    heck, it might even work.

5) Grab Hops (3.3 is the current release via ftp--similar instructions
    most likely to apply to later HOPS releases) using wget or your
    favorite fetch tool (there is a port for wget).

    mkdir ~/HOPS
    cd ~/HOPS

    wget ftp://gemini.haystack.mit.edu/pub/hops/README-3.11.txt
    wget ftp://gemini.haystack.mit.edu/pub/hops/hops-3.11.tar.gz

6) Configure it...

    Follow the instructions as in the README; however a few configure
    arguments are needed (depending on what happened with your X11 install):

    ../hops-3.10/configure LDFLAGS=-L/opt/local/lib FFLAGS=-c

    (The PGPLOT_DIR assignment is unnecessary if you've installed
    MacPorts in the default hierarchy under /opt/local.)
    
      Configure passes sanity checks.

	 have_hops is true (required)
	 have_devel is true (optional)
	 have_gs is true (required)
	 have_x11 is true (required)
	 have_pgplot is true (required)
	 have_png is true (required)
	 have_difx is false (optional)
	 have_mark5 is false (optional)

    followed by messages about Makefiles created, and so forth.
    You can then proceed with

	make
	make install
	make check

    and the checks as described in the README.  Note that the
    install with put a source-able script hops.bash into your
    ~/bin directory should you have one.

    This worked in 3.11 on my mac...

    cd build
    ../trunk/configure \
        LDFLAGS=-L/usr/X11/lib \
        PNG12_LIB=/opt/local/lib/libpng12.dylib \
        CPPFLAGS=-I/opt/local/include

eof
