Bump libdcp for atmos fix.
[libsub.git] / cscript
1 import os
2
3 def dependencies(target):
4     return (('asdcplib-cth', 'f3b0fb8'), ('libcxml', 'a8d8cba'), ('libdcp', '95c6dd4'))
5
6 def build(target, options):
7     cmd = './waf configure --prefix=%s' % target.directory
8     if target.platform == 'linux':
9         cmd += ' --static'
10         if target.distro == 'centos':
11             cmd += ' --disable-tests'
12             if target.version == '7':
13                 # Centos 7 ships with glibmm 2.50.0 which requires C++11
14                 # but its compiler (gcc 4.8.5) defaults to C++97.  Go figure.
15                 # I worry that this will cause ABI problems but I don't have
16                 # a better solution.
17                 cmd += ' --force-cpp11'
18         if target.distro == 'mageia' and target.version == '6':
19             # Mageia 6 pulls the same stunt except it's libxml++ that requires C++11
20             cmd += ' --force-cpp11'
21     if target.debug:
22         cmd += ' --enable-debug'
23     if target.platform == 'windows':
24         cmd += ' --target-windows --disable-tests'
25
26     target.command(cmd)
27     target.command('./waf build install')
28
29 def make_doxygen(target):
30     os.makedirs('build/doc')
31     target.command('doxygen')
32     return os.path.abspath('build/doc/html')
33
34 def test(target, test):
35     if target.platform != 'windows':
36         target.set('LC_ALL', 'C')
37         if test is None:
38             target.command('run/tests')
39         else:
40             target.command('run/tests --run_test=%s' % test)