libcdr: icu 68 fix

This commit is contained in:
Danny Rawlins 2020-11-15 00:40:05 +11:00
parent 4f5e964aaa
commit 9308add1c1
3 changed files with 35 additions and 5 deletions

View File

@ -1,5 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3y/jfCvb4qEHhz3FC7gzxage6i26NsaEiZIzb3RkZxfHtAwauQSbjBE6WnttEN7f1Kz/TWvYrf5VtGDCmW3EFwY=
SHA256 (Pkgfile) = 47813fcb1dbfb2f061626c7f2b9cbcee8c19c14df3bdaaadcf4445ed59afad95
RWSagIOpLGJF37iHX5w6f5eY8mnVlS1/NunJDeeYB+TkygosvxvwOE2YmV35jrTlDd4d6KCrys6N3wHRtNHyZffH+R36kJvWHQ8=
SHA256 (Pkgfile) = aa71076f842a0ac69c06416ee0a3b57a4c569449d1d2688b29c605010443f20b
SHA256 (.footprint) = 7e43c2b2d7455d5fb28c7d445017ec62cfb52d7249f302898490c6679c6ebb21
SHA256 (libcdr-0.1.6.tar.xz) = 01cd00b04a030977e544433c2d127c997205332cd9b8e35ec0ee17110da7f861
SHA256 (libcdr-0.1.6-icu-68.patch) = 4c67e11090333c2d46403bb285f020fbca1c6f0b998d9e8b447dfe0b1206e3e7

View File

@ -6,13 +6,15 @@
name=libcdr
version=0.1.6
release=1
source=(https://dev-www.libreoffice.org/src/$name/$name-$version.tar.xz)
source=(https://dev-www.libreoffice.org/src/$name/$name-$version.tar.xz
libcdr-0.1.6-icu-68.patch)
build() {
cd $name-$version
[ $(pkginfo -i | awk '/^icu / {split($2,a,"."); print a[1]}') -ge 68 ] && \
patch -p1 -i $SRC/libcdr-0.1.6-icu-68.patch
./configure --prefix=/usr \
--without-docs \
--without-tests
--without-docs
make
make DESTDIR=$PKG install
}

View File

@ -0,0 +1,27 @@
From 0dc41f8f6bd099813acb3972f75e4bbb2a5cdb2d Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Fri, 30 Oct 2020 14:28:08 +0100
Subject: [PATCH] Fix build with icu-68.1
icu-68.1 removed public macro definitions for TRUE and FALSE
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
---
src/lib/libcdr_utils.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/libcdr_utils.cpp b/src/lib/libcdr_utils.cpp
index 09ab42e..250f0a0 100644
--- a/src/lib/libcdr_utils.cpp
+++ b/src/lib/libcdr_utils.cpp
@@ -108,7 +108,7 @@ static unsigned short getEncoding(const unsigned char *buffer, unsigned bufferLe
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();
--
2.29.2