diff --git a/ports/curl/0005_remove_imp_suffix.patch b/ports/curl/0005_remove_imp_suffix.patch new file mode 100644 index 000000000..356af2d52 --- /dev/null +++ b/ports/curl/0005_remove_imp_suffix.patch @@ -0,0 +1,13 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index eca9a8a..6f72955 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -97,7 +97,7 @@ endif() + set_target_properties(${LIB_NAME} PROPERTIES PREFIX "") + set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "") + +-if(WIN32) ++if(WIN32 AND 0) + if(BUILD_SHARED_LIBS) + # Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib" + set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib") diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 5366fe88c..091fe9205 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( 0002_fix_uwp.patch 0003_fix_libraries.patch 0004_nghttp2_staticlib.patch + 0005_remove_imp_suffix.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) @@ -140,17 +141,23 @@ if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/curl${EXECUTABLE_SUFFIX}") endif() endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib OR EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d_imp.lib) + # Because vcpkg only ever installs one or the other, there is no need to have the libraries be different names. + # Using the same name improves compatibility, because downstream projects can always rely on "libcurl.lib" + message(FATAL_ERROR "Curl's import library name should be consistent with the static library name.") +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) else() file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config) endif() file(READ ${CURRENT_PACKAGES_DIR}/include/curl/curl.h CURL_H) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") string(REPLACE "#ifdef CURL_STATICLIB" "#if 1" CURL_H "${CURL_H}") else() string(REPLACE "#ifdef CURL_STATICLIB" "#if 0" CURL_H "${CURL_H}") diff --git a/ports/idevicerestore/CONTROL b/ports/idevicerestore/CONTROL index 36c31d97c..ca6cabbd0 100644 --- a/ports/idevicerestore/CONTROL +++ b/ports/idevicerestore/CONTROL @@ -1,4 +1,4 @@ Source: idevicerestore -Version: 1.0.12-2 +Version: 1.0.12-3 Description: Restore/upgrade firmware of iOS devices Build-Depends: libimobiledevice, curl, libirecovery, libzip \ No newline at end of file diff --git a/ports/idevicerestore/libcurl_imp.patch b/ports/idevicerestore/libcurl_imp.patch deleted file mode 100644 index f93dfb2b5..000000000 --- a/ports/idevicerestore/libcurl_imp.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/idevicerestore.vcxproj b/idevicerestore.vcxproj -index fa209fae..cf89306b 100644 ---- a/idevicerestore.vcxproj -+++ b/idevicerestore.vcxproj -@@ -94,7 +94,7 @@ - _MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS - - -- kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies) -+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl-d_imp.lib;%(AdditionalDependencies) - - - -@@ -105,7 +105,7 @@ - _MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS - - -- kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies) -+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl-d_imp.lib;%(AdditionalDependencies) - - - -@@ -120,7 +120,7 @@ - - true - true -- kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies) -+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl_imp.lib;%(AdditionalDependencies) - - - -@@ -135,7 +135,7 @@ - - true - true -- kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies) -+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl_imp.lib;%(AdditionalDependencies) - - - diff --git a/ports/idevicerestore/portfile.cmake b/ports/idevicerestore/portfile.cmake index 271c249c6..67aeb4c37 100644 --- a/ports/idevicerestore/portfile.cmake +++ b/ports/idevicerestore/portfile.cmake @@ -6,20 +6,9 @@ vcpkg_from_github( REF 1.0.12 SHA512 ba623be56c2f37853516d7d4c32e16f1ec72f33d512f18aa812ce6830af4b9e389f7af5321888dd0ddd168e282b652e379b60f90970680e213eabf489f406915 HEAD_REF msvc-master + PATCHES libcurl_d.patch ) -if(${VCPKG_LIBRARY_LINKAGE} MATCHES dynamic) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - libcurl_imp.patch) -else() - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - libcurl_d.patch) -endif() - vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} PROJECT_SUBPATH idevicerestore.vcxproj diff --git a/ports/libideviceactivation/CONTROL b/ports/libideviceactivation/CONTROL index cbc1aef46..8ff0a857e 100644 --- a/ports/libideviceactivation/CONTROL +++ b/ports/libideviceactivation/CONTROL @@ -1,4 +1,4 @@ Source: libideviceactivation -Version: 1.2.68 +Version: 1.2.68-1 Description: A library to handle the activation process of iOS devices Build-Depends: libimobiledevice, libxml2, curl \ No newline at end of file diff --git a/ports/libideviceactivation/libcurl_imp.patch b/ports/libideviceactivation/libcurl_imp.patch deleted file mode 100644 index bf1bfefac..000000000 --- a/ports/libideviceactivation/libcurl_imp.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/libideviceactivation.vcxproj b/libideviceactivation.vcxproj -index ba473f7a..47a20d15 100644 ---- a/libideviceactivation.vcxproj -+++ b/libideviceactivation.vcxproj -@@ -76,7 +76,7 @@ - $(OutDir)$(ProjectName).pdb - - -- libcurl.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ libcurl-d_imp.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - -@@ -89,7 +89,7 @@ - $(OutDir)$(ProjectName).pdb - - -- libcurl.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ libcurl-d_imp.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - -@@ -106,7 +106,7 @@ - - true - true -- libcurl.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ libcurl_imp.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - -@@ -123,7 +123,7 @@ - - true - true -- libcurl.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ libcurl_imp.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - diff --git a/ports/libideviceactivation/portfile.cmake b/ports/libideviceactivation/portfile.cmake index a904b52ef..7e4776c69 100644 --- a/ports/libideviceactivation/portfile.cmake +++ b/ports/libideviceactivation/portfile.cmake @@ -5,23 +5,12 @@ vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libimobiledevice-win32/libideviceactivation - REF v1.2.68 + REF v1.2.68 SHA512 c2742bba2d90c21e853255c9ef1b9a63560c3e65541a0a3daaace9b0c48d236b7947008dbcd6e42622251015b686758ebc6b564e379d831cb4f52af812430140 HEAD_REF msvc-master + PATCHES libcurl_d.patch ) -if(${VCPKG_LIBRARY_LINKAGE} MATCHES dynamic) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - libcurl_imp.patch) -else() - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - libcurl_d.patch) -endif() - vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} PROJECT_SUBPATH libideviceactivation.sln