Ejemplo n.º 1
0
def main(platform, linkMode):
    configuration = getConfiguration(linkMode)
    components = configuration.iterDesiredComponents()

    # Compute the set of all directly and indirectly required libraries,
    # then filter out system libraries.
    thirdPartyLibs = set(
        makeName
        for makeName in allDependencies(requiredLibrariesFor(components))
        if not librariesByName[makeName].isSystemLibrary(platform))

    print ' '.join(sorted(thirdPartyLibs))
Ejemplo n.º 2
0
def main(platform, tarballsDir, sourcesDir, patchesDir):
    configuration = getConfiguration('3RD_STA')
    components = configuration.iterDesiredComponents()

    # Compute the set of all directly and indirectly required libraries,
    # then filter out system libraries.
    thirdPartyLibs = set(
        makeName
        for makeName in allDependencies(requiredLibrariesFor(components))
        if not librariesByName[makeName].isSystemLibrary(platform))

    for makeName in sorted(thirdPartyLibs):
        fetchPackageSource(makeName, tarballsDir, sourcesDir, patchesDir)
Ejemplo n.º 3
0
def main(platform, linkMode):
	configuration = getConfiguration(linkMode)
	components = configuration.iterDesiredComponents()

	# Compute the set of all directly and indirectly required libraries,
	# then filter out system libraries.
	thirdPartyLibs = set(
		makeName
		for makeName in allDependencies(requiredLibrariesFor(components))
		if not librariesByName[makeName].isSystemLibrary(platform)
		)

	print ' '.join(sorted(thirdPartyLibs))
Ejemplo n.º 4
0
def main(platform, tarballsDir, sourcesDir, patchesDir):
    if platform == "android":
        fetchPackageSource("TCL_ANDROID", tarballsDir, sourcesDir, patchesDir)
    else:
        configuration = getConfiguration("3RD_STA")
        components = configuration.iterDesiredComponents()

        # Compute the set of all directly and indirectly required libraries,
        # then filter out system libraries.
        thirdPartyLibs = set(
            makeName
            for makeName in allDependencies(requiredLibrariesFor(components))
            if not librariesByName[makeName].isSystemLibrary(platform)
        )

    for makeName in sorted(thirdPartyLibs):
        fetchPackageSource(makeName, tarballsDir, sourcesDir, patchesDir)
Ejemplo n.º 5
0
    def __init__(self, log, logPath, compileCommandStr, outDir, platform,
                 distroRoot, configuration):
        '''Create empty log and result files.
		'''
        self.log = log
        self.logPath = logPath
        self.compileCommandStr = compileCommandStr
        self.outDir = outDir
        self.platform = platform
        self.distroRoot = distroRoot
        self.configuration = configuration
        self.outMakePath = outDir + '/probed_defs.mk'
        self.outHeaderPath = outDir + '/systemfuncs.hh'
        self.outVars = {}
        self.functionResults = {}
        self.typeTraitsResult = None
        self.libraries = sorted(
            requiredLibrariesFor(configuration.iterDesiredComponents()))
Ejemplo n.º 6
0
def iterComponentDefs(probeMakePath):
    probeVars = extractMakeVariables(probeMakePath)

    yield '# Automatically generated by build process.'
    yield ''

    yield 'LIBRARY_COMPILE_FLAGS:='
    yield 'LIBRARY_LINK_FLAGS:='
    for libName in requiredLibrariesFor(iterBuildableComponents(probeVars)):
        yield '# %s' % libName
        yield 'LIBRARY_COMPILE_FLAGS+=' + probeVars.get(
            libName + '_CFLAGS', '')
        yield 'LIBRARY_LINK_FLAGS+=' + probeVars.get(libName + '_LDFLAGS', '')
    yield ''

    for component in iterComponents():
        yield 'COMPONENT_%s:=%s' % (component.makeName,
                                    str(component.canBuild(probeVars)).lower())
Ejemplo n.º 7
0
def main(platform, linkMode):
    configuration = getConfiguration(linkMode)
    components = configuration.iterDesiredComponents()

    # Compute the set of all directly and indirectly required libraries,
    # then filter out system libraries.
    thirdPartyLibs = set(
        makeName
        for makeName in allDependencies(requiredLibrariesFor(components))
        if not librariesByName[makeName].isSystemLibrary(platform))

    # ALSA exists on Linux only.
    # While Android has the necessary kernel interfaces, the lib doesn't
    # support Android.
    if platform != 'linux':
        thirdPartyLibs.discard('ALSA')

    print(' '.join(sorted(thirdPartyLibs)))
