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
|
|
|
|
2015-12-02 13:55:50 +01:00
|
|
|
LIBCURL_VERSION = 7.46.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)
|
2015-10-27 22:21:08 +01:00
|
|
|
LIBCURL_LICENSE = ISC
|
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.
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBCURL_CONF_OPTS = --disable-verbose --disable-manual --disable-ntlm-wb \
|
2015-04-23 22:01:36 +02:00
|
|
|
--enable-hidden-symbols --with-random=/dev/urandom --disable-curldebug
|
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.
|
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
|
2013-09-03 12:37:56 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_GNUTLS),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBCURL_CONF_OPTS += --with-gnutls=$(STAGING_DIR)/usr
|
2013-09-03 12:37:56 +02:00
|
|
|
LIBCURL_DEPENDENCIES += gnutls
|
|
|
|
else ifeq ($(BR2_PACKAGE_LIBNSS),y)
|
2014-09-27 21:32:44 +02: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
|
2009-05-27 07:18:43 +02:00
|
|
|
else
|
2014-07-18 15:07:07 +02:00
|
|
|
# polarssl support needs 1.3.x
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBCURL_CONF_OPTS += --without-ssl --without-gnutls \
|
2013-09-03 12:37:56 +02:00
|
|
|
--without-polarssl --without-nss
|
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
|
|
|
|
|
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
|
|
|
|
|
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))
|