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
|
|
|
|
2014-09-10 17:21:31 +02:00
|
|
|
LIBCURL_VERSION = 7.38.0
|
2008-12-28 14:50:53 +01:00
|
|
|
LIBCURL_SOURCE = curl-$(LIBCURL_VERSION).tar.bz2
|
2012-02-28 21:30:13 +01:00
|
|
|
LIBCURL_SITE = http://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_LIBIDN),libidn) \
|
|
|
|
$(if $(BR2_PACKAGE_RTMPDUMP),rtmpdump)
|
2012-08-11 22:10:16 +02:00
|
|
|
LIBCURL_LICENSE = ICS
|
|
|
|
LIBCURL_LICENSE_FILES = COPYING
|
2008-12-28 14:50:53 +01:00
|
|
|
LIBCURL_INSTALL_STAGING = YES
|
2014-07-21 14:10:17 +02:00
|
|
|
# For libcurl-0001-build-link-curl-to-NSS-libraries-when-NSS-support.patch
|
|
|
|
LIBCURL_AUTORECONF = 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.
|
2013-09-03 12:37:56 +02:00
|
|
|
LIBCURL_CONF_OPT = --disable-verbose --disable-manual --disable-ntlm-wb \
|
|
|
|
--enable-hidden-symbols --with-random=/dev/urandom
|
2013-02-07 13:35:05 +01:00
|
|
|
LIBCURL_CONFIG_SCRIPTS = curl-config
|
2008-12-28 14:50:53 +01:00
|
|
|
|
2008-12-28 21:04:01 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
|
|
LIBCURL_DEPENDENCIES += openssl
|
|
|
|
LIBCURL_CONF_ENV += ac_cv_lib_crypto_CRYPTO_lock=yes
|
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.
|
|
|
|
LIBCURL_CONF_ENV += LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:/lib:/usr/lib
|
2013-09-03 12:37:56 +02:00
|
|
|
LIBCURL_CONF_OPT += --with-ssl=$(STAGING_DIR)/usr \
|
2013-04-17 13:31:27 +02:00
|
|
|
--with-ca-path=/etc/ssl/certs
|
2013-09-03 12:37:56 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_GNUTLS),y)
|
|
|
|
LIBCURL_CONF_OPT += --with-gnutls=$(STAGING_DIR)/usr
|
|
|
|
LIBCURL_DEPENDENCIES += gnutls
|
|
|
|
else ifeq ($(BR2_PACKAGE_LIBNSS),y)
|
|
|
|
LIBCURL_CONF_OPT += --with-nss=$(STAGING_DIR)/usr
|
|
|
|
LIBCURL_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) `$(PKG_CONFIG_HOST_BINARY) nspr nss --cflags`"
|
|
|
|
LIBCURL_DEPENDENCIES += libnss
|
2009-05-27 07:18:43 +02:00
|
|
|
else
|
2014-07-18 15:07:07 +02:00
|
|
|
# polarssl support needs 1.3.x
|
2013-09-03 12:37:56 +02:00
|
|
|
LIBCURL_CONF_OPT += --without-ssl --without-gnutls \
|
|
|
|
--without-polarssl --without-nss
|
2008-12-28 21:04:01 +01:00
|
|
|
endif
|
|
|
|
|
2013-08-30 16:09:45 +02:00
|
|
|
# Configure curl to support libssh2
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBSSH2),y)
|
|
|
|
LIBCURL_DEPENDENCIES += libssh2
|
|
|
|
LIBCURL_CONF_OPT += --with-libssh2
|
|
|
|
else
|
|
|
|
LIBCURL_CONF_OPT += --without-libssh2
|
|
|
|
endif
|
|
|
|
|
2012-11-28 14:54:00 +01:00
|
|
|
define LIBCURL_FIX_DOT_PC
|
|
|
|
printf 'Requires: openssl\n' >>$(@D)/libcurl.pc.in
|
|
|
|
endef
|
|
|
|
LIBCURL_POST_PATCH_HOOKS += $(if $(BR2_PACKAGE_OPENSSL),LIBCURL_FIX_DOT_PC)
|
|
|
|
|
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
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|
2008-12-28 21:06:20 +01:00
|
|
|
|
|
|
|
curl: libcurl
|
|
|
|
curl-clean: libcurl-clean
|
|
|
|
curl-dirclean: libcurl-dirclean
|
|
|
|
curl-source: libcurl-source
|