X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=install-dylibs.sh;h=6b9e5303af8aef09050019dc27c5fb7d86fe4d89;hb=8a00fda721f6912ec1af097b9a69db4db10ffbdb;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..6b9e5303 --- a/install-dylibs.sh +++ b/install-dylibs.sh @@ -5,18 +5,64 @@ 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/" + +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" <