Updated sdl2, sdl2_image, sdl2_mixer, sdl2_ttf, kivy (#370)

* Updated sdl2, sdl2_image, sdl2_mixer, sdl2_ttf, kivy

* bump kivy version to 1.11.0
This commit is contained in:
Mirko 2019-09-22 16:48:49 +02:00 committed by Mathieu Virbel
parent 232f3ba867
commit 2ec7cb5ce0
5 changed files with 52 additions and 13 deletions

View file

@ -1,9 +1,11 @@
from toolchain import CythonRecipe
from toolchain import CythonRecipe, shprint
from os.path import join
from os import chdir, listdir
import sh
class KivyRecipe(CythonRecipe):
version = "1.10.1"
version = "1.11.0"
url = "https://github.com/kivy/kivy/archive/{version}.zip"
library = "libkivy.a"
depends = ["sdl2", "sdl2_image", "sdl2_mixer", "sdl2_ttf", "ios",
@ -38,5 +40,43 @@ class KivyRecipe(CythonRecipe):
with open(pyconfig, "w") as fd:
fd.writelines(lines)
def install_python_package(self, name=None, env=None, is_dir=True):
"""
Automate the installation of a Python package into the target
site-packages.
"""
# arch = self.filtered_archs[0]
for arch in self.filtered_archs:
if name is None:
name = self.name
if env is None:
env = self.get_recipe_env(arch)
print("Install {} into the site-packages".format(name))
build_dir = self.get_build_dir(arch.arch)
chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
env["PYTHONPATH"] = self.ctx.site_packages_dir
shprint(
hostpython,
"setup.py",
"bdist_egg",
"--plat-name={}".format(arch.arch),
_env=env,
)
for file in listdir("./dist"):
if file.endswith(".egg"):
egg_name = file
shprint(
hostpython,
"setup.py",
"easy_install",
"--no-deps",
"--install-dir",
self.ctx.site_packages_dir,
join("dist", egg_name),
_env=env,
)
recipe = KivyRecipe()

View file

@ -3,7 +3,7 @@ import sh
class LibSDL2Recipe(Recipe):
version = "2.0.8"
version = "2.0.9"
url = "https://www.libsdl.org/release/SDL2-{version}.tar.gz"
#version = "iOS-improvements"
#url = "https://bitbucket.org/slime73/sdl-experiments/get/{version}.tar.gz"

View file

@ -4,7 +4,7 @@ import sh
class LibSDL2ImageRecipe(Recipe):
version = "2.0.0"
version = "2.0.4"
url = "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-{version}.tar.gz"
library = "Xcode-iOS/build/Release-{arch.sdk}/libSDL2_image.a"
include_dir = "SDL_image.h"
@ -19,9 +19,8 @@ class LibSDL2ImageRecipe(Recipe):
join(self.ctx.include_dir, "common", "sdl2")),
"-sdk", arch.sdk,
"-project", "Xcode-iOS/SDL_image.xcodeproj",
"-target", "libSDL_image",
"-target", "libSDL_image-iOS",
"-configuration", "Release")
recipe = LibSDL2ImageRecipe()

View file

@ -3,7 +3,7 @@ import sh
class LibSDL2MixerRecipe(Recipe):
version = "2.0.0"
version = "2.0.4"
url = "http://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-{version}.tar.gz"
library = "Xcode-iOS/build/Release-{arch.sdk}/libSDL2_mixer.a"
include_dir = "SDL_mixer.h"
@ -12,15 +12,16 @@ class LibSDL2MixerRecipe(Recipe):
pbx_libraries = ["libc++"]
def build_arch(self, arch):
# endian.h is in /usr/include/machine/ (Since MacOs Mojave?)
# header is needed by libvorbis, so We're adding that folder
# to HEADER_SEARCH_PATHS
shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild,
"ONLY_ACTIVE_ARCH=NO",
"ARCHS={}".format(arch.arch),
"HEADER_SEARCH_PATHS=$HEADER_SEARCH_PATHS {}".format(" ".join(arch.include_dirs)),
"HEADER_SEARCH_PATHS=$HEADER_SEARCH_PATHS /usr/include/machine {} ".format(" ".join(arch.include_dirs)),
"-sdk", arch.sdk,
"-project", "Xcode-iOS/SDL_mixer.xcodeproj",
"-target", "Static Library",
"-target", "libSDL_mixer-iOS",
"-configuration", "Release")
recipe = LibSDL2MixerRecipe()

View file

@ -6,7 +6,7 @@ import shlex
class LibSDL2TTFRecipe(Recipe):
version = "2.0.12"
version = "2.0.14"
url = "https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-{version}.tar.gz"
library = "libSDL2_ttf.a"
include_dir = "SDL_ttf.h"
@ -31,4 +31,3 @@ class LibSDL2TTFRecipe(Recipe):
join(self.ctx.include_dir, "common", "SDL2"))
recipe = LibSDL2TTFRecipe()