FreeBSD

From XastirWiki

Jump to: navigation, search

Contents

[edit] Installing on FreeBSD

Xastir runs very well on FreeBSD. There are 2 easy ways to install Xastir on FreeBSD.

[edit] Use the package

pkg_add -r xastir

This requires an ftp connection to the internet and will download Xastir, and the default prerequisites as binary packages and install them. This will install a default config which includes;

  • Shapelib
  • Perl Compatible Regular Expressions
  • DBFAWK
  • Image Magick

[edit] Use the port

FreeBSD has an excellent ports system which downloads and builds software from source. It automatically resolves dependancies and provides a menu interface allowing you to configure various options before compilation.

With the port, the following options are also available;

  • GeoTIFF - Tiff based georeferences raster imagery
  • GDAL - Extra GIS file formats
  • GPSMAN - GPS interface
  • Festival - speech synthesis
  • RTREE - Spatial indexing of shapefiles
  • Tiger Map Caching using Berkeley DB

[edit] Install the port

  1. Install the FreeBSD Ports Tree
  2. cd /usr/ports/comms/xastir
  3. make config
  4. make install

or, use the portinstall port.

[edit] Track the "bleeding edge"

While the FreeBSD ports system will get you the latest stable release quickly and easily, it can also help you track the unstable CVS version, too.

To do this, install xastir with all the options you want according to the instructions under "Install the port" above. Since the ports system will download and install all the packages xastir depends on, and will do so by installing full development packages with headers and libraries, this will get you the full development environment you need to build the CVS version of xastir, too.

After doing that, deinstall the xastir port:

 # pkg_delete xastir'*' 

This is necessary before you install the CVS version, because if you leave it installed then the CVS version will overwrite files that the package database keeps track of, and the system will be confused.

Make sure you have the two "gnu-autotools" ports for automake and autoconf installed:

 # pkg_info | grep gnu-auto 

This command should show you two lines. If not, install them:

 # cd /usr/ports/devel/gnu-automake
 # make install clean

This will install both gnu-automake and gnu-autoconf.

Before continuing (no longer as root), make sure your PATH variable is set so that the automake and autoconf versions you just installed are found first:

 $ export PATH=/usr/local/gnu-autotools/bin:$PATH

Now you are ready to build xastir from its CVS repository, per the directions in README.CVS, which can be found at:

http://xastir.cvs.sourceforge.net/xastir/xastir/README.CVS?view=markup

or on this wiki at Notes:CVS.

Use the following configure command when you get to that step in README.CVS:

 ./configure  --with-rtree --with-bdb-incdir=/usr/local/include/db42 CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" CFLAGS="-O"

(you can omit the two --with- options if you are not building with RTREE or map caching.) This will make sure that the configure program can find all the headers and libraries that FreeBSD has in /usr/local, which is different from linux where nearly everything gets installed to /usr instead.

Views
Personal tools
Navigation