From dfb1dc08b444b5f351292bc8bc6cdd09d399bff5 Mon Sep 17 00:00:00 2001 From: driver1998 Date: Tue, 12 May 2020 06:42:41 +0800 Subject: [PATCH] [mpg123] Enable UWP support (#11287) * [mpg123] Enable UWP support * cleanup * [mpg123] Enable UWP CI --- ports/mpg123/0004-add-arm64-uwp-config.patch | 181 +++++++++++++++++++ ports/mpg123/CONTROL | 3 +- ports/mpg123/portfile.cmake | 36 +++- scripts/ci.baseline.txt | 2 - 4 files changed, 215 insertions(+), 7 deletions(-) create mode 100644 ports/mpg123/0004-add-arm64-uwp-config.patch diff --git a/ports/mpg123/0004-add-arm64-uwp-config.patch b/ports/mpg123/0004-add-arm64-uwp-config.patch new file mode 100644 index 000000000..be18b6a82 --- /dev/null +++ b/ports/mpg123/0004-add-arm64-uwp-config.patch @@ -0,0 +1,181 @@ +diff --git a/ports/MSVC++/2015/uwp/libmpg123.sln b/ports/MSVC++/2015/uwp/libmpg123.sln +index 6e4eaee..ecedd3d 100644 +--- a/ports/MSVC++/2015/uwp/libmpg123.sln ++++ b/ports/MSVC++/2015/uwp/libmpg123.sln +@@ -8,21 +8,27 @@ EndProject + Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM ++ Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM ++ Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|ARM.ActiveCfg = Debug|ARM + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|ARM.Build.0 = Debug|ARM ++ {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|ARM64.ActiveCfg = Debug|ARM64 ++ {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|ARM64.Build.0 = Debug|ARM64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|x64.ActiveCfg = Debug|x64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|x64.Build.0 = Debug|x64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|x86.ActiveCfg = Debug|Win32 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|x86.Build.0 = Debug|Win32 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|ARM.ActiveCfg = Release|ARM + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|ARM.Build.0 = Release|ARM ++ {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|ARM64.ActiveCfg = Release|ARM64 ++ {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|ARM64.Build.0 = Release|ARM64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|x64.ActiveCfg = Release|x64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|x64.Build.0 = Release|x64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|x86.ActiveCfg = Release|Win32 +diff --git a/ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj +index 0e54f92..91f40db 100644 +--- a/ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj ++++ b/ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj +@@ -5,6 +5,10 @@ + Debug + ARM + ++ ++ Debug ++ ARM64 ++ + + Debug + Win32 +@@ -17,6 +21,10 @@ + Release + ARM + ++ ++ Release ++ ARM64 ++ + + Release + Win32 +@@ -76,6 +84,8 @@ + true + true + true ++ true ++ true + + + +@@ -105,6 +115,8 @@ + true + true + true ++ true ++ true + + + +@@ -206,6 +218,11 @@ + true + v140 + ++ ++ DynamicLibrary ++ true ++ v140 ++ + + DynamicLibrary + true +@@ -221,6 +238,11 @@ + false + v140 + ++ ++ DynamicLibrary ++ false ++ v140 ++ + + DynamicLibrary + false +@@ -240,9 +262,15 @@ + + + ++ ++ ++ + + + ++ ++ ++ + + + +@@ -273,6 +301,15 @@ + false + false + ++ ++ false ++ false ++ ++ ++ false ++ false ++ false ++ + + false + false +@@ -497,6 +534,48 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ + + + ++ ++ ++ NotUsing ++ false ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;%(PreprocessorDefinitions) ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ Console ++ false ++ false ++ $(OutDir) ++ Default ++ ++ ++ ++ ++ ++ ++ ++ ++ NotUsing ++ false ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;%(PreprocessorDefinitions) ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ MultiThreadedDLL ++ ++ ++ Console ++ false ++ false ++ $(OutDir) ++ ++ ++ ++ ++ ++ + + + NotUsing diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL index a42cb9ed3..9f717a693 100644 --- a/ports/mpg123/CONTROL +++ b/ports/mpg123/CONTROL @@ -1,5 +1,4 @@ Source: mpg123 -Version: 1.25.8-8 +Version: 1.25.8-9 Homepage: https://sourceforge.net/projects/mpg123/ Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). -Supports: !(uwp|arm) diff --git a/ports/mpg123/portfile.cmake b/ports/mpg123/portfile.cmake index 73e7bb3fa..6cf8a3bac 100644 --- a/ports/mpg123/portfile.cmake +++ b/ports/mpg123/portfile.cmake @@ -1,5 +1,3 @@ -vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "UWP") - set(MPG123_VERSION 1.25.8) set(MPG123_HASH f226317dddb07841a13753603fa13c0a867605a5a051626cb30d45cfba266d3d4296f5b8254f65b403bb5eef6addce1784ae8829b671a746854785cda1bad203) @@ -38,13 +36,45 @@ vcpkg_extract_source_archive_ex( 0001-fix-crt-linking.patch 0002-fix-x86-build.patch 0003-add-arm-configs.patch + 0004-add-arm64-uwp-config.patch ) vcpkg_find_acquire_program(YASM) get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") -if(VCPKG_TARGET_IS_WINDOWS) +if(VCPKG_TARGET_IS_UWP) + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj + OPTIONS /p:UseEnv=True + ) + + message(STATUS "Installing") + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Debug/libmpg123/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Debug/libmpg123/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Debug/libmpg123/libmpg123.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Release/libmpg123/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Release/libmpg123/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Release/libmpg123/libmpg123.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/mpg123.h + ${SOURCE_PATH}/src/libmpg123/fmt123.h + ${SOURCE_PATH}/src/libmpg123/mpg123.h.in + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +elseif(VCPKG_TARGET_IS_WINDOWS) vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj OPTIONS /p:UseEnv=True diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 2fb071b99..c4ac5769f 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1134,8 +1134,6 @@ mozjpeg:x64-uwp = skip mozjpeg:x64-windows = skip mozjpeg:x64-windows-static = skip mozjpeg:x86-windows = skip -mpg123:arm-uwp=fail -mpg123:x64-uwp=fail mpir:arm64-windows=fail mpir:arm-uwp=fail mpir:x64-uwp=fail