From b3d6bb0efaeb5054c1449b502300faadb2e4f828 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Sat, 10 Jan 2026 01:30:03 -0700 Subject: [PATCH] ubuntu-win64-cross: Add curl --- ubuntu-win64-cross/curl.mk | 34 ++++++++++++++++++++++++++++++ ubuntu-win64-cross/gcc.Dockerfile | 4 +++- ubuntu-win64-cross/llvm.Dockerfile | 4 +++- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 ubuntu-win64-cross/curl.mk diff --git a/ubuntu-win64-cross/curl.mk b/ubuntu-win64-cross/curl.mk new file mode 100644 index 0000000000..79e713a774 --- /dev/null +++ b/ubuntu-win64-cross/curl.mk @@ -0,0 +1,34 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := curl +$(PKG)_WEBSITE := https://curl.haxx.se/libcurl/ +$(PKG)_DESCR := cURL +$(PKG)_IGNORE := +$(PKG)_VERSION := 8.18.0 +$(PKG)_CHECKSUM := 40df79166e74aa20149365e11ee4c798a46ad57c34e4f68fd13100e2c9a91946 +$(PKG)_SUBDIR := curl-$($(PKG)_VERSION) +$(PKG)_FILE := curl-$($(PKG)_VERSION).tar.xz +$(PKG)_URL := https://curl.haxx.se/download/$($(PKG)_FILE) +$(PKG)_DEPS := cc + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://curl.haxx.se/download/?C=M;O=D' | \ + $(SED) -n 's,.*curl-\([0-9][^"]*\)\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) \ + --without-libpsl \ + --with-schannel \ + --enable-ipv6 + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_DOCS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_DOCS) + ln -sf '$(PREFIX)/$(TARGET)/bin/curl-config' '$(PREFIX)/bin/$(TARGET)-curl-config' + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-curl.exe' \ + `'$(TARGET)-pkg-config' libcurl --cflags --libs` +endef diff --git a/ubuntu-win64-cross/gcc.Dockerfile b/ubuntu-win64-cross/gcc.Dockerfile index 18f1f773f7..f41a81a3ce 100644 --- a/ubuntu-win64-cross/gcc.Dockerfile +++ b/ubuntu-win64-cross/gcc.Dockerfile @@ -73,6 +73,7 @@ COPY vulkan-headers.mk \ sdl2.mk \ libsamplerate.mk \ libressl.mk \ + curl.mk \ ${MXE_PATH}/src/ RUN make \ @@ -90,7 +91,8 @@ RUN make \ cmake \ libslirp \ sdl2 \ - vulkan-headers + vulkan-headers \ + curl RUN find ${MXE_PATH}/usr -executable -type f -exec chmod a+x {} \; diff --git a/ubuntu-win64-cross/llvm.Dockerfile b/ubuntu-win64-cross/llvm.Dockerfile index 63fa3e20f7..6026cf844d 100644 --- a/ubuntu-win64-cross/llvm.Dockerfile +++ b/ubuntu-win64-cross/llvm.Dockerfile @@ -54,6 +54,7 @@ COPY vulkan-headers.mk \ sdl2.mk \ libsamplerate.mk \ libressl.mk \ + curl.mk \ ${MXE_PATH}/src/ RUN make \ @@ -72,7 +73,8 @@ RUN make \ cmake \ libslirp \ sdl2 \ - vulkan-headers + vulkan-headers \ + curl RUN find ${MXE_PATH}/usr -executable -type f -exec chmod a+x {} \;