new ffi recipe

This commit is contained in:
Mathieu Virbel 2015-02-02 05:22:01 +01:00
parent f18628f325
commit 18c67317fe
3 changed files with 35 additions and 0 deletions

2
.gitignore vendored
View file

@ -1,4 +1,6 @@
*.swo
*.pyc
*.pyo
*.swp
freetype-*
build/*

View file

@ -0,0 +1,33 @@
from toolchain import Recipe, shprint
import sh
class LibffiRecipe(Recipe):
version = "3.0.13"
url = "ftp://sourceware.org/pub/libffi/libffi-{version}.tar.gz"
def prebuild_arch(self, arch):
if self.has_marker("patched"):
return
self.apply_patch("ffi-3.0.13-sysv.S.patch")
if arch in ("armv7", "armv7s", "arm64"):
shprint(sh.sed,
"-i.bak",
"s/-miphoneos-version-min=4.0/-miphoneos-version-min=6.0/g",
"generate-ios-source-and-headers.py")
self.set_marker("patched")
def build_arch(self, arch):
if arch == "i386":
target_name = "libffi OS X"
else:
target_name = "libffi iOS"
shprint(sh.xcodebuild,
"-project", "libffi.xcodeproj",
"-target", target_name,
"-configuration", "Release",
"-sdk", "iphoneos{}".format(self.ctx.sdkver),
"OTHER_CFLAGS=-no-integrated-as")
recipe = LibffiRecipe()