summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cvsignore1
-rw-r--r--gtk-lib64.patch66
-rw-r--r--gtk3.spec348
-rw-r--r--im-cedilla.conf6
-rw-r--r--import.log1
-rw-r--r--sources1
-rw-r--r--system-python.patch9
-rwxr-xr-xupdate-gdk-pixbuf-loaders-3.048
-rwxr-xr-xupdate-gtk-immodules-3.048
9 files changed, 528 insertions, 0 deletions
diff --git a/.cvsignore b/.cvsignore
index e69de29..a91e59f 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -0,0 +1 @@
+gtk+-2.90.0.tar.bz2
diff --git a/gtk-lib64.patch b/gtk-lib64.patch
new file mode 100644
index 0000000..90aa223
--- /dev/null
+++ b/gtk-lib64.patch
@@ -0,0 +1,66 @@
+diff -up gtk+-2.19.1/gdk-pixbuf/gdk-pixbuf-io.c.lib64 gtk+-2.19.1/gdk-pixbuf/gdk-pixbuf-io.c
+--- gtk+-2.19.1/gdk-pixbuf/gdk-pixbuf-io.c.lib64 2009-11-30 13:10:35.000000000 -0500
++++ gtk+-2.19.1/gdk-pixbuf/gdk-pixbuf-io.c 2009-11-30 20:54:21.842859303 -0500
+@@ -305,7 +305,17 @@ gdk_pixbuf_get_module_file (void)
+ gchar *result = g_strdup (g_getenv ("GDK_PIXBUF_MODULE_FILE"));
+
+ if (!result)
+- result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0", "gdk-pixbuf.loaders", NULL);
++ {
++ result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0",
++ HOST, "gdk-pixbuf.loaders", NULL);
++ if (!g_file_test (result, G_FILE_TEST_EXISTS))
++ {
++ g_free (result);
++
++ result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0",
++ "gdk-pixbuf.loaders", NULL);
++ }
++ }
+
+ return result;
+ }
+diff -up gtk+-2.19.1/gdk-pixbuf/Makefile.am.lib64 gtk+-2.19.1/gdk-pixbuf/Makefile.am
+--- gtk+-2.19.1/gdk-pixbuf/Makefile.am.lib64 2009-11-26 01:35:49.000000000 -0500
++++ gtk+-2.19.1/gdk-pixbuf/Makefile.am 2009-11-30 20:54:21.842859303 -0500
+@@ -521,6 +521,7 @@ INCLUDES = \
+ -I$(top_srcdir)/gdk-pixbuf \
+ -I$(top_builddir)/gdk-pixbuf \
+ -DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
++ -DHOST=\"$(host_triplet)\" \
+ -DGTK_VERSION=\"$(GTK_VERSION)\" \
+ -DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
+ -DGTK_PREFIX=\"$(prefix)\" \
+diff -up gtk+-2.19.1/gdk-pixbuf/Makefile.in.lib64 gtk+-2.19.1/gdk-pixbuf/Makefile.in
+--- gtk+-2.19.1/gdk-pixbuf/Makefile.in.lib64 2009-11-30 20:54:58.058857713 -0500
++++ gtk+-2.19.1/gdk-pixbuf/Makefile.in 2009-11-30 20:55:21.902591753 -0500
+@@ -1344,6 +1344,7 @@ INCLUDES = \
+ -I$(top_srcdir)/gdk-pixbuf \
+ -I$(top_builddir)/gdk-pixbuf \
+ -DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
++ -DHOST=\"$(host_triplet)\" \
+ -DGTK_VERSION=\"$(GTK_VERSION)\" \
+ -DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
+ -DGTK_PREFIX=\"$(prefix)\" \
+diff -up gtk+-2.19.1/gtk/gtkrc.c.lib64 gtk+-2.19.1/gtk/gtkrc.c
+--- gtk+-2.19.1/gtk/gtkrc.c.lib64 2009-11-26 01:35:50.000000000 -0500
++++ gtk+-2.19.1/gtk/gtkrc.c 2009-11-30 20:54:21.844826383 -0500
+@@ -450,7 +450,17 @@ gtk_rc_get_im_module_file (void)
+ if (im_module_file)
+ result = g_strdup (im_module_file);
+ else
+- result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0", "gtk.immodules", NULL);
++ {
++ result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0", GTK_HOST,
++ "gtk.immodules", NULL);
++ if (!g_file_test (result, G_FILE_TEST_EXISTS))
++ {
++ g_free (result);
++
++ result = g_build_filename (GTK_SYSCONFDIR, "gtk-3.0",
++ "gtk.immodules", NULL);
++ }
++ }
+ }
+
+ return result;
diff --git a/gtk3.spec b/gtk3.spec
new file mode 100644
index 0000000..6b31c2a
--- /dev/null
+++ b/gtk3.spec
@@ -0,0 +1,348 @@
+%global glib2_version 2.23.6-1
+%global pango_version 1.20.0-1
+%global atk_version 1.29.4-2
+%global cairo_version 1.6.0-1
+%global libpng_version 2:1.2.2-16
+%global xrandr_version 1.2.99.4-2
+%global gobject_introspection_version 0.6.7
+%global gir_repository_version 0.6.5-5
+
+%global bin_version 3.0.0
+
+Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
+Name: gtk3
+Version: 2.90.0
+Release: 5%{?dist}
+License: LGPLv2+
+Group: System Environment/Libraries
+URL: http://www.gtk.org
+#VCS: git:git://git.gnome.org/gtk+
+Source: http://download.gnome.org/sources/gtk+/2.90/gtk+-%{version}.tar.bz2
+Source1: update-gdk-pixbuf-loaders-3.0
+Source2: update-gtk-immodules-3.0
+Source3: im-cedilla.conf
+
+# Biarch changes
+Patch0: gtk-lib64.patch
+Patch1: system-python.patch
+
+BuildRequires: atk-devel >= %{atk_version}
+BuildRequires: pango-devel >= %{pango_version}
+BuildRequires: glib2-devel >= %{glib2_version}
+BuildRequires: libtiff-devel
+BuildRequires: libjpeg-devel
+BuildRequires: jasper-devel
+BuildRequires: libXi-devel
+BuildRequires: libpng-devel >= %{libpng_version}
+BuildRequires: gettext
+BuildRequires: gtk-doc
+BuildRequires: cups-devel
+BuildRequires: cairo-devel >= %{cairo_version}
+BuildRequires: libXrandr-devel >= %{xrandr_version}
+BuildRequires: libXrender-devel
+BuildRequires: libXcursor-devel
+BuildRequires: libXfixes-devel
+BuildRequires: libXinerama-devel
+BuildRequires: libXcomposite-devel
+BuildRequires: libXdamage-devel
+BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
+BuildRequires: gir-repository-devel >= %{gir_repository_version}
+
+# required for icon theme apis to work
+Requires: hicolor-icon-theme
+
+# We need to prereq these so we can run gtk-query-immodules-3.0
+Requires(post): glib2 >= %{glib2_version}
+Requires(post): atk >= %{atk_version}
+Requires(post): pango >= %{pango_version}
+# and these for gdk-pixbuf-query-loaders
+Requires(post): libtiff >= 3.6.1
+Requires: libXrandr >= %{xrandr_version}
+
+%description
+GTK+ is a multi-platform toolkit for creating graphical user
+interfaces. Offering a complete set of widgets, GTK+ is suitable for
+projects ranging from small one-off tools to complete application
+suites.
+
+This package contains version 3 of GTK+.
+
+%package immodules
+Summary: Input methods for GTK+
+Group: System Environment/Libraries
+Requires: gtk3 = %{version}-%{release}
+# for /etc/X11/xinit/xinput.d
+Requires: imsettings
+
+%description immodules
+The gtk3-immodules package contains standalone input methods that are shipped
+as part of GTK+ 3.
+
+%package immodule-xim
+Summary: XIM support for GTK+
+Group: System Environment/Libraries
+Requires: gtk3 = %{version}-%{release}
+
+%description immodule-xim
+The gtk3-immodule-xim package contains XIM support for GTK+ 3.
+
+%package devel
+Summary: Development files for GTK+
+Group: Development/Libraries
+Requires: gtk3 = %{version}-%{release}
+Requires: libX11-devel, libXcursor-devel, libXinerama-devel
+Requires: libXext-devel, libXi-devel, libXrandr-devel
+Requires: libXfixes-devel, libXcomposite-devel
+# for /usr/share/aclocal
+Requires: automake
+
+%description devel
+This package contains the libraries and header files that are needed
+for writing applications with version 3 of the GTK+ widget toolkit. If
+you plan to develop applications with GTK+, consider installing the
+gtk3-devel-docs package.
+
+%package devel-docs
+Summary: Developer documentation for GTK+
+Group: Development/Libraries
+Requires: gtk3 = %{version}-%{release}
+# for /usr/share/gtk-doc/html
+Requires: gtk-doc
+
+%description devel-docs
+This package contains developer documentation for version 3 of the GTK+
+widget toolkit.
+
+%prep
+%setup -q -n gtk+-%{version}
+
+%patch0 -p1 -b .lib64
+%patch1 -p1 -b .system-python
+
+%build
+%configure --with-xinput=xfree \
+ --enable-debug \
+ --disable-gtk-doc \
+ --disable-rebuilds \
+ --enable-introspection \
+ --with-libjasper \
+ --with-included-loaders=png
+
+# fight unused direct deps
+sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+
+make %{?_smp_mflags}
+
+# truncate NEWS
+awk '/^Overview of Changes/ { seen+=1 }
+{ if (seen < 2) print }
+{ if (seen == 2) { print "For older news, see http://git.gnome.org/cgit/gtk+/plain/NEWS"; exit } }' NEWS > tmp; mv tmp NEWS
+
+
+%install
+# Deriving /etc/gtk-3.0/$host location
+# NOTE: Duplicated below
+#
+# autoconf changes linux to linux-gnu
+case "%{_host}" in
+ *linux) host="%{_host}-gnu"
+ ;;
+ *) host="%{_host}"
+ ;;
+esac
+
+# autoconf uses powerpc not ppc
+host=`echo $host | sed "s/^ppc/powerpc/"`
+# autoconf uses ibm-linux not redhat-linux (s390x)
+host=`echo $host | sed "s/^s390\(x\)*-redhat/s390\1-ibm/"`
+
+# Make sure that the host value that is passed to the compile
+# is the same as the host that we're using in the spec file
+#
+compile_host=`grep 'host_triplet =' gtk/Makefile | sed "s/.* = //"`
+
+if test "x$compile_host" != "x$host" ; then
+ echo 1>&2 "Host mismatch: compile='$compile_host', spec file='$host'" && exit 1
+fi
+
+make install DESTDIR=$RPM_BUILD_ROOT \
+ RUN_QUERY_IMMODULES_TEST=false \
+ RUN_QUERY_LOADER_TEST=false
+
+%find_lang gtk30
+%find_lang gtk30-properties
+
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gtk-3.0
+#
+# Make cleaned-up versions of tutorials, examples, and faq for installation
+#
+mkdir -p tmpdocs
+cp -aR docs/tutorial/html tmpdocs/tutorial
+cp -aR docs/faq/html tmpdocs/faq
+
+for dir in examples/* ; do
+ if [ -d $dir ] ; then
+ mkdir -p tmpdocs/$dir
+ for file in $dir/* ; do
+ install -m 0644 $file tmpdocs/$dir
+ done
+ fi
+done
+
+# We need to have separate 32-bit and 64-bit binaries
+# for places where we have two copies of the GTK+ package installed.
+# (we might have x86_64 and i686 packages on the same system, for example.)
+case "$host" in
+ alpha*|ia64*|powerpc64*|s390x*|x86_64*)
+ mv $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-3.0 $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-3.0-64
+ mv $RPM_BUILD_ROOT%{_bindir}/gdk-pixbuf-query-loaders-3.0 $RPM_BUILD_ROOT%{_bindir}/gdk-pixbuf-query-loaders-3.0-64
+ ;;
+ *
+ mv $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-3.0 $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-3.0-32
+ mv $RPM_BUILD_ROOT%{_bindir}/gdk-pixbuf-query-loaders-3.0 $RPM_BUILD_ROOT%{_bindir}/gdk-pixbuf-query-loaders-3.0-32
+ ;;
+esac
+
+# Install wrappers for the binaries
+cp %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/update-gdk-pixbuf-loaders-3.0
+cp %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/update-gtk-immodules-3.0
+
+# Input method frameworks want this
+install -D %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinput.d
+
+# Remove unpackaged files
+rm $RPM_BUILD_ROOT%{_libdir}/*.la
+rm $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/*/*.la
+rm $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/%{bin_version}/*/*.la
+
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gtk-3.0/$host
+touch $RPM_BUILD_ROOT%{_sysconfdir}/gtk-3.0/$host/gtk.immodules
+touch $RPM_BUILD_ROOT%{_sysconfdir}/gtk-3.0/$host/gdk-pixbuf.loaders
+
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/modules
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/immodules
+
+#
+# We need the substitution of $host so we use an external
+# file list
+#
+echo %dir %{_sysconfdir}/gtk-3.0/$host >> gtk30.lang
+echo %ghost %{_sysconfdir}/gtk-3.0/$host/gtk.immodules >> gtk30.lang
+echo %ghost %{_sysconfdir}/gtk-3.0/$host/gdk-pixbuf.loaders >> gtk30.lang
+
+%post
+/sbin/ldconfig
+/usr/bin/update-gdk-pixbuf-loaders-3.0 %{_host}
+/usr/bin/update-gtk-immodules-3.0 %{_host}
+
+%post immodules
+/usr/bin/update-gtk-immodules-3.0 %{_host}
+
+%post immodule-xim
+/usr/bin/update-gtk-immodules-3.0 %{_host}
+
+%postun
+/sbin/ldconfig
+if [ $1 -gt 0 ]; then
+ /usr/bin/update-gdk-pixbuf-loaders-3.0 %{_host}
+ /usr/bin/update-gtk-immodules-3.0 %{_host}
+fi
+
+%postun immodules
+/usr/bin/update-gtk-immodules-3.0 %{_host}
+
+%postun immodule-xim
+/usr/bin/update-gtk-immodules-3.0 %{_host}
+
+%files -f gtk30.lang
+%defattr(-, root, root, -)
+
+%doc AUTHORS COPYING NEWS README
+%{_bindir}/gdk-pixbuf-query-loaders-3.0*
+%{_bindir}/gtk-query-immodules-3.0*
+%{_bindir}/gtk-update-icon-cache-3.0
+%{_bindir}/update-gdk-pixbuf-loaders-3.0
+%{_bindir}/update-gtk-immodules-3.0
+%{_libdir}/libgtk-x11-3.0.so.*
+%{_libdir}/libgdk-x11-3.0.so.*
+%{_libdir}/libgdk_pixbuf-3.0.so.*
+%{_libdir}/libgdk_pixbuf_xlib-3.0.so.*
+%{_libdir}/libgailutil-3.0.so.*
+%dir %{_libdir}/gtk-3.0
+%dir %{_libdir}/gtk-3.0/%{bin_version}
+%{_libdir}/gtk-3.0/%{bin_version}/engines
+%dir %{_libdir}/gtk-3.0/%{bin_version}/immodules
+%{_libdir}/gtk-3.0/%{bin_version}/loaders
+%{_libdir}/gtk-3.0/%{bin_version}/printbackends
+%{_libdir}/gtk-3.0/modules
+%{_libdir}/gtk-3.0/immodules
+%{_datadir}/themes/Default
+%{_datadir}/themes/Emacs
+%{_datadir}/themes/Raleigh
+%dir %{_sysconfdir}/gtk-3.0
+%{_libdir}/girepository-1.0
+# TODO: fix man page installation upstream
+#%{_mandir}/man1/gdk-pixbuf-query-loaders-3.0.1
+#%{_mandir}/man1/gtk-query-immodules-3.0.1
+#%{_mandir}/man1/gtk-update-icon-cache-3.0.1
+
+%files immodules
+%defattr(-, root, root, -)
+%{_libdir}/gtk-3.0/%{bin_version}/immodules/im-am-et.so
+%{_libdir}/gtk-3.0/%{bin_version}/immodules/im-cedilla.so
+%{_libdir}/gtk-3.0/%{bin_version}/immodules/im-cyrillic-translit.so
+%{_libdir}/gtk-3.0/%{bin_version}/immodules/im-inuktitut.so
+%{_libdir}/gtk-3.0/%{bin_version}/immodules/im-ipa.so
+%{_libdir}/gtk-3.0/%{bin_version}/immodules/im-multipress.so
+%{_libdir}/gtk-3.0/%{bin_version}/immodules/im-thai.so
+%{_libdir}/gtk-3.0/%{bin_version}/immodules/im-ti-er.so
+%{_libdir}/gtk-3.0/%{bin_version}/immodules/im-ti-et.so
+%{_libdir}/gtk-3.0/%{bin_version}/immodules/im-viqr.so
+%{_sysconfdir}/X11/xinit/xinput.d/im-cedilla.conf
+%config(noreplace) %{_sysconfdir}/gtk-3.0/im-multipress.conf
+
+%files immodule-xim
+%defattr(-, root, root, -)
+%{_libdir}/gtk-3.0/%{bin_version}/immodules/im-xim.so
+
+%files devel -f gtk30-properties.lang
+%defattr(-, root, root, -)
+%{_libdir}/lib*.so
+%{_libdir}/gtk-3.0/include
+%{_includedir}/*
+%{_datadir}/aclocal/*
+%{_bindir}/gdk-pixbuf-csource-3.0
+%{_bindir}/gtk-builder-convert-3.0
+%{_libdir}/pkgconfig/*
+%{_bindir}/gtk3-demo
+%{_datadir}/gtk-3.0
+%{_datadir}/gir-1.0
+
+%files devel-docs
+%defattr(-, root, root, -)
+%{_datadir}/gtk-doc/html/*
+#%{_mandir}/man1/gdk-pixbuf-csource-3.0.1
+#%{_mandir}/man1/gtk-builder-convert-3.0.1
+%doc tmpdocs/tutorial
+%doc tmpdocs/faq
+%doc tmpdocs/examples
+
+%changelog
+* Fri May 21 2010 Matthias Clasen <mclasen@redhat.com> 2.90.0-5
+- Some more package review feedback
+
+* Thu May 20 2010 Matthias Clasen <mclasen@redhat.com> 2.90.0-4
+- Remove %%check again, it causes trouble
+
+* Mon May 17 2010 Matthias Clasen <mclasen@redhat.com> 2.90.0-3
+- More review feedback
+
+* Wed May 12 2010 Matthias Clasen <mclasen@redhat.com> 2.90.0-2
+- Incorporate review feedback
+
+* Wed May 11 2010 Matthias Clasen <mclasen@redhat.com> 2.90.0-1
+- Update to the 2.90.0 release
+- Complete parallel installability
+
+* Mon May 10 2010 Richard Hughes <richard@hughsie.com> 2.90.0-0.0.20100510git
+- Update from git
diff --git a/im-cedilla.conf b/im-cedilla.conf
new file mode 100644
index 0000000..d8a1976
--- /dev/null
+++ b/im-cedilla.conf
@@ -0,0 +1,6 @@
+XIM=none
+XIM_PROGRAM=/bin/true
+XIM_ARGS=
+SHORT_DESC=im-cedilla
+GTK_IM_MODULE=cedilla
+QT_IM_MODULE=xim
diff --git a/import.log b/import.log
new file mode 100644
index 0000000..96390c5
--- /dev/null
+++ b/import.log
@@ -0,0 +1 @@
+gtk3-2_90_0-5_fc14:HEAD:gtk3-2.90.0-5.fc14.src.rpm:1274844282
diff --git a/sources b/sources
index e69de29..0091bae 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+fd30684a0f7ced548add1bd5e23ff439 gtk+-2.90.0.tar.bz2
diff --git a/system-python.patch b/system-python.patch
new file mode 100644
index 0000000..b4426d2
--- /dev/null
+++ b/system-python.patch
@@ -0,0 +1,9 @@
+diff -up gtk+-2.18.2/gtk/gtk-builder-convert.system-python gtk+-2.18.2/gtk/gtk-builder-convert-3.0
+--- gtk+-2.18.2/gtk/gtk-builder-convert-3.0.system-python 2009-10-13 15:59:50.423385098 -0400
++++ gtk+-2.18.2/gtk/gtk-builder-convert-3.0 2009-10-13 16:00:31.876142050 -0400
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python
+ #
+ # Copyright (C) 2006-2008 Async Open Source
+ # Henrique Romano <henrique@async.com.br>
diff --git a/update-gdk-pixbuf-loaders-3.0 b/update-gdk-pixbuf-loaders-3.0
new file mode 100755
index 0000000..68f3017
--- /dev/null
+++ b/update-gdk-pixbuf-loaders-3.0
@@ -0,0 +1,48 @@
+#! /bin/sh
+
+if test $# != 1; then
+ echo usage: update-gdk-pixbuf-loaders-3.0 host_triplet 1>&2
+ exit 1
+fi
+
+umask 022
+# Deriving /etc/gtk-3.0/$host location
+#
+# autoconf changes linux to linux-gnu
+case "$1" in
+ *linux) host="$1-gnu"
+ ;;
+ *) host=$1
+ ;;
+esac
+
+# autoconf uses powerpc not ppc
+host=`echo $host | sed "s/^ppc/powerpc/"`
+# autoconf uses ibm-linux not redhat-linux (s390x)
+host=`echo $host | sed "s/^s390\(x\)*-redhat/s390\1-ibm/"`
+
+# We have had problems in the past with build systems
+# changing host from i386 to i686 and appending/dropping
+# the -gnu suffix, so try to match up the $host we got
+# with whats actually there.
+if [ ! -d /etc/gtk-3.0/$host ]; then
+ case "$host" in
+ i?86*)
+ for d in $(ls -d /etc/gtk-3.0/i?86*); do
+ host=$(basename $d)
+ break
+ done
+ ;;
+ esac
+fi
+
+FILE=/etc/gtk-3.0/$host/gdk-pixbuf.loaders
+
+case "$host" in
+ alpha*|ia64*|powerpc64*|s390x*|x86_64*)
+ /usr/bin/gdk-pixbuf-query-loaders-3.0-64 > $FILE
+ ;;
+ *)
+ /usr/bin/gdk-pixbuf-query-loaders-3.0-32 > $FILE
+ ;;
+esac
diff --git a/update-gtk-immodules-3.0 b/update-gtk-immodules-3.0
new file mode 100755
index 0000000..0af7b06
--- /dev/null
+++ b/update-gtk-immodules-3.0
@@ -0,0 +1,48 @@
+#! /bin/sh
+
+if test $# != 1; then
+ echo usage: update-gtk-immodules-3.0 host_triplet 1>&2
+ exit 1
+fi
+
+umask 022
+# Deriving /etc/gtk-3.0/$host location
+#
+# autoconf changes linux to linux-gnu
+case "$1" in
+ *linux) host="$1-gnu"
+ ;;
+ *) host=$1
+ ;;
+esac
+
+# autoconf uses powerpc not ppc
+host=`echo $host | sed "s/^ppc/powerpc/"`
+# autoconf uses ibm-linux not redhat-linux (s390x)
+host=`echo $host | sed "s/^s390\(x\)*-redhat/s390\1-ibm/"`
+
+# We have had problems in the past with build systems
+# changing host from i386 to i686 and appending/dropping
+# the -gnu suffix, so try to match up the $host we got
+# with whats actually there.
+if [ ! -d /etc/gtk-3.0/$host ]; then
+ case "$host" in
+ i?86*)
+ for d in $(ls -d /etc/gtk-3.0/i?86*); do
+ host=$(basename $d)
+ break
+ done
+ ;;
+ esac
+fi
+
+FILE=/etc/gtk-3.0/$host/gtk.immodules
+
+case "$host" in
+ alpha*|ia64*|powerpc64*|s390x*|x86_64*)
+ /usr/bin/gtk-query-immodules-3.0-64 > $FILE
+ ;;
+ *)
+ /usr/bin/gtk-query-immodules-3.0-32 > $FILE
+ ;;
+esac
bgstack15