Add missing options parameter to dependencies().
[dcpomatic.git] / cscript
diff --git a/cscript b/cscript
index 4425693310efa65c2e34eacf59ae73b9f222ec55..563306037af1adffeb2e816bf153a0875f3d7002 100644 (file)
--- a/cscript
+++ b/cscript
@@ -347,7 +347,7 @@ def make_spec(filename, version, target, options, requires=None):
     print('%posttrans', file=f)
     print('/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :', file=f)
 
-def dependencies(target):
+def dependencies(target, options):
 
     if target.platform == 'linux':
         ffmpeg_options = { 'shared': False }
@@ -362,8 +362,13 @@ def dependencies(target):
         # Use distro-provided FFmpeg on Arch
         deps = []
 
-    deps.append(('libdcp', None, {'force-cpp11': True}))
-    deps.append(('libsub', None, {'force-cpp11': True}))
+    cpp_lib_options = {}
+    if target.platform == 'osx' and target.bits == 64:
+        # We can use C++11 mode, so let's do it.
+        options['force-cpp11'] = True
+
+    deps.append(('libdcp', None, cpp_lib_options))
+    deps.append(('libsub', None, cpp_lib_options))
     deps.append(('rtaudio', 'carl'))
     # We get our OpenSSL libraries from the environment, but we
     # also need a patched openssl binary to make certificates.
@@ -375,8 +380,7 @@ def dependencies(target):
 
     return deps
 
-def option_defaults():
-    return { "gui": True, "variant": None, "disk": False }
+option_defaults = { "gui": True, "variant": None, "disk": False }
 
 def configure_options(target, options):
     opt = ''
@@ -414,8 +418,6 @@ def configure_options(target, options):
     if target.debug and target.platform == 'windows':
         opt += ' --static-dcpomatic'
 
-    print("options=%s" % options)
-    print("can_build_disk=%s" % can_build_disk(target))
     if can_build_disk(target) and options['disk']:
        opt += ' --enable-disk'