From a5f85bec1589a797133418c61767ffc5ef02d0e6 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Wed, 8 May 2013 01:27:31 +0200 Subject: winpthreads-runtime: add a recipe for the winpthreads dll --- packages/base-system-1.0.package | 2 +- packages/base-system.package | 2 +- recipes/mingw.recipe | 10 ++-------- recipes/winpthreads-runtime.recipe | 24 ++++++++++++++++++++++++ 4 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 recipes/winpthreads-runtime.recipe diff --git a/packages/base-system-1.0.package b/packages/base-system-1.0.package index c698baa..cb50e76 100644 --- a/packages/base-system-1.0.package +++ b/packages/base-system-1.0.package @@ -24,7 +24,7 @@ class Package(package.Package): platform_files = { Platform.WINDOWS: ['gettext:libs:lang', 'libiconv:libs:lang', - 'winpthreads', 'mingw', 'libstdc++'], + 'winpthreads-runtime', 'mingw', 'libstdc++'], Platform.DARWIN: ['gettext:libs:lang', 'libiconv:libs:lang'], Platform.LINUX: [], Platform.ANDROID: ['gettext:libs:lang', 'libiconv:libs:lang', 'gnustl'], diff --git a/packages/base-system.package b/packages/base-system.package index f425280..dd32d93 100644 --- a/packages/base-system.package +++ b/packages/base-system.package @@ -24,7 +24,7 @@ class Package(package.Package): platform_files = { Platform.WINDOWS: ['gettext:libs:lang', 'libiconv:libs:lang', - 'winpthreads', 'mingw', 'libcroco:libs', 'librsvg:libs:loader', + 'winpthreads-runtime', 'mingw', 'libcroco:libs', 'librsvg:libs:loader', 'libstdc++'], Platform.DARWIN: ['gettext:libs:lang', 'libiconv:libs:lang', 'libcroco:libs', 'librsvg:libs:loader'], diff --git a/recipes/mingw.recipe b/recipes/mingw.recipe index f30dc9d..431a23c 100644 --- a/recipes/mingw.recipe +++ b/recipes/mingw.recipe @@ -10,7 +10,7 @@ class Recipe(recipe.Recipe): btype = BuildType.CUSTOM stype = SourceType.CUSTOM - files_libs = ['libwinpthread', 'libgcc_s_sjlj'] + files_libs = ['libgcc_s_sjlj'] files_satic = [] files_headers = ['include/GL'] @@ -35,16 +35,10 @@ class Recipe(recipe.Recipe): raise FatalError("%s can only be installed on Windows" % self.name) if self.config.platform == Platform.WINDOWS: - binmingw = 'bin' libmingw = 'lib' else: - binmingw = os.path.join(self.config.host, 'lib') - libmngw = binmingw + libmingw = os.path.join(self.config.host, 'lib') # copy some dll's required at runtime - for f in ['libwinpthread-1']: - shutil.copy( - os.path.join(self.config.toolchain_prefix, binmingw, f + '.dll'), - os.path.join(self.config.prefix, 'bin', f + '.dll')) for f in ['libgcc_s_sjlj-1']: shutil.copy( os.path.join(self.config.toolchain_prefix, libmingw, f + '.dll'), diff --git a/recipes/winpthreads-runtime.recipe b/recipes/winpthreads-runtime.recipe new file mode 100644 index 0000000..34e42ff --- /dev/null +++ b/recipes/winpthreads-runtime.recipe @@ -0,0 +1,24 @@ +# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python +import shutil +from cerbero.errors import FatalError + + +class Recipe(recipe.Recipe): + name = 'winpthreads-runtime' + version = '0.1' + licenses = [License.LGPL] + btype = BuildType.CUSTOM + stype = SourceType.CUSTOM + + files_libs = ['libwinpthread'] + + def install(self): + if self.config.platform == Platform.WINDOWS: + binmingw = 'bin' + else: + binmingw = os.path.join(self.config.host, 'lib') + # copy the dll's required at runtime + for f in ['libwinpthread-1']: + shutil.copy( + os.path.join(self.config.toolchain_prefix, binmingw, f + '.dll'), + os.path.join(self.config.prefix, 'bin', f + '.dll')) -- cgit v1.2.3