[pkg-fgfs-crew] r134 - /simgear/trunk/debian/deps.py
ovek at users.alioth.debian.org
ovek at users.alioth.debian.org
Thu Jul 21 12:56:55 UTC 2011
Author: ovek
Date: Thu Jul 21 12:56:54 2011
New Revision: 134
URL: http://svn.debian.org/wsvn/pkg-fgfs/?sc=1&rev=134
Log:
Updated debian/deps.py to support building on a multiarch-enabled system.
Modified:
simgear/trunk/debian/deps.py
Modified: simgear/trunk/debian/deps.py
URL: http://svn.debian.org/wsvn/pkg-fgfs/simgear/trunk/debian/deps.py?rev=134&op=diff
==============================================================================
--- simgear/trunk/debian/deps.py (original)
+++ simgear/trunk/debian/deps.py Thu Jul 21 12:56:54 2011
@@ -27,11 +27,25 @@
sofiles.extend(l_ext)
sofiles.extend(l_ign)
+multiarch = os.popen("dpkg-architecture -qDEB_HOST_MULTIARCH", "r").readline().strip()
+
+def realfile(sof):
+ if multiarch != "":
+ idx = sof.rfind("/lib/")
+ if idx == -1:
+ return sof
+ fn = sof[:idx+5] + multiarch + sof[idx+4:]
+ if os.access(fn, os.F_OK):
+ return fn
+ return sof
+ else:
+ return sof
+
defs = {}
undefs = {}
for sof in sofiles:
undefs[sof] = []
- syms = os.popen("nm -D -f posix %s" % sof, "r").readlines()
+ syms = os.popen("nm -D -f posix %s" % realfile(sof), "r").readlines()
for syml in syms:
toks = syml.rstrip().split()
if toks[1] == "U":
@@ -139,10 +153,15 @@
print cycle
print
+def finalname(sof):
+ if sof.startswith("/usr/lib/"):
+ return "$(call usrlib,%s)" % sof[9:]
+ return sof
+
for sof in sofiles:
if not sodeps.has_key(sof):
continue
- deps = sodeps[sof]
+ deps = [finalname(x) for x in sodeps[sof]]
if sodrops.has_key(sof):
print "# %s: dropped %s" % (shorten(sof), ", ".join(sodrops[sof]))
print "%s: %s" % (sof, sof[:-3] + ".a"),
More information about the pkg-fgfs-crew
mailing list