Skip to content

Commit

Permalink
[azure-iot-sdk-c] Update sdk to 1.2.10 and update dependencies (micro…
Browse files Browse the repository at this point in the history
…soft#4717)

* new versions for azure-iot-sdk-c, azure-c-shared-utility, azure-uamqp-c, azure-umqtt-c, azure-uhttp-c

* [azure-iot-sdk-c] Modernize & Cleanup

* fix for x64-windows
  • Loading branch information
massand authored and ras0219-msft committed Nov 16, 2018
1 parent e7fcd84 commit 13e7f60
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 115 deletions.
2 changes: 1 addition & 1 deletion ports/azure-c-shared-utility/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: azure-c-shared-utility
Version: 1.1.5
Version: 1.1.10-1
Description: Azure C SDKs common code
Build-Depends: curl (linux), openssl (linux)
17 changes: 5 additions & 12 deletions ports/azure-c-shared-utility/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
include(vcpkg_common_functions)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message("azure-c-shared-utility only supports static linkage")
set(VCPKG_LIBRARY_LINKAGE "static")
endif()
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-c-shared-utility
REF e7aef25f8012e9e9333c72433a1d21f90f3a28b4
SHA512 73b644bc1ea3d87fcdc0916f969fd779a20ed5ae263643dd21cc600265f84cab443f6578ff30f364ddea9e91ca4488615b78898e9c06f15cbc5d0af725ebfa00
REF 68ede5bbc58c7d976f3bd68325edec181c254e5e
SHA512 97253c081cab90c7c879da9ecfa076be43d19fd0d442d91fcab8ab3149e792b868c363c56b5afc3e3880a18b400e663661d257237d2f1ef97544522a1cabcd5a
HEAD_REF master
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-Dskip_samples=ON
-Duse_installed_dependencies=ON
-Duse_default_uuid=ON
-Dbuild_as_dynamic=${BUILD_AS_DYNAMIC}
-Dbuild_as_dynamic=OFF
)

vcpkg_install_cmake()
Expand All @@ -33,8 +28,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR

file(COPY ${SOURCE_PATH}/configs/azure_iot_build_rules.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility)

file(INSTALL
${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility RENAME copyright)
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility/copyright COPYONLY)

vcpkg_copy_pdbs()
2 changes: 1 addition & 1 deletion ports/azure-iot-sdk-c/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: azure-iot-sdk-c
Version: 1.2.3
Version: 1.2.10-1
Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson
Description: A C99 SDK for connecting devices to Microsoft Azure IoT services
20 changes: 0 additions & 20 deletions ports/azure-iot-sdk-c/improve-external-deps-2.patch

This file was deleted.

37 changes: 30 additions & 7 deletions ports/azure-iot-sdk-c/improve-external-deps.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8011fb..9fc05c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -155,17 +155,6 @@ endif()
# Use solution folders.
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

-# build the parson library for json parsing
-add_library(parson
- ./deps/parson/parson.c
- ./deps/parson/parson.h
-)
-if (MSVC)
- set_source_files_properties(../deps/parson/parson.c PROPERTIES COMPILE_FLAGS "/wd4244 /wd4232")
-endif()
-set(parson_h_install_files ./deps/parson/parson.h)
-set(parson_install_libs parson)
-
if (IN_OPENWRT)
ADD_DEFINITIONS("$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}")
INCLUDE_DIRECTORIES("$ENV{TOOLCHAIN_DIR}/usr/include" "$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}")
diff --git a/configs/azure_iot_sdksConfig.cmake b/configs/azure_iot_sdksConfig.cmake
index b9c62e8..edf5847 100644
--- a/configs/azure_iot_sdksConfig.cmake
Expand All @@ -14,16 +36,17 @@ index b9c62e8..edf5847 100644
include("${CMAKE_CURRENT_LIST_DIR}/azure_iot_sdksTargets.cmake")

