Kaydet (Commit) b7ddc514 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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>.

Change-Id: Ic85acd14b4f488b3d88ce1bafc93be271928006e
Reviewed-on: https://gerrit.libreoffice.org/68731
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 6d471576
......@@ -96,8 +96,8 @@ export GPGME_SHA256SUM := 1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e64
export GPGME_TARBALL := gpgme-1.9.0.tar.bz2
export GRAPHITE_SHA256SUM := d47d387161db7f7ebade1920aa7cbdc797e79772597d8b55e80b58d1071bcc36
export GRAPHITE_TARBALL := graphite2-minimal-1.3.13.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
......
......@@ -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:
--- 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;
--- 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)
--- 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"
--- 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)
--- 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,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment