aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/idevicerestore
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/idevicerestore
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/idevicerestore')
-rw-r--r--vcpkg/ports/idevicerestore/CMakeLists.txt59
-rw-r--r--vcpkg/ports/idevicerestore/portfile.cmake22
-rw-r--r--vcpkg/ports/idevicerestore/vcpkg.json23
3 files changed, 104 insertions, 0 deletions
diff --git a/vcpkg/ports/idevicerestore/CMakeLists.txt b/vcpkg/ports/idevicerestore/CMakeLists.txt
new file mode 100644
index 0000000..cff54d9
--- /dev/null
+++ b/vcpkg/ports/idevicerestore/CMakeLists.txt
@@ -0,0 +1,59 @@
+cmake_minimum_required(VERSION 3.15)
+project(idevicerestore C)
+
+include(GNUInstallDirs)
+
+file(GLOB_RECURSE IDEVICERESTORE_SOURCE src/*.c src/*.h)
+list(FILTER IDEVICERESTORE_SOURCE EXCLUDE REGEX "sha(1|512)\\.(c|h)$")
+
+set(DEFINITIONS)
+
+list(APPEND DEFINITIONS -DPACKAGE_NAME="idevicerestore")
+list(APPEND DEFINITIONS -DPACKAGE_VERSION="1.0.0")
+list(APPEND DEFINITIONS -DPACKAGE_URL="https://github.com/libimobiledevice/idevicerestore")
+list(APPEND DEFINITIONS -DPACKAGE_BUGREPORT="https://github.com/libimobiledevice/idevicerestore/issues")
+
+list(APPEND DEFINITIONS -DHAVE_REVERSE_PROXY)
+
+list(APPEND DEFINITIONS -DHAVE_OPENSSL)
+
+if(UNIX)
+ list(APPEND DEFINITIONS -DHAVE_REALPATH)
+endif()
+
+if(WIN32)
+ list(APPEND DEFINITIONS -D_CRT_SECURE_NO_WARNINGS)
+ list(APPEND DEFINITIONS -DWIN32)
+endif()
+
+find_package(CURL CONFIG REQUIRED)
+find_package(unofficial-libimobiledevice CONFIG REQUIRED)
+find_package(unofficial-libimobiledevice-glue CONFIG REQUIRED)
+find_package(unofficial-libirecovery CONFIG REQUIRED)
+find_package(libzip CONFIG REQUIRED)
+find_package(OpenSSL REQUIRED)
+find_package(ZLIB REQUIRED)
+find_path(DIRENT_INCLUDE_DIR dirent.h REQUIRED)
+
+add_executable(idevicerestore ${IDEVICERESTORE_SOURCE})
+target_include_directories(idevicerestore PRIVATE
+ ${DIRENT_INCLUDE_DIR}
+)
+target_compile_definitions(idevicerestore PRIVATE ${DEFINITIONS})
+target_link_libraries(idevicerestore PRIVATE
+ CURL::libcurl
+ unofficial::libimobiledevice::libimobiledevice
+ unofficial::libimobiledevice-glue::libimobiledevice-glue
+ unofficial::libirecovery::libirecovery
+ libzip::zip
+ OpenSSL::SSL
+ OpenSSL::Crypto
+ ZLIB::ZLIB
+)
+if(WIN32)
+ find_package(unofficial-getopt-win32 REQUIRED)
+ target_link_libraries(idevicerestore PRIVATE unofficial::getopt-win32::getopt)
+endif()
+
+install(TARGETS idevicerestore
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
diff --git a/vcpkg/ports/idevicerestore/portfile.cmake b/vcpkg/ports/idevicerestore/portfile.cmake
new file mode 100644
index 0000000..de3dfd2
--- /dev/null
+++ b/vcpkg/ports/idevicerestore/portfile.cmake
@@ -0,0 +1,22 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO libimobiledevice/idevicerestore
+ REF 609f7f058487596597e8e742088119fdd46729df # commits on 2023-05-23
+ SHA512 9427c438d1967f1717424dd1d1b789d3d139b3fcacee15911e531d6377039927c147150dafacd251b92d57134e72c49de6e1a053fcd63f14c780e60dc5b13fc5
+ HEAD_REF master
+)
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+)
+
+vcpkg_cmake_install()
+vcpkg_copy_tools(TOOL_NAMES idevicerestore AUTO_CLEAN)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
+
+set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
diff --git a/vcpkg/ports/idevicerestore/vcpkg.json b/vcpkg/ports/idevicerestore/vcpkg.json
new file mode 100644
index 0000000..674562d
--- /dev/null
+++ b/vcpkg/ports/idevicerestore/vcpkg.json
@@ -0,0 +1,23 @@
+{
+ "name": "idevicerestore",
+ "version-date": "2023-05-23",
+ "description": "Restore/upgrade firmware of iOS devices",
+ "homepage": "https://libimobiledevice.org/",
+ "license": "LGPL-3.0-or-later",
+ "supports": "(!windows & !android & !ios) | mingw",
+ "dependencies": [
+ "curl",
+ "dirent",
+ "getopt",
+ "libimobiledevice",
+ "libimobiledevice-glue",
+ "libirecovery",
+ "libzip",
+ "openssl",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ "zlib"
+ ]
+}