netradiant-custom/install-dylibs.sh
divverent 71562074b6 some fixes, and patch bobtoolz improvements, from osxnetradiant
git-svn-id: svn://svn.icculus.org/netradiant/trunk@403 61c419a2-8eb2-4b30-bcec-8cead039b335
2009-12-18 08:03:34 +00:00

41 lines
852 B
Bash

#!/bin/sh
set -ex
: ${OTOOL:=otool}
: ${CP:=cp}
: ${INSTALLDIR:=.}
: ${EXE:=ppc}
: ${MACLIBDIR:=/sw/lib}
finkgetdeps()
{
otool -L "$1" | grep "$MACLIBDIR" | while read -r LIB STUFF; do
[ -z "${LIB##*:}" ] && continue # first line
[ -f "$INSTALLDIR/${LIB##*/}" ] && continue
cp -vL "$LIB" "$INSTALLDIR"
finkgetdeps "$LIB"
done
}
finkgetdeps "$INSTALLDIR/radiant.$EXE"
echo Warning: this only works if only ONE version of gtk-2.0 and pango is installed
for LIB in "$MACLIBDIR"/gtk-2.0/*/loaders/libpixbufloader-bmp.so; do
LAST=$LIB
done
cp -L "$LAST" "$INSTALLDIR"
finkgetdeps "$LAST"
for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-fc.so; do
LAST=$LIB
done
cp -L "$LAST" "$INSTALLDIR"
finkgetdeps "$LAST"
for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-x.so; do
LAST=$LIB
done
cp -L "$LAST" "$INSTALLDIR"
finkgetdeps "$LAST"