aedi: use cmake to build mpg123

This commit is contained in:
alexey.lysiuk 2021-06-01 12:51:30 +03:00
parent 95305cbbf1
commit 3e321a61e7
2 changed files with 17 additions and 2 deletions

View file

@ -305,14 +305,18 @@ class MoltenVKTarget(MakeTarget):
shutil.copy(src_path + 'dylib/macOS/libMoltenVK.dylib', lib_path) shutil.copy(src_path + 'dylib/macOS/libMoltenVK.dylib', lib_path)
class Mpg123Target(ConfigureMakeStaticDependencyTarget): class Mpg123Target(CMakeStaticDependencyTarget):
def __init__(self, name='mpg123'): def __init__(self, name='mpg123'):
super().__init__(name) super().__init__(name)
self.src_root = 'ports/cmake'
self.options['CMAKE_EXE_LINKER_FLAGS'] = '-framework AudioUnit'
def prepare_source(self, state: BuildState): def prepare_source(self, state: BuildState):
state.download_source( state.download_source(
'https://www.mpg123.de/download/mpg123-1.27.2.tar.bz2', 'https://www.mpg123.de/download/mpg123-1.27.2.tar.bz2',
'52f6ceb962c05db0c043bb27acf5a721381f5f356ac4610e5221f50293891b04') '52f6ceb962c05db0c043bb27acf5a721381f5f356ac4610e5221f50293891b04',
patches='mpg123-xcompile-fpu')
def detect(self, state: BuildState) -> bool: def detect(self, state: BuildState) -> bool:
return os.path.exists(state.source + 'libmpg123.pc.in') return os.path.exists(state.source + 'libmpg123.pc.in')

View file

@ -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)