aboutsummaryrefslogtreecommitdiff
path: root/scripts/icu
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/icu')
-rw-r--r--scripts/icu/0001-disable-tests.patch57
-rw-r--r--scripts/icu/build.sh31
2 files changed, 88 insertions, 0 deletions
diff --git a/scripts/icu/0001-disable-tests.patch b/scripts/icu/0001-disable-tests.patch
new file mode 100644
index 0000000..e39989e
--- /dev/null
+++ b/scripts/icu/0001-disable-tests.patch
@@ -0,0 +1,57 @@
+--- configure.ac.orig 2019-10-21 17:47:38.842427296 +0000
++++ configure.ac 2019-10-21 17:49:33.787593270 +0000
+@@ -199,10 +199,6 @@ fi
+ #AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, true)
+ #AC_CHECK_PROG(STRIP, strip, strip, true)
+
+-# TODO(ICU-20301): Remove fallback to Python 2.
+-AC_CHECK_PROGS(PYTHON, python3 "py -3" python "py")
+-AC_SUBST(PYTHON)
+-
+ # Check for the platform make
+ AC_PATH_PROGS(U_MAKE, gmake gnumake, make)
+ AC_SUBST(U_MAKE)
+@@ -1412,40 +1408,9 @@ AC_CONFIG_FILES([icudefs.mk \
+ samples/cal/Makefile samples/layout/Makefile])
+ AC_OUTPUT
+
+-if test -z "$PYTHON";
+-then
+- echo "" > data/rules.mk
+- echo "" > test/testdata/rules.mk
+-else
+- if test -f "$srcdir/data/locales/root.txt";
+- then
+- echo "Spawning Python to generate data/rules.mk..."
+- PYTHONPATH="$srcdir/python" \
+- $PYTHON -m icutools.databuilder \
+- --mode gnumake \
+- --seqmode parallel \
+- --src_dir "$srcdir/data" \
+- --filter_file "$ICU_DATA_FILTER_FILE" \
+- $ICU_DATA_BUILDTOOL_OPTS \
+- > data/rules.mk
+- if test "$?" != "0"; then
+- AC_MSG_ERROR(Python failed to run; see above error.)
+- fi
+- else
+- echo "Not rebuilding data/rules.mk, assuming prebuilt data in data/in"
+- touch data/rules.mk
+- fi
+- echo "Spawning Python to generate test/testdata/rules.mk..."
+- PYTHONPATH="$srcdir/python" \
+- $PYTHON -m icutools.databuilder \
+- --mode gnumake \
+- --seqmode parallel \
+- --src_dir "$srcdir/test/testdata" \
+- > test/testdata/rules.mk
+- if test "$?" != "0"; then
+- AC_MSG_ERROR(Python failed to run; see above error.)
+- fi
+-fi
++# Disable tests
++echo "" > data/rules.mk
++echo "" > test/testdata/rules.mk
+
+ echo
+ echo "ICU for C/C++ $VERSION is ready to be built."
diff --git a/scripts/icu/build.sh b/scripts/icu/build.sh
new file mode 100644
index 0000000..812c4c4
--- /dev/null
+++ b/scripts/icu/build.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+name=icu
+version=65.1
+revision=0
+sources=(
+ "https://github.com/unicode-org/${name}/releases/download/release-${version//./-}/${name}4c-${version//./_}-src.tgz"
+)
+build_depends=(
+ "automake"
+ "autoconf"
+ "patch"
+)
+depends=(
+ "base"
+)
+
+function prepare() {
+ tar xf ${name}4c-${version//./_}-src.tgz
+ cd ${name}/source
+ patch -p0 -i "${build_script_root}/0001-disable-tests.patch"
+ autoreconf -i -f
+}
+
+function build() {
+ ./runConfigureICU Linux --prefix="${prefix}"
+ make -j${maxjobs}
+}
+
+function package() {
+ make install DESTDIR="${destdir}"
+}