aedi: update sdl2 to 2.0.18

This commit is contained in:
alexey.lysiuk 2021-12-04 13:46:32 +02:00
parent 099bbb0738
commit 4f97b9a4b2
2 changed files with 33 additions and 16 deletions

View file

@ -456,8 +456,8 @@ class Sdl2Target(CMakeStaticDependencyTarget):
def prepare_source(self, state: BuildState): def prepare_source(self, state: BuildState):
state.download_source( state.download_source(
'https://libsdl.org/release/SDL2-2.0.16.tar.gz', 'https://libsdl.org/release/SDL2-2.0.18.tar.gz',
'65be9ff6004034b5b2ce9927b5a4db1814930f169c4b2dae0a1e4697075f287b', '94d40cd73dbfa10bb6eadfbc28f355992bb2d6ef6761ad9d4074eff95ee5711c',
patches='sdl2-no-updaterev') patches='sdl2-no-updaterev')
FRAMEWORKS = '-framework AudioToolbox -framework AVFoundation -framework Carbon' \ FRAMEWORKS = '-framework AudioToolbox -framework AVFoundation -framework Carbon' \
@ -487,12 +487,8 @@ class Sdl2Target(CMakeStaticDependencyTarget):
self.update_config_script(state.install_path / 'bin/sdl2-config', update_sdl2_config) self.update_config_script(state.install_path / 'bin/sdl2-config', update_sdl2_config)
def update_targets_cmake(line: str): def update_targets_cmake(line: str):
if line.startswith(' INTERFACE_LINK_LIBRARIES '): libs = ' INTERFACE_LINK_LIBRARIES '
return f' INTERFACE_LINK_LIBRARIES "{Sdl2Target.FRAMEWORKS}"\n' return f'{libs}"{Sdl2Target.FRAMEWORKS}"\n' if line.startswith(libs) else line
else:
line = line.replace('SDL2::SDL2-static', 'SDL2::SDL2')
return line
for suffix in ('', '-release'): for suffix in ('', '-release'):
file_path = state.install_path / f'lib/cmake/SDL2/SDL2Targets{suffix}.cmake' file_path = state.install_path / f'lib/cmake/SDL2/SDL2Targets{suffix}.cmake'

View file

@ -1,14 +1,35 @@
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -2343,11 +2343,6 @@ @@ -2449,31 +2449,7 @@
listtostr(EXTRA_CFLAGS _EXTRA_CFLAGS)
set(EXTRA_CFLAGS ${_EXTRA_CFLAGS}) set(EXTRA_CFLAGS ${_EXTRA_CFLAGS})
# Compat helpers for the configuration files -# Compat helpers for the configuration files
-if(NOT CMAKE_HOST_WIN32) -find_package(Git)
- # TODO: we need a Windows script, too -if(Git_FOUND)
- execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh - execute_process(COMMAND
- WORKING_DIRECTORY ${SDL2_BINARY_DIR}) - "${GIT_EXECUTABLE}" remote get-url origin
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
- RESULT_VARIABLE GIT_URL_STATUS
- OUTPUT_VARIABLE GIT_URL
- ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-
- execute_process(COMMAND
- "${GIT_EXECUTABLE}" rev-list --max-count=1 HEAD~..
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
- RESULT_VARIABLE GIT_REVISION_STATUS
- OUTPUT_VARIABLE GIT_REVISION
- ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-
- if(GIT_URL_STATUS EQUAL 0 OR GIT_REVISION_STATUS EQUAL 0)
- set(SDL_REVISION "${GIT_URL}@${GIT_REVISION}")
- else()
- set(SDL_REVISION "")
- endif() - endif()
if(NOT WINDOWS OR CYGWIN OR MINGW) -else()
- set(SDL_REVISION "")
-endif()
+set(SDL_REVISION "https://github.com/libsdl-org/SDL.git@2e9821423a237a1206e3c09020778faacfe430be")
set(prefix ${CMAKE_INSTALL_PREFIX}) configure_file("${SDL2_SOURCE_DIR}/include/SDL_revision.h.cmake"
"${SDL2_BINARY_DIR}/include/SDL_revision.h")