Esempio n. 1
0
    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))
Esempio n. 2
0
    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)
        )
Esempio n. 3
0
    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
Esempio n. 4
0
    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
Esempio n. 5
0
    def __init__(self):
        self.msysdir = os.path.join( EmergeStandardDirs.emergeRoot(), "msys" )
        self.environment = os.environ.copy()
        self._sh = os.path.join( self.msysdir, "bin", "sh.exe" )
        if not os.path.exists( self._sh ):
            self._sh = os.path.join( self.msysdir, "usr", "bin", "bash.exe" )

        mergeroot = self.toNativePath(EmergeStandardDirs.emergeRoot())
        if compiler.isMinGW():
            ldflags = "-L%s/lib " % mergeroot
            cflags = "-I%s/include " % mergeroot

            if self.buildType == "RelWithDebInfo":
                cflags += " -O2 -g "
            elif self.buildType == "Debug":
                cflags += " -O0 -g3 "
        elif compiler.isMSVC():
            ldflags = ""
            cflags = " -MD -Zi"
            if compiler.isMSVC2013():
                cflags = " -FS"

        self.environment[ "MSYS2_PATH_TYPE" ] = "inherit"#inherit the windows path
        if "make" in self.environment:
            del self.environment[ "make" ]
        if compiler.isMinGW():
            arch = "32"
            if compiler.isX64():
                arch = "64"
            self.environment[ "MSYSTEM" ] = "MINGW%s_EMERGE" % arch
        self.environment[ "CFLAGS" ] = cflags
        self.environment[ "CXXFLAGS" ] = cflags

        if ldflags != "":
            self.environment[ "LDFLAGS" ] = ldflags


        if compiler.isMSVC():
            self.environment[ "LIB" ] = "%s;%s\\lib" % ( os.getenv("LIB"), EmergeStandardDirs.emergeRoot())
            self.environment[ "INCLUDE" ] = "%s;%s\\include" % ( os.getenv("INCLUDE"), EmergeStandardDirs.emergeRoot())
            self.environment[ "LD" ] = "link"
            self.environment[ "CC" ] = "cl -nologo"
            self.environment[ "CXX" ] = "cl -nologo"
            self.environment[ "NM" ] = "dumpbin -symbols"
            self.environment[ "AR" ] = "lib"
            #self.environment[ "WINDRES","rc-windres"
            #self.environment[ "RC","rc-windres"
            self.environment[ "STRIP"] = ":"
            self.environment[ "RANLIB"] = ":"
            self.environment[ "F77" ] = "no"
            self.environment[ "FC" ] = "no"
Esempio n. 6
0
    def make(self):
        self.enterSourceDir()
        if self.buildType() == "Debug":
            bt = "Debug"
        else:
            bt = "Release"

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

        return utils.system("msbuild /t:Rebuild \"%s\" /p:Configuration=%s %s" %
                (os.path.join(self.sourceDir(), "allinone", "allinone.sln"), bt, toolsetSwitches)
        )
Esempio n. 7
0
    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)