# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python class Recipe(recipe.Recipe): name = 'mingw' version = '0.1' licenses = [License.LGPL] btype = BuildType.CUSTOM stype = SourceType.CUSTOM files_libs = ['libgcc_s_sjlj-1', 'libstdc++-6'] def install(self): import shutil from cerbero.errors import FatalError if self.config.target_platform != Platform.WINDOWS: raise FatalError("%s can only be installed on Windows" % self.name) for f in self.files_libs: if self.config.platform == Platform.WINDOWS: # the native compiler install dll's in 'bin' and # not in the cross prefix mingw = 'bin' else: mingw = os.path.join(self.config.host, 'lib') shutil.copy(os.path.join(self.config.toolchain_prefix, mingw, f + '.dll'), os.path.join(self.config.prefix, 'bin', f + '.dll'))