File tree 7 files changed +83
-35
lines changed
7 files changed +83
-35
lines changed Original file line number Diff line number Diff line change
1
+ 68,72d67
2
+ < f2c/arith.h: f2c/arithchk.c
3
+ < $(CC) $(CFLAGS) -DNO_FPINIT f2c/arithchk.c -lm -o f2c/arith || \
4
+ < $(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT f2c/arithchk.c \
5
+ < $(WARNING_CFLAGS) -lm -o f2c/arith
6
+ < f2c/arith > f2c/arith.h
Original file line number Diff line number Diff line change
1
+ #define IEEE_8087
2
+ #define Arith_Kind_ASL 1
3
+ #define Double_Align
4
+ #define NANCHECK
5
+ #define QNaN0 0x0
6
+ #define QNaN1 0x7ff80000
Original file line number Diff line number Diff line change
1
+ 16d15
2
+ < CC = cc
3
+ 18c17,19
4
+ < CFLAGS = -O
5
+ ---
6
+ > CC = $(ANDROIDNDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
7
+ > LD = $(ANDROIDNDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld
8
+ > CFLAGS = -DNO_ISATTY -DANDROID -mandroid -I$(ANDROIDNDK)/platforms/android-14/arch-arm/usr/include -L$(ANDROIDNDK)/platforms/android-14/arch-arm/usr/lib -O -fomit-frame-pointer --sysroot $(ANDROIDNDK)/platforms/android-14/arch-arm
9
+ 23c24
10
+ < ld -r -x -o $*.xxx $*.o
11
+ ---
12
+ > $(LD) -E -r -o $*.xxx $*.o
Original file line number Diff line number Diff line change @@ -23,13 +23,29 @@ function prebuild_c_igraph() {
23
23
}
24
24
25
25
function shouldbuild_c_igraph() {
26
- false
26
+ if [ -e $BUILD_c_igraph /.built ]; then
27
+ export DO_BUILD=0;
28
+ fi
27
29
}
28
30
29
31
function build_c_igraph() {
30
- # I'm not even going to make anything here!
31
- # I'll let the main igraph recipe do that.
32
- true
32
+ cd $BUILD_c_igraph
33
+
34
+ push_arm
35
+ try patch $BUILD_c_igraph /src/Makefile.am $RECIPE_c_igraph /Makefile.am.patch
36
+ export OLD_CPPFLAGS=" $CPPFLAGS "
37
+ export CPPFLAGS=" $CPPFLAGS -I$ANDROIDNDK /sources/cxx-stl/gnu-libstdc++/4.4.3/include -I$ANDROIDNDK /sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -L$ANDROIDNDK /platforms/android-$ANDROIDAPI /arch-arm/usr/lib"
38
+ try ./configure --prefix=" $BUILD_PATH /python-install" --build=i686-pc-linux-gnu --host=arm-linux-eabi
39
+ export CPPFLAGS=" $OLD_CPPFLAGS "
40
+ try cp -f $RECIPE_c_igraph /arith.h $BUILD_c_igraph /src/f2c/arith.h
41
+ try patch $BUILD_c_igraph /src/f2c/sysdep1.h $RECIPE_c_igraph /sysdep1.h.patch
42
+ try patch $BUILD_c_igraph /src/f2c/uninit.c $RECIPE_c_igraph /uninit.c.patch
43
+ try patch $BUILD_c_igraph /config.h $RECIPE_c_igraph /config.h.patch
44
+ try $MAKE
45
+ try $MAKE install
46
+
47
+ pop_arm
48
+ touch .built
33
49
}
34
50
35
51
function postbuild_c_igraph() {
Original file line number Diff line number Diff line change
1
+ 16a17
2
+ > /*android doesn't like these
3
+ 18c19,20
4
+ < #define OFF_T __off64_t
5
+ ---
6
+ > #define OFF_T __off64_t*/
7
+ > #define OFF_T long
Original file line number Diff line number Diff line change
1
+ 276c276,277
2
+ < #include <fpu_control.h>
3
+ ---
4
+ > //doesn't exist on Android
5
+ > //#include <fpu_control.h>
6
+ 334a336
7
+ > /*
8
+ 336c338
9
+ < #define RQD_FPU_MASK (_FPU_MASK_OM+_FPU_MASK_IM+_FPU_MASK_ZM)
10
+ ---
11
+ > #define RQD_FPU_MASK (_FPU_MASK_OM+_FPU_MASK_IM+_FPU_MASK_ZM)*/
12
+ 343a346
13
+ > /*
14
+ 345c348
15
+ < #define RQD_FPU_MASK (_FPU_MASK_OM+_FPU_MASK_IM+_FPU_MASK_ZM)
16
+ ---
17
+ > #define RQD_FPU_MASK (_FPU_MASK_OM+_FPU_MASK_IM+_FPU_MASK_ZM)*/
18
+ 350a354
19
+ > /*
20
+ 352c356
21
+ < #define RQD_FPU_MASK (_FPU_MASK_O+_FPU_MASK_V+_FPU_MASK_Z)
22
+ ---
23
+ > #define RQD_FPU_MASK (_FPU_MASK_O+_FPU_MASK_V+_FPU_MASK_Z)*/
Original file line number Diff line number Diff line change @@ -18,45 +18,23 @@ RECIPE_igraph=$RECIPES_PATH/igraph
18
18
19
19
20
20
function prebuild_igraph() {
21
- true
21
+ patch setup.py $RECIPE_igraph /setup.py.patch
22
+ }
23
+
24
+ function shouldbuild_igraph() {
25
+ if [ -e $BUILD_igraph /.built ]; then
26
+ export DO_BUILD=0;
27
+ fi
22
28
}
23
29
24
30
function build_igraph() {
25
31
cd $BUILD_igraph
26
32
push_arm
27
33
28
- export CMD=" rename 's/attributes/pyattributes/' src/attributes*"
29
- echo $CMD
30
- try $CMD
31
- export CMD=" rename 's/random/pyrandom/' src/random*"
32
- echo $CMD
33
- try $CMD
34
- export CMD=" cp src/* $BUILD_c_igraph /src/"
35
- echo $CMD
36
- try $CMD
37
- cd $BUILD_c_igraph
38
- try patch src/Makefile.am $RECIPE_igraph /Makefile.am.patch
39
- export CMD=" sed -i s{BUILD_PATH{$BUILD_PATH {g src/Makefile.am"
40
- echo $CMD
41
- try $CMD
42
- export CPPFLAGS=" -I$ANDROIDNDK /sources/cxx-stl/gnu-libstdc++/4.4.3/include -I$ANDROIDNDK /sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -DHAVE_LOGBL"
43
- export CFLAGS=" -I$BUILD_PATH /python-install/include/python2.7 -L$BUILD_PATH /python-install/lib"
44
- try ./configure --prefix=" $BUILD_c_igraph " --host=arm-gnueabi --with-external-f2c
45
- try $MAKE
46
- try $MAKE install
47
- cd $BUILD_igraph
48
- export BUILDDIR=" build/lib.` python $RECIPE_igraph /get_platform.py` "
49
- export CMD=" mkdir -p $BUILDDIR "
50
- echo $CMD
51
- try $CMD
52
- export CMD=" cp $BUILD_c_igraph /lib/libigraph.so.0.0.0 $BUILDDIR /_igraph.so"
53
- echo $CMD
54
- try $CMD
55
- cd $BUILD_igraph
56
- try $HOSTPYTHON setup.py build_scripts
57
- try $HOSTPYTHON setup.py install --skip-build --no-pkg-config --root $BUILD_PATH /python-install
34
+ try $HOSTPYTHON setup.py build_ext -I" $BUILD_PATH /python-install/include/igraph:$ANDROIDNDK /sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include" -L" $BUILD_PATH /python-install/lib:$ANDROIDNDK /sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi" -l gnustl_static -p arm-gnueabi install
58
35
59
36
pop_arm
37
+ touch .built
60
38
}
61
39
62
40
function postbuild_igraph() {
You can’t perform that action at this time.
0 commit comments