summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-03-05 08:37:47 +0100
committerAron Budea <aron.budea@collabora.com>2021-03-24 15:03:08 +0100
commitff8f705922edf14b4e8960831919bfa063677a81 (patch)
tree4b3103975abc4cd75c4159c7fa3a709d093432c2
parentLOK: added missing PixelInvalidate method for currency list (diff)
downloadcore-ff8f705922edf14b4e8960831919bfa063677a81.tar.gz
core-ff8f705922edf14b4e8960831919bfa063677a81.zip
Upgrade to latest HarfBuzz 2.3.1
As a side-effect, this gets rid of some Clang -fsanitize=implicit-signed-integer-truncation warnings. The various external/harfbuzz/*.patch no longer applied and appear not to be necessary any more. (But a new external/harfbuzz/msvc.patch became necessary.) <https://dev-www.libreoffice.org/src/harfbuzz-2.3.1.tar.bz2> was downloaded from <https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-2.3.1.tar.bz2>, and HARFBUZZ_SHA256SUM in download.lst matches <https://www.freedesktop.org/ software/harfbuzz/release/harfbuzz-2.3.1.tar.bz2.sha256>. Reviewed-on: https://gerrit.libreoffice.org/68731 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit b7ddc514bff9bdf682abae537f990aa01dc2c0fb) Change-Id: Ic85acd14b4f488b3d88ce1bafc93be271928006e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112481 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
-rw-r--r--download.lst4
-rw-r--r--external/harfbuzz/UnpackedTarball_harfbuzz.mk13
-rw-r--r--external/harfbuzz/clang-cl.patch12
-rw-r--r--external/harfbuzz/harfbuzz-ios.patch29
-rw-r--r--external/harfbuzz/harfbuzz-rtti.patch11
-rw-r--r--external/harfbuzz/msvc.patch17
-rw-r--r--external/harfbuzz/ubsan.patch11
7 files changed, 20 insertions, 77 deletions
diff --git a/download.lst b/download.lst
index 11bfb8ead95b..389a98716bc3 100644
--- a/download.lst
+++ b/download.lst
@@ -118,8 +118,8 @@ export GPGME_SHA256SUM := 1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e64
export GPGME_TARBALL := gpgme-1.9.0.tar.bz2
export GRAPHITE_SHA256SUM := aa5e58356cd084000609ebbd93fef456a1bc0ab9e46fea20e81552fb286232a9
export GRAPHITE_TARBALL := graphite2-minimal-1.3.10.tgz
-export HARFBUZZ_SHA256SUM := 3c592f86fa0da69e2e0e98cae9f5d5b61def3bb7948aa00ca45748f27fa545fd
-export HARFBUZZ_TARBALL := harfbuzz-1.8.4.tar.bz2
+export HARFBUZZ_SHA256SUM := f205699d5b91374008d6f8e36c59e419ae2d9a7bb8c5d9f34041b9a5abcae468
+export HARFBUZZ_TARBALL := harfbuzz-2.3.1.tar.bz2
export HSQLDB_SHA256SUM := d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370
export HSQLDB_TARBALL := 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
export HUNSPELL_SHA256SUM := 57be4e03ae9dd62c3471f667a0d81a14513e314d4d92081292b90435944ff951
diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index 3a20f31e101f..48d7b450bc3a 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -16,18 +16,7 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,harfbuzz))
$(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
- external/harfbuzz/clang-cl.patch \
- external/harfbuzz/ubsan.patch \
-))
-
-ifneq ($(ENABLE_RUNTIME_OPTIMIZATIONS),TRUE)
-$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
- external/harfbuzz/harfbuzz-rtti.patch \
-))
-endif
-
-$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
- external/harfbuzz/harfbuzz-ios.patch \
+ external/harfbuzz/msvc.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/harfbuzz/clang-cl.patch b/external/harfbuzz/clang-cl.patch
deleted file mode 100644
index 9fbeee4114d8..000000000000
--- a/external/harfbuzz/clang-cl.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/hb-common.h
-+++ src/hb-common.h
-@@ -346,7 +346,9 @@
- *
- * https://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html
- */
-+#if !defined _MSC_VER /* avoid clang-cl -Wmicrosoft-enum-value */
- _HB_SCRIPT_MAX_VALUE = HB_TAG_MAX, /*< skip >*/
-+#endif
- _HB_SCRIPT_MAX_VALUE_SIGNED = HB_TAG_MAX_SIGNED /*< skip >*/
-
- } hb_script_t;
diff --git a/external/harfbuzz/harfbuzz-ios.patch b/external/harfbuzz/harfbuzz-ios.patch
deleted file mode 100644
index 215800e5ab57..000000000000
--- a/external/harfbuzz/harfbuzz-ios.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/hb-coretext.cc
-+++ src/hb-coretext.cc
-@@ -167,7 +167,7 @@
- if (CFStringHasPrefix (cg_postscript_name, CFSTR (".SFNSText")) ||
- CFStringHasPrefix (cg_postscript_name, CFSTR (".SFNSDisplay")))
- {
--#if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
-+#if !defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (MAC_OS_X_VERSION_MIN_REQUIRED < 1080)
- # define kCTFontUIFontSystem kCTFontSystemFontType
- # define kCTFontUIFontEmphasizedSystem kCTFontEmphasizedSystemFontType
- #endif
-@@ -217,7 +217,7 @@
- }
-
- CFURLRef original_url = nullptr;
--#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-+#if !defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (MAC_OS_X_VERSION_MIN_REQUIRED < 1060)
- ATSFontRef atsFont;
- FSRef fsref;
- OSStatus status;
-@@ -240,7 +240,7 @@
- * process in Blink. This can be detected by the new file URL location
- * that the newly found font points to. */
- CFURLRef new_url = nullptr;
--#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-+#if !defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (MAC_OS_X_VERSION_MIN_REQUIRED < 1060)
- atsFont = CTFontGetPlatformFont (new_ct_font, NULL);
- status = ATSFontGetFileReference (atsFont, &fsref);
- if (status == noErr)
diff --git a/external/harfbuzz/harfbuzz-rtti.patch b/external/harfbuzz/harfbuzz-rtti.patch
deleted file mode 100644
index 5d1cfb4959ae..000000000000
--- a/external/harfbuzz/harfbuzz-rtti.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure
-+++ configure
-@@ -19012,7 +19012,7 @@
- # even in the cases where we DO link to libstdc++.
- # Put -fno-rtti before $CXXFLAGS such that users can re-enable it
- # by overriding CXXFLAGS.
-- CXXFLAGS="-fno-rtti $CXXFLAGS -fno-exceptions -fno-threadsafe-statics"
-+ CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-threadsafe-statics"
-
- # Assorted warnings
- CXXFLAGS="$CXXFLAGS -Wcast-align"
diff --git a/external/harfbuzz/msvc.patch b/external/harfbuzz/msvc.patch
new file mode 100644
index 000000000000..f6796a99bf8e
--- /dev/null
+++ b/external/harfbuzz/msvc.patch
@@ -0,0 +1,17 @@
+--- src/hb-atomic.hh
++++ src/hb-atomic.hh
+@@ -85,11 +85,11 @@
+ #define hb_atomic_int_impl_add(AI, V) (reinterpret_cast<std::atomic<int> *> (AI)->fetch_add ((V), std::memory_order_acq_rel))
+ #define hb_atomic_int_impl_set_relaxed(AI, V) (reinterpret_cast<std::atomic<int> *> (AI)->store ((V), std::memory_order_relaxed))
+ #define hb_atomic_int_impl_set(AI, V) (reinterpret_cast<std::atomic<int> *> (AI)->store ((V), std::memory_order_release))
+-#define hb_atomic_int_impl_get_relaxed(AI) (reinterpret_cast<std::atomic<int> *> (AI)->load (std::memory_order_relaxed))
+-#define hb_atomic_int_impl_get(AI) (reinterpret_cast<std::atomic<int> *> (AI)->load (std::memory_order_acquire))
++#define hb_atomic_int_impl_get_relaxed(AI) (reinterpret_cast<std::atomic<int> const *> (AI)->load (std::memory_order_relaxed))
++#define hb_atomic_int_impl_get(AI) (reinterpret_cast<std::atomic<int> const *> (AI)->load (std::memory_order_acquire))
+
+ #define hb_atomic_ptr_impl_set_relaxed(P, V) (reinterpret_cast<std::atomic<void*> *> (P)->store ((V), std::memory_order_relaxed))
+-#define hb_atomic_ptr_impl_get_relaxed(P) (reinterpret_cast<std::atomic<void*> *> (P)->load (std::memory_order_relaxed))
++#define hb_atomic_ptr_impl_get_relaxed(P) (reinterpret_cast<std::atomic<void*> const *> (P)->load (std::memory_order_relaxed))
+ #define hb_atomic_ptr_impl_get(P) (reinterpret_cast<std::atomic<void*> *> (P)->load (std::memory_order_acquire))
+ static inline bool
+ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N)
diff --git a/external/harfbuzz/ubsan.patch b/external/harfbuzz/ubsan.patch
deleted file mode 100644
index fb299316af9d..000000000000
--- a/external/harfbuzz/ubsan.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/hb-ot-hmtx-table.hh
-+++ src/hb-ot-hmtx-table.hh
-@@ -263,7 +263,7 @@ struct hmtxvmtx
- return default_advance;
- }
-
-- return table->longMetric[MIN (glyph, (uint32_t) num_advances - 1)].advance;
-+ return static_cast<OT::LongMetric const *>(table->longMetric)[MIN (glyph, (uint32_t) num_advances - 1)].advance;
- }
-
- inline unsigned int get_advance (hb_codepoint_t glyph,