parent
79c3f66793
commit
e547ffb97d
4 changed files with 10 additions and 10 deletions
|
@ -34,13 +34,13 @@ $HOSTPYTHON setup.py build_ext -g
|
|||
echo "cythoning =========================================="
|
||||
find . -name *.pyx -exec $KIVYIOSROOT/tools/cythonize.py {} \;
|
||||
echo "Second build ======================================="
|
||||
$HOSTPYTHON setup.py build_ext -g
|
||||
$HOSTPYTHON setup.py install -O2 --root iosbuild
|
||||
try $HOSTPYTHON setup.py build_ext -g
|
||||
try $HOSTPYTHON setup.py install -O2 --root iosbuild
|
||||
# Strip away the large stuff
|
||||
find iosbuild/ | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
|
||||
rm -rdf "$BUILDROOT/python/lib/python2.7/site-packages/kivy"
|
||||
# Copy to python for iOS installation
|
||||
cp -R "iosbuild/usr/local/lib/python2.7/site-packages/kivy" "$BUILDROOT/python/lib/python2.7/site-packages"
|
||||
try cp -R "iosbuild/usr/local/lib/python2.7/site-packages/kivy" "$BUILDROOT/python/lib/python2.7/site-packages"
|
||||
|
||||
export LDSHARED="$OLD_LDSHARED"
|
||||
export CFLAGS="$OLD_CFLAGS"
|
||||
|
|
|
@ -42,13 +42,13 @@ echo "Building for iOS ======================================================="
|
|||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$PYTHON_VERSION-xcompile.patch
|
||||
|
||||
# set up environment variables for cross compilation
|
||||
export CPPFLAGS="-I$SDKROOT/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I$SDKROOT/usr/include/"
|
||||
export CPPFLAGS="-I$IOSSDKROOT/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I$IOSSDKROOT/usr/include/"
|
||||
export CPP="$CCACHE /usr/bin/cpp $CPPFLAGS"
|
||||
export MACOSX_DEPLOYMENT_TARGET=
|
||||
|
||||
# make a link to a differently named library for who knows what reason
|
||||
mkdir extralibs||echo "foo"
|
||||
ln -s "$SDKROOT/usr/lib/libgcc_s.1.dylib" extralibs/libgcc_s.10.4.dylib || echo "sdf"
|
||||
ln -s "$IOSSDKROOT/usr/lib/libgcc_s.1.dylib" extralibs/libgcc_s.10.4.dylib || echo "sdf"
|
||||
|
||||
# Copy our setup for modules
|
||||
try cp $KIVYIOSROOT/src/python_files/ModulesSetup Modules/Setup.local
|
||||
|
|
|
@ -8,10 +8,10 @@ try () {
|
|||
"$@" || exit -1
|
||||
}
|
||||
|
||||
# iOS SDK Environmnent
|
||||
# iOS SDK Environmnent (don't use name "SDKROOT"!!! it will break the compilation)
|
||||
export SDKVER=`xcodebuild -showsdks | fgrep "iphoneos" | tail -n 1 | awk '{print $2}'`
|
||||
export DEVROOT=`xcode-select -print-path`/Platforms/iPhoneOS.platform/Developer
|
||||
export SDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
|
||||
export IOSSDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
|
||||
|
||||
if [ ! -d $DEVROOT ]; then
|
||||
echo "Unable to found the Xcode iPhoneOS.platform"
|
||||
|
@ -51,9 +51,9 @@ export ARM_AR="$DEVROOT/usr/bin/ar"
|
|||
export ARM_LD="$DEVROOT/usr/bin/ld"
|
||||
export ARM_CFLAGS="-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8"
|
||||
export ARM_CFLAGS="$ARM_CFLAGS -pipe -no-cpp-precomp"
|
||||
export ARM_CFLAGS="$ARM_CFLAGS -isysroot $SDKROOT"
|
||||
export ARM_CFLAGS="$ARM_CFLAGS -isysroot $IOSSDKROOT"
|
||||
export ARM_CFLAGS="$ARM_CFLAGS -miphoneos-version-min=$SDKVER"
|
||||
export ARM_LDFLAGS="-isysroot $SDKROOT"
|
||||
export ARM_LDFLAGS="-isysroot $IOSSDKROOT"
|
||||
export ARM_LDFLAGS="$ARM_LDFLAGS -miphoneos-version-min=$SDKVER"
|
||||
|
||||
# uncomment this line if you want debugging stuff
|
||||
|
|
|
@ -74,7 +74,7 @@ subprocess.call([
|
|||
'''
|
||||
subprocess.call([
|
||||
"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2",
|
||||
"-isysroot", environ.get('SDKROOT'),
|
||||
"-isysroot", environ.get('IOSSDKROOT'),
|
||||
"-r", "-march=armv7", "-mcpu=arm176jzf", "-mcpu=cortex-a8", "-o", output + ".o" ] + objects)
|
||||
'''
|
||||
|
||||
|
|
Loading…
Reference in a new issue