def findPossibleTargets( category, package, version, buildtype=''): # pylint: disable=W0613
    """ this function tries to guess which target got used by looking at the different image directories """
    target = PortageInstance.getDefaultTarget( category, package, version )
    buildroot = os.path.join( ROOTDIR, "build", category, "%s-%s" % ( package, version ) )

    if not os.path.exists( buildroot ):
        return target

    for directory in os.listdir( buildroot ):
        if os.path.isdir( os.path.join( buildroot, directory ) ):
            if directory.startswith( "image" ) and directory != "image":
                particles = directory.split( '-' )[ 1: ] # the first part should be image- anyway
                if len(particles) == 3:
                    _platform, _buildType, _target = particles
                elif len(particles) == 4 and emergePlatform.isCrossCompilingEnabled():
                    _platform, _buildType, _buildArch, _target = particles
                elif len(particles) >= 4 and not emergePlatform.isCrossCompilingEnabled():
                    _platform, _buildType = particles[0:2]
                    _target = '-'.join(particles[2:])
                else:
                    return target
                if _platform == os.getenv( "KDECOMPILER" ) and \
                   _buildType == os.getenv( "EMERGE_BUILDTYPE" ):
                    return _target
    return target
Beispiel #2
0
def printInstalled():
    """get all the packages that are already installed"""
    host = target = portage.alwaysTrue
    if emergePlatform.isCrossCompilingEnabled():
        host = portage.isHostBuildEnabled
        target = portage.isTargetBuildEnabled
    portage.printCategoriesPackagesAndVersions( installdb.getDistinctInstalled(), portage.alwaysTrue, host, target )
Beispiel #3
0
    def setDependencies( self ):
        if not utils.envAsBool('EMERGE_ENABLE_IMPLICID_BUILDTIME_DEPENDENCIES'):
            self.buildDependencies['gnuwin32/wget']       = 'default'
            self.buildDependencies['dev-util/7zip']       = 'default'
            self.buildDependencies['gnuwin32/patch']      = 'default'
            self.buildDependencies['gnuwin32/sed']        = 'default'
            self.buildDependencies['dev-util/cmake']      = 'default'
            self.buildDependencies['dev-util/subversion'] = 'default'
            self.buildDependencies['dev-util/git']        = 'default'

        # for creating combined packages
        self.buildDependencies['dev-util/pexports']   = 'default'

        #add c++ runtime if we xcompile
        if emergePlatform.isCrossCompilingEnabled():
            self.dependencies['win32libs-bin/runtime-ce']   = 'default'

        if not utils.envAsBool('EMERGE_ENABLE_IMPLICID_BUILDTIME_DEPENDENCIES'):
            if os.getenv( "SVN_SSH" ) == "plink" or \
                    os.getenv( "GIT_SSH" ) == "plink":
                self.buildDependencies['dev-util/putty']      = 'default'

            if compiler.isMinGW():
                if compiler.isMinGW_W64():
                    self.buildDependencies['dev-util/mingw-w64']    = 'default'
                elif emergePlatform.buildArchitecture() == 'arm-wince':
                    self.buildDependencies['dev-util/cegcc-arm-wince'] = 'default'
                else:
                    if compiler.isMinGW32():
                        self.buildDependencies['dev-util/mingw4']    = 'default'
                    else:
                        self.buildDependencies['dev-util/mingw-w32']    = 'default'
            if os.getenv( "EMERGE_MAKE_PROGRAM" ) != "":
                self.buildDependencies['dev-util/jom']        = 'default'
    def __init__( self, **args ):
        self.subinfo = subinfo()
        CMakePackageBase.__init__( self )
        self.subinfo.options.package.packageName = 'dbus'
        self.subinfo.options.make.slnBaseName = 'dbus'
        self.subinfo.options.configure.defines = (
                "-DDBUS_BUILD_TESTS=OFF "
                "-DDBUS_ENABLE_XML_DOCS=OFF "
                "-DDBUS_USE_EXPAT=ON "
                "-DDBUS_REPLACE_LOCAL_DIR=ON ")

        if (self.buildType == "Release"):
            self.subinfo.options.configure.defines += (
                    "-DDBUS_ENABLE_VERBOSE_MODE=OFF "
                    "-DDBUS_DISABLE_ASSERTS=ON ")

        if emergePlatform.isCrossCompilingEnabled():
            self.subinfo.options.configure.defines += (
                    "-DDBUS_SESSION_BUS_DEFAULT_ADDRESS:"
                    "STRING=tcp:host=localhost,port=12434 ")
        else:
            # for 1.4.1 and greater switch to official
            # supported scopes -> autolaunch:scope=*install-path
            self.subinfo.options.configure.defines += (
                    "-DDBUS_SESSION_BUS_DEFAULT_ADDRESS:"
                    "STRING=autolaunch:scope=install-path ")
            # kde uses debugger output, so dbus should do too
            # not sure if this works for wince too, so limited to win32
            self.subinfo.options.configure.defines += (
                    "-DDBUS_USE_OUTPUT_DEBUG_STRING=ON ")
 def setDependencies( self ):
     self.buildDependencies['virtual/base']            = 'default'
     self.dependencies['libs/qt']                 = 'default'
     self.dependencies['win32libs-bin/librdf']   = 'default'
     if not emergePlatform.isCrossCompilingEnabled():
         self.buildDependencies['win32libs-bin/clucene-core'] = 'default'
         self.dependencies['testing/virtuoso']   = 'default'
 def setDependencies( self ):
         self.buildDependencies['virtual/base'] = 'default'
         self.buildDependencies['dev-util/perl'] = 'default'
         if emergePlatform.isCrossCompilingEnabled():
             self.dependencies['win32libs-sources/wcecompat-src'] = 'default'
         if compiler.isMinGW():
             self.buildDependencies['dev-util/msys'] = 'default'
             self.dependencies['win32libs-bin/zlib'] = 'default'
 def __init__( self, **args ):
     self.subinfo = subinfo()
     CMakePackageBase.__init__( self )
     self.subinfo.options.configure.defines = "-DBUILD_TOOL=ON -DBUILD_TESTS=OFF "
     if emergePlatform.isCrossCompilingEnabled():
         self.subinfo.options.configure.defines += "-DTARGET_CPP:STRING=\"" + os.getenv("VCINSTALLDIR").replace("\\", "/") + "/ce/bin/x86_arm/cl.exe\" "
         if self.isTargetBuild():
             self.subinfo.options.configure.defines += "-DBUILD_CROSS_TOOLS=OFF "
 def setDependencies( self ):
     self.dependencies['win32libs-bin/sqlite'] = 'default'
     self.dependencies['win32libs-bin/libcurl'] = 'default'
     self.dependencies['win32libs-bin/libxml2'] = 'default'
     self.dependencies['win32libs-bin/libxslt'] = 'default'
     self.dependencies['win32libs-bin/openssl'] = 'default'
     self.dependencies['win32libs-bin/pcre'] = 'default'
     self.buildDependencies['virtual/base'] = 'default'
     if emergePlatform.isCrossCompilingEnabled():
         self.dependencies['win32libs-sources/wcecompat-src'] = 'default'
 def setDependencies( self ):
     self.buildDependencies['virtual/base'] = 'default'
     self.buildDependencies['dev-util/perl'] = 'default'
     self.dependencies['win32libs-bin/openssl'] = 'default'
     if EmergeBase().buildType() == "Debug":
         self.dependencies['win32libs-sources/dbus-src'] = 'default'
     else:
         self.dependencies['win32libs-bin/dbus'] = 'default'
     if not emergePlatform.isCrossCompilingEnabled():
         self.dependencies['testing/mysql-pkg'] = 'default'
     else:
         self.dependencies['win32libs-sources/wcecompat-src'] = 'default'
