summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandall2021-07-19 10:08:17 -0700
committerEric Sandall2021-07-19 12:56:02 -0700
commitf54ddde9819eacc6aa9dfd4ceac50d7ab01965c9 (patch)
treeafa640278521a0338ced2a6c55ae1c03125eaa77
parent808f6bbd65f7ff7829551b602c19566045065569 (diff)
libssh2: Fix configure.ac for newer autoconf versions
willco007-undefine.patch from https://github.com/libssh2/libssh2/pull/594
-rw-r--r--crypto/libssh2/HISTORY5
-rwxr-xr-xcrypto/libssh2/PRE_BUILD2
-rw-r--r--crypto/libssh2/willco007-undefine.patch50
3 files changed, 57 insertions, 0 deletions
diff --git a/crypto/libssh2/HISTORY b/crypto/libssh2/HISTORY
index 9a5e1baa30..7234cbe0d4 100644
--- a/crypto/libssh2/HISTORY
+++ b/crypto/libssh2/HISTORY
@@ -1,3 +1,8 @@
+2021-07-19 Eric Sandall <sandalle@sourcemage.org>
+ * PRE_BUILD: Apply willco007-undefine.patch
+ Fixes configure.ac for newer autoconf versions
+ * willco007-undefine.patch: From https://github.com/libssh2/libssh2/pull/594
+
2019-06-20 Florian Franzmann <bwlf@bandrate.org>
* DETAILS: version 1.9.0
* PRE_BUILD, libssh2-1.8.0-libgcrypt-prefix.patch: remove obsolete patch
diff --git a/crypto/libssh2/PRE_BUILD b/crypto/libssh2/PRE_BUILD
index 607c6ebc65..9073f2611c 100755
--- a/crypto/libssh2/PRE_BUILD
+++ b/crypto/libssh2/PRE_BUILD
@@ -1,5 +1,7 @@
default_pre_build &&
cd "$SOURCE_DIRECTORY" &&
+message "${MESSAGE_COLOR}Fixing configure.ac for newer autoconf...${DEFAULT_COLOR}" &&
+patch -p1 < "${SCRIPT_DIRECTORY}/willco007-undefine.patch" &&
autoreconf -fi
diff --git a/crypto/libssh2/willco007-undefine.patch b/crypto/libssh2/willco007-undefine.patch
new file mode 100644
index 0000000000..9e938e4ef3
--- /dev/null
+++ b/crypto/libssh2/willco007-undefine.patch
@@ -0,0 +1,50 @@
+# From https://github.com/libssh2/libssh2/commit/35ac220a4436df4ce50e990a02721369c9779ea9
+From 35ac220a4436df4ce50e990a02721369c9779ea9 Mon Sep 17 00:00:00 2001
+From: Will Cosgrove <will@panic.com>
+Date: Wed, 26 May 2021 16:42:38 -0700
+Subject: [PATCH] configure.ac: don't undefine scoped variable (#594)
+
+* configure.ac: don't undefine scoped variable
+
+To get this script to run with Autoconf 2.71 on macOS I had to remove the undefine of the backend for loop variable. It seems scoped to the for loop and also isn't referenced later in the script so it seems OK to remove it.
+
+* configure.ac: remove cygwin specific CFLAGS #598
+
+Notes:
+Remove cygwin specific Win32 CFLAGS and treat the build like a posix build
+
+Credit:
+Will Cosgrove, Brian Inglis
+---
+ configure.ac | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c9696eccac..c4fc3e4e30 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -36,12 +36,9 @@ case "$host" in
+ CFLAGS="$CFLAGS -DLIBSSH2_WIN32"
+ LIBS="$LIBS -lws2_32"
+ ;;
+- *-cygwin)
+- CFLAGS="$CFLAGS -DLIBSSH2_WIN32"
++ *darwin*)
++ CFLAGS="$CFLAGS -DLIBSSH2_DARWIN"
+ ;;
+- *darwin*)
+- CFLAGS="$CFLAGS -DLIBSSH2_DARWIN"
+- ;;
+ *hpux*)
+ ;;
+ *osf*)
+@@ -128,8 +125,6 @@ fi
+ m4_set_foreach([crypto_backends], [backend],
+ [AM_CONDITIONAL(m4_toupper(backend), test "$found_crypto" = "backend")]
+ )
+-m4_undefine([backend])
+-
+
+ # libz
+
+