From aef0535c5563c74053589a4950619c0e9348ff86 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 21 Sep 2021 13:01:32 +0200 Subject: [PATCH] python/build/libs.py: remove libvorbis, switch to Meson wrap --- android/build.py | 1 - meson.build | 2 ++ python/build/libs.py | 10 ---------- src/lib/xiph/meson.build | 4 +++- subprojects/.gitignore | 1 + subprojects/vorbis.wrap | 14 ++++++++++++++ win32/build.py | 1 - 7 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 subprojects/vorbis.wrap diff --git a/android/build.py b/android/build.py index 202453d9e..93d688c5b 100755 --- a/android/build.py +++ b/android/build.py @@ -153,7 +153,6 @@ from build.libs import * thirdparty_libs = [ libmpdclient, libogg, - libvorbis, opus, flac, libid3tag, diff --git a/meson.build b/meson.build index c9f8145ad..ae9bb296a 100644 --- a/meson.build +++ b/meson.build @@ -15,11 +15,13 @@ project( 'fmt:default_library=static', 'gtest:default_library=static', 'sqlite3:default_library=static', + 'vorbis:default_library=static', # Not interested in compiler warnings from subprojects. 'fmt:warning_level=0', 'gtest:warning_level=0', 'sqlite3:warning_level=0', + 'vorbis:warning_level=0', ], license: 'GPLv2+', ) diff --git a/python/build/libs.py b/python/build/libs.py index 23149ee6a..e4e694fc1 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -28,16 +28,6 @@ libogg = CmakeProject( ], ) -libvorbis = CmakeProject( - 'http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.xz', - 'b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b', - 'lib/libvorbis.a', - [ - '-DBUILD_SHARED_LIBS=OFF', - '-DINSTALL_CMAKE_PACKAGE_MODULE=OFF', - ], -) - opus = AutotoolsProject( 'https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz', '65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d', diff --git a/src/lib/xiph/meson.build b/src/lib/xiph/meson.build index 7f56c76e0..8786ac7e6 100644 --- a/src/lib/xiph/meson.build +++ b/src/lib/xiph/meson.build @@ -5,7 +5,9 @@ if get_option('tremor').enabled() # no libvorbis if Tremor was explicitly enabled libvorbis_dep = dependency('', required: false) else - libvorbis_dep = dependency('vorbis', required: get_option('vorbis')) + libvorbis_dep = dependency('vorbis', + fallback: ['vorbis', 'vorbis_dep'], + required: get_option('vorbis')) endif if libvorbis_dep.found() diff --git a/subprojects/.gitignore b/subprojects/.gitignore index 6ab284255..31a36ad74 100644 --- a/subprojects/.gitignore +++ b/subprojects/.gitignore @@ -3,3 +3,4 @@ /fmt-*/ /googletest-*/ /sqlite-*/ +/libvorbis-*/ diff --git a/subprojects/vorbis.wrap b/subprojects/vorbis.wrap new file mode 100644 index 000000000..eb0c1af60 --- /dev/null +++ b/subprojects/vorbis.wrap @@ -0,0 +1,14 @@ +[wrap-file] +directory = libvorbis-1.3.5 +source_url = http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz +source_filename = libvorbis-1.3.5.tar.xz +source_hash = 54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1 +patch_url = https://wrapdb.mesonbuild.com/v1/projects/vorbis/1.3.5/7/get_zip +patch_filename = vorbis-1.3.5-7-wrap.zip +patch_hash = 7f4d3f9253925196461d52fd4553aad4468fd845560d1ff6c2eb6a012cf64fb0 + +[provide] +vorbis = vorbis_dep +vorbisfile = vorbisfile_dep +vorbisenc = vorbisenc_dep + diff --git a/win32/build.py b/win32/build.py index 0e22b0675..b79ad0954 100755 --- a/win32/build.py +++ b/win32/build.py @@ -96,7 +96,6 @@ from build.libs import * thirdparty_libs = [ libmpdclient, libogg, - libvorbis, opus, flac, zlib,