From 1081778b849da6c6412379b50ca66d049228c1e7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 23 Aug 2017 22:15:02 -0700 Subject: [PATCH] [openssl] Improve Windows SDK support (contract version detection) --- ports/openssl/fix-uwp-pathlib.patch | 13 ------ ports/openssl/make-openssl.bat | 9 +--- ports/openssl/portfile-uwp.cmake | 67 +++++++++-------------------- 3 files changed, 23 insertions(+), 66 deletions(-) delete mode 100644 ports/openssl/fix-uwp-pathlib.patch diff --git a/ports/openssl/fix-uwp-pathlib.patch b/ports/openssl/fix-uwp-pathlib.patch deleted file mode 100644 index 17a1a4e10..000000000 --- a/ports/openssl/fix-uwp-pathlib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git "a/ms/setVSvars.bat" "b/ms/setVSvars.bat" -index e6ebc0a7..cde9afb2 100644 ---- "a/ms/setVSvars.bat" -+++ "b/ms/setVSvars.bat" -@@ -179,7 +179,7 @@ exit /b - call:setVar _VS14VC VisualStudio14VC - call:setVar _WKITS10 WindowsKits10.0 - set PATH=%_VS14VCBin%;%PATH% -- set "LIBPATH=%_WKITS10%UnionMetadata\Facade;%_VS14VC%vcpackages;%_WKITS10%references\windows.foundation.foundationcontract\1.0.0.0\;%_WKITS10%references\windows.foundation.universalapicontract\1.0.0.0\" -+ set "LIBPATH=%_WKITS10%UnionMetadata\Facade;%_VS14VC%vcpackages;%_WKITS10%references\windows.foundation.foundationcontract\2.0.0.0\;%_WKITS10%references\windows.foundation.universalapicontract\3.0.0.0\" - goto :eof - - :end diff --git a/ports/openssl/make-openssl.bat b/ports/openssl/make-openssl.bat index 6f0afdf74..4f6488e8d 100644 --- a/ports/openssl/make-openssl.bat +++ b/ports/openssl/make-openssl.bat @@ -2,13 +2,8 @@ set build=%1 perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL -FS -FIWindows.h -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\3.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\2.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\1.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\4.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\3.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\2.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\1.0.0.0\ +for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\ +for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\ call ms\do_winuniversal.bat diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index e1f7a7932..4f83f2eed 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -43,75 +43,50 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-uwp-pathlib.patch -) - file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll) file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll) file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll) -file(COPY -${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat -DESTINATION ${SOURCE_PATH}) +file( + COPY ${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat + DESTINATION ${SOURCE_PATH} +) message(STATUS "Build ${TARGET_TRIPLET}") - vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/make-openssl.bat ${UWP_PLATFORM} + COMMAND ${SOURCE_PATH}/make-openssl.bat ${UWP_PLATFORM} WORKING_DIRECTORY ${SOURCE_PATH} LOGNAME make-openssl-${TARGET_TRIPLET} ) - - message(STATUS "Build ${TARGET_TRIPLET} done") - - file( COPY ${SOURCE_PATH}/inc32/openssl DESTINATION ${CURRENT_PACKAGES_DIR}/include ) -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.dll +file(INSTALL + ${SOURCE_PATH}/out32dll/libeay32.dll + ${SOURCE_PATH}/out32dll/libeay32.pdb + ${SOURCE_PATH}/out32dll/ssleay32.dll + ${SOURCE_PATH}/out32dll/ssleay32.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.lib +file(INSTALL + ${SOURCE_PATH}/out32dll/libeay32.lib + ${SOURCE_PATH}/out32dll/ssleay32.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - - - -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.dll +file(INSTALL + ${SOURCE_PATH}/out32dll/libeay32.dll + ${SOURCE_PATH}/out32dll/libeay32.pdb + ${SOURCE_PATH}/out32dll/ssleay32.dll + ${SOURCE_PATH}/out32dll/ssleay32.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.lib +file(INSTALL + ${SOURCE_PATH}/out32dll/libeay32.lib + ${SOURCE_PATH}/out32dll/ssleay32.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - - - file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright)