Skip to content

Commit

Permalink
[libplist/libusbmuxd/libimobiledevice/libideviceactivation/usbmuxd] U…
Browse files Browse the repository at this point in the history
…pdate version (#13811)

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
  • Loading branch information
JackBoosY and BillyONeal authored Oct 20, 2020
1 parent 46a2a00 commit 334aec6
Show file tree
Hide file tree
Showing 19 changed files with 253 additions and 50 deletions.
4 changes: 2 additions & 2 deletions ports/libgpod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ if (NOT glib_FOUND)
endif()

find_path(plist_PATH plist++.h PATH_SUFFIXES plist)
find_library(plist_LIBRARY_RELEASE NAMES plist PATHS lib)
find_library(plist_LIBRARY_DEBUG NAMES plist PATHS debug/lib)
find_library(plist_LIBRARY_RELEASE NAMES plist plist-2.0 libplist libplist-2.0 PATHS lib)
find_library(plist_LIBRARY_DEBUG NAMES plist plist-2.0 libplist libplist-2.0 PATHS debug/lib)
select_library_configurations(plist)
if (NOT plist_FOUND)
message(FATAL_ERROR "plist not found.")
Expand Down
2 changes: 1 addition & 1 deletion ports/libgpod/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: libgpod
Version: 2019-08-29
Port-Version: 1
Port-Version: 2
Homepage: https://github.com/fadingred/libgpod
Description: libgpod is a library meant to abstract access to an iPod content.
Build-Depends: glib, libplist, sqlite3
4 changes: 2 additions & 2 deletions ports/libideviceactivation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.0)
project(libideviceactivation C)

# find dependencies
find_library(libplist plist REQUIRED)
find_library(libplist NAMES plist plist-2.0 libplist libplist-2.0 REQUIRED)
find_path(libimobiledevice_INCLUDES endianness.h)
find_library(libimobiledevice libimobiledevice REQUIRED)
find_library(libimobiledevice NAMES imobiledevice imobiledevice-1.0 libimobiledevice libimobiledevice-1.0 REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(CURL REQUIRED)

Expand Down
4 changes: 2 additions & 2 deletions ports/libideviceactivation/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: libideviceactivation
Version: 1.2.137
Version: 1.2.235
Description: A library to handle the activation process of iOS devices
Build-Depends: libimobiledevice, libxml2, curl, libplist
Build-Depends: libimobiledevice, libxml2, curl, libplist
4 changes: 2 additions & 2 deletions ports/libideviceactivation/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libimobiledevice-win32/libideviceactivation
REF de6008a6bd66a96bb11468b8b137704f0fef2c54 # v1.2.137
SHA512 cdf72702c465cb3e405db067fa96e2979b8c32e7798bcdb9e7286c4bc9392639cb0d31622c321453f635ef5212e645d300f3b420a847fb16fa05425c4882be95
REF fbe0476cfeddc2fc317ceb900eec12302c1d4c11 # v1.2.235
SHA512 18fdf1b42744da33e0f0f037e83a72b76cc0b63a0b712e78d9736adcde113582327f3712bc2bfa7b6fdb692465700a9106286f383fd7d11f9351ca7939b20e24
HEAD_REF msvc-master
)

Expand Down
14 changes: 12 additions & 2 deletions ports/libimobiledevice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
project(libimobiledevice C)

