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

« back to all changes in this revision

Viewing changes to build.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
 
 fi
27
 
 
28
 
 if [ x$2 = "static" ]
29
 
 then
30
 
   echo "Building with qgis statically linked to dependencies"
31
 
   #this is to tell linker to statically linke
32
 
   #against deps like gdal etc - useful for
33
 
   #trying to build a distributeable binary of qgis
34
 
   export LDFLAGS=-static
35
 
 fi
36
 
  
37
 
 #qt installed from source
38
 
 #export QTDIR=/usr/local/Trolltech/Qt-4.2.2
39
 
 #export QTDIR=/opt/omg_linux_bundle/usr/
40
 
 
41
 
 #qt installed from debian apt
42
 
 export QTDIR=/usr
43
 
 export PATH=$QTDIR/bin:$PATH
44
 
 export LD_LIBRARY_PATH=$QTDIR/lib
45
 
 
46
 
 # Note: --enable-static=no tells compiler 
47
 
 # 'dont build static versions of qgis .o files'
48
 
 # This only applies to qgis interal libs and speeds 
49
 
 # up the compilation process. See discussion on 
50
 
 # http://logs.qgis.org/slogs/%23qgis.2006-04-15.log at 17:06:10
51
 
 # for additional details
52
 
 export PATH=/opt/omg_linux_bundle/usr/bin/:$PATH
53
 
 ./autogen.sh $AUTOGEN_FLAGS --prefix=${1} \
54
 
                             --enable-static=no \
55
 
                             --with-python \
56
 
                             --with-gsl=/opt/omg_linux_bundle/usr/bin/gsl-config \
57
 
                             --with-gdal=/opt/omg_linux_bundle/usr/ \
58
 
                             --with-projdir=/opt/omg_linux_bundle/usr/ \
59
 
                             --with-gdal=/opt/omg_linux_bundle/usr/bin/gdal-config \
60
 
                             --with-qtdir=$QTDIR 
61
 
                             --with-grass=/usr/lib/grass && make && make install 
62
 
                             ##--enable-unittests \
63
 
#cd tests/src
64
 
#./runtests.sh
65
 
make
66
 
make install