Ejemplo n.º 8
0
def main(platform, tarballsDir, sourcesDir, patchesDir):
    configuration = getConfiguration('3RD_STA')
    components = configuration.iterDesiredComponents()

    # Compute the set of all directly and indirectly required libraries,
    # then filter out system libraries.
    thirdPartyLibs = set(
        makeName
        for makeName in allDependencies(requiredLibrariesFor(components))
        if not librariesByName[makeName].isSystemLibrary(platform))

    if platform == 'windows':
        # Avoid ALSA, since we won't be building it and extracting it will
        # fail on file systems that don't support symlinks.
        # TODO: 3rdparty.mk filters out ALSA on non-Linux platforms;
        #       figure out a way to do that in a single location.
        thirdPartyLibs.discard('ALSA')

    for makeName in sorted(thirdPartyLibs):
        fetchPackageSource(makeName, tarballsDir, sourcesDir, patchesDir)
Ejemplo n.º 9
0
	def __init__(
		self, log, logPath, compileCommandStr, outDir, platform, distroRoot,
		configuration
		):
		'''Create empty log and result files.
		'''
		self.log = log
		self.logPath = logPath
		self.compileCommandStr = compileCommandStr
		self.outDir = outDir
		self.platform = platform
		self.distroRoot = distroRoot
		self.configuration = configuration
		self.outMakePath = outDir + '/probed_defs.mk'
		self.outHeaderPath = outDir + '/systemfuncs.hh'
		self.outVars = {}
		self.functionResults = {}
		self.typeTraitsResult = None
		self.libraries = sorted(requiredLibrariesFor(
			configuration.iterDesiredComponents()
			))
Ejemplo n.º 10
0
def main(platform, tarballsDir, sourcesDir, patchesDir):
	if platform == 'android':
		fetchPackageSource('TCL_ANDROID', tarballsDir, sourcesDir, patchesDir)
	else:
		configuration = getConfiguration('3RD_STA')
		components = configuration.iterDesiredComponents()

		# Compute the set of all directly and indirectly required libraries,
		# then filter out system libraries.
		thirdPartyLibs = set(
			makeName
			for makeName in allDependencies(requiredLibrariesFor(components))
			if not librariesByName[makeName].isSystemLibrary(platform)
			)

		if platform == 'windows':
			# Avoid ALSA, since we won't be building it and extracting it will
			# fail on file systems that don't support symlinks.
			# TODO: 3rdparty.mk filters out ALSA on non-Linux platforms;
			#       figure out a way to do that in a single location.
			thirdPartyLibs.discard('ALSA')

	for makeName in sorted(thirdPartyLibs):
		fetchPackageSource(makeName, tarballsDir, sourcesDir, patchesDir)
