Skip to content

Commit

Permalink
Merge branch 'release/v5.6.0' into 'master'
Browse files Browse the repository at this point in the history
Release v5.6.0

See merge request megachat/MEGAchat!1967
  • Loading branch information
JoseManuelOtero committed Jul 23, 2024
2 parents 93e1d60 + f502884 commit beee28d
Show file tree
Hide file tree
Showing 20 changed files with 200 additions and 220 deletions.
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,6 @@ UseCRLF: false
UseTab: Never
#WhitespaceSensitiveMacros:
...
---
Language: ObjC
DisableFormat: true
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b19c68..bb5fba9 100644
index a54c2ff..3b83a7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -839,7 +839,8 @@ endif()
@@ -852,11 +852,8 @@ endif()
# Check for idn2
option(USE_LIBIDN2 "Use libidn2 for IDN support" ON)
if(USE_LIBIDN2)
- check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2)
- check_library_exists("idn2" "idn2_lookup_ul" "" HAVE_LIBIDN2)
- if(HAVE_LIBIDN2)
- set(CURL_LIBS "idn2;${CURL_LIBS}")
- check_include_file_concat("idn2.h" HAVE_IDN2_H)
- endif()
+ set(HAVE_LIBIDN2 TRUE)
+ list(INSERT CURL_LIBS 0 ${LIBIDN2_LINK_LIBRARIES})
else()
Expand Down
24 changes: 12 additions & 12 deletions contrib/cmake/vcpkg_overlay_ports/curl/0020-fix-pc-file.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb5fba9..9919fd3 100644
index 3b83a7f..0ceaf5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1624,7 +1624,9 @@ set(includedir "\${prefix}/include")
set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
set(LIBCURL_LIBS "")
set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
-foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS})
+set(CURL_LIBS_FLAT "")
+vcpkg_curl_flatten(CURL_LIBS CURL_LIBS_FLAT)
+foreach(_lib ${CURL_LIBS_FLAT})
if(TARGET "${_lib}")
set(_libname "${_lib}")
get_target_property(_imported "${_libname}" IMPORTED)
@@ -1652,7 +1652,9 @@ if(NOT CURL_DISABLE_INSTALL)
set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
set(LIBCURL_LIBS "")
set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
- foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS})
+ set(CURL_LIBS_FLAT "")
+ vcpkg_curl_flatten(CURL_LIBS CURL_LIBS_FLAT)
+ foreach(_lib ${CURL_LIBS_FLAT})
if(TARGET "${_lib}")
set(_libname "${_lib}")
get_target_property(_imported "${_libname}" IMPORTED)
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9919fd3..7e513f6 100644
index 0ceaf5b..ec714a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1654,6 +1654,7 @@ if(BUILD_SHARED_LIBS)
else()
set(ENABLE_SHARED "no")
set(LIBCURL_NO_SHARED "${LIBCURL_LIBS}")
+ set(LIBCURL_LIBS "")
set(CPPFLAG_CURL_STATICLIB "-DCURL_STATICLIB")
endif()
if(BUILD_STATIC_LIBS)
@@ -1682,6 +1682,7 @@ if(NOT CURL_DISABLE_INSTALL)
else()
set(ENABLE_SHARED "no")
set(LIBCURL_NO_SHARED "${LIBCURL_LIBS}")
+ set(LIBCURL_LIBS "")
set(CPPFLAG_CURL_STATICLIB "-DCURL_STATICLIB")
endif()
if(BUILD_STATIC_LIBS)
11 changes: 5 additions & 6 deletions contrib/cmake/vcpkg_overlay_ports/curl/cmake-config.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
diff --git a/CMake/curl-config.cmake.in b/CMake/curl-config.cmake.in
index c89c686..2f39949 100644
index a013adf..2f39949 100644
--- a/CMake/curl-config.cmake.in
+++ b/CMake/curl-config.cmake.in
@@ -45,4 +45,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
check_required_components("@PROJECT_NAME@")
@@ -46,5 +46,6 @@ check_required_components("@PROJECT_NAME@")

