forked from kivy/kivy-ios
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
135 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import os | ||
import shutil | ||
|
||
from kivy_ios.toolchain import GenericPlatform, Recipe, cache_execution, logger | ||
|
||
|
||
class IphoneAllUniversalPlatform(GenericPlatform): | ||
|
||
@property | ||
def name(self): | ||
return "iphoneall-universal" | ||
|
||
|
||
class ANGLERecipe(Recipe): | ||
version = "chromium-6367_rev1" | ||
url = "https://github.com/kivy/angle-builder/releases/download/{version}/angle-iphoneall-universal.tar.gz" | ||
include_dir = ["include"] | ||
|
||
@property | ||
def platforms_to_build(self): | ||
yield IphoneAllUniversalPlatform(self.ctx) | ||
|
||
@cache_execution | ||
def build_all(self): | ||
self.install_include() | ||
self.install() | ||
|
||
@cache_execution | ||
def install(self): | ||
xcframework_folder = os.path.join(self.ctx.dist_dir, "xcframework") | ||
|
||
build_dir = self.get_build_dir( | ||
plat=IphoneAllUniversalPlatform(self.ctx) | ||
) | ||
|
||
for fn in os.listdir(build_dir): | ||
if fn.endswith(".xcframework"): | ||
shutil.copytree( | ||
os.path.join(build_dir, fn), | ||
os.path.join(xcframework_folder, fn), | ||
dirs_exist_ok=True | ||
) | ||
|
||
|
||
recipe = ANGLERecipe() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff -Naur setuptools.orig/_distutils/unixccompiler.py setuptools/_distutils/unixccompiler.py | ||
--- setuptools.orig/_distutils/unixccompiler.py 2024-02-11 18:42:58 | ||
+++ setuptools/_distutils/unixccompiler.py 2024-02-11 18:45:30 | ||
@@ -253,14 +253,20 @@ | ||
building_exe = target_desc == CCompiler.EXECUTABLE | ||
linker = (self.linker_exe if building_exe else self.linker_so)[:] | ||
|
||
- if target_lang == "c++" and self.compiler_cxx: | ||
- env, linker_ne = _split_env(linker) | ||
- aix, linker_na = _split_aix(linker_ne) | ||
- _, compiler_cxx_ne = _split_env(self.compiler_cxx) | ||
- _, linker_exe_ne = _split_env(self.linker_exe) | ||
+ # Mirko: We need our LDSHARED also for c++ things, | ||
+ # otherwise our hack to have static libs does not work | ||
+ # properly. | ||
+ # We will likely remove all these caveats once PEP 730 | ||
+ # is implemented (and we will conform to it). | ||
|
||
- params = _linker_params(linker_na, linker_exe_ne) | ||
- linker = env + aix + compiler_cxx_ne + params | ||
+ #if target_lang == "c++" and self.compiler_cxx: | ||
+ # env, linker_ne = _split_env(linker) | ||
+ # aix, linker_na = _split_aix(linker_ne) | ||
+ # _, compiler_cxx_ne = _split_env(self.compiler_cxx) | ||
+ # _, linker_exe_ne = _split_env(self.linker_exe) | ||
+ | ||
+ # params = _linker_params(linker_na, linker_exe_ne) | ||
+ # linker = env + aix + compiler_cxx_ne + params | ||
|
||
linker = compiler_fixup(linker, ld_args) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- SDL2.orig/include/SDL_config_iphoneos.h 2024-02-11 14:06:54 | ||
+++ SDL2/include/SDL_config_iphoneos.h 2024-02-11 14:07:22 | ||
@@ -175,10 +175,10 @@ | ||
|
||
/* Enable OpenGL ES */ | ||
#if !TARGET_OS_MACCATALYST | ||
-#define SDL_VIDEO_OPENGL_ES2 1 | ||
-#define SDL_VIDEO_OPENGL_ES 1 | ||
-#define SDL_VIDEO_RENDER_OGL_ES 1 | ||
-#define SDL_VIDEO_RENDER_OGL_ES2 1 | ||
+#define SDL_VIDEO_OPENGL_ES2 0 | ||
+#define SDL_VIDEO_OPENGL_ES 0 | ||
+#define SDL_VIDEO_RENDER_OGL_ES 0 | ||
+#define SDL_VIDEO_RENDER_OGL_ES2 0 | ||
#endif | ||
|
||
/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters