Obsolete golang-120
[oi-userland.git] / components / desktop / desktop-cache / patches / 08-gdk-pixbuf-prefer-64.patch
blob4d7f6d94e35a1347c1508d5a64daf60d9fc7a818
1 Prefer 64 bit binaries for gdk-pixbuf.
2 Do not generate gdk-pixbuf.loaders in /etc
4 --- desktop-cache-smf-services-0.2.2/pixbuf-loaders/pixbuf-loaders-installer.orig
5 +++ desktop-cache-smf-services-0.2.2/pixbuf-loaders/pixbuf-loaders-installer
6 @@ -53,36 +53,33 @@
7 # if list generate loader list
10 -ARCH64=`/bin/isainfo -k`
12 -if [[ $ARCH64 != "amd64" ]] && [[ "$ARCH64" != "sparcv9" ]]; then
13 - ARCH64=""
14 -fi
16 start_pixbuf_loaders_installer ()
18 -for DIR in "" $ARCH64; do
19 - test -x /usr/bin/$DIR/gdk-pixbuf-query-loaders || {
20 +for ARCH in $(/bin/isainfo) ; do
21 + BINDIR='/usr/bin'
22 + DIR="$ARCH"
23 + [ "$ARCH" == "i386" ] && BINDIR='/usr/bin/i86' && DIR=''
25 + test -x $BINDIR/gdk-pixbuf-query-loaders || {
26 echo "gdk-pixbuf-query-loaders not installed"
27 continue
29 - if [ -a "/etc/$DIR/gtk-2.0/gdk-pixbuf.loaders" ]; then
30 + if [ -a "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache" ]; then
31 RESULT=`${FIND_NEWER} -f -c -m --name '*.so' \
32 - --newer /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders \
33 - /usr/lib/$DIR/gdk-pixbuf-2.0/*/loaders 2>/dev/null`
34 + --newer /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache \
35 + /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders 2>/dev/null`
36 else
37 RESULT="no loader file"
40 if [ -n "$RESULT" ]; then
41 echo "updating/creating gdk pixbuf loader file"
42 - /usr/bin/$DIR/gdk-pixbuf-query-loaders > /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders
43 - /usr/bin/$DIR/gdk-pixbuf-query-loaders > /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache
44 + $BINDIR/gdk-pixbuf-query-loaders > /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache
45 if [ $? -ne 0 ]; then
46 - echo "gdk-pixbuf-query-loaders exited with an error while generating the installer file /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders"
47 + echo "gdk-pixbuf-query-loaders exited with an error while generating the installer file /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache"
48 exit $SMF_EXIT_ERR_FATAL
49 else
50 - echo "gdk pixbuf loaders installed in /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders"
51 + echo "gdk pixbuf loaders installed in /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache"
54 done
55 @@ -90,13 +87,17 @@
57 refresh_pixbuf_loaders_installer ()
59 -for DIR in "" $ARCH64; do
60 - test -x /usr/bin/$DIR/gdk-pixbuf-query-loaders || {
61 +for ARCH in $(/bin/isainfo) ; do
62 + BINDIR='/usr/bin'
63 + DIR="$ARCH"
64 + [ "$ARCH" == "i386" ] && BINDIR='/usr/bin/i86' && DIR=''
66 + test -x $BINDIR/gdk-pixbuf-query-loaders || {
67 echo "gdk-pixbuf-query-loaders not installed"
68 continue
70 - if [ -a "/etc/$DIR/gtk-2.0/gdk-pixbuf.loaders" ]; then
71 - RESULT=`/usr/bin/find /usr/lib/$DIR/gdk-pixbuf-2.0/*/loaders/*.so ! -type d \
72 + if [ -a "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache" ]; then
73 + RESULT=`/usr/bin/find /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders/*.so ! -type d \
74 -follow -print 2>/dev/null`
75 else
76 RESULT="no loader file"
77 @@ -104,13 +105,12 @@
79 if [ -n "$RESULT" ]; then
80 echo "updating/creating gdk pixbuf loader file"
81 - /usr/bin/$DIR/gdk-pixbuf-query-loaders > /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders
82 - /usr/bin/$DIR/gdk-pixbuf-query-loaders > /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache
83 + $BINDIR/gdk-pixbuf-query-loaders > /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache
84 if [ $? -ne 0 ]; then
85 - echo "gdk-pixbuf-query-loaders exited with an error while generating the installer file /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders"
86 + echo "gdk-pixbuf-query-loaders exited with an error while generating the installer file /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache"
87 exit $SMF_EXIT_ERR_FATAL
88 else
89 - echo "gdk pixbuf loaders installed in /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders"
90 + echo "gdk pixbuf loaders installed in /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache"
93 done