def setDependencies( self ): self.dependencies['kde/kdelibs'] = 'default' self.dependencies['kdesupport/oxygen-icons'] = 'default' if not emergePlatform.isCrossCompilingEnabled(): self.dependencies['win32libs-bin/libssh'] = 'default' if compiler.isMinGW_WXX(): self.dependencies['win32libs-bin/libbfd'] = 'default'
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 _getmakeProgram(self): EMERGE_MAKE_PROGRAM = os.getenv( "EMERGE_MAKE_PROGRAM" ) if EMERGE_MAKE_PROGRAM and self.subinfo.options.make.supportsMultijob: utils.debug( "set custom make program: %s" % EMERGE_MAKE_PROGRAM, 1 ) return EMERGE_MAKE_PROGRAM elif not self.subinfo.options.make.supportsMultijob: os.unsetenv("MAKE") if compiler.isMSVC(): return "nmake /NOLOGO" elif compiler.isMinGW_WXX(): return "gmake" elif compiler.isMinGW32(): return "mingw32-make" else: utils.die( "unknown %s compiler" % self.compiler() )
def setDirectories( self ): """setting all important stuff that isn't coped with in the c'tor parts will probably go to infoclass""" utils.debug( "setdirectories called", 1 ) self.PV, dummyExt = os.path.splitext( os.path.basename( self.argv0 ) ) ( self.category, self.package, self.version ) = \ portage.getCategoryPackageVersion( self.argv0 ) utils.debug( "setdir category: %s, package: %s" % ( self.category, self.package ) ) self.cmakeInstallPrefix = ROOTDIR.replace( "\\", "/" ) utils.debug( "cmakeInstallPrefix: " + self.cmakeInstallPrefix ) if compiler.isMSVC(): self.cmakeMakefileGenerator = "NMake Makefiles" self.cmakeMakeProgramm = "nmake" elif compiler.isMinGW(): self.cmakeMakefileGenerator = "MinGW Makefiles" if compiler.isMinGW_WXX(): self.cmakeMakeProgramm = "gmake" else: self.cmakeMakeProgramm = "mingw32-make" else: utils.die( "KDECOMPILER: %s not understood" % COMPILER ) if EMERGE_MAKE_PROGRAM and self.subinfo.options.make.supportsMultijob: self.cmakeMakeProgramm = EMERGE_MAKE_PROGRAM utils.debug( "set custom make program: %s" % EMERGE_MAKE_PROGRAM, 1 ) self.rootdir = ROOTDIR self.downloaddir = DOWNLOADDIR self.workdir = os.path.join( ROOTDIR, "tmp", self.PV, "work" ) self.imagedir = os.path.join( ROOTDIR, "tmp", self.PV, "image-" + COMPILER ) self.packagedir = os.path.join( portage.rootDirForPackage( self.category, self.package ), self.category, self.package ) self.kdesvndir = KDESVNDIR self.kdesvnserver = KDESVNSERVER self.kdesvnuser = KDESVNUSERNAME self.kdesvnpass = KDESVNPASSWORD self.svndir = os.path.join( self.downloaddir, "svn-src", self.package ) self.strigidir = os.getenv( "STRIGI_HOME" ) self.dbusdir = os.getenv( "DBUSDIR" )