Ejemplo n.º 11
0
def iterProbeResults(probeVars, configuration, logPath):
    '''Present probe results, so user can decide whether to start the build,
	or to change system configuration and rerun "configure".
	'''
    desiredComponents = set(configuration.iterDesiredComponents())
    requiredComponents = set(configuration.iterRequiredComponents())
    buildableComponents = set(configuration.iterBuildableComponents(probeVars))
    packages = sorted(
        (getPackage(makeName)
         for makeName in requiredLibrariesFor(desiredComponents)),
        key=lambda package: package.niceName.lower())
    customVars = extractMakeVariables('build/custom.mk')

    yield ''
    if not parseBool(probeVars['COMPILER']):
        yield 'No working C++ compiler was found.'
        yield "Please install a C++ compiler, such as GCC's g++."
        yield 'If you have a C++ compiler installed and openMSX did not ' \
         'detect it, please set the environment variable CXX to the name ' \
         'of your C++ compiler.'
        yield 'After you have corrected the situation, rerun "configure".'
        yield ''
    else:
        # Compute how wide the first column should be.
        def iterNiceNames():
            for package in packages:
                yield package.niceName
            for component in iterComponents():
                yield component.niceName

        maxLen = max(len(niceName) for niceName in iterNiceNames())
        formatStr = '  %-' + str(maxLen + 3) + 's %s'

        yield 'Found libraries:'
        for package in packages:
            makeName = package.getMakeName()
            if probeVars['HAVE_%s_LIB' % makeName]:
                found = 'version %s' % probeVars['VERSION_%s' % makeName]
            elif probeVars['HAVE_%s_H' % makeName]:
                # Dependency resolution of a typical distro will not allow
                # this situation. Most likely we got the link flags wrong.
                found = 'headers found, link test failed'
            else:
                found = 'no'
            yield formatStr % (package.niceName + ':', found)
        yield ''

        yield 'Components overview:'
        for component in iterComponents():
            if component in desiredComponents:
                status = 'yes' if component in buildableComponents else 'no'
            else:
                status = 'disabled'
            yield formatStr % (component.niceName + ':', status)
        yield ''

        yield 'Customisable options:'
        yield formatStr % ('Install to', customVars['INSTALL_BASE'])
        yield '  (you can edit these in build/custom.mk)'
        yield ''

        if buildableComponents == desiredComponents:
            yield 'All required and optional components can be built.'
        elif requiredComponents.issubset(buildableComponents):
            yield 'If you are satisfied with the probe results, ' \
             'run "make" to start the build.'
            yield 'Otherwise, install some libraries and headers ' \
             'and rerun "configure".'
        else:
            yield 'Please install missing libraries and headers ' \
             'and rerun "configure".'
        yield ''
        yield 'If the detected libraries differ from what you think ' \
         'is installed on this system, please check the log file: %s' \
         % logPath
        yield ''
Ejemplo n.º 12
0
def iterProbeResults(probeVars, configuration, logPath):
	'''Present probe results, so user can decide whether to start the build,
	or to change system configuration and rerun "configure".
	'''
	desiredComponents = set(configuration.iterDesiredComponents())
	requiredComponents = set(configuration.iterRequiredComponents())
	buildableComponents = set(configuration.iterBuildableComponents(probeVars))
	packages = sorted(
		(	getPackage(makeName)
			for makeName in requiredLibrariesFor(desiredComponents)
			),
		key = lambda package: package.niceName.lower()
		)
	customVars = extractMakeVariables('build/custom.mk')

	yield ''
	if not parseBool(probeVars['COMPILER']):
		yield 'No working C++ compiler was found.'
		yield "Please install a C++ compiler, such as GCC's g++."
		yield 'If you have a C++ compiler installed and openMSX did not ' \
			'detect it, please set the environment variable CXX to the name ' \
			'of your C++ compiler.'
		yield 'After you have corrected the situation, rerun "configure".'
		yield ''
	else:
		# Compute how wide the first column should be.
		def iterNiceNames():
			for package in packages:
				yield package.niceName
			for component in iterComponents():
				yield component.niceName
		maxLen = max(len(niceName) for niceName in iterNiceNames())
		formatStr = '  %-' + str(maxLen + 3) + 's %s'

		yield 'Found libraries:'
		for package in packages:
			makeName = package.getMakeName()
			if probeVars['HAVE_%s_LIB' % makeName]:
				found = 'version %s' % probeVars['VERSION_%s' % makeName]
			elif probeVars['HAVE_%s_H' % makeName]:
				# Dependency resolution of a typical distro will not allow
				# this situation. Most likely we got the link flags wrong.
				found = 'headers found, link test failed'
			else:
				found = 'no'
			yield formatStr % (package.niceName + ':', found)
		yield ''

		yield 'Components overview:'
		for component in iterComponents():
			if component in desiredComponents:
				status = 'yes' if component in buildableComponents else 'no'
			else:
				status = 'disabled'
			yield formatStr % (component.niceName + ':', status)
		yield ''

		yield 'Customisable options:'
		yield formatStr % ('Install to', customVars['INSTALL_BASE'])
		yield '  (you can edit these in build/custom.mk)'
		yield ''

		if buildableComponents == desiredComponents:
			yield 'All required and optional components can be built.'
		elif requiredComponents.issubset(buildableComponents):
			yield 'If you are satisfied with the probe results, ' \
				'run "make" to start the build.'
			yield 'Otherwise, install some libraries and headers ' \
				'and rerun "configure".'
		else:
			yield 'Please install missing libraries and headers ' \
				'and rerun "configure".'
		yield ''
		yield 'If the detected libraries differ from what you think ' \
			'is installed on this system, please check the log file: %s' \
			% logPath
		yield ''