Re: gtk.immodules generation in cross-compile systems



"J. Ali Harlow" <ali optosun7 city ac uk> writes:

> 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.

This should be perfectly fine. 
 
> 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.

Yep.

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

This is a bit bizzare; it should refer to $(datadir)/locale,
not to a build path. (Ignoring win32-specific changes that
Tor might be making by hand.)
 
> 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

This looks OK, but I'd rather see it better integrated with the 
DESTDIR handling. Maybe something like:

if CROSS_COMPILING
RUN_QUERY_IMODULES_TEST=false
else
RUN_QUERY_IMMODULES_TEST=test -z "$(DESTDIR)"
endif

[...]

  	if $(RUN_QUERY_IMMODULES_TEST) ; then \
  	  $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
  	  $(top_builddir)/gtk/gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules ; \
        else ; \ 
          [ echo warning ]
        fi

Regards,
                                        Owen



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