added build libffi script, and fix of pyobjus script
This commit is contained in:
parent
a4b5540d3e
commit
aedcd4e9eb
3 changed files with 29 additions and 2 deletions
26
tools/build-libffi.sh
Executable file
26
tools/build-libffi.sh
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. $(dirname $0)/environment.sh
|
||||||
|
|
||||||
|
if [ ! -f $CACHEROOT/libffi-$FFI_VERSION.tar.gz ]; then
|
||||||
|
try curl -L ftp://sourceware.org/pub/libffi/libffi-$FFI_VERSION.tar.gz > $CACHEROOT/libffi-$FFI_VERSION.tar.gz
|
||||||
|
fi
|
||||||
|
if [ ! -d $TMPROOT/libffi-$FFI_VERSION ]; then
|
||||||
|
try rm -rf $TMPROOT/libffi-$FFI_VERSION
|
||||||
|
try tar xvf $CACHEROOT/libffi-$FFI_VERSION.tar.gz
|
||||||
|
try mv libffi-$FFI_VERSION $TMPROOT
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $TMPROOT/libffi-$FFI_VERSION/Release-iphoneos/libffi.a ]; then
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# lib not found, compile it
|
||||||
|
pushd $TMPROOT/libffi-$FFI_VERSION
|
||||||
|
|
||||||
|
try xcodebuild -project libffi.xcodeproj -target "libffi iOS" -configuration Release -sdk iphoneos$SDKVER OTHER_CFLAGS="-no-integrated-as"
|
||||||
|
|
||||||
|
try cp build/Release-iphoneos/libffi.a $BUILDROOT/lib/libffi.a
|
||||||
|
try cp -a build/Release-iphoneos/usr/local/include $BUILDROOT/include/ffi
|
||||||
|
|
||||||
|
popd
|
|
@ -15,7 +15,7 @@ OLD_CC="$CC"
|
||||||
OLD_CFLAGS="$CFLAGS"
|
OLD_CFLAGS="$CFLAGS"
|
||||||
OLD_LDFLAGS="$LDFLAGS"
|
OLD_LDFLAGS="$LDFLAGS"
|
||||||
OLD_LDSHARED="$LDSHARED"
|
OLD_LDSHARED="$LDSHARED"
|
||||||
export CC="$ARM_CC -I$BUILDROOT/include"
|
export CC="$ARM_CC -I$BUILDROOT/include -I$BUILDROOT/include/ffi"
|
||||||
export CFLAGS="$ARM_CFLAGS"
|
export CFLAGS="$ARM_CFLAGS"
|
||||||
export LDFLAGS="$ARM_LDFLAGS"
|
export LDFLAGS="$ARM_LDFLAGS"
|
||||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||||
|
@ -33,7 +33,7 @@ try $HOSTPYTHON setup.py install -O2 --root iosbuild
|
||||||
# Strip away the large stuff
|
# Strip away the large stuff
|
||||||
find iosbuild/ | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
|
find iosbuild/ | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
|
||||||
rm -rdf "$BUILDROOT/python/lib/python2.7/site-packages/pyobjus"
|
rm -rdf "$BUILDROOT/python/lib/python2.7/site-packages/pyobjus"
|
||||||
try cp -R "iosbuid/Library/Python/2.7/site-packages/pyobjus" "$BUILDROOT/python/lib/python2.7/site-packages"
|
try cp -R "iosbuild/usr/local/lib/python2.7/site-packages/pyobjus" "$BUILDROOT/python/lib/python2.7/site-packages"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
export CC="$OLD_CC"
|
export CC="$OLD_CC"
|
||||||
|
|
|
@ -33,6 +33,7 @@ export FT_VERSION=2.4.8
|
||||||
export XML2_VERSION=2.7.8
|
export XML2_VERSION=2.7.8
|
||||||
export XSLT_VERSION=1.1.26
|
export XSLT_VERSION=1.1.26
|
||||||
export LXML_VERSION=2.3.1
|
export LXML_VERSION=2.3.1
|
||||||
|
export FFI_VERSION=3.0.13
|
||||||
|
|
||||||
# where the build will be located
|
# where the build will be located
|
||||||
export KIVYIOSROOT="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
|
export KIVYIOSROOT="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
|
||||||
|
|
Loading…
Add table
Reference in a new issue