# Alias for either shared or static library
-add_library(@PROJECT_NAME@::libcurl ALIAS @PROJECT_NAME@::@LIB_SELECTED@)
+if(NOT TARGET @PROJECT_NAME@::libcurl)
if(NOT TARGET @PROJECT_NAME@::libcurl)
- add_library(@PROJECT_NAME@::libcurl ALIAS @PROJECT_NAME@::@LIB_SELECTED@)
+ add_library(@PROJECT_NAME@::libcurl INTERFACE IMPORTED)
+ set_target_properties(@PROJECT_NAME@::libcurl PROPERTIES INTERFACE_LINK_LIBRARIES @PROJECT_NAME@::@LIB_SELECTED@)
+endif()
endif()
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
if(ANDROID AND ANDROID_NATIVE_API_LEVEL LESS 24)
# https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
set(HAVE_FILE_OFFSET_BITS FALSE CACHE INTERNAL "")
endif()

# Process the libs and targets in the variable named by `input`
# into a flat list of libs in the variable named by `output`.
# Simplify -framework elements.
Expand Down
37 changes: 19 additions & 18 deletions contrib/cmake/vcpkg_overlay_ports/curl/export-components.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e513f6..049ac34 100644
index ec714a5..478527e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1727,8 +1727,17 @@ if(CURL_ENABLE_EXPORT_TARGET)
)
endif()
@@ -1754,9 +1754,18 @@ if(NOT CURL_DISABLE_INSTALL)
DESTINATION ${CURL_INSTALL_CMAKE_DIR}
)
endif()
+
+ set(components_file "${CMAKE_CURRENT_BINARY_DIR}/CURLConfigComponents.cmake")
+ file(CONFIGURE OUTPUT "${components_file}" CONTENT [[
+ foreach(z_vcpkg_curl_component IN ITEMS @SUPPORT_FEATURES@ @SUPPORT_PROTOCOLS@)
+ if(z_vcpkg_curl_component MATCHES "^[-_a-zA-Z0-9]*$")
+ set(CURL_${z_vcpkg_curl_component}_FOUND TRUE)
+ endif()
+ endforeach()
+ ]] @ONLY)

+set(components_file "${CMAKE_CURRENT_BINARY_DIR}/CURLConfigComponents.cmake")
+file(CONFIGURE OUTPUT "${components_file}" CONTENT [[
+foreach(z_vcpkg_curl_component IN ITEMS @SUPPORT_FEATURES@ @SUPPORT_PROTOCOLS@)
+ if(z_vcpkg_curl_component MATCHES "^[-_a-zA-Z0-9]*$")
+ set(CURL_${z_vcpkg_curl_component}_FOUND TRUE)
+ endif()
+endforeach()
+]] @ONLY)
+
install(
- FILES ${version_config} ${project_config}
+ FILES ${version_config} ${project_config} ${components_file}
DESTINATION ${CURL_INSTALL_CMAKE_DIR}
)
install(
- FILES ${version_config} ${project_config}
+ FILES ${version_config} ${project_config} ${components_file}
DESTINATION ${CURL_INSTALL_CMAKE_DIR}
)

