Skip to content

Commit dfdd2bc

Browse files
committedNov 6, 2011
OS X build/install updates
1 parent 595eef0 commit dfdd2bc

File tree

3 files changed

+273
-208
lines changed

3 files changed

+273
-208
lines changed
 

‎INSTALL

Lines changed: 83 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Quantum GIS (QGIS)
22
Building QGIS from source - step by step
3-
Sunday August 07, 2011
3+
Sunday November 06, 2011
44

55

6-
Last Updated: Sunday August 07, 2011
7-
Last Change : Tuesday June 28, 2011
6+
Last Updated: Sunday November 06, 2011
7+
Last Change : Sunday November 06, 2011
88

99

1010
1. Introduction
@@ -81,9 +81,9 @@ Following a summary of the required dependencies for building:
8181

8282
Required build tools:
8383

84-
- CMake >= 2.6.0
84+
- CMake >= 2.6.2
8585
- Flex
86-
- Bison
86+
- Bison >= 2.4
8787

8888
Required build deps:
8989

@@ -321,10 +321,10 @@ Install them using dpkg. E.g.:
321321
3.9. A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support
322322
=======================================================================================================
323323

324-
The following procedure has been tested on Ubuntu 8.04, 8.10 and 9.04 32bit. If you want
325-
to use different versions of the software (gdal, grass, qgis), just make the
326-
necessary adjustments to the following code. This guide assumes that you don't have
327-
installed any previous version of gdal, grass and qgis.
324+
The following procedure has been tested on Ubuntu 8.04, 8.10 and 9.04 32bit. If
325+
you want to use different versions of the software (gdal, grass, qgis), just
326+
make the necessary adjustments to the following code. This guide assumes that
327+
you don't have installed any previous version of gdal, grass and qgis.
328328

329329

330330
3.9.1. Step 1: install base packages
@@ -344,7 +344,7 @@ Go to the ERDAS web site http://www.erdas.com/ and follow the links
344344
then download the "'Image Compression SDK Source Code 3.3'" (you'll need to make a registration
345345
and accept a license).
346346

347-
Uncompress the arquive in a proper location (this guide assumes
347+
Uncompress the archive in a proper location (this guide assumes
348348
that all the downloaded source code will be placed in the user home)
349349
and the enter the newly created folder
350350

@@ -439,23 +439,32 @@ leave the folder
439439
Before downloading and compile GRASS source code you need to install a few
440440
other libraries and programs. We can do this through apt
441441

442-
sudo apt-get install flex bison libreadline5-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \
443-
tcl8.4-dev tk8.4-dev fftw-dev xlibmesa-gl-dev libfreetype6-dev autoconf2.13 autotools-dev \
444-
libgdal1-dev proj libjpeg62-dev libpng12-dev libpq-dev unixodbc-dev doxygen fakeroot cmake \
445-
python-dev python-qt4-common python-qt4-dev python-sip4 python2.5-dev sip4 libglew1.5-dev libxmu6 \
446-
libqt4-dev libgsl0-dev python-qt4 swig python-wxversion python-wxgtk2.8 libwxgtk2.8-0 libwxbase2.8-0 tcl8.4-dev \
447-
tk8.4-dev tk8.4 libfftw3-dev libfftw3-3
442+
sudo apt-get install flex bison libreadline5-dev libncurses5-dev lesstif2-dev \
443+
debhelper dpatch libtiff4-dev tcl8.4-dev tk8.4-dev fftw-dev xlibmesa-gl-dev \
444+
libfreetype6-dev autoconf2.13 autotools-dev libgdal1-dev proj libjpeg62-dev \
445+
libpng12-dev libpq-dev unixodbc-dev doxygen fakeroot cmake python-dev \
446+
python-qt4-common python-qt4-dev python-sip4 python2.5-dev sip4 libglew1.5-dev \
447+
libxmu6 \ libqt4-dev libgsl0-dev python-qt4 swig python-wxversion \
448+
python-wxgtk2.8 libwxgtk2.8-0 libwxbase2.8-0 tcl8.4-dev tk8.4-dev tk8.4 \
449+
libfftw3-dev libfftw3-3
448450

449451
At this point we can get the GRASS source code: you may want to download it
450-
through svn or maybe you want just to download the latest available source code arquive.
451-
For example the GRASS 6.4rc4 is available at http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz
452+
through svn or maybe you want just to download the latest available source code
453+
archive. For example the GRASS 6.4rc4 is available at
454+
http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz
452455

453-
Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters
456+
Uncompress the archive, enter the newly created folder and run configure with a few specific parameters
454457

455-
CFLAGS="-fexceptions" ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-proj-share=/usr/share/proj --with-gdal=/usr/local/bin/gdal-config \
458+
CFLAGS="-fexceptions" ./configure \
459+
--with-tcltk-includes=/usr/include/tcl8.4 \
460+
--with-proj-share=/usr/share/proj \
461+
--with-gdal=/usr/local/bin/gdal-config \
456462
--with-python=/usr/bin/python2.5-config
457463

458-
The additional gcc option -fexceptions is necessary to enable exceptions support in GRASS libraries. It is currently the only way to avoid QGIS crashes if a fatal error happens in GRASS library. See also http://trac.osgeo.org/grass/ticket/869
464+
The additional gcc option -fexceptions is necessary to enable exceptions
465+
support in GRASS libraries. It is currently the only way to avoid QGIS crashes
466+
if a fatal error happens in GRASS library. See also
467+
http://trac.osgeo.org/grass/ticket/869
459468

460469
Then as usual (it will take a while)
461470

@@ -475,31 +484,21 @@ may want to give it a try
475484
grass64 -wxpython
476485

477486

478-
3.9.6. Step 6: compile and install QGIS
487+
3.9.6. Step 6: Compile and install QGIS
479488
=======================================
480489

481-
As for GRASS you can obtain the QGIS source code from different sources,
482-
for instance from svn or just by downloading one of the source code arquives available
483-
at http://www.qgis.org/download/sources.html
490+
As for GRASS you can obtain the QGIS source code from different sources as described
491+
in section 2 above. Once you have the sources, create a build directory in them:
484492

485-
For example download the QGIS 1.1.0 source code here http://download.osgeo.org/qgis/src/qgis_1.1.0.tar.gz
486-
487-
uncompress the arquive and enter the newly created folder
488-
489-
cd /qgis_1.1.0
493+
cd Quantum-GIS
494+
mkdir build
495+
cd build
490496

491497
then run ccmake
492498

493-
ccmake .
494-
495-
press the "c" key, then when the option list will appear we need to manually
496-
configure the "GRASS_PREFIX" parameter. Scroll down until the "GRASS_PREFIX" will appear,
497-
press enter and manually set it to
498-
499-
/usr/local/grass-6.4.0RC4
500-
501-
then press enter again.
499+
ccmake ..
502500

501+
Press the "c" key to do an initial configure.
503502
Press the "c" again and the option "Press [g] to generate and exit" will appear.
504503
Press the "g" key to generate and exit.
505504

@@ -621,13 +620,9 @@ installed in the default locations):
621620
@cmd
622621

