2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2007-05-07 05:58:30 +02:00
|
|
|
#
|
2008-12-28 21:00:07 +01:00
|
|
|
# libcurl
|
2007-05-07 05:58:30 +02:00
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-09-02 16:04:53 +02:00
|
|
|
|
2019-02-06 17:54:35 +01:00
|
|
|
LIBCURL_VERSION = 7.64.0
|
2017-08-10 19:35:45 +02:00
|
|
|
LIBCURL_SOURCE = curl-$(LIBCURL_VERSION).tar.xz
|
2016-11-03 08:53:13 +01:00
|
|
|
LIBCURL_SITE = https://curl.haxx.se/download
|
2013-09-03 12:37:56 +02:00
|
|
|
LIBCURL_DEPENDENCIES = host-pkgconf \
|
|
|
|
$(if $(BR2_PACKAGE_ZLIB),zlib) \
|
2014-01-26 15:00:47 +01:00
|
|
|
$(if $(BR2_PACKAGE_RTMPDUMP),rtmpdump)
|
2017-06-26 03:34:23 +02:00
|
|
|
LIBCURL_LICENSE = curl
|
2012-08-11 22:10:16 +02:00
|
|
|
LIBCURL_LICENSE_FILES = COPYING
|
2008-12-28 14:50:53 +01:00
|
|
|
LIBCURL_INSTALL_STAGING = YES
|
2013-02-14 04:50:18 +01:00
|
|
|
|
|
|
|
# We disable NTLM support because it uses fork(), which doesn't work
|
|
|
|
# on non-MMU platforms. Moreover, this authentication method is
|
|
|
|
# probably almost never used. See
|
|
|
|
# http://curl.haxx.se/docs/manpage.html#--ntlm.
|
2017-01-31 18:26:53 +01:00
|
|
|
LIBCURL_CONF_OPTS = --disable-manual --disable-ntlm-wb \
|
2018-11-08 23:25:31 +01:00
|
|
|
--enable-hidden-symbols --with-random=/dev/urandom --disable-curldebug \
|
|
|
|
--without-polarssl
|
2017-01-31 18:26:53 +01:00
|
|
|
|
2017-09-12 13:43:58 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
|
|
|
LIBCURL_CONF_OPTS += --enable-threaded-resolver
|
|
|
|
else
|
|
|
|
LIBCURL_CONF_OPTS += --disable-threaded-resolver
|
|
|
|
endif
|
|
|
|
|
2017-01-31 18:26:53 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBCURL_VERBOSE),y)
|
|
|
|
LIBCURL_CONF_OPTS += --enable-verbose
|
|
|
|
else
|
|
|
|
LIBCURL_CONF_OPTS += --disable-verbose
|
|
|
|
endif
|
|
|
|
|
2013-02-07 13:35:05 +01:00
|
|
|
LIBCURL_CONFIG_SCRIPTS = curl-config
|
2008-12-28 14:50:53 +01:00
|
|
|
|
2018-11-08 23:25:31 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBCURL_OPENSSL),y)
|
2008-12-28 21:04:01 +01:00
|
|
|
LIBCURL_DEPENDENCIES += openssl
|
2009-03-10 22:03:14 +01:00
|
|
|
# configure adds the cross openssl dir to LD_LIBRARY_PATH which screws up
|
|
|
|
# native stuff during the rest of configure when target == host.
|
|
|
|
# Fix it by setting LD_LIBRARY_PATH to something sensible so those libs
|
|
|
|
# are found first.
|
package/libcurl: carefully override LD_LIBRARY_PATH
To build libcurl, we need to override LD_LIBRARY and force it to a sane
value, otherwise libcurl is confused when target == host (see a51ce319,
libcurl: fix configure with openssl when target == host).
That is currently OK, since we always set LD_LIBRARY_PATH to a non-empty
value.
However, we're soon to stop setting it at all.
So, if the user has an empty (or no) LD_LIBRARY_PATH in his envirnment,
we'd end up adding the current working directory to LD_LIBRARY_PATH (as
an empty entry in a colon-separated list is most probably interpreted as
meaning the current working directory, which we do know can cause issue,
and which we expressely check against in support/dependencies/dependencies.sh
Fix that by only using an existing LD_LIBRARY_PATH if it is not empty.
Also use a Makefile construct as it is easier to read than a shell one
(we can do that, as all variables from the environment are available as
make variables).
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-11-13 22:48:50 +01:00
|
|
|
LIBCURL_CONF_ENV += LD_LIBRARY_PATH=$(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)/lib:/usr/lib
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBCURL_CONF_OPTS += --with-ssl=$(STAGING_DIR)/usr \
|
2013-04-17 13:31:27 +02:00
|
|
|
--with-ca-path=/etc/ssl/certs
|
2018-11-08 23:25:31 +01:00
|
|
|
else
|
2019-02-20 02:40:06 +01:00
|
|
|
LIBCURL_CONF_OPTS += --without-ssl
|
2018-11-08 23:25:31 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBCURL_GNUTLS),y)
|
2018-11-16 21:17:39 +01:00
|
|
|
LIBCURL_CONF_OPTS += --with-gnutls=$(STAGING_DIR)/usr \
|
|
|
|
--with-ca-fallback
|
2013-09-03 12:37:56 +02:00
|
|
|
LIBCURL_DEPENDENCIES += gnutls
|
2018-11-08 23:25:31 +01:00
|
|
|
else
|
|
|
|
LIBCURL_CONF_OPTS += --without-gnutls
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBCURL_LIBNSS),y)
|
2018-11-13 01:24:02 +01:00
|
|
|
LIBCURL_CONF_OPTS += --with-nss=$(STAGING_DIR)/usr
|
2013-09-03 12:37:56 +02:00
|
|
|
LIBCURL_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) `$(PKG_CONFIG_HOST_BINARY) nspr nss --cflags`"
|
|
|
|
LIBCURL_DEPENDENCIES += libnss
|
2018-11-08 23:25:31 +01:00
|
|
|
else
|
|
|
|
LIBCURL_CONF_OPTS += --without-nss
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBCURL_MBEDTLS),y)
|
2018-11-13 01:24:02 +01:00
|
|
|
LIBCURL_CONF_OPTS += --with-mbedtls=$(STAGING_DIR)/usr
|
2016-01-06 19:53:37 +01:00
|
|
|
LIBCURL_DEPENDENCIES += mbedtls
|
2009-05-27 07:18:43 +02:00
|
|
|
else
|
2018-11-08 23:25:31 +01:00
|
|
|
LIBCURL_CONF_OPTS += --without-mbedtls
|
2008-12-28 21:04:01 +01:00
|
|
|
endif
|
|
|
|
|
2015-05-02 12:58:18 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_C_ARES),y)
|
|
|
|
LIBCURL_DEPENDENCIES += c-ares
|
|
|
|
LIBCURL_CONF_OPTS += --enable-ares
|
|
|
|
else
|
|
|
|
LIBCURL_CONF_OPTS += --disable-ares
|
|
|
|
endif
|
|
|
|
|
2018-05-01 22:40:33 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBIDN2),y)
|
|
|
|
LIBCURL_DEPENDENCIES += libidn2
|
|
|
|
LIBCURL_CONF_OPTS += --with-libidn2
|
|
|
|
else
|
|
|
|
LIBCURL_CONF_OPTS += --without-libidn2
|
|
|
|
endif
|
|
|
|
|
2013-08-30 16:09:45 +02:00
|
|
|
# Configure curl to support libssh2
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBSSH2),y)
|
|
|
|
LIBCURL_DEPENDENCIES += libssh2
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBCURL_CONF_OPTS += --with-libssh2
|
2013-08-30 16:09:45 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBCURL_CONF_OPTS += --without-libssh2
|
2013-08-30 16:09:45 +02:00
|
|
|
endif
|
|
|
|
|
2018-04-02 23:41:44 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BROTLI),y)
|
|
|
|
LIBCURL_DEPENDENCIES += brotli
|
|
|
|
LIBCURL_CONF_OPTS += --with-brotli
|
|
|
|
else
|
|
|
|
LIBCURL_CONF_OPTS += --without-brotli
|
|
|
|
endif
|
|
|
|
|
2018-07-19 15:54:09 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_NGHTTP2),y)
|
|
|
|
LIBCURL_DEPENDENCIES += nghttp2
|
|
|
|
LIBCURL_CONF_OPTS += --with-nghttp2
|
|
|
|
else
|
|
|
|
LIBCURL_CONF_OPTS += --without-nghttp2
|
|
|
|
endif
|
|
|
|
|
2012-11-28 14:54:00 +01:00
|
|
|
define LIBCURL_FIX_DOT_PC
|
|
|
|
printf 'Requires: openssl\n' >>$(@D)/libcurl.pc.in
|
|
|
|
endef
|
2018-11-08 23:25:31 +01:00
|
|
|
LIBCURL_POST_PATCH_HOOKS += $(if $(BR2_PACKAGE_LIBCURL_OPENSSL),LIBCURL_FIX_DOT_PC)
|
2012-11-28 14:54:00 +01:00
|
|
|
|
2013-02-07 13:35:05 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_CURL),)
|
2010-09-01 22:39:37 +02:00
|
|
|
define LIBCURL_TARGET_CLEANUP
|
2013-02-07 13:35:05 +01:00
|
|
|
rm -rf $(TARGET_DIR)/usr/bin/curl
|
2010-09-01 22:39:37 +02:00
|
|
|
endef
|
|
|
|
LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_CLEANUP
|
2013-02-07 13:35:05 +01:00
|
|
|
endif
|
2012-06-02 08:13:52 +02:00
|
|
|
|
2018-02-04 19:07:46 +01:00
|
|
|
HOST_LIBCURL_DEPENDENCIES = host-openssl
|
|
|
|
HOST_LIBCURL_CONF_OPTS = \
|
|
|
|
--disable-manual \
|
|
|
|
--disable-ntlm-wb \
|
|
|
|
--disable-curldebug \
|
|
|
|
--with-ssl \
|
|
|
|
--without-gnutls \
|
|
|
|
--without-mbedtls \
|
|
|
|
--without-polarssl \
|
|
|
|
--without-nss
|
|
|
|
|
|
|
|
HOST_LIBCURL_POST_PATCH_HOOKS += LIBCURL_FIX_DOT_PC
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|
2018-02-04 19:07:46 +01:00
|
|
|
$(eval $(host-autotools-package))
|