From 60d19c30c2e2f81b532322250953335f16e89b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sun, 29 Nov 2015 16:58:42 +0100 Subject: [PATCH] icu: fix cross build --- srcpkgs/icu/patches/buffer_size_adjust.patch | 21 ++++++++++++++++++++ srcpkgs/icu/template | 4 +--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/icu/patches/buffer_size_adjust.patch diff --git a/srcpkgs/icu/patches/buffer_size_adjust.patch b/srcpkgs/icu/patches/buffer_size_adjust.patch new file mode 100644 index 00000000000..e41fb481948 --- /dev/null +++ b/srcpkgs/icu/patches/buffer_size_adjust.patch @@ -0,0 +1,21 @@ +The value of tmpResult may be -1 in which case setting +currentBufferSize = -1 leads to an error when trying to +allocate the buffers. + +If tmpResult is less than currentBufferSize simply double +currentBufferSize until parsing the flags succeeds. + +--- source/tools/pkgdata/pkgdata.cpp 2015-10-08 05:54:02.000000000 +0200 ++++ source/tools/pkgdata/pkgdata.cpp 2015-11-29 16:52:09.329794090 +0100 +@@ -862,7 +862,10 @@ + pkgDataFlags[i] = NULL; + } + } +- currentBufferSize = tmpResult; ++ if (tmpResult > currentBufferSize) ++ currentBufferSize = tmpResult; ++ else ++ currentBufferSize *= 2; + } else if (U_FAILURE(status)) { + fprintf(stderr,"Unable to open or read \"%s\" option file. status = %s\n", o->options, u_errorName(status)); + return -1; diff --git a/srcpkgs/icu/template b/srcpkgs/icu/template index 43838ea6956..68cc06b6394 100644 --- a/srcpkgs/icu/template +++ b/srcpkgs/icu/template @@ -1,7 +1,7 @@ # Template build file for 'icu'. pkgname=icu version=56.1 -revision=1 +revision=2 wrksrc=icu build_wrksrc=source build_style=gnu-configure @@ -13,8 +13,6 @@ license="ICU License /usr/share/licenses/icu/license.html" distfiles="http://download.icu-project.org/files/icu4c/${version}/icu4c-${version//./_}-src.tgz" checksum=3a64e9105c734dcf631c0b3ed60404531bce6c0f5a64bfe1a6402a4cc2314816 -nocross=yes - if [ "$CROSS_BUILD" ]; then configure_args+=" --with-cross-build=${XBPS_BUILDDIR}/${wrksrc}/host-icu" fi