diff options
-rw-r--r-- | BuildTools/SCons/SConscript.boot | 8 | ||||
-rw-r--r-- | BuildTools/SCons/SConstruct | 2 | ||||
-rw-r--r-- | BuildTools/SCons/Version.py | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index 0a4eb33..10fc7d3 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -63,34 +63,34 @@ vars.Add("expat_libname", "Expat library name", os.name == "nt" and "libexpat" o vars.Add(PackageVariable("icu", "ICU library location", "no")) vars.Add(BoolVariable("libidn_bundled_enable", "Allow use of bunded Expat", "true")) vars.Add(BoolVariable("try_libidn", "Try configuring for LibIDN?", "true")) vars.Add(PathVariable("libidn_includedir", "LibIDN headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("libidn_libdir", "LibIDN library location", None, PathVariable.PathAccept)) vars.Add("libidn_libname", "LibIDN library name", os.name == "nt" and "libidn" or "idn") vars.Add(BoolVariable("need_idn", "Whether an IDN library is required. Without this, most internal binaries will fail", "true")) vars.Add(PathVariable("libminiupnpc_includedir", "LibMiniUPNPC headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("libminiupnpc_libdir", "LibMiniUPNPC library location", None, PathVariable.PathAccept)) -vars.Add("libminiupnpc_libname", "LibMiniUPNPC library name", "libminiupnpc" if os.name == "nt" else "miniupnpc") +vars.Add("libminiupnpc_libname", "LibMiniUPNPC library name", os.name == "nt" and "libminiupnpc" or "miniupnpc") vars.Add(PathVariable("libnatpmp_includedir", "LibNATPMP headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("libnatpmp_libdir", "LibNATPMP library location", None, PathVariable.PathAccept)) -vars.Add("libnatpmp_libname", "LibNATPMP library name", "libnatpmp" if os.name == "nt" else "natpmp") +vars.Add("libnatpmp_libname", "LibNATPMP library name", os.name == "nt" and "libnatpmp" or "natpmp") vars.Add(PathVariable("sqlite_includedir", "SQLite headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("sqlite_libdir", "SQLite library location", None, PathVariable.PathAccept)) vars.Add("sqlite_libname", "SQLite library name", os.name == "nt" and "libsqlite3" or "sqlite3") vars.Add("sqlite_force_bundled", "Force use of the bundled SQLite", None) vars.Add(PathVariable("lua_includedir", "Lua headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("lua_libdir", "Lua library location", None, PathVariable.PathAccept)) -vars.Add("lua_libname", "Lua library name", "liblua" if os.name == "nt" else "lua") +vars.Add("lua_libname", "Lua library name", os.name == "nt" and "liblua" or "lua") vars.Add("lua_force_bundled", "Force use of the bundled Lua", None) vars.Add(PathVariable("editline_includedir", "Readline headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("editline_libdir", "Readline library location", None, PathVariable.PathAccept)) -vars.Add("editline_libname", "Readline library name", "libedit" if os.name == "nt" else "edit") +vars.Add("editline_libname", "Readline library name", os.name == "nt" and "libedit" or "edit") vars.Add(BoolVariable("try_avahi", "Try configuring for avahi?", "true")) vars.Add(PathVariable("avahi_includedir", "Avahi headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("avahi_libdir", "Avahi library location", None, PathVariable.PathAccept)) vars.Add(PathVariable("qt", "Qt location", "", PathVariable.PathAccept)) vars.Add(BoolVariable("qt5", "Compile in Qt5 mode", "no")) # TODO: auto-detect this vars.Add(PathVariable("docbook_xml", "DocBook XML", None, PathVariable.PathAccept)) vars.Add(PathVariable("docbook_xsl", "DocBook XSL", None, PathVariable.PathAccept)) vars.Add(BoolVariable("build_examples", "Build example programs", "yes")) diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 5db30f8..d314ff3 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -549,19 +549,19 @@ else : if env["PLATFORM"] == "win32" : env["HAVE_SCHANNEL"] = True # If we're compiling for Windows and OpenSSL isn't being used, use Schannel env.Append(LIBS = ["secur32"]) openssl_conf.Finish() #Hunspell hunspell_env = conf_env.Clone() -hunspell_prefix = env["hunspell"] if isinstance(env.get("hunspell", False), str) else "" +hunspell_prefix = isinstance(env.get("hunspell", False), str) and env["hunspell"] or "" hunspell_flags = {} if hunspell_prefix : hunspell_flags = {"CPPPATH":[os.path.join(hunspell_prefix, "include")], "LIBPATH":[os.path.join(hunspell_prefix, "lib")]} hunspell_env.MergeFlags(hunspell_flags) env["HAVE_HUNSPELL"] = 0; hunspell_conf = Configure(hunspell_env) if hunspell_conf.CheckCXXHeader("hunspell/hunspell.hxx") and hunspell_conf.CheckLib("hunspell") : env["HAVE_HUNSPELL"] = 1 diff --git a/BuildTools/SCons/Version.py b/BuildTools/SCons/Version.py index 2f3b5a5..4fd9171 100644 --- a/BuildTools/SCons/Version.py +++ b/BuildTools/SCons/Version.py @@ -33,20 +33,20 @@ def getBuildVersion(root, project) : gitVersion = getGitBuildVersion(root, project) if gitVersion : return gitVersion return datetime.date.today().strftime("%Y%m%d") def convertToWindowsVersion(version) : version_match = re.match("(\d+)\.(\d+)(.*)", version) - major = int(version_match.group(1)) if version_match else 0 - minor = int(version_match.group(2)) if version_match else 0 + major = version_match and int(version_match.group(1)) or 0 + minor = version_match and int(version_match.group(2)) or 0 if version_match and len(version_match.group(3)) == 0 : patch = 60000 else : match = re.match("^beta(\d+)(.*)", version_match.group(3)) build_string = "" if match : patch = 1000*int(match.group(1)) build_string = match.group(2) else : |