From d2b22891a13123accac084b5feabfd0914f4e243 Mon Sep 17 00:00:00 2001 From: Zac Walker Date: Mon, 7 Feb 2022 21:13:11 +0100 Subject: [PATCH] [Hunspell] Add Windows ARM64 Support (#22979) * [Hunspell] Add Windows ARM64 Support * Update version database * Update version database (second try) --- ports/hunspell/0004-add-win-arm64.patch | 529 ++++++++++++++++++++++++ ports/hunspell/portfile.cmake | 3 + ports/hunspell/vcpkg.json | 4 +- versions/baseline.json | 2 +- versions/h-/hunspell.json | 5 + 5 files changed, 540 insertions(+), 3 deletions(-) create mode 100644 ports/hunspell/0004-add-win-arm64.patch diff --git a/ports/hunspell/0004-add-win-arm64.patch b/ports/hunspell/0004-add-win-arm64.patch new file mode 100644 index 00000000000000..271bc788877473 --- /dev/null +++ b/ports/hunspell/0004-add-win-arm64.patch @@ -0,0 +1,529 @@ +diff --git a/msvc/Hunspell.sln b/msvc/Hunspell.sln +index dabd755..9b0d996 100644 +--- a/msvc/Hunspell.sln ++++ b/msvc/Hunspell.sln +@@ -11,46 +11,66 @@ Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug_dll|Win32 = Debug_dll|Win32 + Debug_dll|x64 = Debug_dll|x64 ++ Debug_dll|ARM64 = Debug_dll|ARM64 + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 ++ Debug|ARM64 = Debug|ARM64 + Release_dll|Win32 = Release_dll|Win32 + Release_dll|x64 = Release_dll|x64 ++ Release_dll|ARM64 = Release_dll|ARM64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 ++ Release|ARM64 = Release|ARM64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug_dll|Win32.ActiveCfg = Debug_dll|Win32 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug_dll|Win32.Build.0 = Debug_dll|Win32 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug_dll|x64.ActiveCfg = Debug_dll|x64 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug_dll|x64.Build.0 = Debug_dll|x64 ++ {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug_dll|ARM64.ActiveCfg = Debug_dll|ARM64 ++ {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug_dll|ARM64.Build.0 = Debug_dll|ARM64 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug|Win32.ActiveCfg = Debug|Win32 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug|Win32.Build.0 = Debug|Win32 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug|x64.ActiveCfg = Debug|x64 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug|x64.Build.0 = Debug|x64 ++ {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug|ARM64.ActiveCfg = Debug|ARM64 ++ {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug|ARM64.Build.0 = Debug|ARM64 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release_dll|Win32.ActiveCfg = Release_dll|Win32 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release_dll|Win32.Build.0 = Release_dll|Win32 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release_dll|x64.ActiveCfg = Release_dll|x64 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release_dll|x64.Build.0 = Release_dll|x64 ++ {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release_dll|ARM64.ActiveCfg = Release_dll|ARM64 ++ {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release_dll|ARM64.Build.0 = Release_dll|ARM64 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release|Win32.ActiveCfg = Release|Win32 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release|Win32.Build.0 = Release|Win32 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release|x64.ActiveCfg = Release|x64 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release|x64.Build.0 = Release|x64 ++ {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release|ARM64.ActiveCfg = Release|ARM64 ++ {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release|ARM64.Build.0 = Release|ARM64 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug_dll|Win32.ActiveCfg = Debug|Win32 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug_dll|Win32.Build.0 = Debug|Win32 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug_dll|x64.ActiveCfg = Debug|x64 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug_dll|x64.Build.0 = Debug|x64 ++ {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug_dll|ARM64.ActiveCfg = Debug|ARM64 ++ {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug_dll|ARM64.Build.0 = Debug|ARM64 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug|Win32.Build.0 = Debug|Win32 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug|x64.ActiveCfg = Debug|x64 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug|x64.Build.0 = Debug|x64 ++ {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug|ARM64.ActiveCfg = Debug|ARM64 ++ {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug|ARM64.Build.0 = Debug|ARM64 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release_dll|Win32.ActiveCfg = Release|Win32 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release_dll|Win32.Build.0 = Release|Win32 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release_dll|x64.ActiveCfg = Release|x64 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release_dll|x64.Build.0 = Release|x64 ++ {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release_dll|ARM64.ActiveCfg = Release|ARM64 ++ {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release_dll|ARM64.Build.0 = Release|ARM64 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release|Win32.ActiveCfg = Release|Win32 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release|Win32.Build.0 = Release|Win32 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release|x64.ActiveCfg = Release|x64 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release|x64.Build.0 = Release|x64 ++ {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release|ARM64.ActiveCfg = Release|ARM64 ++ {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Release|ARM64.Build.0 = Release|ARM64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE +diff --git a/msvc/hunspell.vcxproj b/msvc/hunspell.vcxproj +index d4817a5..b8afa73 100644 +--- a/msvc/hunspell.vcxproj ++++ b/msvc/hunspell.vcxproj +@@ -9,6 +9,10 @@ + Debug + x64 + ++ ++ Debug ++ ARM64 ++ + + Release + Win32 +@@ -17,6 +21,10 @@ + Release + x64 + ++ ++ Release ++ ARM64 ++ + + + {6A0453F4-B12A-4810-B9A2-8AB059316ED7} +@@ -37,6 +45,12 @@ + MultiByte + true + ++ ++ Application ++ v141 ++ MultiByte ++ true ++ + + Application + v140_xp +@@ -47,6 +61,11 @@ + v140_xp + MultiByte + ++ ++ Application ++ v141 ++ MultiByte ++ + + + +@@ -56,12 +75,18 @@ + + + ++ ++ ++ + + + + + + ++ ++ ++ + + + <_ProjectFileVersion>14.0.25420.1 +@@ -75,6 +100,10 @@ + true + $(Platform)\$(Configuration)\$(ProjectName)\ + ++ ++ true ++ $(Platform)\$(Configuration)\$(ProjectName)\ ++ + + $(SolutionDir)$(Configuration)\$(ProjectName)\ + $(Configuration)\$(ProjectName)\ +@@ -84,6 +113,10 @@ + false + $(Platform)\$(Configuration)\$(ProjectName)\ + ++ ++ false ++ $(Platform)\$(Configuration)\$(ProjectName)\ ++ + + + Disabled +@@ -128,6 +161,27 @@ + + + ++ ++ ++ Disabled ++ ..\src\hunspell;..\src\parsers;.;%(AdditionalIncludeDirectories) ++ W32;WIN32;_DEBUG;_CONSOLE;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ++ EnableFastChecks ++ MultiThreadedDebug ++ ++ ++ Level4 ++ ProgramDatabase ++ $(IntDir)$(ProjectName).pdb ++ 4127;4267;4706 ++ ++ ++ true ++ Console ++ ++ ++ ++ + + + Full +@@ -176,6 +230,30 @@ + + + ++ ++ ++ Full ++ AnySuitable ++ ..\src\hunspell;..\src\parsers;.;%(AdditionalIncludeDirectories) ++ W32;WIN32;NDEBUG;_CONSOLE;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ++ MultiThreaded ++ ++ ++ $(IntDir)$(ProjectName).pdb ++ Level4 ++ ++ ++ 4127;4267;4706 ++ ++ ++ true ++ Console ++ true ++ true ++ ++ ++ ++ + + + +diff --git a/msvc/libhunspell.vcxproj b/msvc/libhunspell.vcxproj +index 9a875ca..b7ed6b2 100644 +--- a/msvc/libhunspell.vcxproj ++++ b/msvc/libhunspell.vcxproj +@@ -9,6 +9,10 @@ + Debug_dll + x64 + ++ ++ Debug_dll ++ x64 ++ + + Debug + Win32 +@@ -17,6 +21,10 @@ + Debug + x64 + ++ ++ Debug ++ ARM64 ++ + + Release_dll + Win32 +@@ -24,6 +32,10 @@ + + Release_dll + x64 ++ ++ ++ Release_dll ++ ARM64 + + + Release +@@ -33,6 +45,10 @@ + Release + x64 + ++ ++ Release ++ ARM64 ++ + + + {53609BB3-D874-465C-AF7B-DF626DB0D89B} +@@ -53,6 +69,12 @@ + false + MultiByte + ++ ++ DynamicLibrary ++ v141 ++ false ++ MultiByte ++ + + DynamicLibrary + v140_xp +@@ -67,6 +89,13 @@ + MultiByte + true + ++ ++ DynamicLibrary ++ v141 ++ false ++ MultiByte ++ true ++ + + StaticLibrary + v140_xp +@@ -80,6 +109,13 @@ + false + MultiByte + true ++ ++ ++ StaticLibrary ++ v141 ++ false ++ MultiByte ++ true + + + StaticLibrary +@@ -93,6 +129,12 @@ + false + MultiByte + ++ ++ StaticLibrary ++ v140_xp ++ false ++ MultiByte ++ + + + +@@ -102,24 +144,36 @@ + + + ++ ++ ++ + + + + + + ++ ++ ++ + + + + + + ++ ++ ++ + + + + + + ++ ++ ++ + + + <_ProjectFileVersion>14.0.25420.1 +@@ -141,6 +195,10 @@ + + $(Platform)\$(Configuration)\$(ProjectName)\ + ++ ++ ++ $(Platform)\$(Configuration)\$(ProjectName)\ ++ + + $(SolutionDir)$(Configuration)\$(ProjectName)\ + $(Configuration)\$(ProjectName)\ +@@ -150,12 +208,23 @@ + true + $(Platform)\$(Configuration)\$(ProjectName)\ + ++ ++ true ++ $(Platform)\$(Configuration)\$(ProjectName)\ ++ + + $(Platform)\$(Configuration)\$(ProjectName)\ + ++ ++ $(Platform)\$(Configuration)\$(ProjectName)\ ++ + + $(Platform)\$(Configuration)\$(ProjectName)\ + ++ ++ $(Platform)\$(Configuration)\$(ProjectName)\ ++ ++ + + + echo N | copy /-Y ..\src\hunspell\hunvisapi.h.in ..\src\hunspell\hunvisapi.h +@@ -196,6 +265,25 @@ + + + ++ ++ ++ echo N | copy /-Y ..\src\hunspell\hunvisapi.h.in ..\src\hunspell\hunvisapi.h ++ ++ ++ Disabled ++ ..\src\hunspell;.;%(AdditionalIncludeDirectories) ++ WIN32;_DEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ++ false ++ EnableFastChecks ++ MultiThreadedDebug ++ ++ ++ Level4 ++ ProgramDatabase ++ 4706;4251;4267 ++ ++ ++ + + + echo N | copy /-Y ..\src\hunspell\hunvisapi.h.in ..\src\hunspell\hunvisapi.h +@@ -250,6 +338,34 @@ + false + + ++ ++ ++ echo N | copy /-Y ..\src\hunspell\hunvisapi.h.in ..\src\hunspell\hunvisapi.h ++ ++ ++ Full ++ AnySuitable ++ ..\src\hunspell;.;%(AdditionalIncludeDirectories) ++ WIN32;NDEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ++ true ++ MultiThreaded ++ true ++ ++ ++ $(IntDir)$(ProjectName).pdb ++ Level4 ++ ++ ++ 4706;4251;4267 ++ ++ ++ NDEBUG;%(PreprocessorDefinitions) ++ 0x0409 ++ ++ ++ false ++ ++ + + + echo N | copy /-Y ..\src\hunspell\hunvisapi.h.in ..\src\hunspell\hunvisapi.h +@@ -315,6 +431,39 @@ + Windows + + ++ ++ ++ echo N | copy /-Y ..\src\hunspell\hunvisapi.h.in ..\src\hunspell\hunvisapi.h ++ ++ ++ Full ++ AnySuitable ++ ..\src\hunspell;.;%(AdditionalIncludeDirectories) ++ WIN32;NDEBUG;_WINDOWS;_USRDLL;BUILDING_LIBHUNSPELL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) ++ true ++ MultiThreadedDLL ++ true ++ ++ ++ $(IntDir)$(ProjectName).pdb ++ Level4 ++ ++ ++ 4706;4251;4267 ++ ++ ++ NDEBUG;%(PreprocessorDefinitions) ++ 0x0409 ++ ++ ++ false ++ true ++ true ++ ++ ++ Windows ++ ++ + + + echo N | copy /-Y ..\src\hunspell\hunvisapi.h.in ..\src\hunspell\hunvisapi.h +@@ -366,6 +515,31 @@ + + + ++ ++ ++ echo N | copy /-Y ..\src\hunspell\hunvisapi.h.in ..\src\hunspell\hunvisapi.h ++ ++ ++ Disabled ++ ..\src\hunspell;.;%(AdditionalIncludeDirectories) ++ WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;BUILDING_LIBHUNSPELL;%(PreprocessorDefinitions) ++ false ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ $(IntDir)$(ProjectName).pdb ++ Level4 ++ ProgramDatabase ++ 4706;4251;4267 ++ ++ ++ true ++ Windows ++ ++ ++ ++ + + + diff --git a/ports/hunspell/portfile.cmake b/ports/hunspell/portfile.cmake index 3a05bdb1b148fc..6c82edd18b007a 100644 --- a/ports/hunspell/portfile.cmake +++ b/ports/hunspell/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( 0001_fix_unistd.patch 0002-disable-test.patch 0003-fix-win-build.patch + 0004-add-win-arm64.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -23,6 +24,8 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) set(HUNSPELL_ARCH Win32) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(HUNSPELL_ARCH x64) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(HUNSPELL_ARCH ARM64) else() message(FATAL_ERROR "unsupported architecture") endif() diff --git a/ports/hunspell/vcpkg.json b/ports/hunspell/vcpkg.json index 914299495cc49d..ae1c6d393591a4 100644 --- a/ports/hunspell/vcpkg.json +++ b/ports/hunspell/vcpkg.json @@ -1,10 +1,10 @@ { "name": "hunspell", "version": "1.7.0", - "port-version": 7, + "port-version": 8, "description": "The most popular spellchecking library.", "homepage": "https://github.com/hunspell/hunspell", - "supports": "!(arm & windows) & !uwp", + "supports": "!uwp", "dependencies": [ "libiconv" ], diff --git a/versions/baseline.json b/versions/baseline.json index 17aabba0090fd2..0449fca8701b4d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2738,7 +2738,7 @@ }, "hunspell": { "baseline": "1.7.0", - "port-version": 7 + "port-version": 8 }, "hwloc": { "baseline": "2.5.0", diff --git a/versions/h-/hunspell.json b/versions/h-/hunspell.json index ff8c3b130a3f5d..7477d316120ba7 100644 --- a/versions/h-/hunspell.json +++ b/versions/h-/hunspell.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "9beac8cd192fb54839925b083fa72e611d7bcfee", + "version": "1.7.0", + "port-version": 8 + }, { "git-tree": "a7db92584496fe08ac10f8f32556ca89e14018aa", "version": "1.7.0",