diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-03-01 21:33:54 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-03-02 00:31:38 -0800 |
| commit | d28518a1d5c673d6523645c2fc73051f9737c526 (patch) | |
| tree | c1873c01c0cd25cd3ef32e63c3e47c4257b4cde8 | |
| parent | 788e57484a4af565bd44221c09eacf41c5310fca (diff) | |
| download | meta-openembedded-d28518a1d5c673d6523645c2fc73051f9737c526.tar.gz | |
libsdl2-ttf: Upgrade to 2.20.2
Fix build with clang16 while here
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-graphics/libsdl/libsdl2-ttf/0001-freetype-Fix-function-signatures-to-match-without-ca.patch | 69 | ||||
| -rw-r--r-- | meta-oe/recipes-graphics/libsdl/libsdl2-ttf_2.20.2.bb (renamed from meta-oe/recipes-graphics/libsdl/libsdl2-ttf_2.20.1.bb) | 7 |
2 files changed, 73 insertions, 3 deletions
diff --git a/meta-oe/recipes-graphics/libsdl/libsdl2-ttf/0001-freetype-Fix-function-signatures-to-match-without-ca.patch b/meta-oe/recipes-graphics/libsdl/libsdl2-ttf/0001-freetype-Fix-function-signatures-to-match-without-ca.patch new file mode 100644 index 0000000000..8cb76c35d6 --- /dev/null +++ b/meta-oe/recipes-graphics/libsdl/libsdl2-ttf/0001-freetype-Fix-function-signatures-to-match-without-ca.patch | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | From 6c52693d264ca3dc8e15a92f56cf3a636639bb6c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st> | ||
| 3 | Date: Fri, 28 Oct 2022 22:17:15 +0300 | ||
| 4 | Subject: [PATCH] freetype: Fix function signatures to match without casts | ||
| 5 | |||
| 6 | Clang 16 has got a new stricter warning for casts of function types | ||
| 7 | (see https://github.com/llvm/llvm-project/commit/1aad641c793090b4d036c03e737df2ebe2c32c57). | ||
| 8 | |||
| 9 | This new warning gets included as part of the existing error | ||
| 10 | diagnostic setting of -Wcast-function-type. | ||
| 11 | |||
| 12 | This fixes errors like these: | ||
| 13 | |||
| 14 | ../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] | ||
| 15 | ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize; | ||
| 16 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 17 | |||
| 18 | Upstream-Status: Backport [https://github.com/harfbuzz/harfbuzz/commit/d88269c827895b38f99f7cf741fa60210d4d5169] | ||
| 19 | --- | ||
| 20 | src/hb-ft.cc | 10 ++++++---- | ||
| 21 | 1 file changed, 6 insertions(+), 4 deletions(-) | ||
| 22 | |||
| 23 | diff --git a/src/hb-ft.cc b/src/hb-ft.cc | ||
| 24 | index a6beb9f0f..a35e75b18 100644 | ||
| 25 | --- a/src/hb-ft.cc | ||
| 26 | +++ b/src/hb-ft.cc | ||
| 27 | @@ -729,8 +729,9 @@ hb_ft_face_create_referenced (FT_Face ft_face) | ||
| 28 | } | ||
| 29 | |||
| 30 | static void | ||
| 31 | -hb_ft_face_finalize (FT_Face ft_face) | ||
| 32 | +hb_ft_face_finalize (void *arg) | ||
| 33 | { | ||
| 34 | + FT_Face ft_face = (FT_Face) arg; | ||
| 35 | hb_face_destroy ((hb_face_t *) ft_face->generic.data); | ||
| 36 | } | ||
| 37 | |||
| 38 | @@ -762,7 +763,7 @@ hb_ft_face_create_cached (FT_Face ft_face) | ||
| 39 | ft_face->generic.finalizer (ft_face); | ||
| 40 | |||
| 41 | ft_face->generic.data = hb_ft_face_create (ft_face, nullptr); | ||
| 42 | - ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize; | ||
| 43 | + ft_face->generic.finalizer = hb_ft_face_finalize; | ||
| 44 | } | ||
| 45 | |||
| 46 | return hb_face_reference ((hb_face_t *) ft_face->generic.data); | ||
| 47 | @@ -949,8 +950,9 @@ get_ft_library () | ||
| 48 | } | ||
| 49 | |||
| 50 | static void | ||
| 51 | -_release_blob (FT_Face ft_face) | ||
| 52 | +_release_blob (void *arg) | ||
| 53 | { | ||
| 54 | + FT_Face ft_face = (FT_Face) arg; | ||
| 55 | hb_blob_destroy ((hb_blob_t *) ft_face->generic.data); | ||
| 56 | } | ||
| 57 | |||
| 58 | @@ -1032,7 +1034,7 @@ hb_ft_font_set_funcs (hb_font_t *font) | ||
| 59 | #endif | ||
| 60 | |||
| 61 | ft_face->generic.data = blob; | ||
| 62 | - ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob; | ||
| 63 | + ft_face->generic.finalizer = _release_blob; | ||
| 64 | |||
| 65 | _hb_ft_font_set_funcs (font, ft_face, true); | ||
| 66 | hb_ft_font_set_load_flags (font, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING); | ||
| 67 | -- | ||
| 68 | 2.39.2 | ||
| 69 | |||
diff --git a/meta-oe/recipes-graphics/libsdl/libsdl2-ttf_2.20.1.bb b/meta-oe/recipes-graphics/libsdl/libsdl2-ttf_2.20.2.bb index b8732b4c86..7d352f4218 100644 --- a/meta-oe/recipes-graphics/libsdl/libsdl2-ttf_2.20.1.bb +++ b/meta-oe/recipes-graphics/libsdl/libsdl2-ttf_2.20.2.bb | |||
| @@ -2,17 +2,18 @@ SUMMARY = "Simple DirectMedia Layer truetype font library" | |||
| 2 | SECTION = "libs" | 2 | SECTION = "libs" |
| 3 | DEPENDS = "libsdl2 freetype virtual/egl" | 3 | DEPENDS = "libsdl2 freetype virtual/egl" |
| 4 | LICENSE = "Zlib" | 4 | LICENSE = "Zlib" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=771dca8728b18d39b130e19b36514371" | 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41cbf59bdea749fe34c1af6d3615f68" |
| 6 | 6 | ||
| 7 | SRC_URI = " \ | 7 | SRC_URI = " \ |
| 8 | git://github.com/libsdl-org/SDL_ttf.git;branch=release-2.20.x;protocol=https \ | 8 | git://github.com/libsdl-org/SDL_ttf.git;branch=release-2.20.x;protocol=https \ |
| 9 | git://github.com/libsdl-org/freetype.git;branch=VER-2-12-1-SDL;destsuffix=git/external/freetype;name=freetype;protocol=https \ | 9 | git://github.com/libsdl-org/freetype.git;branch=VER-2-12-1-SDL;destsuffix=git/external/freetype;name=freetype;protocol=https \ |
| 10 | git://github.com/libsdl-org/harfbuzz.git;branch=2.9.1-SDL;destsuffix=git/external/harfbuzz;name=harfbuzz;protocol=https \ | 10 | git://github.com/libsdl-org/harfbuzz.git;branch=2.9.1-SDL;destsuffix=git/external/harfbuzz;name=harfbuzz;protocol=https \ |
| 11 | file://0001-freetype-Fix-function-signatures-to-match-without-ca.patch;patchdir=external/harfbuzz \ | ||
| 11 | file://automake_foreign.patch \ | 12 | file://automake_foreign.patch \ |
| 12 | " | 13 | " |
| 13 | SRCREV = "0a652b598625d16ea7016665095cb1e9bce9ef4f" | 14 | SRCREV = "89d1692fd8fe91a679bb943d377bfbd709b52c23" |
| 14 | SRCREV_freetype = "6fc77cee03e078e97afcee0c0e06a2d3274b9a29" | 15 | SRCREV_freetype = "6fc77cee03e078e97afcee0c0e06a2d3274b9a29" |
| 15 | SRCREV_harfbuzz = "6022fe2f68d028ee178284f297b3902ffdf65b03" | 16 | SRCREV_harfbuzz = "43931e3e596c04044861770b831c8f9452e2d3b0" |
| 16 | 17 | ||
| 17 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
| 18 | 19 | ||
