From 7eba5a994dacaa162110b92c8de3c38d547b5c91 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 2 Dec 2024 18:48:13 +0300 Subject: [PATCH] wscript: specifically look for opus 1.4, as 1.5 have broken custom modes Link to GitHub issue: https://github.com/xiph/opus/issues/374 --- wscript | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index adbea2cc..7fac0999 100644 --- a/wscript +++ b/wscript @@ -480,8 +480,9 @@ def configure(conf): if conf.check_cfg(package=i[0], uselib_store=i[1], args='--cflags --libs', mandatory=False): conf.env['HAVE_SYSTEM_%s' % i[0].upper()] = True - # search for opus 1.4 or higher, it has fixes for custom modes - if conf.check_cfg(package='opus', uselib_store='opus', args='opus >= 1.4 --cflags --libs', mandatory=False): + # search for opus 1.4 only, it has fixes for custom modes + # 1.5 breaks custom modes: https://github.com/xiph/opus/issues/374 + if conf.check_cfg(package='opus', uselib_store='opus', args='opus = 1.4 --cflags --libs', mandatory=False): # now try to link with export that only exists with CUSTOM_MODES defined frag='''#include int main(void) { return !opus_custom_encoder_init((OpusCustomEncoder *)1, (const OpusCustomMode *)1, 1); }'''