mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-13 20:11:19 +02:00
22 lines
907 B
Plaintext
22 lines
907 B
Plaintext
Allow readelf to print types without parentheses
|
|
|
|
--- toolkit/library/dependentlibs.py.orig 2017-11-14 14:36:13 UTC
|
|
+++ toolkit/library/dependentlibs.py
|
|
@@ -59,11 +59,15 @@ def dependentlibs_readelf(lib):
|
|
for line in proc.stdout:
|
|
# Each line has the following format:
|
|
# tag (TYPE) value
|
|
+ # or with BSD readelf:
|
|
+ # tag TYPE value
|
|
# Looking for NEEDED type entries
|
|
tmp = line.split(' ', 3)
|
|
- if len(tmp) > 3 and tmp[2] == '(NEEDED)':
|
|
+ if len(tmp) > 3 and 'NEEDED' in tmp[2]:
|
|
# NEEDED lines look like:
|
|
# 0x00000001 (NEEDED) Shared library: [libname]
|
|
+ # or with BSD readelf:
|
|
+ # 0x00000001 NEEDED Shared library: [libname]
|
|
match = re.search('\[(.*)\]', tmp[3])
|
|
if match:
|
|
deps.append(match.group(1))
|