X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=wscript;h=e7ed503611e3bfd3123d4bc25d688a87bf12fe47;hb=da267d008b9bb122f0617a067021703da5c673bb;hp=c6fb2daee6205ebf1c84d47dd7bca921fb328e1b;hpb=16f80f7fed7d05adda154ee31ea9bfbff681759b;p=dcpomatic.git diff --git a/wscript b/wscript index c6fb2daee..e7ed50361 100644 --- a/wscript +++ b/wscript @@ -20,12 +20,13 @@ import subprocess import os import shlex import sys +import glob import distutils import distutils.spawn from waflib import Logs APPNAME = 'dcpomatic' -VERSION = '2.0.48' +VERSION = '2.1.21devel' def options(opt): opt.load('compiler_cxx') @@ -179,7 +180,7 @@ def configure(conf): conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_IMAGE_MAGICK') if graphics is not None: conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_GRAPHICS_MAGICK') - + # libzip conf.check_cfg(package='libzip', args='--cflags --libs', uselib_store='ZIP', mandatory=True) @@ -216,21 +217,21 @@ def configure(conf): # libdcp if conf.options.static_dcp: - conf.check_cfg(package='libdcp-1.0', atleast_version='1.00.0', args='--cflags', uselib_store='DCP', mandatory=True) + conf.check_cfg(package='libdcp-1.0', atleast_version='1.1.0', 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.00.0', args='--cflags --libs', uselib_store='DCP', mandatory=True) + conf.check_cfg(package='libdcp-1.0', atleast_version='1.1.0', 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.00.0', args='--cflags', uselib_store='DCP', mandatory=True) + conf.check_cfg(package='libsub-1.0', atleast_version='1.1.0', 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.00.0', args='--cflags --libs', uselib_store='DCP', mandatory=True) + conf.check_cfg(package='libsub-1.0', atleast_version='1.1.0', args='--cflags --libs', uselib_store='SUB', mandatory=True) conf.env.DEFINES_SUB = [f.replace('\\', '') for f in conf.env.DEFINES_SUB] # libxml++ @@ -294,6 +295,7 @@ def configure(conf): conf.env.STLIB_BOOST_DATETIME = ['boost_date_time%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix] conf.env.STLIB_BOOST_SIGNALS2 = ['boost_signals2'] conf.env.STLIB_BOOST_SYSTEM = ['boost_system'] + conf.env.STLIB_BOOST_REGEX = ['boost_regex'] else: conf.check_cxx(fragment=""" #include \n @@ -341,14 +343,22 @@ def configure(conf): msg='Checking for boost signals2 library', uselib_store='BOOST_SIGNALS2') + conf.check_cxx(fragment=""" + #include \n + int main() { boost::regex re ("foo"); }\n + """, + msg='Checking for boost regex library', + lib=['boost_regex%s' % boost_lib_suffix], + uselib_store='BOOST_REGEX') + # Other stuff conf.find_program('msgfmt', var='MSGFMT') - + datadir = conf.env.DATADIR if not datadir: datadir = os.path.join(conf.env.PREFIX, 'share') - + conf.define('LOCALEDIR', os.path.join(datadir, 'locale')) conf.define('DATADIR', datadir) @@ -403,7 +413,8 @@ def build(bld): bld.install_files('${PREFIX}/share/icons/hicolor/%s/apps' % r, 'icons/%s/dcpomatic2.png' % r) if not bld.env.TARGET_WINDOWS: - bld.install_files('${PREFIX}/share/dcpomatic', 'icons/taskbar_icon.png') + bld.install_files('${PREFIX}/share/dcpomatic2', 'icons/taskbar_icon.png') + bld.install_files('${PREFIX}/share/dcpomatic2', 'LiberationSans-Regular.ttf') bld.add_post_fun(post) @@ -434,7 +445,7 @@ def create_version_cc(version, cxx_flags): if commit is None and os.path.exists('.git_revision'): f = open('.git_revision', 'r') commit = f.readline().strip() - + if commit is None: commit = 'release' @@ -456,7 +467,7 @@ def create_version_cc(version, cxx_flags): except IOError: print('Could not open src/lib/version.cc for writing\n') sys.exit(-1) - + def post(ctx): if ctx.cmd == 'install': ctx.exec_command('/sbin/ldconfig') @@ -469,3 +480,14 @@ def pot_merge(bld): 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) + +def cppcheck(bld): + os.system('cppcheck --enable=all --quiet .')