diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2016-10-17 20:55:47 (GMT) |
---|---|---|
committer | Boris Nagaev <bnagaev@gmail.com> | 2016-10-17 20:55:47 (GMT) |
commit | 0420370efd0e17c7ae9f5845a4ae478797e8a217 (patch) | |
tree | 302142aaf92d5976c1102e217a69516a79b2144c | |
parent | fa636a2eabaa7631278f1b0794f0cea28378dce5 (diff) | |
download | mxe-0420370efd0e17c7ae9f5845a4ae478797e8a217.zip mxe-0420370efd0e17c7ae9f5845a4ae478797e8a217.tar.gz mxe-0420370efd0e17c7ae9f5845a4ae478797e8a217.tar.bz2 |
allow to change User Agent; fix levmar download
Parameter $(PKG)_UA overrides default user agent used by wget to download
a package. It is needed, because download server www.ics.forth.gr from where
levmar is downloaded, crashes on default user agent Wget/1.13.4.
User agent for levmar was set to MXE. Now the server works.
see https://github.com/mxe/mxe/issues/1519
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | src/levmar.mk | 1 |
2 files changed, 6 insertions, 5 deletions
@@ -33,9 +33,9 @@ LIBTOOLIZE := $(shell glibtoolize --help >/dev/null 2>&1 && echo g)libtoolize PATCH := $(shell gpatch --help >/dev/null 2>&1 && echo g)patch SED := $(shell gsed --help >/dev/null 2>&1 && echo g)sed SORT := $(shell gsort --help >/dev/null 2>&1 && echo g)sort -WGET := wget --no-check-certificate \ - --user-agent=$(shell wget --version | \ - $(SED) -n 's,GNU \(Wget\) \([0-9.]*\).*,\1/\2,p') +DEFAULT_UA := $(shell wget --version | $(SED) -n 's,GNU \(Wget\) \([0-9.]*\).*,\1/\2,p') +WGET0 := wget --no-check-certificate +WGET := $(WGET0) --user-agent='$(DEFAULT_UA)' REQUIREMENTS := autoconf automake autopoint bash bison bzip2 flex \ $(BUILD_CC) $(BUILD_CXX) gperf intltoolize $(LIBTOOL) \ @@ -233,10 +233,10 @@ DOWNLOAD_PKG_ARCHIVE = \ true\ $(else),\ mkdir -p '$(PKG_DIR)' && ( \ - $(WGET) -T 30 -t 3 -O- '$($(1)_URL)' \ + $(WGET0) --user-agent='$(if $($(1)_UA),$($(1)_UA),$(DEFAULT_UA))' -T 30 -t 3 -O- '$($(1)_URL)' \ $(if $($(1)_URL_2), \ || (echo "MXE Warning! Downloading $(1) from second URL." >&2 && \ - $(WGET) -T 30 -t 3 -O- '$($(1)_URL_2)')) \ + $(WGET0) --user-agent='$(if $($(1)_UA),$($(1)_UA),$(DEFAULT_UA))' -T 30 -t 3 -O- '$($(1)_URL_2)')) \ $(if $(MXE_NO_BACKUP_DL),, \ || $(BACKUP_DOWNLOAD)) \ ) \ diff --git a/src/levmar.mk b/src/levmar.mk index 135dc2b..8f1a0ff 100644 --- a/src/levmar.mk +++ b/src/levmar.mk @@ -7,6 +7,7 @@ $(PKG)_CHECKSUM := 3bf4ef1ea4475ded5315e8d8fc992a725f2e7940a74ca3b0f9029d9e6e94b $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tgz $(PKG)_URL := http://www.ics.forth.gr/~lourakis/$(PKG)/$($(PKG)_FILE) +$(PKG)_UA := MXE $(PKG)_DEPS := gcc blas lapack libf2c define $(PKG)_UPDATE |