pythonize.

.la dosyası içeren çeşitli paketleri derledim ama bunu deneyecek paket
bulamadım. Bilen varsa bir denesin.

Elle hatalı .la dosyası verince düzeltiyor en azından.
This commit is contained in:
Gürer Özen
2006-12-07 16:39:35 +00:00
parent b106a81db9
commit eee3145059
+6 -5
View File
@@ -518,11 +518,12 @@ def strip_directory(top, excludelist=[]):
# 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%s/[[:graph:]]*~~g' %s" % (ctx.config.tmp_dir(), frpath))
os.system("sed -i -e 's~%s/[[:graph:]]*/install/~/~g' %s" % (ctx.config.tmp_dir(), frpath))
if frpath.endswith(".la"):
ladata = file(frpath).read()
new_ladata = re.sub("-L%s/\S*" % ctx.config.tmp_dir(), "", ladata)
new_ladata = re.sub("%s/\S*/install/" % ctx.config.tmp_dir(), "/", new_ladata)
if new_ladata != ladata:
file(frpath, "w").write(new_ladata)
# real path in .pisi package
p = '/' + removepathprefix(top, frpath)
strip = True