aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias C. Berner <tcberner@FreeBSD.org>2021-09-24 16:54:57 +0000
committerTobias C. Berner <tcberner@FreeBSD.org>2021-09-24 17:32:01 +0000
commit51a8c14d5209368d6223649b7a3a919c9eccf8d4 (patch)
tree7180390bc7d395e1ff2825a0a6846d5fe73d0116
parentfa6b589dc7cf40675fad8764fd86788107e085e7 (diff)
downloadports-51a8c14d5209368d6223649b7a3a919c9eccf8d4.tar.gz
ports-51a8c14d5209368d6223649b7a3a919c9eccf8d4.zip
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: https://github.com/archlinux/svntogit-packages/commit/1db0f16aa08d3d7c13ecca8fd1c2c20c4b255504 PR: 251512 Reported by: jrm
-rw-r--r--editors/libreoffice/Makefile1
-rw-r--r--editors/libreoffice/files/patch-external_skia_UnpackedTarball__skia.mk6
-rw-r--r--editors/libreoffice/files/skia-freetype2.11.patch38
3 files changed, 43 insertions, 2 deletions
diff --git a/editors/libreoffice/Makefile b/editors/libreoffice/Makefile
index 07f8c3c63e42..a9e56764468c 100644
--- a/editors/libreoffice/Makefile
+++ b/editors/libreoffice/Makefile
@@ -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
diff --git a/editors/libreoffice/files/patch-external_skia_UnpackedTarball__skia.mk b/editors/libreoffice/files/patch-external_skia_UnpackedTarball__skia.mk
index a7214fab3033..f8239e909752 100644
--- a/editors/libreoffice/files/patch-external_skia_UnpackedTarball__skia.mk
+++ b/editors/libreoffice/files/patch-external_skia_UnpackedTarball__skia.mk
@@ -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))
+
diff --git a/editors/libreoffice/files/skia-freetype2.11.patch b/editors/libreoffice/files/skia-freetype2.11.patch
new file mode 100644
index 000000000000..aabdb1f8c6e1
--- /dev/null
+++ b/editors/libreoffice/files/skia-freetype2.11.patch
@@ -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:
+