Skip to content

Commit 6d6f15c

Browse files
committed
add openssl recipe
1 parent efe53a2 commit 6d6f15c

File tree

3 files changed

+57
-6
lines changed

3 files changed

+57
-6
lines changed

recipes/openssl/recipe.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
VERSION_openssl=1.0.0e
4+
URL_openssl=http://www.openssl.org/source/openssl-$VERSION_openssl.tar.gz
5+
DEPS_openssl=()
6+
MD5_openssl=7040b89c4c58c7a1016c0dfa6e821c86
7+
BUILD_openssl=$BUILD_PATH/openssl/$(get_directory $URL_openssl)
8+
RECIPE_openssl=$RECIPES_PATH/openssl
9+
10+
function prebuild_openssl() {
11+
true
12+
}
13+
14+
function build_openssl() {
15+
cd $BUILD_openssl
16+
17+
if [ -f libssl.a ]; then
18+
return
19+
fi
20+
21+
push_arm
22+
23+
try ./Configure no-dso no-krb5 linux-armv4
24+
try make build_libs
25+
26+
pop_arm
27+
}
28+
29+
function postbuild_openssl() {
30+
true
31+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- Python-2.7.2/setup.py.orig 2012-01-08 15:10:39.867332119 +0100
2+
+++ Python-2.7.2/setup.py 2012-01-08 15:10:45.723331911 +0100
3+
@@ -445,6 +445,13 @@
4+
'/lib', '/usr/lib',
5+
]
6+
inc_dirs += ['/usr/include']
7+
+ else:
8+
+ cflags = os.environ.get('CFLAGS')
9+
+ if cflags:
10+
+ inc_dirs += [x[2:] for x in cflags.split() if x.startswith('-I')]
11+
+ ldflags = os.environ.get('LDFLAGS')
12+
+ if ldflags:
13+
+ lib_dirs += [x[2:] for x in ldflags.split() if x.startswith('-L')]
14+
exts = []
15+
missing = []
16+

recipes/python/recipe.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function prebuild_python() {
2222
try patch -p1 < $RECIPE_python/patches/disable-modules.patch
2323
try patch -p1 < $RECIPE_python/patches/fix-locale.patch
2424
try patch -p1 < $RECIPE_python/patches/fix-gethostbyaddr.patch
25+
try patch -p1 < $RECIPE_python/patches/fix-setup-flags.patch
2526
try patch -p1 < $RECIPE_python/patches/custom-loader.patch
2627
try patch -p1 < $RECIPE_python/patches/verbose-compilation.patch
2728

@@ -34,9 +35,8 @@ function build_python() {
3435
cd $BUILD_python
3536

3637
# if the last step have been done, avoid all
37-
if [ -f $BUILD_PATH/python-install/bin/python.host ]; then
38+
if [ -f libpython2.7.so ]; then
3839
return
39-
#true
4040
fi
4141

4242
# copy same module from host python
@@ -45,14 +45,18 @@ function build_python() {
4545
try cp $BUILD_hostpython/hostpgen .
4646

4747
push_arm
48+
49+
# openssl activated ?
50+
if [ "X$BUILD_openssl" != "X" ]; then
51+
debug "Activate flags for openssl / python"
52+
export CFLAGS="$CFLAGS -I$BUILD_openssl/include/"
53+
export LDFLAGS="$LDFLAGS -L$BUILD_openssl/"
54+
fi
55+
4856
try ./configure --host=arm-eabi --prefix="$BUILD_PATH/python-install" --enable-shared
4957
try $MAKE HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
5058
cp HOSTPYTHON=$BUILD_python/hostpython python
5159

52-
# Try to compile module by ourself
53-
#debug 'Try to compile module by ourself'
54-
#$BUILD_python/hostpython -E setup.py build -v -f
55-
5660
# FIXME, the first time, we got a error at:
5761
# python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
5862
# /home/tito/code/python-for-android/build/python/Python-2.7.2/python: 1: Syntax error: word unexpected (expecting ")")

0 commit comments

Comments
 (0)