[libusbmuxd]Upgrade to 1.2.137. Fix pkgconfig path.

This commit is contained in:
JackBoosY 2019-11-05 00:04:18 -08:00
parent 98f1a953e6
commit c920ad433e
6 changed files with 78 additions and 21 deletions

View File

@ -33,7 +33,7 @@ configure_file(
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libideviceactivation-1.0.pc
DESTINATION lib/libideviceactivation
DESTINATION lib/pkgconfig
)
install(FILES ${IDVCACTV_PUBLIC_HDR} DESTINATION include)

View File

@ -42,7 +42,7 @@ configure_file(
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libimobiledevice-1.0.pc
DESTINATION lib/libimobiledevice
DESTINATION lib/pkgconfig
)
install(FILES ${IMOBDEV_PUBLIC_HDR} DESTINATION include)

View File

@ -0,0 +1,42 @@
cmake_minimum_required(VERSION 3.0)
project(libusbmuxd C)
# find dependencies
find_path(libplist_INCLUDES plist.h PATH_SUFFIXES plist)
set(libplist_INCLUDES ${libplist_INCLUDES}/../)
find_library(libplist plist REQUIRED)
# ready to create library
file(GLOB_RECURSE IDVCACTV_TOOLS_HDR common/*.h)
file(GLOB_RECURSE IDVCACTV_TOOLS_SRC common/*.c)
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})
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()
target_link_libraries(libusbmuxd PRIVATE ${libplist})
# install
install(
TARGETS libusbmuxd
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/libusbmuxd.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd.pc
@ONLY
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd.pc
DESTINATION lib/pkgconfig
)
install(FILES ${IDVCACTV_PUBLIC_HDR} DESTINATION include)

View File

@ -1,4 +1,4 @@
Source: libusbmuxd
Version: 1.2.77-1
Version: 1.2.137
Description: A client library to multiplex connections from and to iOS devices
Build-Depends: libplist

View File

@ -0,0 +1,20 @@
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
index e85cf4a..35ed1b5 100644
--- a/src/libusbmuxd.c
+++ b/src/libusbmuxd.c
@@ -86,6 +86,15 @@ static char* stpncpy(char *dst, const char *src, size_t len)
}
#endif
+#ifdef WIN32
+int strcasecmp(char *s1, char *s2)
+{
+ while (toupper((unsigned char)*s1) == toupper((unsigned char)*s2++))
+ if (*s1++ == '\0') return 0;
+ return(toupper((unsigned char)*s1) - toupper((unsigned char)*--s2));
+}
+#endif
+
#include <plist/plist.h>
#define PLIST_CLIENT_VERSION_STRING PACKAGE_STRING
#define PLIST_LIBUSBMUX_VERSION 3

View File

@ -1,28 +1,23 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_DYNAMIC_CRT ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libimobiledevice-win32/libusbmuxd
REF a4422aa65f3635d99c3b80fad18f093ef3c5f653
SHA512 9446bbcd6b901e6183f6e86d7fe7301c01182ae5b9330182fbca529bb1db54250cd6012256a420d457a7243388811c94bb2ecf5a0747238714d00b3850e60e8e
REF b9643ca81b8274fbb2411d3c66c4edf103f6a711 # v1.2.137
SHA512 f4c9537349bfac2140c809be24cc573d92087a57f20d90e2abd46d0a2098e31ccd283ab776302b61470fb08d45f8dc2cfb8bd8678cba7db5b2a9b51c270a3cc8
HEAD_REF msvc-master
PATCHES fix-win-build.patch
)
set(ENV{_CL_} "$ENV{_CL_} /GL-")
set(ENV{_LINK_} "$ENV{_LINK_} /LTCG:OFF")
configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY)
vcpkg_install_msbuild(
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH libusbmuxd.sln
INCLUDES_SUBPATH include
LICENSE_SUBPATH COPYING
USE_VCPKG_INTEGRATION
ALLOW_ROOT_INCLUDES
PREFER_NINJA
)
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/Makefile.am")
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)