1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-25 09:34:11 +00:00

editors/libreoffice: fix build against freetype2-2.11

- Build was broken by the update of freetype2 to 2.11. This was not
  caught by the exp-run as libreoffice was updated after the exp-run
  had been done, but prior to the commit.

Obtained from:	1db0f16aa0
PR:		251512
Reported by:	jrm
This commit is contained in:
Tobias C. Berner 2021-09-24 18:54:57 +02:00
parent fa6b589dc7
commit 51a8c14d52
3 changed files with 43 additions and 2 deletions

View File

@ -329,6 +329,7 @@ post-patch:
pre-configure:
@${TOUCH} ${WRKSRC}/autogen.lastrun
${CP} ${FILESDIR}/skia-freetype2.11.patch ${WRKSRC}/external/skia
post-configure:
@${TOUCH} ${WRKSRC}/src.downloaded

View File

@ -1,9 +1,11 @@
--- external/skia/UnpackedTarball_skia.mk.orig 2021-02-05 14:00:19 UTC
--- external/skia/UnpackedTarball_skia.mk.orig 2021-09-08 17:53:20 UTC
+++ external/skia/UnpackedTarball_skia.mk
@@ -39,6 +39,7 @@ skia_patches := \
@@ -39,6 +39,8 @@ skia_patches := \
fast-png-write.patch.1 \
skia_sk_cpu_sse_level_0_by_default.patch.1 \
fix-warnings.patch.1 \
+ gfx-skia-skia-src-core-SkCpu.cpp.patch.0 \
+ skia-freetype2.11.patch \
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))

View File

@ -0,0 +1,38 @@
--- skia/src/ports/SkFontHost_FreeType_common.cpp.orig 2021-03-01 15:53:09.178606791 +0100
+++ skia/src/ports/SkFontHost_FreeType_common.cpp 2021-08-12 17:48:32.358901987 +0200
@@ -665,8 +665,13 @@
canvas->drawPaint(paint);
break;
}
+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
+ case FT_COLR_PAINTFORMAT_TRANSFORM: {
+ SkMatrix transform = ToSkMatrix(colrv1_paint.u.transform.affine);
+#else
case FT_COLR_PAINTFORMAT_TRANSFORMED: {
SkMatrix transform = ToSkMatrix(colrv1_paint.u.transformed.affine);
+#endif
canvas->concat(transform);
break;
@@ -760,12 +765,20 @@
traverse_result = colrv1_start_glyph(canvas, palette, face, paint.u.colr_glyph.glyphID,
FT_COLOR_NO_ROOT_TRANSFORM);
break;
+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
+ case FT_COLR_PAINTFORMAT_TRANSFORM:
+#else
case FT_COLR_PAINTFORMAT_TRANSFORMED:
+#endif
canvas->saveLayer(nullptr, nullptr);
// Traverse / draw operation will apply transform.
colrv1_draw_paint(canvas, palette, face, paint);
traverse_result =
+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
+ colrv1_traverse_paint(canvas, palette, face, paint.u.transform.paint);
+#else
colrv1_traverse_paint(canvas, palette, face, paint.u.transformed.paint);
+#endif
canvas->restore();
break;
case FT_COLR_PAINTFORMAT_ROTATE: