From 13b49d8b78c0896ec903cf0206230846ac33da48 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 14 Mar 2025 15:10:35 +0100 Subject: Build with C++17 on Debian Unstable. It now ships a libicu whose header needs C++17 (it uses an auto template parameter). --- cscript | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'cscript') diff --git a/cscript b/cscript index 99e9da527..afffe48a3 100644 --- a/cscript +++ b/cscript @@ -430,8 +430,13 @@ def make_spec(filename, version, target, options, requires=None): print('%posttrans', file=f) print('/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :', file=f) + +def build_with_cpp17(target): + return target.platform.startswith('osx') or (target.platform == 'linux' and target.distro == 'debian' and target.version == 'unstable') + + def dependencies(target, options): - deps = [('libdcp', 'v1.10.14', {'c++17': target.platform.startswith('osx')})] + deps = [('libdcp', 'v1.10.15', {'c++17': build_with_cpp17(target)})] deps.append(('libsub', 'v1.6.53')) deps.append(('leqm-nrt', '30dcaea1373ac62fba050e02ce5b0c1085797a23')) deps.append(('rtaudio', 'f619b76')) @@ -494,14 +499,15 @@ def configure_options(target, options, for_package=False): if can_build_disk(target): opt += ' --enable-disk' - if target.platform == 'osx': - opt += ' --c++17' - if target.arch == 'arm64': - opt += ' --wx-config=%s/wx-config' % target.bin + if target.platform == 'osx' and target.arch == 'arm64': + opt += ' --wx-config=%s/wx-config' % target.bin if target.platform == 'linux' and target.distro == 'ubuntu' and target.version == '24.04': opt += ' --enable-grok' + if build_with_cpp17(target): + opt += ' --c++17' + return opt def build(target, options, for_package): -- cgit v1.2.3