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

Commit f536835

Browse files
committed
Updated build to work with Xcode 6.
1 parent 771845c commit f536835

File tree

4 files changed

+33
-14
lines changed

4 files changed

+33
-14
lines changed

Makefile

+8-6
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ RUBICON_VERSION=0.1.2
1212
IPHONE_ARMV7_SDK_ROOT=$(shell xcrun --sdk iphoneos --show-sdk-path)
1313
IPHONE_ARMV7_CC=$(shell xcrun -find -sdk iphoneos clang)
1414
IPHONE_ARMV7_LD=$(shell xcrun -find -sdk iphoneos ld)
15-
IPHONE_ARMV7_CFLAGS=-arch armv7 -pipe -no-cpp-precomp -isysroot $(IPHONE_ARMV7_SDK_ROOT) -miphoneos-version-min=5.1.1
16-
IPHONE_ARMV7_LDFLAGS=-arch armv7 -isysroot $(IPHONE_ARMV7_SDK_ROOT) -miphoneos-version-min=5.1.1
15+
IPHONE_ARMV7_CFLAGS=-arch armv7 -pipe -no-cpp-precomp -isysroot $(IPHONE_ARMV7_SDK_ROOT) -miphoneos-version-min=6.0
16+
IPHONE_ARMV7_LDFLAGS=-arch armv7 -isysroot $(IPHONE_ARMV7_SDK_ROOT) -miphoneos-version-min=6.0
1717

1818
# IPHONE build commands and flags
1919
IPHONE_ARMV7S_SDK_ROOT=$(shell xcrun --sdk iphoneos --show-sdk-path)
2020
IPHONE_ARMV7S_CC=$(shell xcrun -find -sdk iphoneos clang)
2121
IPHONE_ARMV7S_LD=$(shell xcrun -find -sdk iphoneos ld)
22-
IPHONE_ARMV7S_CFLAGS=-arch armv7s -pipe -no-cpp-precomp -isysroot $(IPHONE_ARMV7S_SDK_ROOT) -miphoneos-version-min=5.1.1
23-
IPHONE_ARMV7S_LDFLAGS=-arch armv7s -isysroot $(IPHONE_ARMV7S_SDK_ROOT) -miphoneos-version-min=5.1.1
22+
IPHONE_ARMV7S_CFLAGS=-arch armv7s -pipe -no-cpp-precomp -isysroot $(IPHONE_ARMV7S_SDK_ROOT) -miphoneos-version-min=6.0
23+
IPHONE_ARMV7S_LDFLAGS=-arch armv7s -isysroot $(IPHONE_ARMV7S_SDK_ROOT) -miphoneos-version-min=6.0
2424

2525
# IPHONE_SIMULATOR build commands and flags
2626
IPHONE_SIMULATOR_SDK_ROOT=$(shell xcrun --sdk iphonesimulator --show-sdk-path)
2727
IPHONE_SIMULATOR_CC=$(shell xcrun -find -sdk iphonesimulator clang)
2828
IPHONE_SIMULATOR_LD=$(shell xcrun -find -sdk iphonesimulator ld)
29-
IPHONE_SIMULATOR_CFLAGS=-arch i386 -pipe -no-cpp-precomp -isysroot $(IPHONE_SIMULATOR_SDK_ROOT) -miphoneos-version-min=5.1.1
30-
IPHONE_SIMULATOR_LDFLAGS=-arch i386 -isysroot $(IPHONE_SIMULATOR_SDK_ROOT) -miphoneos-version-min=5.1.1
29+
IPHONE_SIMULATOR_CFLAGS=-arch i386 -pipe -no-cpp-precomp -isysroot $(IPHONE_SIMULATOR_SDK_ROOT) -miphoneos-version-min=6.0
30+
IPHONE_SIMULATOR_LDFLAGS=-arch i386 -isysroot $(IPHONE_SIMULATOR_SDK_ROOT) -miphoneos-version-min=6.0
3131

