From: Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1 of 5] Support URI schemes in DOWNLOAD function, when not using gentargets
Date: Wed, 21 Sep 2011 08:55:31 +0200 [thread overview]
Message-ID: <073328f576445d4e02ea.1316588131@localhost6.localdomain6> (raw)
In-Reply-To: <patchbomb.1316588130@localhost6.localdomain6>
When using the gentargets/autotools/cmake infrastructure, the DOWNLOAD function
uses an appropriate download method based on $(PKG)_SITE_METHOD, which is
autodetected based on the URI if none was explicitly set.
When the DOWNLOAD function is called directly, when not using gentargets, the
SITE_METHOD is not autodetected, and thus the download defaults to wget.
This patch adds URI scheme detection directly to the DOWNLOAD method, in case
no SITE_METHOD was detected yet.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
package/Makefile.package.in | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -85,6 +85,9 @@
DL_DIR:=$(TOPDIR)/dl
endif
+# URI scheme helper function
+geturischeme=$(firstword $(subst ://, ,$(call qstrip,$(1))))
+
################################################################################
# The DOWNLOAD_{GIT,SVN,BZR} helpers are in charge of getting a
# working copy of the source repository for their corresponding SCM,
@@ -189,7 +192,12 @@
$(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE),$(2)) && exit ; \
fi ; \
if test -n "$(1)" ; then \
- case "$($(PKG)_SITE_METHOD)" in \
+ if test -z "$($(PKG)_SITE_METHOD)" ; then \
+ scheme="$(call geturischeme,$(1))" ; \
+ else \
+ scheme="$($(PKG)_SITE_METHOD)" ; \
+ fi ; \
+ case "$$scheme" in \
git) $($(DL_MODE)_GIT) && exit ;; \
svn) $($(DL_MODE)_SVN) && exit ;; \
bzr) $($(DL_MODE)_BZR) && exit ;; \
next prev parent reply other threads:[~2011-09-21 6:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 6:55 [Buildroot] [PATCH 0 of 5] toolchain-external: improve support for custom toolchains Thomas De Schampheleire
2011-09-21 6:55 ` Thomas De Schampheleire [this message]
2011-09-21 6:55 ` [Buildroot] [PATCH 2 of 5] toolchain-external: allow downloading a custom toolchain Thomas De Schampheleire
2011-09-21 7:58 ` Thomas Petazzoni
2011-09-21 8:22 ` Thomas De Schampheleire
2011-09-21 8:23 ` Thomas De Schampheleire
2011-09-21 11:39 ` Thomas Petazzoni
2011-09-21 11:38 ` Thomas Petazzoni
2011-09-21 6:55 ` [Buildroot] [PATCH 3 of 5] toolchain-external: allow specifying extra external libraries Thomas De Schampheleire
2011-09-21 7:59 ` Thomas Petazzoni
2011-09-21 8:24 ` Thomas De Schampheleire
2011-09-22 19:07 ` Thomas Petazzoni
2011-09-21 6:55 ` [Buildroot] [PATCH 4 of 5] tar: create a host version Thomas De Schampheleire
2011-09-21 6:55 ` [Buildroot] [PATCH 5 of 5] toolchain-external: use host-tar instead of tar to unpack toolchains Thomas De Schampheleire
2011-09-21 8:02 ` Thomas Petazzoni
2011-09-21 8:35 ` Thomas De Schampheleire
2011-09-21 10:54 ` Michael S. Zick
2011-09-21 12:16 ` Thomas De Schampheleire
2011-09-22 20:02 ` Arnout Vandecappelle
2011-09-23 6:18 ` Thomas De Schampheleire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=073328f576445d4e02ea.1316588131@localhost6.localdomain6 \
--to=patrickdepinguin+buildroot@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox