From c3a8fbc287facc4a4a92362e282a7f78c86ea950c8bd603c43b76362045fc08e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 29 Aug 2014 20:25:29 +0000 Subject: [PATCH] Avoid producing symbols for symlinks and directory names that just happen to have the particular suffix OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-filesystem?expand=0&rev=66 --- mingw64-find-provides.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mingw64-find-provides.sh b/mingw64-find-provides.sh index 81ad6e1..87d15cc 100644 --- a/mingw64-find-provides.sh +++ b/mingw64-find-provides.sh @@ -17,16 +17,19 @@ pcs=$(echo $filelist | tr [:blank:] '\n' | grep '\.pc$') implibs=$(echo $filelist | tr [:blank:] '\n' | grep '\.a$') for f in $dlls; do + [ ! -f "$f" ] && continue basename=`basename $f | tr [:upper:] [:lower:]` echo "mingw64($basename)" done for g in $pcs; do + [ ! -f "$g" ] && continue dirname=`dirname $g` PKG_CONFIG_PATH=$dirname x86_64-w64-mingw32-pkg-config --print-errors --print-provides $g | awk '{ print "mingw64(pkg:"$1")", $2, $3 }' done | sort -u for h in $implibs; do + [ ! -f "$h" ] && continue libname=`basename $h | sed 's#^lib##g' | sed 's#\.dll\.#\.#g' | sed 's#\.a##g'` echo "mingw64(lib:$libname)" done