From f485f0bbdee207da45adfc42c67b76ca45bf532b Mon Sep 17 00:00:00 2001 From: gtrivedi Date: Sat, 9 Aug 2014 18:25:16 -0400 Subject: [PATCH 1/2] Added plyer build script --- tools/build-plyer.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 tools/build-plyer.sh diff --git a/tools/build-plyer.sh b/tools/build-plyer.sh new file mode 100755 index 0000000..45966f4 --- /dev/null +++ b/tools/build-plyer.sh @@ -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 ===================" From 145e77bf81936e3696e1765f82b4e8a675addc0f Mon Sep 17 00:00:00 2001 From: gtrivedi Date: Sat, 9 Aug 2014 18:27:33 -0400 Subject: [PATCH 2/2] Added build-plyer.sh --- tools/build-all.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build-all.sh b/tools/build-all.sh index 067147c..7944267 100755 --- a/tools/build-all.sh +++ b/tools/build-all.sh @@ -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"