X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=cscript;h=1ca9aec38a3e67d12a4aafb8b492ebe05d9a3e63;hb=90310c8538e7d32b2e9448cdd00926d63ee57e65;hp=990ad52f3c5e8f2a4e98e92219fde3b7f3cd024a;hpb=a332bd6be323f03dad5b180fb237afe54f1bf81e;p=dcpomatic.git diff --git a/cscript b/cscript index 990ad52f3..1ca9aec38 100644 --- a/cscript +++ b/cscript @@ -325,6 +325,8 @@ def make_spec(filename, version, target, options, requires=None): print('%%{_datadir}/locale/%s/LC_MESSAGES/dcpomatic2.mo' % l, file=f) print('%%{_datadir}/locale/%s/LC_MESSAGES/libdcpomatic2-wx.mo' % l, file=f) print('%%{_datadir}/locale/%s/LC_MESSAGES/libdcpomatic2.mo' % l, file=f) + print('%{_datadir}/libdcp/tags/*', file=f) + print('%{_datadir}/libdcp/xsd/*', file=f) print('', file=f) print('%prep', file=f) print('rm -rf $RPM_BUILD_DIR/dcpomatic-%s' % version, file=f) @@ -339,6 +341,9 @@ def make_spec(filename, version, target, options, requires=None): print('cd dcpomatic-%s' % version, file=f) print('./waf install', file=f) print('/bin/cp %s/src/openssl/apps/openssl %%{buildroot}/usr/bin/dcpomatic2_openssl' % target.directory, file=f) + print('/bin/mkdir -p %{buildroot}/usr/share/libdcp', file=f) + print('/bin/cp -r %s/src/libdcp/tags %%{buildroot}/usr/share/libdcp' % target.directory, file=f) + print('/bin/cp -r %s/src/libdcp/xsd %%{buildroot}/usr/share/libdcp' % target.directory, file=f) print('', file=f) print('%post', file=f) print('/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :', file=f) @@ -360,28 +365,28 @@ def dependencies(target, options): ffmpeg_options = {} if target.platform != 'linux' or target.distro != 'arch': - deps = [('ffmpeg-cdist', 'd798b45', ffmpeg_options)] + deps = [('ffmpeg-cdist', 'arm64', ffmpeg_options)] else: # Use distro-provided FFmpeg on Arch deps = [] # Let's use C++11 mode if we can cpp_lib_options = {'force-cpp11': True} if ( - (target.platform == 'osx' and target.bits == 64) or + (target.platform == 'osx') or (target.platform == 'windows')) else {} - deps.append(('libdcp', 'b636c3e', cpp_lib_options)) - deps.append(('libsub', '6514f5b', cpp_lib_options)) + deps.append(('libdcp', 'c6665c1', cpp_lib_options)) + deps.append(('libsub', '64eb116', cpp_lib_options)) deps.append(('leqm-nrt', 'carl')) - deps.append(('rtaudio', 'carl')) + deps.append(('rtaudio', 'arm64')) # We get our OpenSSL libraries from the environment, but we # also need a patched openssl binary to make certificates. # This dependency is to get that binary, which is added into # the appropriate place later - deps.append(('openssl', 'carl')) + deps.append(('openssl', 'arm64')) if can_build_disk(target): - deps.append(('lwext4', '370b3de6')) - deps.append(('ffcmp', None)) + deps.append(('lwext4', 'arm64')) + deps.append(('ffcmp', 'arm64')) return deps @@ -412,7 +417,7 @@ def configure_options(target, options): # I worry that this will cause ABI problems but I don't have # a better solution. opt += ' --force-cpp11' - elif target.platform == 'osx' and target.bits == 64: + elif target.platform == 'osx' and target.arch != 'i386': opt += ' --force-cpp11' if not options['gui']: @@ -426,7 +431,10 @@ def configure_options(target, options): opt += ' --static-dcpomatic' if can_build_disk(target): - opt += ' --enable-disk' + opt += ' --enable-disk' + + if target.platform == 'osx' and target.arch == 'arm64': + opt += ' --target-macos-arm64 --wx-config=%s/wx-config' % target.bin return opt @@ -680,11 +688,14 @@ def package(target, version, options): return package_debian(target, cpu, version, options) elif target.distro == 'centos' or target.distro == 'fedora' or target.distro == 'mageia': return package_rpm(target, cpu, version, options) - elif target.platform == 'osx' and target.bits is None: - target.command('bash platform/osx/make_dmg.sh %s %s universal no %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password)) + elif target.platform == 'osx' and hasattr(target, 'archs') and sorted(target.archs) == sorted(('arm64', 'x86_64')): + target.command('bash platform/osx/make_dmg.sh %s %s arm-intel-64 %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password)) + return [os.path.abspath(x) for x in glob.glob('build/platform/osx/DCP-o-matic*.dmg')] + elif target.platform == 'osx' and hasattr(target, 'archs') and sorted(target.archs) == sorted(('i386', 'x86_64')): + target.command('bash platform/osx/make_dmg.sh %s %s intel-32-64 %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password)) return [os.path.abspath(x) for x in glob.glob('build/platform/osx/DCP-o-matic*.dmg')] - elif target.platform == 'osx' and target.bits == 64: - target.command('bash platform/osx/make_dmg.sh %s %s thin %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password)) + elif target.platform == 'osx' and hasattr(target, 'arch') and target.arch == 'arm64': + target.command('bash platform/osx/make_dmg.sh %s %s arm64 %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password)) packages = [] for x in glob.glob('build/platform/osx/DCP-o-matic*.dmg'): a = os.path.abspath(x) @@ -737,11 +748,11 @@ def make_manual(target): def test(target, options, test): target.set('LC_ALL', 'C') if target.platform == 'windows': - cmd = 'run\\tests' + cmd = 'run\\tests ' else: cmd = 'run/tests ' if target.debug: cmd += '--backtrace ' if test is not None: - cmd += '--run_test=%s' % test + cmd += '-t %s' % test target.command(cmd)