Skip to content

Commit d3ae2b2

Browse files
committed
new audiostream recipe
1 parent 5b92831 commit d3ae2b2

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

recipes/audiostream/recipe.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
# Recent change made audiostream not compatible with python-for-android yet.
3+
# Only h264+aac build are working.
4+
5+
VERSION_audiostream=
6+
URL_audiostream=https://github.com/kivy/audiostream/zipball/master/audiostream.zip
7+
DEPS_audiostream=(python sdl)
8+
MD5_audiostream=
9+
BUILD_audiostream=$BUILD_PATH/audiostream/audiostream
10+
RECIPE_audiostream=$RECIPES_PATH/audiostream
11+
12+
function prebuild_audiostream() {
13+
cd $BUILD_audiostream
14+
}
15+
16+
function build_audiostream() {
17+
cd $BUILD_audiostream
18+
19+
if [ -d "$BUILD_PATH/python-install/lib/python2.7/site-packages/audiostream" ]; then
20+
return
21+
fi
22+
23+
push_arm
24+
25+
# build python extension
26+
export JNI_PATH=$JNI_PATH
27+
export CFLAGS="$CFLAGS -I$JNI_PATH/sdl/include -I$JNI_PATH/sdl_mixer/"
28+
export LDFLAGS="$LDFLAGS -lm -L$LIBS_PATH"
29+
export AUDIOSTREAM_ROOT="$BUILD_audiostream/build/audiostream/armeabi-v7a"
30+
try cd $BUILD_audiostream
31+
try find . -iname '*.pyx' -exec cython {} \;
32+
try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v
33+
try $BUILD_PATH/python-install/bin/python.host setup.py install -O2
34+
35+
pop_arm
36+
}
37+
38+
function postbuild_audiostream() {
39+
true
40+
}

0 commit comments

Comments
 (0)