From b65ece22b75a15def0fad05d52a5135cb957a1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 23 Aug 2024 12:31:53 +0800 Subject: [PATCH 01/17] feature: add aliyun-oss-cpp-sdk --- ports/aliyun-oss-cpp-sdk/portfile.cmake | 21 ++++++++++++++ ports/aliyun-oss-cpp-sdk/usage | 4 +++ .../vcpkg-cmake-wrapper.cmake | 28 +++++++++++++++++++ ports/aliyun-oss-cpp-sdk/vcpkg.json | 16 +++++++++++ 4 files changed, 69 insertions(+) create mode 100644 ports/aliyun-oss-cpp-sdk/portfile.cmake create mode 100644 ports/aliyun-oss-cpp-sdk/usage create mode 100644 ports/aliyun-oss-cpp-sdk/vcpkg-cmake-wrapper.cmake create mode 100644 ports/aliyun-oss-cpp-sdk/vcpkg.json diff --git a/ports/aliyun-oss-cpp-sdk/portfile.cmake b/ports/aliyun-oss-cpp-sdk/portfile.cmake new file mode 100644 index 00000000000000..70c907916fa283 --- /dev/null +++ b/ports/aliyun-oss-cpp-sdk/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aliyun/aliyun-oss-cpp-sdk + REF ${VERSION} + SHA512 7773961ad380d28cda96e16ae6491a76e03f0cb5f0c5135b660179dd449d730e1dfffb916489ed60e13815f53566c24cd9cfd8985c468438369341358eeed3bd + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} + -DBUILD_SAMPLE=OFF +) + +vcpkg_cmake_install() + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/aliyun-oss-cpp-sdk/usage b/ports/aliyun-oss-cpp-sdk/usage new file mode 100644 index 00000000000000..eca49456934679 --- /dev/null +++ b/ports/aliyun-oss-cpp-sdk/usage @@ -0,0 +1,4 @@ +The package aliyun-oss-cpp-sdk provides CMake targets: + + find_package(aliyun-oss-cpp-sdk CONFIG REQUIRED) + target_link_libraries(main PRIVATE aliyun-oss-cpp-sdk) diff --git a/ports/aliyun-oss-cpp-sdk/vcpkg-cmake-wrapper.cmake b/ports/aliyun-oss-cpp-sdk/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..2d90e1403e8230 --- /dev/null +++ b/ports/aliyun-oss-cpp-sdk/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,28 @@ +find_path(ALIYUN_OSS_CPP_SDK_INCLUDE_DIR NAMES alibabacloud/oss/OssClient.h PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" NO_DEFAULT_PATH) +find_library(ALIYUN_OSS_CPP_SDK_LIBRARY_RELEASE NAMES alibabacloud-oss-cpp-sdk PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH) +find_library(ALIYUN_OSS_CPP_SDK_LIBRARY_DEBUG NAMES alibabacloud-oss-cpp-sdk PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH) +if(NOT ALIYUN_OSS_CPP_SDK_INCLUDE_DIR OR NOT (ALIYUN_OSS_CPP_SDK_LIBRARY_RELEASE OR ALIYUN_OSS_CPP_SDK_LIBRARY_DEBUG)) + message(FATAL_ERROR "Broken installation of vcpkg port aliyun-oss-cpp-sdk") +endif() + +function (parse_header_single_define filename var regex) + set(__header_contents "") + if (EXISTS ${filename}) + file(STRINGS ${filename} __header_contents REGEX "#define[ \t]+${var}[ \t]+\".+\"") + endif () + if (__header_contents MATCHES "(${regex})") + set(${var} ${CMAKE_MATCH_1} PARENT_SCOPE) + else () + set(${var} "" PARENT_SCOPE) + endif () +endfunction () + +parse_header_single_define(${ALIYUN_OSS_CPP_SDK_INCLUDE_DIR}/alibabacloud/oss/Config.h ALIBABACLOUD_OSS_VERSION_STR "[0-9]+\\.[0-9]+\\.[0-9]+") + +add_library(aliyun-oss-cpp-sdk INTERFACE IMPORTED) + +set_target_properties(aliyun-oss-cpp-sdk PROPERTIES + INTERFACE_LINK_LIBRARIES "\$<\$>:${ALIYUN_OSS_CPP_SDK_LIBRARY_RELEASE}>;\$<\$:${ALIYUN_OSS_CPP_SDK_LIBRARY_DEBUG}>" + INTERFACE_INCLUDE_DIRECTORIES "${ALIYUN_OSS_CPP_SDK_INCLUDE_DIR}") + +set(aliyun-oss-cpp-sdk_VERSION "${ALIBABACLOUD_OSS_VERSION_STR}") diff --git a/ports/aliyun-oss-cpp-sdk/vcpkg.json b/ports/aliyun-oss-cpp-sdk/vcpkg.json new file mode 100644 index 00000000000000..47a373b0786766 --- /dev/null +++ b/ports/aliyun-oss-cpp-sdk/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "aliyun-oss-cpp-sdk", + "version": "1.10.0", + "description": "Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring massive capacity, security, a low cost, and high reliability.", + "homepage": "https://github.com/aliyun/aliyun-oss-cpp-sdk", + "license": "Apache-2.0", + "supports": "!(uwp | osx)", + "dependencies": [ + "curl", + "openssl", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} From 3cc64e9e74c9173a02d0e19ae6ca073af203ef3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 23 Aug 2024 12:33:50 +0800 Subject: [PATCH 02/17] feature: add aliyun-oss-cpp-sdk --- versions/a-/aliyun-oss-cpp-sdk.json | 9 +++++++++ versions/baseline.json | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 versions/a-/aliyun-oss-cpp-sdk.json diff --git a/versions/a-/aliyun-oss-cpp-sdk.json b/versions/a-/aliyun-oss-cpp-sdk.json new file mode 100644 index 00000000000000..b8c0720725fafd --- /dev/null +++ b/versions/a-/aliyun-oss-cpp-sdk.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "842af12c28f0bc80b566f0a88a996a90f1d0d218", + "version": "1.10.0", + "port-version": 0 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index dcfe5b80c79023..58054a2cf2562a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -80,6 +80,10 @@ "baseline": "3.10.1", "port-version": 0 }, + "aliyun-oss-cpp-sdk": { + "baseline": "1.10.0", + "port-version": 0 + }, "allegro5": { "baseline": "5.2.9.1", "port-version": 0 From 3b97297e94526e51b0440b1a0e5c035793e5d17b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 23 Aug 2024 14:58:37 +0800 Subject: [PATCH 03/17] feature: add aliyun-oss-cpp-sdk --- ...cpkg-cmake-wrapper.cmake => aliyun-oss-cpp-sdk-config.cmake} | 0 ports/aliyun-oss-cpp-sdk/portfile.cmake | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename ports/aliyun-oss-cpp-sdk/{vcpkg-cmake-wrapper.cmake => aliyun-oss-cpp-sdk-config.cmake} (100%) diff --git a/ports/aliyun-oss-cpp-sdk/vcpkg-cmake-wrapper.cmake b/ports/aliyun-oss-cpp-sdk/aliyun-oss-cpp-sdk-config.cmake similarity index 100% rename from ports/aliyun-oss-cpp-sdk/vcpkg-cmake-wrapper.cmake rename to ports/aliyun-oss-cpp-sdk/aliyun-oss-cpp-sdk-config.cmake diff --git a/ports/aliyun-oss-cpp-sdk/portfile.cmake b/ports/aliyun-oss-cpp-sdk/portfile.cmake index 70c907916fa283..3af3f26b14981b 100644 --- a/ports/aliyun-oss-cpp-sdk/portfile.cmake +++ b/ports/aliyun-oss-cpp-sdk/portfile.cmake @@ -14,7 +14,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() -file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/aliyun-oss-cpp-sdk-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") From d74f9de40e17977e15fbfa0b48476d9aaae160ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 23 Aug 2024 20:53:37 +0800 Subject: [PATCH 04/17] feature: add aliyun-oss-cpp-sdk --- ports/aliyun-oss-cpp-sdk/portfile.cmake | 2 +- ...onfig.cmake => unofficial-aliyun-oss-cpp-sdk-config.cmake} | 4 ++-- ports/aliyun-oss-cpp-sdk/usage | 4 ++-- ports/aliyun-oss-cpp-sdk/vcpkg.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename ports/aliyun-oss-cpp-sdk/{aliyun-oss-cpp-sdk-config.cmake => unofficial-aliyun-oss-cpp-sdk-config.cmake} (92%) diff --git a/ports/aliyun-oss-cpp-sdk/portfile.cmake b/ports/aliyun-oss-cpp-sdk/portfile.cmake index 3af3f26b14981b..795c0a14f6f94d 100644 --- a/ports/aliyun-oss-cpp-sdk/portfile.cmake +++ b/ports/aliyun-oss-cpp-sdk/portfile.cmake @@ -14,7 +14,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() -file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/aliyun-oss-cpp-sdk-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-${PORT}-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/aliyun-oss-cpp-sdk/aliyun-oss-cpp-sdk-config.cmake b/ports/aliyun-oss-cpp-sdk/unofficial-aliyun-oss-cpp-sdk-config.cmake similarity index 92% rename from ports/aliyun-oss-cpp-sdk/aliyun-oss-cpp-sdk-config.cmake rename to ports/aliyun-oss-cpp-sdk/unofficial-aliyun-oss-cpp-sdk-config.cmake index 2d90e1403e8230..930e34eabd17c1 100644 --- a/ports/aliyun-oss-cpp-sdk/aliyun-oss-cpp-sdk-config.cmake +++ b/ports/aliyun-oss-cpp-sdk/unofficial-aliyun-oss-cpp-sdk-config.cmake @@ -19,9 +19,9 @@ endfunction () parse_header_single_define(${ALIYUN_OSS_CPP_SDK_INCLUDE_DIR}/alibabacloud/oss/Config.h ALIBABACLOUD_OSS_VERSION_STR "[0-9]+\\.[0-9]+\\.[0-9]+") -add_library(aliyun-oss-cpp-sdk INTERFACE IMPORTED) +add_library(unofficial::aliyun-oss-cpp-sdk INTERFACE IMPORTED) -set_target_properties(aliyun-oss-cpp-sdk PROPERTIES +set_target_properties(unofficial::aliyun-oss-cpp-sdk PROPERTIES INTERFACE_LINK_LIBRARIES "\$<\$>:${ALIYUN_OSS_CPP_SDK_LIBRARY_RELEASE}>;\$<\$:${ALIYUN_OSS_CPP_SDK_LIBRARY_DEBUG}>" INTERFACE_INCLUDE_DIRECTORIES "${ALIYUN_OSS_CPP_SDK_INCLUDE_DIR}") diff --git a/ports/aliyun-oss-cpp-sdk/usage b/ports/aliyun-oss-cpp-sdk/usage index eca49456934679..40f05b5f72ec87 100644 --- a/ports/aliyun-oss-cpp-sdk/usage +++ b/ports/aliyun-oss-cpp-sdk/usage @@ -1,4 +1,4 @@ The package aliyun-oss-cpp-sdk provides CMake targets: - find_package(aliyun-oss-cpp-sdk CONFIG REQUIRED) - target_link_libraries(main PRIVATE aliyun-oss-cpp-sdk) + find_package(unofficial-aliyun-oss-cpp-sdk CONFIG REQUIRED) + target_link_libraries(main PRIVATE unofficial::aliyun-oss-cpp-sdk) diff --git a/ports/aliyun-oss-cpp-sdk/vcpkg.json b/ports/aliyun-oss-cpp-sdk/vcpkg.json index 47a373b0786766..dfbb18738c0cfe 100644 --- a/ports/aliyun-oss-cpp-sdk/vcpkg.json +++ b/ports/aliyun-oss-cpp-sdk/vcpkg.json @@ -4,7 +4,7 @@ "description": "Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring massive capacity, security, a low cost, and high reliability.", "homepage": "https://github.com/aliyun/aliyun-oss-cpp-sdk", "license": "Apache-2.0", - "supports": "!(uwp | osx)", + "supports": "!(uwp | osx | windows)", "dependencies": [ "curl", "openssl", From 3e6c9496fd213a943e141ce1d8ecc4eddc08f651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 23 Aug 2024 21:10:21 +0800 Subject: [PATCH 05/17] feature: add aliyun-oss-cpp-sdk --- ports/aliyun-oss-cpp-sdk/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/aliyun-oss-cpp-sdk/vcpkg.json b/ports/aliyun-oss-cpp-sdk/vcpkg.json index dfbb18738c0cfe..1b1aada025e559 100644 --- a/ports/aliyun-oss-cpp-sdk/vcpkg.json +++ b/ports/aliyun-oss-cpp-sdk/vcpkg.json @@ -4,7 +4,7 @@ "description": "Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring massive capacity, security, a low cost, and high reliability.", "homepage": "https://github.com/aliyun/aliyun-oss-cpp-sdk", "license": "Apache-2.0", - "supports": "!(uwp | osx | windows)", + "supports": "linux", "dependencies": [ "curl", "openssl", From 64ff7f4d2a6e0de52f50d1131b70a42f8b9d97e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 30 Aug 2024 16:31:18 +0800 Subject: [PATCH 06/17] feature: add aliyun-oss-cpp-sdk --- ports/aliyun-oss-cpp-sdk/cmake-export.patch | 40 +++++++++++++++++++ ports/aliyun-oss-cpp-sdk/portfile.cmake | 5 ++- ...unofficial-aliyun-oss-cpp-sdk-config.cmake | 28 ------------- ports/aliyun-oss-cpp-sdk/usage | 4 -- ports/aliyun-oss-cpp-sdk/vcpkg.json | 4 ++ 5 files changed, 47 insertions(+), 34 deletions(-) create mode 100644 ports/aliyun-oss-cpp-sdk/cmake-export.patch delete mode 100644 ports/aliyun-oss-cpp-sdk/unofficial-aliyun-oss-cpp-sdk-config.cmake delete mode 100644 ports/aliyun-oss-cpp-sdk/usage diff --git a/ports/aliyun-oss-cpp-sdk/cmake-export.patch b/ports/aliyun-oss-cpp-sdk/cmake-export.patch new file mode 100644 index 00000000000000..8911e0a14482e1 --- /dev/null +++ b/ports/aliyun-oss-cpp-sdk/cmake-export.patch @@ -0,0 +1,40 @@ +diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt +index 28d04c2..a08f1df 100644 +--- a/sdk/CMakeLists.txt ++++ b/sdk/CMakeLists.txt +@@ -14,7 +14,7 @@ + # limitations under the License. + # + +-project(cpp-sdk VERSION ${version}) ++project(aliyun-oss-cpp-sdk VERSION ${version}) + + configure_file(src/Config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/include/alibabacloud/oss/Config.h @ONLY) + +@@ -210,16 +210,22 @@ install(FILES ${sdk_encryption_header} + install(FILES ${sdk_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/oss) + +-install(TARGETS ${PROJECT_NAME}${STATIC_LIB_SUFFIX} ++install(TARGETS ${PROJECT_NAME}${STATIC_LIB_SUFFIX} EXPORT unofficial-aliyun-oss-cpp-sdk-config + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) + + if (BUILD_SHARED_LIBS) +-install(TARGETS ${PROJECT_NAME} ++install(TARGETS ${PROJECT_NAME} EXPORT unofficial-aliyun-oss-cpp-sdk-config + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) +-endif() +\ No newline at end of file ++endif() ++ ++install( ++ EXPORT unofficial-aliyun-oss-cpp-sdk-config ++ NAMESPACE unofficial:: ++ DESTINATION share/unofficial-aliyun-oss-cpp-sdk ++) diff --git a/ports/aliyun-oss-cpp-sdk/portfile.cmake b/ports/aliyun-oss-cpp-sdk/portfile.cmake index 795c0a14f6f94d..bd5f4621cb1544 100644 --- a/ports/aliyun-oss-cpp-sdk/portfile.cmake +++ b/ports/aliyun-oss-cpp-sdk/portfile.cmake @@ -4,6 +4,8 @@ vcpkg_from_github( REF ${VERSION} SHA512 7773961ad380d28cda96e16ae6491a76e03f0cb5f0c5135b660179dd449d730e1dfffb916489ed60e13815f53566c24cd9cfd8985c468438369341358eeed3bd HEAD_REF master + PATCHES + cmake-export.patch ) vcpkg_cmake_configure( @@ -14,8 +16,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() -file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-${PORT}-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}") -file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT}) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/aliyun-oss-cpp-sdk/unofficial-aliyun-oss-cpp-sdk-config.cmake b/ports/aliyun-oss-cpp-sdk/unofficial-aliyun-oss-cpp-sdk-config.cmake deleted file mode 100644 index 930e34eabd17c1..00000000000000 --- a/ports/aliyun-oss-cpp-sdk/unofficial-aliyun-oss-cpp-sdk-config.cmake +++ /dev/null @@ -1,28 +0,0 @@ -find_path(ALIYUN_OSS_CPP_SDK_INCLUDE_DIR NAMES alibabacloud/oss/OssClient.h PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" NO_DEFAULT_PATH) -find_library(ALIYUN_OSS_CPP_SDK_LIBRARY_RELEASE NAMES alibabacloud-oss-cpp-sdk PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH) -find_library(ALIYUN_OSS_CPP_SDK_LIBRARY_DEBUG NAMES alibabacloud-oss-cpp-sdk PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH) -if(NOT ALIYUN_OSS_CPP_SDK_INCLUDE_DIR OR NOT (ALIYUN_OSS_CPP_SDK_LIBRARY_RELEASE OR ALIYUN_OSS_CPP_SDK_LIBRARY_DEBUG)) - message(FATAL_ERROR "Broken installation of vcpkg port aliyun-oss-cpp-sdk") -endif() - -function (parse_header_single_define filename var regex) - set(__header_contents "") - if (EXISTS ${filename}) - file(STRINGS ${filename} __header_contents REGEX "#define[ \t]+${var}[ \t]+\".+\"") - endif () - if (__header_contents MATCHES "(${regex})") - set(${var} ${CMAKE_MATCH_1} PARENT_SCOPE) - else () - set(${var} "" PARENT_SCOPE) - endif () -endfunction () - -parse_header_single_define(${ALIYUN_OSS_CPP_SDK_INCLUDE_DIR}/alibabacloud/oss/Config.h ALIBABACLOUD_OSS_VERSION_STR "[0-9]+\\.[0-9]+\\.[0-9]+") - -add_library(unofficial::aliyun-oss-cpp-sdk INTERFACE IMPORTED) - -set_target_properties(unofficial::aliyun-oss-cpp-sdk PROPERTIES - INTERFACE_LINK_LIBRARIES "\$<\$>:${ALIYUN_OSS_CPP_SDK_LIBRARY_RELEASE}>;\$<\$:${ALIYUN_OSS_CPP_SDK_LIBRARY_DEBUG}>" - INTERFACE_INCLUDE_DIRECTORIES "${ALIYUN_OSS_CPP_SDK_INCLUDE_DIR}") - -set(aliyun-oss-cpp-sdk_VERSION "${ALIBABACLOUD_OSS_VERSION_STR}") diff --git a/ports/aliyun-oss-cpp-sdk/usage b/ports/aliyun-oss-cpp-sdk/usage deleted file mode 100644 index 40f05b5f72ec87..00000000000000 --- a/ports/aliyun-oss-cpp-sdk/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package aliyun-oss-cpp-sdk provides CMake targets: - - find_package(unofficial-aliyun-oss-cpp-sdk CONFIG REQUIRED) - target_link_libraries(main PRIVATE unofficial::aliyun-oss-cpp-sdk) diff --git a/ports/aliyun-oss-cpp-sdk/vcpkg.json b/ports/aliyun-oss-cpp-sdk/vcpkg.json index 1b1aada025e559..a4cfee1d5783c0 100644 --- a/ports/aliyun-oss-cpp-sdk/vcpkg.json +++ b/ports/aliyun-oss-cpp-sdk/vcpkg.json @@ -11,6 +11,10 @@ { "name": "vcpkg-cmake", "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } ] } From 5c0515993b6387055af4298a92da05f5b4f2cc37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 30 Aug 2024 16:33:06 +0800 Subject: [PATCH 07/17] feature: add aliyun-oss-cpp-sdk --- versions/a-/aliyun-oss-cpp-sdk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/a-/aliyun-oss-cpp-sdk.json b/versions/a-/aliyun-oss-cpp-sdk.json index b8c0720725fafd..5f238ce1db8f97 100644 --- a/versions/a-/aliyun-oss-cpp-sdk.json +++ b/versions/a-/aliyun-oss-cpp-sdk.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "842af12c28f0bc80b566f0a88a996a90f1d0d218", + "git-tree": "fb9256197bba096566dc1ddeb2cf18667a809c6d", "version": "1.10.0", "port-version": 0 } From b0cb076a4437ad83e0defb565791aa546f70187f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 30 Aug 2024 17:02:02 +0800 Subject: [PATCH 08/17] feature: add aliyun-oss-cpp-sdk --- ports/aliyun-oss-cpp-sdk/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/aliyun-oss-cpp-sdk/portfile.cmake b/ports/aliyun-oss-cpp-sdk/portfile.cmake index bd5f4621cb1544..5815497f66c2dc 100644 --- a/ports/aliyun-oss-cpp-sdk/portfile.cmake +++ b/ports/aliyun-oss-cpp-sdk/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} -DBUILD_SAMPLE=OFF + -DTARGET_OUTPUT_NAME_PREFIX=\"\" ) vcpkg_cmake_install() From 6ddb96ea23048296bc2e46eb98dddb555136715d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 30 Aug 2024 17:02:31 +0800 Subject: [PATCH 09/17] feature: add aliyun-oss-cpp-sdk --- versions/a-/aliyun-oss-cpp-sdk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/a-/aliyun-oss-cpp-sdk.json b/versions/a-/aliyun-oss-cpp-sdk.json index 5f238ce1db8f97..48ab194fef6f98 100644 --- a/versions/a-/aliyun-oss-cpp-sdk.json +++ b/versions/a-/aliyun-oss-cpp-sdk.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "fb9256197bba096566dc1ddeb2cf18667a809c6d", + "git-tree": "347501c5e6db055787e1642ba49427c2ae5e4a4b", "version": "1.10.0", "port-version": 0 } From 8280145803124a89ec80ca12fdb89be7784e1ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 30 Aug 2024 17:14:01 +0800 Subject: [PATCH 10/17] feature: add aliyun-oss-cpp-sdk --- ports/aliyun-oss-cpp-sdk/cmake-export.patch | 13 ++----------- ports/aliyun-oss-cpp-sdk/portfile.cmake | 6 +++--- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/ports/aliyun-oss-cpp-sdk/cmake-export.patch b/ports/aliyun-oss-cpp-sdk/cmake-export.patch index 8911e0a14482e1..58414b77283135 100644 --- a/ports/aliyun-oss-cpp-sdk/cmake-export.patch +++ b/ports/aliyun-oss-cpp-sdk/cmake-export.patch @@ -1,16 +1,7 @@ diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt -index 28d04c2..a08f1df 100644 +index 28d04c2..41ec7a0 100644 --- a/sdk/CMakeLists.txt +++ b/sdk/CMakeLists.txt -@@ -14,7 +14,7 @@ - # limitations under the License. - # - --project(cpp-sdk VERSION ${version}) -+project(aliyun-oss-cpp-sdk VERSION ${version}) - - configure_file(src/Config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/include/alibabacloud/oss/Config.h @ONLY) - @@ -210,16 +210,22 @@ install(FILES ${sdk_encryption_header} install(FILES ${sdk_public_header} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/oss) @@ -35,6 +26,6 @@ index 28d04c2..a08f1df 100644 + +install( + EXPORT unofficial-aliyun-oss-cpp-sdk-config -+ NAMESPACE unofficial:: ++ NAMESPACE unofficial::${TARGET_OUTPUT_NAME_PREFIX} + DESTINATION share/unofficial-aliyun-oss-cpp-sdk +) diff --git a/ports/aliyun-oss-cpp-sdk/portfile.cmake b/ports/aliyun-oss-cpp-sdk/portfile.cmake index 5815497f66c2dc..fb6c15d64d5888 100644 --- a/ports/aliyun-oss-cpp-sdk/portfile.cmake +++ b/ports/aliyun-oss-cpp-sdk/portfile.cmake @@ -1,7 +1,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aliyun/aliyun-oss-cpp-sdk - REF ${VERSION} + REF "${VERSION}" SHA512 7773961ad380d28cda96e16ae6491a76e03f0cb5f0c5135b660179dd449d730e1dfffb916489ed60e13815f53566c24cd9cfd8985c468438369341358eeed3bd HEAD_REF master PATCHES @@ -10,9 +10,9 @@ vcpkg_from_github( vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" - OPTIONS ${FEATURE_OPTIONS} + OPTIONS -DBUILD_SAMPLE=OFF - -DTARGET_OUTPUT_NAME_PREFIX=\"\" + -DTARGET_OUTPUT_NAME_PREFIX=\"aliyun-oss-\" ) vcpkg_cmake_install() From 7190f6e4d44ac921591505bf9abdeacdebd01fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 30 Aug 2024 17:14:21 +0800 Subject: [PATCH 11/17] feature: add aliyun-oss-cpp-sdk --- versions/a-/aliyun-oss-cpp-sdk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/a-/aliyun-oss-cpp-sdk.json b/versions/a-/aliyun-oss-cpp-sdk.json index 48ab194fef6f98..7393993e956b5b 100644 --- a/versions/a-/aliyun-oss-cpp-sdk.json +++ b/versions/a-/aliyun-oss-cpp-sdk.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "347501c5e6db055787e1642ba49427c2ae5e4a4b", + "git-tree": "a757b7848a9988cf8355858ce42f4b0443dd96f9", "version": "1.10.0", "port-version": 0 } From dc8a262b94eedc7cb4a9094faed267070dba95fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 30 Aug 2024 19:31:42 +0800 Subject: [PATCH 12/17] feature: add aliyun-oss-cpp-sdk --- ports/aliyun-oss-cpp-sdk/cmake-export.patch | 4 ++-- ports/aliyun-oss-cpp-sdk/portfile.cmake | 3 ++- ports/aliyun-oss-cpp-sdk/usage | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 ports/aliyun-oss-cpp-sdk/usage diff --git a/ports/aliyun-oss-cpp-sdk/cmake-export.patch b/ports/aliyun-oss-cpp-sdk/cmake-export.patch index 58414b77283135..6c765c4c445bd4 100644 --- a/ports/aliyun-oss-cpp-sdk/cmake-export.patch +++ b/ports/aliyun-oss-cpp-sdk/cmake-export.patch @@ -1,5 +1,5 @@ diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt -index 28d04c2..41ec7a0 100644 +index 28d04c2..d547557 100644 --- a/sdk/CMakeLists.txt +++ b/sdk/CMakeLists.txt @@ -210,16 +210,22 @@ install(FILES ${sdk_encryption_header} @@ -26,6 +26,6 @@ index 28d04c2..41ec7a0 100644 + +install( + EXPORT unofficial-aliyun-oss-cpp-sdk-config -+ NAMESPACE unofficial::${TARGET_OUTPUT_NAME_PREFIX} ++ NAMESPACE unofficial::aliyun-oss-cpp-sdk:: + DESTINATION share/unofficial-aliyun-oss-cpp-sdk +) diff --git a/ports/aliyun-oss-cpp-sdk/portfile.cmake b/ports/aliyun-oss-cpp-sdk/portfile.cmake index fb6c15d64d5888..39a6f0c26ad1dd 100644 --- a/ports/aliyun-oss-cpp-sdk/portfile.cmake +++ b/ports/aliyun-oss-cpp-sdk/portfile.cmake @@ -12,12 +12,13 @@ vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DBUILD_SAMPLE=OFF - -DTARGET_OUTPUT_NAME_PREFIX=\"aliyun-oss-\" ) vcpkg_cmake_install() vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT}) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/aliyun-oss-cpp-sdk/usage b/ports/aliyun-oss-cpp-sdk/usage new file mode 100644 index 00000000000000..40f05b5f72ec87 --- /dev/null +++ b/ports/aliyun-oss-cpp-sdk/usage @@ -0,0 +1,4 @@ +The package aliyun-oss-cpp-sdk provides CMake targets: + + find_package(unofficial-aliyun-oss-cpp-sdk CONFIG REQUIRED) + target_link_libraries(main PRIVATE unofficial::aliyun-oss-cpp-sdk) From e5cadebd8dec084794ff4875843ad17cae2d32c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Fri, 30 Aug 2024 19:33:03 +0800 Subject: [PATCH 13/17] feature: add aliyun-oss-cpp-sdk --- versions/a-/aliyun-oss-cpp-sdk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/a-/aliyun-oss-cpp-sdk.json b/versions/a-/aliyun-oss-cpp-sdk.json index 7393993e956b5b..6ca14228dca1b8 100644 --- a/versions/a-/aliyun-oss-cpp-sdk.json +++ b/versions/a-/aliyun-oss-cpp-sdk.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a757b7848a9988cf8355858ce42f4b0443dd96f9", + "git-tree": "2c7c3efbc1f22525ac7cb14098698f271645afbd", "version": "1.10.0", "port-version": 0 } From 9606251761752e0608c36344eb8e37234543d5ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Tue, 10 Sep 2024 19:57:41 +0800 Subject: [PATCH 14/17] fix: fix public include directory --- ports/aliyun-oss-cpp-sdk/cmake-export.patch | 31 +++++++++++++++++++-- ports/aliyun-oss-cpp-sdk/usage | 2 +- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/ports/aliyun-oss-cpp-sdk/cmake-export.patch b/ports/aliyun-oss-cpp-sdk/cmake-export.patch index 6c765c4c445bd4..de53694159f1b9 100644 --- a/ports/aliyun-oss-cpp-sdk/cmake-export.patch +++ b/ports/aliyun-oss-cpp-sdk/cmake-export.patch @@ -1,8 +1,35 @@ diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt -index 28d04c2..d547557 100644 +index 28d04c2..c7b2e6c 100644 --- a/sdk/CMakeLists.txt +++ b/sdk/CMakeLists.txt -@@ -210,16 +210,22 @@ install(FILES ${sdk_encryption_header} +@@ -146,6 +146,13 @@ set_target_properties(${PROJECT_NAME}${STATIC_LIB_SUFFIX} + OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}${PROJECT_NAME}${STATIC_LIB_SUFFIX} + ) + ++target_include_directories(${PROJECT_NAME}${STATIC_LIB_SUFFIX} ++ PUBLIC $ ++) ++ ++target_link_libraries(${PROJECT_NAME}${STATIC_LIB_SUFFIX} ${CRYPTO_LIBS}) ++target_link_libraries(${PROJECT_NAME}${STATIC_LIB_SUFFIX} ${CLIENT_LIBS}) ++ + target_include_directories(${PROJECT_NAME}${STATIC_LIB_SUFFIX} + PRIVATE include + PRIVATE include/alibabacloud/oss +@@ -172,7 +179,11 @@ if (BUILD_SHARED_LIBS) + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}${PROJECT_NAME} + ) +- ++ ++ target_include_directories(${PROJECT_NAME} ++ PUBLIC $ ++ ) ++ + target_include_directories(${PROJECT_NAME} + PRIVATE include + PRIVATE include/alibabacloud/oss +@@ -210,16 +221,22 @@ install(FILES ${sdk_encryption_header} install(FILES ${sdk_public_header} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/oss) diff --git a/ports/aliyun-oss-cpp-sdk/usage b/ports/aliyun-oss-cpp-sdk/usage index 40f05b5f72ec87..419193d0da4a87 100644 --- a/ports/aliyun-oss-cpp-sdk/usage +++ b/ports/aliyun-oss-cpp-sdk/usage @@ -1,4 +1,4 @@ The package aliyun-oss-cpp-sdk provides CMake targets: find_package(unofficial-aliyun-oss-cpp-sdk CONFIG REQUIRED) - target_link_libraries(main PRIVATE unofficial::aliyun-oss-cpp-sdk) + target_link_libraries(main PRIVATE unofficial::aliyun-oss-cpp-sdk::cpp-sdk) From 591f8169fc0ddea93f5d6799a55ab1407ed0e3db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Tue, 10 Sep 2024 19:59:19 +0800 Subject: [PATCH 15/17] fix: fix public include directory --- versions/a-/aliyun-oss-cpp-sdk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/a-/aliyun-oss-cpp-sdk.json b/versions/a-/aliyun-oss-cpp-sdk.json index 6ca14228dca1b8..8e0ae64c802602 100644 --- a/versions/a-/aliyun-oss-cpp-sdk.json +++ b/versions/a-/aliyun-oss-cpp-sdk.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "2c7c3efbc1f22525ac7cb14098698f271645afbd", + "git-tree": "55854036d65ca5c905d02dab34eb136baf1fe155", "version": "1.10.0", "port-version": 0 } From c5b3176460cfcdbf14d4ba0d3749927d9cf985df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Wed, 11 Sep 2024 12:52:07 +0800 Subject: [PATCH 16/17] fix: add osx and android support --- ports/aliyun-oss-cpp-sdk/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/aliyun-oss-cpp-sdk/vcpkg.json b/ports/aliyun-oss-cpp-sdk/vcpkg.json index a4cfee1d5783c0..7132cd1faf658f 100644 --- a/ports/aliyun-oss-cpp-sdk/vcpkg.json +++ b/ports/aliyun-oss-cpp-sdk/vcpkg.json @@ -4,7 +4,7 @@ "description": "Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring massive capacity, security, a low cost, and high reliability.", "homepage": "https://github.com/aliyun/aliyun-oss-cpp-sdk", "license": "Apache-2.0", - "supports": "linux", + "supports": "linux | osx | android", "dependencies": [ "curl", "openssl", From f5e0cdcf72b4e1b4977c3c960bb7e623d073129f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E4=BA=A6?= Date: Wed, 11 Sep 2024 12:53:02 +0800 Subject: [PATCH 17/17] fix: add osx and android support --- versions/a-/aliyun-oss-cpp-sdk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/a-/aliyun-oss-cpp-sdk.json b/versions/a-/aliyun-oss-cpp-sdk.json index 8e0ae64c802602..f01d9c9dc5db74 100644 --- a/versions/a-/aliyun-oss-cpp-sdk.json +++ b/versions/a-/aliyun-oss-cpp-sdk.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "55854036d65ca5c905d02dab34eb136baf1fe155", + "git-tree": "cb847011bd7b34fe9ce8ce2ebf15141de1588003", "version": "1.10.0", "port-version": 0 }