From caba3828fc27042c9e8b36cf5bacf7305a343451 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 28 Jan 2024 12:47:51 +0200 Subject: [PATCH] aedi: add doxbox-x target, version 2023.10.06 --- aedi/target/__init__.py | 1 + aedi/target/tool_tier2.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/aedi/target/__init__.py b/aedi/target/__init__.py index e9a07e1b..2464f7e7 100644 --- a/aedi/target/__init__.py +++ b/aedi/target/__init__.py @@ -127,6 +127,7 @@ def targets(): # Tools without binaries stored in the repo, can be outdated AutoconfTarget(), AutomakeTarget(), + DosBoxXTarget(), DzipTarget(), EricWToolsTarget(), GlslangTarget(), diff --git a/aedi/target/tool_tier2.py b/aedi/target/tool_tier2.py index 1e5d1d7a..516315e6 100644 --- a/aedi/target/tool_tier2.py +++ b/aedi/target/tool_tier2.py @@ -47,6 +47,34 @@ class AutomakeTarget(base.ConfigureMakeDependencyTarget): 'f01d58cd6d9d77fbdca9eb4bbd5ead1988228fdb73d6f7a201f5f8d6b118b469') +class DosBoxXTarget(base.ConfigureMakeDependencyTarget): + # Depends on autoconf, automake, freetype + # TODO: fix absolute paths in bin/* and share/autoconf/autom4te.cfg + def __init__(self, name='dosbox-x'): + super().__init__(name) + + def prepare_source(self, state: BuildState): + state.download_source( + 'https://github.com/joncampbell123/dosbox-x/archive/refs/tags/dosbox-x-v2023.10.06.tar.gz', + '65f756e29f9c9b898fdbd22b0cb9b3b24c6e3becb5dcda588aa20a3fde9539a5') + + def configure(self, state: BuildState): + # Invoke MakeTarget.configure() explicitly to create symlinks needed for autoconf + base.MakeTarget.configure(self, state) + + # Generate configure script with autoconf + work_path = state.build_path / self.src_root + subprocess.run(('./autogen.sh',), check=True, cwd=work_path, env=state.environment) + + opts = state.options + opts['--disable-libfluidsynth'] = None # TODO: Resolve conflict with internal FLAC codec + opts['--disable-libslirp'] = None # TODO: Add slirp target + opts['--enable-sdl2'] = None + + # Run generated configure script + super().configure(state) + + class DzipTarget(base.CMakeStaticDependencyTarget): def __init__(self, name='dzip'): super().__init__(name)