X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=install-dylibs.sh;h=1554b49cd69a7d2ec83da3b6145cced2d3bdbb25;hp=107e477d9b896dfde60dce2833c492c6729d878c;hb=9cf3816f69fa05dec5ed5c19f872583b3b1107c9;hpb=01a032eca097b8308d4ad44d6cf46784cbece0e3 diff --git a/install-dylibs.sh b/install-dylibs.sh old mode 100644 new mode 100755 index 107e477d..1554b49c --- a/install-dylibs.sh +++ b/install-dylibs.sh @@ -5,10 +5,14 @@ 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" @@ -16,23 +20,49 @@ 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 - LAST=$LIB -done -cp -L "$LAST" "$INSTALLDIR" -finkgetdeps "$LAST" - -for LIB in /sw/lib/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 - LAST=$LIB -done -cp -L "$LAST" "$INSTALLDIR" -finkgetdeps "$LAST" +getlib() +{ + LAST= + for LIB in "$@"; do + [ -f "$LIB" ] || continue + LAST=$LIB + done + cp -L "$LAST" "$INSTALLDIR" + finkgetdeps "$LAST" +} + +getlib "$MACLIBDIR"/gtk-2.0/*/loaders/libpixbufloader-bmp.so "$MACLIBDIR"/gdk-pixbuf-2.0/*/loaders/libpixbufloader-bmp.so +getlib "$MACLIBDIR"/pango/*/modules/pango-basic-fc.so +getlib "$MACLIBDIR"/pango/*/modules/pango-basic-x.so + +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" <