mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 16:39:49 +00:00
meson: remove horrifying macos luajit hack
See the previous commit for the full explanation. Basically, luajit 2.0 has a bad pc file on macos that causes libmpv to fail during build. The workaround was, if the os was darwin and luajit was found, to save a full luajit dep and a partial luajit dep with the link args removed. The partial dep was used for compiling libmpv, and the full dep was used for the actual mpv executable. This worked and was needed for the CI to pass but it sucked. Since the previous commit now makes the CI grab lua 5.1, we don't need all this crap anymore. Just delete it and treat the dependency normally. This does effectively mean that building libmpv with luajit 2.0 on macOS will no longer work with the meson build. However libraries not being built correctly is not a mpv-specific issue. The waf build will succeed for some reason, but it has known issues and it would be better if it just failed honestly. An upstream developer said years ago that that macOS users should use the 2.1 branch (and there's no release of course). In any case, no macOS user should be building mpv with luajit 2.0, so we shouldn't be going out of our way to support this. https://github.com/mpv-player/mpv/issues/7512 https://github.com/LuaJIT/LuaJIT/issues/521#issuecomment-562999247
This commit is contained in:
parent
649556b2b6
commit
f9bf6a601c
21
meson.build
21
meson.build
@ -718,20 +718,8 @@ if lua_opt != 'disabled'
|
||||
endforeach
|
||||
endif
|
||||
|
||||
# Dumb hack for macOS if we're using luajit so the shared libary compiles.
|
||||
# The partial dependency is only used for libmpv and not mpv itself.
|
||||
# https://github.com/Homebrew/homebrew-core/issues/37169
|
||||
luajit_full = dependency('', required: false)
|
||||
luajit_partial = dependency('', required: false)
|
||||
if lua['use']
|
||||
if darwin and lua['deps'].name() == 'luajit'
|
||||
luajit_full = lua['deps']
|
||||
luajit_partial = lua['deps'].partial_dependency(compile_args: true, link_args: false,
|
||||
links: true, includes: true, sources: true)
|
||||
else
|
||||
dependencies += lua['deps']
|
||||
endif
|
||||
|
||||
dependencies += lua['deps']
|
||||
features += lua['deps'].name()
|
||||
sources += files('player/lua.c')
|
||||
subdir(join_paths('generated', 'player', 'lua'))
|
||||
@ -1838,9 +1826,8 @@ if get_option('libmpv')
|
||||
minor = client_h_define.split('|')[1].strip('() ')
|
||||
client_api_version = major + '.' + minor + '.0'
|
||||
|
||||
libmpv = library('mpv', sources, dependencies: [dependencies, luajit_partial],
|
||||
gnu_symbol_visibility: 'hidden', version: client_api_version,
|
||||
include_directories: includedir, install: true)
|
||||
libmpv = library('mpv', sources, dependencies: dependencies, gnu_symbol_visibility: 'hidden',
|
||||
version: client_api_version, include_directories: includedir, install: true)
|
||||
pkg = import('pkgconfig')
|
||||
pkg.generate(libmpv, version: client_api_version,
|
||||
description: 'mpv media player client library')
|
||||
@ -1877,6 +1864,6 @@ if get_option('cplayer')
|
||||
rename: 'mpv.svg')
|
||||
install_data('etc/mpv-symbolic.svg', install_dir: join_paths(hicolor_dir, 'symbolic', 'apps'))
|
||||
|
||||
executable('mpv', sources, dependencies: [dependencies, luajit_full],
|
||||
executable('mpv', sources, dependencies: dependencies,
|
||||
include_directories: includedir, install: true)
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user