3232

3333
all: working-dirs build/ffi.framework build/Python.framework
@@ -77,6 +77,8 @@ src/libffi-$(FFI_VERSION): downloads/libffi-$(FFI_VERSION).tar.gz
7777
build/ffi.framework: src/libffi-$(FFI_VERSION)
7878
cd src/libffi-$(FFI_VERSION) && patch -p1 -N < ../../patch/libffi/ffi-sysv.S.patch
7979
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
8082
cd src/libffi-$(FFI_VERSION) && python generate-ios-source-and-headers.py
8183
cd src/libffi-$(FFI_VERSION) && xcodebuild -project libffi.xcodeproj -target "Framework" -configuration Release -sdk iphoneos$(SDKVER) OTHER_CFLAGS="-no-integrated-as"
8284
cp -a src/libffi-$(FFI_VERSION)/build/Release-universal/ffi.framework build

README.rst

+1-8
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,7 @@ This should:
5656
The build products will be in the `build` directory. You'll need to add
5757
**all** these frameworks (not just Python.framework) to your project.
5858

59-
.. note:: Xcode version compatibility
60-
61-
At this time, the libraries only compile work with Xcode 5.1.1 and
62-
earlier. See `this ticket`_ for details of a workaround if you need
63-
to have Xcode 6 installed on your machine.
64-
65-
.. _downloaded: https://github.com/pybee/Python-iOS-support/releases/download/2.7.1-b2/Python-2.7.1-iOS-support.b2.tar.gz
59+
.. _downloaded: https://github.com/pybee/Python-iOS-support/releases/download/2.7.1-b3/Python-2.7.1-iOS-support.b3.tar.gz
6660

6761
Acknowledgements
6862
----------------
@@ -76,4 +70,3 @@ The approach to framework packaging is drawn from `Jeff Verkoeyen`_, and
7670
.. _Jeff Verkoeyen: https://github.com/jverkoey/iOS-Framework
7771
.. _Ernesto García's: http://www.raywenderlich.com/41377/creating-a-static-library-in-ios-tutorial
7872
.. _Rubicon Objective-C: http://github.com/pybee/rubicon-objc
79-
.. _this ticket: https://github.com/pybee/Python-iOS-template/issues/3

patch/libffi/build-ios.sh.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--- libffi-3.0.13-old/build-ios.sh 2014-10-20 18:42:48.000000000 +0800
2+
+++ libffi-3.0.13-new/build-ios.sh 2014-10-20 18:43:50.000000000 +0800
3+
@@ -2,8 +2,8 @@
4+
5+
PLATFORM_IOS=/Developer/Platforms/iPhoneOS.platform/
6+
PLATFORM_IOS_SIM=/Developer/Platforms/iPhoneSimulator.platform/
7+
-SDK_IOS_VERSION="4.2"
8+
-MIN_IOS_VERSION="3.0"
9+
+SDK_IOS_VERSION="6.0"
10+
+MIN_IOS_VERSION="6.0"
11+
OUTPUT_DIR="universal-ios"
12+
13+
build_target () {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- libffi-3.0.13-old/generate-ios-source-and-headers.py 2014-10-20 21:16:29.000000000 +0800
2+
+++ libffi-3.0.13-new/generate-ios-source-and-headers.py 2014-10-20 21:16:31.000000000 +0800
3+
@@ -125,7 +125,7 @@
4+
os.makedirs(build_dir)
5+
env = dict(CC=xcrun_cmd('clang'),
6+
LD=xcrun_cmd('ld'),
7+
- CFLAGS='-arch %s -isysroot %s -miphoneos-version-min=4.0' % (platform.arch, platform.sdkroot))
8+
+ CFLAGS='-arch %s -isysroot %s -miphoneos-version-min=6.0' % (platform.arch, platform.sdkroot))
9+
working_dir=os.getcwd()
10+
try:
11+
os.chdir(build_dir)

0 commit comments

Comments
 (0)