summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2014-02-11 18:05:29 +0100
committerAndoni Morales Alastruey <ylatuya@gmail.com>2014-02-11 18:05:29 +0100
commit09b23bbdfb4f4f57923fed2cd908853469d40e79 (patch)
treee89cb367da07add709701a514ac437fbe6a6262f /recipes
parent69c83da9b0bae3217909301ff2302cd7423885ee (diff)
libgmp: fix windows libary names
gmp is using an old version of libtool generating .lib import libraries instead of dll.a and installing dll's in lib instead of bin. Autoreconf'ing gmp seems a bit complicated because of AM_C_PROTOTYPES, so let's fix it in post_install
Diffstat (limited to 'recipes')
-rw-r--r--recipes/gmp.recipe13
1 files changed, 13 insertions, 0 deletions
diff --git a/recipes/gmp.recipe b/recipes/gmp.recipe
index 475ee6d5..2bbab712 100644
--- a/recipes/gmp.recipe
+++ b/recipes/gmp.recipe
@@ -1,4 +1,5 @@
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
+import shutil
class Recipe(recipe.Recipe):
@@ -12,3 +13,15 @@ class Recipe(recipe.Recipe):
def prepare(self):
if self.config.target_platform == Platform.WINDOWS:
self.configure_options = ' --enable-shared --disable-static'
+
+ def post_install(self):
+ if self.config.target_platform == Platform.WINDOWS:
+ src = os.path.join(self.config.prefix, 'lib', 'libgmp-10.dll')
+ dll = os.path.join(self.config.prefix, 'bin', 'libgmp-10.dll')
+ dll_a = os.path.join(self.config.prefix, 'lib', 'libgmp.dll.a')
+ if os.path.exists(dll_a):
+ os.remove(dll_a)
+ shutil.copy(src, dll)
+ shutil.copy(src, dll_a)
+ gmp_la = os.path.join(self.config.prefix, 'lib', 'libgmp.la')
+ shell.replace(gmp_la, {'libgmp.lib': 'libgmp.dll.a'})