diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2014-02-11 18:05:29 +0100 |
---|---|---|
committer | Andoni Morales Alastruey <ylatuya@gmail.com> | 2014-02-22 11:05:27 +0100 |
commit | a797539112b1c4351d223dda293e6734e63495ee (patch) | |
tree | 6cb678ffd1303f7d8a53399529a074ca83ac666d | |
parent | 2b906b63bbd197275f2ac90cedec32e7e313e302 (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
-rw-r--r-- | recipes/gmp.recipe | 13 |
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'}) |