From d72eb5eb2d26f6462e07ec578996590d5ae27c99 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 1 Jul 2020 00:46:44 +0200 Subject: [PATCH] Update dependencies --- .ci/script.sh | 1 - CMakeLists.txt | 11 +++-- cmake/Hunter/config.cmake | 2 +- cmake/HunterGate.cmake | 77 ++++++++++++++++++-------------- io.github.NhekoReborn.Nheko.json | 4 +- 5 files changed, 52 insertions(+), 43 deletions(-) diff --git a/.ci/script.sh b/.ci/script.sh index 63e7f135..f43a6efb 100755 --- a/.ci/script.sh +++ b/.ci/script.sh @@ -71,7 +71,6 @@ cmake -GNinja -H. -Bbuild \ -DHUNTER_ROOT=".hunter" \ -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo \ - -DUSE_BUNDLED_OPENSSL=OFF \ -DCI_BUILD=ON fi cmake --build build diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bbfa696..f1ccde5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,10 +18,9 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "compile as PIC by default") option(HUNTER_ENABLED "Enable Hunter package manager" OFF) include("cmake/HunterGate.cmake") HunterGate( - URL "https://github.com/cpp-pm/hunter/archive/v0.23.244.tar.gz" - SHA1 "2c0f491fd0b80f7b09e3d21adb97237161ef9835" - LOCAL - ) + URL "https://github.com/cpp-pm/hunter/archive/v0.23.260.tar.gz" + SHA1 "13775235910a3fa85644568d1c5be8271de72e1c" +) option(USE_BUNDLED_BOOST "Use the bundled version of Boost." ${HUNTER_ENABLED}) option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog." @@ -328,7 +327,7 @@ find_package(Boost 1.70 REQUIRED if(USE_BUNDLED_OPENSSL) hunter_add_package(OpenSSL) endif() -find_package(OpenSSL REQUIRED) +find_package(OpenSSL 1.1.0 REQUIRED) if(USE_BUNDLED_MTXCLIENT) include(FetchContent) set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "") @@ -336,7 +335,7 @@ if(USE_BUNDLED_MTXCLIENT) FetchContent_Declare( MatrixClient GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git - GIT_TAG 68e043e1bf515e9072235151f74f7aac0838a9d3 + GIT_TAG eddd95a896fad0c51fc800741d82bbc43fc6d41e ) FetchContent_MakeAvailable(MatrixClient) else() diff --git a/cmake/Hunter/config.cmake b/cmake/Hunter/config.cmake index d2f87774..7c53e0ea 100644 --- a/cmake/Hunter/config.cmake +++ b/cmake/Hunter/config.cmake @@ -1,5 +1,5 @@ hunter_config( Boost - VERSION "1.70.0-p0" + VERSION "1.70.0-p1" CMAKE_ARGS IOSTREAMS_NO_BZIP2=1 ) diff --git a/cmake/HunterGate.cmake b/cmake/HunterGate.cmake index e78d3e89..6d9cc240 100644 --- a/cmake/HunterGate.cmake +++ b/cmake/HunterGate.cmake @@ -133,10 +133,14 @@ function(hunter_gate_self root version sha1 result) string(SUBSTRING "${sha1}" 0 7 archive_id) - set( - hunter_self - "${root}/_Base/Download/Hunter/${version}/${archive_id}/Unpacked" - ) + if(EXISTS "${root}/cmake/Hunter") + set(hunter_self "${root}") + else() + set( + hunter_self + "${root}/_Base/Download/Hunter/${version}/${archive_id}/Unpacked" + ) + endif() set("${result}" "${hunter_self}" PARENT_SCOPE) endfunction() @@ -490,37 +494,44 @@ macro(HunterGate) ) set(_master_location "${_hunter_self}/cmake/Hunter") - get_filename_component(_archive_id_location "${_hunter_self}/.." ABSOLUTE) - set(_done_location "${_archive_id_location}/DONE") - set(_sha1_location "${_archive_id_location}/SHA1") - - # Check Hunter already downloaded by HunterGate - if(NOT EXISTS "${_done_location}") - hunter_gate_download("${_archive_id_location}") - endif() + if(EXISTS "${HUNTER_GATE_ROOT}/cmake/Hunter") + # Hunter downloaded manually (e.g. by 'git clone') + set(_unused "xxxxxxxxxx") + set(HUNTER_GATE_SHA1 "${_unused}") + set(HUNTER_GATE_VERSION "${_unused}") + else() + get_filename_component(_archive_id_location "${_hunter_self}/.." ABSOLUTE) + set(_done_location "${_archive_id_location}/DONE") + set(_sha1_location "${_archive_id_location}/SHA1") + + # Check Hunter already downloaded by HunterGate + if(NOT EXISTS "${_done_location}") + hunter_gate_download("${_archive_id_location}") + endif() - if(NOT EXISTS "${_done_location}") - hunter_gate_internal_error("hunter_gate_download failed") - endif() + if(NOT EXISTS "${_done_location}") + hunter_gate_internal_error("hunter_gate_download failed") + endif() - if(NOT EXISTS "${_sha1_location}") - hunter_gate_internal_error("${_sha1_location} not found") - endif() - file(READ "${_sha1_location}" _sha1_value) - string(COMPARE EQUAL "${_sha1_value}" "${HUNTER_GATE_SHA1}" _is_equal) - if(NOT _is_equal) - hunter_gate_internal_error( - "Short SHA1 collision:" - " ${_sha1_value} (from ${_sha1_location})" - " ${HUNTER_GATE_SHA1} (HunterGate)" - ) - endif() - if(NOT EXISTS "${_master_location}") - hunter_gate_user_error( - "Master file not found:" - " ${_master_location}" - "try to update Hunter/HunterGate" - ) + if(NOT EXISTS "${_sha1_location}") + hunter_gate_internal_error("${_sha1_location} not found") + endif() + file(READ "${_sha1_location}" _sha1_value) + string(COMPARE EQUAL "${_sha1_value}" "${HUNTER_GATE_SHA1}" _is_equal) + if(NOT _is_equal) + hunter_gate_internal_error( + "Short SHA1 collision:" + " ${_sha1_value} (from ${_sha1_location})" + " ${HUNTER_GATE_SHA1} (HunterGate)" + ) + endif() + if(NOT EXISTS "${_master_location}") + hunter_gate_user_error( + "Master file not found:" + " ${_master_location}" + "try to update Hunter/HunterGate" + ) + endif() endif() include("${_master_location}") set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES) diff --git a/io.github.NhekoReborn.Nheko.json b/io.github.NhekoReborn.Nheko.json index 898d5003..8e4dbbe6 100644 --- a/io.github.NhekoReborn.Nheko.json +++ b/io.github.NhekoReborn.Nheko.json @@ -146,9 +146,9 @@ "name": "mtxclient", "sources": [ { - "sha256": "e4899cc4ce87397de2aef865e94ea2cdb8d9cb86253727e7d90532b925ecc770", + "sha256": "6334bb71821a0fde54fe24f02ad393cdb6836633557ffdd239b29c5d5108daaf", "type": "archive", - "url": "https://github.com/Nheko-Reborn/mtxclient/archive/v0.3.1.tar.gz" + "url": "https://github.com/Nheko-Reborn/mtxclient/archive/eddd95a896fad0c51fc800741d82bbc43fc6d41e.tar.gz" } ] },