Update lwext4 for build fix so that its arm64 library is relinked
[dcpomatic.git] / cscript
diff --git a/cscript b/cscript
index c36f880d462af9e3e337325c6705636e8f3c5b0a..e91607600570895d4682e93306d72838eaa41916 100644 (file)
--- a/cscript
+++ b/cscript
@@ -93,7 +93,6 @@ deb_depends['20.04'].extend(['libboost-filesystem1.71.0',
                              'libpangomm-1.4-1v5',
                              'libxml++2.6-2v5',
                              'libzip5',
-                             'libwxgtk3.0-gtk3-0v5',
                              'libicu66',
                              'libnettle7',
                              'libssh-4',
@@ -112,11 +111,10 @@ deb_depends['20.10'].extend(['libboost-filesystem1.71.0',
                              'libpangomm-1.4-1v5',
                              'libxml++2.6-2v5',
                              'libzip5',
-                             'libwxgtk3.0-gtk3-0v5',
-                             'libicu66',
-                             'libnettle7',
+                             'libicu67',
+                             'libnettle8',
                              'libssh-4',
-                             'libx264-155',
+                             'libx264-160',
                              'libcurl4',
                              'libpulse0',
                              'libxerces-c3.2',
@@ -287,9 +285,6 @@ def make_spec(filename, version, target, options, requires=None):
     print('%{_bindir}/dcpomatic2_playlist', file=f)
     print('%{_bindir}/dcpomatic2_openssl', file=f)
     print('%{_bindir}/dcpomatic2_combiner', file=f)
-    if options['variant'] == 'swaroop-studio':
-        print('%{_bindir}/dcpomatic2_ecinema', file=f)
-        print('%{_bindir}/dcpomatic2_uuid', file=f)
     if os.path.exists(os.path.join(tools, "dcpomatic2_disk")):
         print('%{_bindir}/dcpomatic2_disk', file=f)
         print('%{_bindir}/dcpomatic2_disk_writer', file=f)
@@ -330,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)
@@ -344,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)
@@ -365,27 +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', 'e89aa4a', 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', '9d1c856', cpp_lib_options))
-    deps.append(('libsub', '1b52b38', cpp_lib_options))
-    deps.append(('leqm-nrt', 'carl'))
-    deps.append(('rtaudio', 'carl'))
+    deps.append(('libdcp', 'c6665c1', cpp_lib_options))
+    deps.append(('libsub', '64eb116', cpp_lib_options))
+    deps.append(('leqm-nrt', '131f971'))
+    deps.append(('rtaudio', 'f619b76'))
     # 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', '7f29dd5'))
     if can_build_disk(target):
-        deps.append(('lwext4', '370b3de6'))
+        deps.append(('lwext4', 'd67dd1b'))
+    deps.append(('ffcmp', 'a915540'))
 
     return deps
 
@@ -394,8 +395,10 @@ option_defaults = { "gui": True, "variant": None }
 def configure_options(target, options):
     opt = ' --warnings-are-errors'
 
-    if not (target.platform == 'linux' and target.distro == 'ubuntu' and target.version == '18.04'):
-        # Currently we only build tests on Ubuntu 18.04
+    if not ((target.platform == 'linux' and target.distro == 'ubuntu' and target.version == '18.04') or
+            (target.platform == 'osx') or
+            (target.platform == 'windows')):
+        # Currently we only build tests on Ubuntu 18.04, macOS and Windows
         opt += ' --disable-tests'
 
     if target.debug:
@@ -414,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':
         opt += ' --force-cpp11'
 
     if not options['gui']:
@@ -428,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
 
@@ -682,12 +688,26 @@ 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))
-        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))
-        return [os.path.abspath(x) for x in glob.glob('build/platform/osx/DCP-o-matic*.dmg')]
+    elif target.platform == 'osx':
+        target.command('bash platform/osx/make_dmg.sh %s %s %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)
+            if x.find("Player") != -1:
+                packages.append((a, "com.dcpomatic.player"))
+            elif x.find("Playlist Editor") != -1:
+                packages.append((a, "com.dcpomatic.playlist"))
+            elif x.find("KDM Creator") != -1:
+                packages.append((a, "com.dcpomatic.kdm"))
+            elif x.find("Batch Converter") != -1:
+                packages.append((a, "com.dcpomatic.batch"))
+            elif x.find("Encode Server") != -1:
+                packages.append((a, "com.dcpomatic.server"))
+            elif x.find("Disk Writer") != -1:
+                packages.append((a, "com.dcpomatic.disk"))
+            else:
+                packages.append((a, "com.dcpomatic"))
+        return packages
     elif target.platform == 'docker':
         shutil.copyfile(target.deb, 'build/platform/docker')
         f = open('build/platform/docker/Dockerfile', 'w')
@@ -719,12 +739,14 @@ def make_manual(target):
     target.command('pdflatex colour.tex')
     return [os.path.abspath('pdf'), os.path.abspath('html'), os.path.abspath('colour.pdf')]
 
-def test(target, test):
-    if target.platform != 'windows':
-        target.set('LC_ALL', 'C')
+def test(target, options, test):
+    target.set('LC_ALL', 'C')
+    if target.platform == 'windows':
+        cmd = 'run\\tests '
+    else:
         cmd = 'run/tests '
-        if target.debug:
-            cmd += '--backtrace '
-        if test is not None:
-            cmd += '--run_test=%s' % test
-        target.command(cmd)
+    if target.debug:
+        cmd += '--backtrace '
+    if test is not None:
+        cmd += '-t %s' % test
+    target.command(cmd)