fix lib generation for all platforms
This commit is contained in:
parent
bfd8532e0e
commit
6179584980
3 changed files with 7 additions and 9 deletions
|
@ -7,7 +7,7 @@ import shutil
|
||||||
class LibffiRecipe(Recipe):
|
class LibffiRecipe(Recipe):
|
||||||
version = "3.2.1"
|
version = "3.2.1"
|
||||||
url = "ftp://sourceware.org/pub/libffi/libffi-{version}.tar.gz"
|
url = "ftp://sourceware.org/pub/libffi/libffi-{version}.tar.gz"
|
||||||
archs = ("armv7",)
|
library = "build/Release-{arch.sdk}/libffi.a"
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
def prebuild_arch(self, arch):
|
||||||
if self.has_marker("patched"):
|
if self.has_marker("patched"):
|
||||||
|
@ -22,16 +22,13 @@ class LibffiRecipe(Recipe):
|
||||||
|
|
||||||
def build_arch(self, arch):
|
def build_arch(self, arch):
|
||||||
shprint(sh.xcodebuild,
|
shprint(sh.xcodebuild,
|
||||||
|
"ONLY_ACTIVE_ARCH=NO",
|
||||||
|
"ARCHS={}".format(arch.arch),
|
||||||
|
"-sdk", arch.sdk,
|
||||||
"-project", "libffi.xcodeproj",
|
"-project", "libffi.xcodeproj",
|
||||||
"-target", "libffi-iOS",
|
"-target", "libffi-iOS",
|
||||||
"-configuration", "Release")
|
"-configuration", "Release")
|
||||||
|
|
||||||
def make_lipo(self, filename):
|
|
||||||
shutil.copy(join(
|
|
||||||
self.get_build_dir("armv7"),
|
|
||||||
"build/Release-iphoneos/libffi.a"),
|
|
||||||
filename)
|
|
||||||
|
|
||||||
def install(self):
|
def install(self):
|
||||||
for sdkarch, arch in (
|
for sdkarch, arch in (
|
||||||
("iphoneos-arm64", "arm64"),
|
("iphoneos-arm64", "arm64"),
|
||||||
|
@ -42,7 +39,7 @@ class LibffiRecipe(Recipe):
|
||||||
if exists(dest_dir):
|
if exists(dest_dir):
|
||||||
continue
|
continue
|
||||||
shutil.copytree(join(
|
shutil.copytree(join(
|
||||||
self.get_build_dir("armv7"),
|
self.get_build_dir(arch),
|
||||||
"build_{}/include".format(sdkarch)),
|
"build_{}/include".format(sdkarch)),
|
||||||
dest_dir)
|
dest_dir)
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -456,9 +456,10 @@ class Recipe(object):
|
||||||
return
|
return
|
||||||
args = []
|
args = []
|
||||||
for arch in self.filtered_archs:
|
for arch in self.filtered_archs:
|
||||||
|
library = self.library.format(arch=arch)
|
||||||
args += [
|
args += [
|
||||||
"-arch", arch.arch,
|
"-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)
|
shprint(sh.lipo, "-create", "-output", filename, *args)
|
||||||
|
|
||||||
def install(self):
|
def install(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue