56431b6922
- updates all imports to prefix kivy_ios - adds basic `setup.py` file - adds a simple `toolchain.py` to the root folder for compat Makes it possible to install kivy-ios from PyPI: ``` pip install kivy-ios toolchain --help ``` Note the `rebuild_updated_recipes.py` is expected to fail as we moved all the recipes. This is a working, but unperfect iteration that come with limitations we would address in subsequent pull requests, such as: - the new usage is not yet documented - CI is not testing the source distribution creation and install - Continuous Delivery to PyPI is not in place - `toolchain` binary is a bit too generic name - we're still vendoring things under `tools/`
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
from kivy_ios.toolchain import Recipe, shprint
|
|
import sh
|
|
|
|
|
|
class LibSDL2Recipe(Recipe):
|
|
# version = "2.0.9"
|
|
# url = "https://www.libsdl.org/release/SDL2-{version}.tar.gz"
|
|
version = "7cc4fc886d9e"
|
|
url = "https://hg.libsdl.org/SDL/archive/{version}.tar.gz"
|
|
library = "Xcode-iOS/SDL/build/Release-{arch.sdk}/libSDL2.a"
|
|
include_dir = "include"
|
|
pbx_frameworks = [
|
|
"OpenGLES", "AudioToolbox", "QuartzCore", "CoreGraphics",
|
|
"CoreMotion", "GameController", "AVFoundation", "Metal",
|
|
"UIKit"]
|
|
|
|
def prebuild_arch(self, arch):
|
|
if self.has_marker("patched"):
|
|
return
|
|
self.apply_patch("uikit-transparent.patch")
|
|
self.set_marker("patched")
|
|
|
|
def build_arch(self, arch):
|
|
env = arch.get_env()
|
|
shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild,
|
|
"ONLY_ACTIVE_ARCH=NO",
|
|
"ARCHS={}".format(arch.arch),
|
|
"CC={}".format(env['CC']),
|
|
"-sdk", arch.sdk,
|
|
"-project", "Xcode-iOS/SDL/SDL.xcodeproj",
|
|
"-target", "libSDL-iOS",
|
|
"-configuration", "Release")
|
|
|
|
|
|
recipe = LibSDL2Recipe()
|