Beispiel #10
0
def isTargetBuildEnabled(category, package, version):
    """ returns whether this package's target build is enabled. This will only work if
        isCrossCompilingEnabled() == True """

    if emergePlatform.isCrossCompilingEnabled():
        mod = __import__(getFilename(category, package, version))
        if hasattr(mod, "subinfo"):
            info = mod.subinfo()
            return not info.disableTargetBuild
        else:
            return False
    else:
        utils.die("This function must not be used outside of cross-compiling environments!")
Beispiel #11
0
    def getPackageInstance(self, category, package, buildtarget=None):
        """return instance of class Package from package file"""
        if emergePlatform.isCrossCompilingEnabled() or utils.isSourceOnly():
            sp = self.getCorrespondingSourcePackage(package)
            if sp:
                category = sp[0]
                package = sp[1]

        version = self.getNewestVersion(category, package)
        fileName = getFilename(category, package, version)
        module = __import__(fileName)
        p = module.Package()
        p.setup(fileName, category, package, version, buildtarget)
        return p
 def setTargets( self ):
     self.targets['0.9.16a'] = "http://downloads.sourceforge.net/sourceforge/clucene/clucene-core-0.9.16a.tar.bz2"
     self.targetInstSrc['0.9.16a'] = os.path.join( "clucene-core-0.9.16a", "src" )
     self.targets['0.9.20'] = "http://downloads.sourceforge.net/sourceforge/clucene/clucene-core-0.9.20.tar.bz2"
     self.targetInstSrc['0.9.20'] = os.path.join( "clucene-core-0.9.20", "src" )
     self.targets['0.9.21b'] = "http://downloads.sourceforge.net/sourceforge/clucene/clucene-core-0.9.21b.tar.bz2"
     self.targetInstSrc['0.9.21b'] = os.path.join( "clucene-core-0.9.21b", "src" )
     if emergePlatform.isCrossCompilingEnabled():
         self.patchToApply['0.9.21b'] = ( "clucene-core-0.9.21b-20101110.diff", 2 )
     else:
         self.patchToApply['0.9.21b'] = ( "0.9.21.diff", 2 )
     self.targetDigests['0.9.21b'] = '8bc505b64f82723c2dc901036cb0607500870973'
     self.shortDescription = "high-performance, full-featured text search engine (required for compiling strigi)"
     self.defaultTarget = '0.9.21b'
Beispiel #13
0
 def importExistingDatabase( self ):
     """ imports from the previous installation database system """
     for category, package, version in portage.PortageInstance.getInstallables():
         # FIXME: we need to adapt this to use prefixes as well
         utils.debug( "importing package %s/%s-%s ..." % ( category, package, version ) )
         if self.isPkgInstalled( category, package, version ):
             utils.debug( 'adding installed package %s/%s-%s' % ( category, package, version ), 1 )
             packageObject = self.addInstalled( category, package, version, "" )
             packageObject.addFiles( utils.getFileListFromManifest( os.getenv( "KDEROOT" ), package ) )
             packageObject.install()
             if emergePlatform.isCrossCompilingEnabled():
                 targetObject = self.addInstalled( category, package, version, os.getenv( "EMERGE_TARGET_PLATFORM" ) )
                 targetObject.addFiles( utils.getFileListFromManifest( os.path.join( os.getenv( "KDEROOT" ),
                         os.getenv( "EMERGE_TARGET_PLATFORM" ) ), package ) )
                 targetObject.install()
def printCategoriesPackagesAndVersions( lines, condition, hostEnabled=alwaysTrue, targetEnabled=alwaysTrue ):
    """prints a number of 'lines', each consisting of category, package and version field"""
    def printLine( cat, pack, ver, hnt="" ):
        catlen = 25
        packlen = 25
        print cat + " " * ( catlen - len( cat ) ) + pack + " " * ( packlen - len( pack ) ) + ver, hnt

    printLine( 'Category', 'Package', 'Version' )
    printLine( '--------', '-------', '-------' )
    for category, package, version in lines:
        if emergePlatform.isCrossCompilingEnabled():
            msg = getHostAndTarget( hostEnabled( category, package, version ), targetEnabled( category, package, version ) )
        else:
            msg = ""
        if condition( category, package, version ):
            printLine( category, package, version, msg )
    def __init__( self ):
        self.subinfo = subinfo()
        CMakePackageBase.__init__( self )
        self.subinfo.options.configure.defines  = " -DDATABASE_BACKEND=SQLITE -DINSTALL_QSQLITE_IN_QT_PREFIX=TRUE -DCMAKE_PROGRAM_PATH=%s " % os.path.join( os.getenv("KDEROOT") , "dev-utils" , "svn" , "bin" )
        if emergePlatform.isCrossCompilingEnabled():
            self.subinfo.options.configure.defines += "-DHOST_BINDIR=%s " \
                % os.path.join(ROOTDIR, "bin")

        if self.isTargetBuild():
            automoc = os.path.join(self.rootdir, "lib", "automoc4", "Automoc4Config.cmake")
            if not os.path.exists(automoc):
                utils.warning("could not find automoc in <%s>" % automoc)
            self.subinfo.options.configure.defines += " -DAKONADI_STATIC_SQLITE=TRUE -DAKONADI_USE_STRIGI_SEARCH=TRUE "
            ## \todo a standardized way to check if a package is installed in the image dir would be good.
            self.subinfo.options.configure.defines += "-DAUTOMOC4_CONFIG_FILE:FILEPATH=%s " \
                % automoc.replace('\\', '/')
Beispiel #16
0
    def __init__( self ):
        self.subinfo = subinfo()
        # required for package generating because we build from svnHEAD by default
        self.subinfo.options.package.version = '0.5.4'
        self.subinfo.options.configure.defines = '-DBUILD_BASE_LIB_WITH_QT=ON -DBUILD_QT_LIB=ON '
        if not emergePlatform.isCrossCompilingEnabled() or self.isHostBuild():
            self.subinfo.options.configure.defines += ' -DBUILD_TOOLS=ON '
        if compiler.isMinGW_W32():
          self.subinfo.options.configure.defines += ' -DMINGW_W32=ON '
        CMakePackageBase.__init__( self )

        qmake = os.path.join(self.mergeDestinationDir(), "bin", "qmake.exe")
        if not os.path.exists(qmake):
            utils.warning("could not find qmake in <%s>" % qmake)
        ## \todo a standardized way to check if a package is installed in the image dir would be good.
        self.subinfo.options.configure.defines += " -DQT_QMAKE_EXECUTABLE:FILEPATH=%s " \
            % qmake.replace('\\', '/')
    def unpack( self ):
        if not CMakePackageBase.unpack( self ):
            return True

        if not emergePlatform.isCrossCompilingEnabled():
            # we have an own cmake script - copy it to the right place
            cmake_script = ""
            if self.buildTarget == '0.9.16a':
                cmake_script = os.path.join( self.packageDir() , "CMakeLists-0.9.16.txt" )
            else:
                cmake_script = os.path.join( self.packageDir() , "CMakeLists-0.9.20.txt" )
            cmake_dest = os.path.join( self.sourceDir(), "CMakeLists.txt" )
            utils.copyFile( cmake_script, cmake_dest )
            cmake_script = os.path.join( self.packageDir() , "clucene-config.h.cmake" )
            cmake_dest = os.path.join( self.sourceDir(), "Clucene", "clucene-config.h.cmake" )
            utils.copyFile( cmake_script, cmake_dest )

        return True
    def setTargets( self ):
        for ver in [ '0.9.8k' , '0.9.8m' ,'1.0.0', '1.0.0a', '1.0.0b', '1.0.0c' ]:
            self.targets[ ver ] = 'http://www.openssl.org/source/openssl-' + ver + '.tar.gz'
            self.targetInstSrc[ ver ] = 'openssl-' + ver
            if ver != '1.0.0a':
              self.patchToApply[ ver ] = ('openssl-'+ver+'.diff', 1)
            self.targetDigestUrls[ ver ] = 'http://www.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"
        if emergePlatform.isCrossCompilingEnabled():
            self.defaultTarget = '1.0.0'
        else:
            self.defaultTarget = '1.0.0b'

        if compiler.isMinGW() and emergePlatform.buildArchitecture() == "x64":
            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)
