From 3e321a61e7e2c865d99f2a132dc12939f463bb57 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Tue, 1 Jun 2021 12:51:30 +0300 Subject: [PATCH] aedi: use cmake to build mpg123 --- aedi/target/library_tier1.py | 8 ++++++-- patch/mpg123-xcompile-fpu.diff | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 patch/mpg123-xcompile-fpu.diff diff --git a/aedi/target/library_tier1.py b/aedi/target/library_tier1.py index 94a4f613..de9601ca 100644 --- a/aedi/target/library_tier1.py +++ b/aedi/target/library_tier1.py @@ -305,14 +305,18 @@ class MoltenVKTarget(MakeTarget): shutil.copy(src_path + 'dylib/macOS/libMoltenVK.dylib', lib_path) -class Mpg123Target(ConfigureMakeStaticDependencyTarget): +class Mpg123Target(CMakeStaticDependencyTarget): def __init__(self, name='mpg123'): super().__init__(name) + self.src_root = 'ports/cmake' + self.options['CMAKE_EXE_LINKER_FLAGS'] = '-framework AudioUnit' + def prepare_source(self, state: BuildState): state.download_source( 'https://www.mpg123.de/download/mpg123-1.27.2.tar.bz2', - '52f6ceb962c05db0c043bb27acf5a721381f5f356ac4610e5221f50293891b04') + '52f6ceb962c05db0c043bb27acf5a721381f5f356ac4610e5221f50293891b04', + patches='mpg123-xcompile-fpu') def detect(self, state: BuildState) -> bool: return os.path.exists(state.source + 'libmpg123.pc.in') diff --git a/patch/mpg123-xcompile-fpu.diff b/patch/mpg123-xcompile-fpu.diff new file mode 100644 index 00000000..9db12ab2 --- /dev/null +++ b/patch/mpg123-xcompile-fpu.diff @@ -0,0 +1,11 @@ +--- a/ports/cmake/src/CMakeLists.txt ++++ b/ports/cmake/src/CMakeLists.txt +@@ -175,7 +175,7 @@ + set(NO_ERETURN ON) + endif() + +-cmake_host_system_information(RESULT HAVE_FPU QUERY HAS_FPU) ++set(HAVE_FPU ON) + + if(NOT HAVE_FPU) + set(NO_SYNTH32 ON)