Changeset 24178
- Timestamp:
- 07/02/2008 01:25:30 AM (5 months ago)
- Files:
-
- trunk/Utilities/dep-build-scripts/README (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Utilities/dep-build-scripts/README
r24172 r24178 1 To set up the build environment (fetch the source trees) run: 1 == DOWNLOADING SOURCE TREES == 2 2 3 ./common.sh -d 3 To download the source trees to most dependencies, just run 4 4 5 The download script requires python 2.5.1 or later. Mac OS X 10.5 comes with this version. If you don't have that version of python, you can substitute wget. First, you must install wget; then, run: 5 $ ./common.sh -d 6 6 7 (mkdir source || true) && cd source && wget -iurls.txt && cd .. 7 The download script requires Python 2.5.1 or later, which comes with 8 Mac OS X 10.5 "Leopard" . You can confirm which version of Python you are using 9 by running `python --version`; if it is an older version, you can upgrade at 10 http://python.org/download/mac/. 8 11 9 ***** 10 Get a copy of the pidgin sources. Adium currently uses libpurple 2.4.2mtn, and patches applied during the build process depend upon this. 12 Alternatively, you can substitute curl and xargs: 11 13 12 See http://pidgin.im to download a 2.4.1 tarball. This may not compile. Use Monotone; see below. 14 $ (mkdir source || true) && cd source && (cat ../urls.txt | xargs -I %url% \ 15 curl -LO %url%) && (ls -1 *.tar.gz | xargs -I %file% tar xzf %file%) && \ 16 (ls -1 *.tar.bz2 | xargs -I %file% tar xjf %file%) && rm -f *.tar.* && cd .. 13 17 14 To get libpurple via Monotone, see http://developer.pidgin.im/wiki/UsingPidginMonotone . Check out im.pidgin.pidgin using "-b im.pidgin.pidgin".15 Previous instructions, for reference: Check out the v2.3.1 tag (with "-r t:v2.3.1" in place of "-b im.pidgin.pidgin" as given in the UsingPidginMonotone instructions) to get the code used by Adium.16 18 17 Put a copy of msn-pecan (http://code.google.com/p/msn-pecan/) and put it in libpurple/protocols/msn_pecan in your pidgin checkout. Note that an underscore is used in the directory name! 19 === DOWNLOADING PIDGIN SOURCE TREE === 18 20 19 **** 20 BUILD REQUIREMENTS: 21 You need automake 1.10 or later. 22 10.5 includes automake 1.10, but if you are on 10.4 you need to install this 23 yourself. The easiest way to install this is MacPorts (port install automake). 24 ***** 21 The Pidgin source is not installed by the download script. Adium currently uses 22 libpurple 2.4.2mtn from branch im.pidgin.pidgin. Patches applied during the 23 build process expect this version. 25 24 26 When you set up your pidgin working copy, set the environment variable 27 PIDGIN_SOURCE to be the path to your WC. current_step.sh needs this to work. 28 In bash/zsh: export PIDGIN_SOURCE="/path/to/im.pidgin.pidgin" 29 In csh/tcsh: setenv PIDGIN_SOURCE "/path/to/im.pidgin.pidgin" 30 * Note that PIDGIN_SOURCE should be an absolute path. Don't use ~. 31 * This Pidgin checkout must be completely clean. If you use it for building Pidgin (or libpurple, or Finch), be sure to run "make distclean" in it before starting the process below. 32 ***** 25 The official documentation for getting Pidgin source is maintained at 26 http://developer.pidgin.im/wiki/UsingPidginMonotone, simplified here. The 27 Pidgin repository is run by monotone. You can find a Mac OS X monotone 28 installer at http://www.monotone.ca/. 33 29 34 Then, once you have the source trees, the current build process is this:35 ./general_dependencies_make.sh36 ./purple_dependencies_make.sh37 ./purple_make.sh38 ./universalize.sh39 30 40 which will leave you with frameworks in build/Frameworks. 31 ==== INITIAL CHECKOUT ==== 41 32 42 The next step only needs to be done after a clean build or after updating to a new version of libpurple; it generates and copies in the po (localization) files: 43 ./make_po_files.sh 33 We will download a snapshot of the monotone database to bootstrap the checkout 34 process. Please note that this file is nearly 200 MB. 44 35 45 (Once you've built the dependencies, you can simply use the steps from purple_make.sh onward to update your build.) 36 $ cd source; (mkdir im.pidgin.pidgin || true); cd im.pidgin.pidgin; curl -LO \ 37 http://developer.pidgin.im/static/pidgin.mtn.bz2; bzip2 -d pidgin.mtn.bz2; \ 38 mtn db -d pidgin.mtn migrate; mtn -d pidgin.mtn pull --set-default pidgin.im \ 39 "im.pidgin.*"; mtn -d pidgin.mtn co -b im.pidgin.pidgin .; cd ../.. 46 40 47 You can then copy the frameworks to Adium itself with: 48 ./copy_frameworks.sh 41 42 ==== UPDATING ==== 43 44 To update the Pidgin source tree, just run 45 46 $ cd source/im.pidgin.pidgin; mtn pull; cd ../.. 47 48 49 === DOWNLOADING MSN-PECAN SOURCE TREE === 50 51 The msn-pecan source is not installed by the download script. Adium currently 52 uses the adium-test branch. You must have Pidgin installed as above to use 53 msn-pecan. 54 55 The msn-pecan repository is run by git. You can find a Mac OS X git installer 56 at http://code.google.com/p/git-osx-installer/downloads/list?can=3. 57 58 59 ==== INITIAL CHECKOUT ==== 60 61 To check out the adium-test branch of msn-pecan, run 62 63 $ cd source/im.pidgin.pidgin/libpurple/protocols; git clone \ 64 git://github.com/felipec/msn-pecan.git msn_pecan; cd msn_pecan; git checkout \ 65 -b adium_test origin/adium_test; cd ../../../../.. 66 67 68 ==== UPDATING ==== 69 70 To update the msn-pecan source, run 71 72 $ cd source/im.pidgin.pidgin/libpurple/protocols/msn_pecan; git pull; \ 73 cd ../../../../.. 74 75 76 == CONFIGURATION == 77 78 The configuration settings are found in common.sh. This script is executed 79 during the build process to set up the build environment. You will need to edit 80 this file to change build behavior such as which SDK to use. 81 82 83 === SETTING PIDGIN PATH === 84 85 Before building libpurple, we must tell the build scripts where to find the 86 Pidgin source. In the common.sh file, under the "# Directories" heading, add 87 88 export PIDGIN_SOURCE="$SOURCEDIR/im.pidgin.pidgin" 89 90 If you did not check out the Pidgin source as above, substitute the absolute 91 path of your local Pidgin source tree. 92 93 94 === SETTING GCC VERSION === 95 96 On some versions of Mac OS X, the default gcc compiler is 4.2.1, which may 97 cause problems. You can verify which version of gcc is used by running 98 `gcc --version`. 99 100 To use gcc 4.0.1, edit the common.sh file. Under the "# Compiler options" 101 heading, add the line 102 103 export CC=/usr/bin/gcc-4.0 104 105 106 == BUILDING == 107 108 A number of scripts are included to simplify the process of building libpurple 109 and other dependencies. 110 111 You must have automake 1.10 or later installed to build the dependencies. The 112 easiest way to install this is via MacPorts (http://www.macports.org/): 113 114 $ port install automake 115 116 117 === GENERAL DEPENDENCIES === 118 119 $ ./general_dependencies_make.sh 120 121 This phase builds pkg-config, gettext, and glib. The output of the build 122 process is written to ./build/dep_make.log. Some configuration output may be 123 found in the build subdirectores; look for config.log files. 124 125 You will not need to run this part of the build process again unless the 126 dependencies above are updated. 127 128 129 === LIBPURPLE DEPENDENCIES === 130 131 $ ./purple_dependencies_make.sh 132 133 This phase builds Meanwhile, Gadu-Gadu, and intltool. The output of the build 134 process is written to ./build/purple_dep_log. Some configuration output may be 135 found in the build subdirectories; look for config.log files. 136 137 You will not need to run this part of the build process again unless the 138 dependencies above (including general dependencies) are updated. 139 140 141 === LIBPURPLE === 142 143 $ ./purple_make.sh 144 145 You must have set the PIDGIN_SOURCE variable for this script to run; see 146 SETTING PIDGIN PATH above. 147 148 This phase builds libpurple. The output of the build process is written to 149 STDOUT. 150 151 You must run this part of the build process each time you update libpurple. 152 153 154 === UNIVERSALIZE === 155 156 $ ./universalize.sh 157 158 This phase creates Universal Binaries from the PowerPC- and Intel-native 159 binaries. The output of the build process is written to STDOUT. 160 161 The build products are located in ./build/Frameworks. 162 163 You must run this part of the build process each time you update any of the 164 dependencies, including libpurple. 165 166 167 === MAKE PO FILES === 168 169 $ ./make_po_files.sh 170 171 This phase generates localization files. The output of the build process is 172 written to STDOUT. 173 174 You must run this part of the build process after a clean build, or after you 175 update libpurple. 176 177 178 == INSTALLING == 179 180 You can copy the built frameworks to Adium with 181 182 $ ./copyframeworks.sh 183 184 You should then build Adium to link against the new frameworks.