Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old versions of libgit in new builds #902

Open
wants to merge 1 commit into
base: pharo-12
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 8 additions & 28 deletions cmake/importLibGit2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,31 @@ endfunction()
function(download_git2)
message(STATUS "Downloading Git2 binary")
if(WIN)
add_third_party_dependency("libgit2-1.4.4")
add_third_party_dependency("libgit2-1.5.2")
add_third_party_dependency("libgit2-1.6.4")
add_third_party_dependency("libgit2-default-2023-04-14")
add_third_party_dependency("zlib-1.2.13")
add_third_party_dependency("openssl-1.1.1k")
add_third_party_dependency("zlib-1.2.13")
add_third_party_dependency("ssh2-1.10.0")
elseif(OSX)
add_third_party_dependency("libgit2-1.4.4")
add_third_party_dependency("libgit2-1.5.2")
add_third_party_dependency("libgit2-1.6.4")
add_third_party_dependency("libgit2-default-2023-04-14")
add_third_party_dependency("libssh2-1.10.0")
add_third_party_dependency("openssl-1.1.1k")
add_third_party_dependency("libssh2-1.10.0")
else() # LINUX
If(${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7l" OR (${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64"))
add_third_party_dependency("libgit2-1.4.4")
add_third_party_dependency("openssl-1.1.1k")
add_third_party_dependency("libssh2-1.9.0")
add_third_party_dependency("libgit2-1.4.4")
add_third_party_dependency("libgit2-1.0.1")
add_third_party_dependency("zlib-1.2.11")
else()
#Libgit >= 1.4 depend on ssh2 1.9 and ssl 1.1.1
add_third_party_dependency("libgit2-1.4.4")
add_third_party_dependency("libssh2-1.9.0")
add_third_party_dependency("openssl-1.1.1k")

#Libgit <= 1.0 depend on ssh2 1.7 and ssl 1.0
add_third_party_dependency_with_baseurl("libgit2-linux-1.0.0" "https://github.com/guillep/libgit_build/releases/download/v1.0.2/")
add_third_party_dependency("libgit2-0.25.1")
add_third_party_dependency("libssh2-1.7.0")
add_third_party_dependency("openssl-1.0.2q")
add_third_party_dependency("libssh2-1.9.0")
endif()
endif()
endfunction()

function(build_git2)
message(STATUS "Building LibGit2 1.6.4 with LibSSH 1.10.0")
message(STATUS "Building LibGit2 1.8.4 with LibSSH 1.10.0")

include(cmake/DownloadProject.cmake)
download_project(PROJ LibSSH2
Expand All @@ -60,7 +47,7 @@ function(build_git2)

download_project(PROJ LibGit2
GIT_REPOSITORY https://github.com/libgit2/libgit2.git
GIT_TAG "v1.6.4"
GIT_TAG "v1.8.4"
${UPDATE_DISCONNECTED_IF_AVAILABLE}
)

Expand All @@ -77,18 +64,11 @@ function(build_git2)
elseif(OSX)
set_target_properties(git2 PROPERTIES MACOSX_RPATH ON)
set_target_properties(git2 PROPERTIES INSTALL_NAME_DIR "@executable_path/Plugins")

add_custom_target(libgit2_copy
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LibGit2_BINARY_DIR}/libgit2.1.4.4.dylib ${LIBRARY_OUTPUT_PATH}
COMMAND ${CMAKE_COMMAND} -E create_symlink libgit2.1.4.4.dylib ${LIBRARY_OUTPUT_PATH}/libgit2.1.4.dylib
COMMAND ${CMAKE_COMMAND} -E create_symlink libgit2.1.4.4.dylib ${LIBRARY_OUTPUT_PATH}/libgit2.dylib
COMMENT "Copying Libgit binaries from '${LibGit2_BINARY_DIR}' to '${LIBRARY_OUTPUT_PATH}'" VERBATIM)
else()
message(FATAL "Aggggh not implemented yet")
message(FATAL "Not implemented yet")
endif()

add_dependencies(libgit2_copy git2)
add_dependencies(${VM_LIBRARY_NAME} libgit2_copy)
add_dependencies(${VM_LIBRARY_NAME} git2)
endfunction()

if (BUILD_BUNDLE)
Expand Down