From 00c2b6b9cbb83507dbffe6667c83d7dc134d3394 Mon Sep 17 00:00:00 2001 From: Yifei Kong Date: Thu, 18 Apr 2024 11:57:18 +0800 Subject: [PATCH] Download curl from github as tgz, xz is not safe anyway --- Makefile.in | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile.in b/Makefile.in index 6e7836a4..4ee738d3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,7 +15,7 @@ BROTLI_VERSION := 1.0.9 BORING_SSL_COMMIT := d24a38200fef19150eef00cad35b138936c08767 NGHTTP2_VERSION := nghttp2-1.56.0 NGHTTP2_URL := https://github.com/nghttp2/nghttp2/releases/download/v1.56.0/nghttp2-1.56.0.tar.bz2 -CURL_VERSION := curl-8.5.0 +CURL_VERSION := curl-8_5_0 brotli_install_dir := $(abspath brotli-$(BROTLI_VERSION)/out/installed) brotli_static_libs := $(brotli_install_dir)/lib/libbrotlicommon-static.a $(brotli_install_dir)/lib/libbrotlidec-static.a @@ -111,7 +111,7 @@ clean: ## Remove all build artifacts, including dependencies rm -Rf brotli-$(BROTLI_VERSION).tar.gz brotli-$(BROTLI_VERSION) rm -Rf boringssl.zip boringssl rm -Rf $(NGHTTP2_VERSION).tar.bz2 $(NGHTTP2_VERSION) - rm -Rf $(CURL_VERSION).tar.xz $(CURL_VERSION) + rm -Rf $(CURL_VERSION).tar.gz $(CURL_VERSION) brotli-$(BROTLI_VERSION).tar.gz: curl -L "https://github.com/google/brotli/archive/refs/tags/v${BROTLI_VERSION}.tar.gz" \ @@ -223,14 +223,15 @@ $(nghttp2_static_libs): $(NGHTTP2_VERSION).tar.bz2 $(MAKE) MAKEFLAGS=-j$(SUBJOBS) $(MAKE) install MAKEFLAGS= -$(CURL_VERSION).tar.xz: - curl -L "https://curl.se/download/$(CURL_VERSION).tar.xz" \ - -o "$(CURL_VERSION).tar.xz" +$(CURL_VERSION).tar.gz: + curl -L "https://github.com/curl/curl/archive/$(CURL_VERSION).tar.gz" -o + -o "$(CURL_VERSION).tar.gz" # Apply the "Chorme version" patches and mark using a dummy file $(CURL_VERSION)/.patched-chrome: $(srcdir)/chrome/patches/curl-*.patch rm -Rf $(CURL_VERSION) - tar -xf $(CURL_VERSION).tar.xz + tar -xf $(CURL_VERSION).tar.gz + mv curl-$(CURL_VERSION) $(CURL_VERSION) # fix directory name cd $(CURL_VERSION) for p in $^; do patch -p1 < $$p; done # Re-generate the configure script @@ -238,7 +239,7 @@ $(CURL_VERSION)/.patched-chrome: $(srcdir)/chrome/patches/curl-*.patch touch .patched-chrome # This is a small hack that flags that curl was patched and configured in the "chrome" version -$(CURL_VERSION)/.chrome: $(chrome_libs) $(CURL_VERSION).tar.xz $(CURL_VERSION)/.patched-chrome +$(CURL_VERSION)/.chrome: $(chrome_libs) $(CURL_VERSION).tar.gz $(CURL_VERSION)/.patched-chrome cd $(CURL_VERSION) # Set up the configure flags to curl.