コード例 #1
0
ファイル: CMakeBuildSystem.py プロジェクト: vibhcool/emerge
 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())
コード例 #2
0
ファイル: icu.py プロジェクト: pgquiles/kdewindows-emerge
    def make(self):
        self.enterSourceDir()
        if self.buildType() == "Debug":
            bt = "Debug"
        else:
            bt = "Release"

        datafile = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "icudt55l.dat")
        if os.path.exists(datafile):
            datafileDestination = os.path.join(self.sourceDir(), "data", "in",
                                               "icudt55l.dat")
            if os.path.exists(datafileDestination):
                os.remove(datafileDestination)
            utils.copyFile(datafile, datafileDestination)

        toolsetSwitches = ""
        if compiler.isMSVC2012():
            toolsetSwitches = "/property:PlatformToolset=v110"
        elif compiler.isMSVC2013():
            toolsetSwitches = "/tv:12.0 /property:PlatformToolset=v120"
        elif compiler.isMSVC2015():
            toolsetSwitches = "/tv:14.0 /property:PlatformToolset=v140"

        return utils.system(
            "msbuild /m /t:Rebuild \"%s\" /p:Configuration=%s %s" %
            (os.path.join(self.sourceDir(), "allinone",
                          "allinone.sln"), bt, toolsetSwitches))
コード例 #3
0
ファイル: icu.py プロジェクト: pgquiles/kdewindows-emerge
    def make(self):
        self.enterSourceDir()
        if self.buildType() == "Debug":
            bt = "Debug"
        else:
            bt = "Release"

        datafile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "icudt55l.dat")
        if os.path.exists(datafile):
            datafileDestination = os.path.join(self.sourceDir(), "data", "in", "icudt55l.dat")
            if os.path.exists(datafileDestination):
                os.remove(datafileDestination)
            utils.copyFile( datafile, datafileDestination)

        toolsetSwitches = ""
        if compiler.isMSVC2012():
            toolsetSwitches = "/property:PlatformToolset=v110"
        elif compiler.isMSVC2013():
            toolsetSwitches = "/tv:12.0 /property:PlatformToolset=v120"
        elif compiler.isMSVC2015():
            toolsetSwitches = "/tv:14.0 /property:PlatformToolset=v140"

        return utils.system("msbuild /m /t:Rebuild \"%s\" /p:Configuration=%s %s" %
                (os.path.join(self.sourceDir(), "allinone", "allinone.sln"), bt, toolsetSwitches)
        )
コード例 #4
0
ファイル: CMakeBuildSystem.py プロジェクト: vibhcool/emerge
    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")
コード例 #5
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())
コード例 #6
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):
                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
コード例 #7
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" )
コード例 #8
0
ファイル: runtime.py プロジェクト: pgquiles/kdewindows-emerge
    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
コード例 #9
0
 def make(self):
     self.enterSourceDir()
     _win64 = ""
     _rcomp = ""
     if compiler.isX64(): _win64 = " WIN64="
     # because ghostscript doesn't know about msvc2015, it guesses wrong on this. But,
     # because of where we are, rc /should/ be in the path, so we'll just use that.
     if compiler.isMSVC2015(): _rcomp = " RCOMP=rc.exe"
     self.system("nmake -f psi\\msvc.mak" + _rcomp + _win64)
     return True
コード例 #10
0
 def make( self ):
     self.enterSourceDir()
     _win64 = ""
     _rcomp = ""
     if compiler.isX64(): _win64 = " WIN64="
     # because ghostscript doesn't know about msvc2015, it guesses wrong on this. But,
     # because of where we are, rc /should/ be in the path, so we'll just use that.
     if compiler.isMSVC2015(): _rcomp = " RCOMP=rc.exe"
     self.system( "nmake -f psi\\msvc.mak" + _rcomp + _win64 )
     return True
コード例 #11
0
ファイル: runtime.py プロジェクト: pgquiles/kdewindows-emerge
    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
コード例 #12
0
ファイル: icu.py プロジェクト: TheOneRing/emerge
 def setTargets( self ):
     self.svnTargets['svnHEAD'] = 'http://source.icu-project.org/repos/icu/icu/trunk'
     self.targetInstSrc['svnHEAD'] = "source"
     for ver in ['53.1', '55.1']:
         self.targets[ver] = 'http://download.icu-project.org/files/icu4c/%s/icu4c-%s-src.tgz' % ( ver, ver.replace(".", "_"))
         self.targetInstSrc[ver] = "icu\\source"
     self.targetDigests['53.1'] = '7eca017fdd101e676d425caaf28ef862d3655e0f'
     self.targetDigests['55.1'] = '3bb301c11be0e239c653e8aa2925c53f6f4dc88d'
     self.defaultTarget = '53.1'
     if compiler.isMSVC2015() or compiler.isMinGW():
         self.patchToApply['55.1'] = ("icu-20150414.diff", 2)
         self.defaultTarget = '55.1'
