From c8b8e2c67f50a5d87cb94b059705c1ad14e18d15 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Tue, 12 Feb 2013 00:39:38 +0100 Subject: [PATCH] revert a bad merge, universal python is absolutely not fixed >_> --- tools/build-python.sh | 74 +++++++++++-------------------------------- tools/environment.sh | 28 +--------------- 2 files changed, 19 insertions(+), 83 deletions(-) diff --git a/tools/build-python.sh b/tools/build-python.sh index 81f34b5..287edc5 100755 --- a/tools/build-python.sh +++ b/tools/build-python.sh @@ -26,15 +26,13 @@ try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$PYTHON_VERSION-static-_sql try cp $KIVYIOSROOT/src/python_files/ModulesSetup Modules/Setup.local try cp $KIVYIOSROOT/src/python_files/_scproxy.py Lib/_scproxy.py -# echo "Building for native machine ============================================" +echo "Building for native machine ============================================" -if [ ! -e hostpython ]; then - try ./configure CC="$CCACHE clang -Qunused-arguments -fcolor-diagnostics" LDFLAGS="-lsqlite3" - try make python.exe Parser/pgen - try mv python.exe hostpython - try mv Parser/pgen Parser/hostpgen - try make distclean -fi +try ./configure CC="$CCACHE clang -Qunused-arguments -fcolor-diagnostics" LDFLAGS="-lsqlite3" +try make python.exe Parser/pgen +try mv python.exe hostpython +try mv Parser/pgen Parser/hostpgen +try make distclean echo "Building for iOS =======================================================" @@ -54,55 +52,19 @@ ln -s "$IOSSDKROOT/usr/lib/libgcc_s.1.dylib" extralibs/libgcc_s.10.4.dylib || ec try cp $KIVYIOSROOT/src/python_files/ModulesSetup Modules/Setup.local try cp $KIVYIOSROOT/src/python_files/_scproxy.py Lib/_scproxy.py -if [ ! -e $BUILDROOT/lib/libpython2.7-armv7.a ]; then - try ./configure CC="$ARM_CC" LD="$ARM_LD" \ - CFLAGS="$ARM_CFLAGS" \ - LDFLAGS="$ARM_LDFLAGS -Lextralibs/ -lsqlite3" \ - --disable-toolbox-glue \ - --host=armv7-apple-darwin \ - --prefix=/python \ - --without-doc-strings +try ./configure CC="$ARM_CC" LD="$ARM_LD" \ + CFLAGS="$ARM_CFLAGS" \ + LDFLAGS="$ARM_LDFLAGS -Lextralibs/ -lsqlite3" \ + --disable-toolbox-glue \ + --host=armv7-apple-darwin \ + --prefix=/python \ + --without-doc-strings - try make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen \ - CROSS_COMPILE_TARGET=yes +try make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen \ + CROSS_COMPILE_TARGET=yes - try make install HOSTPYTHON=./hostpython CROSS_COMPILE_TARGET=yes prefix="$BUILDROOT/python" +try make install HOSTPYTHON=./hostpython CROSS_COMPILE_TARGET=yes prefix="$BUILDROOT/python" - try mv -f $BUILDROOT/python/lib/libpython2.7.a \ - $BUILDROOT/lib/libpython2.7-armv7.a - - deduplicate $BUILDROOT/lib/libpython2.7-armv7.a -fi - -# build for i386 (simulator) - -if [ ! -e $BUILDROOT/lib/libpython2.7-i386.a ]; then - export CPPFLAGS="-I$SIMULATOR_SDKROOT/usr/include/" - - echo "*************************" - echo CPPFLAGS=$CPPFLAGS - echo "*************************" - - try ./configure CC="$i386_CC" LD="$i386_LD" \ - CFLAGS="$i386_CFLAGS" \ - LDFLAGS="$i386_LDFLAGS -Lextralibs/ -lsqlite3" \ - --disable-toolbox-glue \ - --prefix=/python \ - --without-doc-strings - - try make -j4 install prefix="$BUILDROOT/python" - - try mv -f $BUILDROOT/python/lib/libpython2.7.a \ - $BUILDROOT/lib/libpython2.7-i386.a - - deduplicate $BUILDROOT/lib/libpython2.7-i386.a -fi - -# combine the libs into a Universal lib - -if [ -e $BUILDROOT/lib/libpython2.7-i386.a ] && [ -e $BUILDROOT/lib/libpython2.7-armv7.a ]; then - try lipo -create -output $BUILDROOT/lib/libpython2.7.a \ - $BUILDROOT/lib/libpython2.7-i386.a \ - $BUILDROOT/lib/libpython2.7-armv7.a -fi +try mv -f $BUILDROOT/python/lib/libpython2.7.a $BUILDROOT/lib/ +deduplicate $BUILDROOT/lib/libpython2.7.a diff --git a/tools/environment.sh b/tools/environment.sh index 88549ee..97561e4 100755 --- a/tools/environment.sh +++ b/tools/environment.sh @@ -23,21 +23,6 @@ if [ ! -d $DEVROOT ]; then exit 1 fi -# iOS SDK Environmnent for the simulator -export SIMULATOR_SDKVER=`xcodebuild -showsdks | fgrep "iphonesimulator" | tail -n 1 | awk '{print $2}'` -export SIMULATOR_DEVROOT=`xcode-select -print-path`/Platforms/iPhoneSimulator.platform/Developer -export SIMULATOR_SDKROOT=$SIMULATOR_DEVROOT/SDKs/iPhoneSimulator$SDKVER.sdk - -if [ ! -d $SIMULATOR_DEVROOT ]; then - echo "Unable to found the Xcode iPhoneSimulator.platform" - echo - echo "The path is automatically set from 'xcode-select -print-path'" - echo " + /Platforms/iPhoneSimulator.platform/Developer" - echo - echo "Ensure 'xcode-select -print-path' is set." - exit 1 -fi - # version of packages export PYTHON_VERSION=2.7.1 export SDLTTF_VERSION=2.0.10 @@ -60,7 +45,7 @@ export PKG_CONFIG_PATH="$BUILDROOT/pkgconfig:$PKG_CONFIG_PATH" # some tools export CCACHE=$(which ccache) -# flags for arm (device) compilation +# 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" @@ -75,17 +60,6 @@ export ARM_LDFLAGS="$ARM_LDFLAGS -miphoneos-version-min=$SDKVER" export ARM_CFLAGS="$ARM_CFLAGS -O3" #export ARM_CFLAGS="$ARM_CFLAGS -O0 -g" -# flags for i386 (simulator) compilation -export i386_CC="$CCACHE $SIMULATOR_DEVROOT/usr/bin/i686-apple-darwin11-llvm-gcc-4.2" -export i386_AR="$SIMULATOR_DEVROOT/usr/bin/ar" -export i386_LD="$SIMULATOR_DEVROOT/usr/bin/ld" -export i386_CFLAGS="-isysroot $SIMULATOR_SDKROOT" -export i386_LDFLAGS="-isysroot $SIMULATOR_SDKROOT" - -# uncomment this line if you want debugging stuff -export i386_CFLAGS="$i386_CFLAGS -O3" -#export i386_CFLAGS="$i386_CFLAGS -O0 -g" - # create build directory if not found try mkdir -p $BUILDROOT try mkdir -p $BUILDROOT/include