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): package = getPackage(makeName) downloadPackage(package, tarballsDir) verifyPackage(package, tarballsDir) extractPackage(package, tarballsDir, sourcesDir, patchesDir)
def fetchPackageSource(makeName, tarballsDir, sourcesDir, patchesDir): package = getPackage(makeName) downloadPackage(package, tarballsDir) verifyPackage(package, tarballsDir) extractPackage(package, tarballsDir, sourcesDir, patchesDir)
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 ''
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 ''