623622
Start the batch file and on the command prompt checkout the QGIS source from
624-
svn to the source directory qgis-trunk:
625-
626-
svn co https://svn.osgeo.org/qgis/trunk/qgis qgis-trunk
623+
git to the source directory Quantum-GIS:
627624

628-
or using git-svn (from the git shell):
629-
630-
git svn clone --username $USER --revision 15611:HEAD https://svn.osgeo.org/qgis/trunk/qgis
625+
git clone git://github.com/qgis/Quantum-GIS.git
631626

632627
Create a 'build' directory somewhere. This will be where all the build output
633628
will be generated.
@@ -1154,9 +1149,9 @@ In this approach I will try to avoid as much as possible building dependencies
11541149
from source and rather use frameworks wherever possible.
11551150

11561151
The base system here is Mac OS X 10.4 (Tiger), with a single architecture
1157-
build. Included are notes for building on Mac OS X 10.5 (Leopard) and 10.6
1158-
(Snow Leopard). Make sure to read each section completely before typing
1159-
the first command you see.
1152+
build. Included are notes for building on Mac OS X 10.5 (Leopard), 10.6
1153+
(Snow Leopard) and 10.7 (Lion).
1154+
Make sure to read each section completely before typing the first command you see.
11601155

11611156
General note on Terminal usage: When I say "cd" to a folder in a Terminal,
11621157
it means type "cd " (without the quotes, make sure to type a space after) and
@@ -1187,10 +1182,12 @@ You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need
11871182
for the full Qt SDK, so save yourself some download time and get the frameworks
11881183
only.
11891184

1190-
Snow Leopard note: If you are building on Snow Leopard, you will need to
1191-
decide between 32-bit support in the older, Qt Carbon branch, or 64-bit
1185+
Snow Leopard+ note: If you are building on Snow Leopard+, you will need to
1186+
decide between 32-bit support in the older Qt Carbon branch, or 64-bit
11921187
support in the Qt Cocoa branch. Appropriate installers are available for both
1193-
as of Qt-4.5.2. Qt 4.6+ is recommended for Cocoa.
1188+
as of Qt-4.5.2, though they stopped making Carbon packages at Qt 4.7.4.
1189+
Qt 4.6+ is recommended for Cocoa.
1190+
Starting with Lion, Carbon may not work properly, if at all.
11941191

11951192
PPC note: The readymade Qt Cocoa installers don't include PPC support, you'd
11961193
have to compile Qt yourself. But, there appear to be issues with Qt Cocoa on
@@ -1258,8 +1255,8 @@ have problems and you are on your own with those.
12581255
5.2.2. Additional Dependencies: Expat
12591256
=====================================
12601257

1261-
Snow Leopard note: Snow Leopard includes a usable expat, so this step is
1262-
not necessary on Snow Leopard.
1258+
Snow Leopard+ note: Snow Leopard includes a usable expat, so this step is
1259+
not necessary on Snow Leopard or Lion.
12631260

12641261
Get the expat sources:
12651262

@@ -1276,10 +1273,10 @@ source folder and:
12761273
5.2.3. Additional Dependencies: Python
12771274
======================================
12781275

1279-
Leopard and Snow Leopard note: Leopard and Snow Leopard include a usable
1280-
Python 2.5 and 2.6, respectively. So there is no need to install Python on
1281-
Leopard and Snow Leopard. You can still install Python from python.org if
1282-
preferred.
1276+
Leopard+ note: Starting with Leopard a usable Python is included
1277+
in the system. This Python 2.5, 2.6 and 2.7, respectively for Leo, Snow and Lion.
1278+
So there is no need to install Python on Leopard and newer.
1279+
You can still install Python from python.org if preferred.
12831280

12841281
If installing from python.org, make sure you install at least the latest Python
12851282
2.x from
@@ -1314,12 +1311,13 @@ More configuration is needed to install outside the system path:
13141311
python configure.py -n -d /Library/Python/2.5/site-packages -b /usr/local/bin \
13151312
-e /usr/local/include -v /usr/local/share/sip -s MacOSX10.5.sdk
13161313

1317-
Snow Leopard system Python
1314+
Snow Leopard+ system Python
13181315

13191316
Similar to Leopard, you should install outside the system Python path.
13201317
Also, you need to specify the architecture you want (requires at least SIP
13211318
4.9), and make sure to run the versioned python binary (this one responds to
13221319
the 'arch' command, 'python' does not).
1320+
Substitute '2.7' for python version and 10.7 for SDK version below for Lion.
13231321

13241322
If you are using 32-bit Qt (Qt Carbon):
13251323

@@ -1361,12 +1359,13 @@ More configuration is needed to install outside the system path:
13611359

13621360
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin
13631361

1364-
Snow Leopard system Python
1362+
Snow Leopard+ system Python
13651363

13661364
Similar to Leopard, you should install outside the system Python path.
13671365
Also, you need to specify the architecture you want (requires at least PyQt 4.6),
13681366
and make sure to run the versioned python binary (this one responds to the
13691367
'arch' command, which is important for pyuic4, 'python' does not).
1368+
Substitute '2.7' for python version and 10.7 for SDK version below for Lion.
13701369

