From c55c86d0043435e7c1caabc09cef48e8999ab534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Thu, 29 Jun 2006 23:56:25 +0000 Subject: [PATCH] =?UTF-8?q?=C4=B0=C4=9Fren=C3=A7lik=20geri=20geldi,=20libt?= =?UTF-8?q?ool'u=20yan=C4=B1nda=20ta=C5=9F=C4=B1yan=20paketler=20var=20ne?= =?UTF-8?q?=20yaz=C4=B1k=20ki=20:(?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/util.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pisi/util.py b/pisi/util.py index ff09c9a4..462781bc 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -521,6 +521,17 @@ def strip_directory(top, excludelist=[]): drpath = join_path(os.path.dirname(top), ctx.const.debug_dir_suffix, remove_prefix(top, frpath)) + + # Some upstream sources have buggy libtool and ltmain.sh with them, + # which causes wrong path entries in *.la files. And these wrong path + # entries sometimes triggers compile-time errors or linkage problems. + # Instead of patching all these buggy sources and maintain these patches, + # PISI removes wrong paths... + extension = os.path.splitext(frpath)[1] + if extension == ".la": + # FIXME: I'm regular expr. idiot, so one can convert this to python... + os.system("sed -i -e 's~-L/var/tmp/pisi/[[:graph:]]*~~g' %s" % frpath) + os.system("sed -i -e 's~/var/tmp/pisi/[[:graph:]]*/install/~/~g' %s" % frpath) # real path in .pisi package p = '/' + removepathprefix(top, frpath)