DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
+define dl_method_git
+$(if $(filter https://github.com/% git://github.com/%,$(1)),github_archive,git)
+endef
+
# Try to guess the download method from the URL
define dl_method
$(strip \
- $(if $(2),$(2), \
- $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
- $(if $(filter git://%,$(1)),git, \
- $(if $(filter svn://%,$(1)),svn, \
- $(if $(filter cvs://%,$(1)),cvs, \
- $(if $(filter hg://%,$(1)),hg, \
- $(if $(filter sftp://%,$(1)),bzr, \
- unknown \
+ $(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)),
+ $(if $(2),$(2), \
+ $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
+ $(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \
+ $(if $(filter svn://%,$(1)),svn, \
+ $(if $(filter cvs://%,$(1)),cvs, \
+ $(if $(filter hg://%,$(1)),hg, \
+ $(if $(filter sftp://%,$(1)),bzr, \
+ unknown \
+ ) \
) \
) \
) \