gtk.immodules generation in cross-compile systems



When building Gtk+ (2.0.5) on my linux-x-mingw cross compile
system, I ran into a problem with generating gtk.immodules.
The proper solution to this would be to build a version of
gtk-query-immodules-2.0 that could run on the build system
but was able to query modules build for the host system. This
doesn't seem to be a very easy task so I'm planning to generate
gtk.immodules on the host sytstem as part of the installation
process.

First, does anybody know if I am likely to run into any problems
doing this? The built gtk-query-immodules-2.0 runs quite happily
but produces output that differs from Tor's version in a number
of respects:

1. The module path is quite different, but I assume this is for
human eyes only since it appears to be commented out.

2. The first argument, which contains the name of dll files,
comes out as something like "c:\\path\\immodules\\im-xxx.dll"
instead of Tor's "/target/path/immodules/im-xxx.dll"

3. The fifth argument comes out as something like
"/unix-build-path//locale" instead of Tor's "/target/lib/locale"

Second, the build process currently barfs when it tries to run
gtk-query-immodules-2.0 (on my system, it tries to start wine
which I don't have set up). I would have thought it would be
better to allow the build process to complete with a suitable
warning. I use the following patch:

--- ../gtk+-2.0.5/modules/input/Makefile.am	Tue Mar  5 21:04:08 2002
+++ ./modules/input/Makefile.am	Mon Jul  1 16:44:47 2002
@@ -77,10 +77,19 @@
 # Running this if DESTDIR is set is going to not work at all, so
 # skip it.
 install-data-local:
+if CROSS_COMPILING
+	@echo "***"
+	@echo "*** Warning: gtk.immodules not built"
+	@echo "***"
+	@echo "*** Generate this file manually on host"
+	@echo "*** system using gtk-query-immodules-2.0"
+	@echo "***"
+else
 	if [ -z "$(DESTDIR)" ] ; then \
 	  $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
 	  $(top_builddir)/gtk/gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules ; \
         fi
+endif
 
 module_LTLIBRARIES =				\
 	$(IM_XIM_MODULE)			\
@@ -97,4 +106,7 @@
 gtk.immodules: Makefile.am $(module_LTLIBRARIES)
 	$(top_builddir)/gtk/gtk-query-immodules-2.0 *.la > gtk.immodules
 
+if CROSS_COMPILING
+else
 all-local: gtk.immodules
+endif

Does the panel think that such a patch would be sensible to
submit to bugzilla, or would a different approach be more
appropriate?

Many thanks,

-- 
Ali Harlow                              Email: ali avrc city ac uk
Research programmer                     Tel:   (020) 7040 4348
Applied Vision Research Centre          Intl: +44 20 7040 4348
City University                         Fax:   (020) 7040 5515
London                                  Intl: +44 20 7040 5515



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]