#
from __future__ import print_function
+import datetime
import glob
import shutil
import os
print('/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :', file=f)
def dependencies(target, options):
-
- if target.platform == 'linux':
- ffmpeg_options = { 'shared': False }
- else:
- ffmpeg_options = {}
-
- if target.platform != 'linux' or target.distro != 'arch':
- deps = [('ffmpeg', '0b73d2f5e70a04a67aa902902c42e3025ef3bb77', ffmpeg_options)]
- else:
- # Use distro-provided FFmpeg on Arch
- deps = []
-
- deps.append(('libdcp', '816365d20e0c6ef37b6bf499a42a0d3ecad22c05', {'c++17': target.platform == 'osx'}))
+ deps = [('libdcp', 'v1.9.7', {'c++17': target.platform == 'osx'})]
deps.append(('libsub', 'v1.6.47'))
deps.append(('leqm-nrt', '30dcaea1373ac62fba050e02ce5b0c1085797a23'))
deps.append(('rtaudio', 'f619b76'))
target.command('./waf install')
def package_windows(target):
- identifier = ''
- if target.version is not None:
- identifier = '%s.' % target.version
- identifier += '%d' % target.bits
+ identifier = '%d' % target.bits
shutil.copyfile('build/platform/windows/installer.%s.nsi' % identifier, 'build/platform/windows/installer2.%s.nsi' % identifier)
target.command('sed -i "s~%%resources%%~%s/platform/windows~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), identifier))
target.command('sed -i "s~%%graphics%%~%s/graphics~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), identifier))
os.makedirs('build/deb')
os.chdir('build/deb')
- shutil.move(f'../../dcpomatic-{version}.tar.bz2', f'{name}_{version}.orig.tar.bz2')
- target.command(f'tar xjf {name}_{version}.orig.tar.bz2')
+ shutil.move(f'../../dcpomatic-{version}.tar.bz2', f'{name}_1+{version}.orig.tar.bz2')
+ target.command(f'tar xjf {name}_1+{version}.orig.tar.bz2')
os.chdir(f'dcpomatic-{version}')
- target.set('EMAIL', 'carl@dcpomatic.com')
- target.command('dch -b -v %s-1 "New upstream release."' % version)
+
+ with open('debian/changelog', 'w') as f:
+ print(f'{name} (1+{version}-1) unstable; urgency=medium', file=f)
+ print('', file=f)
+ print(' * New upstream release.', file=f)
+ print('', file=f)
+ print(f" -- Carl Hetherington <carl@dcpomatic.com> {datetime.datetime.now().astimezone().strftime('%a, %d %b %Y %H:%M:%S %z')}", file=f)
+
target.set('CDIST_LINKFLAGS', target.get('LINKFLAGS'))
target.set('CDIST_CXXFLAGS', target.get('CXXFLAGS'))
target.set('CDIST_PKG_CONFIG_PATH', target.get('PKG_CONFIG_PATH'))
make_spec('dcpomatic2.spec', version, target, options, requires)
cmd = 'rpmbuild --define "_topdir %s" -bb dcpomatic2.spec' % topdir
+ # On Centos 7 we build and install boost ourselves, so we must look for it in the right place
+ target.set('LINKFLAGS', '-L/usr/local/lib')
target.command(cmd)
rpms = []
if target.platform == 'windows':
cmd = 'run\\tests '
else:
- cmd = 'run/tests --check --log_level=test_suite '
+ cmd = 'run/tests '
+ if target.environment_prefix:
+ cmd += '-e %s ' % target.environment_prefix
+ if target.platform != 'windows':
+ cmd += ' --check --log_level=test_suite '
if target.debug:
cmd += '--backtrace '
if test is not None: