diff --git a/contrib/bootstrap b/contrib/bootstrap
index f8a0de84d9d22ecd41b96896217d294c5075bd7a..bdb5e2c3c85a96c8b35351d1f7630bdf226cc21a 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -21,11 +21,12 @@
 usage()
 {
 	echo "Usage: $0 [--build=BUILD] [--host=HOST] [--prefix=PREFIX]"
-	echo "  --build=BUILD    configure for building on BUILD"
-	echo "  --host=HOST      cross-compile to build to run on HOST"
-	echo "  --prefix=PREFIX  install files in PREFIX"
-	echo "  --disable-FOO    configure to not build package FOO"
-	echo "  --enable-FOO     configure to build package FOO"
+	echo "  --build=BUILD       configure for building on BUILD"
+	echo "  --host=HOST         cross-compile to build to run on HOST"
+	echo "  --prefix=PREFIX     install files in PREFIX"
+	echo "  --disable-downloads don't download packages from the internet"
+	echo "  --disable-FOO       configure to not build package FOO"
+	echo "  --enable-FOO        configure to build package FOO"
 }
 
 BUILD=
@@ -50,6 +51,9 @@ do
 			usage
 			exit 0
 			;;
+		--disable-downloads)
+			DISABLE_CONTRIB_DOWNLOADS="TRUE"
+			;;
 		--host=*)
 			HOST="${1#--host=}"
 			;;
@@ -108,6 +112,7 @@ HOST := $HOST
 CROSS_COMPILE ?= $HOST-
 PKGS_DISABLE := $PKGS_DISABLE
 PKGS_ENABLE := $PKGS_ENABLE
+DISABLE_CONTRIB_DOWNLOADS := $DISABLE_CONTRIB_DOWNLOADS
 EOF
 
 add_make()
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 192f8587099d527a07abf90d10fb1a2c3e3d443f..f387a528eb96d10d0d197f18bb3b60279a2855c0 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -232,7 +232,9 @@ endif
 endif
 SVN ?= $(error subversion client (svn) not found!)
 
-ifeq ($(shell curl --version >/dev/null 2>&1 || echo FAIL),)
+ifeq ($(DISABLE_CONTRIB_DOWNLOADS),TRUE)
+download = $(error Trying to download $(1) but DISABLE_CONTRIB_DOWNLOADS is TRUE, aborting.)
+else ifeq ($(shell curl --version >/dev/null 2>&1 || echo FAIL),)
 download = curl -f -L --retry-delay 10 --retry 2 -- "$(1)" > "$@"
 else ifeq ($(shell wget --version >/dev/null 2>&1 || echo FAIL),)
 download = rm -f $@.tmp && \
@@ -316,6 +318,9 @@ HOSTVARS := $(HOSTTOOLS) \
 	CXXFLAGS="$(CXXFLAGS) $(PIC)" \
 	LDFLAGS="$(LDFLAGS)"
 
+ifeq ($(DISABLE_CONTRIB_DOWNLOADS),TRUE)
+download_git = $(error Trying to clone $(1) but DISABLE_CONTRIB_DOWNLOADS is TRUE, aborting.)
+else
 download_git = \
 	rm -Rf $(@:.tar.xz=) && \
 	$(GIT) clone $(2:%=--branch %) $(1) $(@:.tar.xz=) && \
@@ -324,6 +329,8 @@ download_git = \
 	(cd $(dir $@) && \
 	tar cvJ $(notdir $(@:.tar.xz=))) > $@ && \
 	rm -Rf $(@:.tar.xz=)
+endif
+
 checksum = \
 	$(foreach f,$(filter $(TARBALLS)/%,$^), \
 		grep -- " $(f:$(TARBALLS)/%=%)$$" \