Skip to content

Commit 497dc44

Browse files
committed
fix android 4.3
1 parent 6f3a08a commit 497dc44

3 files changed

Lines changed: 32 additions & 4 deletions

File tree

distribute.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function push_arm() {
159159
#if [ "X${ANDROIDNDKVER:0:2}" == "Xr7" ] || [ "X$ANDROIDNDKVER" == "Xr8" ]; then
160160
# assume this toolchain is the same for all the next ndk... until a new one is out.
161161
export TOOLCHAIN_PREFIX=arm-linux-androideabi
162-
export TOOLCHAIN_VERSION=4.4.3
162+
export TOOLCHAIN_VERSION=4.6
163163
fi
164164

165165
export PATH="$ANDROIDNDK/toolchains/$TOOLCHAIN_PREFIX-$TOOLCHAIN_VERSION/prebuilt/$PYPLATFORM-x86/bin/:$ANDROIDNDK:$ANDROIDSDK/tools:$PATH"
@@ -472,7 +472,7 @@ function run_get_packages() {
472472
# download if needed
473473
if [ $do_download -eq 1 ]; then
474474
info "Downloading $url"
475-
try $WGET $filename $url
475+
try $WGET $filename $url --no-check-certificate
476476
else
477477
debug "Module $module already downloaded"
478478
fi

recipes/pyopenssl/fix-dlfcn.patch

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--- pyOpenSSL-0.13.orig/OpenSSL/__init__.py 2011-09-02 17:46:13.000000000 +0200
2+
+++ pyOpenSSL-0.13/OpenSSL/__init__.py 2013-07-29 17:20:15.750079894 +0200
3+
@@ -12,6 +12,11 @@
4+
except AttributeError:
5+
from OpenSSL import crypto
6+
else:
7+
+ # XXX android fix
8+
+ # linux: RTLD_NOW (0x2) | RTLD_GLOBAL (0x100 / 256)
9+
+ # android: RTLD_NOW (0x0) | RTLD_GLOBAL (0x2)
10+
+ flags = 0x2
11+
+ '''
12+
try:
13+
import DLFCN
14+
except ImportError:
15+
@@ -31,6 +36,7 @@
16+
else:
17+
flags = DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL
18+
del DLFCN
19+
+ '''
20+
21+
sys.setdlopenflags(flags)
22+
from OpenSSL import crypto

recipes/pyopenssl/recipe.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
VERSION_pyopenssl=0.13
44
URL_pyopenssl=http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-$VERSION_pyopenssl.tar.gz
55
DEPS_pyopenssl=(openssl hostpython python)
6-
MD5_pyopenssl= 767bca18a71178ca353dff9e10941929
6+
MD5_pyopenssl=767bca18a71178ca353dff9e10941929
77
BUILD_pyopenssl=$BUILD_PATH/pyopenssl/$(get_directory $URL_pyopenssl)
88
RECIPE_pyopenssl=$RECIPES_PATH/pyopenssl
99

1010
function prebuild_pyopenssl() {
11-
true
11+
cd $BUILD_pyopenssl
12+
if [ -f .patched ]; then
13+
return
14+
fi
15+
16+
try patch -p1 < $RECIPE_pyopenssl/fix-dlfcn.patch
17+
touch .patched
1218
}
1319

1420
function build_pyopenssl() {

0 commit comments

Comments
 (0)