# find dependencies
find_library(libplist plist REQUIRED)
find_library(libplist NAMES plist plist-2.0 libplist libplist-2.0 REQUIRED)
find_library(libusbmuxd libusbmuxd REQUIRED)
find_package(OpenSSL REQUIRED)
find_path(dirent_INCLUDE_DIR dirent.h)
Expand All @@ -20,6 +20,7 @@ file(GLOB_RECURSE IMOBDEV_PRIVATE_HDR src/*.h)
file(GLOB_RECURSE IMOBDEV_SRC src/*.c)

add_library(libimobiledevice ${IMOBDEV_SRC} ${IMOBDEV_PUBLIC_HDR} ${IMOBDEV_PUBLIC_SUB_HDR} ${IMOBDEV_PRIVATE_HDR} ${IMOBDEV_COMMON_HDR} ${IMOBDEV_COMMON_SRC})
set_target_properties(libimobiledevice PROPERTIES OUTPUT_NAME libimobiledevice-1.0)
target_include_directories(libimobiledevice PRIVATE ${dirent_INCLUDE_DIR} include .)
target_compile_definitions(libimobiledevice PRIVATE -DHAVE_OPENSSL)
target_link_libraries(libimobiledevice PRIVATE ${libplist} ${libusbmuxd} ${getopt} OpenSSL::SSL OpenSSL::Crypto)
Expand All @@ -35,14 +36,23 @@ install(
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)

set(LIBPLIST_VERSION 2.0)
set(LIBUSBMUXD_VERSION 2.0)
set(PACKAGE_NAME libimobiledevice)
set(PACKAGE_VERSION 1.0)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix \${prefix})
set(libdir \${prefix}/lib)
set(includedir \${prefix}/../include)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/libimobiledevice-1.0.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libimobiledevice-1.0.pc
@ONLY
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libimobiledevice-1.0.pc
DESTINATION lib/libimobiledevice
DESTINATION lib/pkgconfig
)

install(FILES ${IMOBDEV_PUBLIC_HDR} DESTINATION include)
Expand Down
2 changes: 1 addition & 1 deletion ports/libimobiledevice/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: libimobiledevice
Version: 1.2.185
Version: 1.3.6
Homepage: http://www.libimobiledevice.org
Description: A cross-platform protocol library to communicate with iOS devices
Build-Depends: libplist, libusbmuxd, openssl, dirent, getopt
112 changes: 112 additions & 0 deletions ports/libimobiledevice/fix-functions-declaration.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
From dd35fb7fcad54c5ba465bf252e22a82c721fd825 Mon Sep 17 00:00:00 2001
From: Billy Robert O'Neal III <bion@microsoft.com>
Date: Mon, 19 Oct 2020 18:22:47 -0700
Subject: [PATCH] Add dllexports missing from connection_proxy.h functions.

---
include/libimobiledevice/companion_proxy.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/include/libimobiledevice/companion_proxy.h b/include/libimobiledevice/companion_proxy.h
index 19c88ebb..29b8e96d 100644
--- a/include/libimobiledevice/companion_proxy.h
+++ b/include/libimobiledevice/companion_proxy.h
@@ -65,7 +65,7 @@ typedef void (*companion_proxy_device_event_cb_t) (plist_t event, void* userdata
* @return COMPANION_PROXY_E_SUCCESS on success, COMPANION_PROXY_E_INVALID_ARG when
* the arguments are invalid, or an COMPANION_PROXY_E_* error code otherwise.
*/
-companion_proxy_error_t companion_proxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, companion_proxy_client_t* client);
+LIBIMOBILEDEVICE_API_MSC companion_proxy_error_t companion_proxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, companion_proxy_client_t* client);

/**
* Starts a new companion_proxy service on the specified device and connects to it.
@@ -80,7 +80,7 @@ companion_proxy_error_t companion_proxy_client_new(idevice_t device, lockdownd_s
* @return COMPANION_PROXY_E_SUCCESS on success, or an COMPANION_PROXY_E_* error
* code otherwise.
*/
-companion_proxy_error_t companion_proxy_client_start_service(idevice_t device, companion_proxy_client_t* client, const char* label);
+LIBIMOBILEDEVICE_API_MSC companion_proxy_error_t companion_proxy_client_start_service(idevice_t device, companion_proxy_client_t* client, const char* label);

