diff options
Diffstat (limited to 'tools/depends')
19 files changed, 48 insertions, 73 deletions
diff --git a/tools/depends/Makefile.include.in b/tools/depends/Makefile.include.in index 3a36d20d68..8f4b2008ae 100644 --- a/tools/depends/Makefile.include.in +++ b/tools/depends/Makefile.include.in @@ -41,7 +41,7 @@ BASE_URL=http://mirrors.kodi.tv/build-deps/sources ifneq ($(KODI_MIRROR),) BASE_URL=$(KODI_MIRROR)/build-deps/sources endif -RETRIEVE_TOOL_FLAGS=-LsS --create-dirs --retry 10 --retry-connrefused -O +RETRIEVE_TOOL_FLAGS=-LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL_FLAGS=--strip-components=1 -xf CONFIG_SUB=@prefix@/@tool_dir@/share/automake-1.16/config.sub CONFIG_GUESS=@prefix@/@tool_dir@/share/automake-1.16/config.guess diff --git a/tools/depends/download-files.include b/tools/depends/download-files.include index 3f41dfa1e9..f04a58d2ac 100644 --- a/tools/depends/download-files.include +++ b/tools/depends/download-files.include @@ -1,16 +1,5 @@ -# -HASH_FOUND = yes -ifneq ($(SHA512),) - HASH_TYPE = sha512 - HASH_TOOL ?= $(SHA512SUM) -else ifneq ($(SHA256),) - HASH_TYPE = sha256 - HASH_TOOL ?= $(SHA256SUM) -else - HASH_FOUND = no - HASH_TYPE = sha512 - HASH_TOOL = sha512sum -endif +HASH_TYPE := sha512 +HASH_TOOL ?= $(SHA512SUM) SED_FLAG = -i ifeq ($(NATIVE_OS), osx) @@ -24,36 +13,34 @@ ifeq ($(HASH_TOOL),) HASH_TOOL_FLAGS = -c --status endif -HASH_SUM = $($(shell echo $(HASH_TYPE) | tr '[:lower:]' '[:upper:]')) +.PHONY: all download -.PHONY: $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) -all: $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) +all: download -$(TARBALLS_LOCATION)/$(ARCHIVE): - cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) +download: $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) -$(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE): $(TARBALLS_LOCATION)/$(ARCHIVE) -ifeq ($(HASH_FOUND),no) - cd $(TARBALLS_LOCATION); $(HASH_TOOL) $(ARCHIVE) > $(ARCHIVE).$(HASH_TYPE) - $(HASH_TYPE)=$$(cat $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) | cut -d ' ' -f 1) && \ - sed $(SED_FLAG) -e "s/#SHA512#/SHA512=$${sha512}/" -e "s/#SHA256#/SHA256=$${sha256}/" Makefile -endif -ifeq ($(HASH_FOUND),yes) -# we really need 2 spaces between sha hash and file name! -# if the hash sum doesn't match we retry up to 3 times, add verbose curl output for diagnostics on retries -# if we fail 3 times, cleanup anything downloaded (eg bad tar) - @cd $(TARBALLS_LOCATION); echo "$(HASH_SUM) $(ARCHIVE)" > $(ARCHIVE).$(HASH_TYPE) && $(HASH_TOOL) $(HASH_TOOL_FLAGS) $(ARCHIVE).$(HASH_TYPE) \ - || {\ - echo "Error: failed to verify hash sum of $(ARCHIVE), expected type: $(HASH_TYPE) value $(HASH_SUM), retrying.." ;\ - tries=1 ;\ - while [ $$tries -le 3 ]; do \ - echo "download $(ARCHIVE) retry $$tries" ;\ - rm $(TARBALLS_LOCATION)/$(ARCHIVE) ;\ - sleep 3 ;\ - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) -v $(BASE_URL)/$(ARCHIVE) ;\ - $(HASH_TOOL) $(HASH_TOOL_FLAGS) $(ARCHIVE).$(HASH_TYPE) && exit 0 || tries=$$((tries + 1)) ;\ - done ;\ - rm $(TARBALLS_LOCATION)/$(ARCHIVE) ;\ - exit 1 ;\ - } -endif +FULL_URL ?= $(BASE_URL)/$(ARCHIVE) + +$(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE): + @{\ + cd $(TARBALLS_LOCATION) ;\ + ATTEMPTS=1 ;\ + while [ $$ATTEMPTS -le 3 ]; do \ + echo "download $(ARCHIVE) attempt $$ATTEMPTS" ;\ + $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(ARCHIVE) $(FULL_URL) ;\ + HASH_SUM="$$($(HASH_TOOL) $(ARCHIVE) | cut -f 1 -d " ")" ;\ + if [ "$${HASH_SUM}" == "$(SHA512)" ]; then \ + $(HASH_TOOL) $(ARCHIVE) > $(ARCHIVE).$(HASH_TYPE) ;\ + exit 0 ;\ + fi ;\ + ATTEMPTS=$$((ATTEMPTS + 1)) ;\ + echo "Error: failed to verify hash sum of $(ARCHIVE)" ;\ + echo "Expected type : $(HASH_TYPE)" ;\ + echo "Found value : $${HASH_SUM}" ;\ + echo "Expected value : $(SHA512)" ;\ + echo "retrying.." ;\ + rm $(ARCHIVE) ;\ + sleep 3 ;\ + done ;\ + exit 1 ;\ + } diff --git a/tools/depends/pre-depends/autoconf-pre-depends/Makefile b/tools/depends/pre-depends/autoconf-pre-depends/Makefile index 23feab1358..ba05d9f11c 100644 --- a/tools/depends/pre-depends/autoconf-pre-depends/Makefile +++ b/tools/depends/pre-depends/autoconf-pre-depends/Makefile @@ -21,7 +21,7 @@ all: $(PREFIX)/bin/$(LIBNAME) $(TARBALLS_LOCATION)/$(ARCHIVE): mkdir -p $(TARBALLS_LOCATION) - cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(ARCHIVE) $(BASE_URL)/$(ARCHIVE) $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) diff --git a/tools/depends/pre-depends/m4-pre-depends/Makefile b/tools/depends/pre-depends/m4-pre-depends/Makefile index fa60e3755a..bb0aeb1fd4 100644 --- a/tools/depends/pre-depends/m4-pre-depends/Makefile +++ b/tools/depends/pre-depends/m4-pre-depends/Makefile @@ -20,7 +20,7 @@ all: $(PREFIX)/bin/$(LIBNAME) $(TARBALLS_LOCATION)/$(ARCHIVE): mkdir -p $(TARBALLS_LOCATION) - cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(ARCHIVE) $(BASE_URL)/$(ARCHIVE) $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) diff --git a/tools/depends/target/crossguid/Makefile b/tools/depends/target/crossguid/Makefile index f37050dab5..5b67a8e46e 100644 --- a/tools/depends/target/crossguid/Makefile +++ b/tools/depends/target/crossguid/Makefile @@ -14,7 +14,7 @@ else PLATFORM = native TARBALLS_LOCATION = $(ROOT_DIR) BASE_URL := http://mirrors.kodi.tv/build-deps/sources - RETRIEVE_TOOL := curl -Ls --create-dirs -f -O + RETRIEVE_TOOL := curl -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar --strip-components=1 -xf CMAKE := cmake CMAKE_OPTIONS := -DCMAKE_INSTALL_PREFIX=$(PREFIX) $(CMAKE_OPTIONS) diff --git a/tools/depends/target/dav1d/Makefile b/tools/depends/target/dav1d/Makefile index c801cd1155..5096c785c1 100644 --- a/tools/depends/target/dav1d/Makefile +++ b/tools/depends/target/dav1d/Makefile @@ -12,7 +12,7 @@ else PREFIX ?= $(ROOT_DIR)/dav1d-install BASE_URL ?= http://mirrors.kodi.tv/build-deps/sources AUTORECONF := autoreconf - RETRIEVE_TOOL := curl -Ls --retry 10 --retry-delay 3 -o $(ARCHIVE) + RETRIEVE_TOOL := curl -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar --strip-components=1 -xf ifeq ($(PLATFORM),) diff --git a/tools/depends/target/flatbuffers/Makefile b/tools/depends/target/flatbuffers/Makefile index a1b034a92c..0388882a96 100644 --- a/tools/depends/target/flatbuffers/Makefile +++ b/tools/depends/target/flatbuffers/Makefile @@ -8,7 +8,7 @@ ifeq ($(PLATFORM),) PLATFORM = native TARBALLS_LOCATION = $(ROOT_DIR) BASE_URL := http://mirrors.kodi.tv/build-deps/sources - RETRIEVE_TOOL := curl -Ls --create-dirs -f -O + RETRIEVE_TOOL := curl -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar --strip-components=1 -xf CMAKE := cmake CMAKE_OPTIONS := -DCMAKE_INSTALL_PREFIX=$(PREFIX) $(CMAKE_OPTIONS) diff --git a/tools/depends/target/fmt/Makefile b/tools/depends/target/fmt/Makefile index c66acb10d8..23abe8e47b 100644 --- a/tools/depends/target/fmt/Makefile +++ b/tools/depends/target/fmt/Makefile @@ -15,7 +15,7 @@ else TARBALLS_LOCATION = $(ROOT_DIR) BASE_URL := http://mirrors.kodi.tv/build-deps/sources RETRIEVE_TOOL := curl - RETRIEVE_TOOL_FLAGS := -Ls --create-dirs -f -O + RETRIEVE_TOOL_FLAGS := -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar ARCHIVE_TOOL_FLAGS := --strip-components=1 -xf CMAKE := cmake diff --git a/tools/depends/target/libdvdcss/LIBDVDCSS-VERSION b/tools/depends/target/libdvdcss/LIBDVDCSS-VERSION index 4fb78d93ab..540d4deca4 100644 --- a/tools/depends/target/libdvdcss/LIBDVDCSS-VERSION +++ b/tools/depends/target/libdvdcss/LIBDVDCSS-VERSION @@ -1,6 +1,7 @@ LIBNAME=libdvdcss BASE_URL=https://github.com/xbmc/libdvdcss VERSION=1.4.3-Next-Nexus-Alpha2-2 +FULL_URL=$(BASE_URL)/archive/$(VERSION).tar.gz ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz SHA512=d3be3bfc13c5ea56d8db745c2aab090c99760684fe4c8f62a13d266feb319e9180ceeecf8116bfd2ed90d9accba2c11dbbf93b61ad00f69a40812ebf4eabcdda BYPRODUCT=libdvdcss.a diff --git a/tools/depends/target/libdvdcss/Makefile b/tools/depends/target/libdvdcss/Makefile index a6cf864aaa..220d51a959 100644 --- a/tools/depends/target/libdvdcss/Makefile +++ b/tools/depends/target/libdvdcss/Makefile @@ -12,7 +12,7 @@ else ifeq ($(PLATFORM),) PLATFORM = native TARBALLS_LOCATION = $(ROOT_DIR) - RETRIEVE_TOOL := curl -Ls --create-dirs --retry 10 --retry-delay 3 + RETRIEVE_TOOL := curl -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar --strip-components=1 -xf endif endif @@ -23,11 +23,6 @@ config = --prefix=$(PREFIX) --disable-shared --enable-static --with-pic include ../../download-files.include all: .installed-$(PLATFORM) -download: $(TARBALLS_LOCATION)/$(ARCHIVE) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) -o $(TARBALLS_LOCATION)/$(ARCHIVE) $(BASE_URL)/archive/$(VERSION).tar.gz - $(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) rm -rf $(PLATFORM); mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(TARBALLS_LOCATION)/$(ARCHIVE) diff --git a/tools/depends/target/libdvdnav/LIBDVDNAV-VERSION b/tools/depends/target/libdvdnav/LIBDVDNAV-VERSION index 3d6d1ec699..eff7e7812b 100644 --- a/tools/depends/target/libdvdnav/LIBDVDNAV-VERSION +++ b/tools/depends/target/libdvdnav/LIBDVDNAV-VERSION @@ -1,6 +1,7 @@ LIBNAME=libdvdnav BASE_URL=https://github.com/xbmc/libdvdnav VERSION=6.1.1-Next-Nexus-Alpha2-2 +FULL_URL=$(BASE_URL)/archive/$(VERSION).tar.gz ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz SHA512=51e6fc033121241354a5f0b3fc9a430577ae3ff6bb7f31445aa548ef4893037fb80eea3b2c6774c81e9ebaf9c45e9b490c98c2c65eb38f9f7daba84b236f7e1d BYPRODUCT=libdvdnav.a diff --git a/tools/depends/target/libdvdnav/Makefile b/tools/depends/target/libdvdnav/Makefile index bc733b5cb5..70fb5d1103 100644 --- a/tools/depends/target/libdvdnav/Makefile +++ b/tools/depends/target/libdvdnav/Makefile @@ -18,7 +18,7 @@ else TARBALLS_LOCATION = $(ROOT_DIR) PKGCONFIGPATH = PKG_CONFIG_PATH="$(ROOT_DIR)/../libdvdread/dvdread-install/lib/pkgconfig:$(ROOT_DIR)/../libdvdcss/dvdcss-install/lib/pkgconfig" EXTRA_CFLAGS += -I$(ROOT_DIR)/../libdvdread/dvdread-install/include -I$(ROOT_DIR)/../libdvdcss/dvdcss-install/include - RETRIEVE_TOOL := curl -Ls --create-dirs --retry 10 --retry-delay 3 + RETRIEVE_TOOL := curl -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar --strip-components=1 -xf endif endif @@ -34,11 +34,6 @@ endif include ../../download-files.include all: .installed-$(PLATFORM) -download: $(TARBALLS_LOCATION)/$(ARCHIVE) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) -o $(TARBALLS_LOCATION)/$(ARCHIVE) $(BASE_URL)/archive/$(VERSION).tar.gz - $(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) rm -rf $(PLATFORM); mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(TARBALLS_LOCATION)/$(ARCHIVE) diff --git a/tools/depends/target/libdvdread/LIBDVDREAD-VERSION b/tools/depends/target/libdvdread/LIBDVDREAD-VERSION index d51b629bd2..d413ef4df2 100644 --- a/tools/depends/target/libdvdread/LIBDVDREAD-VERSION +++ b/tools/depends/target/libdvdread/LIBDVDREAD-VERSION @@ -1,6 +1,7 @@ LIBNAME=libdvdread BASE_URL=https://github.com/xbmc/libdvdread VERSION=6.1.3-Next-Nexus-Alpha2-2 +FULL_URL=$(BASE_URL)/archive/$(VERSION).tar.gz ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz SHA512=629a41157d07b8ec0ea1fe89ae5ec48f63047472a862782b805c531ae31a0376fc4dc15175f8280c3ef91d7fa977bacebb1b51232640034a34bab2293210fc5e BYPRODUCT=libdvdread.a diff --git a/tools/depends/target/libdvdread/Makefile b/tools/depends/target/libdvdread/Makefile index e2d045ce4f..017156b1ee 100644 --- a/tools/depends/target/libdvdread/Makefile +++ b/tools/depends/target/libdvdread/Makefile @@ -18,7 +18,7 @@ else TARBALLS_LOCATION = $(ROOT_DIR) PKGCONFIGPATH = PKG_CONFIG_PATH="$(ROOT_DIR)/../libdvdcss/dvdcss-install/lib/pkgconfig" EXTRA_CFLAGS += -I$(ROOT_DIR)/../libdvdcss/dvdcss-install/include - RETRIEVE_TOOL := curl -Ls --create-dirs --retry 10 --retry-delay 3 + RETRIEVE_TOOL := curl -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar --strip-components=1 -xf endif endif @@ -33,11 +33,6 @@ endif include ../../download-files.include all: .installed-$(PLATFORM) -download: $(TARBALLS_LOCATION)/$(ARCHIVE) - -$(TARBALLS_LOCATION)/$(ARCHIVE): - cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) -o $(TARBALLS_LOCATION)/$(ARCHIVE) $(BASE_URL)/archive/$(VERSION).tar.gz - $(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) rm -rf $(PLATFORM); mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(TARBALLS_LOCATION)/$(ARCHIVE) diff --git a/tools/depends/target/rapidjson/Makefile b/tools/depends/target/rapidjson/Makefile index bfa5b7be74..233d3a3571 100644 --- a/tools/depends/target/rapidjson/Makefile +++ b/tools/depends/target/rapidjson/Makefile @@ -17,7 +17,7 @@ else TARBALLS_LOCATION = $(ROOT_DIR) BASE_URL := http://mirrors.kodi.tv/build-deps/sources RETRIEVE_TOOL := curl - RETRIEVE_TOOL_FLAGS := -Ls --create-dirs -f -O + RETRIEVE_TOOL_FLAGS := -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar ARCHIVE_TOOL_FLAGS := --strip-components=1 -xf HASH_TOOL := sha512sum diff --git a/tools/depends/target/spdlog/Makefile b/tools/depends/target/spdlog/Makefile index 457a49715c..8d7af7e15f 100644 --- a/tools/depends/target/spdlog/Makefile +++ b/tools/depends/target/spdlog/Makefile @@ -21,7 +21,7 @@ else TARBALLS_LOCATION = $(ROOT_DIR) BASE_URL := http://mirrors.kodi.tv/build-deps/sources RETRIEVE_TOOL := curl - RETRIEVE_TOOL_FLAGS := -Ls --create-dirs -f -O + RETRIEVE_TOOL_FLAGS := -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar ARCHIVE_TOOL_FLAGS := --strip-components=1 -xf CMAKE := cmake -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DCMAKE_PREFIX_PATH=$(PREFIX) diff --git a/tools/depends/target/udfread/Makefile b/tools/depends/target/udfread/Makefile index 342cf27f03..950a913e36 100644 --- a/tools/depends/target/udfread/Makefile +++ b/tools/depends/target/udfread/Makefile @@ -8,7 +8,7 @@ else ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) TARBALLS_LOCATION ?= $(ROOT_DIR) BASE_URL ?= http://mirrors.kodi.tv/build-deps/sources - RETRIEVE_TOOL := curl -Ls --retry 10 --retry-delay 3 -o $(ARCHIVE) + RETRIEVE_TOOL := curl -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar --strip-components=1 -xf endif diff --git a/tools/depends/target/wayland-protocols/Makefile b/tools/depends/target/wayland-protocols/Makefile index c10d7a20dd..37c78de25f 100644 --- a/tools/depends/target/wayland-protocols/Makefile +++ b/tools/depends/target/wayland-protocols/Makefile @@ -15,7 +15,7 @@ ifeq ($(PLATFORM),) PLATFORM = native TARBALLS_LOCATION = $(ROOT_DIR) BASE_URL := http://mirrors.kodi.tv/build-deps/sources - RETRIEVE_TOOL := curl -Ls --create-dirs -f -O + RETRIEVE_TOOL := curl -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar --strip-components=1 -xf else # Building as part of depends diff --git a/tools/depends/target/waylandpp/Makefile b/tools/depends/target/waylandpp/Makefile index 45f86614e4..9b027b9afa 100644 --- a/tools/depends/target/waylandpp/Makefile +++ b/tools/depends/target/waylandpp/Makefile @@ -17,7 +17,7 @@ ifeq ($(PLATFORM),) PLATFORM = native TARBALLS_LOCATION = $(ROOT_DIR) BASE_URL := http://mirrors.kodi.tv/build-deps/sources - RETRIEVE_TOOL := curl -Ls --create-dirs -f -O + RETRIEVE_TOOL := curl -LsS --create-dirs --retry 10 --retry-connrefused -o ARCHIVE_TOOL := tar --strip-components=1 -xf CMAKE := cmake CMAKE_OPTIONS := -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DBUILD_SCANNER=ON $(CMAKE_OPTIONS) |