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" )
예제 #2
0
    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" )
예제 #3
0
    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")
예제 #4
0
    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"
예제 #5
0
    def install( self):
        """install the target"""
        if not BuildSystemBase.install(self):
            return False

        self.enterBuildDir()

        fastString = ""
        if not self.noFast:
            fastString = "/fast"

        if self.subinfo.options.install.useMakeToolForInstall:
            if compiler.isMSVC2008() and (self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE):
                if self.isTargetBuild():
                    command = "vcbuild INSTALL.vcproj \"%s|Windows Mobile 6 Professional SDK (ARMV4I)\"" % self.buildType()
                else:
                    command = "vcbuild INSTALL.vcproj \"%s|Win32\"" % self.buildType()
            else:
                os.putenv("DESTDIR",self.installDir())
                command = "%s install%s" % ( self.makeProgramm, fastString )
        else:
            command = "cmake -DCMAKE_INSTALL_PREFIX=%s -P cmake_install.cmake" % self.installDir()

        if self.isTargetBuild():
            self.setupTargetToolchain()

        self.system( command, "install" )

        if self.subinfo.options.install.useMakeToolForInstall and not (self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE):
            utils.fixCmakeImageDir( self.installDir(), self.mergeDestinationDir() )
        return True
예제 #6
0
 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 install( self):
        """install the target"""
        if not BuildSystemBase.install(self):
            return False

        self.enterBuildDir()

        fastString = ""
        if not self.noFast:
            fastString = "/fast"

        if self.subinfo.options.install.useMakeToolForInstall:
            if compiler.isMSVC2008() and (self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE):
                command = "vcbuild INSTALL.vcproj \"%s|Win32\"" % self.buildType()
            elif compiler.isMSVC2015() and (self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE):
                command = "msbuild INSTALL.vcxproj /p:Configuration=\"%s\"" % self.buildType()
            else:
                os.putenv("DESTDIR",self.installDir())
                command = "%s install%s" % ( self.makeProgramm, fastString )
        else:
            command = "cmake -DCMAKE_INSTALL_PREFIX=%s -P cmake_install.cmake" % self.installDir()

        self.system( command, "install" )

        if self.subinfo.options.install.useMakeToolForInstall and not (self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE):
            self._fixCmakeImageDir(self.installDir(), self.mergeDestinationDir())
        return True
예제 #9
0
    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"
예제 #10
0
 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""")
예제 #11
0
 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
예제 #13
0
 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() )
예제 #15
0
    def configure( self, unused1=None, unused2=""):
        self.enterBuildDir()
        self.setPathes()

        xplatform = ""
        if self.isTargetBuild():
            if self.buildPlatform() == "WM60":
                xplatform = "wincewm60professional-%s" % self.compiler()
            elif self.buildPlatform() == "WM65":
                xplatform = "wincewm65professional-%s" % self.compiler()
            elif self.buildPlatform() == "WM50":
                xplatform = "wincewm50pocket-%s" % self.compiler()
            else:
                exit( 1 )

        os.environ[ "USERIN" ] = "y"
        userin = "y"

        incdirs = " -I \"" + os.path.join( self.dbus.installDir(), "include" ) + "\""
        libdirs = " -L \"" + os.path.join( self.dbus.installDir(), "lib" ) + "\""
        incdirs += " -I \"" + os.path.join( self.openssl.installDir(), "include" ) + "\""
        libdirs += " -L \"" + os.path.join( self.openssl.installDir(), "lib" ) + "\""
        if self.isTargetBuild():
            incdirs += " -I \"" + os.path.join( self.wcecompat.installDir(), "include" ) + "\""
            libdirs += " -L \"" + os.path.join( self.wcecompat.installDir(), "lib" ) + "\""
        if not emergePlatform.isCrossCompilingEnabled():
            incdirs += " -I \"" + os.path.join( self.mysql_server.installDir(), "include" ) + "\""
            libdirs += " -L \"" + os.path.join( self.mysql_server.installDir(), "lib" ) + "\""
            libdirs += " -l libmysql "
        else:
            utils.copyFile( os.path.join( self.packageDir(), "sources", "qconfig-kde-wince.h" ),
                    os.path.join( self.sourceDir(), "src", "corelib" , "global", "qconfig-kde-wince.h" ) )
            utils.copyFile( os.path.join( self.packageDir(), "sources", "new.cpp" ),
                    os.path.join( self.sourceDir(), "src", "corelib" , "global", "new.cpp" ) )
            utils.copyFile( os.path.join( self.packageDir(), "sources", "gpglogger_wince.cpp" ),
                    os.path.join( self.sourceDir(), "src", "corelib" , "global", "gpglogger_wince.cpp" ) )
            utils.copyFile( os.path.join( self.packageDir(), "sources", "gpglogger_wince.h" ),
                    os.path.join( self.sourceDir(), "src", "corelib" , "global", "gpglogger_wince.h" ) )

        configure = os.path.join( self.sourceDir(), "configure.exe" ).replace( "/", "\\" )
        command = r"echo %s | %s -opensource -prefix %s -platform %s " % ( userin, configure, self.installDir(), self.platform )
        if emergePlatform.isCrossCompilingEnabled():
            if self.isTargetBuild():
                command += "-xplatform %s -qconfig kde-wince " % xplatform
                command += "-no-exceptions -no-stl -no-rtti "
            if self.isHostBuild():
                command += "-no-xmlpatterns -no-declarative -no-opengl "
            command += "-no-qt3support -no-multimedia -no-scripttools -no-accessibility -no-libmng -no-libtiff -no-gif -no-webkit "

        if not emergePlatform.isCrossCompilingEnabled():
            # non-cc builds only
            command += "-plugin-sql-odbc -plugin-sql-mysql "
            command += "-qt-style-windowsxp -qt-style-windowsvista "
            command += "-qt-libpng -qt-libjpeg -qt-libtiff "

        # WebKit won't link properly with LTCG in a 32-bit MSVC environment
        if emergePlatform.buildArchitecture() == "x86" and compiler.isMSVC2008():
            command += "-no-ltcg "
        else:
            command += "-ltcg "

        # all builds
        command += "-no-phonon "
        command += "-qdbus -dbus-linked -openssl-linked "
        command += "-fast -no-vcproj -no-dsp "
        command += "-nomake demos -nomake examples "
        command += "%s %s" % ( incdirs, libdirs )

        if self.buildType() == "Debug":
          command += " -debug "
        else:
          command += " -release "
        print "command: ", command
        utils.system( command )
        return True