Last-Update: 2016-11-19
Forwarded: no
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
Description: improve/fix search for "libproj.so".

--- a/frontend/linux/workbench/mysql-workbench.in
+++ b/frontend/linux/workbench/mysql-workbench.in
@@ -22,9 +22,10 @@
 
 # Check if PROJSO env is set and file exists, if not, try to handle this on our own
 if [[ -z "${PROJSO}" ]]; then
   # Set the PROJSO env variable so gdal can find proj cause it's using dlopen instead ld 
-  TMPLOC=`ldconfig -p | grep libproj\.so | awk '{printf $4;exit;}'`
+  TMPLOC="$(ldd /usr/lib/mysql-workbench/mysql-workbench-bin | awk '/libproj.so/{print $3}')"
+  [ -n "${TMPLOC}" ] || TMPLOC=`/sbin/ldconfig -p | grep libproj | awk '{printf $4;exit;}'`
   if [[ -f "$TMPLOC" ]]; then
     echo "Found $TMPLOC"
     export PROJSO=$TMPLOC
   else
