From d91e2ef669e45db8c62f320ad87b51f8e4ce9bed Mon Sep 17 00:00:00 2001 From: Cheney-Wang Date: Wed, 9 May 2018 04:30:38 -0700 Subject: [PATCH] FixpmdkFailure --- ports/pmdk/CONTROL | 2 +- ports/pmdk/addPowerShellExecutionPolicy.patch | 22 +++++++++++++++++++ ports/pmdk/portfile.cmake | 5 +++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ports/pmdk/addPowerShellExecutionPolicy.patch diff --git a/ports/pmdk/CONTROL b/ports/pmdk/CONTROL index f440b68bc5..c8346d1055 100644 --- a/ports/pmdk/CONTROL +++ b/ports/pmdk/CONTROL @@ -1,3 +1,3 @@ Source: pmdk -Version: 1.4-1 +Version: 1.4-2 Description: Persistent Memory Development Kit \ No newline at end of file diff --git a/ports/pmdk/addPowerShellExecutionPolicy.patch b/ports/pmdk/addPowerShellExecutionPolicy.patch new file mode 100644 index 0000000000..bb03d23bb9 --- /dev/null +++ b/ports/pmdk/addPowerShellExecutionPolicy.patch @@ -0,0 +1,22 @@ +diff --git a/srcversion.vcxproj b/srcversion.vcxproj +index 8761197..795d1a7 100644 +--- a/srcversion.vcxproj ++++ b/srcversion.vcxproj +@@ -72,7 +72,7 @@ + + + +- powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) ++ powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) + __NON_EXISTENT_FILE__ + generate srcversion.h + +@@ -99,7 +99,7 @@ + + + +- powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) ++ powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) + __NON_EXISTENT_FILE__ + generate srcversion.h + diff --git a/ports/pmdk/portfile.cmake b/ports/pmdk/portfile.cmake index 89c48a8fbd..0e292aa2cb 100644 --- a/ports/pmdk/portfile.cmake +++ b/ports/pmdk/portfile.cmake @@ -26,6 +26,11 @@ vcpkg_from_github( get_filename_component(PMDK_VERSION "${SOURCE_PATH}" NAME) string(REPLACE "pmdk-" "" PMDK_VERSION "${PMDK_VERSION}") +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH}/src/windows/srcversion + PATCHES "${CMAKE_CURRENT_LIST_DIR}/addPowerShellExecutionPolicy.patch" +) + # Build only the selected projects vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln