diff --git a/aedi/target/__init__.py b/aedi/target/__init__.py index 33425bc2..4b4db4bd 100644 --- a/aedi/target/__init__.py +++ b/aedi/target/__init__.py @@ -72,6 +72,7 @@ def targets(): FreeTypeTarget(), FtglTarget(), GlewTarget(), + LuaTarget(), LzmaTarget(), MadTarget(), MikmodTarget(), diff --git a/aedi/target/library_tier2.py b/aedi/target/library_tier2.py index 276048ce..422bc70e 100644 --- a/aedi/target/library_tier2.py +++ b/aedi/target/library_tier2.py @@ -137,6 +137,23 @@ class GlewTarget(CMakeStaticDependencyTarget): return line +class LuaTarget(MakeTarget): + def __init__(self, name='lua'): + super().__init__(name) + + def prepare_source(self, state: BuildState): + state.download_source( + 'https://www.lua.org/ftp/lua-5.4.3.tar.gz', + 'f8612276169e3bfcbcfb8f226195bfc6e466fe13042f1076cbde92b7ec96bbfb') + + def detect(self, state: BuildState) -> bool: + return os.path.exists(state.source + 'src/lua.h') + + def post_build(self, state: BuildState): + self.options['INSTALL_TOP'] = state.install_path + self.install(state, self.options) + + class LzmaTarget(CMakeStaticDependencyTarget): def __init__(self, name='lzma'): super().__init__(name)