mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
libsdl2-ttf: Upgrade to 2.20.2
Fix build with clang16 while here Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
788e57484a
commit
d28518a1d5
|
|
@ -0,0 +1,69 @@
|
|||
From 6c52693d264ca3dc8e15a92f56cf3a636639bb6c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
|
||||
Date: Fri, 28 Oct 2022 22:17:15 +0300
|
||||
Subject: [PATCH] freetype: Fix function signatures to match without casts
|
||||
|
||||
Clang 16 has got a new stricter warning for casts of function types
|
||||
(see https://github.com/llvm/llvm-project/commit/1aad641c793090b4d036c03e737df2ebe2c32c57).
|
||||
|
||||
This new warning gets included as part of the existing error
|
||||
diagnostic setting of -Wcast-function-type.
|
||||
|
||||
This fixes errors like these:
|
||||
|
||||
../src/hb-ft.cc:1011:34: error: cast from 'void (*)(FT_Face)' (aka 'void (*)(FT_FaceRec_ *)') to 'FT_Generic_Finalizer' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
|
||||
ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Upstream-Status: Backport [https://github.com/harfbuzz/harfbuzz/commit/d88269c827895b38f99f7cf741fa60210d4d5169]
|
||||
---
|
||||
src/hb-ft.cc | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/hb-ft.cc b/src/hb-ft.cc
|
||||
index a6beb9f0f..a35e75b18 100644
|
||||
--- a/src/hb-ft.cc
|
||||
+++ b/src/hb-ft.cc
|
||||
@@ -729,8 +729,9 @@ hb_ft_face_create_referenced (FT_Face ft_face)
|
||||
}
|
||||
|
||||
static void
|
||||
-hb_ft_face_finalize (FT_Face ft_face)
|
||||
+hb_ft_face_finalize (void *arg)
|
||||
{
|
||||
+ FT_Face ft_face = (FT_Face) arg;
|
||||
hb_face_destroy ((hb_face_t *) ft_face->generic.data);
|
||||
}
|
||||
|
||||
@@ -762,7 +763,7 @@ hb_ft_face_create_cached (FT_Face ft_face)
|
||||
ft_face->generic.finalizer (ft_face);
|
||||
|
||||
ft_face->generic.data = hb_ft_face_create (ft_face, nullptr);
|
||||
- ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
|
||||
+ ft_face->generic.finalizer = hb_ft_face_finalize;
|
||||
}
|
||||
|
||||
return hb_face_reference ((hb_face_t *) ft_face->generic.data);
|
||||
@@ -949,8 +950,9 @@ get_ft_library ()
|
||||
}
|
||||
|
||||
static void
|
||||
-_release_blob (FT_Face ft_face)
|
||||
+_release_blob (void *arg)
|
||||
{
|
||||
+ FT_Face ft_face = (FT_Face) arg;
|
||||
hb_blob_destroy ((hb_blob_t *) ft_face->generic.data);
|
||||
}
|
||||
|
||||
@@ -1032,7 +1034,7 @@ hb_ft_font_set_funcs (hb_font_t *font)
|
||||
#endif
|
||||
|
||||
ft_face->generic.data = blob;
|
||||
- ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob;
|
||||
+ ft_face->generic.finalizer = _release_blob;
|
||||
|
||||
_hb_ft_font_set_funcs (font, ft_face, true);
|
||||
hb_ft_font_set_load_flags (font, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING);
|
||||
--
|
||||
2.39.2
|
||||
|
||||
|
|
@ -2,17 +2,18 @@ SUMMARY = "Simple DirectMedia Layer truetype font library"
|
|||
SECTION = "libs"
|
||||
DEPENDS = "libsdl2 freetype virtual/egl"
|
||||
LICENSE = "Zlib"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=771dca8728b18d39b130e19b36514371"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41cbf59bdea749fe34c1af6d3615f68"
|
||||
|
||||
SRC_URI = " \
|
||||
git://github.com/libsdl-org/SDL_ttf.git;branch=release-2.20.x;protocol=https \
|
||||
git://github.com/libsdl-org/freetype.git;branch=VER-2-12-1-SDL;destsuffix=git/external/freetype;name=freetype;protocol=https \
|
||||
git://github.com/libsdl-org/harfbuzz.git;branch=2.9.1-SDL;destsuffix=git/external/harfbuzz;name=harfbuzz;protocol=https \
|
||||
file://0001-freetype-Fix-function-signatures-to-match-without-ca.patch;patchdir=external/harfbuzz \
|
||||
file://automake_foreign.patch \
|
||||
"
|
||||
SRCREV = "0a652b598625d16ea7016665095cb1e9bce9ef4f"
|
||||
SRCREV = "89d1692fd8fe91a679bb943d377bfbd709b52c23"
|
||||
SRCREV_freetype = "6fc77cee03e078e97afcee0c0e06a2d3274b9a29"
|
||||
SRCREV_harfbuzz = "6022fe2f68d028ee178284f297b3902ffdf65b03"
|
||||
SRCREV_harfbuzz = "43931e3e596c04044861770b831c8f9452e2d3b0"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user