Merge pull request #98 from trivedigaurav/buildall_plyer

Buildall plyer
This commit is contained in:
Mathieu Virbel 2014-09-29 22:03:25 +02:00
commit 7c07ccfbdd
2 changed files with 47 additions and 0 deletions

View file

@ -14,6 +14,7 @@ try $(dirname $0)/build-libjpeg.sh
try $(dirname $0)/build-pil.sh
try $(dirname $0)/build-kivy.sh
try $(dirname $0)/build-pyobjus.sh
try $(dirname $0)/build-plyer.sh
echo '== Build done'
echo "Available libraries in $BUILDROOT/lib"

46
tools/build-plyer.sh Executable file
View file

@ -0,0 +1,46 @@
#!/bin/bash
echo "Building plyer ============================="
. $(dirname $0)/environment.sh
if [ ! -d $TMPROOT/plyer ] ; then
try pushd $TMPROOT
try git clone https://github.com/kivy/plyer.git
try popd
fi
try pushd $TMPROOT/plyer
OLD_CC="$CC"
OLD_CFLAGS="$CFLAGS"
OLD_LDFLAGS="$LDFLAGS"
OLD_LDSHARED="$LDSHARED"
export CC="$ARM_CC -I$BUILDROOT/include -I$BUILDROOT/include/ffi"
export CFLAGS="$ARM_CFLAGS"
export LDFLAGS="$ARM_LDFLAGS"
export LDSHARED="$KIVYIOSROOT/tools/liblink"
rm -rdf iosbuild/
try mkdir iosbuild
try $HOSTPYTHON setup.py build
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
# Remove other platforms except ios
iosbuild_path="iosbuild/usr/local/lib/python2.7/site-packages/plyer"
find $iosbuild_path/platforms -mindepth 1 -maxdepth 1 -d -type d ! -iname ios | xargs rm -r
rm -rdf "$BUILDROOT/python/lib/python2.7/site-packages/plyer"
try cp -R $iosbuild_path "$BUILDROOT/python/lib/python2.7/site-packages"
popd
export CC="$OLD_CC"
export CFLAGS="$OLD_CFLAGS"
export LDFLAGS="$OLD_LDFLAGS"
export LDSHARED="$OLD_LDSHARED"
echo "Succesufully finished building plyer ==================="