From bb53a073f10d52d11565f95f1e764a890cc251a8 Mon Sep 17 00:00:00 2001 From: Arne de Bruijn Date: Fri, 21 Apr 2023 23:55:21 +0200 Subject: [PATCH] [sdl1-mixer] new port (#30921) * sdl1-mixer port * Fix source reference * Add mpg123_ssize_t patch * Exclude arm * Use depedencies from vcpkg * Correct license capitalization * Replace $(VcpkgTriplet) by @TARGET_TRIPLET@ * Create Directory.Build.props with include dirs * Use @CURRENT_INSTALLED_DIR@ * Set debug format OldStyle to fix C2471 * Use correct RuntimeLibrary * Add usage file * Update github commit * Update versions * Clean up linux build * Update versions --- ports/sdl1-mixer/SDL_mixer.vcxproj.in | 302 ++++++++++++++++++++++++ ports/sdl1-mixer/SDL_mixer_2017.sln | 70 ++++++ ports/sdl1-mixer/mpg123_ssize_t.patch | 41 ++++ ports/sdl1-mixer/native_midi.vcxproj.in | 179 ++++++++++++++ ports/sdl1-mixer/playmus.vcxproj.in | 247 +++++++++++++++++++ ports/sdl1-mixer/playwave.vcxproj.in | 247 +++++++++++++++++++ ports/sdl1-mixer/portfile.cmake | 79 +++++++ ports/sdl1-mixer/timidity.vcxproj.in | 201 ++++++++++++++++ ports/sdl1-mixer/usage | 4 + ports/sdl1-mixer/vcpkg.json | 17 ++ versions/baseline.json | 4 + versions/s-/sdl1-mixer.json | 9 + 12 files changed, 1400 insertions(+) create mode 100644 ports/sdl1-mixer/SDL_mixer.vcxproj.in create mode 100644 ports/sdl1-mixer/SDL_mixer_2017.sln create mode 100644 ports/sdl1-mixer/mpg123_ssize_t.patch create mode 100644 ports/sdl1-mixer/native_midi.vcxproj.in create mode 100644 ports/sdl1-mixer/playmus.vcxproj.in create mode 100644 ports/sdl1-mixer/playwave.vcxproj.in create mode 100644 ports/sdl1-mixer/portfile.cmake create mode 100644 ports/sdl1-mixer/timidity.vcxproj.in create mode 100644 ports/sdl1-mixer/usage create mode 100644 ports/sdl1-mixer/vcpkg.json create mode 100644 versions/s-/sdl1-mixer.json diff --git a/ports/sdl1-mixer/SDL_mixer.vcxproj.in b/ports/sdl1-mixer/SDL_mixer.vcxproj.in new file mode 100644 index 00000000000000..1ea5182d7414c3 --- /dev/null +++ b/ports/sdl1-mixer/SDL_mixer.vcxproj.in @@ -0,0 +1,302 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F7E944B3-0815-40CD-B3E4-90B2A15B0E33} + SDL_mixer + + + + @LIB_TYPE@ + v141 + false + + + @LIB_TYPE@ + v141 + false + + + @LIB_TYPE@ + v141 + false + + + @LIB_TYPE@ + v141 + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.28307.799 + + + .\Debug\ + .\Debug\ + true + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + .\Release\ + .\Release\ + false + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/SDL_mixer.tlb + + + + /D OGG_DYNAMIC=\"vorbisfile.dll\" %(AdditionalOptions) + Disabled + ..\timidity;..\native_midi;@CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC="mikmod.dll";OGG_MUSIC;OGG_DYNAMIC="vorbisfile.dll";FLAC_MUSIC;FLAC_DYNAMIC="FLAC.dll";MP3_MUSIC;MPG123_DYNAMIC="mpg123.dll";MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI;%(PreprocessorDefinitions) + true + @CRT_TYPE_DBG@ + .\Debug/SDL_mixer.pch + Level3 + true + OldStyle + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;SDL.lib;%(AdditionalDependencies) + true + .\Debug/SDL_mixer.pdb + Windows + MachineX86 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Debug/SDL_mixer.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/SDL_mixer.tlb + + + + /D OGG_DYNAMIC=\"vorbisfile.dll\" %(AdditionalOptions) + Disabled + ..\timidity;..\native_midi;@CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC="mikmod.dll";OGG_MUSIC;OGG_DYNAMIC="vorbisfile.dll";FLAC_MUSIC;FLAC_DYNAMIC="FLAC.dll";MP3_MUSIC;MPG123_DYNAMIC="mpg123.dll";MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI;%(PreprocessorDefinitions) + true + @CRT_TYPE_DBG@ + .\Debug/SDL_mixer.pch + Level3 + true + OldStyle + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;SDL.lib;%(AdditionalDependencies) + true + .\Debug/SDL_mixer.pdb + Windows + MachineX64 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Debug/SDL_mixer.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/SDL_mixer.tlb + + + + /D OGG_DYNAMIC=\"vorbisfile.dll\" %(AdditionalOptions) + MaxSpeed + OnlyExplicitInline + ..\timidity;..\native_midi;@CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC="mikmod.dll";OGG_MUSIC;OGG_DYNAMIC="vorbisfile.dll";FLAC_MUSIC;FLAC_DYNAMIC="FLAC.dll";MP3_MUSIC;MPG123_DYNAMIC="mpg123.dll";MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + .\Release/SDL_mixer.pch + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;SDL.lib;%(AdditionalDependencies) + .\Release/SDL_mixer.pdb + Windows + MachineX86 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Release/SDL_mixer.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/SDL_mixer.tlb + + + + /D OGG_DYNAMIC=\"vorbisfile.dll\" %(AdditionalOptions) + MaxSpeed + OnlyExplicitInline + ..\timidity;..\native_midi;@CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC="mikmod.dll";OGG_MUSIC;OGG_DYNAMIC="vorbisfile.dll";FLAC_MUSIC;FLAC_DYNAMIC="FLAC.dll";MP3_MUSIC;MPG123_DYNAMIC="mpg123.dll";MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + .\Release/SDL_mixer.pch + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;SDL.lib;%(AdditionalDependencies) + .\Release/SDL_mixer.pdb + Windows + MachineX64 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Release/SDL_mixer.bsc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {ebda67ca-4a23-4f22-bfbc-b8dbe0580d4f} + false + + + {b162b6f1-e876-4d5f-a1f6-e3a6dc2f4a2c} + false + + + + + + \ No newline at end of file diff --git a/ports/sdl1-mixer/SDL_mixer_2017.sln b/ports/sdl1-mixer/SDL_mixer_2017.sln new file mode 100644 index 00000000000000..1437f385883a79 --- /dev/null +++ b/ports/sdl1-mixer/SDL_mixer_2017.sln @@ -0,0 +1,70 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.1321 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL_mixer", "SDL_mixer.vcxproj", "{F7E944B3-0815-40CD-B3E4-90B2A15B0E33}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "native_midi", "native_midi\native_midi.vcxproj", "{EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "playmus", "playmus\playmus.vcxproj", "{72CB0DD4-051D-486C-9CB3-75FE16F7D87A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "playwave", "playwave\playwave.vcxproj", "{AC86CEAA-9908-476F-B15F-C7193CEF81BD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timidity", "timidity\timidity.vcxproj", "{B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|Win32.ActiveCfg = Debug|Win32 + {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|Win32.Build.0 = Debug|Win32 + {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|x64.ActiveCfg = Debug|x64 + {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|x64.Build.0 = Debug|x64 + {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|Win32.ActiveCfg = Release|Win32 + {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|Win32.Build.0 = Release|Win32 + {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|x64.ActiveCfg = Release|x64 + {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|x64.Build.0 = Release|x64 + {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|Win32.ActiveCfg = Debug|Win32 + {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|Win32.Build.0 = Debug|Win32 + {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|x64.ActiveCfg = Debug|x64 + {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|x64.Build.0 = Debug|x64 + {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|Win32.ActiveCfg = Release|Win32 + {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|Win32.Build.0 = Release|Win32 + {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|x64.ActiveCfg = Release|x64 + {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|x64.Build.0 = Release|x64 + {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|Win32.ActiveCfg = Debug|Win32 + {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|Win32.Build.0 = Debug|Win32 + {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|x64.ActiveCfg = Debug|x64 + {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|x64.Build.0 = Debug|x64 + {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|Win32.ActiveCfg = Release|Win32 + {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|Win32.Build.0 = Release|Win32 + {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|x64.ActiveCfg = Release|x64 + {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|x64.Build.0 = Release|x64 + {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|Win32.Build.0 = Debug|Win32 + {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|x64.ActiveCfg = Debug|x64 + {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|x64.Build.0 = Debug|x64 + {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|Win32.ActiveCfg = Release|Win32 + {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|Win32.Build.0 = Release|Win32 + {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|x64.ActiveCfg = Release|x64 + {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|x64.Build.0 = Release|x64 + {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|Win32.ActiveCfg = Debug|Win32 + {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|Win32.Build.0 = Debug|Win32 + {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|x64.ActiveCfg = Debug|x64 + {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|x64.Build.0 = Debug|x64 + {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|Win32.ActiveCfg = Release|Win32 + {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|Win32.Build.0 = Release|Win32 + {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|x64.ActiveCfg = Release|x64 + {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F6077CF7-C552-4A55-AB30-0E159B015586} + EndGlobalSection +EndGlobal diff --git a/ports/sdl1-mixer/mpg123_ssize_t.patch b/ports/sdl1-mixer/mpg123_ssize_t.patch new file mode 100644 index 00000000000000..8cead248762400 --- /dev/null +++ b/ports/sdl1-mixer/mpg123_ssize_t.patch @@ -0,0 +1,41 @@ +diff --git a/dynamic_mp3.c b/dynamic_mp3.c +index 7c3209f0..ba80ee7a 100644 +--- a/dynamic_mp3.c ++++ b/dynamic_mp3.c +@@ -63,7 +63,7 @@ int Mix_InitMP3(void) + #else + FUNCTION_LOADER(mpg123_read, int (*)(mpg123_handle *mh, unsigned char *outmemory, size_t outmemsize, size_t *done )) + #endif +- FUNCTION_LOADER(mpg123_replace_reader_handle, int (*)( mpg123_handle *mh, ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) )) ++ FUNCTION_LOADER(mpg123_replace_reader_handle, int (*)( mpg123_handle *mh, mpg123_ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) )) + FUNCTION_LOADER(mpg123_seek, off_t (*)( mpg123_handle *mh, off_t sampleoff, int whence )) + FUNCTION_LOADER(mpg123_strerror, const char* (*)(mpg123_handle *mh)) + if (mpg123.mpg123_init() != MPG123_OK) { +diff --git a/dynamic_mp3.h b/dynamic_mp3.h +index 2e4c48af..ad63bf76 100644 +--- a/dynamic_mp3.h ++++ b/dynamic_mp3.h +@@ -43,7 +43,7 @@ typedef struct { + #else + int (*mpg123_read)(mpg123_handle *mh, unsigned char *outmemory, size_t outmemsize, size_t *done ); + #endif +- int (*mpg123_replace_reader_handle)( mpg123_handle *mh, ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) ); ++ int (*mpg123_replace_reader_handle)( mpg123_handle *mh, mpg123_ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) ); + off_t (*mpg123_seek)( mpg123_handle *mh, off_t sampleoff, int whence ); + const char* (*mpg123_strerror)(mpg123_handle *mh); + } mpg123_loader; +diff --git a/music_mpg.c b/music_mpg.c +index 531615a2..7d92c28b 100644 +--- a/music_mpg.c ++++ b/music_mpg.c +@@ -67,8 +67,8 @@ mpg_err(mpg123_handle* mpg, int code) + + /* we're gonna override mpg123's I/O with these wrappers for RWops */ + static +-ssize_t rwops_read(void* p, void* dst, size_t n) { +- return (ssize_t)MP3_RWread((struct mp3file_t *)p, dst, 1, n); ++mpg123_ssize_t rwops_read(void* p, void* dst, size_t n) { ++ return (mpg123_ssize_t)MP3_RWread((struct mp3file_t *)p, dst, 1, n); + } + + static diff --git a/ports/sdl1-mixer/native_midi.vcxproj.in b/ports/sdl1-mixer/native_midi.vcxproj.in new file mode 100644 index 00000000000000..eb31ce1dbec55d --- /dev/null +++ b/ports/sdl1-mixer/native_midi.vcxproj.in @@ -0,0 +1,179 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F} + + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.28307.799 + + + .\Release\ + .\Release\ + + + .\Debug\ + .\Debug\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + MaxSpeed + OnlyExplicitInline + ..\..;..\..\native_midi;@CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + .\Release/native_midi.pch + Level3 + + + 0x0409 + + + true + .\Release/native_midi.bsc + + + + + Disabled + ..\..;..\..\native_midi;@CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + @CRT_TYPE_DBG@ + .\Debug/native_midi.pch + Level3 + true + OldStyle + + + 0x0409 + + + true + .\Debug/native_midi.bsc + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..;..\..\native_midi;@CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + .\Release/native_midi.pch + Level3 + + + 0x0409 + + + true + .\Release/native_midi.bsc + + + + + X64 + + + Disabled + ..\..;..\..\native_midi;@CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + @CRT_TYPE_DBG@ + .\Debug/native_midi.pch + Level3 + true + OldStyle + + + 0x0409 + + + true + .\Debug/native_midi.bsc + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ports/sdl1-mixer/playmus.vcxproj.in b/ports/sdl1-mixer/playmus.vcxproj.in new file mode 100644 index 00000000000000..ba6e37f8e4ec7b --- /dev/null +++ b/ports/sdl1-mixer/playmus.vcxproj.in @@ -0,0 +1,247 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {72CB0DD4-051D-486C-9CB3-75FE16F7D87A} + 10.0.17763.0 + + + + Application + v141 + false + + + Application + v141 + false + + + Application + v141 + false + + + Application + v141 + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.28307.799 + + + .\Debug\ + .\Debug\ + true + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + .\Release\ + .\Release\ + false + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/playmus.tlb + + + + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_DBG@ + .\Debug/playmus.pch + Level3 + true + OldStyle + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + SDL.lib;manual-link\SDLmain.lib;winmm.lib;dxguid.lib;%(AdditionalDependencies) + true + .\Debug/playmus.pdb + Windows + MachineX86 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Debug/playmus.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/playmus.tlb + + + + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_DBG@ + .\Debug/playmus.pch + Level3 + true + OldStyle + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + SDL.lib;manual-link\SDLmain.lib;winmm.lib;dxguid.lib;%(AdditionalDependencies) + true + .\Debug/playmus.pdb + Windows + MachineX64 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Debug/playmus.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/playmus.tlb + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + .\Release/playmus.pch + Level3 + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + SDL.lib;manual-link\SDLmain.lib;winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/playmus.pdb + Windows + MachineX86 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Release/playmus.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/playmus.tlb + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + .\Release/playmus.pch + Level3 + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + SDL.lib;manual-link\SDLmain.lib;winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/playmus.pdb + Windows + MachineX64 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Release/playmus.bsc + + + + + + + + {f7e944b3-0815-40cd-b3e4-90b2a15b0e33} + false + + + + + + \ No newline at end of file diff --git a/ports/sdl1-mixer/playwave.vcxproj.in b/ports/sdl1-mixer/playwave.vcxproj.in new file mode 100644 index 00000000000000..05fe6234148c50 --- /dev/null +++ b/ports/sdl1-mixer/playwave.vcxproj.in @@ -0,0 +1,247 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {AC86CEAA-9908-476F-B15F-C7193CEF81BD} + 10.0.17763.0 + + + + Application + v141 + false + + + Application + v141 + false + + + Application + v141 + false + + + Application + v141 + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.28307.799 + + + .\Release\ + .\Release\ + false + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + .\Debug\ + .\Debug\ + true + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/playwave.tlb + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + .\Release/playwave.pch + Level3 + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + SDL.lib;manual-link\SDLmain.lib;winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/playwave.pdb + Windows + MachineX86 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Release/playwave.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/playwave.tlb + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + .\Release/playwave.pch + Level3 + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + SDL.lib;manual-link\SDLmain.lib;winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/playwave.pdb + Windows + MachineX64 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Release/playwave.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/playwave.tlb + + + + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_DBG@ + .\Debug/playwave.pch + Level3 + true + OldStyle + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + SDL.lib;manual-link\SDLmain.lib;winmm.lib;dxguid.lib;%(AdditionalDependencies) + true + .\Debug/playwave.pdb + Windows + MachineX86 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Debug/playwave.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/playwave.tlb + + + + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_DBG@ + .\Debug/playwave.pch + Level3 + true + OldStyle + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + SDL.lib;manual-link\SDLmain.lib;winmm.lib;dxguid.lib;%(AdditionalDependencies) + true + .\Debug/playwave.pdb + Windows + MachineX64 + @CURRENT_INSTALLED_DIR@/lib;%(AdditionalLibraryDirectories) + + + true + .\Debug/playwave.bsc + + + + + + + + {f7e944b3-0815-40cd-b3e4-90b2a15b0e33} + false + + + + + + \ No newline at end of file diff --git a/ports/sdl1-mixer/portfile.cmake b/ports/sdl1-mixer/portfile.cmake new file mode 100644 index 00000000000000..e4dbc1f6753e16 --- /dev/null +++ b/ports/sdl1-mixer/portfile.cmake @@ -0,0 +1,79 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libsdl-org/SDL_mixer + REF d8b2c98ca3db62fa3d4e1dbb8801c6f57a10b8bf + SHA512 e22b2e26d9c7296e79589d5108118c65f5fb76e7e9d6996129e19b63313f9aa3a4c0657010e45fa040792fa81c488dae3ec6fac09e147d3b4430d612837e0132 + HEAD_REF SDL-1.2 + PATCHES + mpg123_ssize_t.patch +) + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + file(COPY "${CMAKE_CURRENT_LIST_DIR}/SDL_mixer_2017.sln" DESTINATION "${SOURCE_PATH}/VisualC/") + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(LIB_TYPE StaticLibrary) + else() + set(LIB_TYPE DynamicLibrary) + endif() + + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(CRT_TYPE_DBG MultiThreadedDebugDLL) + set(CRT_TYPE_REL MultiThreadedDLL) + else() + set(CRT_TYPE_DBG MultiThreadedDebug) + set(CRT_TYPE_REL MultiThreaded) + endif() + + configure_file("${CURRENT_PORT_DIR}/SDL_mixer.vcxproj.in" "${SOURCE_PATH}/VisualC/SDL_mixer.vcxproj" @ONLY) + configure_file("${CURRENT_PORT_DIR}/native_midi.vcxproj.in" "${SOURCE_PATH}/VisualC/native_midi/native_midi.vcxproj" @ONLY) + configure_file("${CURRENT_PORT_DIR}/timidity.vcxproj.in" "${SOURCE_PATH}/VisualC/timidity/timidity.vcxproj" @ONLY) + configure_file("${CURRENT_PORT_DIR}/playmus.vcxproj.in" "${SOURCE_PATH}/VisualC/playmus/playmus.vcxproj" @ONLY) + configure_file("${CURRENT_PORT_DIR}/playwave.vcxproj.in" "${SOURCE_PATH}/VisualC/playwave/playwave.vcxproj" @ONLY) + + # This text file gets copied as a library, and included as one in the package + file(REMOVE "${SOURCE_PATH}/external/libmikmod/COPYING.LIB") + + # Remove unused external dlls + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x86/libFLAC-8.dll") + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x86/libmikmod-2.dll") + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x86/libmpg123-0.dll") + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x86/libogg-0.dll") + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x86/libvorbis-0.dll") + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x86/libvorbisfile-3.dll") + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x64/libFLAC-8.dll") + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x64/libmikmod-2.dll") + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x64/libmpg123-0.dll") + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x64/libogg-0.dll") + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x64/libvorbis-0.dll") + file(REMOVE "${SOURCE_PATH}/VisualC/external/lib/x64/libvorbisfile-3.dll") + + file(WRITE "${SOURCE_PATH}/Directory.Build.props" " + + + + ${CURRENT_PACKAGES_DIR}/include;${CURRENT_PACKAGES_DIR}/include/SDL;${CURRENT_INSTALLED_DIR}/include;${CURRENT_INSTALLED_DIR}/include/SDL + + + ") + + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH VisualC/SDL_mixer_2017.sln + #INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + #ALLOW_ROOT_INCLUDES + ) + file(COPY "${SOURCE_PATH}/SDL_mixer.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/SDL") +else() + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + + file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +endif() + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/sdl1-mixer/timidity.vcxproj.in b/ports/sdl1-mixer/timidity.vcxproj.in new file mode 100644 index 00000000000000..2689aefac0b203 --- /dev/null +++ b/ports/sdl1-mixer/timidity.vcxproj.in @@ -0,0 +1,201 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C} + timidity + + + + StaticLibrary + false + v141 + + + StaticLibrary + false + v141 + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.28307.799 + + + .\Release\ + .\Release\ + + + .\Debug\ + .\Debug\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + .\Release/timidity.pch + Level3 + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + 0x0409 + + + true + .\Release/timidity.bsc + + + + + Disabled + WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + @CRT_TYPE_DBG@ + .\Debug/timidity.pch + Level3 + true + OldStyle + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + 0x0409 + + + true + .\Debug/timidity.bsc + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + .\Release/timidity.pch + Level3 + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + 0x0409 + + + true + .\Release/timidity.bsc + + + + + X64 + + + Disabled + WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + @CRT_TYPE_DBG@ + .\Debug/timidity.pch + Level3 + true + OldStyle + @CURRENT_PACKAGES_DIR@/include/SDL;@CURRENT_INSTALLED_DIR@/include/SDL + + + 0x0409 + + + true + .\Debug/timidity.bsc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ports/sdl1-mixer/usage b/ports/sdl1-mixer/usage new file mode 100644 index 00000000000000..886069e417af04 --- /dev/null +++ b/ports/sdl1-mixer/usage @@ -0,0 +1,4 @@ +The package sdl1-mixer is compatible with built-in CMake targets: + + find_package(SDL_mixer REQUIRED) + target_link_libraries(main PRIVATE ${SDL_MIXER_LIBRARY}) diff --git a/ports/sdl1-mixer/vcpkg.json b/ports/sdl1-mixer/vcpkg.json new file mode 100644 index 00000000000000..b0d9ae7d1c5027 --- /dev/null +++ b/ports/sdl1-mixer/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "sdl1-mixer", + "version-date": "2023-03-25", + "port-version": 1, + "description": "An audio mixer that supports various file formats for Simple Directmedia Layer.", + "homepage": "https://www.libsdl.org", + "license": "Zlib", + "supports": "!osx & !uwp & !arm", + "dependencies": [ + "libflac", + "libmikmod", + "libogg", + "libvorbis", + "mpg123", + "sdl1" + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index c7bd4491582f52..4509c02fe02c6b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7192,6 +7192,10 @@ "baseline": "1.2.15", "port-version": 17 }, + "sdl1-mixer": { + "baseline": "2023-03-25", + "port-version": 1 + }, "sdl1-net": { "baseline": "1.2.8", "port-version": 6 diff --git a/versions/s-/sdl1-mixer.json b/versions/s-/sdl1-mixer.json new file mode 100644 index 00000000000000..540bdd76c9e122 --- /dev/null +++ b/versions/s-/sdl1-mixer.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "2e208f00e12332057ca6986afe060ff5fc1ef7cc", + "version-date": "2023-03-25", + "port-version": 1 + } + ] +}