Beispiel #19
0
    def setDependencies( self ):
        self.dependencies['win32libs-bin/aspell']  = 'default'
#        self.dependencies['win32libs-bin/enchant']  = 'default'
        self.dependencies['win32libs-bin/gettext']  = 'default'
        self.dependencies['win32libs-bin/giflib']  = 'default'
#        self.dependencies['win32libs-bin/gssapi']  = 'default'
#        self.dependencies['win32libs-bin/hspell']  = 'default'
        if not emergePlatform.isCrossCompilingEnabled():
            self.dependencies['win32libs-bin/jasper']  = 'default'
        self.dependencies['win32libs-bin/jpeg']  = 'default'
        self.dependencies['win32libs-bin/libbzip2']  = 'default'
        self.dependencies['win32libs-bin/libpng']  = 'default'
        self.dependencies['win32libs-bin/libxml2']  = 'default'
        self.dependencies['win32libs-bin/libxslt']  = 'default'
#        self.dependencies['win32libs-bin/openexr']  = 'default'
        self.dependencies['win32libs-bin/openssl']  = 'default'
        self.dependencies['win32libs-bin/pcre']  = 'default'
        self.dependencies['win32libs-bin/shared-mime-info']  = 'default'
        self.dependencies['win32libs-bin/zlib']  = 'default'
Beispiel #20
0
    def __readDependenciesForChildren(self, deps):
        children = []
        if deps:
            for line in deps:
                (category, package) = line.split("/")
                if emergePlatform.isCrossCompilingEnabled() or utils.isSourceOnly():
                    sp = PortageInstance.getCorrespondingSourcePackage(package)
                    if sp:
                        # we found such a package and we're allowed to replace it
                        category = sp[0]
                        package = sp[1]
                        line = "%s/%s" % (category, package)

                utils.debug("category: %s, name: %s" % (category, package), 1)
                version = PortageInstance.getNewestVersion(category, package)
                if not line in packageDict.keys():
                    p = DependencyPackage(category, package, version)
                    utils.debug("adding package p %s/%s-%s" % (category, package, version), 1)
                    packageDict[line] = p
                else:
                    p = packageDict[line]
                children.append(p)
        return children
Beispiel #21
0
 def __init__( self, **args ):
     self.subinfo = subinfo()
     PackageBase.__init__(self)
     if not self.subinfo.options.useShortPathes \
             and self.compiler() == "mingw4" and len(self.rootdir) > 10:
         # mingw4 cannot compile qt if the command line arguments
         # exceed 8192 chars
         utils.warning('for mingw4, rootdir %s is too long for full path names.'
             ' Using short path names.' % self.rootdir,  1)
         self.subinfo.options.useShortPathes = True
     GitSource.__init__(self)
     QMakeBuildSystem.__init__(self)
     KDEWinPackager.__init__(self)
     # get instance of dbus and openssl package
     self.openssl = portage.getPackageInstance('win32libs-bin', 'openssl')
     if self.buildType() == "Debug":
         self.dbus = portage.getPackageInstance('win32libs-sources', 'dbus-src')
     else:
         self.dbus = portage.getPackageInstance('win32libs-bin', 'dbus')
     if not emergePlatform.isCrossCompilingEnabled():
         self.mysql_server = portage.getPackageInstance('testing', 'mysql-pkg')
     else:
         self.wcecompat = portage.getPackageInstance('win32libs-sources', 'wcecompat-src')
Beispiel #22
0
def solveDependencies(category, package, version, depList, dep_type="both"):
    depList.reverse()
    if emergePlatform.isCrossCompilingEnabled() or utils.isSourceOnly():
        sp = PortageInstance.getCorrespondingSourcePackage(package)
        if sp:
            # we found such a package and we're allowed to replace it
            category = sp[0]
            package = sp[1]
            version = PortageInstance.getNewestVersion(category, package)
            utils.debug("found corresponding source package for %s" % package, 1)

    if category == "":
        category = PortageInstance.getCategory(package)
        utils.debug("found package in category %s" % category, 2)
    if version == "":
        version = PortageInstance.getNewestVersion(category, package)
        utils.debug("found package with newest version %s" % version, 2)

    pac = DependencyPackage(category, package, version)
    depList = pac.getDependencies(depList, dep_type=dep_type)

    depList.reverse()
    return depList
    def setTargets( self ):
        self.targets['2.4.8'] = 'http://www.cmake.org/files/v2.4/cmake-2.4.8-win32-x86.zip'
        self.targets['2.6.4'] = 'http://www.cmake.org/files/v2.6/cmake-2.6.4-win32-x86.zip'
        self.targets['2.8.4'] = 'http://www.cmake.org/files/v2.8/cmake-2.8.4-win32-x86.zip'
        self.targets['v2.8.2'] = 'http://downloads.sourceforge.net/kde-windows/cmake-vc90-v2.8.2-bin.tar.bz2'
        self.targets['2.8.0-ce'] = 'http://downloads.sourceforge.net/kde-windows/cmake-vc90-2.8.0-6-bin.tar.bz2'
        self.targets['2.8.1-ce'] = 'http://downloads.sourceforge.net/kde-windows/cmake-vc90-2.8.1-bin.tar.bz2'
        self.targets['2.8.3-1'] = 'http://downloads.sourceforge.net/kde-windows/cmake-vc90-2.8.3-1-bin.tar.bz2'
        self.targets['2.8.3-2'] = 'http://downloads.sourceforge.net/kde-windows/cmake-vc90-2.8.3-2-bin.tar.bz2'
        self.targetMergeSourcePath['2.4.8'] = 'cmake-2.4.8-win32-x86'
        self.targetMergeSourcePath['2.6.4'] = 'cmake-2.6.4-win32-x86'
        self.targetMergeSourcePath['2.8.4'] = 'cmake-2.8.4-win32-x86'
        self.targetDigests['v2.8.2'] = 'de516a570808c7a022139b55e758d5f7b378ec7d'
        self.targetDigests['2.8.3-2'] = 'cba746303abb825c8549e6621da35757c039fa9e'
        self.targetDigests['2.8.4'] = '539ce250521d964a8770e0a7362db196dbc97fbc'
        self.patchToApply['v2.8.2'] = ( 'findtiff.diff', 0 )

        if emergePlatform.isCrossCompilingEnabled():
            self.defaultTarget = '2.8.0-ce'
        else:
            # 2.8.4 is broken when using short paths and
            # windres fails even in old projects like zlib
            self.defaultTarget = '2.8.3-2'
    def setTargets( self ):
        svnurl = "https://windbus.svn.sourceforge.net/svnroot/windbus/"
        self.svnTargets['1.2.4'] = svnurl + 'tags/1.2.4'
        self.targetInstSrc['1.2.4'] = 'tags/1.2.4'
        self.targetConfigurePath['1.2.4'] = 'cmake'

        self.svnTargets['svnHEAD'] = svnurl + 'trunk'
        self.targetConfigurePath['svnHEAD'] = 'cmake'

        # dbus-1.3.1.tar.gz is missing the cmake sub dir and because
        # emerge is not able yet to apply more than one patch we the
        # 1.3.1 snapshot took for now
        #self.targets['1.3.1'] = 'http://dbus.freedesktop.org/releases/dbus/dbus-1.3.1.tar.gz'
        #self.targetDigests['1.3.1'] = '83c27e15ba79d4a84a10b123ff382233cc77773b'
        self.targets['1.3.1'] = 'http://cgit.freedesktop.org/dbus/dbus/snapshot/dbus-1.3.1.tar.bz2'
        self.targetDigests['1.3.1'] = 'e8fa74ad6f2294bdf7d22aed25896d8943287c32'
        self.targetInstSrc['1.3.1'] = 'dbus-1.3.1'
        self.targetConfigurePath['1.3.1'] = 'cmake'

        self.targets['1.4.0'] = 'http://cgit.freedesktop.org/dbus/dbus/snapshot/dbus-1.4.0.tar.bz2'
        self.targetDigests['1.4.0'] = '3983d9a1456e5772fa4cb5e2818ed015b2f6131b'
        self.targetInstSrc['1.4.0'] = 'dbus-1.4.0'
        self.targetConfigurePath['1.4.0'] = 'cmake'

        self.targets['1.4.1'] = 'http://dbus.freedesktop.org/releases/dbus/dbus-1.4.1.tar.gz'
        self.targetDigests['1.4.1'] = '112279ff58305027294fe0eb5bee600f68cf0b50'
        self.targetInstSrc['1.4.1'] = 'dbus-1.4.1'
        self.targetConfigurePath['1.4.1'] = 'cmake'

        for ver in ['1.4.6', '1.4.8', '1.4.10', '1.4.12', '1.4.14']:
            self.svnTargets[ver] = 'git://anongit.freedesktop.org/git/dbus/dbus||dbus-' + ver
            self.targetSrcSuffix[ver] = 'git'
            self.targetConfigurePath[ver] = 'cmake'

        self.svnTargets['gitHEAD'] = 'git://anongit.freedesktop.org/git/dbus/dbus'
        self.targetSrcSuffix['gitHEAD'] = 'git'
        self.targetConfigurePath['gitHEAD'] = 'cmake'


        if emergePlatform.isCrossCompilingEnabled():
            self.patchToApply['1.4.0'] = [('dbus-1.4.0.diff', 1),
                                          ('0001-tentative-workaround-for-the-random-hangs-on-windows.patch', 1),
                                          ('no-auth.diff', 1),
                                          ('msvc2010-has-errnoh.diff', 1),
                                          ('live-lock-fix.diff', 1),
                                          ('wince-splashscreen.diff', 1)
                                          ]
            self.patchToApply['1.4.1'] = [('no-auth.diff', 1),
                                          ('msvc2010-has-errnoh.diff', 1),
                                          ]
        else:
            self.patchToApply['1.4.0'] = [('dbus-1.4.0.diff', 1),
                                          ('0001-tentative-workaround-for-the-random-hangs-on-windows.patch', 1),
                                          ('msvc2010-has-errnoh.diff', 1),
                                          ('live-lock-fix.diff', 1)
                                          ]
            self.patchToApply['1.4.1'] = [('msvc2010-has-errnoh.diff', 1),
                                          ('live-lock-fix.diff', 1),
                                          ('replace_path_with_current_installdir.diff', 1)
                                         ]
            self.patchToApply['1.4.6'] = [('live-lock-fix.diff', 1),
                                          ('0001-Do-not-use-ELEMENT_TYPE-which-is-reserved.patch', 1)
                                         ]
            self.patchToApply['1.4.10'] = [('workaround-for-inline-keyword-in-msvc10.patch', 1)
                                         ]

        self.shortDescription = "Freedesktop message bus system (daemon and clients)"
        if emergePlatform.isCrossCompilingEnabled():
            self.defaultTarget = '1.4.0'
        else:
            self.defaultTarget = '1.4.6'
 def isTargetBuild(self):
     if not emergePlatform.isCrossCompilingEnabled():
         return False
     else:
         return os.getenv( "EMERGE_BUILD_STEP" ) == "target"