/**
* Disconnects a companion_proxy client from the device and frees up the
@@ -91,7 +91,7 @@ companion_proxy_error_t companion_proxy_client_start_service(idevice_t device, c
* @return COMPANION_PROXY_E_SUCCESS on success, COMPANION_PROXY_E_INVALID_ARG when
* client is NULL, or an COMPANION_PROXY_E_* error code otherwise.
*/
-companion_proxy_error_t companion_proxy_client_free(companion_proxy_client_t client);
+LIBIMOBILEDEVICE_API_MSC companion_proxy_error_t companion_proxy_client_free(companion_proxy_client_t client);

/**
* Sends a plist to the service.
@@ -102,7 +102,7 @@ companion_proxy_error_t companion_proxy_client_free(companion_proxy_client_t cli
* @return COMPANION_PROXY_E_SUCCESS on success,
* COMPANION_PROXY_E_INVALID_ARG when client or plist is NULL
*/
-companion_proxy_error_t companion_proxy_send(companion_proxy_client_t client, plist_t plist);
+LIBIMOBILEDEVICE_API_MSC companion_proxy_error_t companion_proxy_send(companion_proxy_client_t client, plist_t plist);

/**
* Receives a plist from the service.
@@ -113,7 +113,7 @@ companion_proxy_error_t companion_proxy_send(companion_proxy_client_t client, pl
* @return COMPANION_PROXY_E_SUCCESS on success,
* COMPANION_PROXY_E_INVALID_ARG when client or plist is NULL
*/
-companion_proxy_error_t companion_proxy_receive(companion_proxy_client_t client, plist_t * plist);
+LIBIMOBILEDEVICE_API_MSC companion_proxy_error_t companion_proxy_receive(companion_proxy_client_t client, plist_t * plist);

/**
* Retrieves a list of paired devices.
@@ -127,7 +127,7 @@ companion_proxy_error_t companion_proxy_receive(companion_proxy_client_t client,
* COMPANION_PROXY_E_NO_DEVICES if no devices are paired,
* or a COMPANION_PROXY_E_* error code otherwise.
*/
-companion_proxy_error_t companion_proxy_get_device_registry(companion_proxy_client_t client, plist_t* paired_devices);
+LIBIMOBILEDEVICE_API_MSC companion_proxy_error_t companion_proxy_get_device_registry(companion_proxy_client_t client, plist_t* paired_devices);

/**
* Starts listening for paired devices.
@@ -143,7 +143,7 @@ companion_proxy_error_t companion_proxy_get_device_registry(companion_proxy_clie
* @return COMPANION_PROXY_E_SUCCESS on success,
* or a COMPANION_PROXY_E_* error code otherwise.
*/
-companion_proxy_error_t companion_proxy_start_listening_for_devices(companion_proxy_client_t client, companion_proxy_device_event_cb_t callback, void* userdata);
+LIBIMOBILEDEVICE_API_MSC companion_proxy_error_t companion_proxy_start_listening_for_devices(companion_proxy_client_t client, companion_proxy_device_event_cb_t callback, void* userdata);

/**
* Stops listening for paired devices
@@ -153,7 +153,7 @@ companion_proxy_error_t companion_proxy_start_listening_for_devices(companion_pr
* @return COMPANION_PROXY_E_SUCCESS on success,
* or a COMPANION_PROXY_E_* error code otherwise.
*/
-companion_proxy_error_t companion_proxy_stop_listening_for_devices(companion_proxy_client_t client);
+LIBIMOBILEDEVICE_API_MSC companion_proxy_error_t companion_proxy_stop_listening_for_devices(companion_proxy_client_t client);

/**
* Returns a value for the given key.
@@ -169,7 +169,7 @@ companion_proxy_error_t companion_proxy_stop_listening_for_devices(companion_pro
* COMPANION_PROXY_E_UNSUPPORTED_KEY if the companion device doesn't support the given key,
* or a COMPANION_PROXY_E_* error code otherwise.
*/
-companion_proxy_error_t companion_proxy_get_value_from_registry(companion_proxy_client_t client, const char* companion_udid, const char* key, plist_t* value);
+LIBIMOBILEDEVICE_API_MSC companion_proxy_error_t companion_proxy_get_value_from_registry(companion_proxy_client_t client, const char* companion_udid, const char* key, plist_t* value);

