X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=wscript;h=92a79bb9b031413d250c554eda913e767fa19880;hb=97201e626d697e7dff203b2ea4f4a2c268d98313;hp=824cfa9dc4a3bc7b8f800c137db5bee581caf7fe;hpb=4c31eea6ddc6bb64bcf4f72687a73715818b1ce8;p=dcpomatic.git diff --git a/wscript b/wscript index 824cfa9dc..92a79bb9b 100644 --- a/wscript +++ b/wscript @@ -42,8 +42,6 @@ if this_version == '': else: VERSION = this_version[1:].strip() -print('Version: %s' % VERSION) - def options(opt): opt.load('compiler_cxx') opt.load('winres') @@ -66,6 +64,7 @@ def options(opt): opt.add_option('--static-curl', action='store_true', default=False, help='link statically to libcurl') opt.add_option('--workaround-gssapi', action='store_true', default=False, help='link to gssapi_krb5') opt.add_option('--force-cpp11', action='store_true', default=False, help='force use of C++11') + opt.add_option('--variant', help='build variant', choices=['swaroop']) def configure(conf): conf.load('compiler_cxx') @@ -99,6 +98,7 @@ def configure(conf): '-Wwrite-strings', # Remove auto_ptr warnings from libxml++-2.6 '-Wno-deprecated-declarations', + '-Wno-ignored-qualifiers', '-D_FILE_OFFSET_BITS=64']) if conf.options.force_cpp11: @@ -114,6 +114,10 @@ def configure(conf): else: conf.env.append_value('CXXFLAGS', '-O2') + if conf.options.variant is not None: + conf.env.VARIANT = conf.options.variant + conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_VARIANT_%s' % conf.options.variant.upper()) + # # Windows/Linux/OS X specific # @@ -164,7 +168,7 @@ def configure(conf): conf.env.append_value('CXXFLAGS', '-DLINUX_LOCALE_PREFIX="%s/share/locale"' % conf.env['INSTALL_PREFIX']) conf.env.append_value('CXXFLAGS', '-DLINUX_SHARE_PREFIX="%s/share/dcpomatic2"' % conf.env['INSTALL_PREFIX']) conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_LINUX') - conf.env.append_value('CXXFLAGS', ['-Wunsafe-loop-optimizations', '-Wlogical-op']) + conf.env.append_value('CXXFLAGS', ['-Wlogical-op']) if not conf.env.DISABLE_GUI: conf.check_cfg(package='gtk+-2.0', args='--cflags --libs', uselib_store='GTK', mandatory=True) @@ -565,6 +569,7 @@ def configure(conf): # Other stuff conf.find_program('msgfmt', var='MSGFMT') + conf.check(header_name='valgrind/memcheck.h', mandatory=False) datadir = conf.env.DATADIR if not datadir: @@ -606,13 +611,17 @@ def configure(conf): Logs.pprint('YELLOW', '') -def download_supporters(): +def download_supporters(can_fail): last_date = subprocess.Popen(shlex.split('git log -1 --format=%%ai %s' % last_version), stdout=subprocess.PIPE).communicate()[0] - os.system('curl https://dcpomatic.com/supporters.cc?%s > src/wx/supporters.cc' % urlencode({"until": last_date.strip()})) + r = os.system('curl -s -f https://dcpomatic.com/supporters.cc?%s > src/wx/supporters.cc' % urlencode({"until": last_date.strip()})) + if (r >> 8) == 0: + r = os.system('curl -s -f https://dcpomatic.com/subscribers.cc?%s > src/wx/subscribers.cc' % urlencode({"until": last_date.strip()})) + if (r >> 8) != 0 and can_fail: + raise Exception("Could not download supporters lists") def build(bld): create_version_cc(VERSION, bld.env.CXXFLAGS) - download_supporters() + download_supporters(not bld.env.DEBUG) bld.recurse('src') bld.recurse('graphics')