def handlePackage( category, package, version, buildAction, opts ):
    utils.debug( "emerge handlePackage called: %s %s %s %s" % (category, package, version, buildAction), 2 )
    success = True

    if continueFlag:
        actionList = ['fetch', 'unpack', 'configure', 'make', 'cleanimage', 'install', 'manifest', 'qmerge']
        
        found = None
        for action in actionList: 
            if not found and action != buildAction:
                continue
            found = True
            success = success and doExec( category, package, version, action, opts )
    elif ( buildAction == "all" or buildAction == "full-package" ):
        os.putenv( "EMERGE_BUILD_STEP", "" )
        success = doExec( category, package, version, "fetch", opts )
        success = success and doExec( category, package, version, "unpack", opts )
        if emergePlatform.isCrossCompilingEnabled():
            if not disableHostBuild:
                os.putenv( "EMERGE_BUILD_STEP", "host" )
                success = success and doExec( category, package, version, "compile", opts )
                success = success and doExec( category, package, version, "cleanimage", opts )
                success = success and doExec( category, package, version, "install", opts )
                if ( buildAction == "all" ):
                    success = success and doExec( category, package, version, "manifest", opts )
                if ( buildAction == "all" ):
                    success = success and doExec( category, package, version, "qmerge", opts )
                if( buildAction == "full-package" ):
                    success = success and doExec( category, package, version, "package", opts )
            if disableTargetBuild:
                return success
            os.putenv( "EMERGE_BUILD_STEP", "target" )

        success = success and doExec( category, package, version, "compile", opts )
        success = success and doExec( category, package, version, "cleanimage", opts )
        success = success and doExec( category, package, version, "install", opts )
        if ( buildAction == "all" ):
            success = success and doExec( category, package, version, "manifest", opts )
        if ( buildAction == "all" ):
            success = success and doExec( category, package, version, "qmerge", opts )
        if( buildAction == "full-package" ):
            success = success and doExec( category, package, version, "package", opts )

    elif ( buildAction in [ "fetch", "unpack", "preconfigure", "configure", "compile", "make", "qmerge", "checkdigest", "dumpdeps",
                            "package", "manifest", "unmerge", "test", "cleanimage", "cleanbuild", "createpatch", "geturls",
                            "printrev"] and category and package and version ):
        os.putenv( "EMERGE_BUILD_STEP", "" )
        success = True
        if emergePlatform.isCrossCompilingEnabled():
            if not disableHostBuild:
                os.putenv( "EMERGE_BUILD_STEP", "host" )
                success = doExec( category, package, version, buildAction, opts )
            if disableTargetBuild:
                return success
            os.putenv( "EMERGE_BUILD_STEP", "target" )
        success = success and doExec( category, package, version, buildAction, opts )
    elif ( buildAction == "install" ):
        os.putenv( "EMERGE_BUILD_STEP", "" )
        success = True
        if emergePlatform.isCrossCompilingEnabled():
            if not disableHostBuild:
                os.putenv( "EMERGE_BUILD_STEP", "host" )
                success = doExec( category, package, version, "cleanimage", opts )
                success = success and doExec( category, package, version, "install", opts )
            if disableTargetBuild:
                return success
            os.putenv( "EMERGE_BUILD_STEP", "target" )
        success = success and doExec( category, package, version, "cleanimage", opts )
        success = success and doExec( category, package, version, "install", opts )
    elif ( buildAction == "version-dir" ):
        print "%s-%s" % ( package, version )
        success = True
    elif ( buildAction == "version-package" ):
        print "%s-%s-%s" % ( package, os.getenv( "KDECOMPILER" ), version )
        success = True
    elif ( buildAction == "print-installable" ):
        portage.printInstallables()
        success = True
    elif ( buildAction == "print-installed" ):
        if isDBEnabled():
            printInstalled()
        else:
            portage.printInstalled()
        success = True
    elif ( buildAction == "print-targets" ):
        portage.printTargets( category, package, version )
        success = True
    elif ( buildAction == "install-deps" ):
        success = True
    else:
        success = utils.error( "could not understand this buildAction: %s" % buildAction )

    return success
    if not handlePackage( mainCategory, mainPackage, mainVersion, mainBuildAction, mainOpts ):
        exit(1)