diff --git a/dependencies.cmake b/dependencies.cmake
index 063733a..71bfc7d 100644
index fd06df6..c0e06fa 100644
--- a/dependencies.cmake
+++ b/dependencies.cmake
@@ -18,6 +18,8 @@ if(${use_installed_dependencies})
endif()
endif()
@@ -18,6 +18,9 @@ if(${use_installed_dependencies})
endif ()
endif ()

+ find_package(unofficial-parson REQUIRED)
+ link_libraries(unofficial::parson::parson)
else()
+
else ()
add_subdirectory(c-utility)

diff --git a/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt b/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt
Expand Down Expand Up @@ -78,10 +101,10 @@ index d05d654..5872c8d 100644
)

diff --git a/iothub_service_client/CMakeLists.txt b/iothub_service_client/CMakeLists.txt
index 11a9a9a..4097293 100644
index e47473e..b073513 100644
--- a/iothub_service_client/CMakeLists.txt
+++ b/iothub_service_client/CMakeLists.txt
@@ -72,9 +72,7 @@ endif()
@@ -81,9 +81,7 @@ endif()
setSdkTargetBuildProperties(iothub_service_client)

if(NOT ${nuget_e2e_tests})
Expand Down
25 changes: 6 additions & 19 deletions ports/azure-iot-sdk-c/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,37 +1,26 @@
include(vcpkg_common_functions)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message("azure-iot-sdk-c only supports static linkage")
set(VCPKG_LIBRARY_LINKAGE "static")
endif()
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-iot-sdk-c
REF 1.2.3
SHA512 6192d454bb2ecb01989f7636751acd6919021b55b772f4ea25a6d0ddd263e7f988275f7fb0b1c304d4ebd30418c9f870eb1c504a4a504f2faeb712ef8e669d5a
REF 0ca9b92d4ff7f7a44fe1687e81f919bd7dcaa944
SHA512 a4d43d5615d3571fda29f3d47467b816745f939941da899df799a0c4cf09c920c20b924aa29e2e2d6f4a19b81ff83969e773b6cf333bec9e2170376fe07b42ec
HEAD_REF master
)

vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/improve-external-deps.patch
${CMAKE_CURRENT_LIST_DIR}/improve-external-deps-2.patch
PATCHES improve-external-deps.patch
)

file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-Dskip_samples=ON
-Duse_installed_dependencies=ON
-Duse_default_uuid=ON
-Dbuild_as_dynamic=${BUILD_AS_DYNAMIC}
-Dbuild_as_dynamic=OFF
)

vcpkg_install_cmake()
Expand All @@ -40,8 +29,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/azure_iot_sdks)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)

file(INSTALL
${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-iot-sdk-c RENAME copyright)
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-iot-sdk-c/copyright COPYONLY)

vcpkg_copy_pdbs()
2 changes: 1 addition & 1 deletion ports/azure-uamqp-c/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: azure-uamqp-c
Version: 1.2.3
Version: 1.2.10-1
Build-Depends: azure-c-shared-utility
Description: AMQP library for C
14 changes: 0 additions & 14 deletions ports/azure-uamqp-c/glob-headers.patch

This file was deleted.

19 changes: 5 additions & 14 deletions ports/azure-uamqp-c/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
include(vcpkg_common_functions)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message("azure-uamqp-c only supports static linkage")
set(VCPKG_LIBRARY_LINKAGE "static")
endif()
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-uamqp-c
REF 1.2.3
SHA512 18fc978517371fcb19e1c078f07d06b3bf8ec046c5cba955dd3cfe0a364d8775542acc970d81fa42384942ea4db7fb60d8939e80e90baf582c9d9e6ff0b577b5
REF ec107011716bc797d3d7a4a4a1141df4367038a3
SHA512 db25018a6f93a29da4bae8426f6e021a0d823075375f69f617c6aba776f5ac6ed5107e055f0a436f22ede2057045d28fab15607a58703c6c43937abec87ab076
HEAD_REF master
)

vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/glob-headers.patch)

file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-Dskip_samples=ON
-Duse_installed_dependencies=ON
-Dbuild_as_dynamic=${BUILD_AS_DYNAMIC}
-Dbuild_as_dynamic=OFF
)

vcpkg_install_cmake()
Expand All @@ -34,8 +27,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/uamqp)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)

file(INSTALL
${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-uamqp-c RENAME copyright)
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-uamqp-c/copyright COPYONLY)

vcpkg_copy_pdbs()
2 changes: 1 addition & 1 deletion ports/azure-uhttp-c/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: azure-uhttp-c
Version: LTS_01_2018_Ref01
Version: 1.1.10-1
Build-Depends: azure-c-shared-utility
Description: Azure HTTP Library written in C
17 changes: 5 additions & 12 deletions ports/azure-uhttp-c/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
include(vcpkg_common_functions)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message("azure-uhttp-c only supports static linkage")
set(VCPKG_LIBRARY_LINKAGE "static")
endif()
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-uhttp-c
REF LTS_01_2018_Ref01
SHA512 baf7366e499c32210d0227188044ea1f7f7a78e2bad83d52ca6a71a76a59118ab2cd08ae9e7c511b612b885dcd94fe7a24a619136d3ee03187f780a9bc862218
REF 8ec55bb8596dae1154ae897b5064b8eba34c136c
SHA512 73b861409dede5c1936711ec04e76e8467dadc08acda6ac1b832046a4f9b2f6d35403c01acb818b5655c2c43f700d9f83edf11b8b00f7a565f260700a12c9f7c
HEAD_REF master
)

file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/c-utility/configs/)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-Dskip_samples=ON
-Duse_installed_dependencies=ON
-Dbuild_as_dynamic=${BUILD_AS_DYNAMIC}
-Dbuild_as_dynamic=OFF
-DCMAKE_INSTALL_INCLUDEDIR=include
)

Expand All @@ -33,8 +28,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/uhttp)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)

file(INSTALL
${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-uhttp-c RENAME copyright)
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-uhttp-c/copyright COPYONLY)

vcpkg_copy_pdbs()
2 changes: 1 addition & 1 deletion ports/azure-umqtt-c/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: azure-umqtt-c
Version: 1.1.5
Version: 1.1.10-1
Build-Depends: azure-c-shared-utility
Description: General purpose library for communication over the mqtt protocol
17 changes: 5 additions & 12 deletions ports/azure-umqtt-c/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
include(vcpkg_common_functions)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message("azure-umqtt-c only supports static linkage")
set(VCPKG_LIBRARY_LINKAGE "static")
endif()
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-umqtt-c
REF 244f1478dbc426b62cc42f1ef24ba4b6c6333540
SHA512 74381d35c0ab967f2d2addcba1ff796633b790b1a7ee173ceee91922c14402043fc5472131b9e486728d360ffe6adc4d3779db1698ef7a1dd7e85202f2d142f4
REF e5ab6b66ccba5a7ff7ed7421ffe0fa13ecabe000
SHA512 19878f798d73f98afdee6ac574e136f1b2f8ddd3a7537ee666a98d04cade6ecd2526714eb74335af2eff05165492933ec90cb79a9cb914093fa96cfe35a84cb4
HEAD_REF master
)

file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/c-utility/configs/)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-Dskip_samples=ON
-Duse_installed_dependencies=ON
-Dbuild_as_dynamic=${BUILD_AS_DYNAMIC}
-Dbuild_as_dynamic=OFF
)

vcpkg_install_cmake()
Expand All @@ -32,8 +27,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/umqtt)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)

file(INSTALL
${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-umqtt-c RENAME copyright)
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-umqtt-c/copyright COPYONLY)

vcpkg_copy_pdbs()

0 comments on commit 13e7f60

Please sign in to comment.