diff INSTALL @ 876:0051cb07da28

Reduce libraries, document i386 build and statically link fonts.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 07 Aug 2014 19:12:37 +0200
parents e4cf249ba1a6
children 7ea29b5183a3
line wrap: on
line diff
--- a/INSTALL	Thu Aug 07 13:05:26 2014 +0200
+++ b/INSTALL	Thu Aug 07 19:12:37 2014 +0200
@@ -3,9 +3,11 @@
 
 For Debian based GNU / Linux
 ============================
-Tested development platform: Ubuntu 14.4.
+Tested development platform: Ubuntu 14.4 amd64.
 
 The following commands build qt5 and polarssl which are dependencies of the Software.
+To only build for the amd64 platform omit the i386 instructions.
+
 For build dependencies please refer to the Qt documentation 
 ( qtbase/src/plugins/platforms/xcb/README ).
 Polarssl needs cmake and build-essentials.
@@ -31,9 +33,10 @@
     ./configure --prefix=$YOURPREFIX \
     -opensource \
     -release  -nomake tests  -nomake examples  -confirm-license \
-    -static -no-cups -no-nis -no-icu -fontconfig \
+    -static -no-cups -no-nis -no-icu -no-fontconfig -qt-freetype \
     -no-directfb -no-opengl -no-kms -no-eglfs -no-egl -no-openssl -no-glib \
-    -system-libpng -qpa xcb -qt-xcb -no-nis -no-libjpeg -no-gif && \
+    -system-libpng -qpa xcb -qt-xkbcommon -qt-xcb -no-nis -no-libjpeg -qt-libpng \
+    -qt-zlib -no-gif && \
     nice make -j8 && \
     make install
 
@@ -69,6 +72,63 @@
     cmake .. -DCMAKE_PREFIX_PATH=$YOURPREFIX
 
 
+I386
+====
+Install dependencies (list might be incomplete)
+    apt-get install libx32stdc++-4.8-dev libc6:i386 g++-4.8-multilib \
+   libxcb1:i386 libxcb1-dev:i386 libx11-xcb1:i386 libx11-xcb-dev:i386 libxcb-keysyms1:i386 \
+   libxcb-keysyms1-dev:i386 libxcb-image0:i386 libxcb-image0-dev:i386 \
+   libxcb-shm0:i386 libxcb-shm0-dev:i386 libxcb-icccm4:i386 \
+   libxcb-icccm4-dev:i386 libxcb-sync-dev:i386 \
+   libxcb-render-util0:i386 libxcb-render-util0-dev:i386 \
+   libxcb-xfixes0-dev:i386 libxrender-dev:i386 libxcb-shape0-dev:i386 \
+   libxcb-randr0-dev:i386 libxcb-glx0-dev:i386 libdbus-1-dev:i386 \
+   libsm-dev:i386
+
+Some packages are problematic as they do not support multiarch installation so
+we just download and extract them.
+    mkdir $YOURPREFIX/i386/packages
+    apt-get download -o=Debug::NoLocking=1 -o=dir::cache=$YOURPREFIX/i386/packages libxi-dev:i386 \
+    libfontconfig1-dev:i386 libfreetype6-dev:i386
+    cd $YOURPREFIX/i386/packages
+    for file in *.deb; do; dpkg -x $file .; done;
+
+Create a new directory for qt. As qt has to build in source you need a different
+directory.
+    mkdir i386
+    cd i386
+    tar -xf ../qt-everywhere-opensource-src-5.3.1.tar.xz
+    cd qt-everywhere-opensource-src-5.3.1/qtbase/
+    ./configure --prefix=$YOURPREFIX/i386 \
+    -opensource -platform linux-g++-32 \
+    -release  -nomake tests  -nomake examples  -confirm-license \
+    -static -no-cups -no-nis -no-icu \
+    -no-directfb -no-opengl -no-kms -no-eglfs -no-egl -no-openssl -no-glib \
+    -system-libpng -qpa xcb -qt-xcb -no-nis -no-libjpeg -no-gif -qt-zlib \
+    -no-fontconfig -qt-freetype -qt-libpng -qt-xkbcommon \
+    && \
+    nice make -j8 && \
+    make install
+
+Switch back to the polarssl directory
+    cd ../../../polarssl-1.3.8/
+    mkdir build-i386
+    cd build-i386
+    cmake .. -DCMAKE_C_FLAGS="-fpic -m32" -DCMAKE_INSTALL_PREFIX=$YOURPREFIX/i386 \
+         -DCMAKE_VERBOSE_MAKEFILE=True \
+         -DENABLE_TESTING=FALSE -DENABLE_PROGRAMS=FALSE && \
+    nice make -j8 && \
+    make install
+
+Now for Trustbridge itself
+    cd ../../trustbridge
+    mkdir build-i386
+    cd build-i386
+    cmake .. -DCMAKE_PREFIX_PATH="$YOURPREFIX/i386" \
+    -DCMAKE_VERBOSE_MAKEFILE=True \
+    -DCMAKE_C_FLAGS=-m32 \
+    -DCMAKE_CXX_FLAGS="-m32"
+
 Hiawatha (for Downloader unit test)
 ===================================
 Hiawatha is used in the downloader unit tests to provide a testbench

http://wald.intevation.org/projects/trustbridge/