From 3c4b0fddf56fa635a89b6d7b7f4e1f93d80ab810 Mon Sep 17 00:00:00 2001 From: "Juan E. Sanchez" Date: Tue, 24 Sep 2024 21:51:54 -0500 Subject: [PATCH] Issue #936: fix build for Xcode 16 --- kivy_ios/recipes/libffi/__init__.py | 4 ++++ kivy_ios/recipes/sdl2_ttf/__init__.py | 8 ++++++++ kivy_ios/recipes/sdl2_ttf/harfbuzz.patch | 13 +++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 kivy_ios/recipes/sdl2_ttf/harfbuzz.patch diff --git a/kivy_ios/recipes/libffi/__init__.py b/kivy_ios/recipes/libffi/__init__.py index 504280b2..5b061e7e 100644 --- a/kivy_ios/recipes/libffi/__init__.py +++ b/kivy_ios/recipes/libffi/__init__.py @@ -22,6 +22,10 @@ def prebuild_platform(self, plat): "-i.bak", "s/build_target(ios_simulator_i386_platform, platform_headers)/print('Skipping i386')/g", "generate-darwin-source-and-headers.py") + shprint(sh.sed, + "-i.bak", + "s/ -fembed-bitcode//g", + "generate-darwin-source-and-headers.py") self.set_marker("patched") def build_platform(self, plat): diff --git a/kivy_ios/recipes/sdl2_ttf/__init__.py b/kivy_ios/recipes/sdl2_ttf/__init__.py index 57c2e6c7..61d77371 100644 --- a/kivy_ios/recipes/sdl2_ttf/__init__.py +++ b/kivy_ios/recipes/sdl2_ttf/__init__.py @@ -10,6 +10,14 @@ class LibSDL2TTFRecipe(Recipe): include_dir = "SDL_ttf.h" depends = ["libpng", "sdl2"] + def prebuild_platform(self, plat): + if self.has_marker("patched"): + return + + self.apply_patch("harfbuzz.patch") + + self.set_marker("patched") + def build_platform(self, plat): shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild, "ONLY_ACTIVE_ARCH=NO", diff --git a/kivy_ios/recipes/sdl2_ttf/harfbuzz.patch b/kivy_ios/recipes/sdl2_ttf/harfbuzz.patch new file mode 100644 index 00000000..1f174f07 --- /dev/null +++ b/kivy_ios/recipes/sdl2_ttf/harfbuzz.patch @@ -0,0 +1,13 @@ + +diff -Naur SDL2_ttf-2.20.2.orig/external/harfbuzz/src/hb-ft.cc SDL2_ttf-2.20.2/external/harfbuzz/src/hb-ft.cc +--- SDL2_ttf-2.20.2.orig/external/harfbuzz/src/hb-ft.cc 2022-05-25 12:51:24 ++++ SDL2_ttf-2.20.2/external/harfbuzz/src/hb-ft.cc 2024-09-24 21:33:24 +@@ -41,6 +41,8 @@ + #include FT_MULTIPLE_MASTERS_H + #include FT_TRUETYPE_TABLES_H + ++/** function pointer warning with XCode 16 */ ++#pragma clang diagnostic ignored "-Wcast-function-type-strict" + + /** + * SECTION:hb-ft