From patchwork Thu Jan 31 08:18:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 217122 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 6A2A62C008D for ; Thu, 31 Jan 2013 19:18:56 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E662880F2D; Thu, 31 Jan 2013 08:18:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HsFjw6oUVbtO; Thu, 31 Jan 2013 08:18:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D1C10814AC; Thu, 31 Jan 2013 08:18:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4F2E78F74B for ; Thu, 31 Jan 2013 08:18:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0EF728143D for ; Thu, 31 Jan 2013 08:18:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2P+DSQTvSncl for ; Thu, 31 Jan 2013 08:18:46 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sysmic.org (88-191-79-235.rev.dedibox.fr [88.191.79.235]) by whitealder.osuosl.org (Postfix) with ESMTPS id B2A84816C6 for ; Thu, 31 Jan 2013 08:18:45 +0000 (UTC) Received: from localhost.localdomain (mal35-3-82-240-201-171.fbx.proxad.net [82.240.201.171]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jezz) by sysmic.org (Postfix) with ESMTPSA id 84CD260741; Thu, 31 Jan 2013 09:18:43 +0100 (CET) From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= To: buildroot@busybox.net Date: Thu, 31 Jan 2013 09:18:29 +0100 Message-Id: <1359620310-13640-1-git-send-email-jezz@sysmic.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <8398960.ALrh5xOxZ9@sagittae> References: <8398960.ALrh5xOxZ9@sagittae> MIME-Version: 1.0 Cc: "Yann E. MORIN" , =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [Buildroot] [PATCH 1/2] Add support for plain URL in $(PKG)_PATCH variable X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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 Acked-by: Arnout Vandecappelle (Essensium/Mind) --- package/pkg-generic.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index b0eca0a..fbc2bb9 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -40,7 +40,12 @@ 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),\ + $(if $(findstring ://,$(p)),\ + $(call DOWNLOAD,$(p)),\ + $(call DOWNLOAD,$($(PKG)_SITE)/$(p))\ + )\ + $(sep)) $(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) ifeq ($(DL_MODE),DOWNLOAD) $(Q)mkdir -p $(@D) @@ -85,7 +90,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 \