Kaydet (Commit) 6b847089 authored tarafından Miklos Vajna's avatar Miklos Vajna

graphite: update to 1.3.12

Martin Hosken thinks all patches are redundant now, so drop them.

Change-Id: I062168416a1289b7f4dd42d8ae58b7df56a37712
Reviewed-on: https://gerrit.libreoffice.org/65074
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst 744c82af
......@@ -94,8 +94,8 @@ export GLM_SHA256SUM := d0312c360efe04dd048b3311fe375ff36f1993b4c2e3cb58c8106299
export GLM_TARBALL := bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip
export GPGME_SHA256SUM := 1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb
export GPGME_TARBALL := gpgme-1.9.0.tar.bz2
export GRAPHITE_SHA256SUM := aa5e58356cd084000609ebbd93fef456a1bc0ab9e46fea20e81552fb286232a9
export GRAPHITE_TARBALL := graphite2-minimal-1.3.10.tgz
export GRAPHITE_SHA256SUM := 0ebf80886bfc39e591c59bc975f4bb5dc717da7489eedfdb8acf84435261e7df
export GRAPHITE_TARBALL := graphite2-minimal-1.3.12.tgz
export HARFBUZZ_SHA256SUM := 3c592f86fa0da69e2e0e98cae9f5d5b61def3bb7948aa00ca45748f27fa545fd
export HARFBUZZ_TARBALL := harfbuzz-1.8.4.tar.bz2
export HSQLDB_SHA256SUM := d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370
......
......@@ -44,7 +44,6 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,graphite,\
UnpackedTarball/graphite/src/gr_segment \
UnpackedTarball/graphite/src/gr_slot \
UnpackedTarball/graphite/src/json \
UnpackedTarball/graphite/src/CachedFace \
UnpackedTarball/graphite/src/CmapCache \
UnpackedTarball/graphite/src/Code \
UnpackedTarball/graphite/src/Collider \
......@@ -60,9 +59,6 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,graphite,\
UnpackedTarball/graphite/src/NameTable \
UnpackedTarball/graphite/src/Pass \
UnpackedTarball/graphite/src/Position \
UnpackedTarball/graphite/src/SegCache \
UnpackedTarball/graphite/src/SegCacheEntry \
UnpackedTarball/graphite/src/SegCacheStore \
UnpackedTarball/graphite/src/Segment \
UnpackedTarball/graphite/src/Silf \
UnpackedTarball/graphite/src/Slot \
......
......@@ -11,12 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,graphite))
$(eval $(call gb_UnpackedTarball_set_tarball,graphite,$(GRAPHITE_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,graphite,0))
$(eval $(call gb_UnpackedTarball_add_patches,graphite,\
external/graphite/graphite2.issue1115.patch.1 \
external/graphite/graphite2.win64.patch.1 \
external/graphite/ubsan.patch \
))
# vim: set noet sw=4 ts=4:
--- graphite/src/Code.cpp
+++ graphite/src/Code.cpp
@@ -175,8 +175,8 @@ Machine::Code::Code(bool is_constraint,
bytecode_end,
pre_context,
rule_length,
- silf.numClasses(),
- face.glyphs().numAttrs(),
+ static_cast<uint16>(silf.numClasses()),
+ static_cast<uint16>(face.glyphs().numAttrs()),
face.numFeatures(),
{1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,255,
@@ -184,7 +184,7 @@ Machine::Code::Code(bool is_constraint,
1,1,1,1,1,1,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0, silf.numUser()}
+ 0,0,0,0,0,0,0, static_cast<byte>(silf.numUser())}
};
decoder dec(lims, *this, pt);
diff -urN graphite2-1.3.4.orig/src/inc/json.h graphite2-1.3.4/src/inc/json.h
--- graphite2-1.3.4.orig/src/inc/json.h 2015-12-22 14:25:46.403566441 +0100
+++ graphite2-1.3.4/src/inc/json.h 2015-12-22 14:26:13.439722846 +0100
@@ -85,6 +85,9 @@
json & operator << (string) throw();
json & operator << (number) throw();
json & operator << (integer) throw();
+#ifdef _WIN64
+ json & operator << (size_t) throw();
+#endif
json & operator << (long unsigned int d) throw();
json & operator << (boolean) throw();
json & operator << (_null_t) throw();
diff -urN graphite2-1.3.4.orig/src/inc/Main.h graphite2-1.3.4/src/inc/Main.h
--- graphite2-1.3.4.orig/src/inc/Main.h 2015-12-22 14:25:46.399566417 +0100
+++ graphite2-1.3.4/src/inc/Main.h 2015-12-22 14:26:13.439722846 +0100
@@ -25,6 +25,9 @@
of the License or (at your option) any later version.
*/
#pragma once
+#ifdef _WIN32
+#pragma warning(disable: 4510 4610)
+#endif
#include <cstdlib>
#include "graphite2/Types.h"
diff -urN graphite2-1.3.4.orig/src/json.cpp graphite2-1.3.4/src/json.cpp
--- graphite2-1.3.4.orig/src/json.cpp 2015-12-22 14:25:46.399566417 +0100
+++ graphite2-1.3.4/src/json.cpp 2015-12-22 14:26:13.439722846 +0100
@@ -133,6 +133,9 @@
}
json & json::operator << (json::integer d) throw() { context(seq); fprintf(_stream, "%ld", d); return *this; }
json & json::operator << (long unsigned d) throw() { context(seq); fprintf(_stream, "%ld", d); return *this; }
+#ifdef _WIN64
+json & json::operator << (size_t d) throw() { context(seq); fprintf(_stream, "%ld", d); return *this; }
+#endif
json & json::operator << (json::boolean b) throw() { context(seq); fputs(b ? "true" : "false", _stream); return *this; }
json & json::operator << (json::_null_t) throw() { context(seq); fputs("null",_stream); return *this; }
diff -urN graphite2-1.3.4.orig/src/Pass.cpp graphite2-1.3.4/src/Pass.cpp
--- graphite2-1.3.4.orig/src/Pass.cpp 2015-12-22 14:25:46.399566417 +0100
+++ graphite2-1.3.4/src/Pass.cpp 2015-12-22 14:26:13.439722846 +0100
@@ -568,7 +568,7 @@
if (r->rule->preContext > fsm.slots.context())
continue;
*fsm.dbgout << json::flat << json::object
- << "id" << r->rule - m_rules
+ << "id" << static_cast<size_t>(r->rule - m_rules)
<< "failed" << true
<< "input" << json::flat << json::object
<< "start" << objectid(dslot(&fsm.slots.segment, input_slot(fsm.slots, -r->rule->preContext)))
@@ -582,7 +582,7 @@
void Pass::dumpRuleEventOutput(const FiniteStateMachine & fsm, const Rule & r, Slot * const last_slot) const
{
*fsm.dbgout << json::item << json::flat << json::object
- << "id" << &r - m_rules
+ << "id" << static_cast<size_t>(&r - m_rules)
<< "failed" << false
<< "input" << json::flat << json::object
<< "start" << objectid(dslot(&fsm.slots.segment, input_slot(fsm.slots, 0)))
--- src/TtfUtil.cpp
+++ src/TtfUtil.cpp
@@ -1247,7 +1247,7 @@
void * GlyfLookup(const void * pGlyf, size_t nGlyfOffset, size_t nTableLen)
{
const uint8 * pByte = reinterpret_cast<const uint8 *>(pGlyf);
- if (nGlyfOffset + pByte < pByte || nGlyfOffset + sizeof(Sfnt::Glyph) >= nTableLen)
+ if (nGlyfOffset > nTableLen || sizeof(Sfnt::Glyph) >= nTableLen - nGlyfOffset)
return NULL;
return const_cast<uint8 *>(pByte + nGlyfOffset);
}
--- src/gr_face.cpp
+++ src/gr_face.cpp
@@ -87,7 +87,7 @@
Face *res = new Face(appFaceHandle, *ops);
if (res && load_face(*res, faceOptions))
- return static_cast<gr_face *>(res);
+ return reinterpret_cast<gr_face *>(res);
delete res;
return 0;
@@ -195,7 +195,7 @@
void gr_face_destroy(gr_face *face)
{
- delete face;
+ delete static_cast<Face *>(face);
}
--- src/gr_font.cpp
+++ src/gr_font.cpp
@@ -50,7 +50,7 @@
if (face == 0) return 0;
Font * const res = new Font(ppm, *face, appFontHandle, font_ops);
- return static_cast<gr_font*>(res);
+ return reinterpret_cast<gr_font*>(res);
}
gr_font* gr_make_font_with_advance_fn(float ppm/*pixels per em*/, const void* appFontHandle/*non-NULL*/, gr_advance_fn getAdvance, const gr_face * face/*needed for scaling*/)
@@ -61,7 +61,7 @@
void gr_font_destroy(gr_font *font)
{
- delete font;
+ delete static_cast<Font *>(font);
}
--- src/inc/Code.h
+++ src/inc/Code.h
@@ -162,7 +162,7 @@
{
if (_code && !_own)
{
- _code += dist / sizeof(instr);
+ _code += dist / int(sizeof(instr));
_data += dist;
}
}
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