Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit 7cd01f7

Browse files
committed
Updated to use libffi-3.1.
1 parent f536835 commit 7cd01f7

File tree

5 files changed

+17
-642
lines changed

5 files changed

+17
-642
lines changed

Makefile

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PROJECTDIR=$(shell pwd)
44
OSX_SDK_ROOT=$(shell xcrun --sdk macosx --show-sdk-path)
55

66
# Version of packages that will be compiled by this meta-package
7-
FFI_VERSION=3.0.13
7+
FFI_VERSION=3.1
88
PYTHON_VERSION=2.7.1
99
RUBICON_VERSION=0.1.2
1010

@@ -75,13 +75,22 @@ src/libffi-$(FFI_VERSION): downloads/libffi-$(FFI_VERSION).tar.gz
7575

7676
# Patch and build the framework
7777
build/ffi.framework: src/libffi-$(FFI_VERSION)
78-
cd src/libffi-$(FFI_VERSION) && patch -p1 -N < ../../patch/libffi/ffi-sysv.S.patch
79-
cd src/libffi-$(FFI_VERSION) && patch -p1 -N < ../../patch/libffi/project.pbxproj.patch
80-
cd src/libffi-$(FFI_VERSION) && patch -p1 -N < ../../patch/libffi/build-ios.sh.patch
81-
cd src/libffi-$(FFI_VERSION) && patch -p1 -N < ../../patch/libffi/generate-ios-source-and-headers.py.patch
82-
cd src/libffi-$(FFI_VERSION) && python generate-ios-source-and-headers.py
83-
cd src/libffi-$(FFI_VERSION) && xcodebuild -project libffi.xcodeproj -target "Framework" -configuration Release -sdk iphoneos$(SDKVER) OTHER_CFLAGS="-no-integrated-as"
84-
cp -a src/libffi-$(FFI_VERSION)/build/Release-universal/ffi.framework build
78+
cd src/libffi-$(FFI_VERSION) && patch -p1 -N < ../../patch/libffi/generate-darwin-source-and-headers.py.patch
79+
cd src/libffi-$(FFI_VERSION) && python generate-darwin-source-and-headers.py --only-ios
80+
# Build all required targets.
81+
cd src/libffi-$(FFI_VERSION)/build_iphoneos-armv7 && make
82+
cd src/libffi-$(FFI_VERSION)/build_iphoneos-arm64 && make
83+
cd src/libffi-$(FFI_VERSION)/build_iphonesimulator-i386 && make
84+
# Copy the headers into a single directory
85+
mkdir -p build/ffi.framework/Versions/${FFI_VERSION}/Headers
86+
cp src/libffi-$(FFI_VERSION)/darwin_common/include/* build/ffi.framework/Versions/${FFI_VERSION}/Headers
87+
cp src/libffi-$(FFI_VERSION)/darwin_ios/include/* build/ffi.framework/Versions/${FFI_VERSION}/Headers
88+
# Make the fat binary
89+
xcrun lipo -create -output build/ffi.framework/Versions/$(FFI_VERSION)/ffi src/libffi-$(FFI_VERSION)/build_iphoneos-arm64/.libs/libffi.a src/libffi-$(FFI_VERSION)/build_iphoneos-armv7/.libs/libffi.a src/libffi-$(FFI_VERSION)/build_iphonesimulator-i386/.libs/libffi.a
90+
# Link the Current, Headers and binary.
91+
cd build/ffi.framework/Versions && ln -si ${FFI_VERSION} Current
92+
cd build/ffi.framework && ln -si Versions/Current/Headers
93+
cd build/ffi.framework && ln -si Versions/Current/ffi
8594

8695
###########################################################################
8796
# rubicon-objc

patch/libffi/build-ios.sh.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

patch/libffi/ffi-sysv.S.patch

Lines changed: 0 additions & 137 deletions
This file was deleted.

patch/libffi/generate-ios-source-and-headers.py.patch

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)