From b43726102d7417b4ada23696c31bf6e2b29b551f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 12 Jul 2014 22:39:43 +0100 Subject: Update libdcp versioning. --- cscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cscript') diff --git a/cscript b/cscript index af3921e2f..9d1605b2f 100644 --- a/cscript +++ b/cscript @@ -157,7 +157,7 @@ def make_control(debian_version, bits, filename, debug): def dependencies(target): return (('ffmpeg-cdist', '67dc770'), - ('libdcp', '7103135')) + ('libdcp', 'v0.96.0')) def build(target, options): cmd = './waf configure --prefix=%s' % target.work_dir_cscript() -- cgit v1.2.3 From 06b5be0722782353ceff6e7fa94f115bd37ed8af Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 13 Jul 2014 22:35:46 +0100 Subject: Centos build fixes. --- cscript | 5 ++++- src/lib/wscript | 6 +++--- src/wx/wscript | 3 +++ wscript | 37 +++++++++++++++++++++++++++---------- 4 files changed, 37 insertions(+), 14 deletions(-) (limited to 'cscript') 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 \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) -- cgit v1.2.3 From 54722a657f9fe01def18ef7afbac58e30d79a3d5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 14 Jul 2014 11:41:10 +0100 Subject: Bump libdcp for in CPLs. --- cscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cscript') diff --git a/cscript b/cscript index 7a6133645..46eaaf929 100644 --- a/cscript +++ b/cscript @@ -157,7 +157,7 @@ def make_control(debian_version, bits, filename, debug): def dependencies(target): return (('ffmpeg-cdist', '67dc770'), - ('libdcp', 'v0.96.0')) + ('libdcp', '563c7fd')) def build(target, options): cmd = './waf configure --prefix=%s' % target.work_dir_cscript() -- cgit v1.2.3 From cd4ad2186dba563db5b803963a86501f0b1e60f9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 14 Jul 2014 11:53:57 +0100 Subject: More centos build fixes. --- cscript | 4 ++-- platform/linux/dcpomatic.spec.in | 12 ++++++------ platform/linux/wscript | 19 ++++++++++++------- wscript | 8 ++++++-- 4 files changed, 26 insertions(+), 17 deletions(-) (limited to 'cscript') diff --git a/cscript b/cscript index 46eaaf929..5ea5a4cfd 100644 --- a/cscript +++ b/cscript @@ -157,7 +157,7 @@ def make_control(debian_version, bits, filename, debug): def dependencies(target): return (('ffmpeg-cdist', '67dc770'), - ('libdcp', '563c7fd')) + ('libdcp', '009e07f')) def build(target, options): cmd = './waf configure --prefix=%s' % target.work_dir_cscript() @@ -170,7 +170,7 @@ def build(target, options): cmd += ' --debian-unstable' elif target.distro == 'centos': if target.version == '6.5': - cmd += ' --target-centos-6' + cmd += ' --target-centos-6 --disable-tests' elif target.version == '7': cmd += ' --target-centos-7' diff --git a/platform/linux/dcpomatic.spec.in b/platform/linux/dcpomatic.spec.in index 46a0d1ce4..f39c2cbd8 100644 --- a/platform/linux/dcpomatic.spec.in +++ b/platform/linux/dcpomatic.spec.in @@ -1,6 +1,6 @@ Summary:A program that generates Digital Cinema Packages (DCPs) from video and audio files Name:dcpomatic -Version:@version@ +Version:@VERSION@ Release:1%{?dist} License:GPL Group:Applications/Multimedia @@ -49,15 +49,15 @@ digital projectors. %{_datadir}/locale/nl_NL/LC_MESSAGES/libdcpomatic.mo %prep -rm -rf $RPM_BUILD_DIR/dcpomatic-@version@ -tar xjf $RPM_SOURCE_DIR/dcpomatic-@version@.tar.bz2 +rm -rf $RPM_BUILD_DIR/dcpomatic-@VERSION@ +tar xjf $RPM_SOURCE_DIR/dcpomatic-@VERSION@.tar.bz2 %build -cd dcpomatic-@version@ +cd dcpomatic-@VERSION@ export PKG_CONFIG_PATH=/home/carl/lib/pkgconfig:/usr/local/lib/pkgconfig -CXXFLAGS="-I/home/carl/include" LDFLAGS="-L/home/carl/lib" ./waf configure --prefix=%{buildroot}/usr --install-prefix=/usr --target-centos +CXXFLAGS="-I/home/carl/include" LDFLAGS="-L/home/carl/lib" ./waf configure --prefix=%{buildroot}/usr --install-prefix=/usr --target-centos-@CENTOS_VERSION@ --disable-tests ./waf %install -cd dcpomatic-@version@ +cd dcpomatic-@VERSION@ ./waf install %post diff --git a/platform/linux/wscript b/platform/linux/wscript index fe6f4e2db..3aab4f7fb 100644 --- a/platform/linux/wscript +++ b/platform/linux/wscript @@ -1,25 +1,30 @@ def build(bld): - d = { 'INSTALL_PREFIX' : bld.env.INSTALL_PREFIX } - d = { 'VERSION' : bld.env.VERSION } - obj = bld(features='subst') obj.source = 'dcpomatic.desktop.in' obj.target = 'dcpomatic.desktop' - obj.dict = d + obj.INSTALL_PREFIX = bld.env.INSTALL_PREFIX + obj.VERSION = bld.env.VERSION obj = bld(features='subst') obj.source = 'dcpomatic_batch.desktop.in' obj.target = 'dcpomatic_batch.desktop' - obj.dict = d + obj.INSTALL_PREFIX = bld.env.INSTALL_PREFIX + obj.VERSION = bld.env.VERSION obj = bld(features='subst') obj.source = 'dcpomatic_server.desktop.in' obj.target = 'dcpomatic_server.desktop' - obj.dict = d + obj.INSTALL_PREFIX = bld.env.INSTALL_PREFIX + obj.VERSION = bld.env.VERSION obj = bld(features='subst') obj.source = 'dcpomatic.spec.in' obj.target = 'dcpomatic.spec' - obj.dict = d + obj.INSTALL_PREFIX = bld.env.INSTALL_PREFIX + obj.VERSION = bld.env.VERSION + if bld.env.TARGET_CENTOS_6: + obj.CENTOS_VERSION = '6' + elif bld.env.TARGET_CENTOS_7: + obj.CENTOS_VERSION = '7' bld.install_files('${PREFIX}/share/applications', ['dcpomatic.desktop', 'dcpomatic_batch.desktop', 'dcpomatic_server.desktop']) diff --git a/wscript b/wscript index 866d977b0..ef72a61e5 100644 --- a/wscript +++ b/wscript @@ -11,6 +11,7 @@ def options(opt): opt.add_option('--enable-debug', action='store_true', default=False, help='build with debugging information and without optimisation') opt.add_option('--disable-gui', action='store_true', default=False, help='disable building of GUI tools') + opt.add_option('--disable-tests', action='store_true', default=False, help='disable building of tests') 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') @@ -164,6 +165,7 @@ def configure(conf): # conf.options -> conf.env conf.env.TARGET_WINDOWS = conf.options.target_windows conf.env.DISABLE_GUI = conf.options.disable_gui + conf.env.DISABLE_TESTS = conf.options.disable_tests conf.env.TARGET_DEBIAN = conf.options.target_debian conf.env.DEBIAN_UNSTABLE = conf.options.debian_unstable conf.env.TARGET_CENTOS_6 = conf.options.target_centos_6 @@ -340,13 +342,15 @@ def configure(conf): conf.define('DATADIR', datadir) conf.recurse('src') - conf.recurse('test') + if not conf.env.DISABLE_TESTS: + conf.recurse('test') def build(bld): create_version_cc(VERSION, bld.env.CXXFLAGS) bld.recurse('src') - bld.recurse('test') + if not bld.env.DISABLE_TESTS: + bld.recurse('test') if bld.env.TARGET_WINDOWS: bld.recurse('platform/windows') if bld.env.TARGET_LINUX: -- cgit v1.2.3