fix lib generation for all platforms

This commit is contained in:
Mathieu Virbel 2015-02-04 15:50:16 +01:00
parent bfd8532e0e
commit 6179584980
3 changed files with 7 additions and 9 deletions

View file

@ -7,7 +7,7 @@ import shutil
class LibffiRecipe(Recipe):
version = "3.2.1"
url = "ftp://sourceware.org/pub/libffi/libffi-{version}.tar.gz"
archs = ("armv7",)
library = "build/Release-{arch.sdk}/libffi.a"
def prebuild_arch(self, arch):
if self.has_marker("patched"):
@ -22,16 +22,13 @@ class LibffiRecipe(Recipe):
def build_arch(self, arch):
shprint(sh.xcodebuild,
"ONLY_ACTIVE_ARCH=NO",
"ARCHS={}".format(arch.arch),
"-sdk", arch.sdk,
"-project", "libffi.xcodeproj",
"-target", "libffi-iOS",
"-configuration", "Release")
def make_lipo(self, filename):
shutil.copy(join(
self.get_build_dir("armv7"),
"build/Release-iphoneos/libffi.a"),
filename)
def install(self):
for sdkarch, arch in (
("iphoneos-arm64", "arm64"),
@ -42,7 +39,7 @@ class LibffiRecipe(Recipe):
if exists(dest_dir):
continue
shutil.copytree(join(
self.get_build_dir("armv7"),
self.get_build_dir(arch),
"build_{}/include".format(sdkarch)),
dest_dir)

Binary file not shown.

View file

@ -456,9 +456,10 @@ class Recipe(object):
return
args = []
for arch in self.filtered_archs:
library = self.library.format(arch=arch)
args += [
"-arch", arch.arch,
join(self.get_build_dir(arch.arch), self.library)]
join(self.get_build_dir(arch.arch), library)]
shprint(sh.lipo, "-create", "-output", filename, *args)
def install(self):