diff --git a/README.rst b/README.rst index 54e45f5..bcc5c21 100644 --- a/README.rst +++ b/README.rst @@ -32,10 +32,10 @@ Currently, the toolchain requires a few tools for compilation. You will need: brew install autoconf automake libtool pkg-config brew link libtool -#. Install Cython (0.21):: +#. Install Cython (0.23):: # pip method if available (sudo might be needed.) - pip install cython==0.21 + pip install cython==0.23 Using the toolchain diff --git a/recipes/host_setuptools/__init__.py b/recipes/host_setuptools/__init__.py index 0fe64d6..78f4010 100644 --- a/recipes/host_setuptools/__init__.py +++ b/recipes/host_setuptools/__init__.py @@ -15,9 +15,6 @@ class HostSetuptools(Recipe): hostpython = sh.Command(self.ctx.hostpython) sh.curl("-O", "https://bootstrap.pypa.io/ez_setup.py") shprint(hostpython, "./ez_setup.py") - # LINKED SETUPTOOLS CAN CAUSE TROUBLES, UNCOMMENT RETURN IF INSTALLING - # PYTHON PACKAGE FAILS. UNPACKED SETUPTOOLS RESULT IN BDIST_EGG COMMAND - # NOT FOUND # Extract setuptools egg and remove .pth files. Otherwise subsequent # python package installations using setuptools will raise exceptions. # Setuptools version 28.3.0 diff --git a/recipes/kivy/__init__.py b/recipes/kivy/__init__.py index 3da11e7..c941f26 100644 --- a/recipes/kivy/__init__.py +++ b/recipes/kivy/__init__.py @@ -4,7 +4,7 @@ from os.path import join class KivyRecipe(CythonRecipe): version = "1.9.1" - url = "https://github.com/rnixx/kivy/archive/master.zip" + url = "https://github.com/kivy/kivy/archive/{version}.zip" library = "libkivy.a" depends = ["python", "sdl2", "sdl2_image", "sdl2_mixer", "sdl2_ttf", "ios"] pbx_frameworks = ["OpenGLES", "Accelerate"] diff --git a/recipes/libpng/__init__.py b/recipes/libpng/__init__.py new file mode 100644 index 0000000..fd2e3d0 --- /dev/null +++ b/recipes/libpng/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +from toolchain import Recipe, shprint +from os.path import join +import sh + +class PngRecipe(Recipe): + version = '1.6.26' + url = 'http://downloads.sourceforge.net/sourceforge/libpng/libpng-{version}.tar.gz' + depends = ["python"] + library = '.libs/libpng16.a' + + def build_arch(self, arch): + build_env = arch.get_env() + configure = sh.Command(join(self.build_dir, "configure")) + shprint(configure, + "CC={}".format(build_env["CC"]), + "LD={}".format(build_env["LD"]), + "CFLAGS={}".format(build_env["CFLAGS"]), + "LDFLAGS={}".format(build_env["LDFLAGS"]), + "--prefix=/", + "--host={}".format(arch.triple), + "--disable-shared") + shprint(sh.make, "clean") + shprint(sh.make, _env=build_env) + +recipe = PngRecipe() diff --git a/recipes/python/dynload.patch b/recipes/python/dynload.patch index 7cb73f6..3c80a50 100644 --- a/recipes/python/dynload.patch +++ b/recipes/python/dynload.patch @@ -10,7 +10,7 @@ + * of trying to dlopen, directly do the dlsym. + * -- Mathieu + */ -+ return (dl_funcptr) dlsym(RTLD_MAIN_ONLY, funcname); ++ return (dl_funcptr) dlsym(RTLD_SELF, funcname); + +#if 0 if (fp != NULL) { diff --git a/toolchain.py b/toolchain.py index 345d6f4..3cc7a31 100755 --- a/toolchain.py +++ b/toolchain.py @@ -19,9 +19,9 @@ import shutil import fnmatch from datetime import datetime try: - from urllib.request import FancyURLopener + from urllib.request import FancyURLopener, urlcleanup except ImportError: - from urllib import FancyURLopener + from urllib import FancyURLopener, urlcleanup curdir = dirname(__file__) sys.path.insert(0, join(curdir, "tools", "external")) @@ -452,6 +452,9 @@ class Recipe(object): if exists(filename): unlink(filename) + # Clean up temporary files just in case before downloading. + urlcleanup() + print('Downloading {0}'.format(url)) urlretrieve(url, filename, report_hook) return filename diff --git a/tools/templates/{{ cookiecutter.project_name }}-ios/main.m b/tools/templates/{{ cookiecutter.project_name }}-ios/main.m index 99f2325..a5f6c4d 100644 --- a/tools/templates/{{ cookiecutter.project_name }}-ios/main.m +++ b/tools/templates/{{ cookiecutter.project_name }}-ios/main.m @@ -121,8 +121,8 @@ void load_custom_builtin_importer() { "import sys, imp\n" \ "from os import environ\n" \ "from os.path import exists, join\n" \ - "# Fake redirection when we run the app without xcode\n" \ - "if 'CFLOG_FORCE_STDERR' not in environ:\n" \ + "# Fake redirection to supress console output\n" \ + "if environ.get('KIVY_NO_CONSOLE', '0') == '1':\n" \ " class fakestd(object):\n" \ " def write(self, *args, **kw): pass\n" \ " def flush(self, *args, **kw): pass\n" \