13711370
If you are using 32-bit Qt (Qt Carbon):
13721371

@@ -1435,7 +1434,7 @@ Carbon note below):
14351434

14361435
Make sure to use the qwt install path from the Qwt build above.
14371436

1438-
Snow Leopard note
1437+
Snow Leopard+ note
14391438

14401439
If using Qt Carbon, you need to specify which architectures to build, otherwise
14411440
it will default to a combination that does not work (ie x86_64 for a Carbon Qt).
@@ -1449,18 +1448,15 @@ This is not needed for Qt Cocoa. Configure as follows:
14491448
5.2.7. Additional Dependencies: Bison
14501449
=====================================
14511450

1452-
Leopard and Snow Leopard note: Leopard and Snow Leopard include Bison 2.3,
1453-
so this step can be skipped on Leopard and Snow Leopard.
1454-
1455-
The version of bison available by default on Mac OS X 10.4 is too old so you
1456-
need to get a more recent one on your system. Download at least version 2.3 from:
1451+
The version of bison available by default on Mac OS X is too old so you
1452+
need to get a more recent one on your system. Download at least version 2.4 from:
14571453

14581454
ftp.gnu.org/gnu/bison/
14591455

1460-
Now build and install it to a prefix of /usr/local. Double-click the source
1456+
Now build and install it to a prefix of /usr/local. Double-click the source
14611457
tarball to unpack it, then cd to the source folder and:
14621458

1463-
./configure --prefix=/usr/local
1459+
./configure --disable-dependency-tracking CFLAGS=-Os
14641460
make
14651461
sudo make install
14661462

@@ -1474,8 +1470,9 @@ http://www.cmake.org/cmake/resources/software.html
14741470

14751471
Binary installers are available for OS X, but they are not recommended
14761472
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
1477-
strange application). Instead, download the source, double-click the source
1478-
tarball, then cd to the source folder and:
1473+
strange application). Instead, download the source.
1474+
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
1475+
Double-click the source tarball, then cd to the source folder and:
14791476

14801477
./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
14811478
make
@@ -1508,16 +1505,17 @@ CMake supports out of source build so we will create a 'build' dir for the
15081505
build process. OS X uses ${HOME}/Applications as a standard user app folder (it
15091506
gives it the system app folder icon). If you have the correct permissions you
15101507
may want to build straight into your /Applications folder. The instructions
1511-
below assume you are building into a pre-existing ${HOME}/Applications directory.
1508+
below assume you are building into a ${HOME}/Applications directory.
15121509
In a Terminal cd to the qgis source folder previously downloaded, then:
15131510

15141511
mkdir build
15151512
cd build
15161513
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
15171514
-D CMAKE_BUILD_TYPE=MinSizeRel \
1518-
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
1515+
-D WITH_INTERNAL_SPATIALITE=FALSE \
15191516
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
15201517
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
1518+
-D BISON_EXECUTABLE=/usr/local/bin/bison \
15211519
..
15221520

15231521
This will automatically find and use the previously installed frameworks, and
@@ -1529,10 +1527,11 @@ path and version as required):
15291527

15301528
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
15311529
-D CMAKE_BUILD_TYPE=MinSizeRel \
1532-
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
1530+
-D WITH_INTERNAL_SPATIALITE=FALSE \
15331531
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
15341532
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
15351533
-D GRASS_PREFIX=/user/local/grass-6.4.1 \
1534+
-D BISON_EXECUTABLE=/usr/local/bin/bison \
15361535
..
15371536

15381537
Snow Leopard note: To handle 32-bit Qt (Carbon), create a 32bit python wrapper
@@ -1547,12 +1546,23 @@ script and add arch flags to the configuration:
15471546

15481547
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D \
15491548
-D CMAKE_BUILD_TYPE=MinSizeRel \
1550-
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
1549+
-D WITH_INTERNAL_SPATIALITE=FALSE \
15511550
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
15521551
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
1552+
-D BISON_EXECUTABLE=/usr/local/bin/bison \
15531553
-D CMAKE_OSX_ARCHITECTURES=i386 -D PYTHON_EXECUTABLE=/usr/local/bin/python32 \
15541554
..
15551555

1556+
The Qgis Mapserver feature requires fastcgi support. This is included in
1557+
Leopard and Snow Leopard, but was dropped at Lion. To build the Mapserver
1558+
component on Leopard and Snow, add the followling line before the last line in
1559+
the above configuration:
1560+
1561+
-D WITH_MAPSERVER=TRUE \
1562+
1563+
On Lion you are on your own to figure out how to install libfcgi and add fcgi
1564+
support to the system Apache. Not recommended for the average user.
1565+
15561566
Bundling note: Older Qt versions may have problems with some Qt plugins and
15571567
Qgis. The way to handle this is to bundle Qt inside the Qgis application. You
15581568
can do this now or wait to see if there are immediate crashes when running Qgis.

‎doc/INSTALL.html

Lines changed: 145 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,71 @@
77

