]> icculus.org git repositories - divverent/netradiant.git/blob - install-dylibs.sh
slightly better font handling, enjoy!
[divverent/netradiant.git] / install-dylibs.sh
1 #!/bin/sh
2
3 set -ex
4
5 : ${OTOOL:=otool}
6 : ${CP:=cp}
7 : ${INSTALLDIR:=.}
8
9 finkgetdeps()
10 {
11         otool -L "$1" | grep /sw/lib | while read -r LIB STUFF; do
12                 [ -z "${LIB##*:}" ] && continue # first line
13                 [ -f "$INSTALLDIR/${LIB##*/}" ] && continue
14                 cp -vL "$LIB" "$INSTALLDIR"
15                 finkgetdeps "$LIB"
16         done
17 }
18
19 finkgetdeps "$INSTALLDIR/radiant.ppc"
20 echo Warning: this only works if only ONE version of gtk-2.0 and pango is installed
21
22 for LIB in /sw/lib/gtk-2.0/*/loaders/libpixbufloader-bmp.so; do
23         LAST=$LIB
24 done
25 cp -L "$LAST" "$INSTALLDIR"
26 finkgetdeps "$LAST"
27
28 for LIB in /sw/lib/pango/*/modules/pango-basic-fc.so; do
29         LAST=$LIB
30 done
31 cp -L "$LAST" "$INSTALLDIR"
32 finkgetdeps "$LAST"
33
34 for LIB in /sw/lib/pango/*/modules/pango-basic-x.so; do
35         LAST=$LIB
36 done
37 cp -L "$LAST" "$INSTALLDIR"
38 finkgetdeps "$LAST"