pkg: support PKG_MIRROR_URL, use if PKG_USE_MIRROR=1 (default)

(cherry picked from commit 92ca97e31b0bc1a4f8b02db7223bb4becd0044fa)
This commit is contained in:
Kaspar Schleiser 2021-10-01 13:13:12 +02:00 committed by Benjamin Valentin
parent a8c9e15c3a
commit a353dbc3a0

View File

@ -24,6 +24,12 @@ ifeq (,$(PKG_LICENSE))
$(error PKG_LICENSE not defined)
endif
ifneq (, $(PKG_MIRROR_URL))
ifneq (0, $(PKG_USE_MIRROR))
PKG_URL = $(PKG_MIRROR_URL)
endif
endif
PKG_DIR ?= $(CURDIR)
PKG_PATCH_DIR ?= $(PKG_DIR)/patches