From c04f88b62c08c30abe78e3131ec4fbdb0f49ce69 Mon Sep 17 00:00:00 2001 From: GoBig87 Date: Sun, 16 Feb 2020 11:34:52 -0800 Subject: [PATCH 1/5] [#423] Pkg_resources imports the wrong importlib bootstrap --- recipes/pkgresources/pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/pkgresources/pkg_resources.py b/recipes/pkgresources/pkg_resources.py index 511068a63..984845243 100644 --- a/recipes/pkgresources/pkg_resources.py +++ b/recipes/pkgresources/pkg_resources.py @@ -64,7 +64,7 @@ # Avoid try/except due to potential problems with delayed import mechanisms. if sys.version_info >= (3, 3) and sys.implementation.name == "cpython": - import importlib._bootstrap as importlib_bootstrap + import importlib._bootstrap_external as importlib_bootstrap else: importlib_bootstrap = None From 1720036b09db1322c08839549ff5b4d4da6c7d5c Mon Sep 17 00:00:00 2001 From: GoBig87 Date: Mon, 5 Oct 2020 19:36:21 -0700 Subject: [PATCH 2/5] Adding patch to change keyboard --- recipes/sdl2/uikit-transparent.patch | 107 +++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) mode change 100644 => 100755 recipes/sdl2/uikit-transparent.patch diff --git a/recipes/sdl2/uikit-transparent.patch b/recipes/sdl2/uikit-transparent.patch old mode 100644 new mode 100755 index 4d32e802c..4c919d8af --- a/recipes/sdl2/uikit-transparent.patch +++ b/recipes/sdl2/uikit-transparent.patch @@ -1,3 +1,109 @@ +--- slime73-sdl-experiments-618662dc9e82/src/video/uikit/SDL_uikitviewcontroller.m ++++ slime73-sdl-experiments-618662dc9e82/src/video/uikit/SDL_uikitviewcontroller.m +@@ -332,1 +332,1 @@ +- [self showKeyboard]; ++ [self showKeyboard:textField.keyboardType]; +@@ -370,1 +370,1 @@ +-- (void)showKeyboard ++- (void)showKeyboard:(NSInteger)UIKeyboardType +@@ -373,3 +373,5 @@ + if (textField.window) { + showingKeyboard = YES; ++ [textField setKeyboardType:UIKeyboardType]; ++ [textField reloadInputViews]; + [textField becomeFirstResponder]; +@@ -545,1 +545,1 @@ +-UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window) ++UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window, int UIKeyboardType) +@@ -549,1 +549,2 @@ +- [vc showKeyboard]; ++ NSInteger _UIKeyboardType = (NSInteger) UIKeyboardType; ++ [vc showKeyboard:_UIKeyboardType]; + +--- slime73-sdl-experiments-618662dc9e82/src/video/uikit/SDL_uikitviewcontroller.h ++++ slime73-sdl-experiments-618662dc9e82/src/video/uikit/SDL_uikitviewcontroller.h +@@ -68,1 +68,1 @@ +-- (void)showKeyboard; ++- (void)showKeyboard:(NSInteger)UIKeyboardType; +@@ -87,1 +87,1 @@ +-void UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window); ++void UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window, int UIKeyboardType); + +--- slime73-sdl-experiments-618662dc9e82/src/video/SDL_video.c ++++ slime73-sdl-experiments-618662dc9e82/src/video/SDL_video.c +@@ -568,1 +568,2 @@ +- SDL_StartTextInput(); ++ int keyboard_type = 0; ++ SDL_StartTextInput(keyboard_type); +@@ -3764,1 +3764,1 @@ +-SDL_StartTextInput(void) ++SDL_StartTextInput(int keyboard_type) +@@ -3774,2 +3774,2 @@ +- if (window && _this && _this->ShowScreenKeyboard) { ++ if (window && _this && _this->ShowScreenKeyboard) { +- _this->ShowScreenKeyboard(_this, window); ++ _this->ShowScreenKeyboard(_this, window, keyboard_type); +@@ -3781,2 +3781,2 @@ +- if (_this && _this->StartTextInput) { ++ if (_this && _this->StartTextInput) { +- _this->StartTextInput(_this); ++ _this->StartTextInput(_this, keyboard_type); + +--- slime73-sdl-experiments-618662dc9e82/src/video/SDL_sysvideo.h ++++ slime73-sdl-experiments-618662dc9e82/src/video/SDL_sysvideo.h +@@ -295,7 +295,7 @@ +- void (*StartTextInput) (_THIS); ++ void (*StartTextInput) (_THIS, int keyboard_type); + void (*StopTextInput) (_THIS); + void (*SetTextInputRect) (_THIS, SDL_Rect *rect); + + /* Screen keyboard */ + SDL_bool (*HasScreenKeyboardSupport) (_THIS); +- void (*ShowScreenKeyboard) (_THIS, SDL_Window *window); ++ void (*ShowScreenKeyboard) (_THIS, SDL_Window *window, int keyboard_type); + +--- slime73-sdl-experiments-618662dc9e82/src/video/winrt/SDL_winrtevents_c.h ++++ slime73-sdl-experiments-618662dc9e82/src/video/winrt/SDL_winrtevents_c.h +@@ -72,1 +72,1 @@ +-extern void WINRT_ShowScreenKeyboard(_THIS, SDL_Window *window); ++extern void WINRT_ShowScreenKeyboard(_THIS, SDL_Window *window, int keyboard_type); + +--- slime73-sdl-experiments-618662dc9e82/src/video/winrt/SDL_winrtkeyboard.cpp ++++ slime73-sdl-experiments-618662dc9e82/src/video/winrt/SDL_winrtkeyboard.cpp +@@ -394,1 +394,1 @@ +-void WINRT_ShowScreenKeyboard(_THIS, SDL_Window *window) ++void WINRT_ShowScreenKeyboard(_THIS, SDL_Window *window, int keyboard_type) + +--- slime73-sdl-experiments-618662dc9e82/src/video/psp/SDL_pspvideo.h ++++ slime73-sdl-experiments-618662dc9e82/src/video/psp/SDL_pspvideo.h +@@ -96,1 +96,1 @@ +-void PSP_ShowScreenKeyboard(_THIS, SDL_Window *window); ++void PSP_ShowScreenKeyboard(_THIS, SDL_Window *window, int keyboard_type); + +--- slime73-sdl-experiments-618662dc9e82/src/video/psp/SDL_pspvideo.c ++++ slime73-sdl-experiments-618662dc9e82/src/video/psp/SDL_pspvideo.c +@@ -319,1 +319,1 @@ +-void PSP_ShowScreenKeyboard(_THIS, SDL_Window *window) ++void PSP_ShowScreenKeyboard(_THIS, SDL_Window *window, int keyboard_type) + +--- slime73-sdl-experiments-618662dc9e82/include/SDL_keyboard.h ++++ slime73-sdl-experiments-618662dc9e82/include/SDL_keyboard.h +@@ -160,1 +160,1 @@ +-extern DECLSPEC void SDLCALL SDL_StartTextInput(void); ++extern DECLSPEC void SDLCALL SDL_StartTextInput(int keyboard_type); + +--- slime73-sdl-experiments-618662dc9e82/Xcode-iOS/Demos/src/keyboard.c ++++ slime73-sdl-experiments-618662dc9e82/Xcode-iOS/Demos/src/keyboard.c +@@ -246,1 +246,1 @@ +- SDL_StartTextInput(); ++ SDL_StartTextInput(0); + +--- slime73-sdl-experiments-618662dc9e82/src/events/SDL_keyboard.c ++++ slime73-sdl-experiments-618662dc9e82/src/events/SDL_keyboard.c +@@ -672,1 +672,1 @@ +- video->StartTextInput(video); ++ video->StartTextInput(video, 0); + --- slime73-sdl-experiments-618662dc9e82/src/video/uikit/SDL_uikitopenglview.m.orig 2015-08-20 16:09:59.000000000 +0200 +++ slime73-sdl-experiments-618662dc9e82/src/video/uikit/SDL_uikitopenglview.m 2015-08-20 16:11:25.000000000 +0200 @@ -99,7 +99,7 @@ @@ -9,3 +115,4 @@ eaglLayer.drawableProperties = @{ kEAGLDrawablePropertyRetainedBacking:@(retained), kEAGLDrawablePropertyColorFormat:colorFormat + From 506b4d6cab5dc3e264589b08c9c9ab5beb28a3c0 Mon Sep 17 00:00:00 2001 From: GoBig87 Date: Mon, 5 Oct 2020 19:39:38 -0700 Subject: [PATCH 3/5] reverting pkg resource import --- recipes/pkgresources/pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/pkgresources/pkg_resources.py b/recipes/pkgresources/pkg_resources.py index 984845243..511068a63 100644 --- a/recipes/pkgresources/pkg_resources.py +++ b/recipes/pkgresources/pkg_resources.py @@ -64,7 +64,7 @@ # Avoid try/except due to potential problems with delayed import mechanisms. if sys.version_info >= (3, 3) and sys.implementation.name == "cpython": - import importlib._bootstrap_external as importlib_bootstrap + import importlib._bootstrap as importlib_bootstrap else: importlib_bootstrap = None From 57dc4cc91c0fce04ae1e9a5c89036993a79d75c0 Mon Sep 17 00:00:00 2001 From: GoBig87 Date: Mon, 5 Oct 2020 20:05:08 -0700 Subject: [PATCH 4/5] adding kivy sdl2 keyboard patch --- recipes/kivy/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/kivy/__init__.py b/recipes/kivy/__init__.py index 3f95553d8..2aec51ee7 100644 --- a/recipes/kivy/__init__.py +++ b/recipes/kivy/__init__.py @@ -18,6 +18,12 @@ class KivyRecipe(CythonRecipe): pbx_frameworks = ["OpenGLES", "Accelerate", "CoreMedia", "CoreVideo"] pre_build_ext = True + def prebuild_arch(self, arch): + if self.has_marker("patched"): + return + self.apply_patch("keyboard.patch") + self.set_marker("patched") + def get_recipe_env(self, arch): env = super(KivyRecipe, self).get_recipe_env(arch) env["KIVY_SDL2_PATH"] = ":".join([ From dda96be59bdbef399f4b4e0ce47fb3d18d104ed3 Mon Sep 17 00:00:00 2001 From: GoBig87 Date: Mon, 5 Oct 2020 20:07:54 -0700 Subject: [PATCH 5/5] adding kivy keyboard patch --- recipes/kivy/keyboard.patch | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 recipes/kivy/keyboard.patch diff --git a/recipes/kivy/keyboard.patch b/recipes/kivy/keyboard.patch new file mode 100644 index 000000000..a927ffd26 --- /dev/null +++ b/recipes/kivy/keyboard.patch @@ -0,0 +1,5 @@ +--- kivy-38fcbd5b90c99a96d82682f14986836cde81412d/kivy/lib/sdl2.pxi ++++ kivy-38fcbd5b90c99a96d82682f14986836cde81412d/kivy/lib/sdl2.pxi +@@ -622,1 +622,1 @@ +- cdef void SDL_StartTextInput() ++ cdef void SDL_StartTextInput(int keyboard_type)