~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to build.mac.sh

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
#
3
 
# A simple script to build QGIS
4
 
#       Tim Sutton 2005-2006
5
 
#       and Martin Dobias 2006
6
 
#
7
 
if [ ! $1 ]
8
 
then
9
 
  echo "Usage: ${0} install_prefix"
10
 
  echo "e.g."
11
 
  echo "${0} \$HOME/apps/"
12
 
   exit 1
13
 
 fi
14
 
  
15
 
 AUTOGEN_FLAGS=
16
 
  
17
 
 # for debug build:
18
 
 # - disable default optimisations to improve debugging (omitting default -O2 flags)
19
 
 # - show warnings
20
 
 if [ x$2 = xdebug ]
21
 
 then
22
 
   echo "Building with debug support"
23
 
   AUTOGEN_FLAGS="--enable-debug"
24
 
   export CFLAGS="-g -Wall"
25
 
   export CXXFLAGS="-g -Wall"
26
 
   #for mac fink users
27
 
   #export CPPFLAGS=-I/sw/include
28
 
 else
29
 
   echo "Building without debug support"
30
 
   AUTOGEN_FLAGS="--disable-debug"
31
 
   export CFLAGS="-O2 -Wall"
32
 
   export CXXFLAGS="-O2 -Wall"
33
 
   #for mac fink users
34
 
   #export CPPFLAGS=-I/sw/include
35
 
 fi
36
 
 
37
 
 if [ x$2 = "static" ]
38
 
 then
39
 
   echo "Building with qgis statically linked to dependencies"
40
 
   #this is to tell linker to statically linke
41
 
   #against deps like gdal etc - useful for
42
 
   #trying to build a distributeable binary of qgis
43
 
   export LDFLAGS=-static
44
 
 fi
45
 
  
46
 
 #qt installed from source
47
 
 #export QTDIR=/usr/local/Trolltech/Qt-4.1.0
48
 
 #qt installed from debian apt
49
 
 #export QTDIR=/usr
50
 
 export QTDIR=/usr/local/Trolltech/Qt-4.2.0-rc1
51
 
 #export QTDIR=/usr/local/Trolltech/Qt-4.1.4
52
 
 #export PATH=/usr/local/gislibs/bin:/usr/local/graphicslibs/bin/:$QTDIR/bin:$PATH
53
 
 export LD_LIBRARY_PATH=$QTDIR/lib
54
 
 
55
 
 # Note: --enable-static=no tells compiler 
56
 
 # 'dont build static versions of qgis .o files'
57
 
 # This only applies to qgis interal libs and speeds 
58
 
 # up the compilation process. See discussion on 
59
 
 # http://logs.qgis.org/slogs/%23qgis.2006-04-15.log at 17:06:10
60
 
 # for additional details
61
 
 ./autogen.sh $AUTOGEN_FLAGS --prefix=${1} \
62
 
                             --enable-static=no \
63
 
                             --with-qtdir=$QTDIR \
64
 
                             --with-python
65
 
                             #--with-grass=/usr/local/gislibs/grass
66
 
                             #--enable-unittests \
67
 
make && make install
68
 
 
69
 
cd tests/src
70
 
./runtests.sh