]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - install-dylibs.sh
some fixes, and patch bobtoolz improvements, from osxnetradiant
[xonotic/netradiant.git] / install-dylibs.sh
index 107e477d9b896dfde60dce2833c492c6729d878c..cdb7dc73801b23615fc408637503df4c2b0e1a07 100644 (file)
@@ -5,10 +5,12 @@ set -ex
 : ${OTOOL:=otool}
 : ${CP:=cp}
 : ${INSTALLDIR:=.}
+: ${EXE:=ppc}
+: ${MACLIBDIR:=/sw/lib}
 
 finkgetdeps()
 {
-       otool -L "$1" | grep /sw/lib | while read -r LIB STUFF; do
+       otool -L "$1" | grep "$MACLIBDIR" | while read -r LIB STUFF; do
                [ -z "${LIB##*:}" ] && continue # first line
                [ -f "$INSTALLDIR/${LIB##*/}" ] && continue
                cp -vL "$LIB" "$INSTALLDIR"
@@ -16,22 +18,22 @@ finkgetdeps()
        done
 }
 
-finkgetdeps "$INSTALLDIR/radiant.ppc"
+finkgetdeps "$INSTALLDIR/radiant.$EXE"
 echo Warning: this only works if only ONE version of gtk-2.0 and pango is installed
 
-for LIB in /sw/lib/gtk-2.0/*/loaders/libpixbufloader-bmp.so; do
+for LIB in "$MACLIBDIR"/gtk-2.0/*/loaders/libpixbufloader-bmp.so; do
        LAST=$LIB
 done
 cp -L "$LAST" "$INSTALLDIR"
 finkgetdeps "$LAST"
 
-for LIB in /sw/lib/pango/*/modules/pango-basic-fc.so; do
+for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-fc.so; do
        LAST=$LIB
 done
 cp -L "$LAST" "$INSTALLDIR"
 finkgetdeps "$LAST"
 
-for LIB in /sw/lib/pango/*/modules/pango-basic-x.so; do
+for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-x.so; do
        LAST=$LIB
 done
 cp -L "$LAST" "$INSTALLDIR"