aedi: add gme (game-music-emu) target, version 0.6.3

This commit is contained in:
alexey.lysiuk 2024-01-24 10:58:51 +02:00
parent 8a5435b0c8
commit ef51b04609
3 changed files with 26 additions and 0 deletions

View file

@ -79,6 +79,7 @@ def targets():
DumbTarget(),
FluidSynthTarget(),
FmtTarget(),
GmeTarget(),
InstPatchTarget(),
MadTarget(),
MikmodTarget(),

View file

@ -88,6 +88,20 @@ class FmtTarget(base.CMakeStaticDependencyTarget):
super().configure(state)
class GmeTarget(base.CMakeStaticDependencyTarget):
def __init__(self, name='gme'):
super().__init__(name)
def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/libgme/game-music-emu/archive/refs/tags/0.6.3.tar.gz',
'4c5a7614acaea44e5cb1423817d2889deb82674ddbc4e3e1291614304b86fca0',
patches='gme-no-ubsan')
def detect(self, state: BuildState) -> bool:
return state.has_source_file('gme.txt')
class InstPatchTarget(base.CMakeStaticDependencyTarget):
def __init__(self, name='instpatch'):
super().__init__(name)

11
patch/gme-no-ubsan.diff Normal file
View file

@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,7 +67,7 @@
option(BUILD_SHARED_LIBS "Build shared library (set to OFF for static library)" ON)
-option(ENABLE_UBSAN "Enable Undefined Behavior Sanitizer error-checking" ON)
+option(ENABLE_UBSAN "Enable Undefined Behavior Sanitizer error-checking" OFF)
option(BUILD_FRAMEWORK "Build framework instead of dylib (on macOS)" OFF)