summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBowon Ryu <bowon.ryu@samsung.com>2019-12-17 17:38:52 +0900
committerBowon Ryu <bowon.ryu@samsung.com>2019-12-26 11:41:26 +0900
commitb2330cd49c8f0202e998e5a555acabba98c4f486 (patch)
tree36865b1fe945791e0e954b540dd534b955a6f5e6
parent07c99da7de85099bd55206eac12cf3b8d9c16ffe (diff)
downloadharfbuzz-tizen_5.5_tv.tar.gz
harfbuzz-tizen_5.5_tv.tar.bz2
harfbuzz-tizen_5.5_tv.zip
Harfbuzz header include icu header that is not Tizen public API. In order to remove icu header from rootstrap, icu header dependencies should be removed. This patch only applies to build-root for harfbuzz upstream compatibility. Change-Id: Ic35645b2aee2a886f3ae594d86bbbbd17c8f05e0 Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
-rw-r--r--packaging/harfbuzz.spec1
-rw-r--r--patch/remove-icu-header-dependencies-from-harfbuzz-header.patch98
2 files changed, 99 insertions, 0 deletions
diff --git a/packaging/harfbuzz.spec b/packaging/harfbuzz.spec
index 93dcd56..f2d623d 100644
--- a/packaging/harfbuzz.spec
+++ b/packaging/harfbuzz.spec
@@ -45,6 +45,7 @@ HarfBuzz is an OpenType text shaping engine.
%prep
%setup -q
cp %{SOURCE1001} .
+patch -p1 < %{_builddir}/%{name}-%{version}/patch/remove-icu-header-dependencies-from-harfbuzz-header.patch
%build
%configure \
diff --git a/patch/remove-icu-header-dependencies-from-harfbuzz-header.patch b/patch/remove-icu-header-dependencies-from-harfbuzz-header.patch
new file mode 100644
index 0000000..9bec5d5
--- /dev/null
+++ b/patch/remove-icu-header-dependencies-from-harfbuzz-header.patch
@@ -0,0 +1,98 @@
+From 6bce537e813081511d7899a235872ff794dbce1a Mon Sep 17 00:00:00 2001
+From: Jongmin Lee <jm105.lee@samsung.com>
+Date: Wed, 4 Dec 2019 09:54:01 +0900
+Subject: [PATCH] remove icu header dependencies from harfbuzz header
+
+Harfbuzz header include icu header that is not Tizen public API.
+In order to remove icu header from rootstrap, icu header dependencies
+should be removed.
+
+@tizen_fix
+
+Change-Id: Ic73ee83de294c09fe3bf047eb3ed7f7c85bdc8c3
+---
+ src/hb-icu.cc | 17 ++++++++++-------
+ src/hb-icu.h | 5 ++---
+ 2 files changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/src/hb-icu.cc b/src/hb-icu.cc
+index c26c91d..7e89f78 100644
+--- a/src/hb-icu.cc
++++ b/src/hb-icu.cc
+@@ -38,6 +38,7 @@
+ #include <unicode/ustring.h>
+ #include <unicode/utf16.h>
+ #include <unicode/uversion.h>
++#include <unicode/uscript.h>
+
+
+ /**
+@@ -51,26 +52,28 @@
+
+
+ hb_script_t
+-hb_icu_script_to_script (UScriptCode script)
++hb_icu_script_to_script (unsigned int numScript)
+ {
++ UScriptCode script = (UScriptCode) numScript;
++
+ if (unlikely (script == USCRIPT_INVALID_CODE))
+ return HB_SCRIPT_INVALID;
+
+ return hb_script_from_string (uscript_getShortName (script), -1);
+ }
+
+-UScriptCode
++unsigned int
+ hb_icu_script_from_script (hb_script_t script)
+ {
+ if (unlikely (script == HB_SCRIPT_INVALID))
+- return USCRIPT_INVALID_CODE;
++ return (unsigned int) USCRIPT_INVALID_CODE;
+
+ unsigned int numScriptCode = 1 + u_getIntPropertyMaxValue (UCHAR_SCRIPT);
+ for (unsigned int i = 0; i < numScriptCode; i++)
+- if (unlikely (hb_icu_script_to_script ((UScriptCode) i) == script))
+- return (UScriptCode) i;
++ if (unlikely (hb_icu_script_to_script (i) == script))
++ return i;
+
+- return USCRIPT_UNKNOWN;
++ return (unsigned int) USCRIPT_UNKNOWN;
+ }
+
+
+@@ -153,7 +156,7 @@ hb_icu_unicode_script (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ if (unlikely (U_FAILURE (status)))
+ return HB_SCRIPT_UNKNOWN;
+
+- return hb_icu_script_to_script (scriptCode);
++ return hb_icu_script_to_script ((unsigned int) scriptCode);
+ }
+
+ static hb_bool_t
+diff --git a/src/hb-icu.h b/src/hb-icu.h
+index 2db6a7b..dc6d7aa 100644
+--- a/src/hb-icu.h
++++ b/src/hb-icu.h
+@@ -31,15 +31,14 @@
+
+ #include "hb.h"
+
+-#include <unicode/uscript.h>
+
+ HB_BEGIN_DECLS
+
+
+ HB_EXTERN hb_script_t
+-hb_icu_script_to_script (UScriptCode script);
++hb_icu_script_to_script (unsigned int numScript);
+
+-HB_EXTERN UScriptCode
++HB_EXTERN unsigned int
+ hb_icu_script_from_script (hb_script_t script);
+
+
+--
+2.7.4
+