4 changes: 2 additions & 2 deletions contrib/cmake/vcpkg_overlay_ports/curl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO curl/curl
REF "${curl_version}"
SHA512 c8550fef49e2f1571f7392a351e10bbdb23821069db1e988094fe27fe0a881a265ba69a2cd34462e630563d153462a975ef70472ba39adaad1c5e5ab45cf7f4f
SHA512 ee9f6c3b5468ab547fc20822c18756a625f9f741e3d40958548a56b607f567f4ed782b8cce2d900c442e0da51faa8cb1fefa5d9f2d1581c79805a5b8fd4ec098
HEAD_REF master
PATCHES
0002_fix_uwp.patch
Expand All @@ -14,7 +14,7 @@ vcpkg_from_github(
mbedtls-ws2_32.patch
export-components.patch
dependencies.patch
cmake-config.patch # https://github.com/curl/curl/pull/11913
cmake-config.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion contrib/cmake/vcpkg_overlay_ports/curl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "curl",
"version": "8.4.0",
"version": "8.6.0",
"description": "A library for transferring data with URLs",
"homepage": "https://curl.se/",
"license": "curl AND ISC AND BSD-3-Clause",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ index fb810a8..2258ade 100644
if (NOT LIBUV_FOUND)
find_path(LIBUV_INCLUDE_DIRS NAMES uv.h)
- find_library(LIBUV_LIBRARIES NAMES uv)
+ find_library(LIBUV_LIBRARIES NAMES uv libuv)
+ find_library(LIBUV_LIBRARIES NAMES uv uv_a libuv libuv_a)
endif()
else()
set(LIBUV_LIBRARIES ${LWS_LIBUV_LIBRARIES})
44 changes: 2 additions & 42 deletions jenkinsfile/Jenkinsfile_MR_crossAndroid
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ pipeline {
}
environment {
BUILD_OPTIONS = ' '
APIURL_TO_TEST = ' '
PIPELINE_NAME = 'Android build'
}
stages {
Expand Down Expand Up @@ -79,19 +78,14 @@ pipeline {
}
}
stage('Get SDK branch'){
when {
expression {
env.gitlabMergeRequestDescription.contains('SDK_BRANCH_TO_TEST')
}
}
steps {
script{
env.SDK_BRANCH = sh(script: 'echo "$gitlabMergeRequestDescription" | grep SDK_BRANCH_TO_TEST | awk -F "SDK_BRANCH_TO_TEST=" \'{print \$2}\' | cut -d" " -f1', returnStdout: true).trim()
if (SDK_BRANCH == ""){
echo "SDK_BRANCH was not found on description so develop will be used by default"
env.SDK_BRANCH = 'develop'
}
println SDK_BRANCH
echo "SDK_branch: ${env.SDK_BRANCH}"
}
}
post{
Expand All @@ -107,19 +101,14 @@ pipeline {
}
}
stage('Get Android branch'){
when {
expression {
env.gitlabMergeRequestDescription.contains('ANDROID_BRANCH_TO_TEST')
}
}
steps {
script{
env.ANDROID_BRANCH = sh(script: 'echo "$gitlabMergeRequestDescription" | grep ANDROID_BRANCH_TO_TEST | awk -F "ANDROID_BRANCH_TO_TEST=" \'{print \$2}\' | cut -d" " -f1', returnStdout: true).trim()
if (ANDROID_BRANCH == ""){
echo "ANDROID_BRANCH was not found on description so develop will be used by default"
env.ANDROID_BRANCH = 'develop'
}
println ANDROID_BRANCH
echo "Android_branch: ${env.ANDROID_BRANCH}"
}
}
post{
Expand All @@ -134,35 +123,6 @@ pipeline {
}
}
}
stage('Get API URL'){
when {
expression {
env.gitlabMergeRequestDescription.contains('USE_APIURL_TO_TEST')
}
}
steps {
script{
APIURL_TO_TEST = sh(script: 'echo "$gitlabMergeRequestDescription" | grep USE_APIURL_TO_TEST | awk -F "USE_APIURL_TO_TEST=" \'{print \$2}\' | cut -d" " -f1', returnStdout: true).trim()
println APIURL_TO_TEST
if (APIURL_TO_TEST == ""){
APIURL_TO_TEST = "https://g.api.mega.co.nz/"
echo "APIURL_TO_TEST was not found on description so ${APIURL_TO_TEST} will be used by default"
}
echo "APIURL_TO_TEST will be ${APIURL_TO_TEST}"
}
}
post{
failure {
setCommitStatus('failure', 'Failure when getting API URL. Is `APIURL_TO_TEST` variable well defined?')
}
aborted {
setCommitStatus('aborted')
}
unstable {
setCommitStatus('unstable')
}
}
}
stage('Checkout SDK MEGAchat and Android'){
when {
anyOf {
Expand Down
43 changes: 4 additions & 39 deletions jenkinsfile/Jenkinsfile_MR_crossiOS
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ pipeline {
}
environment {
BUILD_OPTIONS = ' '
APIURL_TO_TEST = ' '
PIPELINE_NAME = 'iOS Build'
}
stages {
Expand Down Expand Up @@ -83,18 +82,14 @@ pipeline {
}
}
stage('Get SDK branch'){
when {
expression {
env.gitlabMergeRequestDescription.contains('SDK_BRANCH_TO_TEST')
}
}
steps {
script{
env.SDK_BRANCH = sh(script: 'echo "$gitlabMergeRequestDescription" | grep SDK_BRANCH_TO_TEST | awk -F "SDK_BRANCH_TO_TEST=" \'{print \$2}\' | cut -d" " -f1', returnStdout: true).trim()
println SDK_BRANCH
if (SDK_BRANCH == ""){
echo "SDK_BRANCH was not found on description so develop will be used by default"
env.SDK_BRANCH = "develop"
}
echo "SDK_branch: ${env.SDK_BRANCH}"
}
}
post{
Expand All @@ -107,18 +102,14 @@ pipeline {
}
}
stage('Get iOS branch'){
when {
expression {
env.gitlabMergeRequestDescription.contains('IOS_BRANCH_TO_TEST')
}
}
steps {
script{
env.IOS_BRANCH = sh(script: 'echo "$gitlabMergeRequestDescription" | grep IOS_BRANCH_TO_TEST | awk -F "IOS_BRANCH_TO_TEST=" \'{print \$2}\' | cut -d" " -f1', returnStdout: true).trim()
println IOS_BRANCH
if (IOS_BRANCH == ""){
echo "IOS_BRANCH was not found on description so develop will be used by default"
env.IOS_BRANCH = "develop"
}
echo "iOS_branch: ${env.IOS_BRANCH}"
}
}
post{
Expand All @@ -130,32 +121,6 @@ pipeline {
}
}
}
stage('Get API URL'){
when {
expression {
env.gitlabMergeRequestDescription.contains('USE_APIURL_TO_TEST')
}
}
steps {
script{
APIURL_TO_TEST = sh(script: 'echo "$gitlabMergeRequestDescription" | grep USE_APIURL_TO_TEST | awk -F "USE_APIURL_TO_TEST=" \'{print \$2}\' | cut -d" " -f1', returnStdout: true).trim()
println APIURL_TO_TEST
if (APIURL_TO_TEST == ""){
APIURL_TO_TEST = "https://g.api.mega.co.nz/"
echo "APIURL_TO_TEST was not found on description so ${APIURL_TO_TEST} will be used by default"
}
echo "APIURL_TO_TEST will be ${APIURL_TO_TEST}"
}
}
post{
failure {
setCommitStatus('failure', 'Failure when getting API URL. Is `APIURL_TO_TEST` variable well defined?')
}
aborted {
setCommitStatus('aborted')
}
}
}
stage('Checkout SDK MEGAchat and iOS'){
steps {
deleteDir()
Expand Down
15 changes: 3 additions & 12 deletions jenkinsfile/Jenkinsfile_MR_linux_cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,15 @@ pipeline {
}
}
stage('Get SDK branch'){
when {
expression {
env.gitlabMergeRequestDescription.contains('SDK_BRANCH_TO_TEST')
}
}
steps {
script{
env.SDK_BRANCH = sh(script: 'echo "$gitlabMergeRequestDescription" | grep SDK_BRANCH_TO_TEST | awk -F "SDK_BRANCH_TO_TEST=" \'{print \$2}\' | cut -d" " -f1', returnStdout: true).trim()
println SDK_BRANCH
if (SDK_BRANCH == ""){
echo "SDK_BRANCH was not found on description so develop will be used by default"
env.SDK_BRANCH = "develop"
}
echo "SDK_branch: ${env.SDK_BRANCH}"
}
}
post{
Expand All @@ -109,20 +106,14 @@ pipeline {
}
}
stage('Get API URL'){
when {
expression {
env.gitlabMergeRequestDescription.contains('USE_APIURL_TO_TEST')
}
}
steps {
script{
APIURL_TO_TEST = sh(script: 'echo "$gitlabMergeRequestDescription" | grep USE_APIURL_TO_TEST | awk -F "USE_APIURL_TO_TEST=" \'{print \$2}\' | cut -d" " -f1', returnStdout: true).trim()
println APIURL_TO_TEST
if (APIURL_TO_TEST == ""){
APIURL_TO_TEST = "https://g.api.mega.co.nz/"
echo "APIURL_TO_TEST was not found on description so ${APIURL_TO_TEST} will be used by default"
}
echo "APIURL_TO_TEST will be ${APIURL_TO_TEST}"
echo "APIURL_TO_TEST: ${APIURL_TO_TEST}"
}
}
post{
Expand Down
Loading

0 comments on commit beee28d

Please sign in to comment.