iperf3: bump to version 3.1.2
[buildroot-gz.git] / package / libcurl / libcurl.mk
blobd2c39d5ea9f7d68e31a31f0c0487aed4ad998af9
1 ################################################################################
3 # libcurl
5 ################################################################################
7 LIBCURL_VERSION = 7.48.0
8 LIBCURL_SOURCE = curl-$(LIBCURL_VERSION).tar.bz2
9 LIBCURL_SITE = http://curl.haxx.se/download
10 LIBCURL_DEPENDENCIES = host-pkgconf \
11 $(if $(BR2_PACKAGE_ZLIB),zlib) \
12 $(if $(BR2_PACKAGE_LIBIDN),libidn) \
13 $(if $(BR2_PACKAGE_RTMPDUMP),rtmpdump)
14 LIBCURL_LICENSE = ISC
15 LIBCURL_LICENSE_FILES = COPYING
16 LIBCURL_INSTALL_STAGING = YES
18 # We disable NTLM support because it uses fork(), which doesn't work
19 # on non-MMU platforms. Moreover, this authentication method is
20 # probably almost never used. See
21 # http://curl.haxx.se/docs/manpage.html#--ntlm.
22 LIBCURL_CONF_OPTS = --disable-verbose --disable-manual --disable-ntlm-wb \
23 --enable-hidden-symbols --with-random=/dev/urandom --disable-curldebug
24 LIBCURL_CONFIG_SCRIPTS = curl-config
26 ifeq ($(BR2_PACKAGE_OPENSSL),y)
27 LIBCURL_DEPENDENCIES += openssl
28 LIBCURL_CONF_ENV += ac_cv_lib_crypto_CRYPTO_lock=yes
29 # configure adds the cross openssl dir to LD_LIBRARY_PATH which screws up
30 # native stuff during the rest of configure when target == host.
31 # Fix it by setting LD_LIBRARY_PATH to something sensible so those libs
32 # are found first.
33 LIBCURL_CONF_ENV += LD_LIBRARY_PATH=$(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)/lib:/usr/lib
34 LIBCURL_CONF_OPTS += --with-ssl=$(STAGING_DIR)/usr \
35 --with-ca-path=/etc/ssl/certs
36 else ifeq ($(BR2_PACKAGE_GNUTLS),y)
37 LIBCURL_CONF_OPTS += --with-gnutls=$(STAGING_DIR)/usr
38 LIBCURL_DEPENDENCIES += gnutls
39 else ifeq ($(BR2_PACKAGE_LIBNSS),y)
40 LIBCURL_CONF_OPTS += --with-nss=$(STAGING_DIR)/usr
41 LIBCURL_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) `$(PKG_CONFIG_HOST_BINARY) nspr nss --cflags`"
42 LIBCURL_DEPENDENCIES += libnss
43 else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
44 LIBCURL_CONF_OPTS += --with-mbedtls=$(STAGING_DIR)/usr
45 LIBCURL_DEPENDENCIES += mbedtls
46 else
47 LIBCURL_CONF_OPTS += --without-ssl --without-gnutls \
48 --without-polarssl --without-nss --without-mbedtls
49 endif
51 ifeq ($(BR2_PACKAGE_C_ARES),y)
52 LIBCURL_DEPENDENCIES += c-ares
53 LIBCURL_CONF_OPTS += --enable-ares
54 else
55 LIBCURL_CONF_OPTS += --disable-ares
56 endif
58 # Configure curl to support libssh2
59 ifeq ($(BR2_PACKAGE_LIBSSH2),y)
60 LIBCURL_DEPENDENCIES += libssh2
61 LIBCURL_CONF_OPTS += --with-libssh2
62 else
63 LIBCURL_CONF_OPTS += --without-libssh2
64 endif
66 define LIBCURL_FIX_DOT_PC
67 printf 'Requires: openssl\n' >>$(@D)/libcurl.pc.in
68 endef
69 LIBCURL_POST_PATCH_HOOKS += $(if $(BR2_PACKAGE_OPENSSL),LIBCURL_FIX_DOT_PC)
71 ifeq ($(BR2_PACKAGE_CURL),)
72 define LIBCURL_TARGET_CLEANUP
73 rm -rf $(TARGET_DIR)/usr/bin/curl
74 endef
75 LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_CLEANUP
76 endif
78 $(eval $(autotools-package))