def make( self ): """implements the make step for cmake projects""" self.enterBuildDir() utils.prependPath(self.rootdir, self.envPath) if self.subinfo.options.cmake.openIDE: if compiler.isMSVC2008(): command = "start %s" % self.__slnFileName() elif compiler.isMSVC2010(): command = "start vcexpress %s" % self.__slnFileName() elif self.subinfo.options.cmake.useIDE: if compiler.isMSVC2008(): command = "vcbuild /M1 %s \"%s|WIN32\"" % (self.__slnFileName(), self.buildType()) elif compiler.isMSVC2015(): command = "msbuild /maxcpucount %s /t:ALL_BUILD /p:Configuration=\"%s\"" % (self.__slnFileName(), self.buildType()) elif compiler.isMSVC2010(): EmergeDebug.die("has to be implemented"); elif self.subinfo.options.cmake.useCTest: # first make clean self.system( self.makeProgramm + " clean", "make clean" ) command = "ctest -M " + "Nightly" + " -T Start -T Update -T Configure -T Build -T Submit" else: command = ' '.join([self.makeProgramm, self.makeOptions()]) return self.system( command, "make" )
def make( self ): """implements the make step for cmake projects""" self.enterBuildDir() utils.prependPath(self.rootdir, self.envPath) if self.subinfo.options.cmake.openIDE: if compiler.isMSVC2008(): command = "start %s" % self.__slnFileName() elif compiler.isMSVC2010(): command = "start vcexpress %s" % self.__slnFileName() elif self.subinfo.options.cmake.useIDE: if compiler.isMSVC2008(): if self.isTargetBuild(): command = "vcbuild /M1 %s \"%s|Windows Mobile 6 Professional SDK (ARMV4I)\"" % (self.__slnFileName(), self.buildType()) else: command = "vcbuild /M1 %s \"%s|WIN32\"" % (self.__slnFileName(), self.buildType()) elif compiler.isMSVC2010(): utils.die("has to be implemented"); elif self.subinfo.options.cmake.useCTest: # first make clean self.system( self.makeProgramm + " clean", "make clean" ) command = "ctest -M " + "Nightly" + " -T Start -T Update -T Configure -T Build -T Submit" else: command = ' '.join([self.makeProgramm, self.makeOptions()]) if self.isTargetBuild(): self.setupTargetToolchain() return self.system( command, "make" )
def make(self): """implements the make step for cmake projects""" self.enterBuildDir() utils.prependPath(self.rootdir, self.envPath) if self.subinfo.options.cmake.openIDE: if compiler.isMSVC2008(): command = "start %s" % self.__slnFileName() elif compiler.isMSVC2010(): command = "start vcexpress %s" % self.__slnFileName() elif self.subinfo.options.cmake.useIDE: if compiler.isMSVC2008(): command = "vcbuild /M1 %s \"%s|WIN32\"" % ( self.__slnFileName(), self.buildType()) elif compiler.isMSVC2015(): command = "msbuild /maxcpucount %s /t:ALL_BUILD /p:Configuration=\"%s\"" % ( self.__slnFileName(), self.buildType()) elif compiler.isMSVC2010(): EmergeDebug.die("has to be implemented") elif self.subinfo.options.cmake.useCTest: # first make clean self.system(self.makeProgramm + " clean", "make clean") command = "ctest -M " + "Nightly" + " -T Start -T Update -T Configure -T Build -T Submit" else: command = ' '.join([self.makeProgramm, self.makeOptions()]) return self.system(command, "make")
def __init__( self, **args ): self.subinfo = subinfo() CMakePackageBase.__init__(self) # jom reports missing moc_translator.xxx self.subinfo.options.make.supportsMultijob = False # add support for other location based on pythonpath localPythonPath = os.path.join(self.rootdir, 'emerge', 'python') haveLocalPython = os.path.exists(localPythonPath) if compiler.isMSVC2008(): specName = "win32-msvc2008" elif compiler.isMSVC2010(): specName = "win32-msvc2010" elif compiler.isMinGW(): specName = "win32-g++" else: utils.die("compiler %s not supported for PyQt4" % compiler.COMPILER) if haveLocalPython: specDir = self.mergeDestinationDir() else: specDir = self.rootdir os.putenv("QMAKESPEC", os.path.join(specDir, "mkspecs", specName)) if haveLocalPython: self.subinfo.options.merge.destinationPath = "emerge/python" self.subinfo.options.configure.defines = " --confirm-license --verbose" if self.buildType() == "Debug": self.subinfo.options.configure.defines += " -u"
def __makeFileGenerator(self): """return cmake related make file generator""" if self.supportsNinja and emergeSettings.getboolean( "Compile", "UseNinja", False): return "Ninja" if compiler.isMSVC2015(): if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE: return "Visual Studio 14 2015" + " Win64" if compiler.isX64( ) else "" else: return "NMake Makefiles" if compiler.isMSVC2010(): if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE: return "Visual Studio 10" else: return "NMake Makefiles" elif compiler.isMSVC2008(): if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE: return "Visual Studio 9 2008" else: return "NMake Makefiles" elif compiler.isMSVC() or compiler.isIntel(): return "NMake Makefiles" elif compiler.isMinGW(): return "MinGW Makefiles" else: EmergeDebug.die("unknown %s compiler" % self.compiler())
def __makeFileGenerator(self): """return cmake related make file generator""" if self.supportsNinja and emergeSettings.getboolean("Compile","UseNinja", False): return "Ninja" if compiler.isMSVC2015(): if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE: return "Visual Studio 14 2015" + " Win64" if compiler.isX64() else "" else: return "NMake Makefiles" if compiler.isMSVC2010(): if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE: return "Visual Studio 10" else: return "NMake Makefiles" elif compiler.isMSVC2008(): if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE: return "Visual Studio 9 2008" else: return "NMake Makefiles" elif compiler.isMSVC() or compiler.isIntel(): return "NMake Makefiles" elif compiler.isMinGW(): return "MinGW Makefiles" else: EmergeDebug.die("unknown %s compiler" % self.compiler())
def __init__(self, **args): self.subinfo = subinfo() CMakePackageBase.__init__(self) self.subinfo.options.configure.defines = ( " --build-type=minimal" " --build-dir=" + self.buildDir() + \ " --prefix=" + self.imageDir() + \ " --stagedir=" + os.path.join(self.buildDir(),"stage") + \ " threading=multi" " link=shared" " runtime-link=shared") self.subinfo.options.configure.defines += " variant=" if self.buildType() == "Debug": self.subinfo.options.configure.defines += "debug" else: self.subinfo.options.configure.defines += "release" self.subinfo.options.configure.defines += " toolset=" if compiler.isMinGW(): self.subinfo.options.configure.defines += "gcc" else: if compiler.isMSVC2005(): self.subinfo.options.configure.defines += "msvc-8.0" elif compiler.isMSVC2008(): self.subinfo.options.configure.defines += "msvc-9.0" elif compiler.isMSVC2010(): self.subinfo.options.configure.defines += "msvc-10.0" if self.isHostBuild(): self.subinfo.options.configure.defines += " --with-program_options" if not emergePlatform.isCrossCompilingEnabled(): self.subinfo.options.configure.defines += " --with-python"
def __init__( self ): self.subinfo = subinfo() CMakePackageBase.__init__( self ) if compiler.isMSVC2008() or compiler.isMSVC2010(): utils.die(""" src/Interfaces/GraphScene.h contains the static member kBorder and sets the initial value in the class statement. This is not supported by msvc compilers, please fix it""")
def unpack(self): destdir = os.path.join(self.sourceDir(), "bin") utils.createDir(self.sourceDir()) utils.createDir(destdir) postfix = "" if self.buildType() == "Debug": postfix = "d" srcdir = None files = [] if compiler.isMinGW(): if self.subinfo.options.features.legacyGCC: if compiler.isMinGW_W32(): srcdir = os.path.join(self.rootdir, "mingw", "bin") elif compiler.isMinGW_W64(): srcdir = os.path.join(self.rootdir, "mingw64", "bin") files = ['libgcc_s_sjlj-1.dll', 'libgomp-1.dll'] else: files = [ 'libgomp-1.dll', 'libstdc++-6.dll', 'libwinpthread-1.dll' ] if compiler.isMinGW_W32(): files.append('libgcc_s_sjlj-1.dll') srcdir = os.path.join(self.rootdir, "mingw", "bin") elif compiler.isMinGW_W64(): files.append('libgcc_s_seh-1.dll') srcdir = os.path.join(self.rootdir, "mingw64", "bin") elif compiler.isMSVC(): if compiler.isX86( ) and os.environ["PROCESSOR_ARCHITECTURE"] == "AMD64": srcdir = os.path.join(os.environ["SystemRoot"], "SysWOW64") else: srcdir = os.path.join(os.environ["SystemRoot"], "System32") if compiler.isMSVC2010(): files = [ "msvcr100%s.dll" % postfix, "msvcp100%s.dll" % postfix ] elif compiler.isMSVC2013(): files = [ "msvcr120%s.dll" % postfix, "msvcp120%s.dll" % postfix ] elif compiler.isMSVC2015(): files = [ "concrt140%s.dll" % postfix, "msvcp140%s.dll" % postfix, "vccorlib140%s.dll" % postfix, "vcruntime140%s.dll" % postfix ] for file in files: utils.copyFile(os.path.join(srcdir, file), os.path.join(destdir, file), False) return True
def unpack( self ): destdir = os.path.join( self.sourceDir(), "bin" ) utils.createDir( self.sourceDir() ) utils.createDir( destdir ) postfix = "" if self.buildType() == "Debug": postfix = "d" srcdir = None files = [] if compiler.isMinGW(): if self.subinfo.options.features.legacyGCC: if compiler.isMinGW_W32(): srcdir = os.path.join( self.rootdir, "mingw", "bin" ) elif compiler.isMinGW_W64(): srcdir = os.path.join( self.rootdir, "mingw64", "bin" ) files = [ 'libgcc_s_sjlj-1.dll', 'libgomp-1.dll' ] else: files = [ 'libgomp-1.dll', 'libstdc++-6.dll', 'libwinpthread-1.dll' ] if compiler.isMinGW_W32(): files.append('libgcc_s_sjlj-1.dll') srcdir = os.path.join( self.rootdir, "mingw", "bin" ) elif compiler.isMinGW_W64(): files.append('libgcc_s_seh-1.dll') srcdir = os.path.join( self.rootdir, "mingw64", "bin" ) elif compiler.isMSVC(): if compiler.isX86() and os.environ["PROCESSOR_ARCHITECTURE"] == "AMD64": srcdir = os.path.join( os.environ["SystemRoot"], "SysWOW64") else: srcdir = os.path.join( os.environ["SystemRoot"], "System32") if compiler.isMSVC2010(): files = [ "msvcr100%s.dll" % postfix, "msvcp100%s.dll" % postfix ] elif compiler.isMSVC2013(): files = [ "msvcr120%s.dll" % postfix, "msvcp120%s.dll" % postfix ] elif compiler.isMSVC2015(): files = [ "concrt140%s.dll" % postfix, "msvcp140%s.dll" % postfix, "vccorlib140%s.dll" % postfix, "vcruntime140%s.dll" % postfix ] for file in files: utils.copyFile( os.path.join( srcdir, file ), os.path.join( destdir, file ), False ) return True
def unpack( self ): destdir = os.path.join( self.installDir(), "bin" ) utils.createDir( self.workDir() ) utils.createDir( destdir ) postfix = "" if self.buildType() == "Debug": postfix = "d" files = [] if compiler.isMinGW(): if compiler.isMinGW32(): srcdir = os.path.join( self.rootdir, "mingw", "bin" ) files = [ 'mingwm10.dll', 'libgcc_s_dw2-1.dll' ] elif compiler.isMinGW_W32(): srcdir = os.path.join( self.rootdir, "mingw", "bin" ) files = [ 'libgcc_s_sjlj-1.dll', 'libgomp-1.dll' ] elif compiler.isMinGW_W64(): srcdir = os.path.join( self.rootdir, "mingw64", "bin" ) files = [ 'libgcc_s_sjlj-1.dll', 'libgomp-1.dll' ] # elif compiler.isMSVC2008(): # if self.buildType() == "Debug": # srcdir = os.path.join( self.packageDir(), "redist", "Debug_NonRedist", "x86", "Microsoft.VC90.DebugCRT" ) # files = [ "Microsoft.VC90.DebugCRT.manifest", "msvcr90d.dll", "msvcp90d.dll", "msvcm90d.dll"] # else: # srcdir = os.path.join( self.packageDir(), "redist", "x86", "Microsoft.VC90.CRT" ) # files = [ "Microsoft.VC90.CRT.manifest", "msvcr90.dll", "msvcp90.dll", "msvcm90.dll" ] elif compiler.isMSVC2010(): srcdir = os.path.join( os.environ["windir"], "system32" ) files = [ "msvcr100%s.dll" % postfix, "msvcp100%s.dll" % postfix ] for file in files: utils.copyFile( os.path.join( srcdir, file ), os.path.join( destdir, file ) ) # extract pthread package. if compiler.isMinGW_WXX(): tmpdir = os.getenv( "TEMP" ) if compiler.isMinGW_W32(): _ext = 32 elif compiler.isMinGW_W64(): _ext = 64 else: utils.die( "unknown flavor of mingw-wXX" ) pthreadPackageName = os.path.join( self.rootdir, "mingw", "pthreads-w%s.zip" ) % _ext pthreadDll = "pthreadGC2-w%s.dll" % _ext utils.unZip( pthreadPackageName, tmpdir ) srcdir = os.path.join( tmpdir, "bin" ) files = [ pthreadDll ] for file in files: utils.copyFile( os.path.join( srcdir, file ), os.path.join( destdir, file ) ) return True
def __init__( self, **args ): CMakePackageBase.__init__(self) self.subinfo.options.configure.defines = "" if self.buildType == "Debug": self.subinfo.options.configure.defines = " -u" if compiler.isMSVC2008(): self.subinfo.options.configure.defines += " -p win32-msvc2008" elif compiler.isMSVC2010(): self.subinfo.options.configure.defines += " -p win32-msvc2010" elif compiler.isMinGW(): self.subinfo.options.configure.defines += " -p win32-g++" self.subinfo.options.configure.defines += " CFLAGS=-I" +self.packageDir() self.subinfo.options.configure.defines += " CXXFLAGS=-I" +self.packageDir()
def make(self): if self.subinfo.defaultTarget == '1.44.0': return True cmd = "build.bat " if compiler.isMinGW(): cmd += "gcc" else: if compiler.isMSVC2005(): cmd += "vc8" elif compiler.isMSVC2008(): cmd += "vc9" elif compiler.isMSVC2010(): cmd += "vc10" if utils.verbose() >= 1: print cmd utils.system(cmd, cwd = os.path.join(portage.getPackageInstance('win32libs-bin', 'boost-headers').sourceDir(),"tools","build","v2","engine")) or utils.die( "command: %s failed" % (cmd)) return True
def __makeFileGenerator(self): """return cmake related make file generator""" if self.supportsNinja and emergeSettings.getboolean("General","EMERGE_USE_NINJA", False): return "Ninja" if compiler.isMSVC2010(): if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE: return "Visual Studio 10" else: return "NMake Makefiles" elif compiler.isMSVC2008(): if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE: return "Visual Studio 9 2008" else: return "NMake Makefiles" elif compiler.isMSVC() or compiler.isIntel(): return "NMake Makefiles" elif compiler.isMinGW(): return "MinGW Makefiles" else: utils.die( "unknown %s compiler" % self.compiler() )
def __makeFileGenerator(self): """return cmake related make file generator""" if compiler.isMSVC2010(): if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE: return "Visual Studio 10" else: return "NMake Makefiles" elif compiler.isMSVC2008(): if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE: if self.isTargetBuild(): return "Visual Studio 9.0 Windows Mobile 6 Professional SDK (ARMV4I)" else: return "Visual Studio 9 2008" else: return "NMake Makefiles" elif compiler.isMSVC(): return "NMake Makefiles" elif compiler.isMinGW(): return "MinGW Makefiles" else: utils.die( "unknown %s compiler" % self.compiler() )