summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-07-13 22:35:46 +0100
committerCarl Hetherington <cth@carlh.net>2014-07-15 17:51:18 +0100
commit06b5be0722782353ceff6e7fa94f115bd37ed8af (patch)
tree53627f360ea8f86766ecec5e3a4d2761bd9414d0
parentb43726102d7417b4ada23696c31bf6e2b29b551f (diff)
Centos build fixes.
-rw-r--r--cscript5
-rw-r--r--src/lib/wscript6
-rw-r--r--src/wx/wscript3
-rw-r--r--wscript37
4 files changed, 37 insertions, 14 deletions
diff --git a/cscript b/cscript
index 9d1605b2f..7a6133645 100644
--- a/cscript
+++ b/cscript
@@ -169,7 +169,10 @@ def build(target, options):
if target.version == 'unstable':
cmd += ' --debian-unstable'
elif target.distro == 'centos':
- cmd += ' --target-centos'
+ if target.version == '6.5':
+ cmd += ' --target-centos-6'
+ elif target.version == '7':
+ cmd += ' --target-centos-7'
target.command(cmd)
target.command('./waf')
diff --git a/src/lib/wscript b/src/lib/wscript
index 933368776..6d563f255 100644
--- a/src/lib/wscript
+++ b/src/lib/wscript
@@ -83,8 +83,8 @@ def build(bld):
obj.uselib = """
AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE SWRESAMPLE
BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2
- SNDFILE OPENJPEG POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++
- CURL ZIP QUICKMAIL
+ SNDFILE OPENJPEG POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XMLPP
+ CURL ZIP QUICKMAIL XMLSEC
"""
if bld.env.TARGET_OSX:
@@ -96,7 +96,7 @@ def build(bld):
obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI MSWSOCK BOOST_LOCALE'
obj.source += ' stack.cpp'
if bld.env.BUILD_STATIC:
- obj.uselib += ' XML++'
+ obj.uselib += ' XMLPP'
obj.target = 'dcpomatic'
diff --git a/src/wx/wscript b/src/wx/wscript
index f26a91cbc..8bf2451c2 100644
--- a/src/wx/wscript
+++ b/src/wx/wscript
@@ -67,6 +67,9 @@ def configure(conf):
conf.env.LIB_WXWIDGETS.append('Xxf86vm')
conf.env.LIB_WXWIDGETS.append('Xext')
conf.env.LIB_WXWIDGETS.append('X11')
+
+ if conf.env.TARGET_CENTOS_7:
+ conf.env.LIB_WXWIDGETS.append('Xxf86vm')
conf.in_msg = 1
wx_version = conf.check_cfg(package='', path=conf.options.wx_config, args='--version').strip()
diff --git a/wscript b/wscript
index a8cb05f7d..866d977b0 100644
--- a/wscript
+++ b/wscript
@@ -14,7 +14,8 @@ def options(opt):
opt.add_option('--target-windows', action='store_true', default=False, help='set up to do a cross-compile to make a Windows package')
opt.add_option('--target-debian', action='store_true', default=False, help='set up to compile for a Debian/Ubuntu package')
opt.add_option('--debian-unstable', action='store_true', default=False, help='add extra libraries to static-build correctly on Debian unstable')
- opt.add_option('--target-centos', action='store_true', default=False, help='set up to compile for a Centos package')
+ opt.add_option('--target-centos-6', action='store_true', default=False, help='set up to compile for a Centos 6.5 package')
+ opt.add_option('--target-centos-7', action='store_true', default=False, help='set up to compile for a Centos 7 package')
opt.add_option('--magickpp-config', action='store', default='Magick++-config', help='path to Magick++-config')
opt.add_option('--wx-config', action='store', default='wx-config', help='path to wx-config')
opt.add_option('--address-sanitizer', action='store_true', default=False, help='build with address sanitizer')
@@ -165,12 +166,13 @@ def configure(conf):
conf.env.DISABLE_GUI = conf.options.disable_gui
conf.env.TARGET_DEBIAN = conf.options.target_debian
conf.env.DEBIAN_UNSTABLE = conf.options.debian_unstable
- conf.env.TARGET_CENTOS = conf.options.target_centos
+ conf.env.TARGET_CENTOS_6 = conf.options.target_centos_6
+ conf.env.TARGET_CENTOS_7 = conf.options.target_centos_7
conf.env.VERSION = VERSION
conf.env.TARGET_OSX = sys.platform == 'darwin'
conf.env.TARGET_LINUX = not conf.env.TARGET_WINDOWS and not conf.env.TARGET_OSX
# true if we should build dcpomatic/libdcpomatic/libdcpomatic-wx statically
- conf.env.BUILD_STATIC = conf.options.target_debian or conf.options.target_centos
+ conf.env.BUILD_STATIC = conf.options.target_debian or conf.options.target_centos_6 or conf.options.target_centos_7
if conf.options.install_prefix is None:
conf.env.INSTALL_PREFIX = conf.env.PREFIX
else:
@@ -218,8 +220,8 @@ def configure(conf):
# POSIX
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['PREFIX'])
- conf.env.append_value('CXXFLAGS', '-DPOSIX_ICON_PREFIX="%s/share/dcpomatic"' % conf.env['PREFIX'])
+ 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'])
boost_lib_suffix = ''
boost_thread = 'boost_thread'
conf.env.append_value('LINKFLAGS', '-pthread')
@@ -249,7 +251,7 @@ def configure(conf):
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='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)
@@ -257,7 +259,8 @@ def configure(conf):
static_dcp(conf, False, False, False, False)
dynamic_boost(conf, boost_lib_suffix, boost_thread)
- if conf.env.TARGET_CENTOS:
+ if conf.env.TARGET_CENTOS_6:
+ # Centos 6.5's boost is too old, so we build a new version statically in the chroot
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)
@@ -270,8 +273,22 @@ def configure(conf):
static_dcp(conf, True, True, True, True)
static_boost(conf, boost_lib_suffix)
+ if conf.env.TARGET_CENTOS_7:
+ # Centos 7's boost is ok so we link it dynamically
+ 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_dcp(conf, False, True, True, True)
+ dynamic_boost(conf, boost_lib_suffix, boost_thread)
+
if conf.env.TARGET_WINDOWS:
- conf.check_cfg(package='libxml++-2.6', args='--cflags --libs', uselib_store='XML++', 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)
conf.check_cxx(fragment="""
#include <boost/locale.hpp>\n
@@ -288,9 +305,9 @@ def configure(conf):
dynamic_ssh(conf)
# Not packaging; just a straight build
- if not conf.env.TARGET_WINDOWS and not conf.env.TARGET_DEBIAN and not conf.env.TARGET_CENTOS:
+ if not conf.env.TARGET_WINDOWS and not conf.env.TARGET_DEBIAN and not conf.env.TARGET_CENTOS_6 and not conf.env.TARGET_CENTOS_7:
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='XML++', 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)