From 84235478ef65c4e3d5746a00aa1e48fc260a713f Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Tue, 30 Dec 2014 07:55:42 -0500 Subject: [PATCH] Download and install libicu-dev without using sudo We tell apt-get to download it to vendor/apt and then install it into a vendor/icu directory. We should be able to just specify --with-icu-dir, but apparently Ruby 2.0 (but not 1.9 or 2.1 or 2.2) has a bug that requires us to use --with-icu-include/--with-icu-lib instead. Otherwise it can't find the ICU libraries. --- .travis.yml | 3 ++- script/vendor-deb | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 script/vendor-deb diff --git a/.travis.yml b/.travis.yml index 0bb60273..5fc60617 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,8 @@ before_install: - git fetch origin v2.0.0:v2.0.0 - git fetch origin test/attributes:test/attributes - git fetch origin test/master:test/master - - sudo apt-get install libicu-dev -y + - script/vendor-deb libicu48 libicu-dev + - bundle config build.charlock_holmes --with-icu-include=$(pwd)/vendor/debs/include --with-icu-lib=$(pwd)/vendor/debs/lib - git submodule init - git submodule sync --quiet - script/fast-submodule-update diff --git a/script/vendor-deb b/script/vendor-deb new file mode 100755 index 00000000..ebad3e76 --- /dev/null +++ b/script/vendor-deb @@ -0,0 +1,13 @@ +#!/bin/sh + +set -ex + +cd "$(dirname "$0")/.." + +mkdir -p vendor/apt vendor/debs + +(cd vendor/apt && apt-get --assume-yes download "$@") + +for deb in vendor/apt/*.deb; do + ar p $deb data.tar.gz | tar -vzxC vendor/debs --strip-components=2 +done