remove all previous tools scripts
This commit is contained in:
parent
e05c8dab0f
commit
981b4cabf1
23 changed files with 0 additions and 1181 deletions
|
@ -1,24 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
try $(dirname $0)/build-libffi.sh
|
||||
try $(dirname $0)/build-python.sh
|
||||
# Uncomment the "try" line below to add OpenSSL support libraries
|
||||
# For more detail: https://github.com/zen-code/ios-openssl
|
||||
#try $(dirname $0)/build-openssl.sh
|
||||
try $(dirname $0)/reduce-python.sh
|
||||
try $(dirname $0)/build-ios.sh
|
||||
try $(dirname $0)/build-sdl.sh
|
||||
try $(dirname $0)/build-freetype.sh
|
||||
try $(dirname $0)/build-sdlttf.sh
|
||||
try $(dirname $0)/build-sdlmixer.sh
|
||||
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"
|
||||
echo $(ls $BUILDROOT/lib)
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ ! -f $CACHEROOT/audiostream-master.zip ] ; then
|
||||
try curl -L https://github.com/kivy/audiostream/archive/master.zip > $CACHEROOT/audiostream-master.zip
|
||||
fi
|
||||
if [ ! -d $TMPROOT/audiostream-master ]; then
|
||||
cd $TMPROOT
|
||||
try unzip $CACHEROOT/audiostream-master.zip
|
||||
fi
|
||||
|
||||
# build audiostream
|
||||
OLD_CC="$CC"
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
OLD_LDFLAGS="$LDFLAGS"
|
||||
OLD_LDSHARED="$LDSHARED"
|
||||
export CC="$ARM_CC -I$BUILDROOT/include"
|
||||
export CFLAGS="$ARM_CFLAGS"
|
||||
export LDFLAGS="$ARM_LDFLAGS"
|
||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||
|
||||
try pushd $TMPROOT/audiostream-master
|
||||
$HOSTPYTHON setup.py build_ext &>/dev/null
|
||||
try find . -iname '*.pyx' -exec $KIVYIOSROOT/tools/cythonize.py {} \;
|
||||
try $HOSTPYTHON setup.py build_ext
|
||||
try $HOSTPYTHON setup.py install -O2 --root iosbuild
|
||||
try find iosbuild | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
|
||||
try cp -a iosbuild/usr/local/lib/python2.7/site-packages/audiostream "$BUILDROOT/python/lib/python2.7/site-packages"
|
||||
popd
|
||||
|
||||
export CC="$OLD_CC"
|
||||
export CFLAGS="$OLD_CFLAGS"
|
||||
export LDFLAGS="$OLD_LDFLAGS"
|
||||
export LDSHARED="$OLD_LDSHARED"
|
||||
|
||||
bd=$TMPROOT/audiostream-master/build/lib.macosx-*/audiostream
|
||||
try $KIVYIOSROOT/tools/biglink $BUILDROOT/lib/libaudiostream.a $bd $bd/platform $bd/sources
|
||||
deduplicate $BUILDROOT/lib/libaudiostream.a
|
|
@ -1,52 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ ! -d $TMPROOT/ffmpeg-android ] ; then
|
||||
try pushd $TMPROOT
|
||||
try git clone -b ios https://github.com/tito/ffmpeg-android
|
||||
try cd ffmpeg-android
|
||||
try popd
|
||||
fi
|
||||
|
||||
cd $TMPROOT/ffmpeg-android
|
||||
if [ ! -d ffmpeg ]; then
|
||||
try ./extract.sh
|
||||
fi
|
||||
|
||||
OLD_CC="$CC"
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
OLD_LDFLAGS="$LDFLAGS"
|
||||
OLD_LDSHARED="$LDSHARED"
|
||||
export CC="$ARM_CC"
|
||||
export CFLAGS="$ARM_CFLAGS"
|
||||
export LDFLAGS="$ARM_LDFLAGS"
|
||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||
|
||||
# build ffmpeg library
|
||||
try env FFMPEG_ARCHS="ios" ./build-h264-aac.sh
|
||||
|
||||
# build python extension
|
||||
cd python
|
||||
export FFMPEG_LIBRAIRES="SDL2 SDL_mixer"
|
||||
export FFMPEG_LIBRARY_DIRS="$BUILDROOT/lib/lib"
|
||||
export FFMPEG_INCLUDES="$BUILDROOT/include $BUILDROOT/include/SDL"
|
||||
export FFMPEG_ROOT="$TMPROOT/ffmpeg-android/build/ffmpeg/armeabi-a8"
|
||||
|
||||
$HOSTPYTHON setup.py build_ext -v &>/dev/null
|
||||
try find . -iname '*.pyx' -exec $KIVYIOSROOT/tools/cythonize.py {} \;
|
||||
try $HOSTPYTHON setup.py install -O2 --root iosbuild
|
||||
try find iosbuild | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
|
||||
try cp -a iosbuild/usr/local/lib/python2.7/site-packages/ffmpeg "$BUILDROOT/python/lib/python2.7/site-packages"
|
||||
|
||||
export CC="$OLD_CC"
|
||||
export CFLAGS="$OLD_CFLAGS"
|
||||
export LDFLAGS="$OLD_LDFLAGS"
|
||||
export LDSHARED="$OLD_LDSHARED"
|
||||
|
||||
bd=$TMPROOT/ffmpeg-android/python/build/lib.macosx-*/ffmpeg
|
||||
try $KIVYIOSROOT/tools/biglink $BUILDROOT/lib/libffmpeg.a $bd
|
||||
deduplicate $BUILDROOT/lib/libffmpeg.a
|
||||
|
||||
# copy ffmpeg libraries too
|
||||
try cp -a $TMPROOT/ffmpeg-android/build/ffmpeg/armeabi-a8/lib/*.a $BUILDROOT/lib/
|
|
@ -1,34 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ ! -f $CACHEROOT/freetype-$FT_VERSION.tar.gz ]; then
|
||||
try curl -L http://downloads.sourceforge.net/project/freetype/freetype2/$FT_VERSION/freetype-$FT_VERSION.tar.gz > $CACHEROOT/freetype-$FT_VERSION.tar.gz
|
||||
fi
|
||||
if [ ! -d $TMPROOT/freetype-$FT_VERSION ]; then
|
||||
try rm -rf $TMPROOT/freetype-$FT_VERSION
|
||||
try tar xvf $CACHEROOT/freetype-$FT_VERSION.tar.gz
|
||||
try mv freetype-$FT_VERSION $TMPROOT
|
||||
fi
|
||||
|
||||
if [ -f $TMPROOT/freetype-$FT_VERSION/libfreetype-arm7.a ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# lib not found, compile it
|
||||
pushd $TMPROOT/freetype-$FT_VERSION
|
||||
try ./configure --prefix=$DESTROOT \
|
||||
--host=arm-apple-darwin \
|
||||
--enable-static=yes \
|
||||
--enable-shared=no \
|
||||
CC="$ARM_CC" AR="$ARM_AR" \
|
||||
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS"
|
||||
try make clean
|
||||
try make
|
||||
try make install
|
||||
|
||||
# copy to buildroot
|
||||
cp objs/.libs/libfreetype.a $BUILDROOT/lib/libfreetype.a
|
||||
cp -a include $BUILDROOT/include/freetype
|
||||
|
||||
popd
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
OLD_CC="$CC"
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
OLD_LDFLAGS="$LDFLAGS"
|
||||
OLD_LDSHARED="$LDSHARED"
|
||||
export CC="$ARM_CC -I$BUILDROOT/include"
|
||||
export CFLAGS="$ARM_CFLAGS"
|
||||
export LDFLAGS="$ARM_LDFLAGS"
|
||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||
|
||||
try pushd $KIVYIOSROOT/src/ios
|
||||
try $KIVYIOSROOT/tools/cythonize.py *.pyx
|
||||
try $HOSTPYTHON setup.py build_ext
|
||||
try $HOSTPYTHON setup.py install -O2 --root iosbuild
|
||||
try find iosbuild | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
|
||||
try rm -rdf "$BUILDROOT/python/lib/python2.7/site-packages/ios*"
|
||||
try cp iosbuild/usr/local/lib/python2.7/site-packages/ios.so "$BUILDROOT/python/lib/python2.7/site-packages"
|
||||
popd
|
||||
|
||||
export CC="$OLD_CC"
|
||||
export CFLAGS="$OLD_CFLAGS"
|
||||
export LDFLAGS="$OLD_LDFLAGS"
|
||||
export LDSHARED="$OLD_LDSHARED"
|
||||
|
||||
bd=$KIVYIOSROOT/src/ios/build/lib.macosx-*/
|
||||
try $KIVYIOSROOT/tools/biglink $BUILDROOT/lib/libios.a $bd
|
||||
deduplicate $BUILDROOT/lib/libios.a
|
|
@ -1,60 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ "X$KIVY_BRANCH" == "X" ]; then
|
||||
KIVY_BRANCH=stable
|
||||
fi
|
||||
|
||||
if [ "X$KIVY_REPO" == "X" ]; then
|
||||
KIVY_REPO=https://github.com/kivy/kivy
|
||||
fi
|
||||
|
||||
if [ ! -d $TMPROOT/kivy ] ; then
|
||||
try pushd $TMPROOT
|
||||
try git clone -b $KIVY_BRANCH $KIVY_REPO
|
||||
try cd kivy
|
||||
try popd
|
||||
fi
|
||||
|
||||
if [ "X$1" = "X-f" ] ; then
|
||||
try pushd $TMPROOT/kivy
|
||||
try git clean -dxf
|
||||
try git pull origin $KIVY_BRANCH
|
||||
try popd
|
||||
fi
|
||||
|
||||
pushd $TMPROOT/kivy
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
OLD_LDSHARED="$LDSHARED"
|
||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||
export CFLAGS="$ARM_CFLAGS"
|
||||
|
||||
ln -s $KIVYIOSROOT/Python-$IOS_PYTHON_VERSION/python
|
||||
ln -s $KIVYIOSROOT/Python-$IOS_PYTHON_VERSION/python.exe
|
||||
|
||||
rm -rdf iosbuild/
|
||||
try mkdir iosbuild
|
||||
|
||||
echo "First build ========================================"
|
||||
HOSTPYTHON=$TMPROOT/Python-$IOS_PYTHON_VERSION/hostpython
|
||||
$HOSTPYTHON setup.py build_ext -g
|
||||
echo "cythoning =========================================="
|
||||
find . -name *.pyx -exec $KIVYIOSROOT/tools/cythonize.py {} \;
|
||||
echo "Second build ======================================="
|
||||
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
|
||||
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"
|
||||
popd
|
||||
|
||||
# FIXME this part is build/cpu dependent :/
|
||||
bd=$TMPROOT/kivy/build/lib.macosx-*/kivy
|
||||
try $KIVYIOSROOT/tools/biglink $BUILDROOT/lib/libkivy.a $bd $bd/graphics $bd/core/window $bd/core/text $bd/core/image $bd/core/audio
|
||||
deduplicate $BUILDROOT/lib/libkivy.a
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Building libffi ============================="
|
||||
|
||||
. $(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/build/Release-iphoneos/libffi.a ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# lib not found, compile it
|
||||
pushd $TMPROOT/libffi-$FFI_VERSION
|
||||
try patch -p1 < $KIVYIOSROOT/src/ffi_files/ffi-$FFI_VERSION-sysv.S.patch
|
||||
|
||||
# libffi needs to use "-miphoneos-version-min=6.0" for xcode 6+ to compile it correctly
|
||||
sed -i.bak s/-miphoneos-version-min=4.0/-miphoneos-version-min=6.0/g generate-ios-source-and-headers.py
|
||||
|
||||
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
|
|
@ -1,44 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
echo "Building libjpeg...."
|
||||
|
||||
if [ ! -f $CACHEROOT/jpegsrc.v6b.tar.gz ]; then
|
||||
try curl -L http://downloads.sourceforge.net/project/libjpeg/libjpeg/6b/jpegsrc.v6b.tar.gz > $CACHEROOT/jpegsrc.v6b.tar.gz
|
||||
fi
|
||||
if [ ! -d $TMPROOT/jpeg-6b ]; then
|
||||
rm -rf $CACHEROOT/jpeg-6b
|
||||
try tar -xvf $CACHEROOT/jpegsrc.v6b.tar.gz
|
||||
try mv jpeg-6b $TMPROOT
|
||||
fi
|
||||
|
||||
# lib not found, compile it
|
||||
echo "Configuring...."
|
||||
pushd $TMPROOT/jpeg-6b
|
||||
try ./configure --prefix=$DESTROOT \
|
||||
--host=arm-apple-darwin \
|
||||
--enable-static=yes \
|
||||
--enable-shared=no \
|
||||
CC="$ARM_CC" AR="$ARM_AR" \
|
||||
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS"
|
||||
patch < $KIVYIOSROOT/src/jpeg_files/jpeg_makefile.patch
|
||||
try make clean
|
||||
make #With controlled errors
|
||||
|
||||
rm *.a
|
||||
rm cjpeg.o
|
||||
rm djpeg.o
|
||||
rm jpegtran.o
|
||||
rm rdjpgcom.o
|
||||
rm urjpgcom.o
|
||||
rm rdjtran.o
|
||||
rm wrjpgcom.o
|
||||
ar rcs libjpeg.a *.o
|
||||
|
||||
|
||||
# copy to buildroot
|
||||
cp libjpeg.a $BUILDROOT/lib/libjpeg.a
|
||||
cp *.h $BUILDROOT/include/
|
||||
|
||||
popd
|
|
@ -1,124 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ ! -f $CACHEROOT/libxml2-$XML2_VERSION.tar.gz ] ; then
|
||||
try curl -L ftp://xmlsoft.org/libxml2/libxml2-$XML2_VERSION.tar.gz > $CACHEROOT/libxml2-$XML2_VERSION.tar.gz
|
||||
fi
|
||||
if [ ! -d $TMPROOT/libxml2-$XML2_VERSION ]; then
|
||||
try tar xzf $CACHEROOT/libxml2-$XML2_VERSION.tar.gz
|
||||
try rm -rf $TMPROOT/libxml2-$XML2_VERSION
|
||||
try mv libxml2-$XML2_VERSION $TMPROOT
|
||||
|
||||
fi
|
||||
|
||||
if [ ! -f $CACHEROOT/libxslt-$XSLT_VERSION.tar.gz ] ; then
|
||||
try curl -L ftp://xmlsoft.org/libxml2/libxslt-$XSLT_VERSION.tar.gz > $CACHEROOT/libxslt-$XSLT_VERSION.tar.gz
|
||||
fi
|
||||
if [ ! -d $TMPROOT/libxslt-$XSLT_VERSION ]; then
|
||||
try tar xzf $CACHEROOT/libxslt-$XSLT_VERSION.tar.gz
|
||||
try rm -rf $TMPROOT/libxslt-$XML2_VERSION
|
||||
try mv libxslt-$XSLT_VERSION $TMPROOT
|
||||
fi
|
||||
|
||||
if [ ! -f $CACHEROOT/lxml-$LXML_VERSION.tar.gz ]; then
|
||||
try curl -L http://pypi.python.org/packages/source/l/lxml/lxml-$LXML_VERSION.tar.gz > $CACHEROOT/lxml-$LXML_VERSION.tar.gz
|
||||
fi
|
||||
if [ ! -d $TMPROOT/lxml-$LXML_VERSION ]; then
|
||||
try tar xzf $CACHEROOT/lxml-$LXML_VERSION.tar.gz
|
||||
try rm -rf $TMPROOT/lxml-$LXML_VERSION
|
||||
try mv lxml-$LXML_VERSION $TMPROOT
|
||||
fi
|
||||
|
||||
PREFIX=$TMPROOT/lxmlinstall
|
||||
if [ ! -d $PREFIX ]; then
|
||||
try mkdir $PREFIX
|
||||
fi
|
||||
|
||||
# build libxml2
|
||||
pushd $TMPROOT/libxml2-$XML2_VERSION
|
||||
if [ ! -f .libs/libxml2.a ]; then
|
||||
try ./configure \
|
||||
--host=arm-apple-darwin \
|
||||
--enable-static=yes \
|
||||
--enable-shared=no \
|
||||
--without-modules \
|
||||
--without-legacy \
|
||||
--without-history \
|
||||
--without-debug \
|
||||
--without-docbook \
|
||||
--without-python \
|
||||
--without-iconv \
|
||||
--prefix=$PREFIX \
|
||||
CC="$ARM_CC" AR="$ARM_AR" \
|
||||
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS"
|
||||
try sed -i '' 's/ runtest\$(EXEEXT) \\/ \\/' Makefile
|
||||
try sed -i '' 's/ testrecurse\$(EXEEXT)$//' Makefile
|
||||
try make clean install
|
||||
try make
|
||||
try make install
|
||||
try cp .libs/libxml2.a $BUILDROOT/lib/libxml2.a
|
||||
try cp -a include $BUILDROOT/include/libxml2
|
||||
fi
|
||||
popd
|
||||
|
||||
# build libxslt
|
||||
pushd $TMPROOT/libxslt-$XSLT_VERSION
|
||||
if [ ! -f libxslt/.libs/libxslt.a ]; then
|
||||
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-eabi \
|
||||
--enable-static=yes \
|
||||
--enable-shared=no \
|
||||
--without-plugins \
|
||||
--without-debug \
|
||||
--without-python \
|
||||
--without-crypto \
|
||||
--with-libxml-src=$TMPROOT/libxml2-$XML2_VERSION \
|
||||
--prefix=$PREFIX \
|
||||
CC="$ARM_CC" AR="$ARM_AR" \
|
||||
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS"
|
||||
|
||||
try make clean
|
||||
try make
|
||||
try make install
|
||||
|
||||
try cp libxslt/.libs/libxslt.a $BUILDROOT/lib/libxslt.a
|
||||
try cp libexslt/.libs/libexslt.a $BUILDROOT/lib/libexslt.a
|
||||
fi
|
||||
popd
|
||||
|
||||
# build lxml
|
||||
OLD_CC="$CC"
|
||||
OLD_LDFLAGS="$LDFLAGS"
|
||||
OLD_LDSHARED="$LDSHARED"
|
||||
OLD_PATH="$PATH"
|
||||
export PATH="$PREFIX/bin:$PATH"
|
||||
export CC="$ARM_CC -I$PREFIX/include"
|
||||
export LDFLAGS="$ARM_LDFLAGS -L$PREFIX/lib"
|
||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||
|
||||
pushd $TMPROOT/lxml-$LXML_VERSION
|
||||
XML2_CONFIG=$PREFIX/bin/xml2-config
|
||||
XSLT_CONFIG=$PREFIX/bin/xslt-config
|
||||
|
||||
#pushd src
|
||||
#find . -name *.pyx -exec $KIVYIOSROOT/tools/cythonize.py {} \;
|
||||
#popd
|
||||
find . -name *.pyx -exec $CYTHON {} \;
|
||||
|
||||
try $HOSTPYTHON setup.py build_ext
|
||||
try $HOSTPYTHON setup.py install -O2 --root iosbuild
|
||||
|
||||
find iosbuild/ | grep -E '*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
|
||||
rm -rdf "$BUILDROOT/python/lib/python2.7/site-packages/lxml"
|
||||
try cp -R "iosbuild/usr/local/lib/python2.7/site-packages/lxml" "$BUILDROOT/python/lib/python2.7/site-packages"
|
||||
|
||||
popd
|
||||
|
||||
export CC="$OLD_CC"
|
||||
export LDFLAGS="$OLD_LDFLAGS"
|
||||
export LDSHARED="$OLD_LDSHARED"
|
||||
export PATH="$OLD_PATH"
|
||||
|
||||
bd=$TMPROOT/lxml-$LXML_VERSION/build/lib.macosx-*/lxml
|
||||
try $KIVYIOSROOT/tools/biglink $BUILDROOT/lib/liblxml.a $bd
|
||||
deduplicate $BUILDROOT/lib/liblxml.a
|
|
@ -1,71 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ ! -f $CACHEROOT/numpy-$NUMPY_VERSION.tar.gz ] ; then
|
||||
try curl -L http://pypi.python.org/packages/source/n/numpy/numpy-$NUMPY_VERSION.tar.gz > $CACHEROOT/numpy-$NUMPY_VERSION.tar.gz
|
||||
fi
|
||||
if [ ! -d $TMPROOT/numpy-$NUMPY_VERSION ]; then
|
||||
cd $TMPROOT
|
||||
try tar -xvf $CACHEROOT/numpy-$NUMPY_VERSION.tar.gz
|
||||
try cd numpy-$NUMPY_VERSION
|
||||
try patch -p1 < $KIVYIOSROOT/src/numpy-$NUMPY_VERSION.patch
|
||||
try cd ../..
|
||||
fi
|
||||
|
||||
# Save current flags
|
||||
OLD_CC="$CC"
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
OLD_LDFLAGS="$LDFLAGS"
|
||||
OLD_LDSHARED="$LDSHARED"
|
||||
export CC="$ARM_CC -I$BUILDROOT/include"
|
||||
export CFLAGS="$ARM_CFLAGS"
|
||||
export LDFLAGS="$ARM_LDFLAGS"
|
||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||
|
||||
# CC must have the CFLAGS with arm arch, because numpy tries first to compile
|
||||
# and execute an empty C to see if the compiler works. This is obviously not
|
||||
# working when crosscompiling
|
||||
export CC="$ARM_CC $CFLAGS"
|
||||
|
||||
# Numpy configuration. Don't try to compile anything related to it, we're
|
||||
# going to use the Accelerate framework
|
||||
NPYCONFIG="env BLAS=None LAPACK=None ATLAS=None"
|
||||
|
||||
try pushd $TMPROOT/numpy-$NUMPY_VERSION
|
||||
try $NPYCONFIG $HOSTPYTHON setup.py build_ext -v
|
||||
try $NPYCONFIG $HOSTPYTHON setup.py install -O2 --root iosbuild
|
||||
try find iosbuild | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/core/include
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/core/tests
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/distutils
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/doc
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/f2py/tests
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/fft/tests
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/lib/tests
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/ma/tests
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/matrixlib/tests
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/polynomial/tests
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/random/tests
|
||||
try rm -rf iosbuild/usr/local/lib/python2.7/site-packages/numpy/tests
|
||||
if [ -d "$BUILDROOT/python/lib/python2.7/site-packages/numpy" ]; then
|
||||
rm -rf $BUILDROOT/python/lib/python2.7/site-packages
|
||||
fi
|
||||
try cp -a iosbuild/usr/local/lib/python2.7/site-packages/numpy "$BUILDROOT/python/lib/python2.7/site-packages/"
|
||||
popd
|
||||
|
||||
# Restore the old compilation flags
|
||||
export CC="$OLD_CC"
|
||||
export CFLAGS="$OLD_CFLAGS"
|
||||
export LDFLAGS="$OLD_LDFLAGS"
|
||||
export LDSHARED="$OLD_LDSHARED"
|
||||
|
||||
# Create the static library
|
||||
bd=$TMPROOT/numpy-$NUMPY_VERSION/build/lib.macosx-*/numpy
|
||||
rm -f $BUILDROOT/lib/libnumpy.a
|
||||
try $KIVYIOSROOT/tools/biglink $BUILDROOT/lib/libnumpy.a \
|
||||
$bd/core $bd/lib $bd/fft $bd/linalg $bd/random
|
||||
deduplicate \
|
||||
$BUILDROOT/lib/libnumpy.a \
|
||||
$TMPROOT/numpy-$NUMPY_VERSION/build/temp.macosx-*/libnpymath.a \
|
||||
$TMPROOT/numpy-$NUMPY_VERSION/build/temp.macosx-*/libnpysort.a
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
echo "Modifying Python Setup.dist..."
|
||||
cp $TMPROOT/Python-2.7.1/Modules/Setup.dist $KIVYIOSROOT/src/python_files
|
||||
|
||||
SETUP_DIST=$KIVYIOSROOT/src/python_files/Setup.dist
|
||||
echo "" >> $SETUP_DIST
|
||||
echo "# Adding SSL Links" >> $SETUP_DIST
|
||||
echo "# Socket module helper for sockets" >> $SETUP_DIST
|
||||
echo "_socket socketmodule.c" >> $SETUP_DIST
|
||||
echo "SSL=$TMPROOT/openssl/ios-openssl/openssl" >> $SETUP_DIST
|
||||
echo "_ssl _ssl.c \\" >> $SETUP_DIST
|
||||
echo " -DUSE_SSL -I\$(SSL)/include -I\$(SSL)/include/openssl \\" >> $SETUP_DIST
|
||||
echo " -L\$(SSL)/lib -lssl -lcrypto" >> $SETUP_DIST
|
||||
|
||||
echo "Cleaning and rebuilding Python to inlcude SSL links..."
|
||||
sh $KIVYIOSROOT/tools/clean_python.sh
|
||||
sh $KIVYIOSROOT/tools/build-python.sh
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ ! -d $TMPROOT/openssl ] ; then
|
||||
mkdir $TMPROOT/openssl
|
||||
fi
|
||||
|
||||
# Check we have a cloned repo
|
||||
if [ ! -d $TMPROOT/openssl/ios-openssl ] ; then
|
||||
echo "ios-openssl repo not found. Pulling latest..."
|
||||
try pushd .
|
||||
cd $TMPROOT/openssl
|
||||
try git clone -b master https://github.com/zen-code/ios-openssl
|
||||
try popd
|
||||
fi
|
||||
|
||||
# Build the required binaries if not found (long process)
|
||||
if [ ! -f $BUILDROOT/lib/libssl.a ] ; then
|
||||
if [ -d $TMPROOT/openssl/ios-openssl ] ; then
|
||||
echo "ios-openssl repo found. Building now..."
|
||||
if [ ! -d $TMPROOT/openssl/ios-openssl/lib ] ; then
|
||||
try mkdir $TMPROOT/openssl/ios-openssl/lib
|
||||
fi
|
||||
try pushd .
|
||||
cd $TMPROOT/openssl/ios-openssl
|
||||
# Please refer to the script below for details of the OpenSSL build
|
||||
sh build.sh
|
||||
try popd
|
||||
fi
|
||||
else
|
||||
echo "Skipping build. Binary found: $BUILDROOT/lib/libssl.a"
|
||||
fi
|
||||
|
||||
echo "Copying built OpenSSL binaries..."
|
||||
cp $TMPROOT/openssl/ios-openssl/lib/libssl.a $BUILDROOT/lib/libssl.a
|
||||
cp $TMPROOT/openssl/ios-openssl/lib/libcrypto.a $BUILDROOT/lib/libcrypto.a
|
||||
|
||||
sh $KIVYIOSROOT/tools/build-openssl-link.sh
|
|
@ -1,42 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ ! -f $CACHEROOT/Imaging-1.1.7.tar.gz ] ; then
|
||||
try curl -L http://effbot.org/downloads/Imaging-1.1.7.tar.gz > $CACHEROOT/Imaging-1.1.7.tar.gz
|
||||
fi
|
||||
if [ ! -d $TMPROOT/Imaging-1.1.7 ]; then
|
||||
cd $TMPROOT
|
||||
try tar -xvf $CACHEROOT/Imaging-1.1.7.tar.gz
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# build audiostream
|
||||
OLD_CC="$CC"
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
OLD_LDFLAGS="$LDFLAGS"
|
||||
OLD_LDSHARED="$LDSHARED"
|
||||
export CC="$ARM_CC -I$BUILDROOT/include -I$BUILDROOT/include/freetype"
|
||||
export CFLAGS="$ARM_CFLAGS"
|
||||
export LDFLAGS="$ARM_LDFLAGS"
|
||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||
|
||||
try pushd $TMPROOT/Imaging-1.1.7
|
||||
patch -p1 < $KIVYIOSROOT/src/pil_files/patch_pil.patch
|
||||
$HOSTPYTHON setup.py build_ext &>/dev/null
|
||||
try find . -iname '*.pyx' -exec $KIVYIOSROOT/tools/cythonize.py {} \;
|
||||
try $HOSTPYTHON setup.py build_ext
|
||||
try $HOSTPYTHON setup.py install -O2 --root iosbuild
|
||||
try find iosbuild | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
|
||||
try cp -a iosbuild/usr/local/lib/python2.7/site-packages/PIL "$BUILDROOT/python/lib/python2.7/site-packages"
|
||||
popd
|
||||
|
||||
export CC="$OLD_CC"
|
||||
export CFLAGS="$OLD_CFLAGS"
|
||||
export LDFLAGS="$OLD_LDFLAGS"
|
||||
export LDSHARED="$OLD_LDSHARED"
|
||||
|
||||
bd=$TMPROOT/Imaging-1.1.7/build/lib.macosx-*
|
||||
try $KIVYIOSROOT/tools/biglink $BUILDROOT/lib/libpil.a $bd
|
||||
deduplicate $BUILDROOT/lib/libpil.a
|
|
@ -1,46 +0,0 @@
|
|||
#!/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 ==================="
|
|
@ -1,48 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Building pyobjus ============================="
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ ! -d $TMPROOT/pyobjus ] ; then
|
||||
try pushd $TMPROOT
|
||||
try git clone https://github.com/kivy/pyobjus.git
|
||||
try popd
|
||||
fi
|
||||
|
||||
try pushd $TMPROOT/pyobjus
|
||||
|
||||
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_ext
|
||||
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/pyobjus"
|
||||
try cp -R "iosbuild/usr/local/lib/python2.7/site-packages/pyobjus" "$BUILDROOT/python/lib/python2.7/site-packages"
|
||||
popd
|
||||
|
||||
export CC="$OLD_CC"
|
||||
export CFLAGS="$OLD_CFLAGS"
|
||||
export LDFLAGS="$OLD_LDFLAGS"
|
||||
export LDSHARED="$OLD_LDSHARED"
|
||||
|
||||
bd=$TMPROOT/pyobjus/build/lib.macosx-*/pyobjus
|
||||
try $KIVYIOSROOT/tools/biglink $BUILDROOT/lib/libpyobjus.a $bd
|
||||
deduplicate $BUILDROOT/lib/libpyobjus.a
|
||||
|
||||
# copy objc bridge class -> it is used for implementing some objc methods, eg. for accelerometer
|
||||
try cp $TMPROOT/pyobjus/objc_classes/aux/* $KIVYIOSROOT/tools/templates
|
||||
|
||||
echo "Successfully finished building pyobjus ==================="
|
|
@ -1,87 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
# credit to:
|
||||
# http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html
|
||||
# http://latenitesoft.blogspot.com/2008/10/iphone-programming-tips-building-unix.html
|
||||
|
||||
# download python and patch if they aren't there
|
||||
if [ ! -f $CACHEROOT/Python-$IOS_PYTHON_VERSION.tar.bz2 ]; then
|
||||
curl -L https://www.python.org/ftp//python/$IOS_PYTHON_VERSION/Python-$IOS_PYTHON_VERSION.tar.bz2 > $CACHEROOT/Python-$IOS_PYTHON_VERSION.tar.bz2
|
||||
fi
|
||||
|
||||
# get rid of old build
|
||||
rm -rf $TMPROOT/Python-$IOS_PYTHON_VERSION
|
||||
try tar -xjf $CACHEROOT/Python-$IOS_PYTHON_VERSION.tar.bz2
|
||||
try mv Python-$IOS_PYTHON_VERSION $TMPROOT
|
||||
try pushd $TMPROOT/Python-$IOS_PYTHON_VERSION
|
||||
|
||||
# Patch Python for temporary reduce PY_SSIZE_T_MAX otherzise, splitting string doesnet work
|
||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-ssize-t-max.patch
|
||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-dynload.patch
|
||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-static-_sqlite3.patch
|
||||
|
||||
# Copy our setup for modules
|
||||
try cp $KIVYIOSROOT/src/python_files/ModulesSetup Modules/Setup.local
|
||||
try cp $KIVYIOSROOT/src/python_files/_scproxy.py Lib/_scproxy.py
|
||||
if [ -f $KIVYIOSROOT/src/python_files/Setup.dist ]; then
|
||||
# Used by build-openssl.sh to insert links
|
||||
try cp $KIVYIOSROOT/src/python_files/Setup.dist Modules/Setup.dist
|
||||
fi
|
||||
|
||||
echo "Building for native machine ============================================"
|
||||
|
||||
OSX_SDK_ROOT=`xcrun --sdk macosx --show-sdk-path`
|
||||
try ./configure CC="clang -Qunused-arguments -fcolor-diagnostics" LDFLAGS="-lsqlite3" CFLAGS="--sysroot=$OSX_SDK_ROOT"
|
||||
try make -j4 python.exe Parser/pgen
|
||||
try mv python.exe hostpython
|
||||
try mv Parser/pgen Parser/hostpgen
|
||||
try make distclean
|
||||
|
||||
echo "Building for iOS ======================================================="
|
||||
|
||||
# patch python to cross-compile
|
||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-xcompile.patch
|
||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-setuppath.patch
|
||||
|
||||
# set up environment variables for cross compilation
|
||||
#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 "$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
|
||||
try cat $KIVYIOSROOT/src/python_files/ModulesSetup.mobile >> Modules/Setup.local
|
||||
try cp $KIVYIOSROOT/src/python_files/_scproxy.py Lib/_scproxy.py
|
||||
if [ -f $KIVYIOSROOT/src/python_files/Setup.dist ]; then
|
||||
# Used by build-openssl.sh to insert links
|
||||
try cp $KIVYIOSROOT/src/python_files/Setup.dist Modules/Setup.dist
|
||||
fi
|
||||
|
||||
try ./configure CC="$ARM_CC" LD="$ARM_LD" \
|
||||
CFLAGS="$ARM_CFLAGS" \
|
||||
LDFLAGS="$ARM_LDFLAGS -Lextralibs/ -lsqlite3 -L$BUILDROOT/lib -undefined dynamic_lookup" \
|
||||
--without-pymalloc \
|
||||
--disable-toolbox-glue \
|
||||
--host=armv7-apple-darwin \
|
||||
--prefix=/python \
|
||||
--without-doc-strings
|
||||
|
||||
# with undefined lookup, checks in configure just failed :(
|
||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-pyconfig.patch
|
||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-ctypes_duplicate.patch
|
||||
|
||||
try make -j4 HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen \
|
||||
CROSS_COMPILE_TARGET=yes
|
||||
|
||||
try make install HOSTPYTHON=./hostpython CROSS_COMPILE_TARGET=yes \
|
||||
prefix="$BUILDROOT/python"
|
||||
|
||||
try mv -f $BUILDROOT/python/lib/libpython2.7.a $BUILDROOT/lib/
|
||||
|
||||
deduplicate $BUILDROOT/lib/libpython2.7.a
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/bash
|
||||
. $(dirname $0)/environment.sh
|
||||
pushd $KIVYIOSROOT/src/SDL/Xcode-iOS/SDL
|
||||
xcodebuild -project SDL.xcodeproj -target libSDL -configuration Release -sdk iphoneos$SDKVER
|
||||
popd
|
||||
|
||||
cp $KIVYIOSROOT/src/SDL/Xcode-iOS/SDL/build/Release-iphoneos/libSDL2.a $BUILDROOT/lib
|
||||
cp -a $KIVYIOSROOT/src/SDL/include $BUILDROOT/include/SDL
|
||||
|
||||
cat>$BUILDROOT/pkgconfig/sdl.pc<<EOF
|
||||
# sdl pkg-config source file
|
||||
|
||||
prefix=$BUILDROOT
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${exec_prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
|
||||
Name: sdl
|
||||
Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
|
||||
Version: 1.2.15
|
||||
Requires:
|
||||
Conflicts:
|
||||
Libs: -L\${libdir} -lSDLmain -lSDL -Wl,-framework,Cocoa
|
||||
Libs.private: \${libdir}/libSDLmain.a \${libdir}/libSDL.a -Wl,-framework,OpenGL -Wl,-framework,Cocoa -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit
|
||||
Cflags: -I\${includedir}/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE
|
||||
EOF
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
pushd $TMPROOT
|
||||
|
||||
if [ ! -f SDL ]; then
|
||||
ln -s $KIVYIOSROOT/src/SDL SDL
|
||||
fi
|
||||
|
||||
if [ ! -d SDL_mixer ]; then
|
||||
try hg clone http://hg.libsdl.org/SDL_mixer/#SDL-1.2
|
||||
fi
|
||||
if [ ! -d libtremor/tremor ]; then
|
||||
try mkdir -p libtremor
|
||||
try cd libtremor
|
||||
try svn co https://svn.xiph.org/trunk/Tremor tremor
|
||||
try cd tremor
|
||||
try patch -p0 < $KIVYIOSROOT/src/tremor-configure.patch
|
||||
try cd ../..
|
||||
fi
|
||||
if [ ! -d libogg ]; then
|
||||
try curl -L http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz > $CACHEROOT/libogg-1.3.0.tar.gz
|
||||
try tar xzf $CACHEROOT/libogg-1.3.0.tar.gz
|
||||
try mv libogg-1.3.0 libogg
|
||||
fi
|
||||
|
||||
if [ ! -f libogg/src/.libs/libogg.a ]; then
|
||||
try cd libogg
|
||||
try ./configure --disable-shared \
|
||||
--prefix=$DESTROOT \
|
||||
--host=arm-apple-darwin \
|
||||
--enable-static=yes \
|
||||
--enable-shared=no \
|
||||
CC="$ARM_CC" AR="$ARM_AR" \
|
||||
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS"
|
||||
try make
|
||||
try make install
|
||||
try cd ..
|
||||
fi
|
||||
|
||||
if [ ! -f libtremor/tremor/.libs/libvorbisidec.a ]; then
|
||||
try cd libtremor/tremor
|
||||
echo > asm_arm.h
|
||||
CC="$ARM_CC" AR="$ARM_AR" \
|
||||
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS" \
|
||||
OGG_CFLAGS="-I../../libogg/include" \
|
||||
OGG_LDFLAGS="-L../../libogg/src/.libs" \
|
||||
PKG_CONFIG_LIBDIR="../../libogg" \
|
||||
ACLOCAL_FLAGS="-I $DESTROOT/share/aclocal -I `aclocal --print-ac-dir` -I /usr/local/share/aclocal" ./autogen.sh \
|
||||
--prefix=$DESTROOT \
|
||||
--disable-shared \
|
||||
--host=arm-apple-darwin \
|
||||
--enable-static=yes \
|
||||
--enable-shared=no
|
||||
try make
|
||||
try make install
|
||||
try cd ../..
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
try cp $TMPROOT/libogg/src/.libs/libogg.a $BUILDROOT/lib
|
||||
try cp $TMPROOT/libtremor/tremor/.libs/libvorbisidec.a $BUILDROOT/lib
|
||||
|
||||
if [ -f $TMPROOT/SDL_mixer/libSDL_mixer-arm7.a ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
if [ ! -f $TMPROOT/libtremor/ogg ]; then
|
||||
ln -s $TMPROOT/libogg/include/ogg $TMPROOT/libtremor
|
||||
fi
|
||||
|
||||
pushd $TMPROOT/SDL_mixer/Xcode-iOS
|
||||
try xcodebuild -project SDL_mixer.xcodeproj -configuration Release
|
||||
popd
|
||||
|
||||
try cp $TMPROOT/SDL_mixer/Xcode-iOS/build/Release-iphoneos/libSDL_mixer.a $BUILDROOT/lib
|
||||
try cp -a $TMPROOT/SDL_mixer/SDL_mixer.h $BUILDROOT/include
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ ! -f $CACHEROOT/SDL_ttf-$SDLTTF_VERSION.tar.gz ]; then
|
||||
try curl -L http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-$SDLTTF_VERSION.tar.gz > $CACHEROOT/SDL_ttf-$SDLTTF_VERSION.tar.gz
|
||||
fi
|
||||
if [ ! -d $TMPROOT/SDL_ttf-$SDLTTF_VERSION ]; then
|
||||
try rm -rf $TMPROOT/SDL_ttf-$SDLTTF_VERSION
|
||||
try tar xzf $CACHEROOT/SDL_ttf-$SDLTTF_VERSION.tar.gz
|
||||
try mv SDL_ttf-$SDLTTF_VERSION $TMPROOT
|
||||
try pushd $TMPROOT/SDL_ttf-$SDLTTF_VERSION
|
||||
try patch -p1 < $KIVYIOSROOT/tools/patches/SDL_ttf-colorkey.patch
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ ! -f $TMPROOT/SDL_ttf-$SDLTTF_VERSION/.libs/libSDL_ttf.a ]; then
|
||||
pushd $TMPROOT/SDL_ttf-$SDLTTF_VERSION
|
||||
rm libSDL_ttf.la
|
||||
|
||||
# generate a sdl.pc file that contain all the information of our generated SDL
|
||||
set -x
|
||||
try ./configure --prefix=$DESTROOT \
|
||||
--with-freetype-prefix=$DESTROOT \
|
||||
--host=arm-apple-darwin \
|
||||
--enable-static=yes \
|
||||
--enable-shared=no \
|
||||
--without-x \
|
||||
CC="$ARM_CC" AR="$ARM_AR" \
|
||||
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS"
|
||||
try make clean
|
||||
try make libSDL_ttf.la
|
||||
popd
|
||||
fi
|
||||
|
||||
|
||||
# copy to buildroot
|
||||
cp $TMPROOT/SDL_ttf-$SDLTTF_VERSION/.libs/libSDL_ttf.a $BUILDROOT/lib/libSDL_ttf.a
|
||||
cp -a $TMPROOT/SDL_ttf-$SDLTTF_VERSION/SDL_ttf.h $BUILDROOT/include
|
|
@ -1,24 +0,0 @@
|
|||
#!/bin/zsh
|
||||
set -o errexit
|
||||
set -x
|
||||
|
||||
echo "Starting cleaning=========="
|
||||
|
||||
# credit to:
|
||||
# http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html
|
||||
# http://latenitesoft.blogspot.com/2008/10/iphone-programming-tips-building-unix.html
|
||||
|
||||
export IOS_VERSION="5.0"
|
||||
PATH_SIMU=${PWD}/python_files/Python-2.7.1-IOS${IOS_VERSION}-simulator
|
||||
PATH_DEV=${PWD}/python_files/Python-2.7.1-IOS${IOS_VERSION}-device
|
||||
PATH_ALL=${PWD}/python_files/Python-2.7.1-IOS${IOS_VERSION}
|
||||
|
||||
|
||||
# get rid of old build
|
||||
rm -rf Python-2.7.1
|
||||
rm -rf $PATH_SIMU
|
||||
rm -rf $PATH_DEV
|
||||
rm -rf $PATH_ALL
|
||||
if [[ -a libpython2.7-iOS5.a ]]; then
|
||||
rm -fr libpython2.7-iOS5.a
|
||||
fi
|
|
@ -1,140 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "X$VERBOSE" == "X1" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
try () {
|
||||
"$@" || exit -1
|
||||
}
|
||||
|
||||
# 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}'`
|
||||
# will return the latest iphoneos version, here e.g. "7.1"
|
||||
export DEVROOT=`xcode-select -print-path`/Platforms/iPhoneOS.platform/Developer
|
||||
# path relative to root, by default "/Applications/Xcode.app/Contents/Developer", and appends the path to the DEVROOT as seen
|
||||
export IOSSDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
|
||||
# path to the wanted iOS SDK folder.. here in Xcode 5.1.1 the only dir in $DEVROOT/SDKs/
|
||||
|
||||
# Xcode doesn't include /usr/local/bin
|
||||
export PATH="$PATH":/usr/local/bin
|
||||
|
||||
if [ ! -d $DEVROOT ]; then
|
||||
echo "Unable to found the Xcode iPhoneOS.platform"
|
||||
echo
|
||||
echo "The path is automatically set from 'xcode-select -print-path'"
|
||||
echo " + /Platforms/iPhoneOS.platform/Developer"
|
||||
echo
|
||||
echo "Ensure 'xcode-select -print-path' is set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# version of packages
|
||||
export IOS_PYTHON_VERSION=2.7.1
|
||||
export SDLTTF_VERSION=2.0.10
|
||||
export FT_VERSION=2.4.8
|
||||
export XML2_VERSION=2.7.8
|
||||
export XSLT_VERSION=1.1.26
|
||||
export LXML_VERSION=2.3.1
|
||||
export FFI_VERSION=3.0.13
|
||||
export NUMPY_VERSION=1.9.1
|
||||
|
||||
# where the build will be located
|
||||
export KIVYIOSROOT="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
|
||||
export BUILDROOT="$KIVYIOSROOT/build"
|
||||
export TMPROOT="$KIVYIOSROOT/tmp"
|
||||
export DESTROOT="$KIVYIOSROOT/tmp/root"
|
||||
export CACHEROOT="$KIVYIOSROOT/.cache"
|
||||
export DISTROOT="$KIVYIOSROOT/dist"
|
||||
|
||||
# pkg-config for SDL and futures
|
||||
try mkdir -p $BUILDROOT/pkgconfig
|
||||
export PKG_CONFIG_PATH="$BUILDROOT/pkgconfig:$PKG_CONFIG_PATH"
|
||||
|
||||
# some tools
|
||||
export CCACHE=$(which ccache)
|
||||
export HOSTPYTHON="$DISTROOT/hostpython/bin/python"
|
||||
for fn in cython-2.7 cython; do
|
||||
export CYTHON=$(which $fn)
|
||||
if [ "X$CYTHON" != "X" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "X$CYTHON" == "X" ]; then
|
||||
echo
|
||||
echo "Cython not found !"
|
||||
echo "Ensure your PATH contain access to 'cython' or 'cython-2.7'"
|
||||
echo
|
||||
echo "Current PATH: $PATH"
|
||||
echo
|
||||
fi
|
||||
|
||||
# check basic tools
|
||||
CONFIGURATION_OK=1
|
||||
for tool in pkg-config autoconf automake libtool hg; do
|
||||
if [ "X$(which $tool)" == "X" ]; then
|
||||
echo "Missing requirement: $tool is not installed !"
|
||||
CONFIGURATION_OK=0
|
||||
fi
|
||||
done
|
||||
if [ $CONFIGURATION_OK -eq 0 ]; then
|
||||
echo "Install thoses requirements first, then restart the script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# flags for arm compilation
|
||||
#export ARM_CC="$CCACHE $DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2"
|
||||
#export ARM_AR="$DEVROOT/usr/bin/ar"
|
||||
#export ARM_LD="$DEVROOT/usr/bin/ld"
|
||||
export ARM_CC=$(xcrun -find -sdk iphoneos clang)
|
||||
export ARM_AR=$(xcrun -find -sdk iphoneos ar)
|
||||
export ARM_LD=$(xcrun -find -sdk iphoneos ld)
|
||||
|
||||
export ARM_CFLAGS="-arch armv7"
|
||||
export ARM_CFLAGS="$ARM_CFLAGS -pipe -no-cpp-precomp"
|
||||
export ARM_CFLAGS="$ARM_CFLAGS -isysroot $IOSSDKROOT"
|
||||
export ARM_CFLAGS="$ARM_CFLAGS -miphoneos-version-min=$SDKVER"
|
||||
export ARM_LDFLAGS="-arch armv7 -isysroot $IOSSDKROOT"
|
||||
export ARM_LDFLAGS="$ARM_LDFLAGS -miphoneos-version-min=$SDKVER"
|
||||
|
||||
# uncomment this line if you want debugging stuff
|
||||
export ARM_CFLAGS="$ARM_CFLAGS -O3"
|
||||
#export ARM_CFLAGS="$ARM_CFLAGS -O0 -g"
|
||||
|
||||
# ensure byte-compiling is working
|
||||
export PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
# ensure that no current flags in the user env will be used
|
||||
unset ARCHFLAGS
|
||||
unset CFLAGS
|
||||
unset LDFLAGS
|
||||
|
||||
# create build directory if not found
|
||||
try mkdir -p $BUILDROOT
|
||||
try mkdir -p $BUILDROOT/include
|
||||
try mkdir -p $BUILDROOT/lib
|
||||
try mkdir -p $CACHEROOT
|
||||
try mkdir -p $TMPROOT
|
||||
try mkdir -p $DESTROOT
|
||||
|
||||
# one method to deduplicate some symbol in libraries
|
||||
function deduplicate() {
|
||||
fn=$(basename $1)
|
||||
echo "== Trying to remove duplicate symbol in $1"
|
||||
try mkdir ddp
|
||||
try cd ddp
|
||||
for var in "$@"; do
|
||||
echo " - extracting $var"
|
||||
try ar x $var
|
||||
done
|
||||
echo " - create the archive"
|
||||
try ar rc $fn *.o
|
||||
echo " - finalize the archive"
|
||||
try ranlib $fn
|
||||
try mv -f $fn $1
|
||||
try cd ..
|
||||
try rm -rf ddp
|
||||
echo " - done: $1 updated"
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
diff -Naur SDL_ttf-2.0.10/SDL_ttf.c SDL_ttf-2.0.10.orig/SDL_ttf.c
|
||||
--- SDL_ttf-2.0.10.orig/SDL_ttf.c 2012-07-21 16:47:06.000000000 +0200
|
||||
+++ SDL_ttf-2.0.10/SDL_ttf.c 2009-10-19 10:18:05.000000000 +0200
|
||||
@@ -1319,7 +1319,7 @@
|
||||
}
|
||||
|
||||
/* Create the target surface */
|
||||
- textbuf = SDL_AllocSurface(SDL_SWSURFACE, width, height, 8, 0, 0, 0, 0);
|
||||
+ textbuf = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 8, 0, 0, 0, 0);
|
||||
if( textbuf == NULL ) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1336,7 +1336,7 @@
|
||||
palette->colors[1].r = fg.r;
|
||||
palette->colors[1].g = fg.g;
|
||||
palette->colors[1].b = fg.b;
|
||||
- SDL_SetColorKey( textbuf, SDL_SRCCOLORKEY, 0 );
|
||||
+ SDL_SetColorKey( textbuf, SDL_TRUE, 0 );
|
||||
|
||||
/* check kerning */
|
||||
use_kerning = FT_HAS_KERNING( font->face ) && font->kerning;
|
||||
@@ -1461,7 +1461,7 @@
|
||||
palette->colors[1].r = fg.r;
|
||||
palette->colors[1].g = fg.g;
|
||||
palette->colors[1].b = fg.b;
|
||||
- SDL_SetColorKey(textbuf, SDL_SRCCOLORKEY, 0);
|
||||
+ SDL_SetColorKey(textbuf, SDL_TRUE, 0);
|
||||
|
||||
/* Copy the character from the pixmap */
|
||||
src = glyph->bitmap.buffer;
|
||||
@@ -1574,7 +1574,7 @@
|
||||
}
|
||||
|
||||
/* Create the target surface */
|
||||
- textbuf = SDL_AllocSurface(SDL_SWSURFACE, width, height, 8, 0, 0, 0, 0);
|
||||
+ textbuf = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 8, 0, 0, 0, 0);
|
||||
if( textbuf == NULL ) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1831,7 +1831,7 @@
|
||||
}
|
||||
|
||||
/* Create the target surface */
|
||||
- textbuf = SDL_AllocSurface(SDL_SWSURFACE, width, height, 32,
|
||||
+ textbuf = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 32,
|
||||
0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
|
||||
if ( textbuf == NULL ) {
|
||||
return(NULL);
|
|
@ -1,33 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $(dirname $0)/environment.sh
|
||||
|
||||
if [ -f $BUILDROOT/python/lib/python27.zip ]; then
|
||||
echo "Python already reduced and compressed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Starting reducing python 2.7"
|
||||
|
||||
try rm -rf $BUILDROOT/python/embed/include/python2.7
|
||||
try mkdir -p $BUILDROOT/python/embed/include/python2.7
|
||||
try cp $BUILDROOT/python/include/python2.7/pyconfig.h $BUILDROOT/python/embed/include/python2.7/pyconfig.h
|
||||
|
||||
try cd $BUILDROOT/python/lib/python2.7
|
||||
find . -iname '*.pyc' | xargs rm
|
||||
find . -iname '*.py' | xargs rm
|
||||
find . -iname 'test*' | xargs rm -rf
|
||||
rm -rf lib* wsgiref bsddb curses idlelib hotshot || true
|
||||
try cd ..
|
||||
rm -rf pkgconfig || true
|
||||
|
||||
echo "Compressing to python27.zip"
|
||||
try pushd $BUILDROOT/python/lib/python2.7
|
||||
rm config/libpython2.7.a config/python.o config/config.c.in config/makesetup
|
||||
mv config ..
|
||||
mv site-packages ..
|
||||
zip -r ../python27.zip *
|
||||
rm -rf *
|
||||
mv ../config .
|
||||
mv ../site-packages .
|
||||
popd
|
Loading…
Add table
Reference in a new issue