icu: fix cross build

This commit is contained in:
Jürgen Buchmüller 2015-11-29 16:58:42 +01:00
parent 521944abbf
commit 60d19c30c2
2 changed files with 22 additions and 3 deletions

View File

@ -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;

View File

@ -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