Fix packaging on arm64.
[dcpomatic.git] / cscript
diff --git a/cscript b/cscript
index 886890b83fe4085fae3a29868d6bc8c0f5bc690f..cd8d814b532ef8cb398bd56bc226364a8fbb8b9d 100644 (file)
--- a/cscript
+++ b/cscript
@@ -378,15 +378,15 @@ def dependencies(target, 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', 'arm64'))
     if can_build_disk(target):
-        deps.append(('lwext4', '370b3de6'))
-    deps.append(('ffcmp', None))
+        deps.append(('lwext4', 'arm64'))
+    deps.append(('ffcmp', 'arm64'))
 
     return deps
 
@@ -417,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']:
@@ -431,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
 
@@ -685,10 +688,10 @@ 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:
+    elif target.platform == 'osx' and hasattr(target, 'archs'):
         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))
         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:
+    elif target.platform == 'osx' and hasattr(target, 'arch'):
         target.command('bash platform/osx/make_dmg.sh %s %s thin %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'):