Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 naclports - Ports of open source software to Native Client | 1 naclports - Ports of open source software to Native Client |
| 2 ========================================================== | 2 ========================================================== |
| 3 | 3 |
| 4 naclports is collection of open source libraries and applications that have | 4 naclports is collection of open source libraries and applications that have |
| 5 been ported to Native Client, along with set to tools for building and | 5 been ported to Native Client, along with set to tools for building and |
| 6 maintaining them. | 6 maintaining them. |
| 7 | 7 |
| 8 The ports themselves live in the ``ports`` directory. Each one contains of | 8 The ports themselves live in the ``ports`` directory. Each one contains of |
| 9 three main file: | 9 three main file: |
| 10 | 10 |
| 11 - pkg_info: a description of the package. | 11 - pkg_info: a description of the package. |
| 12 - build.sh: a bash script for building it | 12 - build.sh: a bash script for building it |
| 13 - nacl.patch: an optional patch file. | 13 - nacl.patch: an optional patch file. |
| 14 | 14 |
| 15 The tools for building packages live in ``build_tools``. To build and install | 15 The tools for building packages live in ``build_tools``. To build and install |
| 16 a package into the toolchain run ``naclports.py install <package_dir>``. This | 16 a package into the toolchain run ``naclports.py install <package_dir>``. This |
| 17 script will download, patch, build and install the application or library. By | 17 script will download, patch, build and install the application or library. By |
| 18 default it will first build any dependencies that that the package has. | 18 default it will first build any dependencies that that the package has. |
| 19 | 19 |
| 20 Prerequistes | |
| 21 ------------ | |
| 22 | |
| 20 The build scripts require that certain tools are present in the host system. | 23 The build scripts require that certain tools are present in the host system. |
| 21 You will need at least these: | 24 You will need at least these: |
| 22 | 25 |
| 23 - bash | 26 - bash |
| 24 - make | 27 - make |
| 25 - curl | 28 - curl |
| 26 - sed | 29 - sed |
| 27 - git | 30 - git |
| 28 | 31 |
| 29 To build all ports you will also need these: | 32 To build all ports you will also need these: |
| 30 | 33 |
| 31 - cmake | 34 - cmake |
| 32 - texinfo | 35 - texinfo |
| 33 - gettext | 36 - gettext |
| 34 - pkg-config | 37 - pkg-config |
| 35 - autoconf, automake, libtool | 38 - autoconf, automake, libtool |
| 36 - libglib2.0-dev >= 2.26.0 (if you want to build glib) | 39 - libglib2.0-dev >= 2.26.0 (if you want to build glib) |
| 37 | 40 |
| 41 On Mac OS X you can use homebrew to install these using the following command:: | |
| 42 | |
| 43 brew install autoconf automake cmake gettext libtool pkg-config | |
| 44 | |
| 45 To the build system for some of the native python modules relies on a 32-bit | |
|
binji
2014/04/17 17:43:33
s/To the build/The build/
Sam Clegg
2014/04/17 17:48:42
Done.
| |
| 46 host build of the python itself, which in turn relies on the development version | |
|
binji
2014/04/17 17:43:33
s/the python/Python/
Sam Clegg
2014/04/17 17:48:42
Done.
| |
| 47 of zlib being available. On 64-bit Ubuntu/Precise this means installing the | |
| 48 following package: ``lib32z1-dev``. | |
|
binji
2014/04/17 17:43:33
What about on Mac OS X?
Sam Clegg
2014/04/17 17:48:42
Not sure at this point :(
| |
| 49 | |
| 50 | |
| 51 Building | |
| 52 -------- | |
| 53 | |
| 38 Before you can build any of the package you must set the NACL_SDK_ROOT | 54 Before you can build any of the package you must set the NACL_SDK_ROOT |
| 39 environment variable to top directory of a version of the Native Client SDK | 55 environment variable to top directory of a version of the Native Client SDK |
| 40 (the directory containing toolchain/). This path should be absolute. | 56 (the directory containing toolchain/). This path should be absolute. |
| 41 | 57 |
| 42 The top level Makefile can be used as a quick way to build one or more | 58 The top level Makefile can be used as a quick way to build one or more |
| 43 packages. For example, ``make vorbis`` will build ``libvorbis-1.2.3`` and | 59 packages. For example, ``make vorbis`` will build ``libvorbis-1.2.3`` and |
| 44 ``libogg-1.1.4``. ``make all`` will build all the packages. | 60 ``libogg-1.1.4``. ``make all`` will build all the packages. |
| 45 | 61 |
| 46 There are 4 possible architectures that NaCl modules can be compiled for: i686, | 62 There are 4 possible architectures that NaCl modules can be compiled for: i686, |
| 47 x86_64, arm, pnacl. The naclports build system will only build just one at at | 63 x86_64, arm, pnacl. The naclports build system will only build just one at at |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 | 183 |
| 168 1. Directly modify the sources in ``out/build/PKG_NAME``. | 184 1. Directly modify the sources in ``out/build/PKG_NAME``. |
| 169 2. Build the package and verify the changes. | 185 2. Build the package and verify the changes. |
| 170 3. Use ``git diff upstream.. > ../path/to/nacl.patch`` to regenerate | 186 3. Use ``git diff upstream.. > ../path/to/nacl.patch`` to regenerate |
| 171 the patch file. | 187 the patch file. |
| 172 | 188 |
| 173 Whenever the upstream archive or patch file changes and you try to build the | 189 Whenever the upstream archive or patch file changes and you try to build the |
| 174 package you will be prompted to remove the existing repository and start a new | 190 package you will be prompted to remove the existing repository and start a new |
| 175 one. This is to avoid deleting a repository that might have unsaved changed. | 191 one. This is to avoid deleting a repository that might have unsaved changed. |
| 176 | 192 |
| 177 | |
| 178 Happy porting! | 193 Happy porting! |
| OLD | NEW |