2015-02-04 16:12:09 +01:00
|
|
|
from toolchain import Recipe, shprint
|
|
|
|
import sh
|
|
|
|
|
|
|
|
|
|
|
|
class LibSDL2Recipe(Recipe):
|
2019-09-22 16:48:49 +02:00
|
|
|
version = "2.0.9"
|
2018-10-30 14:59:29 +01:00
|
|
|
url = "https://www.libsdl.org/release/SDL2-{version}.tar.gz"
|
|
|
|
#version = "iOS-improvements"
|
|
|
|
#url = "https://bitbucket.org/slime73/sdl-experiments/get/{version}.tar.gz"
|
2015-02-04 16:12:09 +01:00
|
|
|
library = "Xcode-iOS/SDL/build/Release-{arch.sdk}/libSDL2.a"
|
2015-02-06 01:53:21 +01:00
|
|
|
include_dir = "include"
|
2018-11-01 20:39:28 +01:00
|
|
|
pbx_frameworks = [
|
|
|
|
"OpenGLES", "AudioToolbox", "QuartzCore", "CoreGraphics",
|
|
|
|
"CoreMotion", "GameController", "AVFoundation", "Metal",
|
|
|
|
"UIKit"]
|
2015-02-04 16:12:09 +01:00
|
|
|
|
2015-08-20 17:36:56 +02:00
|
|
|
def prebuild_arch(self, arch):
|
|
|
|
if self.has_marker("patched"):
|
|
|
|
return
|
|
|
|
self.apply_patch("uikit-transparent.patch")
|
|
|
|
self.set_marker("patched")
|
|
|
|
|
2015-02-04 16:12:09 +01:00
|
|
|
def build_arch(self, arch):
|
2016-04-17 06:08:58 +02:00
|
|
|
env = arch.get_env()
|
2017-05-02 08:10:11 +02:00
|
|
|
shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild,
|
2015-02-04 16:12:09 +01:00
|
|
|
"ONLY_ACTIVE_ARCH=NO",
|
|
|
|
"ARCHS={}".format(arch.arch),
|
2016-04-17 06:08:58 +02:00
|
|
|
"CC={}".format(env['CC']),
|
2015-02-04 16:12:09 +01:00
|
|
|
"-sdk", arch.sdk,
|
|
|
|
"-project", "Xcode-iOS/SDL/SDL.xcodeproj",
|
2018-10-30 14:59:29 +01:00
|
|
|
"-target", "libSDL-iOS",
|
2018-10-30 17:05:59 +01:00
|
|
|
"-configuration", "Release")
|
2015-02-04 16:12:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
recipe = LibSDL2Recipe()
|