88
<!-- Included style.css -->
99
<STYLE TYPE="text/css">
10-
body {
11-
padding: 2em 1em 2em 70px;
12-
margin: 0;
13-
font-family: sans-serif;
10+
body{ background: white;
1411
color: black;
15-
background: white;
12+
font-family: arial,sans-serif;
1613
}
17-
:link { color: #00C; background: transparent }
18-
:visited { color: #609; background: transparent }
19-
a:active { color: #C00; background: transparent }
20-
21-
a:link img, a:visited img { border-style: none }
22-
23-
24-
h1, h2, h3, h4, h5, h6 { text-align: left }
25-
h1, h2, h3 { color: #005A9C; background: white }
26-
h1 { font: 170% sans-serif }
27-
h2 { font: 140% sans-serif }
28-
h3 { font: 120% sans-serif }
29-
h4 { font: bold 100% sans-serif }
30-
h5 { font: italic 100% sans-serif }
31-
h6 { font: small-caps 100% sans-serif }
32-
3314
pre { margin-left: 2em;
3415
border: 1;
3516
padding: 4px;
3617
background: #ececec; }
3718
pre, code { font-family: monospace }
3819

3920

21+
.overview{ font: 1.82em; font-weight: bold;}
22+
23+
h1{ background-color: #F6F6F6;
24+
color: #8FB171;
25+
font-size: large;
26+
font-weight: bold;
27+
font-family: luxi serif, georgia, times new roman, times, serif;
28+
background: none;
29+
padding: 0.75em 0 0;
30+
margin: 0;
31+
line-height: 1.1em;
32+
}
33+
h2{ background-color: #F6F6F6;
34+
color: #8FB171;
35+
font-size: medium;
36+
font-weight: normal;
37+
font-family: luxi serif, georgia, times new roman, times, serif;
38+
background: none;
39+
padding: 0.75em 0 0;
40+
margin: 0;
41+
line-height: 1.1em;
42+
}
43+
h3{ background-color: #F6F6F6;
44+
color: #729FCF;
45+
font-family: luxi serif, georgia, times new roman, times, serif;
46+
font-weight: bold;
47+
font-size: large;
48+
text-align: right;
49+
border-bottom: 5px solid #DCEB5C;
50+
}
51+
h4{ background-color: #F6F6F6;
52+
color: #729FCF;
53+
font-family: luxi serif, georgia, times new roman, times, serif;
54+
font-weight: bold;
55+
font-size: medium;
56+
text-align: right;
57+
}
58+
h5{ background-color: #F6F6F6;
59+
color: #729FCF;
60+
font-family: luxi serif, georgia, times new roman, times, serif;
61+
font-weight: bold;
62+
font-size: small;
63+
text-align: right;
64+
}
65+
a{ color: #729FCF;
66+
font-family: arial,sans-serif;
67+
font-size: small;
68+
}
69+
label{ background-color: #FFFFCC;
70+
border: 1px solid black;
71+
margin: 1px;
72+
padding: 0px 3px;
73+
font-size: small;
74+
}
4075
</STYLE>
4176

4277
</HEAD>
@@ -45,13 +80,13 @@
4580
<DIV CLASS="header" ID="header">
4681
<H1>Quantum GIS (QGIS)</H1>
4782
<H2>Building QGIS from source - step by step</H2>
48-
<H3>Sunday August 07, 2011</H3>
83+
<H3>Sunday November 06, 2011</H3>
4984
</DIV>
5085

5186
<DIV CLASS="body" ID="body">
5287
<P>
53-
Last Updated: Sunday August 07, 2011
54-
Last Change : Tuesday June 28, 2011
88+
Last Updated: Sunday November 06, 2011
89+
Last Change : Sunday November 06, 2011
5590
</P>
5691
<DIV CLASS="toc">
5792

@@ -150,9 +185,9 @@ <H1>2. Overview</H1>
150185
</P>
151186

152187
<UL>
153-
<LI>CMake &gt;= 2.6.0
188+
<LI>CMake &gt;= 2.6.2
154189
<LI>Flex
155-
<LI>Bison
190+
<LI>Bison &gt;= 2.4
156191
</UL>
157192

158193
<P>
@@ -497,10 +532,10 @@ <H2>3.8. Building Debian packages</H2>
497532
<H2>3.9. A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support</H2>
498533

499534
<P>
500-
The following procedure has been tested on Ubuntu 8.04, 8.10 and 9.04 32bit. If you want
501-
to use different versions of the software (gdal, grass, qgis), just make the
502-
necessary adjustments to the following code. This guide assumes that you don't have
503-
installed any previous version of gdal, grass and qgis.
535+
The following procedure has been tested on Ubuntu 8.04, 8.10 and 9.04 32bit. If
536+
you want to use different versions of the software (gdal, grass, qgis), just
537+
make the necessary adjustments to the following code. This guide assumes that
538+
you don't have installed any previous version of gdal, grass and qgis.
504539
</P>
505540

506541
<H3>3.9.1. Step 1: install base packages</H3>
@@ -523,7 +558,7 @@ <H3>3.9.2. Step 2: compile and install the ecw libraries</H3>
523558
and accept a license).
524559
</P>
525560
<P>
526-
Uncompress the arquive in a proper location (this guide assumes
561+
Uncompress the archive in a proper location (this guide assumes
527562
that all the downloaded source code will be placed in the user home)
528563
and the enter the newly created folder
529564
</P>
@@ -679,30 +714,39 @@ <H3>3.9.5. Step 5: compile and install GRASS</H3>
679714
</P>
680715

681716
<div class="code"><PRE>
682-
sudo apt-get install flex bison libreadline5-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \
683-
tcl8.4-dev tk8.4-dev fftw-dev xlibmesa-gl-dev libfreetype6-dev autoconf2.13 autotools-dev \
684-
libgdal1-dev proj libjpeg62-dev libpng12-dev libpq-dev unixodbc-dev doxygen fakeroot cmake \
685-
python-dev python-qt4-common python-qt4-dev python-sip4 python2.5-dev sip4 libglew1.5-dev libxmu6 \
686-
libqt4-dev libgsl0-dev python-qt4 swig python-wxversion python-wxgtk2.8 libwxgtk2.8-0 libwxbase2.8-0 tcl8.4-dev \
687-
tk8.4-dev tk8.4 libfftw3-dev libfftw3-3
717+
sudo apt-get install flex bison libreadline5-dev libncurses5-dev lesstif2-dev \
718+
debhelper dpatch libtiff4-dev tcl8.4-dev tk8.4-dev fftw-dev xlibmesa-gl-dev \
719+
libfreetype6-dev autoconf2.13 autotools-dev libgdal1-dev proj libjpeg62-dev \
720+
libpng12-dev libpq-dev unixodbc-dev doxygen fakeroot cmake python-dev \
721+
python-qt4-common python-qt4-dev python-sip4 python2.5-dev sip4 libglew1.5-dev \
722+
libxmu6 \ libqt4-dev libgsl0-dev python-qt4 swig python-wxversion \
723+
python-wxgtk2.8 libwxgtk2.8-0 libwxbase2.8-0 tcl8.4-dev tk8.4-dev tk8.4 \
724+
libfftw3-dev libfftw3-3
688725
</PRE></div>
689726

690727
<P>
691728
At this point we can get the GRASS source code: you may want to download it
692-
through svn or maybe you want just to download the latest available source code arquive.
693-
For example the GRASS 6.4rc4 is available at <A HREF="http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz">http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz</A>
729+
through svn or maybe you want just to download the latest available source code
730+
archive. For example the GRASS 6.4rc4 is available at
731+
<A HREF="http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz">http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz</A>
694732
</P>
695733
<P>
696-
Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters
734+
Uncompress the archive, enter the newly created folder and run configure with a few specific parameters
697735
</P>
698736

699737
<div class="code"><PRE>
700-
CFLAGS="-fexceptions" ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-proj-share=/usr/share/proj --with-gdal=/usr/local/bin/gdal-config \
738+
CFLAGS="-fexceptions" ./configure \
739+
--with-tcltk-includes=/usr/include/tcl8.4 \
740+
--with-proj-share=/usr/share/proj \
741+
--with-gdal=/usr/local/bin/gdal-config \
701742
--with-python=/usr/bin/python2.5-config
702743
</PRE></div>
703744

704745
<P>
705-
The additional gcc option -fexceptions is necessary to enable exceptions support in GRASS libraries. It is currently the only way to avoid QGIS crashes if a fatal error happens in GRASS library. See also <A HREF="http://trac.osgeo.org/grass/ticket/869">http://trac.osgeo.org/grass/ticket/869</A>
746+
The additional gcc option -fexceptions is necessary to enable exceptions
747+
support in GRASS libraries. It is currently the only way to avoid QGIS crashes
748+
if a fatal error happens in GRASS library. See also
749+
<A HREF="http://trac.osgeo.org/grass/ticket/869">http://trac.osgeo.org/grass/ticket/869</A>
706750
</P>
707751
<P>
708752
Then as usual (it will take a while)
@@ -737,46 +781,29 @@ <H3>3.9.5. Step 5: compile and install GRASS</H3>
737781
grass64 -wxpython
738782
</PRE></div>
739783

740-
<H3>3.9.6. Step 6: compile and install QGIS</H3>
784+
<H3>3.9.6. Step 6: Compile and install QGIS</H3>
741785

742786
<P>
743-
As for GRASS you can obtain the QGIS source code from different sources,
744-
for instance from svn or just by downloading one of the source code arquives available
745-
at <A HREF="http://www.qgis.org/download/sources.html">http://www.qgis.org/download/sources.html</A>
746-
</P>
747-
<P>
748-
For example download the QGIS 1.1.0 source code here <A HREF="http://download.osgeo.org/qgis/src/qgis_1.1.0.tar.gz">http://download.osgeo.org/qgis/src/qgis_1.1.0.tar.gz</A>
749-
</P>
750-
<P>
751-
uncompress the arquive and enter the newly created folder
787+
As for GRASS you can obtain the QGIS source code from different sources as described
788+
in section 2 above. Once you have the sources, create a build directory in them:
752789
</P>
753790

754791
<div class="code"><PRE>
755-
cd /qgis_1.1.0
792+
cd Quantum-GIS
793+
mkdir build
794+
cd build
756795
</PRE></div>
757796

758797
<P>
759798
then run ccmake
760799
</P>
761800

762801
<div class="code"><PRE>
763-
ccmake .
764-
</PRE></div>
765-
766-
<P>
767-
press the "c" key, then when the option list will appear we need to manually
768-
configure the "GRASS_PREFIX" parameter. Scroll down until the "GRASS_PREFIX" will appear,
769-
press enter and manually set it to
770-
</P>
771-
772-
<div class="code"><PRE>
773-
/usr/local/grass-6.4.0RC4
802+
ccmake ..
774803
</PRE></div>
775804

776805
<P>
777-
then press enter again.
778-
</P>
779-
<P>
806+
Press the "c" key to do an initial configure.
780807
Press the "c" again and the option "Press [g] to generate and exit" will appear.
781808
Press the "g" key to generate and exit.
782809
</P>
@@ -952,19 +979,11 @@ <H3>4.1.3. Setting up the Visual Studio project with CMake</H3>
952979

953980
<P>
954981
Start the batch file and on the command prompt checkout the QGIS source from
955-
svn to the source directory <CODE>qgis-trunk</CODE>:
956-
</P>
957-
958-
<div class="code"><PRE>
959-
svn co https://svn.osgeo.org/qgis/trunk/qgis qgis-trunk
960-
</PRE></div>
961-
962-
<P>
963-
or using git-svn (from the git shell):
982+
git to the source directory <CODE>Quantum-GIS</CODE>:
964983
</P>
965984

966985
<div class="code"><PRE>
967-
git svn clone --username $USER --revision 15611:HEAD https://svn.osgeo.org/qgis/trunk/qgis
986+
git clone git://github.com/qgis/Quantum-GIS.git
968987
</PRE></div>
969988

970989
<P>
@@ -1634,9 +1653,9 @@ <H1>5. Building on MacOS X</H1>
16341653
</P>
16351654
<P>
16361655
The base system here is Mac OS X 10.4 (<U>Tiger</U>), with a single architecture
1637-
build. Included are notes for building on Mac OS X 10.5 (<U>Leopard</U>) and 10.6
1638-
(<U>Snow Leopard</U>). Make sure to read each section completely before typing
1639-
the first command you see.
1656+
build. Included are notes for building on Mac OS X 10.5 (<U>Leopard</U>), 10.6
1657+
(<U>Snow Leopard</U>) and 10.7 (<U>Lion</U>).
1658+
Make sure to read each section completely before typing the first command you see.
16401659
</P>
16411660
<P>
16421661
<U>General note on Terminal usage:</U> When I say "cd" to a folder in a Terminal,
@@ -1677,10 +1696,12 @@ <H2>5.1. Install Qt4 from disk image</H2>
16771696
only.
16781697
</P>
16791698
<P>
1680-
<U>Snow Leopard note:</U> If you are building on Snow Leopard, you will need to
1681-
decide between 32-bit support in the older, Qt Carbon branch, or 64-bit
1699+
<U>Snow Leopard+ note:</U> If you are building on Snow Leopard+, you will need to
1700+
decide between 32-bit support in the older Qt Carbon branch, or 64-bit
16821701
support in the Qt Cocoa branch. Appropriate installers are available for both
1683-
as of Qt-4.5.2. Qt 4.6+ is recommended for Cocoa.
1702+
as of Qt-4.5.2, though they stopped making Carbon packages at Qt 4.7.4.
1703+
Qt 4.6+ is recommended for Cocoa.
1704+
Starting with Lion, Carbon may not work properly, if at all.
16841705
</P>
16851706
<P>
16861707
<U>PPC note:</U> The readymade Qt Cocoa installers don't include PPC support, you'd
@@ -1765,8 +1786,8 @@ <H3>5.2.1. Additional Dependencies: General compatibility note</H3>
17651786
<H3>5.2.2. Additional Dependencies: Expat</H3>
17661787

17671788
<P>
1768-
<U>Snow Leopard note:</U> Snow Leopard includes a usable expat, so this step is
1769-
not necessary on Snow Leopard.
1789+
<U>Snow Leopard+ note:</U> Snow Leopard includes a usable expat, so this step is
1790+
not necessary on Snow Leopard or Lion.
17701791
</P>
17711792
<P>
17721793
Get the expat sources:
@@ -1788,10 +1809,10 @@ <H3>5.2.2. Additional Dependencies: Expat</H3>
17881809
<H3>5.2.3. Additional Dependencies: Python</H3>
17891810

17901811
<P>
1791-
<U>Leopard and Snow Leopard note:</U> Leopard and Snow Leopard include a usable
1792-
Python 2.5 and 2.6, respectively. So there is no need to install Python on
1793-
Leopard and Snow Leopard. You can still install Python from python.org if
1794-
preferred.
1812+
<U>Leopard+ note:</U> Starting with Leopard a usable Python is included
1813+
in the system. This Python 2.5, 2.6 and 2.7, respectively for Leo, Snow and Lion.
1814+
So there is no need to install Python on Leopard and newer.
1815+
You can still install Python from python.org if preferred.
17951816
</P>
17961817
<P>
17971818
If installing from python.org, make sure you install at least the latest Python
@@ -1841,13 +1862,14 @@ <H3>5.2.4. Additional Dependencies: SIP</H3>
18411862
</PRE></div>
18421863

18431864
<P>
1844-
<U>Snow Leopard system Python</U>
1865+
<U>Snow Leopard+ system Python</U>
18451866
</P>
18461867
<P>
18471868
Similar to Leopard, you should install outside the system Python path.
18481869
Also, you need to specify the architecture you want (requires at least SIP
18491870
4.9), and make sure to run the versioned python binary (this one responds to
18501871
the 'arch' command, 'python' does not).
1872+
Substitute '2.7' for python version and 10.7 for SDK version below for Lion.
18511873
</P>
18521874
<P>
18531875
If you are using 32-bit Qt (Qt Carbon):
@@ -1913,13 +1935,14 @@ <H3>5.2.5. Additional Dependencies: PyQt</H3>
19131935
</PRE></div>
19141936

19151937
<P>
1916-
<U>Snow Leopard system Python</U>
1938+
<U>Snow Leopard+ system Python</U>
19171939
</P>
19181940
<P>
19191941
Similar to Leopard, you should install outside the system Python path.
19201942
Also, you need to specify the architecture you want (requires at least PyQt 4.6),
19211943
and make sure to run the versioned python binary (this one responds to the
19221944
'arch' command, which is important for pyuic4, 'python' does not).
1945+
Substitute '2.7' for python version and 10.7 for SDK version below for Lion.
19231946
</P>
19241947
<P>
19251948
If you are using 32-bit Qt (Qt Carbon):
@@ -2019,7 +2042,7 @@ <H3>5.2.6. Additional Dependencies: Qwt/PyQwt</H3>
20192042
Make sure to use the qwt install path from the Qwt build above.
20202043
</P>
20212044
<P>
2022-
<U>Snow Leopard note</U>
2045+
<U>Snow Leopard+ note</U>
20232046
</P>
20242047
<P>
20252048
If using Qt Carbon, you need to specify which architectures to build, otherwise
@@ -2036,25 +2059,21 @@ <H3>5.2.6. Additional Dependencies: Qwt/PyQwt</H3>
20362059
<H3>5.2.7. Additional Dependencies: Bison</H3>
20372060

20382061
<P>
2039-
<U>Leopard and Snow Leopard note:</U> Leopard and Snow Leopard include Bison 2.3,
2040-
so this step can be skipped on Leopard and Snow Leopard.
2041-
</P>
2042-
<P>
2043-
The version of bison available by default on Mac OS X 10.4 is too old so you
2044-
need to get a more recent one on your system. Download at least version 2.3 from:
2062+
The version of bison available by default on Mac OS X is too old so you
2063+
need to get a more recent one on your system. Download at least version 2.4 from:
20452064
</P>
20462065

20472066
<div class="code"><PRE>
20482067
ftp.gnu.org/gnu/bison/
20492068
</PRE></div>
20502069

20512070
<P>
2052-
Now build and install it to a prefix of /usr/local.Ê Double-click the source
2071+
Now build and install it to a prefix of /usr/local. Double-click the source
20532072
tarball to unpack it, then cd to the source folder and:
20542073
</P>
20552074

20562075
<div class="code"><PRE>
2057-
./configure --prefix=/usr/local
2076+
./configure --disable-dependency-tracking CFLAGS=-Os
20582077
make
20592078
sudo make install
20602079
</PRE></div>
@@ -2071,8 +2090,9 @@ <H2>5.3. Install CMake for OSX</H2>
20712090
<P>
20722091
Binary installers are available for OS X, but they are not recommended
20732092
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
2074-
strange application). Instead, download the source, double-click the source
2075-
tarball, then cd to the source folder and:
2093+
strange application). Instead, download the source.
2094+
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
2095+
Double-click the source tarball, then cd to the source folder and:
20762096
</P>
20772097

20782098
<div class="code"><PRE>
@@ -2113,7 +2133,7 @@ <H2>5.5. Configure the build</H2>
21132133
build process. OS X uses ${HOME}/Applications as a standard user app folder (it
21142134
gives it the system app folder icon). If you have the correct permissions you
21152135
may want to build straight into your /Applications folder. The instructions
2116-
below assume you are building into a pre-existing ${HOME}/Applications directory.
2136+
below assume you are building into a ${HOME}/Applications directory.
21172137
In a Terminal cd to the qgis source folder previously downloaded, then:
21182138
</P>
21192139

@@ -2122,9 +2142,10 @@ <H2>5.5. Configure the build</H2>
21222142
cd build
21232143
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
21242144
-D CMAKE_BUILD_TYPE=MinSizeRel \
2125-
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
2145+
-D WITH_INTERNAL_SPATIALITE=FALSE \
21262146
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
21272147
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
2148+
-D BISON_EXECUTABLE=/usr/local/bin/bison \
21282149
..
21292150
</PRE></div>
21302151

@@ -2141,10 +2162,11 @@ <H2>5.5. Configure the build</H2>
21412162
<div class="code"><PRE>
21422163
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
21432164
-D CMAKE_BUILD_TYPE=MinSizeRel \
2144-
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
2165+
-D WITH_INTERNAL_SPATIALITE=FALSE \
21452166
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
21462167
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
21472168
-D GRASS_PREFIX=/user/local/grass-6.4.1 \
2169+
-D BISON_EXECUTABLE=/usr/local/bin/bison \
21482170
..
21492171
</PRE></div>
21502172

@@ -2163,13 +2185,29 @@ <H2>5.5. Configure the build</H2>
21632185

21642186
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D \
21652187
-D CMAKE_BUILD_TYPE=MinSizeRel \
2166-
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
2188+
-D WITH_INTERNAL_SPATIALITE=FALSE \
21672189
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
21682190
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
2191+
-D BISON_EXECUTABLE=/usr/local/bin/bison \
21692192
-D CMAKE_OSX_ARCHITECTURES=i386 -D PYTHON_EXECUTABLE=/usr/local/bin/python32 \
21702193
..
21712194
</PRE></div>
21722195

2196+
<P>
2197+
The Qgis Mapserver feature requires fastcgi support. This is included in
2198+
Leopard and Snow Leopard, but was dropped at Lion. To build the Mapserver
2199+
component on Leopard and Snow, add the followling line before the last line in
2200+
the above configuration:
2201+
</P>
2202+
2203+
<div class="code"><PRE>
2204+
-D WITH_MAPSERVER=TRUE \
2205+
</PRE></div>
2206+
2207+
<P>
2208+
On Lion you are on your own to figure out how to install libfcgi and add fcgi
2209+
support to the system Apache. Not recommended for the average user.
2210+
</P>
21732211
<P>
21742212
<U>Bundling note:</U> Older Qt versions may have problems with some Qt plugins and
21752213
Qgis. The way to handle this is to bundle Qt inside the Qgis application. You
@@ -2273,5 +2311,5 @@ <H1>6. Authors and Acknowledgments</H1>
22732311

22742312
</DIV>
22752313
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
2276-
<!-- cmdline: txt2tags -o INSTALL.html -t html INSTALL.t2t -->
2314+
<!-- cmdline: txt2tags -t html -o INSTALL.html INSTALL.t2t -->
22772315
</BODY></HTML>

‎doc/osx.t2t

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ In this approach I will try to avoid as much as possible building dependencies
55
from source and rather use frameworks wherever possible.
66

77
The base system here is Mac OS X 10.4 (__Tiger__), with a single architecture
8-
build. Included are notes for building on Mac OS X 10.5 (__Leopard__) and 10.6
9-
(__Snow Leopard__). Make sure to read each section completely before typing
10-
the first command you see.
8+
build. Included are notes for building on Mac OS X 10.5 (__Leopard__), 10.6
9+
(__Snow Leopard__) and 10.7 (__Lion__).
10+
Make sure to read each section completely before typing the first command you see.
1111

1212
__General note on Terminal usage:__ When I say "cd" to a folder in a Terminal,
1313
it means type "cd " (without the quotes, make sure to type a space after) and
@@ -38,10 +38,12 @@ You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need
3838
for the full Qt SDK, so save yourself some download time and get the frameworks
3939
only.
4040

41-
__Snow Leopard note:__ If you are building on Snow Leopard, you will need to
42-
decide between 32-bit support in the older, Qt Carbon branch, or 64-bit
41+
__Snow Leopard+ note:__ If you are building on Snow Leopard+, you will need to
42+
decide between 32-bit support in the older Qt Carbon branch, or 64-bit
4343
support in the Qt Cocoa branch. Appropriate installers are available for both
44-
as of Qt-4.5.2. Qt 4.6+ is recommended for Cocoa.
44+
as of Qt-4.5.2, though they stopped making Carbon packages at Qt 4.7.4.
45+
Qt 4.6+ is recommended for Cocoa.
46+
Starting with Lion, Carbon may not work properly, if at all.
4547

4648
__PPC note:__ The readymade Qt Cocoa installers don't include PPC support, you'd
4749
have to compile Qt yourself. But, there appear to be issues with Qt Cocoa on
@@ -106,8 +108,8 @@ have problems and you are on your own with those.
106108

107109
=== Additional Dependencies: Expat ===
108110

109-
__Snow Leopard note:__ Snow Leopard includes a usable expat, so this step is
110-
not necessary on Snow Leopard.
111+
__Snow Leopard+ note:__ Snow Leopard includes a usable expat, so this step is
112+
not necessary on Snow Leopard or Lion.
111113

112114
Get the expat sources:
113115

@@ -124,10 +126,10 @@ sudo make install
124126

125127
=== Additional Dependencies: Python ===
126128

127-
__Leopard and Snow Leopard note:__ Leopard and Snow Leopard include a usable
128-
Python 2.5 and 2.6, respectively. So there is no need to install Python on
129-
Leopard and Snow Leopard. You can still install Python from python.org if
130-
preferred.
129+
__Leopard+ note:__ Starting with Leopard a usable Python is included
130+
in the system. This Python 2.5, 2.6 and 2.7, respectively for Leo, Snow and Lion.
131+
So there is no need to install Python on Leopard and newer.
132+
You can still install Python from python.org if preferred.
131133

132134
If installing from python.org, make sure you install at least the latest Python
133135
2.x from
@@ -164,12 +166,13 @@ python configure.py -n -d /Library/Python/2.5/site-packages -b /usr/local/bin \
164166
-e /usr/local/include -v /usr/local/share/sip -s MacOSX10.5.sdk
165167
```
166168

167-
__Snow Leopard system Python__
169+
__Snow Leopard+ system Python__
168170

169171
Similar to Leopard, you should install outside the system Python path.
170172
Also, you need to specify the architecture you want (requires at least SIP
171173
4.9), and make sure to run the versioned python binary (this one responds to
172174
the 'arch' command, 'python' does not).
175+
Substitute '2.7' for python version and 10.7 for SDK version below for Lion.
173176

174177
If you are using 32-bit Qt (Qt Carbon):
175178

@@ -219,12 +222,13 @@ More configuration is needed to install outside the system path:
219222
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin
220223
```
221224

222-
__Snow Leopard system Python__
225+
__Snow Leopard+ system Python__
223226

224227
Similar to Leopard, you should install outside the system Python path.
225228
Also, you need to specify the architecture you want (requires at least PyQt 4.6),
226229
and make sure to run the versioned python binary (this one responds to the
227230
'arch' command, which is important for pyuic4, 'python' does not).
231+
Substitute '2.7' for python version and 10.7 for SDK version below for Lion.
228232

229233
If you are using 32-bit Qt (Qt Carbon):
230234

@@ -304,7 +308,7 @@ sudo make install
304308

305309
Make sure to use the qwt install path from the Qwt build above.
306310

307-
__Snow Leopard note__
311+
__Snow Leopard+ note__
308312

309313
If using Qt Carbon, you need to specify which architectures to build, otherwise
310314
it will default to a combination that does not work (ie x86_64 for a Carbon Qt).
@@ -319,21 +323,18 @@ python configure.py --extra-cflags="-arch i386" --extra-cxxflags="-arch i386" \
319323

320324
=== Additional Dependencies: Bison ===
321325

322-
__Leopard and Snow Leopard note:__ Leopard and Snow Leopard include Bison 2.3,
323-
so this step can be skipped on Leopard and Snow Leopard.
324-
325-
The version of bison available by default on Mac OS X 10.4 is too old so you
326-
need to get a more recent one on your system. Download at least version 2.3 from:
326+
The version of bison available by default on Mac OS X is too old so you
327+
need to get a more recent one on your system. Download at least version 2.4 from:
327328

328329
```
329330
ftp.gnu.org/gnu/bison/
330331
```
331332

332-
Now build and install it to a prefix of /usr/local. Double-click the source
333+
Now build and install it to a prefix of /usr/local. Double-click the source
333334
tarball to unpack it, then cd to the source folder and:
334335

335336
```
336-
./configure --prefix=/usr/local
337+
./configure --disable-dependency-tracking CFLAGS=-Os
337338
make
338339
sudo make install
339340
```
@@ -346,8 +347,9 @@ http://www.cmake.org/cmake/resources/software.html
346347

347348
Binary installers are available for OS X, but they are not recommended
348349
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
349-
strange application). Instead, download the source, double-click the source
350-
tarball, then cd to the source folder and:
350+
strange application). Instead, download the source.
351+
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
352+
Double-click the source tarball, then cd to the source folder and:
351353

352354
```
353355
./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
@@ -378,17 +380,18 @@ CMake supports out of source build so we will create a 'build' dir for the
378380
build process. OS X uses ${HOME}/Applications as a standard user app folder (it
379381
gives it the system app folder icon). If you have the correct permissions you
380382
may want to build straight into your /Applications folder. The instructions
381-
below assume you are building into a pre-existing ${HOME}/Applications directory.
383+
below assume you are building into a ${HOME}/Applications directory.
382384
In a Terminal cd to the qgis source folder previously downloaded, then:
383385

384386
```
385387
mkdir build
386388
cd build
387389
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
388390
-D CMAKE_BUILD_TYPE=MinSizeRel \
389-
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
391+
-D WITH_INTERNAL_SPATIALITE=FALSE \
390392
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
391393
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
394+
-D BISON_EXECUTABLE=/usr/local/bin/bison \
392395
..
393396
```
394397

@@ -402,10 +405,11 @@ path and version as required):
402405
```
403406
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
404407
-D CMAKE_BUILD_TYPE=MinSizeRel \
405-
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
408+
-D WITH_INTERNAL_SPATIALITE=FALSE \
406409
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
407410
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
408411
-D GRASS_PREFIX=/user/local/grass-6.4.1 \
412+
-D BISON_EXECUTABLE=/usr/local/bin/bison \
409413
..
410414
```
411415

@@ -422,13 +426,26 @@ sudo chmod +x /usr/local/bin/python32
422426

423427
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D \
424428
-D CMAKE_BUILD_TYPE=MinSizeRel \
425-
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
429+
-D WITH_INTERNAL_SPATIALITE=FALSE \
426430
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
427431
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
432+
-D BISON_EXECUTABLE=/usr/local/bin/bison \
428433
-D CMAKE_OSX_ARCHITECTURES=i386 -D PYTHON_EXECUTABLE=/usr/local/bin/python32 \
429434
..
430435
```
431436

437+
The Qgis Mapserver feature requires fastcgi support. This is included in
438+
Leopard and Snow Leopard, but was dropped at Lion. To build the Mapserver
439+
component on Leopard and Snow, add the followling line before the last line in
440+
the above configuration:
441+
442+
```
443+
-D WITH_MAPSERVER=TRUE \
444+
```
445+
446+
On Lion you are on your own to figure out how to install libfcgi and add fcgi
447+
support to the system Apache. Not recommended for the average user.
448+
432449
__Bundling note:__ Older Qt versions may have problems with some Qt plugins and
433450
Qgis. The way to handle this is to bundle Qt inside the Qgis application. You
434451
can do this now or wait to see if there are immediate crashes when running Qgis.

0 commit comments

Comments
 (0)
Please sign in to comment.