File tree Expand file tree Collapse file tree 6 files changed +211
-4
lines changed
Expand file tree Collapse file tree 6 files changed +211
-4
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # TODO get a release version if possible
4+ VERSION_libswift=
5+ DEPS_libswift=()
6+ # TODO get a version specific URL and update the md5sum
7+ # URL_libswift=https://github.com/whirm/tgs-android/archive/master.zip
8+ # MD5_libswift=23ce86e2bd4d213fdcf1d8c5c37a979a
9+ URL_libswift=https://nodeload.github.com/triblerteam/libswift/zip/4123e6579309cd65a5ba3800e0b674f348c62bfb
10+ FILENAME_libswift=4123e6579309cd65a5ba3800e0b674f348c62bfb
11+ EXTRACT_libswift=$BUILD_PATH /libswift/libswift-$FILENAME_libswift
12+ BUILD_libswift=$BUILD_PATH /libswift/libswift
13+ RECIPE_libswift=$RECIPES_PATH /libswift
14+
15+ function prebuild_libswift() {
16+ true
17+ }
18+
19+ function build_libswift() {
20+ if [ ! -d " $BUILD_libswift " ]; then
21+ cd $BUILD_PATH /libswift
22+ mkdir -p libswift
23+ unzip $PACKAGES_PATH /$FILENAME_libswift
24+ rm -Rf libswift/jni
25+ mv $EXTRACT_libswift libswift/jni
26+ fi
27+ cd $BUILD_libswift
28+ mkdir -p libs
29+
30+ if [ -f " $BUILD_PATH /libs/libevent.so" ]; then
31+ # return
32+ true
33+ fi
34+
35+ push_arm
36+
37+ # FIXME get it so you don't have to download the jni module manually
38+ export LDFLAGS=$LIBLINK
39+ try ndk-build -C $BUILD_libswift /jni
40+ unset LDFLAGS
41+
42+ # TODO find out why it's libevent.so and not libswift.so
43+ try cp -a $BUILD_libswift /libs/$ARCH /* .so $LIBS_PATH
44+
45+ pop_arm
46+ }
47+
48+ function postbuild_libswift() {
49+ true
50+ }
51+
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ VERSION_m2crypto=0.21.1
4+ DEPS_m2crypto=(openssl hostpython python)
5+ URL_m2crypto=http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-$VERSION_m2crypto .tar.gz
6+ MD5_m2crypto=f93d8462ff7646397a9f77a2fe602d17
7+ BUILD_m2crypto=$BUILD_PATH /m2crypto/$( get_directory $URL_m2crypto )
8+ RECIPE_m2crypto=$RECIPES_PATH /m2crypto
9+
10+ function prebuild_m2crypto() {
11+ true
12+ }
13+
14+ function build_m2crypto() {
15+ cd $BUILD_m2crypto
16+
17+ if [ -d " $BUILD_PATH /python-install/lib/python2.7/site-packages/m2crypto" ]; then
18+ # return
19+ true
20+ fi
21+ push_arm
22+
23+ # build python extension
24+ export CFLAGS=" $CFLAGS -I$BUILD_PATH /python-install/include/python2.7"
25+ export LDSHARED=$LIBLINK
26+ export PYTHONPATH=$BUILD_PATH /python-install/lib/python2.7/site-packages
27+
28+ try $BUILD_hostpython /hostpython setup.py build_ext --openssl=$BUILD_openssl --library-dirs=$BUILD_openssl
29+
30+ unset LDSHARED
31+
32+ try $BUILD_hostpython /hostpython setup.py install -O2 --prefix $BUILD_PATH /python-install
33+
34+ pop_arm
35+ }
36+
37+ function postbuild_m2crypto() {
38+ true
39+ }
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ VERSION_netifaces=0.10.3
4+ DEPS_netifaces=(hostpython python setuptools)
5+ URL_netifaces=http://pypi.python.org/packages/source/n/netifaces/netifaces-$VERSION_netifaces .tar.gz
6+ MD5_netifaces=b96913473e1dcc3c4a7c43bc15d10e26
7+ BUILD_netifaces=$BUILD_PATH /netifaces/$( get_directory $URL_netifaces )
8+ RECIPE_netifaces=$RECIPES_PATH /netifaces
9+
10+ function prebuild_netifaces() {
11+ true
12+ }
13+
14+ function build_netifaces() {
15+ cd $BUILD_netifaces
16+
17+ # FIXME it actually builds an egg
18+ if [ -d " $BUILD_PATH /python-install/lib/python2.7/site-packages/netifaces" ]; then
19+ # return
20+ true
21+ fi
22+ push_arm
23+
24+ # build python extension
25+ export CFLAGS=" $CFLAGS -I$BUILD_PATH /python-install/include/python2.7"
26+ export LDSHARED=$LIBLINK
27+ export PYTHONPATH=$BUILD_PATH /python-install/lib/python2.7/site-packages
28+
29+ # resulting .so is empty but .o will be collected into libpymodules.so in final distribute.sh step
30+ try $BUILD_hostpython /hostpython setup.py build_ext
31+
32+ unset LDSHARED
33+
34+ try $BUILD_hostpython /hostpython setup.py install -O2 --prefix $BUILD_PATH /python-install
35+
36+ pop_arm
37+ }
38+
39+ function postbuild_netifaces() {
40+ true
41+ }
Original file line number Diff line number Diff line change 1+ LOCAL_PATH := $(call my-dir)
2+
3+ include $(CLEAR_VARS )
4+
5+ LOCAL_MODULE := libevent2
6+
7+ LOCAL_SRC_FILES := libevent2/lib/libevent.a
8+ LOCAL_EXPORT_C_INCLUDES := libevent2/include
9+ LOCAL_C_INCLUDES := libevent2/include
10+
11+ include $(PREBUILT_STATIC_LIBRARY )
12+
13+ LOCAL_MODULE := swift
14+ LOCAL_SRC_FILES := swift.cpp sha1.cpp compat.cpp sendrecv.cpp send_control.cpp hashtree.cpp bin.cpp binmap.cpp binheap.cpp channel.cpp transfer.cpp httpgw.cpp statsgw.cpp cmdgw.cpp avgspeed.cpp availability.cpp
15+
16+ LOCAL_CFLAGS += -D__NEW__
17+
18+ LOCAL_STATIC_LIBRARIES := libevent2
19+
20+ # include $(BUILD_SHARED_LIBRARY)
21+ include $(BUILD_EXECUTABLE )
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # TODO get a release version if possible
4+ VERSION_swift=
5+ DEPS_swift=()
6+ URL_swift=https://nodeload.github.com/triblerteam/libswift/zip/4123e6579309cd65a5ba3800e0b674f348c62bfb
7+ MD5_swift=99cf78ea0b4aeb23a2439dd886f00f8f
8+ FILENAME_swift=4123e6579309cd65a5ba3800e0b674f348c62bfb
9+ EXTRACT_swift=$BUILD_PATH /swift/libswift-$FILENAME_swift
10+ BUILD_swift=$BUILD_PATH /swift/swift
11+ RECIPE_swift=$RECIPES_PATH /swift
12+
13+ function prebuild_swift() {
14+ true
15+ }
16+
17+ function build_swift() {
18+ if [ ! -d " $BUILD_swift " ]; then
19+ cd $BUILD_PATH /swift
20+ mkdir -p swift
21+ unzip $PACKAGES_PATH /$FILENAME_swift
22+ rm -Rf swift/jni
23+ mv $EXTRACT_swift swift/jni
24+
25+ # Use differend Android.mk to create a binary instead of a library
26+ cp $RECIPE_swift /extra/Android.mk swift/jni/Android.mk
27+ fi
28+
29+ cd $BUILD_swift
30+ mkdir -p libs
31+
32+ if [ -f " $BUILD_PATH /libs/swift" ]; then
33+ # return
34+ true
35+ fi
36+
37+ push_arm
38+
39+ # FIXME get it so you don't have to download the jni module manually
40+ export LDFLAGS=$LIBLINK
41+ try ndk-build -C $BUILD_swift /jni
42+ unset LDFLAGS
43+
44+ # TODO find out why it's libevent.so and not libswift.so
45+ try cp -a $BUILD_swift /libs/$ARCH /libevent $LIBS_PATH /swift
46+
47+ pop_arm
48+ }
49+
50+ function postbuild_swift() {
51+ true
52+ }
53+
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- VERSION_twisted=${VERSION_twisted:- 11.1 }
3+ VERSION_twisted=${VERSION_twisted:- 14.0 }
44URL_twisted=http://twistedmatrix.com/Releases/Twisted/$VERSION_twisted /Twisted-$VERSION_twisted .0.tar.bz2
5+
56DEPS_twisted=(zope)
6- MD5_twisted=
7+ MD5_twisted=9625c094e0a18da77faa4627b98c9815
78BUILD_twisted=$BUILD_PATH /twisted/$( get_directory $URL_twisted )
89RECIPE_twisted=$RECIPES_PATH /twisted
910
1011function prebuild_twisted() {
11- true
12+ echo " tty.pyo" >> " ${BUILD_PATH} /whitelist.txt"
13+ echo " termios.so" >> " ${BUILD_PATH} /whitelist.txt"
1214}
1315
1416function shouldbuild_twisted() {
@@ -25,7 +27,7 @@ function build_twisted() {
2527 export LDFLAGS=" $LDFLAGS -L$LIBS_PATH "
2628 export LDSHARED=" $LIBLINK "
2729
28- export PYTHONPATH=$BUILD_hostpython /Lib/site-packages
30+ export PYTHONPATH=$BUILD_hostpython /Lib/site-packages: $BUILD_hostpython /build/lib.linux-x86_64-2.7
2931
3032 # fake try to be able to cythonize generated files
3133 $HOSTPYTHON setup.py build_ext
You can’t perform that action at this time.
0 commit comments