summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 6104e80..2aa1e7a 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
+