From XastirWiki
(Redirected from Darwinports)
Jump to: navigation, search

Notes on installing Xastir using MacPorts

Check the N1OFZ Xastir Pages for a pre-built installer.

There are two ways to install with MacPorts. The first method uses the Xastir port which will install an older version of Xastir and its dependancies, then you disable the old version and install and build the Git version, the second lets you manually call MacPorts to build each dependancy.

Firstly, Make sure your user has Admin privilages on your Mac. This enables you to use sudo.

The following steps are common to both methods.

Using Mac OS X install disk:

  • Install xcode tools
  • Install X dev stuff
  • Install X11

Then

Install MacPorts from http://www.macports.org/

You should log out, then back in before doing any of the following steps...


Install latest version using Port version of Xastir

Open Mac OS X Terminal (Applications -> Utilities -> Terminal)

If you can't run the port command you may need to add the path to it inside terminal

export PATH=/opt/local/bin:$PATH

Make sure you have the latest ports tree

sudo port selfupdate 

Install older version of Xastir and all its dependancies

sudo port install xastir

If you are happy with the older version of Xastir, then stop here. Your Xastir executable is in;

/opt/local/bin/xastir

If not, then continue...

Disable the just installed older version of Xastir

sudo port deactivate xastir

Install the GNU configure tools

sudo port install automake
sudo port install autoconf

Create a place to build Xastir

cd
mkdir src
cd src

Checkout the latest version of Xastir

git clone http://github.com/Xastir/Xastir

Change into the newly created xastir source tree

cd Xastir

Run the GNU build utilities to create the GNU build environment

bash bootstrap.sh

Work out which version of DB was installed. It should say something like "db46 @4.6.11_1 (active)". The "db46" bit is the important bit.

port installed | grep db
mkdir -p build
cd build

Run the GNU configure script. Replace the "db46" with your installed version of DB found above.

../configure --prefix=/opt/local --with-bdb-incdir=/opt/local/include/db46/ --with-bdb-libdir=/opt/local/lib/db46/

Build Xastir

make

If you have made it this far then you can install it.

sudo make install

Now, this will install it into /opt/local/bin/xastir. Maps will be in /opt/local/share/xastir.

You can then remain up to date with the head by doing;

cd ~/src/Xastir
git pull
bash bootstrap.sh
cd build
../configure --prefix=/opt/local --with-bdb-incdir=/opt/local/include/db46/ --with-bdb-libdir=/opt/local/lib/db46/
make
sudo make install

Enjoy...


If you'd prefer to do the install manually, the following notes are a good starting point.


Startup an Xterm or Terminal window and install the various libraries you'll need for Xastir

First your motif libraries - Pick one of the following:

 sudo port install lesstif   

or

 sudo port install openmotif

If, later on, you see menus or sliders that are missing text, try the other motif lib.


Then the rest of the libs:


 sudo port install GraphicsMagick
 sudo port install db45
 sudo port install pcre
 sudo port install shapelib
 sudo port install proj
 sudo port install libgeotiff
 sudo port install gdal 

(Note that coming soon, some of this will be built into get-maptools.sh --N8ysz 13:12, 31 December 2006 (EST) )

Download and unpack Xastir, cd into the Xastir src code directory.


Run bootstrap.sh

 ./bootstrap.sh
 cd build

Run Configure

 ../configure --with-bdb-libdir=/opt/local/lib/db45 \
       --with-bdb-incdir=/opt/local/include/db45

Build and Install Xastir:

 make 
 sudo make install