diff --git a/packages/web/curl/build b/packages/web/curl/build index fb02e7adf9..dd561619bc 100755 --- a/packages/web/curl/build +++ b/packages/web/curl/build @@ -23,7 +23,7 @@ . config/options $1 # link against librt because of undefined reference to 'clock_gettime' - LDFLAGS="$LDFLAGS -lrt -lrtmp" + LDFLAGS="$LDFLAGS -lrt -lm -lrtmp" cd $PKG_BUILD ac_cv_lib_rtmp_RTMP_Init=yes \ @@ -69,12 +69,12 @@ ac_cv_header_librtmp_rtmp_h=yes \ --without-krb4 \ --without-spnego \ --without-gssapi \ - --with-ssl \ --with-zlib \ --without-egd-socket \ --enable-thread \ --with-random=/dev/urandom \ - --without-gnutls \ + --with-gnutls="$SYSROOT_PREFIX/usr" \ + --without-ssl \ --without-polarssl \ --without-nss \ --with-ca-bundle="$SSL_CERTIFICATES/cacert.pem" \ diff --git a/packages/web/curl/meta b/packages/web/curl/meta index c3a2a7aa03..4a9197162d 100644 --- a/packages/web/curl/meta +++ b/packages/web/curl/meta @@ -25,8 +25,8 @@ PKG_ARCH="any" PKG_LICENSE="MIT" PKG_SITE="http://curl.haxx.se" PKG_URL="http://curl.haxx.se/download/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="zlib openssl rtmpdump" -PKG_BUILD_DEPENDS="toolchain zlib openssl rtmpdump" +PKG_DEPENDS="zlib gnutls rtmpdump" +PKG_BUILD_DEPENDS="toolchain zlib gnutls rtmpdump" PKG_PRIORITY="optional" PKG_SECTION="web" PKG_SHORTDESC="curl: Client and library for (HTTP, HTTPS, FTP, ...) transfers" diff --git a/packages/web/curl/patches/curl-7.27.0-04_workaround_as_needed_bug.patch b/packages/web/curl/patches/curl-7.27.0-04_workaround_as_needed_bug.patch new file mode 100644 index 0000000000..46a397668f --- /dev/null +++ b/packages/web/curl/patches/curl-7.27.0-04_workaround_as_needed_bug.patch @@ -0,0 +1,38 @@ +Description: Work around libtool --as-needed reordering bug +Origin: vendor +Bug-Debian: http://bugs.debian.org/347650 +Forwarded: not-needed +Author: Alessandro Ghedini +Reviewed-by: Alessandro Ghedini +Last-Update: 2013-03-22 + +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -5800,6 +5800,11 @@ + arg=$func_stripname_result + ;; + ++ -Wl,--as-needed|-Wl,--no-as-needed) ++ deplibs="$deplibs $arg" ++ continue ++ ;; ++ + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result +@@ -6163,6 +6168,15 @@ + lib= + found=no + case $deplib in ++ -Wl,--as-needed|-Wl,--no-as-needed) ++ if test "$linkmode,$pass" = "prog,link"; then ++ compile_deplibs="$deplib $compile_deplibs" ++ finalize_deplibs="$deplib $finalize_deplibs" ++ else ++ deplibs="$deplib $deplibs" ++ fi ++ continue ++ ;; + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test "$linkmode,$pass" = "prog,link"; then diff --git a/packages/web/curl/patches/curl-7.27.0-gtls-fix-build-failure-by-including-nettle-specific.patch b/packages/web/curl/patches/curl-7.27.0-gtls-fix-build-failure-by-including-nettle-specific.patch new file mode 100644 index 0000000000..b0a81657fd --- /dev/null +++ b/packages/web/curl/patches/curl-7.27.0-gtls-fix-build-failure-by-including-nettle-specific.patch @@ -0,0 +1,30 @@ +From 986c7949c0638bebb99bd08d63216433254c2185 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Mon, 6 Aug 2012 15:04:25 +0200 +Subject: [PATCH] gtls: fix build failure by including nettle-specific headers + +Bug: http://curl.haxx.se/bug/view.cgi?id=3554668 +Reported by: Anthony G. Basile +--- + lib/gtls.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/lib/gtls.c b/lib/gtls.c +index d981ef1..c750a6f 100644 +--- a/lib/gtls.c ++++ b/lib/gtls.c +@@ -34,7 +34,10 @@ + + #include + #include +-#ifndef USE_GNUTLS_NETTLE ++#ifdef USE_GNUTLS_NETTLE ++#include ++#include ++#else + #include + #endif + +-- +1.7.10.4 + diff --git a/packages/web/curl/patches/curl-7.27.0-metalink-change-code-order-to-build-with-gnutls-nettle.patch b/packages/web/curl/patches/curl-7.27.0-metalink-change-code-order-to-build-with-gnutls-nettle.patch new file mode 100644 index 0000000000..7cbd98b1a7 --- /dev/null +++ b/packages/web/curl/patches/curl-7.27.0-metalink-change-code-order-to-build-with-gnutls-nettle.patch @@ -0,0 +1,148 @@ +From 9f304291bd72aae66944cd7523707e1b88c6ad7b Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Mon, 6 Aug 2012 19:20:35 +0200 +Subject: [PATCH] metalink: change code order to build with gnutls-nettle + +Bug: http://curl.haxx.se/bug/view.cgi?id=3554668 +Reported by: Anthony G. Basile +--- + src/tool_metalink.c | 116 +++++++++++++++++++++++++-------------------------- + 1 file changed, 58 insertions(+), 58 deletions(-) + +diff --git a/src/tool_metalink.c b/src/tool_metalink.c +index 5491815..3a24a15 100644 +--- a/src/tool_metalink.c ++++ b/src/tool_metalink.c +@@ -82,64 +82,6 @@ + return PARAM_NO_MEM; \ + } WHILE_FALSE + +-const digest_params MD5_DIGEST_PARAMS[] = { +- { +- (Curl_digest_init_func) MD5_Init, +- (Curl_digest_update_func) MD5_Update, +- (Curl_digest_final_func) MD5_Final, +- sizeof(MD5_CTX), +- 16 +- } +-}; +- +-const digest_params SHA1_DIGEST_PARAMS[] = { +- { +- (Curl_digest_init_func) SHA1_Init, +- (Curl_digest_update_func) SHA1_Update, +- (Curl_digest_final_func) SHA1_Final, +- sizeof(SHA_CTX), +- 20 +- } +-}; +- +-const digest_params SHA256_DIGEST_PARAMS[] = { +- { +- (Curl_digest_init_func) SHA256_Init, +- (Curl_digest_update_func) SHA256_Update, +- (Curl_digest_final_func) SHA256_Final, +- sizeof(SHA256_CTX), +- 32 +- } +-}; +- +-static const metalink_digest_def SHA256_DIGEST_DEF[] = { +- {"sha-256", SHA256_DIGEST_PARAMS} +-}; +- +-static const metalink_digest_def SHA1_DIGEST_DEF[] = { +- {"sha-1", SHA1_DIGEST_PARAMS} +-}; +- +-static const metalink_digest_def MD5_DIGEST_DEF[] = { +- {"md5", MD5_DIGEST_PARAMS} +-}; +- +-/* +- * The alias of supported hash functions in the order by preference +- * (basically stronger hash comes first). We included "sha-256" and +- * "sha256". The former is the name defined in the IANA registry named +- * "Hash Function Textual Names". The latter is widely (and +- * historically) used in Metalink version 3. +- */ +-static const metalink_digest_alias digest_aliases[] = { +- {"sha-256", SHA256_DIGEST_DEF}, +- {"sha256", SHA256_DIGEST_DEF}, +- {"sha-1", SHA1_DIGEST_DEF}, +- {"sha1", SHA1_DIGEST_DEF}, +- {"md5", MD5_DIGEST_DEF}, +- {NULL, NULL} +-}; +- + #ifdef USE_GNUTLS_NETTLE + + static void MD5_Init(MD5_CTX *ctx) +@@ -251,6 +193,64 @@ static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx) + + #endif /* CRYPTO LIBS */ + ++const digest_params MD5_DIGEST_PARAMS[] = { ++ { ++ (Curl_digest_init_func) MD5_Init, ++ (Curl_digest_update_func) MD5_Update, ++ (Curl_digest_final_func) MD5_Final, ++ sizeof(MD5_CTX), ++ 16 ++ } ++}; ++ ++const digest_params SHA1_DIGEST_PARAMS[] = { ++ { ++ (Curl_digest_init_func) SHA1_Init, ++ (Curl_digest_update_func) SHA1_Update, ++ (Curl_digest_final_func) SHA1_Final, ++ sizeof(SHA_CTX), ++ 20 ++ } ++}; ++ ++const digest_params SHA256_DIGEST_PARAMS[] = { ++ { ++ (Curl_digest_init_func) SHA256_Init, ++ (Curl_digest_update_func) SHA256_Update, ++ (Curl_digest_final_func) SHA256_Final, ++ sizeof(SHA256_CTX), ++ 32 ++ } ++}; ++ ++static const metalink_digest_def SHA256_DIGEST_DEF[] = { ++ {"sha-256", SHA256_DIGEST_PARAMS} ++}; ++ ++static const metalink_digest_def SHA1_DIGEST_DEF[] = { ++ {"sha-1", SHA1_DIGEST_PARAMS} ++}; ++ ++static const metalink_digest_def MD5_DIGEST_DEF[] = { ++ {"md5", MD5_DIGEST_PARAMS} ++}; ++ ++/* ++ * The alias of supported hash functions in the order by preference ++ * (basically stronger hash comes first). We included "sha-256" and ++ * "sha256". The former is the name defined in the IANA registry named ++ * "Hash Function Textual Names". The latter is widely (and ++ * historically) used in Metalink version 3. ++ */ ++static const metalink_digest_alias digest_aliases[] = { ++ {"sha-256", SHA256_DIGEST_DEF}, ++ {"sha256", SHA256_DIGEST_DEF}, ++ {"sha-1", SHA1_DIGEST_DEF}, ++ {"sha1", SHA1_DIGEST_DEF}, ++ {"md5", MD5_DIGEST_DEF}, ++ {NULL, NULL} ++}; ++ + digest_context *Curl_digest_init(const digest_params *dparams) + { + digest_context *ctxt; +-- +1.7.10.4 +