From 6f1bea7eb8221552cdc6b0ab8f8c21171300cf4f Mon Sep 17 00:00:00 2001 From: e Date: Wed, 25 Oct 2023 20:52:23 -0300 Subject: [PATCH 1/2] CMake: fix warnings from policy CMP0135 --- CMake/FetchGoogleTest.cmake | 2 ++ CMake/FetchOgg.cmake | 1 + CMake/FetchSDL2.cmake | 1 + CMake/FetchSDL_Sound.cmake | 1 + CMake/FetchTheora.cmake | 1 + CMake/FetchVorbis.cmake | 1 + 6 files changed, 7 insertions(+) diff --git a/CMake/FetchGoogleTest.cmake b/CMake/FetchGoogleTest.cmake index 06cad5c00a2..7e3550db6d4 100644 --- a/CMake/FetchGoogleTest.cmake +++ b/CMake/FetchGoogleTest.cmake @@ -2,6 +2,7 @@ if(LINUX AND CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS set(LINUX_OLD_GCC TRUE) FetchContent_Declare( googletest_content + DOWNLOAD_EXTRACT_TIMESTAMP TRUE URL https://github.com/google/googletest/archive/refs/tags/release-1.8.1.tar.gz URL_HASH MD5=2e6fbeb6a91310a16efe181886c59596 ) @@ -9,6 +10,7 @@ else() set(LINUX_OLD_GCC FALSE) FetchContent_Declare( googletest_content + DOWNLOAD_EXTRACT_TIMESTAMP TRUE URL https://github.com/google/googletest/archive/4ec4cd23f486bf70efcc5d2caa40f24368f752e3.tar.gz URL_HASH MD5=b907483a9045a2edda15ee7d2a68aaa5 ) diff --git a/CMake/FetchOgg.cmake b/CMake/FetchOgg.cmake index fe9e7a552c8..2b2f23e870f 100644 --- a/CMake/FetchOgg.cmake +++ b/CMake/FetchOgg.cmake @@ -1,5 +1,6 @@ FetchContent_Declare( ogg_content + DOWNLOAD_EXTRACT_TIMESTAMP TRUE URL https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.xz URL_HASH MD5=3178c98341559657a15b185bf5d700a5 ) diff --git a/CMake/FetchSDL2.cmake b/CMake/FetchSDL2.cmake index 58a9942c9a0..da60c577d54 100644 --- a/CMake/FetchSDL2.cmake +++ b/CMake/FetchSDL2.cmake @@ -1,5 +1,6 @@ FetchContent_Declare( sdl2_content + DOWNLOAD_EXTRACT_TIMESTAMP TRUE URL https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.28.2.tar.gz URL_HASH MD5=e00fe25102433d40d39ba67007a9fd2c ) diff --git a/CMake/FetchSDL_Sound.cmake b/CMake/FetchSDL_Sound.cmake index 564bde35091..b34fcee22c3 100644 --- a/CMake/FetchSDL_Sound.cmake +++ b/CMake/FetchSDL_Sound.cmake @@ -1,5 +1,6 @@ FetchContent_Declare( sdlsound_content + DOWNLOAD_EXTRACT_TIMESTAMP TRUE URL https://github.com/icculus/SDL_sound/archive/495e948b455af48eb45f75cccc060498f1e0e8a2.tar.gz URL_HASH MD5=d743aee2e550dca3a96b14d41e78b530 ) diff --git a/CMake/FetchTheora.cmake b/CMake/FetchTheora.cmake index 464c29ab3ce..d24afad4f87 100644 --- a/CMake/FetchTheora.cmake +++ b/CMake/FetchTheora.cmake @@ -1,5 +1,6 @@ FetchContent_Declare( theora_content + DOWNLOAD_EXTRACT_TIMESTAMP TRUE URL https://github.com/xiph/theora/archive/7180717276af1ebc7da15c83162d6c5d6203aabf.tar.gz URL_HASH MD5=5f1c0b5efdec0f9621bc59ba89e6652b ) diff --git a/CMake/FetchVorbis.cmake b/CMake/FetchVorbis.cmake index 727d6808196..ab86cac1f4f 100644 --- a/CMake/FetchVorbis.cmake +++ b/CMake/FetchVorbis.cmake @@ -1,5 +1,6 @@ FetchContent_Declare( vorbis_content + DOWNLOAD_EXTRACT_TIMESTAMP TRUE URL https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.xz URL_HASH MD5=50902641d358135f06a8392e61c9ac77 ) From 1d6acae994a1bff8fec8b7401f78926ed64d4502 Mon Sep 17 00:00:00 2001 From: e Date: Wed, 25 Oct 2023 20:59:08 -0300 Subject: [PATCH 2/2] SDL_Sound: upgrade commit revision upgrade to https://github.com/icculus/SDL_sound/tree/1507be95c3605e4fd6a48ea4c527e4aa711a1566 fixes a CMake warning --- CMake/FetchSDL_Sound.cmake | 5 ++--- OSX/README.md | 2 +- Windows/README.md | 2 +- ci/linux/Dockerfile | 2 +- ci/windows/Dockerfile | 2 +- debian/README.md | 4 ++-- libsrc/download.sh | 2 +- libsrc/sha1sums | 2 +- 8 files changed, 10 insertions(+), 11 deletions(-) diff --git a/CMake/FetchSDL_Sound.cmake b/CMake/FetchSDL_Sound.cmake index b34fcee22c3..b78c511297c 100644 --- a/CMake/FetchSDL_Sound.cmake +++ b/CMake/FetchSDL_Sound.cmake @@ -1,8 +1,8 @@ FetchContent_Declare( sdlsound_content DOWNLOAD_EXTRACT_TIMESTAMP TRUE - URL https://github.com/icculus/SDL_sound/archive/495e948b455af48eb45f75cccc060498f1e0e8a2.tar.gz - URL_HASH MD5=d743aee2e550dca3a96b14d41e78b530 + URL https://github.com/icculus/SDL_sound/archive/1507be95c3605e4fd6a48ea4c527e4aa711a1566.tar.gz + URL_HASH MD5=f945a7330089d1c3490404b4f18fdffd ) FetchContent_GetProperties(sdlsound_content) @@ -23,5 +23,4 @@ if(NOT sdlsound_content) add_library(sdl2_sound-interface INTERFACE) target_link_libraries(sdl2_sound-interface INTERFACE SDL2_sound-static) add_library(SDL2_sound::SDL2_sound ALIAS sdl2_sound-interface) - target_link_libraries(SDL2_sound-static ${SDL2_LIBRARIES}) endif() diff --git a/OSX/README.md b/OSX/README.md index 8ff98868119..388e804d7fa 100644 --- a/OSX/README.md +++ b/OSX/README.md @@ -78,7 +78,7 @@ The Xcode project depends on the prebuilt SDL2 Framework and library sources. The project also requires sources of library dependencies, either using the `libsrc/download.sh` script or manually downloading them and extracting them as below. -- Download [SDL_sound](https://github.com/icculus/SDL_sound/archive/8d96d4cc0e1df35835a222ee51a7c32f273ec63e.zip) source code and place it in `ags/libsrc/SDL_sound` +- Download [SDL_sound](https://github.com/icculus/SDL_sound/archive/1507be95c3605e4fd6a48ea4c527e4aa711a1566.zip) source code and place it in `ags/libsrc/SDL_sound` - Download xiph [theora](https://github.com/xiph/theora/archive/7180717276af1ebc7da15c83162d6c5d6203aabf.tar.gz) source code, and place it in `ags/libsrc/theora` - Download xiph [ogg](https://github.com/xiph/ogg/archive/refs/tags/v1.3.5.tar.gz) source code, and place in `ags/libsrc/ogg` - Download xiph [vorbis](https://github.com/xiph/vorbis/archive/84c023699cdf023a32fa4ded32019f194afcdad0.tar.gz) source code, and place in `ags/libsrc/vorbis` diff --git a/Windows/README.md b/Windows/README.md index c2b3c480342..99f9629576e 100644 --- a/Windows/README.md +++ b/Windows/README.md @@ -50,7 +50,7 @@ and SDL2.dll to run. Official page for SDL_Sound library is https://www.icculus.org/SDL_sound/, but downloads are hosted on github: https://github.com/icculus/SDL_sound/releases. Any latest 2.0.X release should be good. -For the reference, at the time of writing our build server is using revision 495e948b45: https://github.com/icculus/SDL_sound/archive/495e948b455af48eb45f75cccc060498f1e0e8a2.tar.gz +For the reference, at the time of writing our build server is using revision 1507be95c3: https://github.com/icculus/SDL_sound/archive/1507be95c3605e4fd6a48ea4c527e4aa711a1566.tar.gz After you downloaded the source this way or another, you should use CMake to generate MSVS solution from their provided CMakeList.txt. Note that when doing this you may have to direct CMake to the SDL2's cmake config files. First go to the SDL2's sources location and find "cmake" directory inside. It should contain the file called "sdl2-config.cmake". If the file is not present, this means something is wrong with the SDL2's package, or maybe you've downloaded a way too old version of SDL2. diff --git a/ci/linux/Dockerfile b/ci/linux/Dockerfile index 0a3ac17f31c..973c1c88823 100644 --- a/ci/linux/Dockerfile +++ b/ci/linux/Dockerfile @@ -113,7 +113,7 @@ RUN curl -fLsS "https://github.com/xiph/theora/archive/refs/tags/v${LIBTHEORA_VE rm /tmp/libtheora-${LIBTHEORA_VERSION}.tar.gz # Build and install SDL_sound -ARG SDL2_SOUND_VERSION=495e948b455af48eb45f75cccc060498f1e0e8a2 +ARG SDL2_SOUND_VERSION=1507be95c3605e4fd6a48ea4c527e4aa711a1566 RUN cd /tmp && \ curl -fLsS "https://github.com/icculus/SDL_sound/archive/$SDL2_SOUND_VERSION.tar.gz" --output SDL_sound.tar.gz && \ tar -xvzf SDL_sound.tar.gz && \ diff --git a/ci/windows/Dockerfile b/ci/windows/Dockerfile index 9b110649684..46b5bd310b2 100644 --- a/ci/windows/Dockerfile +++ b/ci/windows/Dockerfile @@ -78,7 +78,7 @@ RUN mkdir Lib\SDL2 && \ echo endif ^(^) >> "Lib\SDL2\sdl2-config.cmake" && \ echo string^(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES^) >> "Lib\SDL2\sdl2-config.cmake" -ARG SDL_SOUND_VERSION=495e948b455af48eb45f75cccc060498f1e0e8a2 +ARG SDL_SOUND_VERSION=1507be95c3605e4fd6a48ea4c527e4aa711a1566 RUN mkdir Lib\SDL_sound && \ echo "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 ^&^& pushd Lib\SDL_sound\build_x86 ^&^& msbuild SDL_sound.sln /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo ^&^& popd > sdlsoundvcbuild_x86.bat && \ echo "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 ^&^& pushd Lib\SDL_sound\build_x64 ^&^& msbuild SDL_sound.sln /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo ^&^& popd > sdlsoundvcbuild_x64.bat && \ diff --git a/debian/README.md b/debian/README.md index 0d66c26aba9..53f0888415d 100644 --- a/debian/README.md +++ b/debian/README.md @@ -15,7 +15,7 @@ parentheses are known to work, but other versions will also probably work. - libsdl2 (2.0.12 or higher) -- libsdl_sound for sdl2 (revision 495e948b455a or higher) +- libsdl_sound for sdl2 (revision 1507be95c3 or higher) - libogg (1.2.2-1.3.0) - libtheora (1.1.1-1.2.0) - libvorbis (1.3.2) @@ -38,7 +38,7 @@ Other Linux systems use their respective package managers. At the time of writing SDL_Sound `2.*` has just been released, but almost no linux distro provides it. Until that is resolved, we recommend to download particular revision archive using following url: - https://github.com/icculus/SDL_sound/archive/495e948b455af48eb45f75cccc060498f1e0e8a2.tar.gz + https://github.com/icculus/SDL_sound/archive/1507be95c3605e4fd6a48ea4c527e4aa711a1566.tar.gz then build and install using CMake (see instructions in the SDL_Sound's docs). diff --git a/libsrc/download.sh b/libsrc/download.sh index a00c9d1504d..ffc3bd73ea5 100755 --- a/libsrc/download.sh +++ b/libsrc/download.sh @@ -35,7 +35,7 @@ get https://github.com/xiph/vorbis/archive/${LIBVORBIS_VERSION}.tar.gz vorbis.ta LIBTHEORA_VERSION=7180717276af1ebc7da15c83162d6c5d6203aabf get https://github.com/xiph/theora/archive/${LIBTHEORA_VERSION}.tar.gz theora.tar.gz -SDLSOUND_VERSION=8d96d4cc0e1df35835a222ee51a7c32f273ec63e +SDLSOUND_VERSION=1507be95c3605e4fd6a48ea4c527e4aa711a1566 get https://github.com/icculus/SDL_sound/archive/${SDLSOUND_VERSION}.tar.gz SDL_sound.tar.gz SDL_VERSION=2.28.2 diff --git a/libsrc/sha1sums b/libsrc/sha1sums index 8644f25fdcf..1f69689f128 100644 --- a/libsrc/sha1sums +++ b/libsrc/sha1sums @@ -1,5 +1,5 @@ 16c7c4844d8b5e8027dfb134d2971746bb1382c3 SDL.tar.gz -cf65d8e1adfe56e0b6c904698d3b8e481b413237 SDL_sound.tar.gz +1507be95c3605e4fd6a48ea4c527e4aa711a1566 SDL_sound.tar.gz 8085a94164c1eb6cfab245c5b4306c2d3ec847cd ogg.tar.gz beaeae25bc7ace77007f42c33e0b0fa74acf4992 theora.tar.gz 76f06629562d52a9539818f3b78722fbc9e19ddb vorbis.tar.gz