libssh2: version bump
authorSebastian Kemper <redacted>
Tue, 30 Jan 2018 13:47:12 +0000 (14:47 +0100)
committerSebastian Kemper <redacted>
Tue, 30 Jan 2018 13:54:41 +0000 (14:54 +0100)
- Bump version to 1.8.0
- Switch from openssl crypto backend to mbedtls (the package is a lot
  smaller size-wise compared to openssl and libgcrypt)
- mbedtls support was added in 1.8.0 release. Unfortunately the detection
  doesn't work out of the box, so a patch is needed that fixes an m4
  script. For that reason autoreconf must be run.
- Add --with-libz-prefix as without it zlib is not detected (currently
  there is the zlib dependency but libssh2 never actually links to it).
- Add --disable-silent-rules to get verbose build output.

Signed-off-by: Sebastian Kemper <redacted>
libs/libssh2/Makefile
libs/libssh2/patches/01-fix-acinclude-m4.patch [new file with mode: 0644]

index 99ae7afa1d02dae048e384082bd2fccf6e79202a..e996dfadff42461ec539cb6f1a2ec03857a8310e 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015-2016 OpenWrt.org
+# Copyright (C) 2015-2018 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libssh2
-PKG_VERSION:=1.7.0
+PKG_VERSION:=1.8.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.libssh2.org/download
-PKG_HASH:=e4561fd43a50539a8c2ceb37841691baf03ecb7daf043766da1b112e4280d584
+PKG_SOURCE_URL:=https://www.libssh2.org/download
+PKG_HASH:=39f34e2f6835f4b992cafe8625073a88e5a28ba78f83e8099610a7b3af4676d4
+
+PKG_FIXUP:=autoreconf
 
 PKG_INSTALL:=1
 
@@ -26,8 +28,8 @@ define Package/libssh2
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=SSH2 library
-  URL:=http://www.libssh2.org/
-  DEPENDS:=+libopenssl +zlib
+  URL:=https://www.libssh2.org/
+  DEPENDS:=+libmbedtls +zlib
   MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
 endef
 
@@ -39,7 +41,10 @@ TARGET_CFLAGS += $(FPIC)
 
 CONFIGURE_ARGS += \
        --disable-examples-build \
-       --with-libssl-prefix=$(STAGING_DIR)/usr
+       --disable-silent-rules \
+       --with-mbedtls \
+       --with-libmbedtls-prefix=$(STAGING_DIR)/usr \
+       --with-libz-prefix=$(STAGING_DIR)/usr
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
diff --git a/libs/libssh2/patches/01-fix-acinclude-m4.patch b/libs/libssh2/patches/01-fix-acinclude-m4.patch
new file mode 100644 (file)
index 0000000..d4e1182
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -386,9 +386,9 @@ AC_DEFUN([LIBSSH2_CHECKFOR_MBEDTLS], [
+   old_LDFLAGS=$LDFLAGS
+   old_CFLAGS=$CFLAGS
+-  if test -n "$use_mbedtls" && test "$use_mbedtls" != "no"; then
+-    LDFLAGS="$LDFLAGS -L$use_mbedtls/lib"
+-    CFLAGS="$CFLAGS -I$use_mbedtls/include"
++  if test -n "$with_libmbedtls_prefix" && test "$use_mbedtls" != "no"; then
++    LDFLAGS="$LDFLAGS -L$with_libmbedtls_prefix/lib"
++    CFLAGS="$CFLAGS -I$with_libmbedtls_prefix/include"
+   fi
+   AC_LIB_HAVE_LINKFLAGS([mbedtls], [], [
+@@ -412,9 +412,9 @@ AC_DEFUN([LIBSSH2_CHECKFOR_GCRYPT], [
+   old_LDFLAGS=$LDFLAGS
+   old_CFLAGS=$CFLAGS
+-  if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then
+-    LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib"
+-    CFLAGS="$CFLAGS -I$use_libgcrypt/include"
++  if test -n "$with_libgcrypt_prefix" && test "$use_libgcrypt" != "no"; then
++    LDFLAGS="$LDFLAGS -L$with_libgcrypt_prefix/lib"
++    CFLAGS="$CFLAGS -I$with_libgcrypt_prefix/include"
+   fi
+   AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [
+     #include <gcrypt.h>
git clone https://git.99rst.org/PROJECT