This HowTo provides a step by step procedure for installing XASTIR from source either using the CVS repository or by downloading a source package from sourceforge. Downloading the source from CVS provides the most up to date version available.
This write-up covers in detail the procedure that applies to Mandriva One 2009.
Contents
Preparing the system
Check Software Installation Sources
1. Launch the rpmdrake package manager either by typing rpmdrake at a command line or using the desktop menu. In KDE, it is under System - Install, Remove & Update Software.
2. In the menu at the top, select Options, then Media Manager. The list of sources used by Yours Truly looks like those shown below:
Main (check both enabled and updates) Main Updates (check both enabled and updates) Contrib (check enabled) Contrib Updates (check both enabled and updates) Non-free (check enabled) Non-free Updates (check both enabled and updates)
If any of the above are not checked, check them, and select yes if prompted to update.
Add Libraries
1. Back at the main software management screen in rpmdrake, search for the following packages and mark them for installation if they are not already shown to be installed. Note: you do not have to enter the entire package name in the search.
gcc make autoconf automake cvs
2. After all of the above are selected, click the apply button to go ahead and download/install them. Other packages will typically be installed as dependencies and you may be prompted if it is OK. Click YES/OK - whatever it takes to continue to install the required packages. This first set of packages consists of compilers, tools, etc. to be able to download and compile XASTIR.
3. Search for the following set of packages, mark them for installation, and install them by selecting Apply. Note: The first 4 are required for printing from XASTIR, the 5th, OpenMotif, is required, and libax25 is optional (required for I-Gating).
imagemagick gv libstdc++-devel libxp-devel libax25_0-devel libopenmotif3-devel (Mandriva 2009.0) liblesstif-devel (Mandriva 2009.1)
Note1: Although a newer package, libmotif4-devel is available for Mandriva 2009.0, the user should install the older libmotif3-devel as shown above. The newer version has a known bug that causes the XASTIR menus that use slider controls not to display label text.
Note2: Mandriva 2009.1 doesn't appear to have the older openmotif RPM in its repositories, so Yours Truly installed Lesstif instead.
4. Search for the following packages, mark them for installation, and install them by selecting Apply. Note: the packages below are not absolutely required, but they are highly recommended.
libmagick-devel libcurl-devel shapelib libshapelib-devel pcre libpcre-devel libdb4.6-devel (Mandriva 2009.0) libdb4.7-devel (Mandriva 2009.1)
5. Optionally search for the following packages, mark them for installation, and install them by selecting Apply. Note: the first pair enables support for geotiff maps, the 2nd pair enables XASTIR's limited GDAL support, and the 3rd pair enables text to speech.
geotiff libgeotiff-devel gdal libgdal-devel festvox-kallpc16k festival festival-devel proj libproj0-devel (Mandriva 2009.0) libproj-devel (Mandriva 2009.1)
6. The next optional packages, gpsman and gpsmanshp, were not found by Yours Truly in the Mandriva repositories. Gpsman is for copying tracks from Garmin GPS units to XASTIR for display. Gpsmanshp enables display on shapefile maps. The following instructions apply to either Mandriva One 2009.0 or 2009.1.
For gpsman, download the rpm directly at...
http://www.ncc.up.pt/gpsman/gpsmanhtml/gpsman-6.4-2.noarch.rpm
For info in case the link eventually changes, try
http://www.ncc.up.pt/gpsman/wGPSMan_4.html or http://www.ncc.up.pt/gpsman/
For gpsmanshp, you can download the rpm directly at...
http://www.ncc.up.pt/gpsmanshp/gpsmanshp-1.1-0.fdr.1.i386.rpm
For info incase the link eventually changes try
http://www.ncc.up.pt/gpsmanshp
Yours truly installed the rpm's simply by right-clicking on the rpm file that had been downloaded by Firefox to the desktop and selecting Open with Software Installer.
7. The last library below was required (in Mandriva 2008.1) in the summer of 2008 in order to compile properly, but in September, 2008, XASTIR was changed so that it should no longer be required. It is recommended to install it anyway because XASTIR uses Xfontsel as part of it's selectable fonts option. Search for the following package, mark it for installation, and install it by selecting Apply.
xfontsel
Note: The above has only been tested in Mandriva 2008.1, 2009.0, and 2009.1.
One additional item/task for Mandriva 2009.0 and 2009.1:
It has been found that a portion of ImageMagick is installed in /usr/include/ImageMagick/magick instead of the more typical /usr/include/magick. The Xastir configure script does not look in the former location. A symlink was the solution - issue the command below at a terminal while logged in as the root user:
ln -s /usr/include/ImageMagick/magick /usr/include/magick
The next section is taken mostly from the HowTo for Ubuntu 6.10/7.04 as the procedure for retrieving the XASTIR source code is essentially the same.
Get XASTIR source code
From a development snapshot or stable release
If you're not into living dangerously, your easiest way to get the Xastir source code is from one of the "tarballs" available for download at the Xastir sourceforge site (see the top level of the xastir web site for a link to it).
In order to be consistent with the steps below, create directories inside your home directory via the following commands:
mkdir src mkdir src/XASTIR
If you haven't downloaded the tarball already, download it into the ~/src/XASTIR directory (or move it there if you already downloaded it) and extract it there. Extraction is easy with either the KDE or Gnome versions of Mandriva - navigate to the tar.gz file via Konqueror or Nautilus, right click, and select "extract here". Extracting the tarball will result in a new directory being created underneath ~/src/XASTIR. Rename it to xastir (all lower case) in order to be consistent with the naming used below. Then skip to the section labeled Build Xastir.
From the "bleeding edge" CVS repository
If you really want the latest developments of xastir immediately upon their being made, CVS is the approach for you. In this method, you get your source code directly from the "repository" that the developers use to work on the software. See Notes:CVS for details. Here's the step-by-step method for getting it this way.
In the steps below, you might have to change the "cd" and "mkdir" commands to suit your taste. I like to keep my projects separated rather rigidly into directories, and the steps below reflect my personal style. This does tend to make rather deep directory trees, but makes clean-up easy because everything's separate. Your mileage may vary.
- Prepare your .cvsrc if you don't have one (I prefer to do this in my home directory.)
ls -l ~/.cvsrc # DO NOT DO THE STEPS BELOW IF THE COMMAND ABOVE SHOWS THAT YOU ALREADY HAVE ONE cat > ~/.cvsrc cvs -z3 update -P -d status -v diff -u type control-D to finish creating the file
- Get the source code per README.CVS or Notes:CVS:
You can make different choices here for where you want to store your code. The example puts it in a tree under the home directory:
mkdir src mkdir src/XASTIR cd src/XASTIR cvs -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir login cvs -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir co xastir
The "login" line will result in a prompt for a password. Simply hit "Enter" here, as there is no password.
The last command could take a while to finish if you're on a slow link, as there are a lot of files to download.
- Run bootstrap to generate Makefile.am and configure:
cd xastir ./bootstrap.sh
Build XASTIR
It is recommended to build the code in a separate directory from the source code so as to keep the source code tree clean at all times: (the name of the directory in the example uses a date of 10-31-07 - future builds can be labeled with future dates)
cd ~/src/XASTIR mkdir build-103107 cd build-103107 ../xastir/configure
Among other text, the following list will be displayed after running configure: If all of the libraries above have been installed, the output will look like what is shown below.
options and external libraries: MINIMUM OPTIONS: ShapeLib (Vector maps) ................. : yes RECOMMENDED OPTIONS: GraphicsMagick/ImageMagick (Raster maps) : yes (ImageMagick) pcre (Shapefile customization) ......... : yes dbfawk (Shapefile customization) ....... : yes rtree indexing (Shapefile speedups) .... : yes map caching (Raster map speedups) ...... : yes internet map retrieval ................. : yes (libcurl) FOR THE ADVENTUROUS: AX25 (Linux Kernel I/O Drivers) ........ : yes libproj (USGS Topos & Aerial Photos) ... : yes GeoTiff (USGS Topos & Aerial Photos) ... : yes Festival (Text-to-speech) .............. : yes GDAL/OGR (Obtuse map formats) .......... : yes GPSMan/gpsmanshp (GPS downloads) ....... : yes xastir will be installed in /usr/local/bin.
Note: it is not necessary to load all of the libraries in order to exactly match the list above.
After configure finishes (assuming with no errors), type the following:
make
After the build completes and assuming no errors, give yourself root privileges by typing in su and then your root password when prompted, then type...
make install
Next type exit in order to get back to your normal user account (in other words, exit out of root mode)
That's it, at a command line, type the following to launch XASTIR:
xastir &