Skip to content

Commit

Permalink
meson: Support system-provided bestsource
Browse files Browse the repository at this point in the history
Meson unconditionally uses the wrapped bestsource dependency when the
bestsource option is enabled. Update meson.build to support using a
system-provided version of bestsource when it is present.
  • Loading branch information
al3xtjames authored and arch1t3cht committed Oct 29, 2024
1 parent 1060e05 commit 490fcd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,9 @@ needs_ffmpeg = false

if get_option('bestsource').enabled()
conf.set('WITH_BESTSOURCE', 1)
bs = subproject('bestsource', default_options: ['enable_plugin=false'])
deps += bs.get_variable('bestsource_dep')
deps += dependency('bestsource', version: '>=6.0',
fallback: ['bestsource', 'bestsource_dep'],
default_options: ['enable_plugin=false'])
dep_avail += 'BestSource'
needs_ffmpeg = true
endif
Expand Down
5 changes: 3 additions & 2 deletions subprojects/packagefiles/bestsource/0001.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
diff --git a/meson.build b/meson.build
index 6017b15..de1fbc5 100644
index 6017b15..eec9249 100644
--- a/meson.build
+++ b/meson.build
@@ -2,10 +2,6 @@ project('BestSource', 'cpp',
@@ -2,10 +2,7 @@ project('BestSource', 'cpp',
default_options: ['buildtype=release', 'b_ndebug=if-release', 'cpp_std=c++17'],
license: 'MIT',
meson_version: '>=0.53.0',
- version: '.'.join([
- run_command('grep', 'BEST_SOURCE_VERSION_MAJOR', 'src/version.h', check: true).stdout().strip().split()[2],
- run_command('grep', 'BEST_SOURCE_VERSION_MINOR', 'src/version.h', check: true).stdout().strip().split()[2],
- ])
+ version: '6.0'
)

api_sources = files(

0 comments on commit 490fcd9

Please sign in to comment.