else:
    for mainCategory, mainPackage, mainVersion, defaultTarget, ignoreInstalled in deplist:
        target = ""
        targetList = []
        isLastPackage = [mainCategory, mainPackage, mainVersion, defaultTarget, ignoreInstalled] == deplist[-1]
        if outDateVCS or (outDatePackage and isLastPackage):
            target = os.getenv( "EMERGE_TARGET" )
            if not target or target not in portage.PortageInstance.getAllTargets( mainCategory, mainPackage, mainVersion ).keys():
                # if no target or a wrong one is defined, simply set the default target here
                target = defaultTarget
            targetList = portage.PortageInstance.getUpdatableVCSTargets( mainCategory, mainPackage, mainVersion )
        if isDBEnabled():
            if emergePlatform.isCrossCompilingEnabled():
                hostEnabled = portage.isHostBuildEnabled( mainCategory, mainPackage, mainVersion )
                targetEnabled = portage.isTargetBuildEnabled( mainCategory, mainPackage, mainVersion )
                hostInstalled = installdb.isInstalled( mainCategory, mainPackage, mainVersion, "" )
                targetInstalled = installdb.isInstalled( mainCategory, mainPackage, mainVersion, os.getenv( "EMERGE_TARGET_PLATFORM" ) )
                isInstalled = ( not hostEnabled or hostInstalled ) and ( not targetEnabled or targetInstalled )
            else:
                isInstalled = installdb.isInstalled( mainCategory, mainPackage, mainVersion, "" )
        else:
            isInstalled = portage.isInstalled( mainCategory, mainPackage, mainVersion, buildType )
        if ( isInstalled and not ignoreInstalled ) and not (
                        isInstalled and (outDateVCS  or (outDatePackage and isLastPackage) ) and target in targetList ):
            if utils.verbose() > 1 and mainPackage == packageName:
                utils.warning( "already installed %s/%s-%s" % ( mainCategory, mainPackage, mainVersion ) )
            elif utils.verbose() > 2 and not mainPackage == packageName:
                utils.warning( "already installed %s/%s-%s" % ( mainCategory, mainPackage, mainVersion ) )
