2012-02-24 17:24:56 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2012-03-08 20:45:55 +01:00
|
|
|
. $(dirname $0)/environment.sh
|
|
|
|
|
|
|
|
pushd $TMPROOT
|
|
|
|
|
|
|
|
if [ ! -f SDL ]; then
|
|
|
|
ln -s $KIVYIOSROOT/src/SDL SDL
|
|
|
|
fi
|
2012-02-24 17:24:56 +01:00
|
|
|
|
|
|
|
if [ ! -d SDL_mixer ]; then
|
2012-09-13 09:56:27 +02:00
|
|
|
try hg clone http://hg.libsdl.org/SDL_mixer/#SDL-1.2
|
2012-02-24 17:24:56 +01:00
|
|
|
fi
|
|
|
|
if [ ! -d libtremor ]; then
|
2012-03-08 20:45:55 +01:00
|
|
|
try mkdir libtremor
|
|
|
|
try cd libtremor
|
|
|
|
try svn co http://svn.xiph.org/trunk/Tremor tremor
|
2012-04-22 14:40:40 +02:00
|
|
|
try cd tremor
|
|
|
|
try patch -p0 < $KIVYIOSROOT/src/tremor-configure.patch
|
|
|
|
try cd ../..
|
2012-02-24 17:24:56 +01:00
|
|
|
fi
|
2012-02-25 15:51:34 +01:00
|
|
|
if [ ! -d libogg ]; then
|
2012-03-08 20:45:55 +01:00
|
|
|
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
|
2012-02-25 15:51:34 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f libogg/src/.libs/libogg.a ]; then
|
2012-03-08 20:45:55 +01:00
|
|
|
try cd libogg
|
|
|
|
try ./configure --disable-shared \
|
2012-02-25 15:51:34 +01:00
|
|
|
--host=arm-apple-darwin \
|
|
|
|
--enable-static=yes \
|
|
|
|
--enable-shared=no \
|
|
|
|
CC="$ARM_CC" AR="$ARM_AR" \
|
|
|
|
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS"
|
2012-03-08 20:45:55 +01:00
|
|
|
try make
|
|
|
|
try cd ..
|
2012-02-25 15:51:34 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f libtremor/tremor/.libs/libvorbisidec.a ]; then
|
2012-03-08 20:45:55 +01:00
|
|
|
try cd libtremor/tremor
|
2012-02-25 15:51:34 +01:00
|
|
|
echo > asm_arm.h
|
|
|
|
CC="$ARM_CC" AR="$ARM_AR" \
|
|
|
|
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS" \
|
2012-04-22 14:40:40 +02:00
|
|
|
OGG_CFLAGS="-I../../libogg/include" \
|
|
|
|
OGG_LDFLAGS="-L../../libogg/src/.libs" \
|
|
|
|
PKG_CONFIG_LIBDIR="../../libogg" \
|
2012-11-02 16:14:47 +01:00
|
|
|
ACLOCAL_FLAGS="-I /usr/local/share/aclocal -I /opt/local/share/aclocal" ./autogen.sh \
|
2012-02-25 15:51:34 +01:00
|
|
|
--disable-shared \
|
|
|
|
--host=arm-apple-darwin \
|
|
|
|
--enable-static=yes \
|
2012-04-22 14:40:40 +02:00
|
|
|
--enable-shared=no
|
2012-03-08 20:45:55 +01:00
|
|
|
try make
|
|
|
|
try cd ../..
|
2012-02-25 15:51:34 +01:00
|
|
|
fi
|
|
|
|
|
2012-03-08 20:45:55 +01:00
|
|
|
popd
|
2012-02-24 17:24:56 +01:00
|
|
|
|
2012-03-08 20:45:55 +01:00
|
|
|
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
|
2012-02-24 17:24:56 +01:00
|
|
|
exit 0;
|
|
|
|
fi
|
|
|
|
|
2012-03-08 20:45:55 +01:00
|
|
|
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
|
2012-02-24 17:24:56 +01:00
|
|
|
popd
|
|
|
|
|
2012-03-08 20:45:55 +01:00
|
|
|
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
|