aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2016-03-03 22:30:22 +0000
committerHauke Mehrtens <hauke@openwrt.org>2016-03-03 22:30:22 +0000
commitaf131d792eec3ba434846888f56c0df1ca9e9042 (patch)
tree88f23225e34b4461f2d978e511d05290a216f744
parentdf7603824bbfbb9d9aa311b57db2376145b41c6a (diff)
downloadupstream-af131d792eec3ba434846888f56c0df1ca9e9042.tar.gz
upstream-af131d792eec3ba434846888f56c0df1ca9e9042.tar.bz2
upstream-af131d792eec3ba434846888f56c0df1ca9e9042.zip
CC: curl: detect the library as renamed wolfssl
Without this patch curl does not detect the new cyassl/wolfssl version and would be build without ssl support instead when cyassl was selected. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@48900 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/network/utils/curl/Makefile2
-rw-r--r--package/network/utils/curl/patches/110-cyassl-detect-the-library-as-renamed-wolfssl.patch101
2 files changed, 102 insertions, 1 deletions
diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile
index 83d739bc53..734b423929 100644
--- a/package/network/utils/curl/Makefile
+++ b/package/network/utils/curl/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=curl
PKG_VERSION:=7.40.0
-PKG_RELEASE:=3.1
+PKG_RELEASE:=3.2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
diff --git a/package/network/utils/curl/patches/110-cyassl-detect-the-library-as-renamed-wolfssl.patch b/package/network/utils/curl/patches/110-cyassl-detect-the-library-as-renamed-wolfssl.patch
new file mode 100644
index 0000000000..3b4229f901
--- /dev/null
+++ b/package/network/utils/curl/patches/110-cyassl-detect-the-library-as-renamed-wolfssl.patch
@@ -0,0 +1,101 @@
+From 7868dc7103b40484d177985bb04270250a50e262 Mon Sep 17 00:00:00 2001
+From: Dan Fandrich <dan@coneharvesters.com>
+Date: Thu, 19 Mar 2015 23:41:10 +0100
+Subject: [PATCH] cyassl: detect the library as renamed wolfssl
+
+This change was made in CyaSSL/WolfSSL ver. 3.4.0
+---
+ configure.ac | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 57 insertions(+), 3 deletions(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1578,8 +1578,10 @@ if test "$curl_ssl_msg" = "$init_ssl_msg
+ AC_CHECK_FUNCS( ENGINE_load_builtin_engines )
+ ])
+
+- dnl these can only exist if openssl exists
+- dnl yassl doesn't have SSL_get_shutdown
++ dnl These can only exist if OpenSSL exists
++ dnl Older versions of Cyassl (some time before 2.9.4) don't have
++ dnl SSL_get_shutdown (but this check won't actually detect it there
++ dnl as it's a macro that needs the header files be included)
+
+ AC_CHECK_FUNCS( RAND_status \
+ RAND_screen \
+@@ -1943,6 +1945,10 @@ if test "$curl_ssl_msg" = "$init_ssl_msg
+ OPT_CYASSL=""
+ fi
+
++ dnl This should be reworked to use pkg-config instead
++
++ cyassllibname=cyassl
++
+ if test -z "$OPT_CYASSL" ; then
+ dnl check for lib in system default first
+
+@@ -1984,7 +1990,55 @@ if test "$curl_ssl_msg" = "$init_ssl_msg
+ [
+ CPPFLAGS=$_cppflags
+ LDFLAGS=$_ldflags
++ cyassllib=""
++ ])
++ fi
++
++ addld=""
++ addlib=""
++ addcflags=""
++
++ if test "x$USE_CYASSL" != "xyes"; then
++ dnl libcyassl renamed to libwolfssl as of 3.4.0
++ addld=-L$OPT_CYASSL/lib$libsuff
++ addcflags=-I$OPT_CYASSL/include
++ cyassllib=$OPT_CYASSL/lib$libsuff
++
++ LDFLAGS="$LDFLAGS $addld"
++ if test "$addcflags" != "-I/usr/include"; then
++ CPPFLAGS="$CPPFLAGS $addcflags"
++ fi
++
++ cyassllibname=wolfssl
++ my_ac_save_LIBS="$LIBS"
++ LIBS="-l$cyassllibname -lm $LIBS"
++
++ AC_MSG_CHECKING([for CyaSSL_Init in -lwolfssl])
++ AC_LINK_IFELSE([
++ AC_LANG_PROGRAM([[
++/* These aren't needed for detection and confuse WolfSSL.
++ They are set up properly later if it is detected. */
++#undef SIZEOF_LONG
++#undef SIZEOF_LONG_LONG
++#include <cyassl/ssl.h>
++ ]],[[
++ return CyaSSL_Init();
++ ]])
++ ],[
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
++ AC_SUBST(USE_CYASSL, [1])
++ CYASSL_ENABLED=1
++ USE_CYASSL="yes"
++ curl_ssl_msg="enabled (CyaSSL)"
++ ],
++ [
++ AC_MSG_RESULT(no)
++ CPPFLAGS=$_cppflags
++ LDFLAGS=$_ldflags
++ cyassllib=""
+ ])
++ LIBS="$my_ac_save_LIBS"
+ fi
+
+ if test "x$USE_CYASSL" = "xyes"; then
+@@ -1996,7 +2050,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg
+ dnl Versions since at least 2.9.4 renamed error.h to error-ssl.h
+ AC_CHECK_HEADERS(cyassl/error-ssl.h)
+
+- LIBS="-lcyassl -lm $LIBS"
++ LIBS="-l$cyassllibname -lm $LIBS"
+
+ if test -n "$cyassllib"; then
+ dnl when shared libs were found in a path that the run-time