summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-09-16 22:33:06 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-09-17 14:09:48 +0200
commita172611725f5eb6b06b64f280c3656780c809f51 (patch)
tree98870dc141006df243e2c7f1913bca3385e81ae0
parent0a5ec788662b9b18aa65806a706904bf9860b837 (diff)
parent1475384413f2db15bceb69c8c56454319c3ce5e7 (diff)
downloadbuildroot-novena-a172611725f5eb6b06b64f280c3656780c809f51.tar.gz
buildroot-novena-a172611725f5eb6b06b64f280c3656780c809f51.zip
Merge branch 'for-2010.11/download-rework' of git://git.busybox.net/~tpetazzoni/git/buildroot
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--CHANGES3
-rw-r--r--Config.in24
-rw-r--r--Makefile16
-rw-r--r--configs/arm_toolchain_defconfig5
-rw-r--r--configs/at91rm9200df_defconfig5
-rw-r--r--configs/at91rm9200df_ext_bare_defconfig5
-rw-r--r--configs/at91rm9200df_ext_defconfig5
-rw-r--r--configs/at91sam9260dfc_defconfig5
-rw-r--r--configs/at91sam9260dfc_ext_bare_defconfig5
-rw-r--r--configs/at91sam9260dfc_ext_defconfig5
-rw-r--r--configs/at91sam9261ek_defconfig5
-rw-r--r--configs/at91sam9261ek_ext_bare_defconfig5
-rw-r--r--configs/at91sam9261ek_ext_defconfig5
-rw-r--r--configs/at91sam9263ek_defconfig5
-rw-r--r--configs/at91sam9263ek_ext_bare_defconfig5
-rw-r--r--configs/at91sam9263ek_ext_defconfig5
-rw-r--r--configs/at91sam9g20dfc_defconfig5
-rw-r--r--configs/at91sam9g20dfc_ext_bare_defconfig5
-rw-r--r--configs/at91sam9g20dfc_ext_defconfig5
-rw-r--r--configs/atngw100-base_defconfig5
-rw-r--r--configs/atngw100_defconfig5
-rw-r--r--configs/atstk1005_defconfig5
-rw-r--r--configs/atstk100x_defconfig5
-rw-r--r--configs/i386_defconfig5
-rw-r--r--configs/i686_defconfig5
-rw-r--r--configs/integrator926_defconfig5
-rw-r--r--configs/integrator926_huge_defconfig5
-rw-r--r--configs/kb9202_defconfig5
-rw-r--r--configs/v100sc2_defconfig5
-rw-r--r--package/Makefile.package.in138
-rw-r--r--package/libsvgtiny/libsvgtiny.mk11
-rw-r--r--package/mpfr/mpfr.mk2
-rw-r--r--package/multimedia/tremor/tremor.mk12
-rwxr-xr-xtoolchain/wget-show-external-deps.sh6
34 files changed, 193 insertions, 149 deletions
diff --git a/CHANGES b/CHANGES
index 70b22af7a..a5b035f2b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,9 @@
Old-style package hooks (*_HOOK_POST_*) removed. Use the more
generic new-style ones instead.
+ Download handling reworked and support for git/svn downloads
+ added.
+
Updated/fixed packages: alsa-lib, at, avahi, berkeleydb, bind,
bmon, bridge-utils, busybox, dbus, dmraid, docker, dropbear,
e2fsprogs, expat, freetype, gawk, gvfs, haserl, hostapd,
diff --git a/Config.in b/Config.in
index da3619a2a..0f8ddf4fa 100644
--- a/Config.in
+++ b/Config.in
@@ -21,25 +21,17 @@ config BR2_WGET
string "Wget command"
default "wget --passive-ftp -nd"
-config BR2_SVN_CO
- string "Subversion (svn) command to download source tree"
- default "svn co"
+config BR2_SVN
+ string "Subversion (svn) command"
+ default "svn"
-config BR2_SVN_UP
- string "Subversion (svn) command to update source tree"
- default "svn up"
-
-config BR2_BZR_CO
- string "Bazaar (bzr) command to download source tree"
- default "bzr co"
-
-config BR2_BZR_UP
- string "Bazaar (bzr) command to update source tree"
- default "bzr up"
+config BR2_BZR
+ string "Bazaar (bzr) command"
+ default "bzr"
config BR2_GIT
- string "Git command to download source tree"
- default "git clone"
+ string "Git command"
+ default "git"
config BR2_ZCAT
string "zcat command"
diff --git a/Makefile b/Makefile
index 1ab446d8b..faa802bb7 100644
--- a/Makefile
+++ b/Makefile
@@ -244,21 +244,10 @@ ifeq ($(ARCH),xtensa)
ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
endif
-WGET:=$(call qstrip,$(BR2_WGET)) $(SPIDER) $(QUIET)
-SVN_CO:=$(call qstrip,$(BR2_SVN_CO)) $(QUIET)
-SVN_UP:=$(call qstrip,$(BR2_SVN_UP)) $(QUIET)
-BZR_CO:=$(call qstrip,$(BR2_BZR_CO)) $(QUIET)
-BZR_UP:=$(call qstrip,$(BR2_BZR_UP)) $(QUIET)
-GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
ZCAT:=$(call qstrip,$(BR2_ZCAT))
BZCAT:=$(call qstrip,$(BR2_BZCAT))
TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
-DL_DIR=$(call qstrip,$(BR2_DL_DIR))
-ifeq ($(DL_DIR),)
-DL_DIR:=$(TOPDIR)/dl
-endif
-
GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))
@@ -437,11 +426,10 @@ endif
source: $(TARGETS_SOURCE) $(HOST_SOURCE)
_source-check:
- $(MAKE) $(EXTRAMAKEARGS) SPIDER=--spider source
+ $(MAKE) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source
external-deps:
- @$(MAKE) -Bs BR2_WGET=$(TOPDIR)/toolchain/wget-show-external-deps.sh \
- $(EXTRAMAKEARGS) SPIDER=--spider source
+ @$(MAKE) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source
show-targets:
@echo $(TARGETS)
diff --git a/configs/arm_toolchain_defconfig b/configs/arm_toolchain_defconfig
index 08f548589..37426ae63 100644
--- a/configs/arm_toolchain_defconfig
+++ b/configs/arm_toolchain_defconfig
@@ -131,9 +131,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91rm9200df_defconfig b/configs/at91rm9200df_defconfig
index f589eeb2b..ac5bfa3c3 100644
--- a/configs/at91rm9200df_defconfig
+++ b/configs/at91rm9200df_defconfig
@@ -136,9 +136,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91rm9200df_ext_bare_defconfig b/configs/at91rm9200df_ext_bare_defconfig
index 651ac37d6..608460da0 100644
--- a/configs/at91rm9200df_ext_bare_defconfig
+++ b/configs/at91rm9200df_ext_bare_defconfig
@@ -131,9 +131,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91rm9200df_ext_defconfig b/configs/at91rm9200df_ext_defconfig
index d261fb817..26ec52785 100644
--- a/configs/at91rm9200df_ext_defconfig
+++ b/configs/at91rm9200df_ext_defconfig
@@ -142,9 +142,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9260dfc_defconfig b/configs/at91sam9260dfc_defconfig
index 8aeff0faf..50fa8effe 100644
--- a/configs/at91sam9260dfc_defconfig
+++ b/configs/at91sam9260dfc_defconfig
@@ -149,9 +149,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9260dfc_ext_bare_defconfig b/configs/at91sam9260dfc_ext_bare_defconfig
index 9527522aa..9977e42eb 100644
--- a/configs/at91sam9260dfc_ext_bare_defconfig
+++ b/configs/at91sam9260dfc_ext_bare_defconfig
@@ -131,9 +131,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9260dfc_ext_defconfig b/configs/at91sam9260dfc_ext_defconfig
index e9ad28b40..b46b8b0f5 100644
--- a/configs/at91sam9260dfc_ext_defconfig
+++ b/configs/at91sam9260dfc_ext_defconfig
@@ -150,9 +150,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9261ek_defconfig b/configs/at91sam9261ek_defconfig
index 5d45cd404..2ef174852 100644
--- a/configs/at91sam9261ek_defconfig
+++ b/configs/at91sam9261ek_defconfig
@@ -152,9 +152,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
# Build options
#
BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9261ek_ext_bare_defconfig b/configs/at91sam9261ek_ext_bare_defconfig
index 99b124d2a..6837f4125 100644
--- a/configs/at91sam9261ek_ext_bare_defconfig
+++ b/configs/at91sam9261ek_ext_bare_defconfig
@@ -134,9 +134,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9261ek_ext_defconfig b/configs/at91sam9261ek_ext_defconfig
index 45c8744c2..1f6412335 100644
--- a/configs/at91sam9261ek_ext_defconfig
+++ b/configs/at91sam9261ek_ext_defconfig
@@ -153,9 +153,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
# Build options
#
BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9263ek_defconfig b/configs/at91sam9263ek_defconfig
index e4200e1f7..df559da2d 100644
--- a/configs/at91sam9263ek_defconfig
+++ b/configs/at91sam9263ek_defconfig
@@ -150,9 +150,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
# Build options
#
BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9263ek_ext_bare_defconfig b/configs/at91sam9263ek_ext_bare_defconfig
index b9712b584..814331850 100644
--- a/configs/at91sam9263ek_ext_bare_defconfig
+++ b/configs/at91sam9263ek_ext_bare_defconfig
@@ -133,9 +133,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9263ek_ext_defconfig b/configs/at91sam9263ek_ext_defconfig
index 5c499e970..d044d0566 100644
--- a/configs/at91sam9263ek_ext_defconfig
+++ b/configs/at91sam9263ek_ext_defconfig
@@ -152,9 +152,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
# Build options
#
BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9g20dfc_defconfig b/configs/at91sam9g20dfc_defconfig
index bd465572c..723932780 100644
--- a/configs/at91sam9g20dfc_defconfig
+++ b/configs/at91sam9g20dfc_defconfig
@@ -150,9 +150,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9g20dfc_ext_bare_defconfig b/configs/at91sam9g20dfc_ext_bare_defconfig
index a48822a54..a63706e89 100644
--- a/configs/at91sam9g20dfc_ext_bare_defconfig
+++ b/configs/at91sam9g20dfc_ext_bare_defconfig
@@ -131,9 +131,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/at91sam9g20dfc_ext_defconfig b/configs/at91sam9g20dfc_ext_defconfig
index f233890da..02dd6b4ec 100644
--- a/configs/at91sam9g20dfc_ext_defconfig
+++ b/configs/at91sam9g20dfc_ext_defconfig
@@ -150,9 +150,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/atngw100-base_defconfig b/configs/atngw100-base_defconfig
index b49852442..ec3d4a0df 100644
--- a/configs/atngw100-base_defconfig
+++ b/configs/atngw100-base_defconfig
@@ -84,9 +84,8 @@ BR2_TARGET_AVR32_ATNGW100_BASE=y
# Build options
#
BR2_WGET="wget --passive-ftp --retry-connrefused --waitretry=10"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="zcat"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/atngw100_defconfig b/configs/atngw100_defconfig
index 619cae67f..6d8293c55 100644
--- a/configs/atngw100_defconfig
+++ b/configs/atngw100_defconfig
@@ -69,11 +69,10 @@ BR2_TARGET_AVR32_ATNGW100=y
# Commands
#
BR2_WGET="wget --passive-ftp --retry-connrefused --waitretry=10"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
+BR2_SVN="svn"
BR2_BZR_CO="bzr co"
BR2_BZR_UP="bzr up"
-BR2_GIT="git clone"
+BR2_GIT="git"
BR2_ZCAT="zcat"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/atstk1005_defconfig b/configs/atstk1005_defconfig
index 48ea91598..d0ec24d85 100644
--- a/configs/atstk1005_defconfig
+++ b/configs/atstk1005_defconfig
@@ -82,9 +82,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-avr32/kernel-patches-$(BR2_K
# Build options
#
BR2_WGET="wget --passive-ftp --retry-connrefused --waitretry=10"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="zcat"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/atstk100x_defconfig b/configs/atstk100x_defconfig
index 4be976721..6ee8f11db 100644
--- a/configs/atstk100x_defconfig
+++ b/configs/atstk100x_defconfig
@@ -83,9 +83,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-avr32/kernel-patches-$(BR2_K
# Build options
#
BR2_WGET="wget --passive-ftp --retry-connrefused --waitretry=10"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="zcat"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/i386_defconfig b/configs/i386_defconfig
index 7910511d0..2e1bf061a 100644
--- a/configs/i386_defconfig
+++ b/configs/i386_defconfig
@@ -85,9 +85,8 @@ BR2_TARGET_I686=y
# Build options
#
BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/i686_defconfig b/configs/i686_defconfig
index e75f1051d..fe249fa7a 100644
--- a/configs/i686_defconfig
+++ b/configs/i686_defconfig
@@ -85,9 +85,8 @@ BR2_TARGET_I686=y
# Build options
#
BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/integrator926_defconfig b/configs/integrator926_defconfig
index 724b02515..d7ccc6533 100644
--- a/configs/integrator926_defconfig
+++ b/configs/integrator926_defconfig
@@ -81,9 +81,8 @@ BR2_BOARD_PATH="target/device/ARMLTD/$(BR2_BOARD_NAME)"
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/integrator926_huge_defconfig b/configs/integrator926_huge_defconfig
index 2b20b0be9..f88fcc7bd 100644
--- a/configs/integrator926_huge_defconfig
+++ b/configs/integrator926_huge_defconfig
@@ -81,9 +81,8 @@ BR2_BOARD_PATH="target/device/ARMLTD/$(BR2_BOARD_NAME)"
# Build options
#
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/kb9202_defconfig b/configs/kb9202_defconfig
index ee2db69d1..727b3c21d 100644
--- a/configs/kb9202_defconfig
+++ b/configs/kb9202_defconfig
@@ -92,9 +92,8 @@ BR2_TARGET_ARM=y
#
BR2_PRIMARY_SITE=""
BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/configs/v100sc2_defconfig b/configs/v100sc2_defconfig
index f71a0d38f..a7d0f3407 100644
--- a/configs/v100sc2_defconfig
+++ b/configs/v100sc2_defconfig
@@ -63,9 +63,8 @@ BR2_TARGET_VALKA_V100SC2=y
#
BR2_PRIMARY_SITE=""
BR2_WGET="wget --passive-ftp --retry-connrefused --waitretry=10"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
BR2_ZCAT="zcat"
BR2_BZCAT="bzcat"
BR2_TAR_OPTIONS=""
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 2c667df33..58a9a51dc 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -68,6 +68,92 @@ MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESE
TERM_BOLD := $(shell tput smso)
TERM_RESET := $(shell tput rmso)
+# Download method commands
+WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET)
+SVN:=$(call qstrip,$(BR2_SVN)) $(QUIET)
+BZR:=$(call qstrip,$(BR2_BZR)) $(QUIET)
+GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
+
+# Default spider mode is 'DOWNLOAD'. Other possible values are 'SOURCE_CHECK'
+# used by the _source-check target and 'SHOW_EXTERNAL_DEPS', used by the
+# external-deps target.
+DL_MODE=DOWNLOAD
+
+DL_DIR=$(call qstrip,$(BR2_DL_DIR))
+ifeq ($(DL_DIR),)
+DL_DIR:=$(TOPDIR)/dl
+endif
+
+################################################################################
+# The DOWNLOAD_{GIT,SVN} helpers are in charge of getting a working copy of
+# the source repository for their corresponding SCM, checking out the requested
+# version / commit / tag, and create an archive out of it. DOWNLOAD_WGET is the
+# normal wget-based download mechanism.
+#
+# The SOURCE_CHECK_{GIT,SVN,WGET} helpers are in charge of simply checking that
+# the source is available for download. This can be used to make sure one will
+# be able to get all the sources needed for one's build configuration.
+#
+# The SHOW_EXTERNAL_DEPS_{GIT,SVN,WGET} helpers simply output to the console
+# the names of the files that will be downloaded, or path and revision of the
+# source repositories, producing a list of all the "external dependencies" of
+# a given build configuration.
+################################################################################
+
+define DOWNLOAD_GIT
+ test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
+ (pushd $(DL_DIR) > /dev/null && \
+ $(GIT) clone $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
+ pushd $($(PKG)_BASE_NAME) > /dev/null && \
+ $(GIT) archive --format=tar --prefix=$($(PKG)_BASE_NAME)/ $($(PKG)_DL_VERSION) | \
+ gzip -c > $(DL_DIR)/$($(PKG)_SOURCE) && \
+ popd > /dev/null && \
+ rm -rf $($(PKG)_DL_DIR) && \
+ popd > /dev/null)
+endef
+
+# TODO: improve to check that the given PKG_DL_VERSION exists on the remote
+# repository
+define SOURCE_CHECK_GIT
+ $(GIT) ls-remote --heads $($(PKG)_SITE) > /dev/null
+endef
+
+define SHOW_EXTERNAL_DEPS_GIT
+ echo "$($(PKG)_SITE) [git: $($(PKG)_DL_VERSION)]"
+endef
+
+
+define DOWNLOAD_SVN
+ test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
+ (pushd $(DL_DIR) > /dev/null && \
+ $(SVN) export -r $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_DL_DIR) && \
+ $(TAR) czf $($(PKG)_SOURCE) $($(PKG)_BASE_NAME)/ && \
+ rm -rf $($(PKG)_DL_DIR) && \
+ popd > /dev/null)
+endef
+
+define SOURCE_CHECK_SVN
+ $(SVN) ls $($(PKG)_SITE) > /dev/null
+endef
+
+define SHOW_EXTERNAL_DEPS_SVN
+ echo "$($(PKG)_SITE) [svn: $($(PKG)_DL_VERSION)]"
+endef
+
+
+define DOWNLOAD_WGET
+ test -e $(DL_DIR)/$(2) || \
+ $(WGET) -P $(DL_DIR) $(call qstrip,$(1))/$(2)
+endef
+
+define SOURCE_CHECK_WGET
+ $(WGET) --spider $(call qstrip,$(1))/$(2)
+endef
+
+define SHOW_EXTERNAL_DEPS_WGET
+ echo $(2)
+endef
+
################################################################################
# DOWNLOAD -- Download helper. Will try to download source from:
# 1) BR2_PRIMARY_SITE if enabled
@@ -81,16 +167,22 @@ TERM_RESET := $(shell tput rmso)
# $(call DOWNLOAD,$(FOO_SITE),$(FOO_SOURCE))
################################################################################
-# support make source-check/external-deps
-ifneq ($(SPIDER),)
-DOWNLOAD=$(WGET) -P $(DL_DIR) $(1)/$(2)
-else
define DOWNLOAD
- $(Q)test -e $(DL_DIR)/$(2) || \
- for site in $(call qstrip,$(BR2_PRIMARY_SITE)) $(1) $(call qstrip,$(BR2_BACKUP_SITE)); \
- do $(WGET) -P $(DL_DIR) $$site/$(2) && exit; done
+ $(Q)if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
+ $(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE),$(2)) && exit ; \
+ fi ; \
+ if test -n "$(1)" ; then \
+ case "$($(PKG)_SITE_METHOD)" in \
+ git) $($(DL_MODE)_GIT) && exit ;; \
+ svn) $($(DL_MODE)_SVN) && exit ;; \
+ *) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
+ esac ; \
+ fi ; \
+ if test -n "$(call qstrip,$(BR2_BACKUP_SITE))" ; then \
+ $(call $(DL_MODE)_WGET,$(BR2_BACKUP_SITE),$(2)) && exit ; \
+ fi ; \
+ exit 1
endef
-endif
# Utility programs used to build packages
TAR ?= tar
@@ -117,8 +209,7 @@ endef
# Retrieve the archive
$(BUILD_DIR)/%/.stamp_downloaded:
-# support make source-check/external-deps
-ifeq ($(SPIDER),)
+ifeq ($(DL_MODE),DOWNLOAD)
# Only show the download message if it isn't already downloaded
$(Q)(test -e $(DL_DIR)/$($(PKG)_SOURCE) && \
(test -z $($(PKG)_PATCH) || test -e $(DL_DIR)$($(PKG)_PATCH))) || \
@@ -126,7 +217,7 @@ ifeq ($(SPIDER),)
endif
$(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_SOURCE))
$(if $($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_PATCH)))
-ifeq ($(SPIDER),)
+ifeq ($(DL_MODE),DOWNLOAD)
$(Q)mkdir -p $(@D)
$(Q)touch $@
endif
@@ -254,13 +345,23 @@ ifndef $(2)_VERSION
endif
endif
-$(2)_DIR = $$(BUILD_DIR)/$(1)-$$($(2)_VERSION)
+# Keep the package version that may contain forward slashes in the _DL_VERSION
+# variable, then replace all forward slashes ('/') by underscores ('_') to
+# sanitize the package version that is used in paths, directory and file names.
+# Forward slashes may appear in the package's version when pointing to a
+# version control system branch or tag, for example remotes/origin/1_10_stable.
+$(2)_DL_VERSION = $($(2)_VERSION)
+$(2)_VERSION = $(subst /,_,$($(2)_VERSION))
+
+$(2)_BASE_NAME = $(1)-$$($(2)_VERSION)
+$(2)_DL_DIR = $$(DL_DIR)/$$($(2)_BASE_NAME)
+$(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME)
ifndef $(2)_SOURCE
ifdef $(3)_SOURCE
$(2)_SOURCE = $($(3)_SOURCE)
else
- $(2)_SOURCE ?= $(1)-$$($(2)_VERSION).tar.gz
+ $(2)_SOURCE ?= $$($(2)_BASE_NAME).tar.gz
endif
endif
@@ -279,6 +380,15 @@ ifndef $(2)_SITE
endif
endif
+ifndef $(2)_SITE_METHOD
+ ifdef $(3)_SITE_METHOD
+ $(2)_SITE_METHOD = $($(3)_SITE_METHOD)
+ else
+ # Try automatic detection using the scheme part of the URI
+ $(2)_SITE_METHOD = $(firstword $(subst ://, ,$(call qstrip,$($(2)_SITE))))
+ endif
+endif
+
$(2)_DEPENDENCIES ?=
$(2)_INSTALL_STAGING ?= NO
$(2)_INSTALL_TARGET ?= YES
@@ -292,7 +402,7 @@ $(2)_TARGET_BUILD = $$($(2)_DIR)/.stamp_built
$(2)_TARGET_CONFIGURE = $$($(2)_DIR)/.stamp_configured
$(2)_TARGET_PATCH = $$($(2)_DIR)/.stamp_patched
$(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_extracted
-$(2)_TARGET_SOURCE ?= $$($(2)_DIR)/.stamp_downloaded
+$(2)_TARGET_SOURCE = $$($(2)_DIR)/.stamp_downloaded
$(2)_TARGET_UNINSTALL = $$($(2)_DIR)/.stamp_uninstalled
$(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned
$(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned
diff --git a/package/libsvgtiny/libsvgtiny.mk b/package/libsvgtiny/libsvgtiny.mk
index b559e52ad..d9ac41b44 100644
--- a/package/libsvgtiny/libsvgtiny.mk
+++ b/package/libsvgtiny/libsvgtiny.mk
@@ -6,20 +6,11 @@
LIBSVGTINY_SITE = svn://svn.netsurf-browser.org/trunk/libsvgtiny
LIBSVGTINY_VERSION = 9800
-LIBSVGTINY_SVNDIR = libsvgtiny-svn-r$(LIBSVGTINY_VERSION)
-LIBSVGTINY_SOURCE = $(LIBSVGTINY_SVNDIR).tar.bz2
+
LIBSVGTINY_INSTALL_STAGING = YES
LIBSVGTINY_INSTALL_TARGET = YES
LIBSVGTINY_DEPENDENCIES = libxml2 host-gperf host-pkg-config
-$(DL_DIR)/$(LIBSVGTINY_SOURCE):
- $(SVN_CO) -r $(LIBSVGTINY_VERSION) $(LIBSVGTINY_SITE) $(BUILD_DIR)/$(LIBSVGTINY_SVNDIR)
- tar -cv -C $(BUILD_DIR) $(LIBSVGTINY_SVNDIR) | bzip2 - -c > $@
- rm -rf $(BUILD_DIR)/$(LIBSVGTINY_SVNDIR)
-
-# use custom download step
-LIBSVGTINY_TARGET_SOURCE := $(DL_DIR)/$(LIBSVGTINY_SOURCE)
-
define LIBSVGTINY_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=/usr
endef
diff --git a/package/mpfr/mpfr.mk b/package/mpfr/mpfr.mk
index a7834dd9b..6979a9f76 100644
--- a/package/mpfr/mpfr.mk
+++ b/package/mpfr/mpfr.mk
@@ -21,7 +21,7 @@ MPFR_PATCH_SOURCE:=$(DL_DIR)/$(MPFR_PATCH_FILE)
$(MPFR_PATCH_SOURCE):
$(call DOWNLOAD,$(MPFR_SITE),$(MPFR_PATCH))
-ifeq ($(SPIDER),) # this breaks source-check/external-deps
+ifeq ($(DL_MODE),DOWNLOAD)
mv $(DL_DIR)/$(MPFR_PATCH) $@
endif
endif
diff --git a/package/multimedia/tremor/tremor.mk b/package/multimedia/tremor/tremor.mk
index 74fd725ff..654a403ee 100644
--- a/package/multimedia/tremor/tremor.mk
+++ b/package/multimedia/tremor/tremor.mk
@@ -5,19 +5,11 @@
############################################################
TREMOR_SITE:=http://svn.xiph.org/trunk/Tremor/
+TREMOR_SITE_METHOD:=svn
TREMOR_VERSION:=16259
-TREMOR_SVNDIR = Tremor-svn-r$(TREMOR_VERSION)
-TREMOR_SOURCE:= $(TREMOR_SVNDIR).tar.bz2
+
TREMOR_AUTORECONF = YES
TREMOR_INSTALL_STAGING = YES
TREMOR_INSTALL_TARGET = YES
-$(DL_DIR)/$(TREMOR_SOURCE):
- $(SVN_CO) -r $(TREMOR_VERSION) $(TREMOR_SITE) $(BUILD_DIR)/$(TREMOR_SVNDIR)
- tar -cv -C $(BUILD_DIR) $(TREMOR_SVNDIR) | bzip2 - -c > $@
- rm -rf $(BUILD_DIR)/$(TREMOR_SVNDIR)
-
-# use custom download step
-TREMOR_TARGET_SOURCE := $(DL_DIR)/$(TREMOR_SOURCE)
-
$(eval $(call AUTOTARGETS,package/multimedia,tremor))
diff --git a/toolchain/wget-show-external-deps.sh b/toolchain/wget-show-external-deps.sh
deleted file mode 100755
index 20071c05f..000000000
--- a/toolchain/wget-show-external-deps.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-# replacement for wget (see BR2_WGET) which simply shows the file name to be
-# downloaded. Used by the external-deps make target.
-
-exec basename ${!#} \ No newline at end of file