summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2013-05-08 01:27:31 +0200
committerAndoni Morales Alastruey <ylatuya@gmail.com>2013-05-08 01:27:31 +0200
commita5f85bec1589a797133418c61767ffc5ef02d0e6 (patch)
tree29a0a95f768c79bbc7a14725d6e4c83826ed45df
parente1aad58dca0f32294b63971ce7d71d8cc57fa118 (diff)
winpthreads-runtime: add a recipe for the winpthreads dll
-rw-r--r--packages/base-system-1.0.package2
-rw-r--r--packages/base-system.package2
-rw-r--r--recipes/mingw.recipe10
-rw-r--r--recipes/winpthreads-runtime.recipe24
4 files changed, 28 insertions, 10 deletions
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'))