コード例 #13
0
ファイル: icu.py プロジェクト: pgquiles/kdewindows-emerge
 def setTargets(self):
     self.svnTargets[
         'svnHEAD'] = 'http://source.icu-project.org/repos/icu/icu/trunk'
     self.targetInstSrc['svnHEAD'] = "source"
     for ver in ['53.1', '55.1']:
         self.targets[
             ver] = 'http://download.icu-project.org/files/icu4c/%s/icu4c-%s-src.tgz' % (
                 ver, ver.replace(".", "_"))
         self.targetInstSrc[ver] = "icu\\source"
     self.targetDigests['53.1'] = '7eca017fdd101e676d425caaf28ef862d3655e0f'
     self.targetDigests['55.1'] = '3bb301c11be0e239c653e8aa2925c53f6f4dc88d'
     self.defaultTarget = '53.1'
     if compiler.isMSVC2015() or compiler.isMinGW():
         self.patchToApply['55.1'] = ("icu-20150414.diff", 2)
         self.defaultTarget = '55.1'
コード例 #14
0
ファイル: openssl.py プロジェクト: pombredanne/emerge-1
    def setTargets(self):
        # The deref version is a repackaged tarball of 1.0.0d
        # creation of this tarball was done on a secure machine
        # and the sources are exactly the same. Packaged
        # with GNU Tar options: tar --dereference -czf to avoid
        # problems with symlinks on windows

        # TODO: Patch this to use icl.exe when compiler.isIntel()
        # As this is pure C, there should be no problem with building it with cl.exe by now

        self.targets['1.0.0d'] = ('https://downloads.sourceforge.net/project/kde-windows'
                                  '/openssl/1.0.0d/openssl-1.0.0d-orig-deref-src.tar.gz')
        self.targetInstSrc['1.0.0d'] = 'openssl-1.0.0d'
        self.patchToApply['1.0.0d'] = ('openssl-1.0.0d.diff', 1)
        self.targetDigests['1.0.0d'] = '5c8472d09958c630eeb7548a1aeccb78fbd5cd10'

        for ver in ['0.9.8k', '0.9.8m', '1.0.0', '1.0.0a', '1.0.0b', '1.0.0c', '1.0.1c', '1.0.1e',
                    '1.0.1f', '1.0.1g', '1.0.1h', '1.0.1i', '1.0.1j', '1.0.1k', '1.0.2a', '1.0.2c', '1.0.2d']:
            self.targets[ver] = 'ftp://ftp.openssl.org/source/openssl-' + ver + '.tar.gz'
            self.targetInstSrc[ver] = 'openssl-' + ver
            # if compiler.isMSVC() and ver not in [ '0.9.8k' , '0.9.8m' ,'1.0.0', '1.0.0a', '1.0.0b', '1.0.0c' ]:
            # self.patchToApply[ ver ] = ('openssl-with-pdbs.diff', 1)
            if (compiler.isMSVC2013() or compiler.isMSVC2015()) and ver in ['1.0.1k']:
                self.patchToApply[ver] = ('openssl-1.0.1k.diff', 1)
            self.targetDigestUrls[ver] = 'ftp://ftp.openssl.org/source/openssl-' + ver + '.tar.gz.sha1'
        self.targets['1.0.1-snapshot'] = 'ftp://ftp.openssl.org/snapshot/openssl-1.0.1-stable-SNAP-20101028.tar.gz'
        self.shortDescription = "The OpenSSL runtime environment"

        self.defaultTarget = '1.0.2d'

        if compiler.isMinGW_W64():
            self.patchToApply['1.0.0'] = ('openssl-1.0.0a-mingw64-asm.diff', 1)
            self.patchToApply['1.0.0a'] = ('openssl-1.0.0a-mingw64-asm.diff', 1)
            self.patchToApply['1.0.0b'] = ('openssl-1.0.0a-mingw64-asm.diff', 1)
            self.patchToApply['1.0.0c'] = ('openssl-1.0.0a-mingw64-asm.diff', 1)
            self.patchToApply['1.0.0d'] = ('openssl-1.0.0a-mingw64-asm.diff', 1)