mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2025-02-18 01:21:47 +00:00
aedi: use cmake to build sdl2_ttf
This commit is contained in:
parent
b7a948c1f5
commit
6159a1b6e3
1 changed files with 8 additions and 2 deletions
|
@ -325,18 +325,24 @@ class Sdl2NetTarget(ConfigureMakeStaticDependencyTarget):
|
||||||
return os.path.exists(state.source + 'SDL2_net.pc.in')
|
return os.path.exists(state.source + 'SDL2_net.pc.in')
|
||||||
|
|
||||||
|
|
||||||
class Sdl2TtfTarget(ConfigureMakeStaticDependencyTarget):
|
class Sdl2TtfTarget(CMakeStaticDependencyTarget):
|
||||||
def __init__(self, name='sdl2_ttf'):
|
def __init__(self, name='sdl2_ttf'):
|
||||||
super().__init__(name)
|
super().__init__(name)
|
||||||
|
self.options['VERSION'] = '2.0.15'
|
||||||
|
|
||||||
def prepare_source(self, state: BuildState):
|
def prepare_source(self, state: BuildState):
|
||||||
state.download_source(
|
state.download_source(
|
||||||
'https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.15.tar.gz',
|
'https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.15.tar.gz',
|
||||||
'a9eceb1ad88c1f1545cd7bd28e7cbc0b2c14191d40238f531a15b01b1b22cd33')
|
'a9eceb1ad88c1f1545cd7bd28e7cbc0b2c14191d40238f531a15b01b1b22cd33',
|
||||||
|
patches='sdl2_ttf-fix-cmake')
|
||||||
|
|
||||||
def detect(self, state: BuildState) -> bool:
|
def detect(self, state: BuildState) -> bool:
|
||||||
return os.path.exists(state.source + 'SDL2_ttf.pc.in')
|
return os.path.exists(state.source + 'SDL2_ttf.pc.in')
|
||||||
|
|
||||||
|
def post_build(self, state: BuildState):
|
||||||
|
super().post_build(state)
|
||||||
|
shutil.move(state.install_path + 'SDL2_ttf.framework/Resources', state.install_path + 'lib/cmake/SDL2_ttf')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||||
return line + 'Requires.private: freetype2\n' if line.startswith('Requires:') else line
|
return line + 'Requires.private: freetype2\n' if line.startswith('Requires:') else line
|
||||||
|
|
Loading…
Reference in a new issue