## This was causing problems compiling KDE for unknown reasons.
## So, we'll symlink the libraries into /usr/lib again...
# Add QT3 library directory to /etc/ld.so.conf:

# Ensure multiple versions of 3.3.8 are not listed.
sed -i '/qt-3.3.8/d' etc/ld.so.conf

if ! grep /usr/lib64 etc/ld.so.conf 1> /dev/null 2> /dev/null ; then
 echo "/usr/lib64" >> etc/ld.so.conf
fi
if [ -x /sbin/ldconfig ]; then
  /sbin/ldconfig 2> /dev/null
fi
( cd usr/bin ; rm -rf tquic-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/tquic tquic-tqt3 )
( cd usr/bin ; rm -rf tqtconfig-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/tqtconfig tqtconfig-tqt3 )
( cd usr/bin ; rm -rf tqmoc-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/tqmoc tqmoc-tqt3 )
( cd usr/bin ; rm -rf tqmake-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/tqmake tqmake-tqt3 )
( cd usr/bin ; rm -rf tqlupdate-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/tqlupdate tqlupdate-tqt3 )
( cd usr/bin ; rm -rf tqlrelease-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/tqlrelease tqlrelease-tqt3 )
( cd usr/bin ; rm -rf tqlinguist-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/tqlinguist tqlinguist-tqt3 )
( cd usr/bin ; rm -rf tqembed-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/tqembed tqembed-tqt3 )
( cd usr/bin ; rm -rf tqdesigner-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/tqdesigner tqdesigner-tqt3 )
( cd usr/bin ; rm -rf tqassistant-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/tqassistant tqassistant-tqt3 )
( cd usr/bin ; rm -rf qm2ts-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/qm2ts qm2ts-tqt3 )
( cd usr/bin ; rm -rf msg2qm-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/msg2qm msg2qm-tqt3 )
( cd usr/bin ; rm -rf mergetr-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/mergetr mergetr-tqt3 )
( cd usr/bin ; rm -rf makeqpf-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/makeqpf makeqpf-tqt3 )
( cd usr/bin ; rm -rf createcw-tqt3 )
( cd usr/bin ; ln -sf ../lib64/tqt3/bin/createcw createcw-tqt3 )
( cd usr/lib64/tqt3/lib64 ; rm -rf libtqui.so.1.0 )
( cd usr/lib64/tqt3/lib64 ; ln -sf libtqui.so.1.0.0 libtqui.so.1.0 )
( cd usr/lib64/tqt3/lib64 ; rm -rf libtqui.so.1 )
( cd usr/lib64/tqt3/lib64 ; ln -sf libtqui.so.1.0.0 libtqui.so.1 )
( cd usr/lib64/tqt3/lib64 ; rm -rf libtqui.so )
( cd usr/lib64/tqt3/lib64 ; ln -sf libtqui.so.1.0.0 libtqui.so )
( cd usr/lib64/tqt3/lib64 ; rm -rf libtqt-mt.so.3.3 )
( cd usr/lib64/tqt3/lib64 ; ln -sf libtqt-mt.so.3.3.8 libtqt-mt.so.3.3 )
( cd usr/lib64/tqt3/lib64 ; rm -rf libtqt-mt.so.3 )
( cd usr/lib64/tqt3/lib64 ; ln -sf libtqt-mt.so.3.3.8 libtqt-mt.so.3 )
( cd usr/lib64/tqt3/lib64 ; rm -rf libtqt-mt.so )
( cd usr/lib64/tqt3/lib64 ; ln -sf libtqt-mt.so.3.3.8 libtqt-mt.so )
( cd usr/lib64/tqt3/mkspecs ; rm -rf default )
( cd usr/lib64/tqt3/mkspecs ; ln -sf linux-g++-64 default )
( cd usr/lib64/tqt3/mkspecs/linux-g++-64 ; rm -rf linux-g++-64 )
( cd usr/lib64/tqt3/mkspecs/linux-g++-64 ; ln -sf /usr/lib64/tqt3/mkspecs/linux-g++-64 linux-g++-64 )
