77# ------------------------------------------------------------------------------
88
99# Modules
10- MODULES=$MODULES
10+ MODULES=
1111
1212# Resolve Python path
1313PYTHON=" $( which python2.7) "
@@ -152,15 +152,16 @@ function push_arm() {
152152 PYPLATFORM=" linux"
153153 fi
154154
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
164165
165166 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 "
166167
@@ -358,6 +359,26 @@ function in_array() {
358359}
359360
360361function 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+
361382 needed=($MODULES )
362383 declare -a processed
363384
@@ -374,6 +395,11 @@ function run_source_modules() {
374395 unset needed[0]
375396 needed=( ${needed[@]} )
376397
398+ # split the version if exist
399+ items=( ${module// ==/ } )
400+ module=${items[0]}
401+ version=${items[1]}
402+
377403 # check if the module have already been declared
378404 in_array $module " ${processed[@]} "
379405 if [ $? -ne 255 ]; then
@@ -393,6 +419,13 @@ function run_source_modules() {
393419 fi
394420 source $RECIPES_PATH /$module /recipe.sh
395421
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+
396429 # append current module deps to the needed
397430 deps=$( echo \$ " {DEPS_$module [@]}" )
398431 eval deps=($deps )
0 commit comments