From patchwork Fri Jan 18 16:11:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Add support for plain URL in $(PKG)_PATCH variable From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 213668 Message-Id: <1358525515-7295-1-git-send-email-jezz@sysmic.org> To: buildroot@busybox.net Cc: Thomas Petazzoni Date: Fri, 18 Jan 2013 17:11:55 +0100 Until now, $(PKG)_PATCH allow only to download patches from same URL than tarball. This patch allow to detect when plain URL are used in $(PKG)_PATCH and correctly handle them. Signed-off-by: Jérôme Pouiller --- package/pkg-generic.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index b0eca0a..37f3a29 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -40,7 +40,7 @@ ifeq ($(DL_MODE),DOWNLOAD) fi endif $(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE)/$($(PKG)_SOURCE))) - $(foreach p,$($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE)/$(p))$(sep)) + $(foreach p,$($(PKG)_PATCH),$(call DOWNLOAD,$(if $(findstring ://,$(p)),$(p),$($(PKG)_SITE)/$(p)))$(sep)) $(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) ifeq ($(DL_MODE),DOWNLOAD) $(Q)mkdir -p $(@D) @@ -85,7 +85,7 @@ $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION) $(BUILD_DIR)/%/.stamp_patched: @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)") $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep)) - $(foreach p,$($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $(p)$(sep)) + $(foreach p,$($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $(notdir $(p))$(sep)) $(Q)( \ if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME); then \ if test "$(wildcard $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER)*.patch*)"; then \