-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New packages: libimobiledevice, getopt, readline (#3504)
* Add libplist * Add libusbmuxd * Fix typos * Add getopt * Add libimobiledevice * Fix typos * Add libideviceactivation * Add ideviceinstaller * Include utilities * Install usbmuxd * Add readline * Fix readline on 64-bit windows * Add libirecovery * libideviceactivation: include tools * Bump versions to fix build issues * Bump versions * Add idevicerestore * [getopt][getopt-win32] Rename to getopt-win32 and only install on Windows Desktop * [readline][readline-win32] Rename to readline-win32 and only install for Windows Desktop * [vcpkg_from_github][vcpkg_apply_patches] Make PATCHES relative to the current port directory * [vcpkg_install_msbuild][vcpkg_check_linkage] Introduce vcpkg_install_msbuild() and vcpkg_check_linkage(). * [libimobiledevice et al] Use vcpkg_from_github() and vcpkg_install_msbuild() * [readline] Fix static builds
- Loading branch information
1 parent
c70e9d8
commit cc00cf0
Showing
42 changed files
with
746 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# vcpkg_check_linkage | ||
|
||
Asserts the available library and CRT linkage options for the port. | ||
|
||
## Usage | ||
```cmake | ||
vcpkg_check_linkage( | ||
[ONLY_STATIC_LIBRARY | ONLY_DYNAMIC_LIBRARY] | ||
[ONLY_STATIC_CRT | ONLY_DYNAMIC_CRT] | ||
) | ||
``` | ||
|
||
## Parameters | ||
### ONLY_STATIC_LIBRARY | ||
Indicates that this port can only be built with static library linkage. | ||
|
||
### ONLY_DYNAMIC_LIBRARY | ||
Indicates that this port can only be built with dynamic/shared library linkage. | ||
|
||
### ONLY_STATIC_CRT | ||
Indicates that this port can only be built with static CRT linkage. | ||
|
||
### ONLY_DYNAMIC_CRT | ||
Indicates that this port can only be built with dynamic/shared CRT linkage. | ||
|
||
## Notes | ||
This command will either alter the settings for `VCPKG_LIBRARY_LINKAGE` or fail, depending on what was requested by the user versus what the library supports. | ||
|
||
## Examples | ||
|
||
* [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) | ||
|
||
## Source | ||
[scripts/cmake/vcpkg_check_linkage.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_linkage.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# vcpkg_install_msbuild | ||
|
||
Build and install an msbuild-based project. This replaces `vcpkg_build_msbuild()`. | ||
|
||
## Usage | ||
```cmake | ||
vcpkg_install_msbuild( | ||
SOURCE_PATH <${SOURCE_PATH}> | ||
PROJECT_SUBPATH <port.sln> | ||
[INCLUDES_SUBPATH <include>] | ||
[LICENSE_SUBPATH <LICENSE>] | ||
[RELEASE_CONFIGURATION <Release>] | ||
[DEBUG_CONFIGURATION <Debug>] | ||
[TARGET <Build>] | ||
[TARGET_PLATFORM_VERSION <10.0.15063.0>] | ||
[PLATFORM <${TRIPLET_SYSTEM_ARCH}>] | ||
[PLATFORM_TOOLSET <${VCPKG_PLATFORM_TOOLSET}>] | ||
[OPTIONS </p:ZLIB_INCLUDE_PATH=X>...] | ||
[OPTIONS_RELEASE </p:ZLIB_LIB=X>...] | ||
[OPTIONS_DEBUG </p:ZLIB_LIB=X>...] | ||
[USE_VCPKG_INTEGRATION] | ||
[ALLOW_ROOT_INCLUDES | REMOVE_ROOT_INCLUDES] | ||
) | ||
``` | ||
|
||
## Parameters | ||
### SOURCE_PATH | ||
The path to the root of the source tree. | ||
|
||
Because MSBuild uses in-source builds, the source tree will be copied into a temporary location for the build. This | ||
parameter is the base for that copy and forms the base for all XYZ_SUBPATH options. | ||
|
||
### USE_VCPKG_INTEGRATION | ||
Apply the normal `integrate install` integration for building the project. | ||
|
||
By default, projects built with this command will not automatically link libraries or have header paths set. | ||
|
||
### PROJECT_SUBPATH | ||
The subpath to the solution (`.sln`) or project (`.vcxproj`) file relative to `SOURCE_PATH`. | ||
|
||
### LICENSE_SUBPATH | ||
The subpath to the license file relative to `SOURCE_PATH`. | ||
|
||
### INCLUDES_SUBPATH | ||
The subpath to the includes directory relative to `SOURCE_PATH`. | ||
|
||
This parameter should be a directory and should not end in a trailing slash. | ||
|
||
### ALLOW_ROOT_INCLUDES | ||
Indicates that top-level include files (e.g. `include/zlib.h`) should be allowed. | ||
|
||
### REMOVE_ROOT_INCLUDES | ||
Indicates that top-level include files (e.g. `include/Makefile.am`) should be removed. | ||
|
||
### RELEASE_CONFIGURATION | ||
The configuration (``/p:Configuration`` msbuild parameter) used for Release builds. | ||
|
||
### DEBUG_CONFIGURATION | ||
The configuration (``/p:Configuration`` msbuild parameter) | ||
used for Debug builds. | ||
|
||
### TARGET_PLATFORM_VERSION | ||
The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) | ||
|
||
### TARGET | ||
The MSBuild target to build. (``/t:<TARGET>``) | ||
|
||
### PLATFORM | ||
The platform (``/p:Platform`` msbuild parameter) used for the build. | ||
|
||
### PLATFORM_TOOLSET | ||
The platform toolset (``/p:PlatformToolset`` msbuild parameter) used for the build. | ||
|
||
### OPTIONS | ||
Additional options passed to msbuild for all builds. | ||
|
||
### OPTIONS_RELEASE | ||
Additional options passed to msbuild for Release builds. These are in addition to `OPTIONS`. | ||
|
||
### OPTIONS_DEBUG | ||
Additional options passed to msbuild for Debug builds. These are in addition to `OPTIONS`. | ||
|
||
## Examples | ||
|
||
* [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) | ||
|
||
## Source | ||
[scripts/cmake/vcpkg_install_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_msbuild.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Source: getopt-win32 | ||
Version: 0.1 | ||
Description: An implementation of getopt provided by https://github.com/libimobiledevice-win32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
include(vcpkg_common_functions) | ||
|
||
if(VCPKG_CMAKE_SYSTEM_NAME) | ||
message(FATAL_ERROR "getopt-win32 only supports building on Windows Desktop") | ||
endif() | ||
|
||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO libimobiledevice-win32/getopt | ||
REF 0.1 | ||
SHA512 40e2a901241a5d751cec741e5de423c8f19b105572c7cae18adb6e69be0b408efc6c9a2ecaeb62f117745eac0d093f30d6b91d88c1a27e1f7be91f0e84fdf199 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_install_msbuild( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PROJECT_SUBPATH getopt.vcxproj | ||
LICENSE_SUBPATH LICENSE | ||
) | ||
|
||
# Copy header | ||
file(COPY ${SOURCE_PATH}/getopt.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Source: getopt | ||
Version: 0.1 | ||
Version: 0 | ||
Description: The getopt and getopt_long functions automate some of the chore involved in parsing typical unix command line options. | ||
Build-Depends: getopt-win32 (windows) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,5 @@ | ||
# Common Ambient Variables: | ||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} | ||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} | ||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} | ||
# PORT = current port name (zlib, etc) | ||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) | ||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) | ||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) | ||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> | ||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) | ||
# | ||
|
||
include(vcpkg_common_functions) | ||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/getopt-0.1) | ||
|
||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) | ||
set(MSBUILD_PLATFORM x64) | ||
else() | ||
set(MSBUILD_PLATFORM Win32) | ||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") | ||
message(FATAL_ERROR "No implementation of getopt is currently available for UWP targets") | ||
endif() | ||
|
||
set(DEBUG_CONFIG Debug) | ||
set(RELEASE_CONFIG Release) | ||
|
||
vcpkg_download_distfile(ARCHIVE | ||
URLS "https://github.com/libimobiledevice-win32/getopt/archive/0.1.zip" | ||
FILENAME "getopt-0.1.zip" | ||
SHA512 7d9786222b6934b80ff2d03e20f211bf289e494ec388842b245f86a5c6bb3a403baba088ceb2e05a460c5523f63f4dd2dc6854a4cc50b1360f168b4f34573a3d | ||
) | ||
vcpkg_extract_source_archive(${ARCHIVE}) | ||
|
||
vcpkg_build_msbuild( | ||
PROJECT_PATH ${SOURCE_PATH}/getopt.vcxproj | ||
DEBUG_CONFIGURATION ${DEBUG_CONFIG} | ||
RELEASE_CONFIGURATION ${RELEASE_CONFIG} | ||
) | ||
|
||
# Copy headers | ||
file(COPY ${SOURCE_PATH}/getopt.h | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/include/) | ||
|
||
# Copy binary files | ||
file (MAKE_DIRECTORY | ||
${CURRENT_PACKAGES_DIR}/bin | ||
${CURRENT_PACKAGES_DIR}/debug/bin) | ||
file (MAKE_DIRECTORY | ||
${CURRENT_PACKAGES_DIR}/lib | ||
${CURRENT_PACKAGES_DIR}/debug/lib) | ||
|
||
file(COPY ${SOURCE_PATH}/${MSBUILD_PLATFORM}/${DEBUG_CONFIG}/getopt.dll | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) | ||
file(COPY ${SOURCE_PATH}/${MSBUILD_PLATFORM}/${RELEASE_CONFIG}/getopt.dll | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin) | ||
file(COPY ${SOURCE_PATH}/${MSBUILD_PLATFORM}/${DEBUG_CONFIG}/getopt.lib | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) | ||
file(COPY ${SOURCE_PATH}/${MSBUILD_PLATFORM}/${RELEASE_CONFIG}/getopt.lib | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib) | ||
file(COPY ${SOURCE_PATH}/${MSBUILD_PLATFORM}/${DEBUG_CONFIG}/getopt.pdb | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) | ||
file(COPY ${SOURCE_PATH}/${MSBUILD_PLATFORM}/${RELEASE_CONFIG}/getopt.pdb | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin) | ||
|
||
# Handle copyright | ||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/getopt RENAME copyright) | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Source: ideviceinstaller | ||
Version: 1.1.2.23-1 | ||
Description: Manage apps of iOS devices | ||
Build-Depends: libimobiledevice, libzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
include(vcpkg_common_functions) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO libimobiledevice-win32/ideviceinstaller | ||
REF 1.1.2.23 | ||
SHA512 d0801b3a38eb02206a6f06e05cc19b794c69a87c06895165f64522c61e07030046499c5f0e436981682f9e17f91eae87913cca091e2e039a74ee35a5136100d4 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_install_msbuild( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PROJECT_SUBPATH ideviceinstaller.vcxproj | ||
LICENSE_SUBPATH COPYING | ||
USE_VCPKG_INTEGRATION | ||
) | ||
|
||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Source: idevicerestore | ||
Version: 1.0.12-1 | ||
Description: Restore/upgrade firmware of iOS devices | ||
Build-Depends: libimobiledevice, curl, libirecovery, libzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
include(vcpkg_common_functions) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO libimobiledevice-win32/idevicerestore | ||
REF 1.0.12 | ||
SHA512 ba623be56c2f37853516d7d4c32e16f1ec72f33d512f18aa812ce6830af4b9e389f7af5321888dd0ddd168e282b652e379b60f90970680e213eabf489f406915 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_install_msbuild( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PROJECT_SUBPATH idevicerestore.vcxproj | ||
LICENSE_SUBPATH COPYING | ||
USE_VCPKG_INTEGRATION | ||
) | ||
|
||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Source: libideviceactivation | ||
Version: 1.0.38-1 | ||
Description: A library to handle the activation process of iOS devices | ||
Build-Depends: libimobiledevice, libxml2, curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
include(vcpkg_common_functions) | ||
|
||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO libimobiledevice-win32/libideviceactivation | ||
REF 1.0.38 | ||
SHA512 2fd2d5636e83a6740251dca58c04429628f47661a56e573fc14f45ef68c54990717515305902cf04759a7c8fd19e66a30c8eb2ea20e6257d2c5405b690ea25a6 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_install_msbuild( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PROJECT_SUBPATH libideviceactivation.sln | ||
INCLUDES_SUBPATH include | ||
LICENSE_SUBPATH COPYING | ||
USE_VCPKG_INTEGRATION | ||
ALLOW_ROOT_INCLUDES | ||
) | ||
|
||
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Makefile.am) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Source: libimobiledevice | ||
Version: 1.2.1.215-1 | ||
Description: A cross-platform protocol library to communicate with iOS devices | ||
Build-Depends: libplist, libusbmuxd, openssl, dirent, getopt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
include(vcpkg_common_functions) | ||
|
||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO libimobiledevice-win32/libimobiledevice | ||
REF 1.2.1.215 | ||
SHA512 192ac12eb4fdf518a934cb8061d4a40e48f483e969e34167f2a5346efac1d745e4041eff84d7175d106b1a3b3f806d5e69643daa1459e48e69bc9c38d722be3c | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_install_msbuild( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PROJECT_SUBPATH libimobiledevice.sln | ||
INCLUDES_SUBPATH include | ||
LICENSE_SUBPATH COPYING | ||
REMOVE_ROOT_INCLUDES | ||
USE_VCPKG_INTEGRATION | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Source: libirecovery | ||
Version: 1.0.25-1 | ||
Description: Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux | ||
Build-Depends: libusbmuxd, readline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
include(vcpkg_common_functions) | ||
|
||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO libimobiledevice-win32/libirecovery | ||
REF 1.0.25 | ||
SHA512 0dd91d4fe3ded2bc1bbd91aea964e31e7f59bce18be01aa096e974f37dc1be281644d6c44e3f9b49470dd961e3df2e3ff8a09bcc6b803a959073e7d7d9a8d3e7 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_install_msbuild( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PROJECT_SUBPATH libirecovery.sln | ||
INCLUDES_SUBPATH include | ||
LICENSE_SUBPATH COPYING | ||
USE_VCPKG_INTEGRATION | ||
ALLOW_ROOT_INCLUDES | ||
) | ||
|
||
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Makefile.am) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Source: libplist | ||
Version: 2.0.1.197-1 | ||
Description: A library to handle Apple Property List format in binary or XML |
Oops, something went wrong.