1 | #!/bin/bash
|
---|
2 |
|
---|
3 | package=bzip2
|
---|
4 | version=-1.0.6
|
---|
5 |
|
---|
6 | progname=$0
|
---|
7 |
|
---|
8 | source ../cascade-make/lib/cascade-lib.bash GEXTGNOME ../.. $*
|
---|
9 |
|
---|
10 | prefix=$GEXTGNOME_INSTALLED
|
---|
11 |
|
---|
12 | if [ "x$CROSSCONFIGURE_ARGS" != "x" ] ; then
|
---|
13 | export CPP="$crossHost-cpp"
|
---|
14 | export CC="$crossHost-gcc"
|
---|
15 | export CXX="$crossHost-g++"
|
---|
16 | export LD="$crossHost-ld"
|
---|
17 | export AR="$crossHost-ar"
|
---|
18 | export RANLIB="$crossHost-ranlib"
|
---|
19 | fi
|
---|
20 |
|
---|
21 |
|
---|
22 | fixmake=0
|
---|
23 |
|
---|
24 | if [ "x$CROSSCONFIGURE_ARGS" != "x" ] ; then
|
---|
25 |
|
---|
26 | if [ $force_untar = "1" ] ; then
|
---|
27 | fixmake=1
|
---|
28 | elif [ $auto_config = "1" ] && [ ! -d $package$version ] ; then
|
---|
29 | fixmake=1
|
---|
30 | fi
|
---|
31 | fi
|
---|
32 |
|
---|
33 |
|
---|
34 | opt_run_untar $force_untar $auto_untar $package $version
|
---|
35 |
|
---|
36 | if [ $fixmake = "1" ] ; then
|
---|
37 |
|
---|
38 | cat $package$version/Makefile \
|
---|
39 | | sed "s/^CC=gcc/CC=$crossHost-gcc/" \
|
---|
40 | | sed "s/^AR=ar/AR=$crossHost-ar/" \
|
---|
41 | | sed "s/^RANLIB=ranlib/RANLIB=$crossHost-ranlib/" \
|
---|
42 | > $package$version/Makefile.cross
|
---|
43 | /bin/mv $package$version/Makefile.cross $package$version/Makefile
|
---|
44 | fi
|
---|
45 |
|
---|
46 |
|
---|
47 | #custom opt_run_make 'compile'
|
---|
48 | if [ $compile = 1 ] ; then
|
---|
49 | (cd $package$version ; make CFLAGS="$CFLAGS -fPIC")
|
---|
50 | fi
|
---|
51 |
|
---|
52 | #custom opt_run_make 'install'
|
---|
53 | if [ $install = 1 ] ; then
|
---|
54 | (cd $package$version ; make install PREFIX=$prefix)
|
---|
55 | fi
|
---|
56 |
|
---|
57 | opt_run_make $clean $package $version "clean"
|
---|
58 | opt_run_make $distclean $package $version "distclean"
|
---|
59 |
|
---|
60 | opt_run_tarclean $tarclean $package $version |
---|