/**
* Start forwarding a service port on the companion device to a port on the idevice.
@@ -186,7 +186,7 @@ companion_proxy_error_t companion_proxy_get_value_from_registry(companion_proxy_
* @return COMPANION_PROXY_E_SUCCESS on success,
* or a COMPANION_PROXY_E_* error code otherwise.
*/
-companion_proxy_error_t companion_proxy_start_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port, const char* service_name, uint16_t* forward_port, plist_t options);
+LIBIMOBILEDEVICE_API_MSC companion_proxy_error_t companion_proxy_start_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port, const char* service_name, uint16_t* forward_port, plist_t options);

/**
* Stop forwarding a service port between companion device and idevice.
@@ -199,7 +199,7 @@ companion_proxy_error_t companion_proxy_start_forwarding_service_port(companion_
* @return COMPANION_PROXY_E_SUCCESS on success,
* or a COMPANION_PROXY_E_* error code otherwise.
*/
-companion_proxy_error_t companion_proxy_stop_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port);
+LIBIMOBILEDEVICE_API_MSC companion_proxy_error_t companion_proxy_stop_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port);

#ifdef __cplusplus
}
7 changes: 5 additions & 2 deletions ports/libimobiledevice/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libimobiledevice-win32/libimobiledevice
REF 37cb65f04249705eb5844821fd925b9edee8866c # v1.2.185
SHA512 00a44de9552d3cf3daf3d490ad700188e20c72b24b8a6e9ca32d1d9fa53572479a5cbe85d130cd24fb1a2528c5e2cb238ab4caab35c5d93033c53b5c4c189bc6
REF b30267ac1fb46f2b1d2d5e585aaa73c0f4ce8ad8 # v1.3.6
SHA512 47912571726c38fe3c306a5e7c76b4042994b53a30794432a5af7eae5a30855d39828c52048b1a90b837306e6d5c447fc11d8521669258e76231cfdd6aef17d9
HEAD_REF msvc-master
PATCHES
fix-functions-declaration.patch
)

configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY)
Expand All @@ -15,6 +17,7 @@ vcpkg_configure_cmake(

vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()

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

Expand Down
58 changes: 50 additions & 8 deletions ports/libplist/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,75 @@
cmake_minimum_required(VERSION 3.8)
project(plist C)
project(plist C CXX)

file(GLOB_RECURSE PLIST_HEADER include/plist/*.h)
file(GLOB_RECURSE PLIST_SRC src/*.c)

set(PLIST_SRC
src/base64.c
src/bytearray.c
src/hashtable.c
src/ptrarray.c
src/time64.c
src/xplist.c
src/bplist.c
src/plist.c
)

set(PLISTPP_SRC
src/Node.cpp
src/Structure.cpp
src/Array.cpp
src/Boolean.cpp
src/Data.cpp
src/Date.cpp
src/Dictionary.cpp
src/Integer.cpp
src/Key.cpp
src/Real.cpp
src/String.cpp
src/Uid.cpp
)

file(GLOB_RECURSE LIBCNARY_HEADER libcnary/include/*.h)
file(GLOB_RECURSE LIBCNARY_SRC libcnary/*c)

add_library(plist ${PLIST_SRC} ${PLIST_HEADER} ${LIBCNARY_SRC} ${LIBCNARY_HEADER})
target_include_directories(plist PRIVATE src include libcnary/include)
set_target_properties(plist PROPERTIES OUTPUT_NAME plist-2.0)

add_library(plist++ STATIC ${PLISTPP_SRC} ${PLIST_HEADER} ${LIBCNARY_SRC} ${LIBCNARY_HEADER})
set_target_properties(plist++ PROPERTIES OUTPUT_NAME plist++-2.0)
target_include_directories(plist++ PRIVATE src include libcnary/include)

if(WIN32)
if(WIN32 AND BUILD_SHARED_LIBS)
target_compile_options(plist PRIVATE -W3 -WX- -sdl-)
target_compile_definitions(plist PRIVATE -DLIBPLIST_EXPORTS)
target_compile_options(plist++ PRIVATE -W3 -WX- -sdl-)
target_compile_definitions(plist++ PRIVATE -DLIBPLIST_EXPORTS)
endif()
target_link_libraries(plist++ PRIVATE plist)

install(
TARGETS plist
TARGETS plist plist++
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)

set(PACKAGE_NAME libplist)
set(PACKAGE_VERSION 2.0)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix \${prefix})
set(libdir \${prefix}/lib)
set(includedir \${prefix}/../include)
foreach (PLIST_PKGCONFIG libplist-2.0.pc libplist++-2.0.pc)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/libplist.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libplist.pc
${CMAKE_CURRENT_SOURCE_DIR}/src/${PLIST_PKGCONFIG}.in
${CMAKE_CURRENT_BINARY_DIR}/${PLIST_PKGCONFIG}
@ONLY
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libplist.pc
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLIST_PKGCONFIG}
DESTINATION lib/pkgconfig)
endforeach()

install(FILES ${PLIST_HEADER} DESTINATION include/plist)
install(FILES ${PLIST_HEADER} DESTINATION include/plist)
2 changes: 1 addition & 1 deletion ports/libplist/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: libplist
Version: 1.2.185
Version: 1.3.6
Description: A library to handle Apple Property List format in binary or XML
5 changes: 3 additions & 2 deletions ports/libplist/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ vcpkg_check_linkage(ONLY_DYNAMIC_CRT ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libimobiledevice-win32/libplist
REF efeba335a63110d9ce2b3cd2481743cb0028d9c7 # v1.2.185
SHA512 c2f742a60c7a6e0601d33eae03d934f2cdb01fdd121be33212955f261a6756c14753ff3c8e173375b228f44f007d7a96ff6833ae66b5a8a6c7c245017cdc9b07
REF bbba7cabb78aad180a7a982ada5e1f21ff0ba873 # v1.3.6
SHA512 4cd59ed87c647259d0da99a20a05e01aa880f01f6b5cecd29e4247029a3d29f0f68b4552571eb3fd3c5549b4cb357801ffe43338b8ff34d44d6be5393d2e6b9d
HEAD_REF msvc-master
PATCHES dllexport.patch
)
Expand All @@ -18,6 +18,7 @@ vcpkg_configure_cmake(

vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()

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

Expand Down
16 changes: 12 additions & 4 deletions ports/libusbmuxd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(libusbmuxd C)
# find dependencies
find_path(libplist_INCLUDES plist.h PATH_SUFFIXES plist)
set(libplist_INCLUDES ${libplist_INCLUDES}/../)
find_library(libplist plist REQUIRED)
find_library(libplist NAMES plist libplist plist-2.0 libplist-2.0 REQUIRED)

# ready to create library
file(GLOB_RECURSE IDVCACTV_TOOLS_HDR common/*.h)
Expand All @@ -29,13 +29,21 @@ install(
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)

set(LIBPLIST_VERSION 2.0)
set(PACKAGE_NAME libusbmuxd)
set(PACKAGE_VERSION 2.0)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix \${prefix})
set(libdir \${prefix}/lib)
set(includedir \${prefix}/../include)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/libusbmuxd.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd.pc
${CMAKE_CURRENT_SOURCE_DIR}/src/libusbmuxd-2.0.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd-2.0.pc
@ONLY
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd.pc
FILES ${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd-2.0.pc
DESTINATION lib/pkgconfig
)

Expand Down
2 changes: 1 addition & 1 deletion ports/libusbmuxd/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: libusbmuxd
Version: 1.2.185-1
Version: 1.2.219
Description: A client library to multiplex connections from and to iOS devices
Build-Depends: libplist
Supports: !(uwp|linux|osx)
Loading

0 comments on commit 334aec6

Please sign in to comment.