aboutsummaryrefslogtreecommitdiffstats
path: root/find-provides.in
diff options
context:
space:
mode:
Diffstat (limited to 'find-provides.in')
-rwxr-xr-xfind-provides.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/find-provides.in b/find-provides.in
index 23c9296..13eed22 100755
--- a/find-provides.in
+++ b/find-provides.in
@@ -5,7 +5,7 @@
filelist=`sed "s/['\"]/\\\&/g"`
-solist=$(echo "$filelist" | egrep -v "^/lib/ld\.so|/usr/lib(64)?/gcj/" | egrep '(/usr(/X11R6)?)?/lib(64)?/.*\.so' | \
+solist=$(echo "$filelist" | egrep -v "^/lib/ld\.so|/usr/lib(32|64)?/gcj/" | egrep '(/usr(/X11R6)?)?/lib(32|64)?/.*\.so' | \
xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1)
pythonlist=
tcllist=
@@ -16,6 +16,7 @@ case `uname -m` in
alpha*) mark64="" ;;
*) mark64="()(64bit)" ;;
esac
+mark32="()(n32)"
#
# --- Library sonames and weak symbol versions (from glibc).
@@ -24,6 +25,10 @@ for f in $solist; do
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
+ if [ "$lib64" != "$mark64" ]; then
+ lib64=`if file -L $f 2>/dev/null | \
+ grep "MIPS, N32" >/dev/null; then echo "$mark32"; fi`
+ fi
if [ "$soname" != "" ]; then
if [ ! -L $f ]; then
echo $soname$lib64
@@ -83,10 +88,13 @@ fi
#
# --- .so files.
-for i in `echo $filelist | tr '[:blank:]' "\n" | egrep '(/usr(/X11R6)?)?/lib(|64)(/gcc(-lib)?/.+)?/[^/]+\.so$'`; do
+for i in `echo $filelist | tr '[:blank:]' "\n" | egrep '(/usr(/X11R6)?)?/lib(|32|64)(/gcc(-lib)?/.+)?/[^/]+\.so$'`; do
objd=`objdump -p ${i} | grep SONAME`
[ -h ${i} -a -n "${objd}" ] && \
lib64=`if file -L $i 2>/dev/null | grep "ELF 64-bit" >/dev/null; then echo "(64bit)"; fi` && \
+ if [ "$lib64" != "(64bit)" ]; then
+ lib64=`if file -L $i 2>/dev/null | grep "MIPS, N32" >/dev/null; then echo "(n32)"; fi`
+ fi && \
echo ${objd} | perl -p -e "s/.*SONAME\s+(\S+)\.so.*/devel(\1$lib64)/g"
done | sort -u