changeset 2727:e474975121d6

add tertiary fallback for unavailable package files
author Tony Theodore <tonyt@logyst.com>
date Sun, 16 Sep 2012 17:49:28 +1000
parents d242b96f3650
children 4647b1a6c342
files Makefile
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Sep 16 17:20:20 2012 +1000
+++ b/Makefile	Sun Sep 16 17:49:28 2012 +1000
@@ -4,6 +4,7 @@
 JOBS               := 1
 TARGET             := i686-pc-mingw32
 SOURCEFORGE_MIRROR := freefr.dl.sourceforge.net
+PKG_MIRROR         := s3.amazonaws.com/mxe-pkg
 
 PWD        := $(shell pwd)
 SHELL      := bash
@@ -64,8 +65,9 @@
 DOWNLOAD_PKG_ARCHIVE = \
     mkdir -p '$(PKG_DIR)' && \
     $(if $($(1)_URL_2), \
-        ( $(WGET) -T 30 -t 3 -O- '$($(1)_URL)' || $(WGET) -O- '$($(1)_URL_2)' ), \
-        $(WGET) -O- '$($(1)_URL)') \
+        ( $(WGET) -T 30 -t 3 -O- '$($(1)_URL)' || $(WGET) -O- '$($(1)_URL_2)' || \
+          $(WGET) -O- '$(PKG_MIRROR)/$($(1)_FILE)'), \
+        $(WGET) -O- '$($(1)_URL)' || $(WGET) -O- '$(PKG_MIRROR)/$($(1)_FILE)') \
     $(if $($(1)_FIX_GZIP), \
         | gzip -d | gzip -9n, \
         ) \