mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2025-02-16 16:41:42 +00:00
aedi: update sdl2_image to 2.6.0
This commit is contained in:
parent
d5ebd55012
commit
933ab9970e
1 changed files with 17 additions and 8 deletions
|
@ -276,21 +276,30 @@ class Sdl2Target(CMakeStaticDependencyTarget):
|
||||||
return line
|
return line
|
||||||
|
|
||||||
|
|
||||||
class Sdl2ImageTarget(ConfigureMakeStaticDependencyTarget):
|
class Sdl2ImageTarget(CMakeStaticDependencyTarget):
|
||||||
def __init__(self, name='sdl2_image'):
|
def __init__(self, name='sdl2_image'):
|
||||||
super().__init__(name)
|
super().__init__(name)
|
||||||
|
|
||||||
def prepare_source(self, state: BuildState):
|
def prepare_source(self, state: BuildState):
|
||||||
state.download_source(
|
state.download_source(
|
||||||
'https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.5.tar.gz',
|
'https://github.com/libsdl-org/SDL_image/releases/download/release-2.6.0/SDL2_image-2.6.0.tar.gz',
|
||||||
'bdd5f6e026682f7d7e1be0b6051b209da2f402a2dd8bd1c4bd9c25ad263108d0')
|
'611c862f40de3b883393aabaa8d6df350aa3ae4814d65030972e402edae85aaa')
|
||||||
|
|
||||||
def detect(self, state: BuildState) -> bool:
|
def post_build(self, state: BuildState):
|
||||||
return state.has_source_file('SDL2_image.pc.in')
|
super().post_build(state)
|
||||||
|
|
||||||
@staticmethod
|
self.write_pc_file(state, filename='SDL2_image.pc', name='SDL2_image',
|
||||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
description='image loading library for Simple DirectMedia Layer',
|
||||||
return line + 'Requires.private: libwebp\n' if line.startswith('Requires:') else line
|
version='2.6.0', requires='sdl2 >= 2.0.9', requires_private='libwebp',
|
||||||
|
libs='-lSDL2_image', cflags='-I${includedir}/SDL2')
|
||||||
|
|
||||||
|
bad_cmake_files_path = state.install_path / 'SDL2_image.framework/Resources'
|
||||||
|
good_cmake_files_path = state.install_path / 'lib/cmake'
|
||||||
|
|
||||||
|
if good_cmake_files_path.exists():
|
||||||
|
shutil.rmtree(bad_cmake_files_path)
|
||||||
|
|
||||||
|
shutil.move(str(bad_cmake_files_path), str(good_cmake_files_path))
|
||||||
|
|
||||||
|
|
||||||
class Sdl2MixerTarget(ConfigureMakeStaticDependencyTarget):
|
class Sdl2MixerTarget(ConfigureMakeStaticDependencyTarget):
|
||||||
|
|
Loading…
Reference in a new issue