subprojects: add lame

This commit is contained in:
Max Kellermann 2023-12-11 11:06:52 +01:00
parent 7727311df7
commit 303d981099
6 changed files with 33 additions and 13 deletions

View File

@ -17,6 +17,7 @@ project(
'flac:default_library=static',
'fmt:default_library=static',
'gtest:default_library=static',
'lame:default_library=static',
'liburing:default_library=static',
'ogg:default_library=static',
'openssl:default_library=static',
@ -33,6 +34,8 @@ project(
'flac:warning_level=0',
'fmt:warning_level=0',
'gtest:warning_level=0',
'lame:werror=false',
'lame:warning_level=0',
'liburing:warning_level=0',
'sqlite3:warning_level=0',
'oggiopus:werror=false',
@ -71,6 +74,8 @@ project(
'curl:smtp=disabled',
'curl:telnet=disabled',
'curl:tftp=disabled',
'lame:decoder=false',
'lame:tools=disabled',
'openssl:build_cli=false',
'openssl:asm=disabled', # work around "call to undeclared function "asm" on Android
'opus:docs=disabled',

View File

@ -63,17 +63,6 @@ libmad = AutotoolsProject(
autogen=True,
)
liblame = AutotoolsProject(
'http://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz',
'ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e',
'lib/libmp3lame.a',
[
'--disable-shared', '--enable-static',
'--disable-gtktest', '--disable-analyzer-hooks',
'--disable-decoder', '--disable-frontend',
],
)
libmodplug = AutotoolsProject(
'https://downloads.sourceforge.net/modplug-xmms/libmodplug/0.8.9.0/libmodplug-0.8.9.0.tar.gz',
'457ca5a6c179656d66c01505c0d95fafaead4329b9dbaa0f997d00a3508ad9de',

View File

@ -16,7 +16,19 @@ if libvorbisenc_dep.found()
encoder_plugins_sources += 'VorbisEncoderPlugin.cxx'
endif
liblame_dep = c_compiler.find_library('mp3lame', required: get_option('lame'))
if not get_option('lame').disabled()
# LAME doesn't have a pkg-config file so we have to use
# find_library()
liblame_dep = c_compiler.find_library('mp3lame', required: false)
if not liblame_dep.found()
# only if that was not found, use dependency() which may use the
# LAME subproject
liblame_dep = dependency('mp3lame', required: get_option('lame'))
endif
else
liblame_dep = dependency('', required: false)
endif
encoder_features.set('ENABLE_LAME', liblame_dep.found())
if liblame_dep.found()
encoder_plugins_sources += 'LameEncoderPlugin.cxx'

View File

@ -5,6 +5,7 @@
/flac-*/
/fmt-*/
/googletest-*/
/lame-*/
/openssl-*/
/opus-*/
/sqlite-*/

14
subprojects/lame.wrap Normal file
View File

@ -0,0 +1,14 @@
[wrap-file]
directory = lame-3.100
source_url = http://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
source_filename = lame-3.100.tar.gz
source_hash = ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e
patch_filename = lame_3.100-9_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/lame_3.100-9/get_patch
patch_hash = bedda639a621b2046fb04110a51870d6c9640f2f4282b5d877bc452e9943c22e
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/lame_3.100-9/lame-3.100.tar.gz
wrapdb_version = 3.100-9
[provide]
mp3lame = lame_dep
mpglib = mpglib_dep

View File

@ -41,7 +41,6 @@ thirdparty_libs = [
libmpdclient,
zlib,
libid3tag,
liblame,
libmodplug,
libopenmpt,
wildmidi,