Skip to content

Commit

Permalink
[deps/libssh2]: fix import library name (JuliaLang#45914)
Browse files Browse the repository at this point in the history
* deps: apply `libssh2-fix-import-lib-name.patch`

* deps/libssh2: fix apply patch target name

Co-Authored-By: Jameson Nash <[email protected]>

Co-authored-by: Jameson Nash <[email protected]>
Co-authored-by: Viral B. Shah <[email protected]>
  • Loading branch information
3 people committed Sep 6, 2022
1 parent 40c3645 commit d8ffddd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
9 changes: 8 additions & 1 deletion deps/libssh2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ $(LIBSSH2_SRC_PATH)/libssh2-userauth-check.patch-applied: $(LIBSSH2_SRC_PATH)/so
patch -p1 -f < $(SRCDIR)/patches/libssh2-userauth-check.patch
echo 1 > $@

# issue: https://github.com/JuliaLang/julia/issues/45645#issuecomment-1153214379
# fix pr: https://github.com/libssh2/libssh2/pull/711
$(LIBSSH2_SRC_PATH)/libssh2-fix-import-lib-name.patch-applied: $(LIBSSH2_SRC_PATH)/libssh2-userauth-check.patch-applied
cd $(LIBSSH2_SRC_PATH) && \
patch -p1 -f < $(SRCDIR)/patches/libssh2-fix-import-lib-name.patch
echo 1 > $@

$(BUILDDIR)/$(LIBSSH2_SRC_DIR)/build-configured: \
$(LIBSSH2_SRC_PATH)/libssh2-userauth-check.patch-applied
$(LIBSSH2_SRC_PATH)/libssh2-fix-import-lib-name.patch-applied

$(BUILDDIR)/$(LIBSSH2_SRC_DIR)/build-configured: $(LIBSSH2_SRC_PATH)/source-extracted
mkdir -p $(dir $@)
Expand Down
26 changes: 26 additions & 0 deletions deps/patches/libssh2-fix-import-lib-name.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 3732420725efbf410df5863b91a09ca214ee18ba Mon Sep 17 00:00:00 2001
From: "Y. Yang" <[email protected]>
Date: Thu, 16 Jun 2022 19:16:37 +0800
Subject: [PATCH] Fix DLL import library name

https://aur.archlinux.org/packages/mingw-w64-libssh2
https://cmake.org/cmake/help/latest/prop_tgt/IMPORT_PREFIX.html
---
src/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cb8fee1..17ecefd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -220,6 +220,7 @@ endif()
add_library(libssh2 ${SOURCES})
# we want it to be called libssh2 on all platforms
set_target_properties(libssh2 PROPERTIES PREFIX "")
+set_target_properties(libssh2 PROPERTIES IMPORT_PREFIX "")

target_compile_definitions(libssh2 PRIVATE ${PRIVATE_COMPILE_DEFINITIONS})
target_include_directories(libssh2
--
2.36.1

0 comments on commit d8ffddd

Please sign in to comment.