diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-03-14 15:10:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-03-16 20:26:10 +0100 |
| commit | 13b49d8b78c0896ec903cf0206230846ac33da48 (patch) | |
| tree | fbb7077d655c1416e39c7e60e5fda96d8f60e682 | |
| parent | 40a1d9a269fe60b41c51704069f31c78af91b013 (diff) | |
Build with C++17 on Debian Unstable.
It now ships a libicu whose header needs C++17 (it uses an auto template
parameter).
| -rw-r--r-- | cscript | 16 | ||||
| -rw-r--r-- | wscript | 4 |
2 files changed, 14 insertions, 6 deletions
@@ -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): @@ -92,11 +92,13 @@ def configure(conf): conf.env.XMLPP_API = '4.0' conf.env.PANGOMM_API = '2.48' conf.env.CAIROMM_API = '1.16' + conf.env.GLIBMM_API = '2.68' else: cpp_std = '11' conf.env.XMLPP_API = '2.6' conf.env.PANGOMM_API = '1.4' conf.env.CAIROMM_API = '1.0' + conf.env.GLIBMM_API = '2.4' # Save conf.options that we need elsewhere in conf.env conf.env.DISABLE_GUI = conf.options.disable_gui @@ -392,7 +394,7 @@ def configure(conf): check_via_pkg_config(conf, 'libdcp-1.0', 'DCP', mandatory=True, static=True, minimum_version=libdcp_version) conf.env.DEFINES_DCP = [f.replace('\\', '') for f in conf.env.DEFINES_DCP] conf.env.STLIB_DCP = ['dcp-1.0', 'asdcp-dcpomatic', 'kumu-dcpomatic', 'openjp2'] - conf.env.LIB_DCP = ['glibmm-2.4', 'ssl', 'crypto', 'bz2', 'xslt', 'xerces-c', 'fmt'] + conf.env.LIB_DCP = ['glibmm-' + conf.env.GLIBMM_API, 'ssl', 'crypto', 'bz2', 'xslt', 'xerces-c', 'fmt'] else: check_via_pkg_config(conf, 'libdcp-1.0', 'DCP', mandatory=True, static=False, minimum_version=libdcp_version) conf.env.DEFINES_DCP = [f.replace('\\', '') for f in conf.env.DEFINES_DCP] |
