From a797539112b1c4351d223dda293e6734e63495ee Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Tue, 11 Feb 2014 18:05:29 +0100 Subject: 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 --- recipes/gmp.recipe | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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'}) -- cgit v1.2.3