From ac7616cd4014387c3811e97f176fcd26c8b4e0bf Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Mon, 28 Dec 2020 11:55:26 +0300 Subject: [PATCH] libcdr: Rebuild with ICU 68 --- mingw-w64-libcdr/PKGBUILD | 9 ++++++--- mingw-w64-libcdr/icu68.patch | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 mingw-w64-libcdr/icu68.patch diff --git a/mingw-w64-libcdr/PKGBUILD b/mingw-w64-libcdr/PKGBUILD index cdcf721c9e..94e57c4f60 100644 --- a/mingw-w64-libcdr/PKGBUILD +++ b/mingw-w64-libcdr/PKGBUILD @@ -4,7 +4,7 @@ _realname=libcdr pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.1.6 -pkgrel=3 +pkgrel=4 pkgdesc="libcdr is a library and a set of tools for reading and converting binary files produced by Corel DRAW (mingw-w64)" arch=('any') license=('MPL2') @@ -19,11 +19,14 @@ depends=("${MINGW_PACKAGE_PREFIX}-icu" "${MINGW_PACKAGE_PREFIX}-lcms2" "${MINGW_PACKAGE_PREFIX}-librevenge" "${MINGW_PACKAGE_PREFIX}-zlib") -source=("https://dev-www.libreoffice.org/src/${_realname}/${_realname}-${pkgver}.tar.xz") -sha256sums=('01cd00b04a030977e544433c2d127c997205332cd9b8e35ec0ee17110da7f861') +source=("https://dev-www.libreoffice.org/src/${_realname}/${_realname}-${pkgver}.tar.xz" + icu68.patch) +sha256sums=('01cd00b04a030977e544433c2d127c997205332cd9b8e35ec0ee17110da7f861' + 'c3fad07e04c343dd3eaf54400b121aebc9f589e9457ca0bbb7ec1606f39eab23') prepare() { cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/icu68.patch } build() { diff --git a/mingw-w64-libcdr/icu68.patch b/mingw-w64-libcdr/icu68.patch new file mode 100644 index 0000000000..559a5a9d68 --- /dev/null +++ b/mingw-w64-libcdr/icu68.patch @@ -0,0 +1,17 @@ +Regressed by https://github.com/unicode-org/icu/commit/c3fe7e09d844 + +libcdr_utils.cpp:111:35: error: use of undeclared identifier 'TRUE' + ucsdet_enableInputFilter(csd, TRUE); + ^ + +--- libcdr/src/lib/libcdr_utils.cpp.orig 2020-02-02 15:30:44 UTC ++++ libcdr/src/lib/libcdr_utils.cpp +@@ -108,7 +108,7 @@ static unsigned short getEncoding(const unsigned char + csd = ucsdet_open(&status); + if (U_FAILURE(status) || !csd) + return 0; +- ucsdet_enableInputFilter(csd, TRUE); ++ ucsdet_enableInputFilter(csd, true); + ucsdet_setText(csd, (const char *)buffer, bufferLength, &status); + if (U_FAILURE(status)) + throw libcdr::EncodingException();