X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=install-dylibs.sh;h=9f4e3e2b9a349b64c9915073b3dcf49c1cd7b8e8;hb=dec339b67ca2ba8a3b521859d1992e634d3c127a;hp=12d0bbb5b09c07a6d8ae24a12a365de43498307f;hpb=64eee327a30d638d581b1673c45239bd4d701b78;p=xonotic%2Fnetradiant.git diff --git a/install-dylibs.sh b/install-dylibs.sh old mode 100644 new mode 100755 index 12d0bbb5..9f4e3e2b --- a/install-dylibs.sh +++ b/install-dylibs.sh @@ -5,18 +5,73 @@ set -ex : ${OTOOL:=otool} : ${CP:=cp} : ${INSTALLDIR:=.} +: ${EXE:=ppc} +: ${MACLIBDIR:=/sw/lib} +: ${CAT:=cat} + 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" - finkgetdeps "$INSTALLDIR/${LIB##*/}" + finkgetdeps "$LIB" 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 -cp -vL /sw/lib/gtk-2.0/*/loaders/libpixbufloader-bmp.so "$INSTALLDIR/" -cp -vL /sw/lib/pango/*/modules/pango-basic-fc.so "$INSTALLDIR/" -cp -vL /sw/lib/pango/*/modules/pango-basic-x.so "$INSTALLDIR/" + +LAST= +for LIB in "$MACLIBDIR"/gtk-2.0/*/loaders/libpixbufloader-bmp.so "$MACLIBDIR"/gdk-pixbuf-2.0/*/loaders/libpixbufloader-bmp.so; do + [ -f "$LIB" ] || continue + LAST=$LIB +done +cp -L "$LAST" "$INSTALLDIR" +finkgetdeps "$LAST" + +LAST= +for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-fc.so; do + [ -f "$LIB" ] || continue + LAST=$LIB +done +cp -L "$LAST" "$INSTALLDIR" +finkgetdeps "$LAST" + +LAST= +for LIB in "$MACLIBDIR"/pango/*/modules/pango-basic-x.so; do + [ -f "$LIB" ] || continue + LAST=$LIB +done +cp -L "$LAST" "$INSTALLDIR" +finkgetdeps "$LAST" + +cp -L "$MACLIBDIR"/../etc/fonts/fonts.conf "$INSTALLDIR" +cp -L "$MACLIBDIR"/../etc/fonts/fonts.dtd "$INSTALLDIR" +cp -L "$MACLIBDIR"/../etc/gtk-2.0/gdk-pixbuf.loaders "$INSTALLDIR" +cp -L "$MACLIBDIR"/../etc/pango/pangorc "$INSTALLDIR" + +$CAT > "$INSTALLDIR/../netradiant.sh" <