summaryrefslogtreecommitdiffstats
path: root/make/include
diff options
context:
space:
mode:
authorKonaBlend <[email protected]>2015-10-27 17:52:39 -0400
committerBradley Sepos <[email protected]>2016-05-25 15:45:03 -0400
commit24d3dc934dbc4ec979c6376d3ed4f07607ba7bcd (patch)
tree4e0b3a7a84b919acacdf2f44010d2d4a1ac7c2bd /make/include
parentc40fd397d9058e4546fc12c0be701c183bc9867f (diff)
Build: refactor fetch for contrib tarballs
Fetch is now python-based and runs on the same version as does configure. The source script is make/fetch.py. New features: MD5 hash tracking for tarballs. Data values for all contribs added. Upon download, the file will be verified, and only then will it be moved into place inside downloads/ . Files that exist before the build system does a fetch will not be md5-checked. Multiple URLs for tarballs. Each module may specify one or more URLs and by convention the official HandBrake should be first when possible. Each URL is tried in sequence, and if it fails for any reason, the next URL is tried. If no URL succeeds, a hard-error is reported. Network fetching may be disabled via configure options. --disable-fetch will hard-error if a fetch is attempted. --accept-fetch-url=SPEC and --deny-fetch-url=SPEC offer an ACL-style mechanism using regex to match against URLs. For example, --accept-fecth-url='.*/download.handbrake.fr/.*' would skip any non-matching URLs. Build dependencies have been lightened. wget and curl are no longer required. TODO: GTK packaging should also be able to remove those deps.
Diffstat (limited to 'make/include')
-rw-r--r--make/include/contrib.defs4
-rw-r--r--make/include/main.defs1
-rw-r--r--make/include/select.defs12
-rw-r--r--make/include/tool.defs3
4 files changed, 3 insertions, 17 deletions
diff --git a/make/include/contrib.defs b/make/include/contrib.defs
index 55f2992c6..040a416e0 100644
--- a/make/include/contrib.defs
+++ b/make/include/contrib.defs
@@ -26,11 +26,11 @@ define import.CONTRIB.defs
##
## target: fetch
##
- $(1).FETCH.tar = $$(CONTRIB.download/)$$(notdir $$($(1).FETCH.url))
+ $(1).FETCH.tar = $$(CONTRIB.download/)$$(notdir $$(firstword $$($(1).FETCH.url)))
$(1).FETCH.url = FETCH_IS_UNDEFINED
$(1).FETCH.target = $$($(1).FETCH.tar)
define $(1).FETCH
- $$(call FETCH,$$@,$$($(1).FETCH.url))
+ $$(FETCH.exe) --config $(BUILD/)fetch.cfg --output-dir $$(dir $$@) $$(if $$($(1).FETCH.md5),--md5 $$($(1).FETCH.md5)) $$($(1).FETCH.url)
endef
##
diff --git a/make/include/main.defs b/make/include/main.defs
index 1781fb41e..1aa36c485 100644
--- a/make/include/main.defs
+++ b/make/include/main.defs
@@ -2,7 +2,6 @@ include $(SRC/)make/include/base.defs
include $(SRC/)make/include/contrib.defs
include $(SRC/)make/include/function.defs
include $(SRC/)make/include/gcc.defs
-include $(SRC/)make/include/select.defs
include $(SRC/)make/include/target.defs
include $(SRC/)make/include/tool.defs
diff --git a/make/include/select.defs b/make/include/select.defs
deleted file mode 100644
index 32a652523..000000000
--- a/make/include/select.defs
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## fetch a file from the web via well-known anonymous protocols such as HTTP.
-##
-## $(1) = output filename
-## $(2) = URL
-##
-FETCH = $(FETCH.$(FETCH.select))
-
-FETCH.select = MISSING
-FETCH.MISSING = $(error one of the following tools is required: wget, curl)
-FETCH.curl = $(CURL.exe) -q -L -o $(1) $(2)
-FETCH.wget = $(WGET.exe) -O $(1) $(2)
diff --git a/make/include/tool.defs b/make/include/tool.defs
index 3efe5d83f..579a6dd98 100644
--- a/make/include/tool.defs
+++ b/make/include/tool.defs
@@ -1,13 +1,12 @@
AR.exe = ar
CP.exe = cp
-CURL.exe = curl
+FETCH.exe = $(SRC/)make/python_launcher $(SRC/)make/fetch.py
M4.exe = m4
MKDIR.exe = mkdir
PATCH.exe = patch
RM.exe = rm
TAR.exe = tar
TOUCH.exe = touch
-WGET.exe = wget
MV.exe = mv
ZIP.exe = zip
LN.exe = ln