|
|
@ -1,7 +1,7 @@
|
|
|
|
project(
|
|
|
|
project(
|
|
|
|
'mpd',
|
|
|
|
'mpd-dbcreate',
|
|
|
|
['c', 'cpp'],
|
|
|
|
['c', 'cpp'],
|
|
|
|
version: '0.25',
|
|
|
|
version: '0.1',
|
|
|
|
meson_version: '>= 1.2',
|
|
|
|
meson_version: '>= 1.2',
|
|
|
|
default_options: [
|
|
|
|
default_options: [
|
|
|
|
'c_std=c11',
|
|
|
|
'c_std=c11',
|
|
|
@ -237,13 +237,11 @@ add_project_arguments(c_compiler.get_supported_arguments(test_cflags), language:
|
|
|
|
add_project_link_arguments(compiler.get_supported_link_arguments(test_ldflags), language: 'cpp')
|
|
|
|
add_project_link_arguments(compiler.get_supported_link_arguments(test_ldflags), language: 'cpp')
|
|
|
|
|
|
|
|
|
|
|
|
is_linux = host_machine.system() == 'linux'
|
|
|
|
is_linux = host_machine.system() == 'linux'
|
|
|
|
is_android = get_option('android_ndk') != ''
|
|
|
|
is_android = false # Android support removed
|
|
|
|
is_darwin = host_machine.system() == 'darwin'
|
|
|
|
is_darwin = host_machine.system() == 'darwin'
|
|
|
|
is_windows = host_machine.system() == 'windows'
|
|
|
|
is_windows = host_machine.system() == 'windows'
|
|
|
|
|
|
|
|
|
|
|
|
if is_android
|
|
|
|
# Android support removed
|
|
|
|
common_cppflags += '-DANDROID'
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if is_windows
|
|
|
|
if is_windows
|
|
|
|
common_cppflags += [
|
|
|
|
common_cppflags += [
|
|
|
@ -275,13 +273,7 @@ if is_windows
|
|
|
|
subdir('win32')
|
|
|
|
subdir('win32')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
if is_android
|
|
|
|
# Android support removed from mpd-dbcreate
|
|
|
|
# With ndk27 libcpp doesn't seem to have a rune table defined for the
|
|
|
|
|
|
|
|
# localization module, tell it to use the one it ships with
|
|
|
|
|
|
|
|
common_cppflags += ['-D_LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subdir('android')
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_global_arguments(common_global_cppflags, language: 'c')
|
|
|
|
add_global_arguments(common_global_cppflags, language: 'c')
|
|
|
|
add_global_arguments(common_global_cppflags, language: 'cpp')
|
|
|
|
add_global_arguments(common_global_cppflags, language: 'cpp')
|
|
|
@ -289,8 +281,9 @@ add_global_arguments(common_global_cppflags, language: 'cpp')
|
|
|
|
add_project_arguments(common_cppflags, language: 'c')
|
|
|
|
add_project_arguments(common_cppflags, language: 'c')
|
|
|
|
add_project_arguments(common_cppflags, language: 'cpp')
|
|
|
|
add_project_arguments(common_cppflags, language: 'cpp')
|
|
|
|
|
|
|
|
|
|
|
|
enable_daemon = not is_windows and not is_android and get_option('daemon')
|
|
|
|
# mpd-dbcreate is not a daemon - it's a standalone utility
|
|
|
|
conf.set('ENABLE_DAEMON', enable_daemon)
|
|
|
|
enable_daemon = false
|
|
|
|
|
|
|
|
conf.set('ENABLE_DAEMON', false)
|
|
|
|
|
|
|
|
|
|
|
|
conf.set('HAVE_GETPWNAM_R', compiler.has_function('getpwnam_r'))
|
|
|
|
conf.set('HAVE_GETPWNAM_R', compiler.has_function('getpwnam_r'))
|
|
|
|
conf.set('HAVE_INITGROUPS', compiler.has_function('initgroups'))
|
|
|
|
conf.set('HAVE_INITGROUPS', compiler.has_function('initgroups'))
|
|
|
@ -457,19 +450,11 @@ if is_windows
|
|
|
|
]
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
if not is_android
|
|
|
|
# Android support removed - always use non-Android sources
|
|
|
|
sources += [
|
|
|
|
sources += [
|
|
|
|
'src/CommandLine.cxx',
|
|
|
|
'src/CommandLine.cxx',
|
|
|
|
'src/unix/SignalHandlers.cxx',
|
|
|
|
'src/unix/SignalHandlers.cxx',
|
|
|
|
]
|
|
|
|
]
|
|
|
|
else
|
|
|
|
|
|
|
|
sources += [
|
|
|
|
|
|
|
|
'src/android/Context.cxx',
|
|
|
|
|
|
|
|
'src/android/AudioManager.cxx',
|
|
|
|
|
|
|
|
'src/android/Environment.cxx',
|
|
|
|
|
|
|
|
'src/android/LogListener.cxx',
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if enable_daemon
|
|
|
|
if enable_daemon
|
|
|
|
sources += 'src/unix/Daemon.cxx'
|
|
|
|
sources += 'src/unix/Daemon.cxx'
|
|
|
@ -509,7 +494,8 @@ subdir('src/lib/dbus')
|
|
|
|
subdir('src/lib/smbclient')
|
|
|
|
subdir('src/lib/smbclient')
|
|
|
|
subdir('src/lib/zlib')
|
|
|
|
subdir('src/lib/zlib')
|
|
|
|
|
|
|
|
|
|
|
|
subdir('src/lib/alsa')
|
|
|
|
# subdir('src/lib/alsa') # Disabled - not needed for database creation
|
|
|
|
|
|
|
|
alsa_dep = declare_dependency() # Empty dependency for compatibility
|
|
|
|
subdir('src/lib/chromaprint')
|
|
|
|
subdir('src/lib/chromaprint')
|
|
|
|
subdir('src/lib/curl')
|
|
|
|
subdir('src/lib/curl')
|
|
|
|
subdir('src/lib/expat')
|
|
|
|
subdir('src/lib/expat')
|
|
|
@ -517,13 +503,17 @@ subdir('src/lib/ffmpeg')
|
|
|
|
subdir('src/lib/gcrypt')
|
|
|
|
subdir('src/lib/gcrypt')
|
|
|
|
subdir('src/lib/nfs')
|
|
|
|
subdir('src/lib/nfs')
|
|
|
|
subdir('src/lib/nlohmann_json')
|
|
|
|
subdir('src/lib/nlohmann_json')
|
|
|
|
subdir('src/lib/oss')
|
|
|
|
# subdir('src/lib/oss') # Disabled - not needed for database creation
|
|
|
|
|
|
|
|
enable_oss = false # Disabled for database creation
|
|
|
|
subdir('src/lib/pcre')
|
|
|
|
subdir('src/lib/pcre')
|
|
|
|
subdir('src/lib/pipewire')
|
|
|
|
# subdir('src/lib/pipewire') # Disabled - not needed for database creation
|
|
|
|
subdir('src/lib/pulse')
|
|
|
|
pipewire_dep = declare_dependency() # Empty dependency for compatibility
|
|
|
|
subdir('src/lib/sndio')
|
|
|
|
# subdir('src/lib/pulse') # Disabled - not needed for database creation
|
|
|
|
|
|
|
|
pulse_dep = declare_dependency() # Empty dependency for compatibility
|
|
|
|
|
|
|
|
# subdir('src/lib/sndio') # Disabled - not needed for database creation
|
|
|
|
|
|
|
|
libsndio_dep = declare_dependency() # Empty dependency for compatibility
|
|
|
|
subdir('src/lib/sqlite')
|
|
|
|
subdir('src/lib/sqlite')
|
|
|
|
subdir('src/lib/systemd')
|
|
|
|
subdir('src/lib/systemd') # Provides empty systemd_dep for compatibility
|
|
|
|
subdir('src/lib/upnp')
|
|
|
|
subdir('src/lib/upnp')
|
|
|
|
|
|
|
|
|
|
|
|
subdir('src/lib/crypto')
|
|
|
|
subdir('src/lib/crypto')
|
|
|
@ -613,27 +603,10 @@ endif
|
|
|
|
|
|
|
|
|
|
|
|
link_args = []
|
|
|
|
link_args = []
|
|
|
|
more_deps = []
|
|
|
|
more_deps = []
|
|
|
|
if is_android
|
|
|
|
# Android support removed - always use executable type
|
|
|
|
subdir('src/java')
|
|
|
|
target_type = 'executable'
|
|
|
|
target_type = 'shared_library'
|
|
|
|
target_name = 'mpd'
|
|
|
|
target_name = 'mpd'
|
|
|
|
install_dir = get_option('bindir')
|
|
|
|
link_args += [
|
|
|
|
|
|
|
|
'-Wl,--no-undefined,-shared,-Bsymbolic',
|
|
|
|
|
|
|
|
'-llog',
|
|
|
|
|
|
|
|
'-lz',
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
more_deps += [
|
|
|
|
|
|
|
|
declare_dependency(sources: [bridge_header]),
|
|
|
|
|
|
|
|
java_dep,
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
android_abi = get_option('android_abi')
|
|
|
|
|
|
|
|
install_dir = meson.current_source_dir() / 'android/app/src/main/jniLibs' / android_abi
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
target_type = 'executable'
|
|
|
|
|
|
|
|
target_name = 'mpd'
|
|
|
|
|
|
|
|
install_dir = get_option('bindir')
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if enable_sacdiso
|
|
|
|
if enable_sacdiso
|
|
|
|
more_deps += [
|
|
|
|
more_deps += [
|
|
|
@ -647,9 +620,9 @@ if enable_dvdaiso
|
|
|
|
]
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# MPD build target removed - this project only builds mpd-dbcreate
|
|
|
|
# The mpd-dbcreator utility is a specialized database creator that
|
|
|
|
# The mpd-dbcreate utility is a specialized database creator that
|
|
|
|
|
|
|
|
# uses MPD's codebase but with modified behavior for filtering
|
|
|
|
# uses MPD's codebase but with modified behavior for filtering
|
|
|
|
|
|
|
|
# multichannel content. It's just hacked mpd.'
|
|
|
|
|
|
|
|
|
|
|
|
configure_file(output: 'config.h', configuration: conf)
|
|
|
|
configure_file(output: 'config.h', configuration: conf)
|
|
|
|
|
|
|
|
|
|
|
@ -668,7 +641,6 @@ db_creator_sources = [
|
|
|
|
source_index = 0
|
|
|
|
source_index = 0
|
|
|
|
foreach src : sources
|
|
|
|
foreach src : sources
|
|
|
|
if source_index == 0
|
|
|
|
if source_index == 0
|
|
|
|
# Skip version_cxx (first element)
|
|
|
|
|
|
|
|
source_index += 1
|
|
|
|
source_index += 1
|
|
|
|
else
|
|
|
|
else
|
|
|
|
# For all other elements, only check against Main.cxx
|
|
|
|
# For all other elements, only check against Main.cxx
|
|
|
@ -702,7 +674,7 @@ mpd_dbcreate = executable(
|
|
|
|
db_glue_dep,
|
|
|
|
db_glue_dep,
|
|
|
|
storage_glue_dep,
|
|
|
|
storage_glue_dep,
|
|
|
|
song_dep,
|
|
|
|
song_dep,
|
|
|
|
systemd_dep,
|
|
|
|
# so log systemd!
|
|
|
|
sqlite_dep,
|
|
|
|
sqlite_dep,
|
|
|
|
chromaprint_dep,
|
|
|
|
chromaprint_dep,
|
|
|
|
neighbor_glue_dep,
|
|
|
|
neighbor_glue_dep,
|
|
|
@ -717,21 +689,18 @@ mpd_dbcreate = executable(
|
|
|
|
install_dir: get_option('bindir')
|
|
|
|
install_dir: get_option('bindir')
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if systemd_dep.found()
|
|
|
|
# dropped systemd like a bad habbit because we quit daemon life
|
|
|
|
subdir('systemd')
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not is_android
|
|
|
|
# Android deleted because why would you run this on a phone?
|
|
|
|
install_data(
|
|
|
|
install_data(
|
|
|
|
'mpd.svg',
|
|
|
|
'mpd.svg',
|
|
|
|
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'apps'),
|
|
|
|
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'apps'),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
install_data(
|
|
|
|
install_data(
|
|
|
|
'AUTHORS', 'COPYING', 'NEWS', 'README.md',
|
|
|
|
'AUTHORS', 'COPYING', 'NEWS', 'README.md',
|
|
|
|
install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
|
|
|
|
install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subdir('doc')
|
|
|
|
subdir('doc')
|
|
|
|
|
|
|
|
|
|
|
|