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 14:16:20 +0900
commit980f8f8d990464bb4959578bb1f8c23acd3a7d30 (patch)
tree5e3660d4713db931060059c86ee0e5e6b78b64f5
parent61869d6a28ef61cb7b857f65036d2e59769b3a48 (diff)
downloadharfbuzz-tizen_5.0.tar.gz
harfbuzz-tizen_5.0.tar.bz2
harfbuzz-tizen_5.0.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.patch93
2 files changed, 94 insertions, 0 deletions
diff --git a/packaging/harfbuzz.spec b/packaging/harfbuzz.spec
index 0a9adeb..a1bbd12 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..a119d14
--- /dev/null
+++ b/patch/remove-icu-header-dependencies-from-harfbuzz-header.patch
@@ -0,0 +1,93 @@
+From 09a354de4071897ce04ff0943f0234308b284fb5 Mon Sep 17 00:00:00 2001
+From: Bowon Ryu <bowon.ryu@samsung.com>
+Date: Thu, 26 Dec 2019 14:03:31 +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: I7ddf9a2d4c8a92a9fc5d1f98a79bc386da7350ee
+---
+ src/hb-icu.cc | 17 ++++++++++-------
+ src/hb-icu.h | 6 ++----
+ 2 files changed, 12 insertions(+), 11 deletions(-)
+
+diff --git a/src/hb-icu.cc b/src/hb-icu.cc
+index c52e165..97735f2 100644
+--- a/src/hb-icu.cc
++++ b/src/hb-icu.cc
+@@ -38,28 +38,31 @@
+ #include <unicode/ustring.h>
+ #include <unicode/utf16.h>
+ #include <unicode/uversion.h>
++#include <unicode/uscript.h>
+
+
+ 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;
+
+ for (unsigned int i = 0; i < USCRIPT_CODE_LIMIT; 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;
+ }
+
+
+@@ -161,7 +164,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);
+ }
+
+ #if U_ICU_VERSION_MAJOR_NUM >= 49
+diff --git a/src/hb-icu.h b/src/hb-icu.h
+index 2db6a7b..47e718c 100644
+--- a/src/hb-icu.h
++++ b/src/hb-icu.h
+@@ -31,15 +31,13 @@
+
+ #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
+