Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. Hubbub -- an HTML parser
  2. ========================
  3.  
  4. Overview
  5. --------
  6.  
  7.   Hubbub is a flexible HTML parser. It aims to comply with the HTML5
  8.   specification.
  9.  
  10. Requirements
  11. ------------
  12.  
  13.   Hubbub requires the following tools:
  14.  
  15.     + A C99 capable C compiler
  16.     + GNU make or compatible
  17.     + Perl (for the testcases)
  18.     + Pkg-config (for the testcases)
  19.     + xsltproc (for the entity fetcher)
  20.     + wget (for the entity fetcher)
  21.     + doxygen (for the API documentation)
  22.  
  23.   Hubbub also requires the following libraries to be installed:
  24.  
  25.     + An iconv implementation (e.g. libiconv)
  26.     + LibParserUtils -- see below for further information
  27.     + JSON-C (for the testcases) -- see below for further information
  28.  
  29.   Hubbub can make use of the following, for debugging and testing purposes:
  30.  
  31.     + gcov and lcov, for test coverage data
  32.  
  33. LibParserUtils
  34. --------------
  35.  
  36.   To compile Hubbub, you will need LibParserUtils.  This can be
  37.   obtained from SVN:
  38.                 $ svn co svn://svn.netsurf-browser.org/trunk/libparserutils/
  39.  
  40.   Follow the instructions in LibParserUtils' README file to build and
  41.   install it.
  42.  
  43.   Note: By default, libparserutils only supports a few character sets. It may,
  44.         however, be configured to use iconv() to provide charset conversion.
  45.         See LibParserUtils' README for further information.
  46.  
  47. JSON-C
  48. ------
  49.  
  50.   To run tests, you will need JSON-C.  You can obtain the version
  51.   that Hubbub needs from SVN:
  52.                 $ svn co svn://svn.netsurf-browser.org/trunk/json-c/json-c/
  53.  
  54.   Build and install JSON-C as follows:
  55.  
  56.                 $ sh autogen.sh
  57.                 $ make install
  58.  
  59. Compilation
  60. -----------
  61.  
  62.   The exact type of build may be configured by passing parameters to make.
  63.   Common usage is described below.
  64.  
  65.   For a static library:
  66.  
  67.                 $ make
  68.  
  69.   For a shared library:
  70.  
  71.                 $ make COMPONENT_TYPE=lib-shared
  72.  
  73.   For a static library with debug enabled:
  74.  
  75.                 $ make BUILD=debug
  76.  
  77.   To cross-compile a static library:
  78.  
  79.                 $ make TARGET=<target-platform>
  80.  
  81. Verification
  82. ------------
  83.  
  84.   The library's functionality may be verified, thus:
  85.  
  86.                 $ make test
  87.  
  88.   If you wish to see test coverage statistics, run:
  89.  
  90.                 $ make coverage
  91.  
  92.   Then open build/coverage/index.html in a web browser.
  93.  
  94.   In both cases, ensure that the same parameters to make are passed as when
  95.   building the library.
  96.  
  97. (Un)installation
  98. ----------------
  99.  
  100.   To install the library:
  101.  
  102.                 $ make install
  103.  
  104.   Ensure that the same parameters to make are passed as when building the
  105.   library.
  106.  
  107.   To specify the installation prefix:
  108.  
  109.                 $ make install PREFIX=/path/to/prefix
  110.  
  111.   To specify a staging directory for packaging:
  112.  
  113.                 $ make install DESTDIR=/path/to/directory
  114.  
  115.   Items will be installed to $(DESTDIR)$(PREFIX)/
  116.  
  117.   To uninstall:
  118.  
  119.                 $ make uninstall
  120.  
  121. API documentation
  122. -----------------
  123.  
  124.   Use doxygen to auto-generate API documentation, thus:
  125.  
  126.                 $ make docs
  127.  
  128.   Then open build/docs/html/index.html in a web browser.
  129.  
  130.   The "examples" directory contains commented examples of how to use Hubbub.
  131.   The test driver code in test/ may also provide some useful pointers.
  132.  
  133. A note on character set aliases
  134. -------------------------------
  135.  
  136.   Hubbub uses an external mapping file to encode relationships between
  137.   character set names. This is the "Aliases" file. A copy may be found at
  138.   test/data/Aliases. The path to this file is required when calling
  139.   hubbub_initialise().
  140.  
  141.