Skip to content

Commit 64fb1d8

Browse files
committed
update scripts
1 parent 8de2ee9 commit 64fb1d8

File tree

6 files changed

+49
-49
lines changed

6 files changed

+49
-49
lines changed

distribute.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ function push_arm() {
158158
else
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.
161-
# export TOOLCHAIN_PREFIX=arm-linux-androideabi
162-
export TOOLCHAIN_PREFIX=i686-linux-android
163-
export TOOLCHAIN_VERSION=4.6
161+
export TOOLCHAIN_PREFIX=arm-linux-androideabi
162+
# export TOOLCHAIN_PREFIX=i686-linux-android
163+
export TOOLCHAIN_VERSION=4.7
164164
fi
165165

166-
# export PATH="$ANDROIDNDK/toolchains/$TOOLCHAIN_PREFIX-$TOOLCHAIN_VERSION/prebuilt/$PYPLATFORM-x86/bin/:$ANDROIDNDK:$ANDROIDSDK/tools:$PATH"
167-
export PATH="$ANDROIDNDK/toolchains/x86-$TOOLCHAIN_VERSION/prebuilt/$PYPLATFORM-x86/bin/:$ANDROIDNDK:$ANDROIDSDK/tools:$PATH"
166+
export PATH="$ANDROIDNDK/toolchains/$TOOLCHAIN_PREFIX-$TOOLCHAIN_VERSION/prebuilt/$PYPLATFORM-x86/bin/:$ANDROIDNDK:$ANDROIDSDK/tools:$PATH"
167+
# export PATH="$ANDROIDNDK/toolchains/x86-$TOOLCHAIN_VERSION/prebuilt/$PYPLATFORM-x86/bin/:$ANDROIDNDK:$ANDROIDSDK/tools:$PATH"
168168

169169
# search compiler in the path, to fail now instead of later.
170170
CC=$(which $TOOLCHAIN_PREFIX-gcc)
@@ -181,7 +181,7 @@ function push_arm() {
181181
export CXX="$TOOLCHAIN_PREFIX-g++ $CXXFLAGS"
182182
export AR="$TOOLCHAIN_PREFIX-ar"
183183
export RANLIB="$TOOLCHAIN_PREFIX-ranlib"
184-
export LD="$TOOLCHAIN_PREFIX-ld"
184+
export LD="$TOOLCHAIN_PREFIX-ld.bfd -avoid-version"
185185
export STRIP="$TOOLCHAIN_PREFIX-strip --strip-unneeded"
186186
export MAKE="make"
187187

@@ -299,11 +299,11 @@ function run_prepare() {
299299
debug "NDK version is $ANDROIDNDKVER"
300300
debug "API level set to $ANDROIDAPI"
301301

302-
# export NDKPLATFORM="$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-arm"
303-
# export ARCH="armeabi"
302+
export NDKPLATFORM="$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-arm"
303+
export ARCH="armeabi"
304304
#export ARCH="armeabi-v7a" # not tested yet.
305-
export NDKPLATFORM="$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-x86"
306-
export ARCH="x86"
305+
# export NDKPLATFORM="$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-x86"
306+
# export ARCH="x86"
307307

308308
info "Check mandatory tools"
309309
# ensure that some tools are existing

recipes/openssl/recipe.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ function build_openssl() {
2020

2121
push_arm
2222

23-
# try ./Configure no-dso no-krb5 linux-armv4
24-
try ./Configure no-dso no-krb5 linux-generic32
23+
try ./Configure no-dso no-krb5 linux-armv4
24+
# try ./Configure no-dso no-krb5 linux-generic32
2525
try make build_libs
2626

2727
pop_arm

recipes/pyopenssl/recipe.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ function build_pyopenssl() {
1919

2020
cd $BUILD_pyopenssl
2121

22-
mv $BUILD_PATH/python-install/lib/python3.3/lib-dynload $BUILD_PATH/python-install/lib/python3.3/lib-dynload.bak
23-
cp -R $BUILD_PATH/python_host/lib/python3.3/lib-dynload $BUILD_PATH/python-install/lib/python3.3/
24-
2522
push_arm
2623

2724
export CC="$CC -I$BUILD_openssl/include"
@@ -30,6 +27,9 @@ function build_pyopenssl() {
3027
try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v
3128
try find build/lib.* -name "*.o" -exec $STRIP {} \;
3229

30+
mv $BUILD_PATH/python-install/lib/python3.3/lib-dynload $BUILD_PATH/python-install/lib/python3.3/lib-dynload.bak
31+
cp -R $BUILD_PATH/python_host/lib/python3.3/lib-dynload $BUILD_PATH/python-install/lib/python3.3/
32+
3333
try $BUILD_PATH/python-install/bin/python.host setup.py install -O2
3434

3535
try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/OpenSSL/test

recipes/python/Setup

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,17 @@ _symtable symtablemodule.c
164164

165165
#array arraymodule.c # array objects
166166
#cmath cmathmodule.c _math.c # -lm # complex math library functions
167-
#math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
168-
#_struct _struct.c # binary structure packing/unpacking
169-
#time timemodule.c # -lm # time operations and variables
167+
math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
168+
_struct _struct.c # binary structure packing/unpacking
169+
time timemodule.c # -lm # time operations and variables
170170
#_weakref _weakref.c # basic weak reference support
171171
#_testcapi _testcapimodule.c # Python C API test module
172-
#_random _randommodule.c # Random number generator
172+
_random _randommodule.c # Random number generator
173173
#atexit atexitmodule.c # Register functions to be run at interpreter-shutdown
174174
#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator
175175
#_pickle _pickle.c # pickle accelerator
176176
#_datetime _datetimemodule.c # datetime accelerator
177-
#_bisect _bisectmodule.c # Bisection algorithms
177+
_bisect _bisectmodule.c # Bisection algorithms
178178
#_heapq _heapqmodule.c # Heap queue algorithm
179179

180180
#unicodedata unicodedata.c # static Unicode character database
@@ -187,7 +187,7 @@ _symtable symtablemodule.c
187187
#fcntl fcntlmodule.c # fcntl(2) and ioctl(2)
188188
#spwd spwdmodule.c # spwd(3)
189189
#grp grpmodule.c # grp(3)
190-
#select selectmodule.c # select(2); not on ancient System V
190+
select selectmodule.c # select(2); not on ancient System V
191191

192192
# Memory-mapped files (also works on Win32).
193193
#mmap mmapmodule.c
@@ -196,21 +196,21 @@ _symtable symtablemodule.c
196196
#_csv _csv.c
197197

198198
# Socket module helper for socket(2)
199-
#_socket socketmodule.c
199+
_socket socketmodule.c
200200

201201
# Socket module helper for SSL support; you must comment out the other
202202
# socket line above, and possibly edit the SSL variable:
203-
#SSL=/usr/local/ssl
204-
#_ssl _ssl.c \
205-
# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
206-
# -L$(SSL)/lib -lssl -lcrypto
203+
SSL=/usr/local/ssl
204+
_ssl _ssl.c \
205+
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
206+
-L$(SSL)/lib -lssl -lcrypto
207207

208208
# The crypt module is now disabled by default because it breaks builds
209209
# on many systems (where -lcrypt is needed), e.g. Linux (I believe).
210210
#
211211
# First, look at Setup.config; configure may have set this for you.
212212

213-
#_crypt _cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems
213+
# _crypt _cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems
214214

215215

216216
# Some more UNIX dependent modules -- off by default, since these
@@ -236,14 +236,14 @@ _symtable symtablemodule.c
236236
# The _md5 module implements the RSA Data Security, Inc. MD5
237237
# Message-Digest Algorithm, described in RFC 1321.
238238

239-
#_md5 md5module.c
239+
_md5 md5module.c
240240

241241

242242
# The _sha module implements the SHA checksum algorithms.
243243
# (NIST's Secure Hash Algorithms.)
244-
#_sha1 sha1module.c
245-
#_sha256 sha256module.c
246-
#_sha512 sha512module.c
244+
_sha1 sha1module.c
245+
_sha256 sha256module.c
246+
_sha512 sha512module.c
247247

248248

249249
# The _tkinter module.
@@ -328,7 +328,7 @@ _symtable symtablemodule.c
328328

329329

330330
# Helper module for various ascii-encoders
331-
#binascii binascii.c
331+
binascii binascii.c
332332

333333
# Fred Drake's interface to the Python parser
334334
#parser parsermodule.c
@@ -354,7 +354,7 @@ _symtable symtablemodule.c
354354
# Andrew Kuchling's zlib module.
355355
# This require zlib 1.1.3 (or later).
356356
# See http://www.gzip.org/zlib/
357-
#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
357+
zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
358358

359359
# Interface to the Expat XML parser
360360
#

recipes/python/pyconfig.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676

7777
/* Define if mbstowcs(NULL, "text", 0) does not return the number of wide
7878
chars that would be converted. */
79-
#define HAVE_BROKEN_MBSTOWCS
79+
#define HAVE_BROKEN_MBSTOWCS 1
8080

8181
/* Define if nice() returns success/failure instead of the new priority. */
8282
/* #undef HAVE_BROKEN_NICE */
@@ -310,7 +310,7 @@
310310

311311
/* Define if we can use gcc inline assembler to get and set x87 control word
312312
*/
313-
#define HAVE_GCC_ASM_FOR_X87 1
313+
/* #undef HAVE_GCC_ASM_FOR_X87 */
314314

315315
/* Define if your compiler provides __uint128_t */
316316
/* #undef HAVE_GCC_UINT128_T */
@@ -334,7 +334,7 @@
334334
/* #undef HAVE_GETHOSTBYNAME */
335335

336336
/* Define this if you have some version of gethostbyname_r() */
337-
#define HAVE_GETHOSTBYNAME_R 1
337+
/* #define HAVE_GETHOSTBYNAME_R 1 */
338338

339339
/* Define this if you have the 3-arg version of gethostbyname_r(). */
340340
/* #undef HAVE_GETHOSTBYNAME_R_3_ARG */
@@ -539,7 +539,7 @@
539539
#define HAVE_MAKEDEV 1
540540

541541
/* Define to 1 if you have the `mbrtowc' function. */
542-
#undef HAVE_MBRTOWC
542+
/* #define HAVE_MBRTOWC 1 */
543543

544544
/* Define to 1 if you have the `memmove' function. */
545545
#define HAVE_MEMMOVE 1
@@ -749,7 +749,7 @@
749749
#define HAVE_SETITIMER 1
750750

751751
/* Define to 1 if you have the `setlocale' function. */
752-
#undef HAVE_SETLOCALE
752+
/* #define HAVE_SETLOCALE 1 */
753753

754754
/* Define to 1 if you have the `setpgid' function. */
755755
#define HAVE_SETPGID 1
@@ -1108,13 +1108,13 @@
11081108
#define HAVE_WCHAR_H 1
11091109

11101110
/* Define to 1 if you have the `wcscoll' function. */
1111-
#undef HAVE_WCSCOLL
1111+
/* #define HAVE_WCSCOLL 1 */
11121112

11131113
/* Define to 1 if you have the `wcsftime' function. */
1114-
#undef HAVE_WCSFTIME
1114+
/* #define HAVE_WCSFTIME 1 */
11151115

11161116
/* Define to 1 if you have the `wcsxfrm' function. */
1117-
#undef HAVE_WCSXFRM
1117+
/* #define HAVE_WCSXFRM 1 */
11181118

11191119
/* Define if tzset() actually switches the local timezone in a meaningful way.
11201120
*/
@@ -1180,7 +1180,7 @@
11801180
/* #undef Py_DEBUG */
11811181

11821182
/* Defined if Python is built as a shared library. */
1183-
/* #undef Py_ENABLE_SHARED */
1183+
#define Py_ENABLE_SHARED 1
11841184

11851185
/* assume C89 semantics that RETSIGTYPE is always void */
11861186
#define RETSIGTYPE void

recipes/python/recipe.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function build_python() {
3030
cd $BUILD_python
3131

3232
# if the last step have been done, avoid all
33-
if [ -f python ]; then
33+
if [ -f $BUILD_PATH/python-install/lib/libpython3.3m.so.1.0 ]; then
3434
return
3535
fi
3636

@@ -53,23 +53,23 @@ function build_python() {
5353
export CFLAGS="$CFLAGS -DANDROID"
5454
export PATH=$PATH:$BUILD_PATH/python_host/bin
5555

56-
try ./configure --host=$TOOLCHAIN_PREFIX --build=x86_64-linux --prefix="$BUILD_PATH/python-install" --disable-ipv6 CONFIG_SITE=config.site --disable-framework
56+
try ./configure --host=$TOOLCHAIN_PREFIX --build=x86_64-linux --enable-shared --prefix="$BUILD_PATH/python-install" --disable-ipv6 CONFIG_SITE=config.site --disable-framework
5757

5858
try cp $RECIPE_python/pyconfig.h pyconfig.h
59+
try cp $RECIPE_python/Setup Modules/Setup
5960

6061
# first run
61-
make
62+
make INSTSONAME=libpython3.3m.so
6263

6364
# second run
6465
try cp $BUILD_hostpython/hostpgen Parser/pgen
65-
try cp $RECIPE_python/Setup Modules/Setup
66-
try make
67-
try make install
66+
try make INSTSONAME=libpython3.3m.so
67+
try make install INSTSONAME=libpython3.3m.so
6868

6969
pop_arm
7070

7171
try cp $BUILD_hostpython/hostpython $BUILD_PATH/python-install/bin/python.host
72-
# try cp libpython3.3m.so $LIBS_PATH/
72+
try cp libpython3.3m.so $LIBS_PATH/
7373
}
7474

7575

0 commit comments

Comments
 (0)