Changeset View
Changeset View
Standalone View
Standalone View
portage/win32libs/boost/boost-bjam/boost-bjam.py
Show All 17 Lines | |||||
18 | 18 | | |||
19 | from Package.BoostPackageBase import * | 19 | from Package.BoostPackageBase import * | ||
20 | 20 | | |||
21 | class Package(BoostPackageBase): | 21 | class Package(BoostPackageBase): | ||
22 | def __init__(self, **args): | 22 | def __init__(self, **args): | ||
23 | BoostPackageBase.__init__(self) | 23 | BoostPackageBase.__init__(self) | ||
24 | 24 | | |||
25 | def install(self): | 25 | def install(self): | ||
26 | if OsUtils.isUnix(): | 26 | if OsUtils.isUnix(): | ||
27 | return utils.copyFile( os.path.join(portage.getPackageInstance('win32libs', 'boost-headers').sourceDir(),"tools","build", "bjam" ), | 27 | return utils.copyFile( os.path.join(portage.getPackageInstance('win32libs', 'boost-headers').sourceDir(),"tools","build", "bjam" ), | ||
28 | os.path.join( self.imageDir(), "bin", "bjam" ) ) | 28 | os.path.join( self.imageDir(), "bin", "bjam" ) ) | ||
29 | else: | 29 | else: | ||
30 | return utils.copyFile( os.path.join(portage.getPackageInstance('win32libs', 'boost-headers').sourceDir(),"tools","build", "bjam.exe" ), | 30 | return utils.copyFile( os.path.join(portage.getPackageInstance('win32libs', 'boost-headers').sourceDir(),"tools","build", "bjam.exe" ), | ||
31 | os.path.join( self.imageDir(), "bin", "bjam.exe" ) ) | 31 | os.path.join( self.imageDir(), "bin", "bjam.exe" ) ) | ||
32 | 32 | | |||
33 | 33 | | |||
34 | def make(self): | 34 | def make(self): | ||
35 | if OsUtils.isUnix(): | 35 | if OsUtils.isUnix(): | ||
36 | cmd = "./bootstrap.sh --with-toolset=" | 36 | cmd = "./bootstrap.sh --with-toolset=" | ||
37 | if compiler.isClang(): | 37 | if craftCompiler.isClang(): | ||
38 | cmd += "clang" | 38 | cmd += "clang" | ||
39 | elif compiler.isGCC(): | 39 | elif craftCompiler.isGCC(): | ||
40 | cmd += "gcc" | 40 | cmd += "gcc" | ||
41 | else: | 41 | else: | ||
42 | cmd = "bootstrap.bat " | 42 | cmd = "bootstrap.bat " | ||
43 | if compiler.isClang(): | 43 | if craftCompiler.isClang(): | ||
44 | cmd += "clang" | 44 | cmd += "clang" | ||
45 | elif compiler.isMinGW(): | 45 | elif craftCompiler.isMinGW(): | ||
46 | cmd += "mingw" | 46 | cmd += "mingw" | ||
47 | elif compiler.isMSVC(): | 47 | elif craftCompiler.isMSVC(): | ||
48 | platform = str(compiler.msvcPlatformToolset()) | 48 | platform = str(craftCompiler.msvcPlatformToolset()) | ||
49 | cmd += f"vc{platform[:2]}" | 49 | cmd += f"vc{platform[:2]}" | ||
50 | utils.system(cmd, cwd = os.path.join(portage.getPackageInstance('win32libs', | 50 | utils.system(cmd, cwd = os.path.join(portage.getPackageInstance('win32libs', | ||
51 | 'boost-headers').sourceDir(),"tools","build")) or craftDebug.log.critical( | 51 | 'boost-headers').sourceDir(),"tools","build")) or craftDebug.log.critical( | ||
52 | "command: %s failed" % (cmd)) | 52 | "command: %s failed" % (cmd)) | ||
53 | return True | 53 | return True | ||
54 | 54 | | |||
55 | 55 | |