-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl.mk
37 lines (33 loc) · 1.34 KB
/
curl.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 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.5.0
$(PKG)_CHECKSUM := 42ab8db9e20d8290a3b633e7fbb3cec15db34df65fd1015ef8ac1e4723750eeb
$(PKG)_SUBDIR := curl-$($(PKG)_VERSION)
$(PKG)_FILE := curl-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://curl.haxx.se/download/$($(PKG)_FILE)
$(PKG)_DEPS := cc brotli libidn2 libssh2 pthreads
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) \
--with-schannel \
--with-libidn2 \
--enable-sspi \
--enable-ipv6 \
--with-libssh2 \
LIBS="`'$(TARGET)-pkg-config' libbrotlidec pthreads --libs`"
$(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