OS X fixes.
[dcpomatic.git] / wscript
diff --git a/wscript b/wscript
index 48c729a09a13377ee0b55a8f0788fd59310513e3..e07a915c7ed139011933b206dd7ddd1d7c8ea669 100644 (file)
--- a/wscript
+++ b/wscript
@@ -26,7 +26,7 @@ import distutils.spawn
 from waflib import Logs
 
 APPNAME = 'dcpomatic'
-VERSION = '2.1.59devel'
+VERSION = '2.4.5devel'
 
 def options(opt):
     opt.load('compiler_cxx')
@@ -159,6 +159,22 @@ def configure(conf):
     else:
         conf.check_cfg(package='libcurl', args='--cflags --libs', uselib_store='CURL', mandatory=True)
 
+    # libicu
+    if conf.check_cfg(package='icu-i18n', args='--cflags --libs', uselib_store='ICU', mandatory=False) is None:
+        if conf.check_cfg(package='icu', args='--cflags --libs', uselib_store='ICU', mandatory=False) is None:
+            conf.check_cxx(fragment="""
+                            #include <unicode/ucsdet.h>
+                            int main(void) {
+                                UErrorCode status = U_ZERO_ERROR;
+                                UCharsetDetector* detector = ucsdet_open (&status);
+                                return 0; }\n
+                            """,
+                       mandatory=True,
+                       msg='Checking for libicu',
+                       okmsg='yes',
+                       libpath=['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu'],
+                       lib=['icuio', 'icui18n', 'icudata', 'icuuc'],
+                       uselib_store='ICU')
 
     # libsndfile
     conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=True)
@@ -222,21 +238,21 @@ def configure(conf):
 
     # libdcp
     if conf.options.static_dcp:
-        conf.check_cfg(package='libdcp-1.0', atleast_version='1.2.3', args='--cflags', uselib_store='DCP', mandatory=True)
+        conf.check_cfg(package='libdcp-1.0', atleast_version='1.2.4', args='--cflags', uselib_store='DCP', mandatory=True)
         conf.env.DEFINES_DCP = [f.replace('\\', '') for f in conf.env.DEFINES_DCP]
         conf.env.STLIB_DCP = ['dcp-1.0', 'asdcp-libdcp-1.0', 'kumu-libdcp-1.0']
         conf.env.LIB_DCP = ['glibmm-2.4', 'ssl', 'crypto', 'bz2', 'xslt']
     else:
-        conf.check_cfg(package='libdcp-1.0', atleast_version='1.2.3', args='--cflags --libs', uselib_store='DCP', mandatory=True)
+        conf.check_cfg(package='libdcp-1.0', atleast_version='1.2.4', args='--cflags --libs', uselib_store='DCP', mandatory=True)
         conf.env.DEFINES_DCP = [f.replace('\\', '') for f in conf.env.DEFINES_DCP]
 
     # libsub
     if conf.options.static_sub:
-        conf.check_cfg(package='libsub-1.0', atleast_version='1.1.4', args='--cflags', uselib_store='SUB', mandatory=True)
+        conf.check_cfg(package='libsub-1.0', atleast_version='1.1.5', args='--cflags', uselib_store='SUB', mandatory=True)
         conf.env.DEFINES_SUB = [f.replace('\\', '') for f in conf.env.DEFINES_SUB]
         conf.env.STLIB_SUB = ['sub-1.0']
     else:
-        conf.check_cfg(package='libsub-1.0', atleast_version='1.1.4', args='--cflags --libs', uselib_store='SUB', mandatory=True)
+        conf.check_cfg(package='libsub-1.0', atleast_version='1.1.5', args='--cflags --libs', uselib_store='SUB', mandatory=True)
         conf.env.DEFINES_SUB = [f.replace('\\', '') for f in conf.env.DEFINES_SUB]
 
     # libxml++
@@ -263,7 +279,7 @@ def configure(conf):
 
     # FFmpeg
     if conf.options.static_ffmpeg:
-        names = ['avformat', 'avfilter', 'avcodec', 'avutil', 'swscale', 'swresample', 'postproc']
+        names = ['avformat', 'avfilter', 'avcodec', 'avutil', 'swscale', 'postproc']
         for name in names:
             static = subprocess.Popen(shlex.split('pkg-config --static --libs lib%s' % name), stdout=subprocess.PIPE).communicate()[0]
             libs = []
@@ -291,7 +307,6 @@ def configure(conf):
         conf.check_cfg(package='libavcodec', args='--cflags --libs', uselib_store='AVCODEC', mandatory=True)
         conf.check_cfg(package='libavutil', args='--cflags --libs', uselib_store='AVUTIL', mandatory=True)
         conf.check_cfg(package='libswscale', args='--cflags --libs', uselib_store='SWSCALE', mandatory=True)
-        conf.check_cfg(package='libswresample', args='--cflags --libs', uselib_store='SWRESAMPLE', mandatory=True)
         conf.check_cfg(package='libpostproc', args='--cflags --libs', uselib_store='POSTPROC', mandatory=True)
 
     # Boost
@@ -406,6 +421,8 @@ def build(bld):
     create_version_cc(VERSION, bld.env.CXXFLAGS)
 
     bld.recurse('src')
+    bld.recurse('graphics')
+
     if not bld.env.DISABLE_TESTS:
         bld.recurse('test')
     if bld.env.TARGET_WINDOWS:
@@ -415,12 +432,7 @@ def build(bld):
     if bld.env.TARGET_OSX:
         bld.recurse('platform/osx')
 
-    for r in ['22x22', '32x32', '48x48', '64x64', '128x128']:
-        bld.install_files('${PREFIX}/share/icons/hicolor/%s/apps' % r, 'graphics/%s/dcpomatic2.png' % r)
-
     if not bld.env.TARGET_WINDOWS:
-        bld.install_files('${PREFIX}/share/dcpomatic2', 'graphics/taskbar_icon.png')
-        bld.install_files('${PREFIX}/share/dcpomatic2', 'graphics/splash.png')
         bld.install_files('${PREFIX}/share/dcpomatic2', 'LiberationSans-Regular.ttf')
 
     bld.add_post_fun(post)
@@ -486,15 +498,7 @@ def pot_merge(bld):
     bld.recurse('src')
 
 def tags(bld):
-    os.system('etags src/lib/*.cc src/lib/*.h src/wx/*.cc src/wx/*.h src/tools/*.cc src/tools/*.h')
-
-def zanata_pull(bld):
-    os.system('zanata-cli -B -q pull -t .')
-    for f in glob.glob('src/lib/po/*.po'):
-        l = os.path.basename(f)
-        os.rename('dcpomatic_%s' % l, 'src/tools/po/%s' % l)
-        os.rename('libdcpomatic_%s' % l, 'src/lib/po/%s' % l)
-        os.rename('libdcpomatic-wx_%s' % l, 'src/wx/po/%s' % l)
+    os.system('etags src/lib/*.cc src/lib/*.h src/wx/*.cc src/wx/*.h src/tools/*.cc')
 
 def cppcheck(bld):
     os.system('cppcheck --enable=all --quiet .')