Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New packages: libimobiledevice, getopt, readline #3504

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8ee7ad9
Add libplist
qmfrederik May 15, 2018
3cde6c9
Add libusbmuxd
qmfrederik May 15, 2018
15b045a
Fix typos
qmfrederik May 15, 2018
8b9c634
Add getopt
qmfrederik May 15, 2018
5e62502
Add libimobiledevice
qmfrederik May 15, 2018
16bb5c2
Fix typos
qmfrederik May 15, 2018
301fd06
Add libideviceactivation
qmfrederik May 15, 2018
5bae393
Add ideviceinstaller
qmfrederik May 15, 2018
b3687aa
Include utilities
qmfrederik May 15, 2018
3510624
Install usbmuxd
qmfrederik May 15, 2018
0cd348a
Add readline
qmfrederik May 15, 2018
1dcc4a9
Fix readline on 64-bit windows
qmfrederik May 15, 2018
eae7311
Add libirecovery
qmfrederik May 15, 2018
f3642da
libideviceactivation: include tools
qmfrederik May 15, 2018
27d5495
Bump versions to fix build issues
qmfrederik May 16, 2018
1eb53ab
Bump versions
qmfrederik May 16, 2018
4608b59
Add idevicerestore
qmfrederik May 16, 2018
149fb89
Merge remote-tracking branch 'origin/master' into HEAD
ras0219-msft Aug 8, 2018
2065609
[getopt][getopt-win32] Rename to getopt-win32 and only install on Win…
ras0219-msft Aug 8, 2018
22dcde8
[readline][readline-win32] Rename to readline-win32 and only install …
ras0219-msft Aug 8, 2018
2fcb527
[vcpkg_from_github][vcpkg_apply_patches] Make PATCHES relative to the…
ras0219-msft Aug 8, 2018
f40312d
[vcpkg_install_msbuild][vcpkg_check_linkage] Introduce vcpkg_install_…
ras0219-msft Aug 8, 2018
7d552f9
[libimobiledevice et al] Use vcpkg_from_github() and vcpkg_install_ms…
ras0219-msft Aug 8, 2018
e8cb974
[readline] Fix static builds
ras0219-msft Aug 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/maintainers/portfile-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [vcpkg\_apply\_patches](vcpkg_apply_patches.md)
- [vcpkg\_build\_cmake](vcpkg_build_cmake.md)
- [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md)
- [vcpkg\_check\_linkage](vcpkg_check_linkage.md)
- [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md)
- [vcpkg\_copy\_pdbs](vcpkg_copy_pdbs.md)
- [vcpkg\_copy\_tool\_dependencies](vcpkg_copy_tool_dependencies.md)
Expand All @@ -15,3 +16,4 @@
- [vcpkg\_from\_bitbucket](vcpkg_from_bitbucket.md)
- [vcpkg\_from\_github](vcpkg_from_github.md)
- [vcpkg\_install\_cmake](vcpkg_install_cmake.md)
- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md)
3 changes: 2 additions & 1 deletion docs/maintainers/vcpkg_build_msbuild.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vcpkg_build_msbuild

Build an msbuild-based project.
Build an msbuild-based project. Deprecated in favor of `vcpkg_install_msbuild()`.

## Usage
```cmake
Expand All @@ -15,6 +15,7 @@ vcpkg_build_msbuild(
[OPTIONS </p:ZLIB_INCLUDE_PATH=X>...]
[OPTIONS_RELEASE </p:ZLIB_LIB=X>...]
[OPTIONS_DEBUG </p:ZLIB_LIB=X>...]
[USE_VCPKG_INTEGRATION]
)
```

Expand Down
34 changes: 34 additions & 0 deletions docs/maintainers/vcpkg_check_linkage.md
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:/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake)

## Source
[scripts/cmake/vcpkg_check_linkage.cmake](https:/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_linkage.cmake)
88 changes: 88 additions & 0 deletions docs/maintainers/vcpkg_install_msbuild.md
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:/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake)

## Source
[scripts/cmake/vcpkg_install_msbuild.cmake](https:/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_msbuild.cmake)
3 changes: 3 additions & 0 deletions ports/getopt-win32/CONTROL
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:/libimobiledevice-win32
24 changes: 24 additions & 0 deletions ports/getopt-win32/portfile.cmake
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/)
3 changes: 2 additions & 1 deletion ports/getopt/CONTROL
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)
65 changes: 3 additions & 62 deletions ports/getopt/portfile.cmake
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:/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)
4 changes: 4 additions & 0 deletions ports/ideviceinstaller/CONTROL
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
18 changes: 18 additions & 0 deletions ports/ideviceinstaller/portfile.cmake
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)
4 changes: 4 additions & 0 deletions ports/idevicerestore/CONTROL
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
18 changes: 18 additions & 0 deletions ports/idevicerestore/portfile.cmake
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)
4 changes: 4 additions & 0 deletions ports/libideviceactivation/CONTROL
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
22 changes: 22 additions & 0 deletions ports/libideviceactivation/portfile.cmake
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)
4 changes: 4 additions & 0 deletions ports/libimobiledevice/CONTROL
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
20 changes: 20 additions & 0 deletions ports/libimobiledevice/portfile.cmake
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
)
4 changes: 4 additions & 0 deletions ports/libirecovery/CONTROL
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
22 changes: 22 additions & 0 deletions ports/libirecovery/portfile.cmake
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)
3 changes: 3 additions & 0 deletions ports/libplist/CONTROL
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
Loading