Beispiel #28
0
    def setTargets( self ):
        # the static version uses one of the stable versions
        self.svnTargets['static'] = "[git]kde:qt-kde|4.5.2-patched|"
        # this is the upcoming 4.7 version with the KDE patches.
        self.svnTargets['master'] = "[git]kde:qt-kde"
        # this version contains the patches against the 4.5.3 release and is recommended for KDE 4.3.X
        self.svnTargets['4.5.3'] = "[git]kde:qt-kde|4.5.3-patched|"
        # this branch contains all the patches and follows the 4.6-stable branch on qt.git - it updates daily
        self.svnTargets['4.6'] = "[git]kde:qt-kde|4.6-stable-patched|"
        # those are the stable releases with the KDE patches applied on top
        self.svnTargets['4.6.0'] = "[git]kde:qt-kde|4.6.0-patched|"
        self.svnTargets['4.6.1'] = "[git]kde:qt-kde|4.6.1-patched|"
        self.svnTargets['4.6.2'] = "[git]kde:qt-kde|4.6.2-patched|"
        self.svnTargets['4.6.3'] = "[git]kde:qt-kde|4.6.3-patched|"
        self.svnTargets['4.7.0'] = "[git]kde:qt-kde|4.7.0-patched|"
        self.svnTargets['4.7.1'] = "[git]kde:qt-kde|4.7.1-patched|"
        self.svnTargets['4.7'] = "git://gitorious.org/qt/qt.git|4.7|"
        self.svnTargets['wince'] = "git://gitorious.org/qt/qt.git|4.7|235d1d687dcc2d21860cd753c9d67964c5270be2"
        self.svnTargets['wince-4.7'] = self.svnTargets["4.7"]
        self.targetSrcSuffix['wince'] = "4.7"
        self.targetSrcSuffix['wince-4.7'] = "4.7"
        self.targetSrcSuffix['4.7'] = "4.7"
        self.patchToApply['4.6.3'] = ('patches/4.6.3/fixed_export_macro_for_QtDbus.patch', 1)
        self.patchToApply['4.7'] = [
            ('patches/4.7/out-of-source-build.patch', 1),
            ('patches/4.7/webkit-fixes.patch', 1) ]
        self.patchToApply['4.7.1'] = [('patches/4.7.1/buildfix-for-mingw64.patch', 1)]

        self.shortDescription = "a cross-platform application framework"
        # If you change the default target here please do not forget to rename the portage file
        self.defaultTarget = '4.7.1'

        ## \todo this is prelimary  and may be changed
        self.options.package.packageName = 'qt'
        self.options.package.specialMode = True

        # WinCE specific part
        winceVersionIndependentPatches = self.patchToApply['4.7'] + [
            ('patches/4.7/custom-flags-for-wince.patch', 1),
            ('patches/4.7/fix-build-uitools-for-wince.patch', 1),
            ('patches/4.7/exchange-malloc-against-dlmalloc-for-wince.patch', 1),
            ('patches/4.7/fix-endless-loop-in-qProcess-for-wince.patch', 1),
            ('patches/4.7/Replace-malloc-in-qimage.patch', 1),
            ('patches/4.7/Enable-Softkeyboard-wince.patch', 1),
            ('patches/4.7/comboboxes-wrong-direction_wince.patch', 1),
            ('patches/4.7/Add-gpgLogging.patch', 1),
            ('patches/4.7/allow-more-then-one-instance-of-a-wince-application.patch', 1),
            ('patches/4.7/Add-qCalloc-to-qmalloc.patch', 1),
            ('patches/4.7/Use-dlmalloc-in-QScript4.dll.patch', 1),
            ('patches/4.7/Use-dlmalloc-for-javascript-garbage-collector.patch', 1),
            ('patches/4.7/Use-dlmalloc-in-qpaintengine.patch', 1),
            ('patches/4.7/Use-qCalloc-instead-of-qt_wince_calloc-impl.patch', 1),
            ('patches/4.7/Use-qRealloc-instead-of-realloc-in-qimage.patch', 1),
            ('patches/4.7/fix-calloc.patch', 1)]
        self.patchToApply['wince']     =  winceVersionIndependentPatches + [
            ('patches/4.7/fix-qml-alignment.patch', 1), # Upstream in 4.7
            ('patches/4.7/Override-new-in-qt-dlls-to-use-dlmalloc.patch', 1),
            ('patches/4.7/Replace-qeventdispatcher.patch', 1),
            ('patches/4.7/fix-build-with-QT_NO_SVG.patch', 1),
            ('patches/4.7/fix-QSortFilterProxyModel.patch', 1),
            ('patches/4.7/Repaint-when-text-color-changes.patch', 1),
            ('patches/4.7/fix-map-to-global-calculations.patch', 1),
            ('patches/4.7/fix-widget-creation.patch', 1)]
        self.patchToApply['wince-4.7'] =  winceVersionIndependentPatches + [
            ('patches/4.7/Override-new-in-qt-dlls-for-4-7-branch.patch', 1),
            ('patches/4.7/Replace-qeventdispatcher-and-add-wcecompat-dep-for-4-7-branch.patch', 1),
            ('patches/4.7/fix-build-with-QT_NO_SVG-for-4-7-branch.patch', 1)]

        if emergePlatform.isCrossCompilingEnabled():
            self.defaultTarget = 'wince'
 def isHostBuild(self):
     if not emergePlatform.isCrossCompilingEnabled():
         return True
     else:
         return os.getenv( "EMERGE_BUILD_STEP" ) == "host"
 def setDependencies( self ):
     self.buildDependencies['virtual/base'] = 'default'
     if emergePlatform.isCrossCompilingEnabled():
         self.dependencies['libs/qt'] = 'default'