Skip to content

Commit 6c758d4

Browse files
committed
libyaml + pyyaml
1 parent 4e25e7f commit 6c758d4

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

recipes/libyaml/recipe.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
VERSION_libyaml=${VERSION_libyaml:-0.1.5}
4+
URL_libyaml=http://pyyaml.org/download/libyaml/yaml-${VERSION_libyaml}.tar.gz
5+
MD5_libyaml=24f6093c1e840ca5df2eb09291a1dbf1
6+
BUILD_libyaml=$BUILD_PATH/libyaml/$(get_directory $URL_libyaml)
7+
RECIPE_libyaml=$RECIPES_PATH/libyaml
8+
9+
function prebuild_libyaml() {
10+
true
11+
}
12+
13+
function shouldbuild_libxslt() {
14+
if [ -f "$BUILD_libyaml/src/.libs/libyaml.a" ]; then
15+
DO_BUILD=0
16+
fi
17+
}
18+
19+
function build_libyaml() {
20+
cd $BUILD_libyaml
21+
22+
push_arm
23+
24+
# using arm-linux-eabi does not create a shared library
25+
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi
26+
try make
27+
28+
try cp -L $BUILD_libyaml/src/.libs/libyaml.so $LIBS_PATH
29+
30+
pop_arm
31+
}
32+
33+
function postbuild_libyaml() {
34+
true
35+
}

recipes/pyyaml/recipe.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
VERSION_pyyaml=${VERSION_pyyaml:-3.11}
4+
DEPS_pyyaml=(libyaml python)
5+
URL_pyyaml=http://pyyaml.org/download/pyyaml/PyYAML-$VERSION_pyyaml.tar.gz
6+
MD5_pyyaml=f50e08ef0fe55178479d3a618efe21db
7+
BUILD_pyyaml=$BUILD_PATH/pyyaml/$(get_directory $URL_pyyaml)
8+
RECIPE_pyyaml=$RECIPES_PATH/pyyaml
9+
10+
function prebuild_pyyaml() {
11+
true
12+
}
13+
14+
function shouldbuild_pyyaml() {
15+
if [ -d "$SITEPACKAGES_PATH/pyyaml" ]; then
16+
DO_BUILD=0
17+
fi
18+
}
19+
20+
function build_pyyaml() {
21+
cd $BUILD_pyyaml
22+
push_arm
23+
export CC="$CC -I$BUILD_libyaml/include"
24+
export LDFLAGS="$LDFLAGS -L$LIBS_PATH"
25+
export LDSHARED="$LIBLINK"
26+
export PYTHONPATH=$BUILD_hostpython/Lib/site-packages
27+
28+
# with C extension
29+
$HOSTPYTHON setup.py --with-libyaml install >/tmp/pyyaml-setup
30+
31+
# pure python
32+
# $HOSTPYTHON setup.py --without-libyaml install
33+
34+
unset LDSHARED
35+
pop_arm
36+
}
37+
38+
function postbuild_pyyaml() {
39+
true
40+
}
41+

0 commit comments

Comments
 (0)