summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-09-23 12:23:23 +0100
committerSam James <sam@gentoo.org>2024-09-23 12:23:23 +0100
commitad07271c36015504213352376e00e0df2ec81a2e (patch)
treeb1453e61d5cbf30f0aee90daebeb836b7a63097e /games-engines/scummvm
parentmedia-libs/ftgl: fix build w/ freetype-2.13.3 (diff)
downloadgentoo-ad07271c36015504213352376e00e0df2ec81a2e.tar.gz
gentoo-ad07271c36015504213352376e00e0df2ec81a2e.tar.bz2
gentoo-ad07271c36015504213352376e00e0df2ec81a2e.zip
games-engines/scummvm: fix build w/ freetype-2.13.3
Closes: https://bugs.gentoo.org/938014 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-engines/scummvm')
-rw-r--r--games-engines/scummvm/files/scummvm-2.8.1-freetype-2.13.3.patch59
-rw-r--r--games-engines/scummvm/scummvm-2.8.1-r1.ebuild4
2 files changed, 63 insertions, 0 deletions
diff --git a/games-engines/scummvm/files/scummvm-2.8.1-freetype-2.13.3.patch b/games-engines/scummvm/files/scummvm-2.8.1-freetype-2.13.3.patch
new file mode 100644
index 000000000000..3498c17857e0
--- /dev/null
+++ b/games-engines/scummvm/files/scummvm-2.8.1-freetype-2.13.3.patch
@@ -0,0 +1,59 @@
+https://bugs.gentoo.org/938014
+https://github.com/scummvm/scummvm/pull/6046
+
+From 391aa847c20bae4827fd8e868267a0cf4fc72df4 Mon Sep 17 00:00:00 2001
+From: antoniou79 <a.antoniou79@gmail.com>
+Date: Wed, 14 Aug 2024 22:50:32 +0300
+Subject: [PATCH] AGS: Support for FreeType 2.13.3 changes to FT_Outline struct
+
+FreeType 2.13.3 changed a few types of the struct members for FT_Outline struct to unsigned
+
+This is the relevant commit from the FreeType source (github):
+https://github.com/freetype/freetype/commit/2a7bb4596f566a34fd53932af0ef53b956459d25
+--- a/engines/ags/lib/freetype-2.1.3/autohint/ahglyph.cpp
++++ b/engines/ags/lib/freetype-2.1.3/autohint/ahglyph.cpp
+@@ -296,7 +296,11 @@ void ah_outline_save(AH_Outline outline, AH_Loader gloader) {
+ AH_Point point = outline->points;
+ AH_Point point_limit = point + outline->num_points;
+ FT_Vector *vec = gloader->current.outline.points;
++#if (FREETYPE_MAJOR * 1000 + FREETYPE_MINOR) * 1000 + FREETYPE_PATCH < 2013003
+ char *tag = gloader->current.outline.tags;
++#else
++ unsigned char *tag = gloader->current.outline.tags;
++#endif
+
+ /* we assume that the glyph loader has already been checked for storage */
+ for (; point < point_limit; point++, vec++, tag++) {
+@@ -408,8 +412,11 @@ FT_Error ah_outline_load(AH_Outline outline, FT_Face face) {
+
+ /* compute Bezier flags */
+ {
++#if (FREETYPE_MAJOR * 1000 + FREETYPE_MINOR) * 1000 + FREETYPE_PATCH < 2013003
+ char *tag = source->tags;
+-
++#else
++ unsigned char *tag = source->tags;
++#endif
+ for (point = points; point < point_limit; point++, tag++) {
+ switch (FT_CURVE_TAG(*tag)) {
+ case FT_CURVE_TAG_CONIC:
+@@ -457,12 +464,17 @@ FT_Error ah_outline_load(AH_Outline outline, FT_Face face) {
+ {
+ AH_Point *contour = outline->contours;
+ AH_Point *contour_limit = contour + outline->num_contours;
++#if (FREETYPE_MAJOR * 1000 + FREETYPE_MINOR) * 1000 + FREETYPE_PATCH < 2013003
+ short *end = source->contours;
+ short idx = 0;
++#else
++ unsigned short *end = source->contours;
++ unsigned short idx = 0;
++#endif
+
+ for (; contour < contour_limit; contour++, end++) {
+ contour[0] = points + idx;
+- idx = (short)(end[0] + 1);
++ idx = end[0] + 1;
+ }
+ }
+
+
diff --git a/games-engines/scummvm/scummvm-2.8.1-r1.ebuild b/games-engines/scummvm/scummvm-2.8.1-r1.ebuild
index 062895592e49..2d7c8e7c8b65 100644
--- a/games-engines/scummvm/scummvm-2.8.1-r1.ebuild
+++ b/games-engines/scummvm/scummvm-2.8.1-r1.ebuild
@@ -71,6 +71,10 @@ BDEPEND="
x86? ( dev-lang/nasm )
"
+PATCHES=(
+ "${FILESDIR}"/${P}-freetype-2.13.3.patch
+)
+
src_prepare() {
default