import subprocess
import os
import sys
+import distutils
+import distutils.spawn
APPNAME = 'dcpomatic'
-VERSION = '1.74.1devel'
+VERSION = '2.0.25devel'
def options(opt):
opt.load('compiler_cxx')
conf.check_cfg(package='libavfilter', args='--cflags', uselib_store='AVFILTER', mandatory=True)
conf.env.STLIB_AVFILTER = ['avfilter', 'swresample']
conf.check_cfg(package='libavcodec', args='--cflags', uselib_store='AVCODEC', mandatory=True)
+ # lzma link is needed by Centos 7, at least
conf.env.STLIB_AVCODEC = ['avcodec']
- conf.env.LIB_AVCODEC = ['z']
+ conf.env.LIB_AVCODEC = ['z', 'lzma']
conf.check_cfg(package='libavutil', args='--cflags', uselib_store='AVUTIL', mandatory=True)
conf.env.STLIB_AVUTIL = ['avutil']
conf.check_cfg(package='libswscale', args='--cflags', uselib_store='SWSCALE', mandatory=True)
conf.check_cfg(package='libopenjpeg', args='--cflags --libs', atleast_version='1.5.0', uselib_store='OPENJPEG', mandatory=True)
conf.check_cfg(package='libopenjpeg', args='--cflags --libs', max_version='1.5.2', mandatory=True)
+def static_sub(conf):
+ conf.check_cfg(package='libsub-1.0', atleast_version='1.0.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']
+
def static_dcp(conf, static_boost, static_xmlpp, static_xmlsec, static_ssh):
- conf.check_cfg(package='libdcp', atleast_version='0.96', args='--cflags', uselib_store='DCP', mandatory=True)
+ conf.check_cfg(package='libdcp-1.0', atleast_version='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', 'asdcp-libdcp', 'kumu-libdcp']
+ 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']
if static_boost:
conf.env.LIB_DCP.append('ssh')
def dynamic_dcp(conf):
- conf.check_cfg(package='libdcp', atleast_version='0.97.0', args='--cflags --libs', uselib_store='DCP', mandatory=True)
+ conf.check_cfg(package='libdcp-1.0', atleast_version='0.92', args='--cflags --libs', uselib_store='DCP', mandatory=True)
conf.env.DEFINES_DCP = [f.replace('\\', '') for f in conf.env.DEFINES_DCP]
+def dynamic_sub(conf):
+ conf.check_cfg(package='libsub-1.0', atleast_version='1.0.0', args='--cflags --libs', uselib_store='SUB', mandatory=True)
+ conf.env.DEFINES_SUB = [f.replace('\\', '') for f in conf.env.DEFINES_SUB]
+
def dynamic_ssh(conf):
conf.check_cc(fragment="""
#include <libssh/libssh.h>\n
conf.env.STLIB_BOOST_DATETIME = ['boost_date_time%s' % lib_suffix, 'boost_system%s' % lib_suffix]
conf.env.STLIB_BOOST_SIGNALS2 = ['boost_signals2']
-def dynamic_quickmail(conf):
- conf.check_cxx(fragment="""
- #include <quickmail.h>
- int main(void) { quickmail_initialize (); }
- """,
- mandatory=True,
- msg='Checking for libquickmail',
- libpath='/usr/local/lib',
- lib=['quickmail', 'curl'],
- uselib_store='QUICKMAIL')
-
def configure(conf):
conf.load('compiler_cxx')
if conf.options.target_windows:
conf.env.append_value('CXXFLAGS', '-DUNICODE')
conf.env.append_value('CXXFLAGS', '-DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN')
conf.env.append_value('CXXFLAGS', '-mfpmath=sse')
+ conf.env.append_value('CXXFLAGS', '-Wno-deprecated-declarations')
wxrc = os.popen('wx-config --rescomp').read().split()[1:]
conf.env.append_value('WINRCFLAGS', wxrc)
if conf.options.enable_debug:
if conf.env.TARGET_LINUX or conf.env.TARGET_OSX:
conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_POSIX')
conf.env.append_value('CXXFLAGS', '-DPOSIX_LOCALE_PREFIX="%s/share/locale"' % conf.env['INSTALL_PREFIX'])
- conf.env.append_value('CXXFLAGS', '-DPOSIX_ICON_PREFIX="%s/share/dcpomatic"' % conf.env['INSTALL_PREFIX'])
+ conf.env.append_value('CXXFLAGS', '-DPOSIX_ICON_PREFIX="%s/share/dcpomatic2"' % conf.env['INSTALL_PREFIX'])
boost_lib_suffix = ''
boost_thread = 'boost_thread'
conf.env.append_value('LINKFLAGS', '-pthread')
if conf.env.TARGET_DEBIAN:
# libxml2 seems to be linked against this on Ubuntu but it doesn't mention it in its .pc file
conf.check_cfg(package='liblzma', args='--cflags --libs', uselib_store='LZMA', mandatory=True)
+
+ if conf.env.TARGET_CENTOS_6 or conf.env.TARGET_CENTOS_7:
+ # libavcodec seems to be linked against this on Centos
+ conf.check_cfg(package='liblzma', args='--cflags --libs', uselib_store='LZMA', mandatory=True)
if not conf.env.DISABLE_GUI and conf.env.TARGET_LINUX:
conf.check_cfg(package='gtk+-2.0', args='--cflags --libs', uselib_store='GTK', mandatory=True)
conf.env.STLIB_CXML = ['cxml']
conf.check_cfg(package='libxml++-2.6', args='--cflags --libs', uselib_store='XMLPP', mandatory=True)
conf.check_cfg(package='libcurl', args='--cflags --libs', uselib_store='CURL', mandatory=True)
- conf.env.STLIB_QUICKMAIL = ['quickmail']
static_ffmpeg(conf)
static_openjpeg(conf)
+ static_sub(conf)
static_dcp(conf, False, False, False, False)
dynamic_boost(conf, boost_lib_suffix, boost_thread)
conf.check_cfg(package='libcurl', args='--cflags --libs-only-L', uselib_store='CURL', mandatory=True)
conf.env.STLIB_CURL = ['curl']
conf.env.LIB_CURL = ['ssh2', 'idn']
- conf.env.STLIB_QUICKMAIL = ['quickmail', 'curl']
- conf.env.LIB_QUICKMAIL = ['ssh2', 'idn']
static_ffmpeg(conf)
static_openjpeg(conf)
+ static_sub(conf)
static_dcp(conf, True, True, True, True)
static_boost(conf, boost_lib_suffix)
conf.check_cfg(package='libcxml', atleast_version='0.08', args='--cflags', uselib_store='CXML', mandatory=True)
conf.env.STLIB_CXML = ['cxml']
conf.check_cfg(package='libcurl', args='--cflags --libs', uselib_store='CURL', mandatory=True)
- conf.env.STLIB_QUICKMAIL = ['quickmail']
conf.env.LIB_SSH = ['gssapi_krb5']
conf.env.LIB_XMLPP = ['xml2']
conf.env.LIB_XMLSEC = ['ltdl']
static_ffmpeg(conf)
static_openjpeg(conf)
+ static_sub(conf)
static_dcp(conf, False, True, True, True)
dynamic_boost(conf, boost_lib_suffix, boost_thread)
libpath='/usr/local/lib',
lib=['boost_locale%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
uselib_store='BOOST_LOCALE')
- dynamic_quickmail(conf)
dynamic_boost(conf, boost_lib_suffix, boost_thread)
dynamic_ffmpeg(conf)
dynamic_openjpeg(conf)
dynamic_dcp(conf)
+ dynamic_sub(conf)
dynamic_ssh(conf)
# Not packaging; just a straight build
conf.check_cfg(package='libcxml', atleast_version='0.08', args='--cflags --libs', uselib_store='CXML', mandatory=True)
conf.check_cfg(package='libxml++-2.6', args='--cflags --libs', uselib_store='XMLPP', mandatory=True)
conf.check_cfg(package='libcurl', args='--cflags --libs', uselib_store='CURL', mandatory=True)
- dynamic_quickmail(conf)
dynamic_boost(conf, boost_lib_suffix, boost_thread)
dynamic_ffmpeg(conf)
dynamic_dcp(conf)
+ dynamic_sub(conf)
dynamic_openjpeg(conf)
dynamic_ssh(conf)
# Dependencies which are always dynamically linked
conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=True)
conf.check_cfg(package='glib-2.0', args='--cflags --libs', uselib_store='GLIB', mandatory=True)
- conf.check_cfg(package= '', path=conf.options.magickpp_config, args='--cppflags --cxxflags --libs', uselib_store='MAGICK', mandatory=True)
+ if distutils.spawn.find_executable(conf.options.magickpp_config):
+ conf.check_cfg(package='', path=conf.options.magickpp_config, args='--cppflags --cxxflags --libs', uselib_store='MAGICK', mandatory=True)
+ conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_IMAGE_MAGICK')
+ else:
+ conf.check_cfg(package='GraphicsMagick++', args='--cflags --libs', uselib_store='MAGICK', mandatory=True)
+ conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_GRAPHICS_MAGICK')
+
conf.check_cfg(package='libzip', args='--cflags --libs', uselib_store='ZIP', mandatory=True)
+ conf.check_cfg(package='pangomm-1.4', args='--cflags --libs', uselib_store='PANGOMM', mandatory=True)
+ conf.check_cfg(package='cairomm-1.0', args='--cflags --libs', uselib_store='CAIROMM', mandatory=True)
conf.check_cc(fragment="""
#include <glib.h>
bld.recurse('platform/osx')
for r in ['22x22', '32x32', '48x48', '64x64', '128x128']:
- bld.install_files('${PREFIX}/share/icons/hicolor/%s/apps' % r, 'icons/%s/dcpomatic.png' % r)
+ 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.add_post_fun(post)
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')
+ os.system('etags src/lib/*.cc src/lib/*.h src/wx/*.cc src/wx/*.h src/tools/*.cc src/tools/*.h test/*.cc')