re-arrange package installation order by source
add emacs version check, only support >= 24.2