From ac050cb103929b2ad0120d27122adb765e558033 Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Tue, 25 Apr 2023 22:41:00 +0300 Subject: [PATCH] Add Windows Arm64 support IB-7921 Signed-off-by: Raul Metsma --- libdigidocpp.wxs | 6 + .../openssl/windows/portfile.cmake | 2 +- .../001_xml-security-c-2.0.1-win.patch | 309 +++++++++++++++++- patches/vcpkg-ports/xml-security-c/vcpkg.json | 2 +- 4 files changed, 312 insertions(+), 7 deletions(-) diff --git a/libdigidocpp.wxs b/libdigidocpp.wxs index 9fa9f7038..8b6452d2e 100644 --- a/libdigidocpp.wxs +++ b/libdigidocpp.wxs @@ -4,6 +4,12 @@ + + + + + + diff --git a/patches/vcpkg-ports/openssl/windows/portfile.cmake b/patches/vcpkg-ports/openssl/windows/portfile.cmake index d992bc287..9b98f148e 100644 --- a/patches/vcpkg-ports/openssl/windows/portfile.cmake +++ b/patches/vcpkg-ports/openssl/windows/portfile.cmake @@ -21,7 +21,7 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") elseif(VCPKG_DETECTED_CMAKE_C_COMPILER_ID MATCHES "Clang") set(OPENSSL_ARCH VC-CLANG-WIN64-CLANGASM-ARM) else() - set(OPENSSL_ARCH VC-WIN64-CLANGASM-ARM) + set(OPENSSL_ARCH VC-WIN64-ARM) endif() else() message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") diff --git a/patches/vcpkg-ports/xml-security-c/001_xml-security-c-2.0.1-win.patch b/patches/vcpkg-ports/xml-security-c/001_xml-security-c-2.0.1-win.patch index c162bd392..3040016bb 100644 --- a/patches/vcpkg-ports/xml-security-c/001_xml-security-c-2.0.1-win.patch +++ b/patches/vcpkg-ports/xml-security-c/001_xml-security-c-2.0.1-win.patch @@ -1,8 +1,199 @@ -diff -U3 -r xml-security-c-2.0.1.orig/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcxproj xml-security-c-2.0.1/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcxproj ---- xml-security-c-2.0.1.orig/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcxproj 2018-06-18 17:48:30.000000000 +0300 -+++ xml-security-c-2.0.1/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcxproj 2019-01-08 14:34:07.000000000 +0200 -@@ -166,287 +166,191 @@ +diff -U3 -r xml-security-c-2.0.4.orig/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcxproj xml-security-c-2.0.4/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcxproj +--- xml-security-c-2.0.4.orig/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcxproj 2018-06-18 17:48:30 ++++ xml-security-c-2.0.4/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcxproj 2023-04-26 11:16:34 +@@ -1,6 +1,10 @@ + + + ++ ++ Debug Minimal ++ ARM64 ++ + + Debug Minimal + Win32 +@@ -9,6 +13,10 @@ + Debug Minimal + x64 + ++ ++ Debug ++ ARM64 ++ + + Debug + Win32 +@@ -17,6 +25,10 @@ + Debug + x64 + ++ ++ Release Minimal ++ ARM64 ++ + + Release Minimal + Win32 +@@ -25,6 +37,10 @@ + Release Minimal + x64 + ++ ++ Release ++ ARM64 ++ + + Release + Win32 +@@ -68,24 +84,48 @@ + true + v141 + ++ ++ DynamicLibrary ++ MultiByte ++ true ++ v141 ++ + + DynamicLibrary + false + MultiByte + v141 + ++ ++ DynamicLibrary ++ false ++ MultiByte ++ v141 ++ + + DynamicLibrary + MultiByte + true + v141 + ++ ++ DynamicLibrary ++ MultiByte ++ true ++ v141 ++ + + DynamicLibrary + false + MultiByte + v141 + ++ ++ DynamicLibrary ++ false ++ MultiByte ++ v141 ++ + + + +@@ -104,15 +144,27 @@ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -120,335 +172,351 @@ + ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ + true + ../../../../Build/$(Platform)/VC15/$(Configuration)/ ++ ../../../../Build/$(Platform)/VC15/$(Configuration)/ + ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ ++ ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ + true ++ true + ../../../../Build/$(Platform)/VC15/$(Configuration)/ + ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ + false + ../../../../Build/$(Platform)/VC15/$(Configuration)/ ++ ../../../../Build/$(Platform)/VC15/$(Configuration)/ + ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ ++ ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ + false ++ false + ../../../../Build/$(Platform)/VC15/$(Configuration)/ + ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ + true + ../../../../Build/$(Platform)/VC15/$(Configuration)/ ++ ../../../../Build/$(Platform)/VC15/$(Configuration)/ + ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ ++ ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ + true ++ true + ../../../../Build/$(Platform)/VC15/$(Configuration)/ + ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ + false + ../../../../Build/$(Platform)/VC15/$(Configuration)/ ++ ../../../../Build/$(Platform)/VC15/$(Configuration)/ + ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ ++ ../../../../Build/$(Platform)/VC15/$(Configuration)/$(ProjectName)/obj/ + false ++ false + AllRules.ruleset + + + AllRules.ruleset ++ AllRules.ruleset + ++ + ++ + AllRules.ruleset + + + AllRules.ruleset ++ AllRules.ruleset + ++ + ++ + AllRules.ruleset + + + AllRules.ruleset ++ AllRules.ruleset + ++ + ++ + AllRules.ruleset + + + AllRules.ruleset ++ AllRules.ruleset + ++ ++ - @@ -85,6 +276,29 @@ diff -U3 -r xml-security-c-2.0.1.orig/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcx + $(XALANCROOT)\Build\Win64\VC10\Debug;$(XALANCROOT)\lib;$(XERCESCROOT)\Build\Win64\VC15\Debug;$(XERCESCROOT)\lib;$(OPENSSLROOT)\lib\VC;$(OPENSSLROOT)\lib;%(AdditionalLibraryDirectories) ++ ++ ++ ++ Disabled ++ $(XALANCROOT)/Build/Win64/VC15/Debug/Nls/Include;$(XALANCROOT)/include;$(XALANCROOT)/src;$(XERCESCROOT)/include;$(XERCESCROOT)/src;$(OPENSSLROOT)/include;../../../..;%(AdditionalIncludeDirectories) ++ XSEC_HAVE_OPENSSL;_XSEC_DO_MEMDEBUG;WIN32;_DEBUG;_WINDOWS;_USRDLL;DLL_EXPORT;XSEC_BUILDING_LIBRARY;XSEC_HAVE_XALAN;%(PreprocessorDefinitions) ++ false ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ Level3 ++ ProgramDatabase ++ false ++ true ++ ++ ++ Xalan-C_1D.lib;xerces-c_3D.lib;crypt32.lib;wsock32.lib;libcrypto.lib;%(AdditionalDependencies) ++ $(OutDir)xsec_2_0D.dll ++ true ++ Windows ++ $(OutDir)xsec_2D.lib ++ $(XALANCROOT)\Build\Win64\VC10\Debug;$(XALANCROOT)\lib;$(XERCESCROOT)\Build\Win64\VC15\Debug;$(XERCESCROOT)\lib;$(OPENSSLROOT)\lib\VC;$(OPENSSLROOT)\lib;%(AdditionalLibraryDirectories) ++ ++ - - @@ -162,6 +376,27 @@ diff -U3 -r xml-security-c-2.0.1.orig/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcx + $(XALANCROOT)\Build\Win64\VC10\Release;$(XALANCROOT)\lib;$(XERCESCROOT)\Build\Win64\VC15\Release;$(XERCESCROOT)\lib;$(OPENSSLROOT)\lib\VC;$(OPENSSLROOT)\lib;%(AdditionalLibraryDirectories) ++ ++ ++ ++ $(XALANCROOT)/Build/Win64/VC15/Release/Nls/Include;$(XALANCROOT)/include;$(XALANCROOT)/src;$(XERCESCROOT)/include;$(XERCESCROOT)/src;$(OPENSSLROOT)/include;../../../..;%(AdditionalIncludeDirectories) ++ XSEC_HAVE_OPENSSL;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORT;XSEC_BUILDING_LIBRARY;XSEC_HAVE_XALAN;%(PreprocessorDefinitions) ++ Level3 ++ ProgramDatabase ++ true ++ true ++ ++ ++ Xalan-C_1.lib;xerces-c_3.lib;crypt32.lib;wsock32.lib;libcrypto.lib;%(AdditionalDependencies) ++ $(OutDir)xsec_2_0.dll ++ Windows ++ true ++ true ++ $(OutDir)xsec_2.lib ++ true ++ $(XALANCROOT)\Build\Win64\VC10\Release;$(XALANCROOT)\lib;$(XERCESCROOT)\Build\Win64\VC15\Release;$(XERCESCROOT)\lib;$(OPENSSLROOT)\lib\VC;$(OPENSSLROOT)\lib;%(AdditionalLibraryDirectories) ++ ++ - - @@ -241,6 +476,29 @@ diff -U3 -r xml-security-c-2.0.1.orig/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcx + $(XERCESCROOT)\Build\Win64\VC15\Debug;$(XERCESCROOT)\lib;$(OPENSSLROOT)\lib\VC;$(OPENSSLROOT)\lib;%(AdditionalLibraryDirectories) ++ ++ ++ ++ Disabled ++ $(XERCESCROOT)/include;$(XERCESCROOT)/src;$(OPENSSLROOT)/include;../../../..;%(AdditionalIncludeDirectories) ++ XSEC_HAVE_OPENSSL;_CRT_SECURE_NO_DEPRECATE;_XSEC_DO_MEMDEBUG;WIN32;_DEBUG;_WINDOWS;_USRDLL;XSEC_BUILDING_LIBRARY;%(PreprocessorDefinitions) ++ false ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ Level3 ++ ProgramDatabase ++ false ++ true ++ ++ ++ xerces-c_3D.lib;crypt32.lib;libcrypto.lib;%(AdditionalDependencies) ++ $(OutDir)xsec_2_0D.dll ++ true ++ Windows ++ $(OutDir)xsec_2D.lib ++ $(XERCESCROOT)\Build\Win64\VC15\Debug;$(XERCESCROOT)\lib;$(OPENSSLROOT)\lib\VC;$(OPENSSLROOT)\lib;%(AdditionalLibraryDirectories) ++ ++ - - @@ -316,8 +574,49 @@ diff -U3 -r xml-security-c-2.0.1.orig/Projects/VC15.0/xsec/xsec_lib/xsec_lib.vcx + $(XERCESCROOT)\Build\Win64\VC15\Release;$(XERCESCROOT)\lib;$(OPENSSLROOT)\lib\VC;$(OPENSSLROOT)\lib;%(AdditionalLibraryDirectories) ++ ++ ++ ++ $(XERCESCROOT)/include;$(XERCESCROOT)/src;$(OPENSSLROOT)/include;../../../..;%(AdditionalIncludeDirectories) ++ XSEC_HAVE_OPENSSL;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;_USRDLL;XSEC_BUILDING_LIBRARY;%(PreprocessorDefinitions) ++ ProgramDatabase ++ true ++ Level3 ++ true ++ ++ ++ xerces-c_3.lib;crypt32.lib;libcrypto.lib;%(AdditionalDependencies) ++ $(OutDir)xsec_2_0.dll ++ Windows ++ true ++ true ++ $(OutDir)xsec_2.lib ++ true ++ $(XERCESCROOT)\Build\Win64\VC15\Release;$(XERCESCROOT)\lib;$(OPENSSLROOT)\lib\VC;$(OPENSSLROOT)\lib;%(AdditionalLibraryDirectories) ++ ++ -@@ -822,4 +726,4 @@ + + +@@ -686,13 +754,17 @@ + true + true + true ++ true + true ++ true + + + true + true + true ++ true + true ++ true + + + +@@ -822,4 +894,4 @@ diff --git a/patches/vcpkg-ports/xml-security-c/vcpkg.json b/patches/vcpkg-ports/xml-security-c/vcpkg.json index c1c46811f..c3a81015c 100644 --- a/patches/vcpkg-ports/xml-security-c/vcpkg.json +++ b/patches/vcpkg-ports/xml-security-c/vcpkg.json @@ -7,5 +7,5 @@ "xalan-c", "openssl" ], - "supports": "windows & (x86 | x64)" + "supports": "windows & (x86 | x64 | arm64)" }