- # Dependencies which are dynamically linked everywhere except --static
- # Get libs only when we are dynamically linking
- conf.check_cfg(package='libdcp', atleast_version='0.92', args=pkg_config_args(conf), uselib_store='DCP', mandatory=True)
- # Remove erroneous escaping of quotes from xmlsec1 defines
- conf.env.DEFINES_DCP = [f.replace('\\', '') for f in conf.env.DEFINES_DCP]
- conf.check_cfg(package='libcxml', atleast_version='0.08', args=pkg_config_args(conf), uselib_store='CXML', mandatory=True)
- conf.check_cfg(package='libavformat', args=pkg_config_args(conf), uselib_store='AVFORMAT', mandatory=True)
- conf.check_cfg(package='libavfilter', args=pkg_config_args(conf), uselib_store='AVFILTER', mandatory=True)
- conf.check_cfg(package='libavcodec', args=pkg_config_args(conf), uselib_store='AVCODEC', mandatory=True)
- conf.check_cfg(package='libavutil', args=pkg_config_args(conf), uselib_store='AVUTIL', mandatory=True)
- conf.check_cfg(package='libswscale', args=pkg_config_args(conf), uselib_store='SWSCALE', mandatory=True)
- conf.check_cfg(package='libswresample', args=pkg_config_args(conf), uselib_store='SWRESAMPLE', mandatory=True)
- conf.check_cfg(package='libpostproc', args=pkg_config_args(conf), uselib_store='POSTPROC', mandatory=True)
- conf.check_cfg(package='libopenjpeg', args=pkg_config_args(conf), atleast_version='1.5.0', uselib_store='OPENJPEG', mandatory=True)
- conf.check_cfg(package='libopenjpeg', args=pkg_config_args(conf), max_version='1.5.1', mandatory=True)
-
- if conf.env.STATIC:
- # This is hackio grotesquio for static builds (ie for .deb packages). We need to link some things
- # statically and some dynamically, or things get horribly confused and the dynamic linker (I think)
- # crashes. These calls do what the check_cfg calls would have done, but specify the
- # different bits as static or dynamic as required. It'll break if you look at it funny, but
- # I think anyone else who builds would do so dynamically.
- conf.env.STLIB_CXML = ['cxml']
- conf.env.STLIB_DCP = ['dcp', 'asdcp-libdcp', 'kumu-libdcp']
- conf.env.LIB_DCP = ['glibmm-2.4', 'xml++-2.6', 'ssl', 'crypto', 'bz2', 'xmlsec1', 'xmlsec1-openssl', 'xslt']
- conf.env.STLIB_CXML = ['cxml']
- conf.env.STLIB_AVFORMAT = ['avformat']
- conf.env.STLIB_AVFILTER = ['avfilter', 'swresample']
- conf.env.STLIB_AVCODEC = ['avcodec']
- conf.env.LIB_AVCODEC = ['z']
- conf.env.STLIB_AVUTIL = ['avutil']
- conf.env.STLIB_SWSCALE = ['swscale']
- conf.env.STLIB_POSTPROC = ['postproc']
- conf.env.STLIB_SWRESAMPLE = ['swresample']
- conf.env.STLIB_OPENJPEG = ['openjpeg']
- conf.env.STLIB_QUICKMAIL = ['quickmail']
- else:
- 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')
-
- # 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)
- conf.check_cfg(package='libxml++-2.6', args='--cflags --libs', uselib_store='XML++', mandatory=True)
- conf.check_cfg(package='libcurl', args='--cflags --libs', uselib_store='CURL', mandatory=True)
- conf.check_cfg(package='libzip', args='--cflags --libs', uselib_store='ZIP', mandatory=True)
-
- conf.check_cxx(fragment="""
- #include <boost/version.hpp>\n
- #if BOOST_VERSION < 104500\n
- #error boost too old\n
- #endif\n
- int main(void) { return 0; }\n
- """,
- mandatory=True,
- msg='Checking for boost library >= 1.45',
- okmsg='yes',
- errmsg='too old\nPlease install boost version 1.45 or higher.')
-
- conf.check_cc(fragment="""
- #include <libssh/libssh.h>\n
- int main () {\n
- ssh_session s = ssh_new ();\n
- return 0;\n
- }
- """, msg='Checking for library libssh', mandatory=True, lib='ssh', uselib_store='SSH')
+ #
+ # Dependencies.
+ # There's probably a neater way of expressing these, but I've gone for brute force for now.
+ #
+
+ if conf.env.TARGET_DEBIAN:
+ 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='libxml++-2.6', args='--cflags --libs', uselib_store='XML++', 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_dcp(conf, False, False, False, False)
+ dynamic_boost(conf, boost_lib_suffix, boost_thread)
+
+ if conf.env.TARGET_CENTOS:
+ conf.check_cfg(package='libcxml', atleast_version='0.08', args='--cflags --libs-only-L', uselib_store='CXML', mandatory=True)
+ conf.env.STLIB_CXML = ['cxml', 'boost_filesystem']
+ 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_dcp(conf, True, True, True, True)
+ static_boost(conf, boost_lib_suffix)