7
7
# ------------------------------------------------------------------------------
8
8
9
9
# Modules
10
- MODULES=$MODULES
10
+ MODULES=
11
11
12
12
# Resolve Python path
13
13
PYTHON=" $( which python2.7) "
@@ -152,15 +152,16 @@ function push_arm() {
152
152
PYPLATFORM=" linux"
153
153
fi
154
154
155
- if [ " X$ANDROIDNDKVER " == " Xr5b" ]; then
156
- export TOOLCHAIN_PREFIX=arm-eabi
157
- export TOOLCHAIN_VERSION=4.4.0
158
- else
159
- # if [ "X${ANDROIDNDKVER:0:2}" == "Xr7" ] || [ "X$ANDROIDNDKVER" == "Xr8" ]; then
160
- # 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_VERSION=4.4.3
163
- fi
155
+ if [ " X$ANDROIDNDKVER " == " Xr5b" ]; then
156
+ export TOOLCHAIN_PREFIX=arm-eabi
157
+ export TOOLCHAIN_VERSION=4.4.0
158
+ elif [ " X${ANDROIDNDKVER: 0: 2} " == " Xr7" ] || [ " X${ANDROIDNDKVER: 0: 2} " == " Xr8" ]; then
159
+ export TOOLCHAIN_PREFIX=arm-linux-androideabi
160
+ export TOOLCHAIN_VERSION=4.4.3
161
+ elif [ " X${ANDROIDNDKVER} " == " Xr9" ]; then
162
+ export TOOLCHAIN_PREFIX=arm-linux-androideabi
163
+ export TOOLCHAIN_VERSION=4.8
164
+ fi
164
165
165
166
export PATH=" $ANDROIDNDK /toolchains/$TOOLCHAIN_PREFIX -$TOOLCHAIN_VERSION /prebuilt/$PYPLATFORM -x86/bin/:$ANDROIDNDK /toolchains/$TOOLCHAIN_PREFIX -$TOOLCHAIN_VERSION /prebuilt/$PYPLATFORM -x86_64/bin/:$ANDROIDNDK :$ANDROIDSDK /tools:$PATH "
166
167
@@ -358,6 +359,26 @@ function in_array() {
358
359
}
359
360
360
361
function run_source_modules() {
362
+ # preprocess version modules
363
+ needed=($MODULES )
364
+ while [ ${# needed[*]} -ne 0 ]; do
365
+
366
+ # pop module from the needed list
367
+ module=${needed[0]}
368
+ unset needed[0]
369
+ needed=( ${needed[@]} )
370
+
371
+ # is a version is specified ?
372
+ items=( ${module// ==/ } )
373
+ module=${items[0]}
374
+ version=${items[1]}
375
+ if [ ! -z " $version " ]; then
376
+ info " Specific version detected for $module : $version "
377
+ eval " VERSION_$module =$version "
378
+ fi
379
+ done
380
+
381
+
361
382
needed=($MODULES )
362
383
declare -a processed
363
384
@@ -374,6 +395,11 @@ function run_source_modules() {
374
395
unset needed[0]
375
396
needed=( ${needed[@]} )
376
397
398
+ # split the version if exist
399
+ items=( ${module// ==/ } )
400
+ module=${items[0]}
401
+ version=${items[1]}
402
+
377
403
# check if the module have already been declared
378
404
in_array $module " ${processed[@]} "
379
405
if [ $? -ne 255 ]; then
@@ -393,6 +419,13 @@ function run_source_modules() {
393
419
fi
394
420
source $RECIPES_PATH /$module /recipe.sh
395
421
422
+ # if a version has been specified by the user, the md5 will not
423
+ # correspond at all. so deactivate it.
424
+ if [ ! -z " $version " ]; then
425
+ debug " Deactivate MD5 test for $module , due to specific version"
426
+ eval " MD5_$module ="
427
+ fi
428
+
396
429
# append current module deps to the needed
397
430
deps=$( echo \$ " {DEPS_$module [@]}" )
398
431
eval deps=($deps )
0 commit comments