Merge changes Ia0836dab,I2809dfc4,I3baa0fd0
[trojita.git] / README.harmattan
blobb84b16840e300f7d418c0482d97574f0520fe95c
1 How to build the Harmattan version:
3 This is going to be involved. Trojita now requires a compiler which speaks
4 C++11, and GCC 4.4 which comes in the ancient Nokia's SDK is not one of these.
5 The only known way of creating the Harmattan builds is the following setup which
6 uses both the ancient toolchain and a recent clang.
8 For compiling with clang, make sure that it's built with the required targets
9 (Gentoo: USE=multitarget) and provide a custom "profile" for Madde. Instructions
10 for that are in packaging/harmattan-rm680-madde-c++ . Clang 3.5 is required,
11 see the git log for how it worked on 3.3.
13 You'll also need to patch the QtSDK's headers so that they work with clang, see
14 [1]. A patch for the STL [2] shall be applied inside
15 ~/QtSDK/Madde/sysroots/harmattan_sysroot_10.2011.34-1_slim/usr/include/c++/4.4.
16 and Qt needs to be patched not to concatenate string literals carelessly (see
17 packaging/harmattan-qt4-c++11.patch). Finally, moc produces constructs which
18 trigger the narrowing error in C++11 (Qt4 commit
19 b1696fab84c411da025d255fef82f64c78bd92b5); we're "fixing" this by sed-ing the
20 output of moc to add an explicit cast -- sweet, isn't it?
22 After this initial setup is done (i.e. you have a toolchain capable of speaking
23 C++11, supporting exceptions *and* creating Harmattan binaries at the same time,
24 which in itself is an impressive accomplishment, you may proceed to the actual
25 build:
27 1) change directory into the top-level directory of trojita's repository
28 2) `mkdir _build_harmattan && cd _build_harmattan`
29 3) `cp -a ../qtc_packaging/debian_harmattan debian`
30 4) `sed -i "s|THIS_VERSION|$(git describe | sed s/^v//)|" debian/changelog`
31 5) `~/QtSDK/Madde/bin/mad -t clang-rm680 dpkg-buildpackage -j4 -b -nc -uc`
32 6) profit!
34 [1] http://stackoverflow.com/questions/15120004/compiling-with-clang-fails-with-libstdc4-4-7-and-std-c0x
35 [2] http://clang.llvm.org/libstdc++4.4-clang0x.patch