Skip to content

Commit e842e17

Browse files
committed
Added protobuf recipe
1 parent 51d961e commit e842e17

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

recipes/protobuf/recipe.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
VERSION_protobuf=${VERSION_protobuf:-2.6.0}
4+
URL_protobuf=https://protobuf.googlecode.com/svn/rc/protobuf-$VERSION_protobuf.tar.gz
5+
DEPS_protobuf=(python)
6+
MD5_protobuf=9959d86087e64524d7f91e7a5a6e4fd7
7+
BUILD_protobuf=$BUILD_PATH/protobuf/$(get_directory $URL_protobuf)/python
8+
RECIPE_protobuf=$RECIPES_PATH/protobuf
9+
10+
function prebuild_protobuf() {
11+
true
12+
}
13+
14+
function shouldbuild_protobuf() {
15+
if [ -d "$SITEPACKAGES_PATH/protobuf" ]; then
16+
DO_BUILD=0
17+
fi
18+
}
19+
20+
function build_protobuf() {
21+
cd $BUILD_protobuf
22+
23+
push_arm
24+
25+
try $BUILD_hostpython/hostpython setup.py build
26+
try $BUILD_hostpython/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages
27+
28+
pop_arm
29+
}
30+
31+
function postbuild_protobuf() {
32+
true
33+
}

0 commit comments

Comments
 (0)