"--with-{0}".format(component) for component in boost_components_shared ] commonargs = [ "address-model={}".format("64" if config['architecture'] == 'x86_64' else "32"), "-a", "--user-config={}".format(os.path.join(boost_path, user_config_jam)), "-j {}".format(config['num_jobs']), "toolset=msvc-" + vc_version, "--stagedir=lib{}-msvc-{}".format( "64" if config['architecture'] == 'x86_64' else "32", vc_version), "--libdir=lib{}-msvc-{}".format( "64" if config['architecture'] == 'x86_64' else "32", vc_version) ] if config['architecture'] == 'x86_64': b2tasks = [ ("Shared", ["link=shared"] + with_for_all + with_for_shared), ("Static", ["link=static", "runtime-link=shared"] + with_for_all), ("StaticCRT64", ["link=static", "runtime-link=static"] + with_for_all) ] else: b2tasks = [("StaticCRT32", ["link=static", "runtime-link=static"] + with_for_all)] for (taskname, taskargs) in b2tasks: boost_stage.depend( b2.B2(taskname, boost_path).arguments(commonargs + taskargs).depend(boost_prepare))
import os boost_version = "1.60.0" boost_components = [ "date_time", "coroutine", "filesystem", "python", "thread", "log", "locale" ] config_template = ("using python : 2.7 : {0}\\PCbuild\\python.exe\n" " : {0}\\include\n" " : {0}\\lib\n" " : <address-model>{1} ;") Project("boost") \ .depend(b2.B2().arguments(["address-model={}".format("64" if config['architecture'] == 'x86_64' else "32"), "toolset=msvc-12.0", "link=shared" ] + ["--with-{0}".format(component) for component in boost_components]) .depend(patch.CreateFile("user-config.jam", lambda: config_template.format( os.path.dirname(python.python['build_path']), "64" if config['architecture'] == "x86_64" else "32") ) .depend(sourceforge.Release("boost", "boost/{0}/boost_{1}.tar.bz2".format(boost_version, boost_version.replace(".", "_")), tree_depth=1)) ) ) \ .depend("Python")
b2.B2(name="Shared").arguments(["address-model={}".format("64" if config['architecture'] == 'x86_64' else "32"), "-a", "--user-config={}".format(os.path.join(config['paths']['build'], "boost_{}".format(boost_version. replace(".", "_")), "user-config.jam")), "-j {}".format(config['num_jobs']), "toolset=msvc-" + vc_version, "link=shared", ] + ["--with-{0}".format(component) for component in boost_components]) .depend( b2.B2(name="Static").arguments(["address-model={}".format("64" if config['architecture'] == 'x86_64' else "32"), "-a", "--user-config={}".format(os.path.join(config['paths']['build'], "boost_{}".format(boost_version. replace(".", "_")), "user-config.jam")), "-j {}".format(config['num_jobs']), "toolset=msvc-" + vc_version, "link=static", "runtime-link=shared", ] + ["--with-{0}".format(component) for component in boost_components]) .depend(Patch.CreateFile("user-config.jam", lambda: config_template.format( python_version, os.path.join(python.python['build_path'], "PCBuild", "{}".format( "" if config['architecture'] == 'x86' else "amd64")).replace("\\", '/'), os.path.join(python.python['build_path']).replace("\\", '/'), "64" if config['architecture'] == "x86_64" else "32") ).depend(build.Execute(patchboost) .depend(sourceforge.Release("boost", "boost/{0}/boost_{1}.tar.bz2".format( boost_version, boost_version.replace(".", "_")), tree_depth=1)) ).depend("Python") ) )
.depend(b2.B2(name="Shared").arguments(["address-model={}".format("64" if config['architecture'] == 'x86_64' else "32"), "-a", "--user-config={}".format(os.path.join(config['paths']['build'], "boost_git", "user-config.jam")), "-j {}".format(config['num_jobs']), "toolset=msvc-" + vc_version, "link=shared", "include={}".format(os.path.join(config['paths']['build'], "icu", "dist", "include", "unicode")), "-sICU_PATH={}".format( os.path.join(config['paths']['build'], "icu", "dist")), "-sHAVE_ICU=1", ] + ["--with-{0}".format(component) for component in boost_components]) .depend(b2.B2(name="Static").arguments(["address-model={}".format("64" if config['architecture'] == 'x86_64' else "32"), "-a", "--user-config={}".format(os.path.join(config['paths']['build'], "boost_git", "user-config.jam")), "-j {}".format(config['num_jobs']), "toolset=msvc-" + vc_version, "link=static", "runtime-link=shared", "include={}".format(os.path.join(config['paths']['build'], "icu", "dist", "include", "unicode")), "-sICU_PATH={}".format(os.path.join(config['paths']['build'], "icu", "dist")), "-sHAVE_ICU=1", ] + ["--with-{0}".format(component) for component in boost_components]) .depend(build.Run(r"bootstrap.bat",working_directory=lambda: os.path.join(config["paths"]["build"], "boost_git"))) .depend(Patch.CreateFile("user-config.jam", lambda: config_template.format( python_version, os.path.join(python_path, "PCBuild", "{}".format("" if config['architecture'] == 'x86' else "amd64")).replace("\\",'/'), python_path, "64" if config['architecture'] == "x86_64" else "32") )) .depend(init_repo) # .depend(sourceforge.Release("boost", # "boost/{0}/boost_{1}.tar.bz2".format(boost_version, # boost_version.replace(".", "_")), # tree_depth=1)) ).depend("icu").depend("Python")