summaryrefslogtreecommitdiffstats
path: root/src/libssh-1-fixes.patch
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2017-10-29 00:47:59 (GMT)
committerTony Theodore <tonyt@logyst.com>2017-10-29 01:27:01 (GMT)
commit817b81d7c5f0e9032a7b88a9457d054164a32214 (patch)
treef5db2342742b04db921c7b4527068af867b4a65e /src/libssh-1-fixes.patch
parentf4440b7aeba2b8194b5b3b7ba178dd77b4d4a2c4 (diff)
downloadmxe-817b81d7c5f0e9032a7b88a9457d054164a32214.zip
mxe-817b81d7c5f0e9032a7b88a9457d054164a32214.tar.gz
mxe-817b81d7c5f0e9032a7b88a9457d054164a32214.tar.bz2
add package libssh
Another SSH library with different focus (and distinct headers/libs). See: https://www.libssh2.org/libssh2-vs-libssh.html
Diffstat (limited to 'src/libssh-1-fixes.patch')
-rw-r--r--src/libssh-1-fixes.patch214
1 files changed, 214 insertions, 0 deletions
diff --git a/src/libssh-1-fixes.patch b/src/libssh-1-fixes.patch
new file mode 100644
index 0000000..3ac3030
--- /dev/null
+++ b/src/libssh-1-fixes.patch
@@ -0,0 +1,214 @@
+This file is part of MXE. See LICENSE.md for licensing information.
+
+Contains ad hoc patches for cross building.
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tony Theodore <tonyt@logyst.com>
+Date: Sun, 29 Oct 2017 00:11:28 +1100
+Subject: [PATCH] add option to disable shared libs
+
+Taken from:
+https://www.libssh.org/archive/libssh/2017-10/0000012.html
+
+diff --git a/DefineOptions.cmake b/DefineOptions.cmake
+index 1111111..2222222 100644
+--- a/DefineOptions.cmake
++++ b/DefineOptions.cmake
+@@ -3,6 +3,7 @@ option(WITH_ZLIB "Build with ZLIB support" ON)
+ option(WITH_SSH1 "Build with SSH1 support" OFF)
+ option(WITH_SFTP "Build with SFTP support" ON)
+ option(WITH_SERVER "Build with SSH server support" ON)
++option(WITH_SHARED_LIB "Build with a shared library" ON)
+ option(WITH_STATIC_LIB "Build with a static library" OFF)
+ option(WITH_DEBUG_CRYPTO "Build with cryto debug output" OFF)
+ option(WITH_DEBUG_CALLTRACE "Build with calltrace debug output" ON)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 1111111..2222222 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -225,6 +225,7 @@ include_directories(
+ ${LIBSSH_PRIVATE_INCLUDE_DIRS}
+ )
+
++if (WITH_SHARED_LIB)
+ add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS})
+
+ target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES})
+@@ -259,6 +260,7 @@ install(
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ COMPONENT libraries
+ )
++endif (WITH_SHARED_LIB)
+
+ if (WITH_STATIC_LIB)
+ add_library(${LIBSSH_STATIC_LIBRARY} STATIC ${libssh_SRCS})
+diff --git a/src/threads/CMakeLists.txt b/src/threads/CMakeLists.txt
+index 1111111..2222222 100644
+--- a/src/threads/CMakeLists.txt
++++ b/src/threads/CMakeLists.txt
+@@ -59,6 +59,7 @@ include_directories(
+ if (libssh_threads_SRCS)
+ set(LIBSSH_THREADS ON CACHE "libssh threads lib" INTERNAL)
+
++ if (WITH_SHARED_LIB)
+ add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS})
+
+ target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES})
+@@ -88,6 +89,7 @@ if (libssh_threads_SRCS)
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ COMPONENT libraries
+ )
++ endif (WITH_SHARED_LIB)
+
+ if (WITH_STATIC_LIB)
+ add_library(${LIBSSH_THREADS_STATIC_LIBRARY} STATIC ${libssh_threads_SRCS})
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tony Theodore <tonyt@logyst.com>
+Date: Sun, 29 Oct 2017 00:45:55 +1100
+Subject: [PATCH] add indentation for shared lib hunks
+
+Taken from:
+https://www.libssh.org/archive/libssh/2017-10/0000012.html
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 1111111..2222222 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -226,40 +226,40 @@ include_directories(
+ )
+
+ if (WITH_SHARED_LIB)
+-add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS})
+-
+-target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES})
+-
+-set_target_properties(
+- ${LIBSSH_SHARED_LIBRARY}
+- PROPERTIES
+- VERSION
+- ${LIBRARY_VERSION}
+- SOVERSION
+- ${LIBRARY_SOVERSION}
+- OUTPUT_NAME
+- ssh
+- DEFINE_SYMBOL
+- LIBSSH_EXPORTS
+-)
++ add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS})
++
++ target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES})
++
++ set_target_properties(
++ ${LIBSSH_SHARED_LIBRARY}
++ PROPERTIES
++ VERSION
++ ${LIBRARY_VERSION}
++ SOVERSION
++ ${LIBRARY_SOVERSION}
++ OUTPUT_NAME
++ ssh
++ DEFINE_SYMBOL
++ LIBSSH_EXPORTS
++ )
+
+-if (WITH_VISIBILITY_HIDDEN)
+- set_target_properties(${LIBSSH_SHARED_LIBRARY} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
+-endif (WITH_VISIBILITY_HIDDEN)
++ if (WITH_VISIBILITY_HIDDEN)
++ set_target_properties(${LIBSSH_SHARED_LIBRARY} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
++ endif (WITH_VISIBILITY_HIDDEN)
+
+-if (MINGW)
+- set_target_properties(${LIBSSH_SHARED_LIBRARY} PROPERTIES LINK_FLAGS "-Wl,--enable-stdcall-fixup")
+-endif ()
++ if (MINGW)
++ set_target_properties(${LIBSSH_SHARED_LIBRARY} PROPERTIES LINK_FLAGS "-Wl,--enable-stdcall-fixup")
++ endif ()
+
+
+-install(
+- TARGETS
+- ${LIBSSH_SHARED_LIBRARY}
+- RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+- LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+- COMPONENT libraries
+-)
++ install(
++ TARGETS
++ ${LIBSSH_SHARED_LIBRARY}
++ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
++ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
++ COMPONENT libraries
++ )
+ endif (WITH_SHARED_LIB)
+
+ if (WITH_STATIC_LIB)
+diff --git a/src/threads/CMakeLists.txt b/src/threads/CMakeLists.txt
+index 1111111..2222222 100644
+--- a/src/threads/CMakeLists.txt
++++ b/src/threads/CMakeLists.txt
+@@ -60,35 +60,35 @@ if (libssh_threads_SRCS)
+ set(LIBSSH_THREADS ON CACHE "libssh threads lib" INTERNAL)
+
+ if (WITH_SHARED_LIB)
+- add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS})
+-
+- target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES})
+-
+- set_target_properties(
+- ${LIBSSH_THREADS_SHARED_LIBRARY}
+- PROPERTIES
+- VERSION
+- ${LIBRARY_VERSION}
+- SOVERSION
+- ${LIBRARY_SOVERSION}
+- OUTPUT_NAME
+- ssh_threads
+- DEFINE_SYMBOL
+- LIBSSH_EXPORTS
+- )
++ add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS})
+
+- if (WITH_VISIBILITY_HIDDEN)
+- set_target_properties(${LIBSSH_THREADS_SHARED_LIBRARY} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
+- endif (WITH_VISIBILITY_HIDDEN)
++ target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES})
+
+- install(
+- TARGETS
++ set_target_properties(
+ ${LIBSSH_THREADS_SHARED_LIBRARY}
+- RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+- LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+- COMPONENT libraries
+- )
++ PROPERTIES
++ VERSION
++ ${LIBRARY_VERSION}
++ SOVERSION
++ ${LIBRARY_SOVERSION}
++ OUTPUT_NAME
++ ssh_threads
++ DEFINE_SYMBOL
++ LIBSSH_EXPORTS
++ )
++
++ if (WITH_VISIBILITY_HIDDEN)
++ set_target_properties(${LIBSSH_THREADS_SHARED_LIBRARY} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
++ endif (WITH_VISIBILITY_HIDDEN)
++
++ install(
++ TARGETS
++ ${LIBSSH_THREADS_SHARED_LIBRARY}
++ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
++ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
++ COMPONENT libraries
++ )
+ endif (WITH_SHARED_LIB)
+
+ if (WITH_STATIC_LIB)