Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Intl: Automatically download ICU if requested. Reduce size. Keep --with-intl=none the default. #8719

Closed
wants to merge 13 commits into from

Commits on Dec 13, 2014

  1. build: i18n: Autodownload ICU, Add a test.

    This is to implement
    nodejs#7676 (comment)
    
    * make `--with-intl=none` the default
     * Download, verify (md5), unpack ICU's zip if not there
     * update docs
    * add a test
    
    There's a "list" of URLs being used, but right now only the
    first is picked up. The logic works something like this:
    
    * if there is no directory `deps/icu`,
     * if no zip file (currently `icu4c-54_1-src.zip`),
      * download zip file (icu-project.org -> sf.net)
     * verify the MD5 sum of the zipfile
      * if bad, print error and exit
     * unpack the zipfile into `deps/icu`
    * if `deps/icu` now exists, use it, else fail with help text
    
    Also:
    * refactor some code into tools/configure.d/nodedownload.py
    * add `intl-none` option for `vcbuild.bat`
    
    To rebuild `deps/icu-small` - (not currently checked in)
    ```
    bash tools/icu/prepare-icu-source.sh
    ```
    
    Reduce space by about 1MB with ICU 54 (over without this patch).
    Also trims a few other source files, but only conditional on the exact ICU
    version used. This is to future-proof - a file that is unneeded now may
    be needed in future ICUs.
    srl295 committed Dec 13, 2014
    Configuration menu
    Copy the full SHA
    7cb4aad View commit details
    Browse the repository at this point in the history
  2. build: i18n: add configure --with-icu-source=...

    Usage:
     * `--with-icu-source=/path/to/my/other/icu`
     * `--with-icu-source=/path/to/icu54.zip`
     * `--with-icu-source=/path/to/icu54.tgz`
     * `--with-icu-source=http://example.com/icu54.tar.bz2`
    
    this fixes srl295/node#11
    srl295 committed Dec 13, 2014
    Configuration menu
    Copy the full SHA
    c1e66b3 View commit details
    Browse the repository at this point in the history
  3. build: i18n: add --with-icu-locales option

    this lets you choose which locales are used in the `small-icu` case
    
    Example:
    
      configure --with-intl=small-icu  --with-icu-locales=tlh,grc,nl
    
    Note that the unit test tests/simple/test-intl.js hasn't been updated
    yet.
    
    (Also note that as of this writing, neither Klingon nor Ancient Greek
    are in upstream CLDR data. Serving suggestion only.)
    
    This completely and totally fixes #10 :octocat:
    srl295 committed Dec 13, 2014
    Configuration menu
    Copy the full SHA
    7dc107c View commit details
    Browse the repository at this point in the history
  4. build: i18n: fix target builds

    With dependency fix as suggested by @misterdjules
    fixes srl295/node#12
    srl295 committed Dec 13, 2014
    Configuration menu
    Copy the full SHA
    b048092 View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2014

  1. build: make nodedownload.py work with Python 2.6

    Julien Gilli committed Dec 17, 2014
    Configuration menu
    Copy the full SHA
    5891aad View commit details
    Browse the repository at this point in the history
  2. build: i18n: Don't use hard coded ../../out paths on windows

    This was suggested by @misterdjules as it causes test failures.
    With this fix, "out" is no longer created on windows and
    
          python tools/test.py simple
    
    .. can run properly.
    srl295 committed Dec 17, 2014
    Configuration menu
    Copy the full SHA
    8d04281 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #18 from misterdjules/srl-v0.12-autoicu-nodedownlo…

    …ad-python-26
    
    build: make nodedownload.py work with Python 2.6 👍
    srl295 committed Dec 17, 2014
    Configuration menu
    Copy the full SHA
    21e05e2 View commit details
    Browse the repository at this point in the history
  4. build: fix ICU support build on SmartOS

    Julien Gilli committed Dec 17, 2014
    Configuration menu
    Copy the full SHA
    52f6f77 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #19 from misterdjules/fix-smartos-icu-small-build

    build: fix ICU support build on SmartOS (and probably solaris-gcc also)
    srl295 committed Dec 17, 2014
    Configuration menu
    Copy the full SHA
    d68aa8f View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2014

  1. build: i18n: cleanup and respond to review

    Respond to review comments from @misterdjules:
    
    * Remove the prepare-icu-source.sh mechanism for creating
      an embedded deps/icu-small as per
      7cb4aad - it was not
      currently used and thus deadwood.
    
    * Updated README.md to clarify some of the options:
      that 'none' is the default for --with-intl, and that
      --with-icu-source works with 'small-icu'
    
    * clarified the test-intl.js test case
    
    * cleaned up and added documentation in configure and in nodedownload.py
    srl295 committed Dec 18, 2014
    Configuration menu
    Copy the full SHA
    f758028 View commit details
    Browse the repository at this point in the history
  2. build: i18n: Don't auto-download ICU unless --download=all

    Instead of downloading ICU if missing from `deps/icu`, just print a warning
    unless either `--download=all` or `--download=icu` is set.
    
    Add some generic scaffolding in case other modules end up in the same boat
    in the future.
    
    It's harmless to pass `--download=xyzzy`, so, future proof
    (at least until some xyzzy dependency is integrated).
    srl295 committed Dec 18, 2014
    Configuration menu
    Copy the full SHA
    c4a22f0 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #21 from srl295/srl-v0.12-downloadopt

    build: i18n: Don't auto-download ICU unless --download=all
    
    Thanks @trevnorris for taking a look.
    srl295 committed Dec 18, 2014
    Configuration menu
    Copy the full SHA
    d1c4872 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2015

  1. build: i18n: make distclean should remove deps/icu stuff

    With this change, `make distclean` will
    delete these items, which aren't in the source repo:
    * `icu_config.gypi`
    * `deps/icu` - the ICU source tree
    * `deps/icu-tmp` - the temporary download/unpack work area
    * `deps/icu4c*.tgz deps/icu4c*.zip` - ICU source tarballs
    srl295 committed Jan 2, 2015
    Configuration menu
    Copy the full SHA
    9828792 View commit details
    Browse the repository at this point in the history