forked from kivy/python-for-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecipe.sh
More file actions
53 lines (39 loc) · 1.19 KB
/
recipe.sh
File metadata and controls
53 lines (39 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
VERSION_pycrypto=${VERSION_pycrypto:-2.6.1}
URL_pycrypto=http://pypi.python.org/packages/source/p/pycrypto/pycrypto-$VERSION_pycrypto.tar.gz
DEPS_pycrypto=(openssl python)
MD5_pycrypto=55a61a054aa66812daf5161a0d5d7eda
BUILD_pycrypto=$BUILD_PATH/pycrypto/$(get_directory $URL_pycrypto)
RECIPE_pycrypto=$RECIPES_PATH/pycrypto
function prebuild_pycrypto() {
cd $BUILD_pycrypto
# check marker in our source build
if [ -f .patched ]; then
# no patch needed
return
fi
try patch -p1 < $RECIPE_pycrypto/patches/add_length.patch
# everything done, touch the marker !
touch .patched
}
function shouldbuild_pycrypto() {
if [ -d "$SITEPACKAGES_PATH/pycrypto" ]; then
DO_BUILD=0
fi
}
function build_pycrypto() {
cd $BUILD_pycrypto
push_arm
export CC="$CC -I$BUILD_openssl/include"
export LDFLAGS="$LDFLAGS -L$LIBS_PATH -L$BUILD_openssl"
export EXTRA_CFLAGS="--host linux-armv"
export ac_cv_func_malloc_0_nonnull=yes
try ./configure --host=arm-eabi --prefix="$BUILD_PATH/python-install" --enable-shared
try $HOSTPYTHON setup.py build_ext -v
try find build/lib.* -name "*.o" -exec $STRIP {} \;
try $HOSTPYTHON setup.py install -O2
pop_arm
}
function postbuild_pycrypto() {
true
}