[libplist & libusbmuxd & libimobiledevice] Support build on macos & linux (#28022)

* [libplist & libusbmuxd & libimobiledevice] Support build on macos & linux

* update version database
This commit is contained in:
xiaozhuai, Weihang Ding 2022-12-14 11:13:11 +08:00 коммит произвёл GitHub
Родитель 82a7a453a4
Коммит 16fc24d042
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
20 изменённых файлов: 113 добавлений и 39 удалений

Просмотреть файл

@ -1,9 +1,10 @@
{
"name": "ideviceinstaller",
"version-string": "1.1.2.23",
"port-version": 3,
"version": "1.1.2.23",
"port-version": 4,
"description": "Manage apps of iOS devices",
"supports": "!(windows & arm64)",
"license": "LGPL-2.1-only",
"supports": "windows & !arm64",
"dependencies": [
"libimobiledevice",
"libzip"

Просмотреть файл

@ -3,7 +3,7 @@ project(libimobiledevice C)
# find dependencies
find_library(libplist NAMES plist plist-2.0 libplist libplist-2.0 REQUIRED)
find_library(libusbmuxd libusbmuxd REQUIRED)
find_library(libusbmuxd NAMES usbmuxd libusbmuxd REQUIRED)
find_package(OpenSSL REQUIRED)
find_path(dirent_INCLUDE_DIR dirent.h)
if (WIN32)
@ -20,13 +20,15 @@ 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)
set_target_properties(libimobiledevice PROPERTIES OUTPUT_NAME imobiledevice-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)
if (WIN32)
target_link_libraries(libimobiledevice PRIVATE Ws2_32)
else()
endif()
if (UNIX)
target_compile_definitions(libimobiledevice PRIVATE -DHAVE_STPCPY -DHAVE_VASPRINTF -DHAVE_ASPRINTF -DHAVE_GETIFADDRS)
endif()
# install

Просмотреть файл

@ -1,8 +1,10 @@
{
"name": "libimobiledevice",
"version": "1.3.17",
"port-version": 1,
"description": "A cross-platform protocol library to communicate with iOS devices",
"homepage": "http://www.libimobiledevice.org",
"license": "LGPL-2.1-only",
"dependencies": [
"dirent",
"getopt",

Просмотреть файл

@ -1,9 +1,10 @@
{
"name": "libirecovery",
"version-string": "1.0.25",
"port-version": 4,
"version": "1.0.25",
"port-version": 5,
"description": "Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux",
"supports": "!(windows & arm64)",
"license": "LGPL-2.1-only",
"supports": "windows & !arm64",
"dependencies": [
"getopt",
"libusbmuxd",

Просмотреть файл

@ -46,6 +46,10 @@ if(WIN32 AND BUILD_SHARED_LIBS)
target_compile_options(plist++ PRIVATE -W3 -WX- -sdl-)
target_compile_definitions(plist++ PRIVATE -DLIBPLIST_EXPORTS)
endif()
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(plist PRIVATE -DLIBPLIST_STATIC_LIBRARY)
endif()
target_link_libraries(plist++ PRIVATE plist)
install(

Просмотреть файл

@ -0,0 +1,22 @@
diff --git a/src/plist.c b/src/plist.c
index 57f0be4..cbe10ad 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -62,6 +62,8 @@ static void internal_plist_deinit(void)
plist_xml_deinit();
}
+#ifndef LIBPLIST_STATIC_LIBRARY
+
#ifdef WIN32
typedef volatile struct {
@@ -116,6 +118,8 @@ static void __attribute__((destructor)) libplist_deinitialize(void)
#endif
+#endif
+
#ifndef HAVE_MEMMEM
// see https://sourceware.org/legacy-ml/libc-alpha/2007-12/msg00000.html

Просмотреть файл

@ -1,22 +1,21 @@
vcpkg_check_linkage(ONLY_DYNAMIC_CRT ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libimobiledevice-win32/libplist
REF bbba7cabb78aad180a7a982ada5e1f21ff0ba873 # v1.3.6
REF bbba7cabb78aad180a7a982ada5e1f21ff0ba873 # v1.3.6
SHA512 4cd59ed87c647259d0da99a20a05e01aa880f01f6b5cecd29e4247029a3d29f0f68b4552571eb3fd3c5549b4cb357801ffe43338b8ff34d44d6be5393d2e6b9d
HEAD_REF msvc-master
PATCHES dllexport.patch
PATCHES
dllexport.patch
fix_static_build.patch
)
configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY)
configure_file("${CURRENT_PORT_DIR}/CMakeLists.txt" "${SOURCE_PATH}/CMakeLists.txt" COPYONLY)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()

Просмотреть файл

@ -1,7 +1,14 @@
{
"name": "libplist",
"version": "1.3.6",
"port-version": 1,
"port-version": 2,
"description": "A library to handle Apple Property List format in binary or XML",
"homepage": "https://libimobiledevice.org/"
"homepage": "https://libimobiledevice.org/",
"license": "LGPL-2.1-only",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
}
]
}

Просмотреть файл

@ -14,12 +14,16 @@ file(GLOB_RECURSE IDVCACTV_PUBLIC_HDR include/*.h)
file(GLOB_RECURSE IDVCACTV_SRC src/*.c)
add_library(libusbmuxd ${IDVCACTV_TOOLS_HDR} ${IDVCACTV_TOOLS_SRC} ${IDVCACTV_SRC} ${IDVCACTV_PUBLIC_HDR})
set_target_properties(libusbmuxd PROPERTIES OUTPUT_NAME usbmuxd)
target_include_directories(libusbmuxd PRIVATE ${libplist_INCLUDES} include common)
target_compile_definitions(libusbmuxd PRIVATE -DPACKAGE_STRING="1.2.77")
if (WIN32)
target_compile_definitions(libusbmuxd PRIVATE -DWIN32)
target_link_libraries(libusbmuxd PRIVATE Ws2_32)
endif()
if (UNIX)
target_compile_definitions(libusbmuxd PRIVATE -DHAVE_STPNCPY)
endif()
target_link_libraries(libusbmuxd PRIVATE ${libplist})
# install

Просмотреть файл

@ -9,12 +9,11 @@ vcpkg_from_github(
configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()

Просмотреть файл

@ -1,10 +1,15 @@
{
"name": "libusbmuxd",
"version": "1.2.219",
"port-version": 2,
"port-version": 3,
"description": "A client library to multiplex connections from and to iOS devices",
"supports": "!(uwp | linux | osx)",
"license": "LGPL-2.1-only",
"supports": "!uwp",
"dependencies": [
"libplist"
"libplist",
{
"name": "vcpkg-cmake",
"host": true
}
]
}

Просмотреть файл

@ -1,9 +1,11 @@
{
"name": "usbmuxd",
"version-string": "1.2.235",
"port-version": 1,
"version": "1.2.235",
"port-version": 2,
"description": "A socket daemon to multiplex connections from and to iOS devices",
"homepage": "http://www.libimobiledevice.org",
"license": "LGPL-2.1-only",
"supports": "windows & !arm64",
"dependencies": [
"libimobiledevice",
"libusb",

Просмотреть файл

@ -512,10 +512,6 @@ libtomcrypt:arm-uwp=fail
libusb:arm-uwp=fail
libusb:x64-uwp=fail
libusb:arm64-windows=fail
libusbmuxd:arm-uwp=fail
libusbmuxd:x64-uwp=fail
libusbmuxd:x64-linux=fail
libusbmuxd:x64-osx=fail
libusb-win32:arm-uwp=fail
libusb-win32:x64-linux=fail
libusb-win32:x64-osx=fail

Просмотреть файл

@ -2970,7 +2970,7 @@
},
"ideviceinstaller": {
"baseline": "1.1.2.23",
"port-version": 3
"port-version": 4
},
"idevicerestore": {
"baseline": "1.0.12",
@ -3878,11 +3878,11 @@
},
"libimobiledevice": {
"baseline": "1.3.17",
"port-version": 0
"port-version": 1
},
"libirecovery": {
"baseline": "1.0.25",
"port-version": 4
"port-version": 5
},
"libjpeg-turbo": {
"baseline": "2.1.4",
@ -4102,7 +4102,7 @@
},
"libplist": {
"baseline": "1.3.6",
"port-version": 1
"port-version": 2
},
"libpmemobj-cpp": {
"baseline": "1.13.0",
@ -4358,7 +4358,7 @@
},
"libusbmuxd": {
"baseline": "1.2.219",
"port-version": 2
"port-version": 3
},
"libuuid": {
"baseline": "1.0.3",
@ -7726,7 +7726,7 @@
},
"usbmuxd": {
"baseline": "1.2.235",
"port-version": 1
"port-version": 2
},
"usd": {
"baseline": "20.08",

Просмотреть файл

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "82bc629affc514c34b77216d2a00cfbbcf1f2220",
"version": "1.1.2.23",
"port-version": 4
},
{
"git-tree": "38626b7d6489e6842528257d8a38b2dd31627720",
"version-string": "1.1.2.23",

Просмотреть файл

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0f57daa63ba49e977a8e72eea7d3615cdda07648",
"version": "1.3.17",
"port-version": 1
},
{
"git-tree": "5bf3d6cdc93021dcc048d73d7153aebecd91c47e",
"version": "1.3.17",

Просмотреть файл

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "586b5bd01468f7690094397c1b3f8fed0456d65e",
"version": "1.0.25",
"port-version": 5
},
{
"git-tree": "1396dbed8e08ee556ad00ce3a67ba0de7c7b6298",
"version-string": "1.0.25",

Просмотреть файл

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e18bc499ccc42a248f2d88c1f5614d4f4314f4eb",
"version": "1.3.6",
"port-version": 2
},
{
"git-tree": "75eb83284f3361bf04af84e67e0ed0439432c3f5",
"version": "1.3.6",

Просмотреть файл

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "82278a08f20aabe20c5ba0981de631ad6f9df469",
"version": "1.2.219",
"port-version": 3
},
{
"git-tree": "2d6ac12d94326fae11d86e39030433003251aa62",
"version": "1.2.219",

Просмотреть файл

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "53c6e0e8c2a4f5db93d2a41d51d2aa8ba68b8e7e",
"version": "1.2.235",
"port-version": 2
},
{
"git-tree": "072dd356dfeda50c73780a204db5f5f6224cd35c",
"version-string": "1.2.235",