Skip to content

libyaml + pyyaml #313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions recipes/libyaml/recipe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

VERSION_libyaml=${VERSION_libyaml:-0.1.5}
URL_libyaml=http://pyyaml.org/download/libyaml/yaml-${VERSION_libyaml}.tar.gz
MD5_libyaml=24f6093c1e840ca5df2eb09291a1dbf1
BUILD_libyaml=$BUILD_PATH/libyaml/$(get_directory $URL_libyaml)
RECIPE_libyaml=$RECIPES_PATH/libyaml

function prebuild_libyaml() {
true
}

function shouldbuild_libxslt() {
if [ -f "$BUILD_libyaml/src/.libs/libyaml.a" ]; then
DO_BUILD=0
fi
}

function build_libyaml() {
cd $BUILD_libyaml

push_arm

# using arm-linux-eabi does not create a shared library
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi
try make

try cp -L $BUILD_libyaml/src/.libs/libyaml.so $LIBS_PATH

pop_arm
}

function postbuild_libyaml() {
true
}
41 changes: 41 additions & 0 deletions recipes/pyyaml/recipe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

VERSION_pyyaml=${VERSION_pyyaml:-3.11}
DEPS_pyyaml=(libyaml python)
URL_pyyaml=http://pyyaml.org/download/pyyaml/PyYAML-$VERSION_pyyaml.tar.gz
MD5_pyyaml=f50e08ef0fe55178479d3a618efe21db
BUILD_pyyaml=$BUILD_PATH/pyyaml/$(get_directory $URL_pyyaml)
RECIPE_pyyaml=$RECIPES_PATH/pyyaml

function prebuild_pyyaml() {
true
}

function shouldbuild_pyyaml() {
if [ -d "$SITEPACKAGES_PATH/pyyaml" ]; then
DO_BUILD=0
fi
}

function build_pyyaml() {
cd $BUILD_pyyaml
push_arm
export CC="$CC -I$BUILD_libyaml/include"
export LDFLAGS="$LDFLAGS -L$LIBS_PATH"
export LDSHARED="$LIBLINK"
export PYTHONPATH=$BUILD_hostpython/Lib/site-packages

# with C extension
$HOSTPYTHON setup.py --with-libyaml install >/tmp/pyyaml-setup

# pure python
# $HOSTPYTHON setup.py --without-libyaml install

unset LDSHARED
pop_arm
}

function postbuild_pyyaml() {
true
}